]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - helpers/basic_auth/PAM/basic_pam_auth.cc
SourceFormat Enforcement
[thirdparty/squid.git] / helpers / basic_auth / PAM / basic_pam_auth.cc
index 2d353e80cd3904f8a8be2774ddbacd3ab3af473d..9638a0299f31377a6c3decea8df30ac6e4a76371 100644 (file)
@@ -1,5 +1,14 @@
+/*
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
 /*
  * PAM authenticator module for Squid.
+ *
  * Copyright (C) 1999,2002,2003 Henrik Nordstrom <hno@squid-cache.org>
  *
  *  This program is free software; you can redistribute it and/or modify
  *
  *   Version 2.0, 2002-01-07
  *      One shot mode, command line options
- *     man page
+ *  man page
  *
  *   Version 1.3, 1999-12-10
- *     Bugfix release 1.3 to work around Solaris 2.6
+ *      Bugfix release 1.3 to work around Solaris 2.6
  *      brokenness (not sending arguments to conversation
  *      functions)
  *
  *   Version 1.2, internal release
  *
  *   Version 1.1, 1999-05-11
- *     Initial version
- *
- * Compile this program with: gcc -o basic_pam_auth basic_pam_auth.cc -lpam -ldl
+ *  Initial version
  */
 #include "squid.h"
 #include "helpers/defines.h"
@@ -90,7 +97,7 @@
 #endif
 
 #if _SQUID_SOLARIS_
-static char *password = NULL;  /* Workaround for Solaris 2.6 brokenness */
+static char *password = NULL;   /* Workaround for Solaris 2.6 brokenness */
 #endif
 
 extern "C" int password_conversation(int num_msg, PAM_CONV_FUNC_CONST_PARM struct pam_message **msg,
@@ -217,7 +224,7 @@ start:
         ++password_buf;
         rfc1738_unescape(user);
         rfc1738_unescape(password_buf);
-        conv.appdata_ptr = (char *) password_buf;      /* from buf above. not allocated */
+        conv.appdata_ptr = (char *) password_buf;   /* from buf above. not allocated */
 
         if (no_realm) {
             /* Remove DOMAIN\.. and ...@domain from the user name in case the user
@@ -303,3 +310,4 @@ error:
     }
     return 0;
 }
+