]> granicus.if.org Git - linux-pam/commitdiff
Fix whitespace issues
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 26 Oct 2011 23:56:54 +0000 (23:56 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 26 Oct 2011 23:56:54 +0000 (23:56 +0000)
Cleanup trailing whitespaces, indentation that uses spaces before tabs,
and blank lines at EOF.  Make the project free of warnings reported by
git diff --check 4b825dc642cb6eb9a060e54bf8d69288fbee4904 HEAD

122 files changed:
ABOUT-NLS
CHANGELOG
COPYING
Copyright
INSTALL
Make.xml.rules
NEWS
conf/pam.conf
conf/pam_conv1/README
doc/Makefile.am
doc/man/pam_chauthtok.3.xml
doc/man/pam_get_user.3.xml
doc/man/pam_set_data.3.xml
doc/man/pam_sm_authenticate.3.xml
doc/man/pam_xauth_data.3.xml
doc/specs/.cvsignore
doc/specs/draft-morgan-pam.raw
doc/specs/parse_y.y
doc/specs/rfc86.0.txt
dynamic/test.c
examples/.cvsignore
examples/README
examples/blank.c
examples/check_user.c
examples/vpass.c
libpam/.cvsignore
libpam/pam_audit.c
libpam/pam_delay.c
libpam/pam_dispatch.c
libpam/pam_dynamic.c
libpam/pam_handlers.c
libpam/pam_item.c
libpam/pam_misc.c
libpam/pam_modutil_getgrgid.c
libpam/pam_modutil_getgrnam.c
libpam/pam_modutil_getpwnam.c
libpam/pam_modutil_getpwuid.c
libpam/pam_modutil_getspnam.c
libpam/pam_modutil_ingroup.c
libpam/pam_prelude.h
libpam/pam_session.c
libpam/pam_tokens.h
libpam_misc/Makefile.am
libpam_misc/include/security/pam_misc.h
libpam_misc/misc_conv.c
libpamc/License
libpamc/include/security/pam_client.h
libpamc/pamc_client.c
libpamc/pamc_load.c
libpamc/test/agents/secret@here
libpamc/test/modules/pam_secret.c
libpamc/test/regress/test.libpamc.c
libpamc/test/regress/test.secret@here
m4/japhar_grep_cflags.m4
m4/libprelude.m4
modules/modules.map
modules/pam_access/pam_access.c
modules/pam_env/pam_env.conf
modules/pam_env/pam_env.conf.5.xml
modules/pam_exec/pam_exec.8.xml
modules/pam_exec/pam_exec.c
modules/pam_keyinit/pam_keyinit.c
modules/pam_limits/pam_limits.c
modules/pam_mkhomedir/mkhomedir_helper.c
modules/pam_mkhomedir/pam_mkhomedir.c
modules/pam_namespace/md5.c
modules/pam_namespace/namespace.conf
modules/pam_namespace/namespace.conf.5.xml
modules/pam_namespace/namespace.init
modules/pam_namespace/pam_namespace.c
modules/pam_namespace/pam_namespace.h
modules/pam_pwhistory/opasswd.c
modules/pam_securetty/pam_securetty.c
modules/pam_selinux/Makefile.am
modules/pam_selinux/pam_selinux.c
modules/pam_selinux/pam_selinux_check.8
modules/pam_sepermit/pam_sepermit.c
modules/pam_shells/pam_shells.c
modules/pam_stress/pam_stress.c
modules/pam_tally/pam_tally.c
modules/pam_tally/pam_tally_app.c
modules/pam_tally2/pam_tally2.c
modules/pam_tally2/pam_tally2_app.c
modules/pam_time/pam_time.c
modules/pam_time/time.conf
modules/pam_time/time.conf.5.xml
modules/pam_timestamp/hmacfile.c
modules/pam_timestamp/hmacsha1.c
modules/pam_timestamp/pam_timestamp.8.xml
modules/pam_timestamp/pam_timestamp_check.8.xml
modules/pam_timestamp/sha1.c
modules/pam_unix/CHANGELOG
modules/pam_unix/bigcrypt.c
modules/pam_unix/md5.c
modules/pam_unix/pam_unix_auth.c
modules/pam_unix/pam_unix_passwd.c
modules/pam_unix/pam_unix_sess.c
modules/pam_unix/passverify.c
modules/pam_unix/support.c
modules/pam_unix/unix_update.c
modules/pam_userdb/Makefile.am
modules/pam_userdb/create.pl
modules/pam_userdb/pam_userdb.c
modules/pam_userdb/pam_userdb.h
po/.cvsignore
tests/tst-dlopen.c
xtests/group.conf
xtests/tst-pam_access1.pamd
xtests/tst-pam_access2.pamd
xtests/tst-pam_access3.pamd
xtests/tst-pam_access4.pamd
xtests/tst-pam_authfail.c
xtests/tst-pam_authsucceed.c
xtests/tst-pam_dispatch3.pamd
xtests/tst-pam_group1.pamd
xtests/tst-pam_limits1.pamd
xtests/tst-pam_pwhistory1.pamd
xtests/tst-pam_substack1.pamd
xtests/tst-pam_unix1.pamd
xtests/tst-pam_unix2.pamd
xtests/tst-pam_unix3.pamd
xtests/tst-pam_unix4.pamd

index 3575535a82b676761a0c7a2422205b0851c3e4e9..680627f2a9728be08c1170cfab0977bb89085327 100644 (file)
--- a/ABOUT-NLS
+++ b/ABOUT-NLS
@@ -1108,4 +1108,3 @@ developed inside the GNU project.  Therefore the information given above
 applies also for every other Free Software Project.  Contact
 `translation@iro.umontreal.ca' to make the `.pot' files available to
 the translation teams.
-
index 02d081a80c4bfdbc2f9c16cbb8e5218d374eb2f4..a997c0f5e94e0c26fc27655adfa3f0fcb64851a4 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -129,17 +129,17 @@ bug report - outstanding bugs are listed here:
 * libpam: Fix debug code (kukuk)
 * pam_limits: Fix order of LIMITS_DEF_* priorities (kukuk)
 * pam_xauth: preserve DISPLAY variable (Novell #66885 - kukuk)
-* libpam: Add prelude ids (http://www.prelude-ids.org) support, 
+* libpam: Add prelude ids (http://www.prelude-ids.org) support,
   as experimental. (toady)
-* configure: Add the directory where new versions of cracklib is 
-  installed (from Jim Gifford - toady) 
+* configure: Add the directory where new versions of cracklib is
+  installed (from Jim Gifford - toady)
 * libpamc: Use standard u_intX_t types instead of __uX (kukuk)
 
 0.78: Do Nov 18 14:48:36 CET 2004
 
 * pam_unix: change the order of trying password changes - local first,
   NIS second (t8m)
-* pam_wheel: add option only_root to make it affect authentication 
+* pam_wheel: add option only_root to make it affect authentication
   to root account only
 * pam_unix: test return values on renaming files and report error to
   syslog and to user
@@ -175,7 +175,7 @@ bug report - outstanding bugs are listed here:
   The whole idea is to create few "systemwide" pam configs and include
   parts of them in application pam configs.
   (patch by "Dmitry V. Levin" <ldv@altlinux.org>) (Bug 812567 - baggins).
-* doc/modules/pam_mkhomedir.sgml: Remove wrong debug options 
+* doc/modules/pam_mkhomedir.sgml: Remove wrong debug options
   (Bug 591605 - kukuk)
 * pam_unix: Call password checking helper whenever the password field
   contains only one character (Bug 1027903 - kukuk)
@@ -1050,7 +1050,7 @@ libpam. Prior versions were buggy - see bugfix for Bug 129775.
          (otherwise /etc/pam.conf is treated as before)
        - given /etc/pam.d/
          . config files are named (in lower case) by service-name
-         . config files have same syntax as /etc/pam.conf except       
+         . config files have same syntax as /etc/pam.conf except
            that the "service-name" field is not present. (there
            are thus three manditory fields (and arguments are
            optional):
@@ -1207,7 +1207,7 @@ Sat Nov 30 19:30:20 PST 1996, Andrew Morgan <morgan@parc.power.net>
   also some coverage of libpam_misc in the App. Developers' guide.
 
 * Cristian's patches to pam_limits and pam_pwdb. Fixing bugs. (MORE added)
-  
+
 * adopted Cristian's _pam_macros.h file to help with common macros and
   debugging stuff, gone through tree tidying up debugging lines to use
   this [not complete].
@@ -1287,7 +1287,7 @@ A brief summary of what has changed:
 
 * removed <bf/ .. / from documentation titles. This was not giving
   politically correct html..
+
 ----- My vvvvvvvvvvvvvvvvvvv was a long time ago ;*] -----
 
 Wed Sep  4 23:57:19 PDT 1996 (Andrew Morgan <morgan@physics.ucla.edu>
@@ -1345,7 +1345,7 @@ PASSWD  - Elliot's account management included, and enhanced by Cristian Gafton.
 
   *** If anyone has any trouble, please *say*. Your problem will be
       fixed in the next release. Also please feel free to scour the
-      code for race conditions etc... 
+      code for race conditions etc...
 
 [* The above change requires that you purge your /usr/lib/security
    directory of the old pam_unix_XXX.so modules: they will NOT be deleted
@@ -1533,7 +1533,7 @@ CFLAGS* added 'make sterile' to top level makefile. This does extraclean and rem
   future documentation of static module support in pam_modules.sgml)
 * libpam; many changes to makefiles and also automated the inclusion of
   static module objects in pam_static.c
-* modified modules for automated static/dynamic support. Added static & 
+* modified modules for automated static/dynamic support. Added static &
   dynamic subdirectories, as instructed by Michael
 * removed an annoying syslog message from pam_filter: "parent exited.."
 * updated todo list (anyone know anything about svgalib/X? we probably should
@@ -1763,4 +1763,3 @@ Sat Feb 17 17:30:24 EST 1996 (Alexander O. Yuriev alex@bach.cis.temple.edu)
        * stable code from pam_unix is added to modules/pam_unix
        * test/test.c now requests username and password and attempts
          to perform authentication
-
diff --git a/COPYING b/COPYING
index 2f27a2ee0efd79acd639aa91511d1105d686654a..12ff8c53a321b788834d1be70fdf193beee6ccc1 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -38,4 +38,3 @@ TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
 USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 DAMAGE.
 -------------------------------------------------------------------------
-
index 2f27a2ee0efd79acd639aa91511d1105d686654a..12ff8c53a321b788834d1be70fdf193beee6ccc1 100644 (file)
--- a/Copyright
+++ b/Copyright
@@ -38,4 +38,3 @@ TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
 USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 DAMAGE.
 -------------------------------------------------------------------------
-
diff --git a/INSTALL b/INSTALL
index 56b077d6a0b8773b014bd4381cc09abb17fff351..31117369695a8efc2d0368e300a19d037bd6f54d 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -233,4 +233,3 @@ configuration-related scripts to be executed by `/bin/bash'.
 
 `configure' also accepts some other, not widely useful, options.  Run
 `configure --help' for more details.
-
index 6e9dccc93423cddc481a6dc05a55c66cf79e8fc6..bee30cda3f37f80ac95434e946fa86d3194f670a 100644 (file)
@@ -22,4 +22,3 @@ README: README.xml
        $(XSLTPROC) -o $(srcdir)/$@ --path $(srcdir) --xinclude --nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
 
 #CLEANFILES += $(man_MANS) README
-
diff --git a/NEWS b/NEWS
index 81f961f1f15b285f473d7f00bbfcd5aaf31d76e0..fe8cf47c104d90d8b112d1e624a923309b3c1930 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,7 +3,7 @@ Linux-PAM NEWS -- history of user-visible changes.
 Release 1.1.5
 * pam_env: Fix CVE-2011-3148 and CVE-2011-3149
 * pam_access: Add hostname resolution cache
-* Documentation: Improvements/fixes 
+* Documentation: Improvements/fixes
 
 
 Release 1.1.4
index aa0e413012aa08a7238f49759c242dd5b3812ca4..3a06bd664572e466d19d3793d5f278b26970aa71 100644 (file)
@@ -123,4 +123,3 @@ xdm account    required   pam_unix.so
 # The PAM configuration file for the `xlock' service
 #
 xlock  auth       required   pam_unix.so
-
index 9d27e223b774f43d1819466d0f062e4417fc9401..8c748ba8f6b212abefa3886db0d4c76860d7e368 100644 (file)
@@ -6,4 +6,3 @@ creates the pam.d/ directory in the current directory.
 The program will fail if ./pam.d/ already exists.
 
 Andrew Morgan, February 1997
-
index 4a300e15892d74069ca9aa7f7d4b22b95dc3ad1c..f4762f2d01e400fc9114e2ebf131fe2bfb93d90f 100644 (file)
@@ -19,4 +19,3 @@ releasedocs: all
        make -C sag releasedocs
        make -C adg releasedocs
        make -C mwg releasedocs
-       
index 7e20070b9ebeddfd972ffdae751d179b0d59f6b7..b9922a6cead73282a9ddee248543aa55076f966a 100644 (file)
@@ -35,7 +35,7 @@
       associated with the handle <emphasis>pamh</emphasis>).
     </para>
     <para>
-      The <emphasis>pamh</emphasis> argument is an authentication 
+      The <emphasis>pamh</emphasis> argument is an authentication
       handle obtained by a prior call to pam_start().
       The flags argument is the binary or of zero or more of the
       following values:
index ff8be69499c93670916b3e76cfcec213a7cfeb31..9c5830e9c77c09b83826b383f367ec34473976c1 100644 (file)
@@ -42,7 +42,7 @@
       name of the user specified by
       <citerefentry>
         <refentrytitle>pam_start</refentrytitle><manvolnum>3</manvolnum>
-      </citerefentry>. If no user was specified it what 
+      </citerefentry>. If no user was specified it what
       <function>pam_get_item (pamh, PAM_USER, ... );</function> would
       have returned. If this is NULL it obtains the username via the
       <citerefentry>
     </itemizedlist>
     <para>
       By whatever means the username is obtained, a pointer to it is
-      returned as the contents of <emphasis>*user</emphasis>. Note, 
-      this memory should <emphasis remap="B">not</emphasis> be 
+      returned as the contents of <emphasis>*user</emphasis>. Note,
+      this memory should <emphasis remap="B">not</emphasis> be
       <emphasis>free()</emphasis>'d or <emphasis>modified</emphasis>
       by the module.
     </para>
     <para>
       This function sets the <emphasis>PAM_USER</emphasis> item
-      associated with the 
+      associated with the
       <citerefentry>
         <refentrytitle>pam_set_item</refentrytitle><manvolnum>3</manvolnum>
       </citerefentry> and
index d6d224e7fac4deeaffc3cf0a889ee984bfa67012..c20068c64c406247b7e42debb8cc4546dfbdfc98 100644 (file)
@@ -40,7 +40,7 @@
     <title>DESCRIPTION</title>
     <para>
       The <function>pam_set_data</function> function associates a pointer
-      to an object with the (hopefully) unique string 
+      to an object with the (hopefully) unique string
       <emphasis>module_data_name</emphasis> in the PAM context specified
       by the <emphasis>pamh</emphasis> argument.
     </para>
index 37c77576325ec3f2d3188bf9656913398f1e0fc6..9121aed210d7da94f202ac543fd5e86f21fd301a 100644 (file)
@@ -62,7 +62,7 @@
             Return <emphasis remap='B'>PAM_AUTH_ERR</emphasis> if the
             database of authentication tokens for this authentication
             mechanism has a <emphasis>NULL</emphasis> entry for the user.
-            Without this flag, such a <emphasis>NULL</emphasis> token 
+            Without this flag, such a <emphasis>NULL</emphasis> token
             will lead to a success without the user being prompted.
           </para>
         </listitem>
@@ -95,7 +95,7 @@
         <listitem>
           <para>
             The modules were not able to access the authentication
-            information. This might be due to a network or hardware 
+            information. This might be due to a network or hardware
             failure etc.
           </para>
         </listitem>
index 0cd6730b02ac8c7263b6e0de7d74845c472c7077..505985e49f38101dd981abfa0da51b0331d9b786 100644 (file)
@@ -35,7 +35,7 @@ struct pam_xauth_data {
     <title>DESCRIPTION</title>
     <para>
       The <function>pam_xauth_data</function> structure contains X
-      authentication data used to make a connection to an X display.  
+      authentication data used to make a connection to an X display.
       Using this mechanism, an application can communicate X
       authentication data to PAM service modules.  This allows modules to
       make a connection to the user's X display in order to label the
index 0e7cbe2fa059016448a63d29aa02ed2f80c077d2..efaf18a0d0d7b046229642a16fbb240110387e8a 100644 (file)
@@ -9,4 +9,3 @@ padout
 parse_l.c
 parse_y.c
 parse_y.h
-
index 45109f4564c02437bb2516c3fdc19f08b3902b41..ec5bba49a6378e3342fe3a2779ccc3865c860975 100644 (file)
@@ -227,7 +227,7 @@ o Anyone can define additional agents by using names in the format
   your agent has as an identifier, they you are entitled to use
   this identifier.) It is up to each domain how it manages its local
   namespace.
+
 The '/' character is a mandatory delimiter, indicating the end of the
 agent_id. The trailing data is of a format specific to the agent with
 the given agent_id.
@@ -377,7 +377,7 @@ conversation function with which it encapsulates module-generated
 requests and exchanges them with the client. Every message sent by a
 module should be acknowledged.
 
-General conversation functions can support the following five 
+General conversation functions can support the following five
 conversation requests:
 
    echo text string
@@ -617,7 +617,7 @@ Following a call to pamc_end, the pamc_handle_t will be invalid.
 
 The return value for this function is one of the following:
 
-       PAM_BPC_TRUE    - all invoked agents are content with
+       PAM_BPC_TRUE    - all invoked agents are content with
                          authentication (the server is _not_ judged
                          _un_trustworthy by any agent)
 
index 87fc54ea912db84148a6835d66c39043c84f9e2f..b195f5d3fa9cdbbd8a255c4cdafe0fb41a766cb7 100644 (file)
@@ -7,7 +7,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-    
+
 #define MAXLINE  1000
 #define INDENT_STRING "  "
 #define PAPER_WIDTH   74
@@ -86,7 +86,7 @@ doc:
     printf("%s%s%s", $2, fixed, $4);
     free($2);
     free($4);
-    
+
     l = (len+1)/2;
     memset(fixed, ' ', l);
     fixed[l] = '\0';
@@ -113,7 +113,7 @@ doc:
     printf("%s%s%s", $2, fixed, $4);
     free($2);
     free($4);
-    
+
     l = (len+1)/2;
     memset(fixed, ' ', l);
     fixed[l] = '\0';
@@ -281,7 +281,7 @@ char *new_counter(const char *key)
     sprintf(new+j, "%d", ++i);
 
     counter_root = set_key(counter_root, key, new);
-    
+
     if (last_label) {
        free(last_label);
     }
index 6dd5e6ea36dc26f844328b7cf266e461150dc2a1..b8c635a6990ec7528548c7d4d336702982cea09a 100644 (file)
 
 
    Samar, Schemers                                                  Page 28
-
-
-
-
-
-
index 35496fe46ce075a8935001cb3812fe800de9cec1..c633cfd70c6c212ab0a1d364350315d510f358f8 100644 (file)
@@ -16,8 +16,8 @@ int main(int argc, char **argv)
     }
 
     /* handle->XXX points to each of the PAM functions */
-    
-    
+
+
     if (dlclose(handle)) {
        fprintf(stderr, "failed to unload pam.so: %s\n", dlerror());
        exit(1);
index 752507ee2e53e7e9ab4783e43cd0943041ca40e5..12e16f1bdb5d3c713eaa4177a976f4b118a42c80 100644 (file)
@@ -6,4 +6,3 @@ Makefile
 Makefile.in
 .deps
 .libs
-
index f4ae95117dcc9f75343dad10b0ec3b3b4be0de9b..fee734ddadf305a93713425a13f2f1cdb8820fce 100644 (file)
@@ -10,4 +10,3 @@ application it might be a place to start...
 
 xsh is new as of Linux-PAM-0.31, it is identical to blank, but invokes
 /bin/sh if the user is authenticated.
-
index 9d51756e6cf56821b89c3e49b4f220a9d7dc7881..82100139c3d237f33ac5555a73712a844f97f131 100644 (file)
@@ -50,7 +50,7 @@ int main(int argc, char **argv)
          fprintf(stderr,"usage: %s [username]\n",argv[0]);
      } else if (argc == 2) {
          username = argv[1];
-     } 
+     }
 
      /* initialize the Linux-PAM library */
      retcode = pam_start("blank", username, &conv, &pamh);
@@ -141,7 +141,7 @@ int main(int argc, char **argv)
               fprintf(stderr,"%s: problem closing a session\n",argv[0]);
               break;
          }
-         
+
          retcode = pam_setcred(pamh, PAM_DELETE_CRED);
          bail_out(pamh,0,retcode,"pam_setcred2");
 
index 4a33f2a8426c23a8d774c513ea271f0e44da22c1..89cc137b0eb077e692725297b8d4bcf8947bef63 100644 (file)
@@ -1,6 +1,6 @@
 /*
   $Id$
-  
+
   This program was contributed by Shane Watts <shane@icarus.bofh.asn.au>
   slight modifications by AGM.
 
@@ -35,7 +35,7 @@ int main(int argc, char *argv[])
     }
 
     retval = pam_start("check", user, &conv, &pamh);
-       
+
     if (retval == PAM_SUCCESS)
         retval = pam_authenticate(pamh, 0);    /* is user really user? */
 
index a54ec0619c4d22a22156fdebc39d5dba2ef39b02..f73b36113136a0315a52473d32e996472cae46ec 100644 (file)
@@ -47,5 +47,3 @@ int main(void)
     pam_end(pamh, res);
     exit(0);
 }
-
-
index e1a7920ab77bd95176a5b9318b60b86551c4f445..c281f21f236ebb6f5f3ddfd4c355261059e9f27d 100644 (file)
@@ -6,4 +6,3 @@ Makefile.in
 .libs
 *.la
 *.lo
-
index 7f2e0b2c0f4a342c33315a61f63e2200c0da1f74..531746ab67fb11129178b47327484e01376e617d 100644 (file)
@@ -161,7 +161,7 @@ pam_modutil_audit_write(pam_handle_t *pamh, int type,
 {
   int audit_fd;
   int rc;
-       
+
   if ((audit_fd=_pam_audit_open(pamh)) == -1) {
     return PAM_SYSTEM_ERR;
   } else if (audit_fd == -2) {
@@ -171,7 +171,7 @@ pam_modutil_audit_write(pam_handle_t *pamh, int type,
   rc = _pam_audit_writelog(pamh, audit_fd, type, message, retval);
 
   audit_close(audit_fd);
-  
+
   return rc < 0 ? PAM_SYSTEM_ERR : PAM_SUCCESS;
 }
 
index a9cfa8028f4c11a89804d3c82808000cbe8f794f..cb6c9d5ccc9b00e3d521b7f4b43d506883b73dfb 100644 (file)
@@ -156,4 +156,3 @@ int pam_fail_delay(pam_handle_t *pamh, unsigned int usec)
 
      return PAM_SUCCESS;
 }
-
index 98c69c60df1f8423adb9d85243471d4073c9ebf7..eb52c824ec312d7ef801200691ac2b3012bbe2f9 100644 (file)
@@ -261,16 +261,16 @@ static int _pam_dispatch_aux(pam_handle_t *pamh, int flags, struct handler *h,
                    if (impression == _PAM_UNDEF
                        || (impression == _PAM_POSITIVE
                            && status == PAM_SUCCESS) ) {
-                       if ( retval != PAM_IGNORE || cached_retval == retval ) {
+                       if ( retval != PAM_IGNORE || cached_retval == retval ) {
                            impression = _PAM_POSITIVE;
-                           status = retval;
-                       }
+                           status = retval;
+                       }
                    }
                }
 
                /* this means that we need to skip #action stacked modules */
                while (h->next != NULL && h->next->stack_level >= stack_level && action > 0) {
-                   do {
+                   do {
                        h = h->next;
                        ++depth;
                    } while (h->next != NULL && h->next->stack_level > stack_level);
index 5be33c3654e75e993837f8f989018871696519e9..e1155e50cd37dbe3d9d87b2717dc1358bbf2f506 100644 (file)
@@ -55,8 +55,8 @@ void *_pam_dlopen(const char *mod_path)
        NSObjectFileImage ofile;
        void *ret = NULL;
 
-       if (NSCreateObjectFileImageFromFile(mod_path, &ofile) != 
-                       NSObjectFileImageSuccess ) 
+       if (NSCreateObjectFileImageFromFile(mod_path, &ofile) !=
+                       NSObjectFileImageSuccess )
                return NULL;
 
        ret = NSLinkModule(ofile, mod_path, NSLINKMODULE_OPTION_PRIVATE | NSLINKMODULE_OPTION_BINDNOW);
@@ -68,7 +68,7 @@ void *_pam_dlopen(const char *mod_path)
 #endif
 }
 
-servicefn _pam_dlsym(void *handle, const char *symbol) 
+servicefn _pam_dlsym(void *handle, const char *symbol)
 {
 #ifdef PAM_SHL
        char *_symbol = NULL;
@@ -83,7 +83,7 @@ servicefn _pam_dlsym(void *handle, const char *symbol)
                        return NULL;
                strcpy(_symbol, SHLIB_SYM_PREFIX);
                strcat(_symbol, symbol);
-               if( shl_findsym(&handle, _symbol, 
+               if( shl_findsym(&handle, _symbol,
                                (short) TYPE_PROCEDURE, &ret ){
                        free(_symbol);
                        return NULL;
@@ -92,7 +92,7 @@ servicefn _pam_dlsym(void *handle, const char *symbol)
        }
 
        return ret;
-       
+
 #elif defined(PAM_DYLD)
        NSSymbol nsSymbol;
        char *_symbol;
index 59a1929f846dca9387da9f8f818212a387bcfc00..02714f781bb9c437dc6432aaaf20ce2b87201c2d 100644 (file)
@@ -194,16 +194,16 @@ static int _pam_parse_conf_file(pam_handle_t *pamh, FILE *f
 
            tok = _pam_StrTok(NULL, " \n\t", &nexttok);
            if (pam_include) {
-               if (substack) {
+               if (substack) {
                    res = _pam_add_handler(pamh, PAM_HT_SUBSTACK, other,
-                               stack_level, module_type, actions, tok,
-                               0, NULL, 0);
+                               stack_level, module_type, actions, tok,
+                               0, NULL, 0);
                    if (res != PAM_SUCCESS) {
                        pam_syslog(pamh, LOG_ERR, "error adding substack %s", tok);
                        D(("failed to load module - aborting"));
                        return PAM_ABORT;
-                   }       
-               }
+                   }
+               }
                if (_pam_load_conf_file(pamh, tok, this_service, module_type,
                    stack_level + substack
 #ifdef PAM_READ_BOTH_CONFS
@@ -625,7 +625,7 @@ _pam_load_module(pam_handle_t *pamh, const char *mod_path, int handler_type)
     struct loaded_module *mod;
 
     D(("_pam_load_module: loading module `%s'", mod_path));
-    
+
     mod = pamh->handlers.module;
 
     /* First, ensure the module is loaded */
@@ -774,12 +774,12 @@ int _pam_add_handler(pam_handle_t *pamh
            /* if we get here with NULL it means allocation error */
            return PAM_ABORT;
        }
-       
+
        mod_type = mod->type;
     }
-    
+
     if (mod_path == NULL)
-       mod_path = UNKNOWN_MODULE;
+       mod_path = UNKNOWN_MODULE;
 
     /*
      * At this point 'mod' points to the stored/loaded module.
index 00e00c295da1882a0d1d5ec698f9ab2db38514f7..8148fd57f909adf0f04757ba75464bc44d6aaf53 100644 (file)
@@ -315,8 +315,8 @@ int pam_get_user(pam_handle_t *pamh, const char **user, const char *prompt)
     if (pamh->former.want_user) {
        /* must have a prompt to resume with */
        if (! pamh->former.prompt) {
-                   pam_syslog(pamh, LOG_ERR,
-                                  "pam_get_user: failed to resume with prompt"
+           pam_syslog(pamh, LOG_ERR,
+                      "pam_get_user: failed to resume with prompt"
                        );
            return PAM_ABORT;
        }
@@ -324,7 +324,7 @@ int pam_get_user(pam_handle_t *pamh, const char **user, const char *prompt)
        /* must be the same prompt as last time */
        if (strcmp(pamh->former.prompt, use_prompt)) {
            pam_syslog(pamh, LOG_ERR,
-                           "pam_get_user: resumed with different prompt");
+                      "pam_get_user: resumed with different prompt");
            return PAM_ABORT;
        }
 
index 0e607276ef23ce6e0b37ec8b04a66f788c098920..aac0e92351c398bdefb0638e75dbfd8328a43812 100644 (file)
@@ -312,7 +312,7 @@ void _pam_parse_control(int *control_array, char *tok)
                break;
            }
        }
-       if (act > 0) {
+       if (act > 0) {
            /*
             * Either we have a number or we have hit an error.  In
             * principle, there is nothing to stop us accepting
index 600946a15f7975b404a402fab7c46ade6df87eb2..386d6f4bcdede585f3b826cb891e9f9d3195029b 100644 (file)
@@ -16,7 +16,7 @@
 #include <stdlib.h>
 
 static int intlen(int number)
-{ 
+{
     int len = 2;
     while (number != 0) {
         number /= 10;
@@ -26,7 +26,7 @@ static int intlen(int number)
 }
 
 static int longlen(long number)
-{ 
+{
     int len = 2;
     while (number != 0) {
         number /= 10;
@@ -72,7 +72,7 @@ pam_modutil_getgrgid(pam_handle_t *pamh, gid_t gid)
            int i;
 
            data_name = malloc(strlen("_pammodutil_getgrgid") + 1 +
-                              longlen((long)gid) + 1 + intlen(INT_MAX) + 1);
+                              longlen((long)gid) + 1 + intlen(INT_MAX) + 1);
            if ((pamh != NULL) && (data_name == NULL)) {
                D(("was unable to register the data item [%s]",
                   pam_strerror(pamh, status)));
@@ -83,7 +83,7 @@ pam_modutil_getgrgid(pam_handle_t *pamh, gid_t gid)
            if (pamh != NULL) {
                for (i = 0; i < INT_MAX; i++) {
                    sprintf(data_name, "_pammodutil_getgrgid_%ld_%d",
-                           (long) gid, i);
+                           (long) gid, i);
                    status = PAM_NO_MODULE_DATA;
                    if (pam_get_data(pamh, data_name, &ignore) != PAM_SUCCESS) {
                        status = pam_set_data(pamh, data_name,
@@ -114,7 +114,7 @@ pam_modutil_getgrgid(pam_handle_t *pamh, gid_t gid)
                /* no sense in repeating the call */
                break;
        }
-       
+
        length <<= PWD_LENGTH_SHIFT;
 
     } while (length < PWD_ABSURD_PWD_LENGTH);
@@ -131,7 +131,7 @@ pam_modutil_getgrgid(pam_handle_t *pamh, gid_t gid)
      * Sorry, there does not appear to be a reentrant version of
      * getgrgid(). So, we use the standard libc function.
      */
-    
+
     return getgrgid(gid);
 
 #endif /* def HAVE_GETGRGID_R */
index adf7daa23068eef61da3c10ce71482983a46417a..cbb1551d8ba36afd1b653cb1705d4f3662c55fdc 100644 (file)
@@ -16,7 +16,7 @@
 #include <stdlib.h>
 
 static int intlen(int number)
-{ 
+{
     int len = 2;
     while (number != 0) {
         number /= 10;
@@ -62,7 +62,7 @@ pam_modutil_getgrnam(pam_handle_t *pamh, const char *group)
            int i;
 
            data_name = malloc(strlen("_pammodutil_getgrnam") + 1 +
-                              strlen(group) + 1 + intlen(INT_MAX) + 1);
+                              strlen(group) + 1 + intlen(INT_MAX) + 1);
            if ((pamh != NULL) && (data_name == NULL)) {
                D(("was unable to register the data item [%s]",
                   pam_strerror(pamh, status)));
@@ -103,7 +103,7 @@ pam_modutil_getgrnam(pam_handle_t *pamh, const char *group)
                 /* no sense in repeating the call */
                 break;
         }
-       
+
        length <<= PWD_LENGTH_SHIFT;
 
     } while (length < PWD_ABSURD_PWD_LENGTH);
@@ -120,7 +120,7 @@ pam_modutil_getgrnam(pam_handle_t *pamh, const char *group)
      * Sorry, there does not appear to be a reentrant version of
      * getgrnam(). So, we use the standard libc function.
      */
-    
+
     return getgrnam(group);
 
 #endif /* def HAVE_GETGRNAM_R */
index f4e4d80e04340ef99be8a9b438b47ec0253f8d1d..8132c7694856148ceadc16eb4b33dcaccfbc9c71 100644 (file)
@@ -16,7 +16,7 @@
 #include <stdlib.h>
 
 static int intlen(int number)
-{ 
+{
     int len = 2;
     while (number != 0) {
         number /= 10;
@@ -62,7 +62,7 @@ pam_modutil_getpwnam(pam_handle_t *pamh, const char *user)
            int i;
 
            data_name = malloc(strlen("_pammodutil_getpwnam") + 1 +
-                              strlen(user) + 1 + intlen(INT_MAX) + 1);
+                              strlen(user) + 1 + intlen(INT_MAX) + 1);
            if ((pamh != NULL) && (data_name == NULL)) {
                D(("was unable to register the data item [%s]",
                   pam_strerror(pamh, status)));
@@ -103,7 +103,7 @@ pam_modutil_getpwnam(pam_handle_t *pamh, const char *user)
                 /* no sense in repeating the call */
                 break;
         }
-       
+
        length <<= PWD_LENGTH_SHIFT;
 
     } while (length < PWD_ABSURD_PWD_LENGTH);
@@ -120,7 +120,7 @@ pam_modutil_getpwnam(pam_handle_t *pamh, const char *user)
      * Sorry, there does not appear to be a reentrant version of
      * getpwnam(). So, we use the standard libc function.
      */
-    
+
     return getpwnam(user);
 
 #endif /* def HAVE_GETPWNAM_R */
index 33a6cf490ce38edf5d27ee1be8f68e002ca932cb..3a43593750fdaf1169ad9b48f18233712c9c0631 100644 (file)
@@ -16,7 +16,7 @@
 #include <stdlib.h>
 
 static int intlen(int number)
-{ 
+{
     int len = 2;
     while (number != 0) {
         number /= 10;
@@ -26,7 +26,7 @@ static int intlen(int number)
 }
 
 static int longlen(long number)
-{ 
+{
     int len = 2;
     while (number != 0) {
         number /= 10;
@@ -72,7 +72,7 @@ pam_modutil_getpwuid(pam_handle_t *pamh, uid_t uid)
            int i;
 
            data_name = malloc(strlen("_pammodutil_getpwuid") + 1 +
-                              longlen((long) uid) + 1 + intlen(INT_MAX) + 1);
+                              longlen((long) uid) + 1 + intlen(INT_MAX) + 1);
            if ((pamh != NULL) && (data_name == NULL)) {
                D(("was unable to register the data item [%s]",
                   pam_strerror(pamh, status)));
@@ -83,7 +83,7 @@ pam_modutil_getpwuid(pam_handle_t *pamh, uid_t uid)
            if (pamh != NULL) {
                for (i = 0; i < INT_MAX; i++) {
                    sprintf(data_name, "_pammodutil_getpwuid_%ld_%d",
-                           (long) uid, i);
+                           (long) uid, i);
                    status = PAM_NO_MODULE_DATA;
                    if (pam_get_data(pamh, data_name, &ignore) != PAM_SUCCESS) {
                        status = pam_set_data(pamh, data_name,
@@ -114,7 +114,7 @@ pam_modutil_getpwuid(pam_handle_t *pamh, uid_t uid)
                 /* no sense in repeating the call */
                 break;
         }
-       
+
        length <<= PWD_LENGTH_SHIFT;
 
     } while (length < PWD_ABSURD_PWD_LENGTH);
@@ -131,7 +131,7 @@ pam_modutil_getpwuid(pam_handle_t *pamh, uid_t uid)
      * Sorry, there does not appear to be a reentrant version of
      * getpwuid(). So, we use the standard libc function.
      */
-    
+
     return getpwuid(uid);
 
 #endif /* def HAVE_GETPWUID_R */
index 7cc64881bcfbb9aa055aa2b72ca2bca66e853a1f..032709ed02b674279b167f24fd860c5b9e511239 100644 (file)
@@ -16,7 +16,7 @@
 #include <stdlib.h>
 
 static int intlen(int number)
-{ 
+{
     int len = 2;
     while (number != 0) {
         number /= 10;
@@ -62,7 +62,7 @@ pam_modutil_getspnam(pam_handle_t *pamh, const char *user)
            int i;
 
            data_name = malloc(strlen("_pammodutil_getspnam") + 1 +
-                              strlen(user) + 1 + intlen(INT_MAX) + 1);
+                              strlen(user) + 1 + intlen(INT_MAX) + 1);
            if ((pamh != NULL) && (data_name == NULL)) {
                D(("was unable to register the data item [%s]",
                   pam_strerror(pamh, status)));
@@ -103,7 +103,7 @@ pam_modutil_getspnam(pam_handle_t *pamh, const char *user)
                 /* no sense in repeating the call */
                 break;
         }
-       
+
        length <<= PWD_LENGTH_SHIFT;
 
     } while (length < PWD_ABSURD_PWD_LENGTH);
@@ -120,7 +120,7 @@ pam_modutil_getspnam(pam_handle_t *pamh, const char *user)
      * Sorry, there does not appear to be a reentrant version of
      * getspnam(). So, we use the standard libc function.
      */
-    
+
     return getspnam(user);
 
 #endif /* def HAVE_GETSPNAM_R */
index 7a15f712542332d90a1d5bf09f5e03b89295c7bc..875cf3e274db7a912ccf13874e7921cddc139264 100644 (file)
@@ -74,7 +74,7 @@ pam_modutil_user_in_group_common(pam_handle_t *pamh UNUSED,
        return 0;
 }
 
-int 
+int
 pam_modutil_user_in_group_nam_nam(pam_handle_t *pamh,
                                 const char *user, const char *group)
 {
index 13ee6fdb7ca325a06ae3cc88061bd918b3c00fe7..196b141805c1aac952cdf731bd71659264dc4f1a 100644 (file)
@@ -13,4 +13,3 @@
 void prelude_send_alert(pam_handle_t *pamh, int authval);
 
 #endif /* _SECURITY_PAM_PRELUDE_H */
-
index 34532bce0c5f45d1decda3b3b9fbe3d5d509ccb0..512153f2dd25d01f55a6728278f25882699e1b20 100644 (file)
@@ -24,7 +24,7 @@ int pam_open_session(pam_handle_t *pamh, int flags)
 
 #ifdef HAVE_LIBAUDIT
     retval = _pam_auditlog(pamh, PAM_OPEN_SESSION, retval, flags);
-#endif                                                                                
+#endif
     return retval;
 }
 
index fcda7ec2bc3fbe1b00ea0908232bbb12ddfd818a..1412fa31b02ab5d4b0e99efdd616c72b89477515 100644 (file)
@@ -89,13 +89,13 @@ const char * const _pam_token_returns[_PAM_RETURN_VALUES+1] = {
  * 3. The name of the author may not be used to endorse or promote
  *    products derived from this software without specific prior
  *    written permission.
- * 
+ *
  * ALTERNATIVELY, this product may be distributed under the terms of
  * the GNU Public License, in which case the provisions of the GPL are
  * required INSTEAD OF the above restrictions.  (This clause is
  * necessary due to a potential bad interaction between the GPL and
  * the restrictions contained in a BSD-style copyright.)
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
index 7cc8812ac346a26cc1e20d0d8591ac4ffc9872f5..a521b60d71e98dc0919d14ba570106816d1aae97 100644 (file)
@@ -20,4 +20,3 @@ libpam_misc_la_LIBADD = $(top_builddir)/libpam/libpam.la
 lib_LTLIBRARIES = libpam_misc.la
 
 libpam_misc_la_SOURCES = help_env.c misc_conv.c
-
index 07578e649b8ad286737a06ca2630e6663625821f..fca2422c744ad692f31094642a06ceffcccacf95 100644 (file)
@@ -6,8 +6,8 @@
 #include <security/pam_appl.h>
 #include <security/pam_client.h>
 
-#ifdef __cplusplus 
-extern "C" { 
+#ifdef __cplusplus
+extern "C" {
 #endif /* __cplusplus */
 
 /* include some useful macros */
index 3f82de1bbb975b7b7db2baa543bc805be0bcc810..3f74eeae7c0eaebb748d09d12538b6112af8abc4 100644 (file)
@@ -180,7 +180,7 @@ static int read_string(int echo, const char *prompt, char **retstr)
            if (have_term)
                nc = read(STDIN_FILENO, line, INPUTSIZE-1);
            else                             /* we must read one line only */
-               for (nc = 0; nc < INPUTSIZE-1 && (nc?line[nc-1]:0) != '\n';
+               for (nc = 0; nc < INPUTSIZE-1 && (nc?line[nc-1]:0) != '\n';
                     nc++) {
                    int rv;
                    if ((rv=read(STDIN_FILENO, line+nc, 1)) != 1) {
index 9010695470a1944f33c1d5c3a4525b8eaaba9059..931607801e5cbfe0e56167e042b5945cc6fad92e 100644 (file)
@@ -39,4 +39,3 @@ TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
 USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 DAMAGE.
 -------------------------------------------------------------------------
-
index 988c2456805983593b66febe205db15829c5e3db..47e41aafa7bcee3857ecfd8a3b8c5b214c8947d0 100644 (file)
@@ -121,7 +121,7 @@ do {                                                                       \
                                                                            \
            __size = PAM_BP_MIN_SIZE + data_length;                        \
            if ((*(old_p) = PAM_BP_CALLOC(1, 1+__size))) {                 \
-               __PAM_BP_WOCTET(*(old_p), 3) =  __size      & 0xFF;        \
+               __PAM_BP_WOCTET(*(old_p), 3) =  __size      & 0xFF;        \
                __PAM_BP_WOCTET(*(old_p), 2) = (__size>>=8) & 0xFF;        \
                __PAM_BP_WOCTET(*(old_p), 1) = (__size>>=8) & 0xFF;        \
                __PAM_BP_WOCTET(*(old_p), 0) = (__size>>=8) & 0xFF;        \
index 9d2bc671d7f10e1549b20e1005db9111ae2a3095..175f424d5ae7846082408e62033d728e708554ca 100644 (file)
@@ -66,7 +66,7 @@ pamc_handle_t pamc_start(void)
        if ( default_path[i] == PAMC_SYSTEM_AGENT_SEPARATOR
             || !default_path[i] ) {
            int length;
-           
+
            pch->agent_paths[this] = malloc(length = 1+i-last);
 
            if (pch->agent_paths[this] == NULL) {
@@ -102,7 +102,7 @@ drop_pch:
 }
 
 /*
- * shutdown each of the loaded agents and 
+ * shutdown each of the loaded agents and
  */
 
 static int __pamc_shutdown_agents(pamc_handle_t pch)
@@ -110,7 +110,7 @@ static int __pamc_shutdown_agents(pamc_handle_t pch)
     int retval = PAM_BPC_TRUE;
 
     D(("called"));
-    
+
     while (pch->chain) {
        pid_t pid;
        int status;
index dbbfbd59fcab9f274559d004d75d07c32179cc1c..5155e0ae62aeabde32087a052081ecc9e56ab829 100644 (file)
@@ -25,7 +25,7 @@ static int __pamc_exec_agent(pamc_handle_t pch, pamc_agent_t *agent)
            return PAM_BPC_FAIL;
        }
     }
-    
+
     /* enough memory for any path + this agent */
     reset_length = 3 + pch->max_path + agent->id_length;
     D(("reset_length = %d (3+%d+%d)",
@@ -57,7 +57,7 @@ static int __pamc_exec_agent(pamc_handle_t pch, pamc_agent_t *agent)
        D(("no agent was found"));
        goto free_and_return;
     }
-       
+
     if (pipe(to_agent)) {
        D(("failed to open pipe to agent"));
        goto free_and_return;
@@ -262,7 +262,7 @@ int pamc_load(pamc_handle_t pch, const char *agent_id)
        D(("sorry agent is disabled"));
        return PAM_BPC_FALSE;
     }
-    
+
     length = strlen(agent_id);
 
     /* scan list to see if agent is loaded */
@@ -296,7 +296,7 @@ int pamc_load(pamc_handle_t pch, const char *agent_id)
 
     agent->next = pch->chain;
     pch->chain = agent;
-    
+
     return PAM_BPC_TRUE;
 
 fail_free_agent_id:
index afdcbaa801aaf74d04211bcc685f3abaa3e99446..8d82c013550b48d7cc7c46db8a75661223e6f556 100755 (executable)
@@ -41,7 +41,7 @@ for (;;) {
        ($reply_control, $reply_data) = HandleContinuation($data);
     } else {
        if ($debug) {
-           print STDERR 
+           print STDERR
                "agent: unrecognized packet $control {$data} to read\n";
        }
        ($reply_control, $reply_data) = (0x04, "");
@@ -133,7 +133,7 @@ sub HandleContinuation ($) {
     }
 
     my $expected_digest = CreateDigest($state{$key});
-    my ($local_cookie, $remote_cookie, $shared_secret) 
+    my ($local_cookie, $remote_cookie, $shared_secret)
        = split '\|', $state{$key};
     delete $state{$key};
 
@@ -154,7 +154,7 @@ sub HandleContinuation ($) {
        print STDERR "agent: server appears to know the secret\n";
     }
 
-    my $session_authenticated_ticket = 
+    my $session_authenticated_ticket =
        CreateDigest($remote_cookie."|".$shared_secret."|".$local_cookie);
 
     # FIXME: Agent should set a derived session key environment
@@ -183,7 +183,7 @@ sub ReadBinaryPrompt {
        # broken packet header
        return (-1, "");
     }
-    
+
     my ($length, $control) = unpack("N C", $buffer);
     if ($length < 5) {
        # broken packet length
@@ -305,4 +305,3 @@ sub GetRandom {
     }
 
 }
-
index 6316f7f59bb97205ae3934f20d0f35fad5d2959a..f1c74c6f2a5f8628e71027bcdfa59145a6fade0d 100644 (file)
@@ -664,6 +664,6 @@ int pam_sm_setcred(pam_handle_t *pamh, int flags,
 
     old_data = NULL;
     D(("done (%d)", retval));
-    
+
     return retval;
 }
index 91f8d1217cedb248a7492ef67f262d7a3277b5af..b0fff9c69ed7daa610fe44a599c18565f1045394 100644 (file)
@@ -172,7 +172,7 @@ void prompt_to_packet(pamc_bp_t prompt, struct internal_packet *packet)
     data_length = PAM_BP_LENGTH(prompt);
     packet->at = 0;
     append_data(packet, data_length, NULL);
-    
+
     PAM_BP_EXTRACT(prompt, 0, data_length, packet->buffer);
 
     fprintf(stderr, "server received[%d]: {%d|0x%.2x|%s}\n",
@@ -332,7 +332,7 @@ int main(int argc, char **argv)
                digest);
     }
 
-    
+
     retval = pamc_end(&pch);
 
     fprintf(stderr, "server: agent(s) were %shappy to terminate\n",
index 2e0b9b940cb604f42676b7ced6c4b6dda50d1354..67fe22ece6750350121d0ccf395346713bd7ddb6 100755 (executable)
@@ -94,7 +94,7 @@ sub ReadBinaryPrompt ($) {
        # broken packet header
        return (-1, "");
     }
-    
+
     my ($length, $control) = unpack("N C", $buffer);
     if ($length < 5) {
        # broken packet length
@@ -149,4 +149,3 @@ sub IdentifyLocalSecret ($) {
 
     return $secret;
 }
-
index 5318a140b8ff3815b2c10246e6a859037e9600d7..cf2ea4a57a8f0182749677fb3d46578f40daeb78 100644 (file)
@@ -45,4 +45,3 @@ else
 fi
 AC_MSG_RESULT($ac_cv___attribute__)
 ])
-
index 2c61d35a8c89efa3f65eb0aaee14d2eae59c98ae..f78527f621a26f6ce6684dbba5eff724355497a4 100644 (file)
@@ -8,7 +8,7 @@ dnl $id$
 # Werner Koch   99-12-09
 
 dnl AM_PATH_LIBPRELUDE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
-dnl Test for libprelude, and define LIBPRELUDE_PREFIX, LIBPRELUDE_CFLAGS, LIBPRELUDE_PTHREAD_CFLAGS, 
+dnl Test for libprelude, and define LIBPRELUDE_PREFIX, LIBPRELUDE_CFLAGS, LIBPRELUDE_PTHREAD_CFLAGS,
 dnl LIBPRELUDE_LDFLAGS, and LIBPRELUDE_LIBS
 dnl
 AC_DEFUN([AM_PATH_LIBPRELUDE],
index 2234aa405545d7a98ee04d1242025885fe644ee7..369b04796b8791ea79a3cbc4ab5548137cb440c6 100644 (file)
@@ -1,4 +1,4 @@
-{ 
+{
   global:
     pam_sm_acct_mgmt;
     pam_sm_authenticate;
@@ -8,4 +8,3 @@
     pam_sm_setcred;
   local: *;
 };
-
index 2669a5ecfd76fb3967f9ea66e77f8982769f2c24..65798f173c6573781f391162f03c9fcfcbc3e23a 100644 (file)
@@ -100,7 +100,7 @@ struct login_info {
     const char *from;
     const char *config_file;
     const char *hostname;
-    int debug;                         /* Print debugging messages. */
+    int debug;                         /* Print debugging messages. */
     int only_new_group_syntax;         /* Only allow group entries of the form "(xyz)" */
     int noaudit;                       /* Do not audit denials */
     const char *fs;                    /* field separator */
@@ -375,7 +375,7 @@ login_access (pam_handle_t *pamh, struct login_info *item)
            /* Allow field seperator in last field of froms */
            if (!(perm = strtok_r(line, item->fs, &sptr))
                || !(users = strtok_r(NULL, item->fs, &sptr))
-               || !(froms = strtok_r(NULL, "\n", &sptr))) {
+               || !(froms = strtok_r(NULL, "\n", &sptr))) {
                pam_syslog(pamh, LOG_ERR, "%s: line %d: bad field count",
                           item->config_file, lineno);
                continue;
@@ -398,8 +398,8 @@ login_access (pam_handle_t *pamh, struct login_info *item)
                    nonall_match = YES;
                }
                if (item->debug)
-                   pam_syslog (pamh, LOG_DEBUG,
-                         "from_match=%d, \"%s\"", match, item->from);
+                   pam_syslog (pamh, LOG_DEBUG,
+                               "from_match=%d, \"%s\"", match, item->from);
            }
        }
        (void) fclose(fp);
index d0ba35c2a13caa799a857dd46bdb91750812a83a..30e9d00894eb2fb2fe45986af7687a7107e5b5af 100644 (file)
@@ -1,7 +1,7 @@
 #
-# This is the configuration file for pam_env, a PAM module to load in 
-# a configurable list of environment variables for a 
-# 
+# This is the configuration file for pam_env, a PAM module to load in
+# a configurable list of environment variables for a
+#
 # The original idea for this came from Andrew G. Morgan ...
 #<quote>
 #   Mmm. Perhaps you might like to write a pam_env module that reads a
 # administrators rather than set by logging in, how to treat them both
 # in the same config file?
 #
-# Here is my idea: 
+# Here is my idea:
 #
 # Each line starts with the variable name, there are then two possible
-# options for each variable DEFAULT and OVERRIDE. 
+# options for each variable DEFAULT and OVERRIDE.
 # DEFAULT allows and administrator to set the value of the
 # variable  to some default value, if none is supplied then the empty
 # string is assumed. The OVERRIDE option tells pam_env that it should
 # enter in its value (overriding the default value) if there is one
 # to use. OVERRIDE is not used, "" is assumed and no override will be
-# done. 
+# done.
 #
 # VARIABLE   [DEFAULT=[value]]  [OVERRIDE=[value]]
 #
@@ -42,7 +42,7 @@
 # values can be delimited with "", escaped " not supported.
 # Note that many environment variables that you would like to use
 # may not be set by the time the module is called.
-# For example, HOME is used below several times, but 
+# For example, HOME is used below several times, but
 # many PAM applications don't make it available by the time you need it.
 #
 #
@@ -52,7 +52,7 @@
 # to "localhost" rather than not being set at all
 #REMOTEHOST    DEFAULT=localhost OVERRIDE=@{PAM_RHOST}
 #
-# Set the DISPLAY variable if it seems reasonable 
+# Set the DISPLAY variable if it seems reasonable
 #DISPLAY               DEFAULT=${REMOTEHOST}:0.0 OVERRIDE=${DISPLAY}
 #
 #
index 090e0e7565db716d5b9f148a65f2f701a75231cd..45950b8c53e0bfbf5629fb1c03d5011eca84b00c 100644 (file)
@@ -21,7 +21,7 @@
 
     <para>
       The <filename>/etc/security/pam_env.conf</filename> file specifies
-      the environment variables to be set, unset or modified by 
+      the environment variables to be set, unset or modified by
       <citerefentry><refentrytitle>pam_env</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
       When someone logs in, this file is read and the environment
       variables are set according.
index 0976f67c2cca040b42a814688025c1744c5a7564..4dc2a19d1a58c2ef345a07e551a630ebbbda57a8 100644 (file)
           </term>
           <listitem>
             <para>
-             Per default pam_exec.so will echo the exit status of the
-             external command if it fails.
+              Per default pam_exec.so will echo the exit status of the
+              external command if it fails.
               Specifying this option will suppress the message.
             </para>
           </listitem>
           </term>
           <listitem>
             <para>
-             Per default pam_exec.so will execute the external command
-             with the real user ID of the calling process.
+              Per default pam_exec.so will execute the external command
+              with the real user ID of the calling process.
               Specifying this option means the command is run
               with the effective user ID.
             </para>
index 7b2e402cd279224c84f319bac62641d0e45d8ffe..8b37e95e434b45e2c24927f442e48d3c5d374bd5 100644 (file)
@@ -282,7 +282,7 @@ call_exec (const char *pam_type, pam_handle_t *pamh,
          char *buffer = NULL;
 
          if ((i = open (logfile, O_CREAT|O_APPEND|O_WRONLY,
-                        S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)) == -1)
+                        S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)) == -1)
            {
              int err = errno;
              pam_syslog (pamh, LOG_ERR, "open of %s failed: %m",
index 4732f93b9068762a7734f8cc19f6e801ad5dac86..8d0501e03886e71bb8fe92a5dd661071d7c0b50e 100644 (file)
@@ -266,4 +266,3 @@ struct pam_module _pam_keyinit_modstruct = {
      NULL
 };
 #endif
-
index c1810e0713d8c78de457758006b07eeae4e9bee3..8bf3b9bb0d3cf72835009fe03422a9107efb6d09 100644 (file)
@@ -630,7 +630,7 @@ process_limit (const pam_handle_t *pamh, int source, const char *lim_type,
             else
               rlimit_value *= 1024;
           }
-        break;
+        break;
 #ifdef RLIMIT_NICE
        case RLIMIT_NICE:
         if (int_value > 19)
@@ -672,7 +672,7 @@ process_limit (const pam_handle_t *pamh, int source, const char *lim_type,
                } else {
                    pl->login_limit = int_value;
                    pl->login_limit_def = source;
-               }
+               }
        }
     }
     return;
@@ -975,8 +975,8 @@ static int setup_limits(pam_handle_t *pamh,
         if (check_logins(pamh, uname, pl->login_limit, ctrl, pl) == LOGIN_ERR) {
 #ifdef HAVE_LIBAUDIT
            if (!(ctrl & PAM_NO_AUDIT)) {
-               pam_modutil_audit_write(pamh, AUDIT_ANOM_LOGIN_SESSIONS,
-                   "pam_limits", PAM_PERM_DENIED);
+               pam_modutil_audit_write(pamh, AUDIT_ANOM_LOGIN_SESSIONS,
+                   "pam_limits", PAM_PERM_DENIED);
                /* ignore return value as we fail anyway */
             }
 #endif
@@ -1055,12 +1055,12 @@ pam_sm_open_session (pam_handle_t *pamh, int flags UNUSED,
        /* Parse the *.conf files. */
        for (i = 0; globbuf.gl_pathv[i] != NULL; i++) {
            pl->conf_file = globbuf.gl_pathv[i];
-           retval = parse_config_file(pamh, pwd->pw_name, pwd->pw_uid, pwd->pw_gid, ctrl, pl);
-           if (retval == PAM_IGNORE) {
+           retval = parse_config_file(pamh, pwd->pw_name, pwd->pw_uid, pwd->pw_gid, ctrl, pl);
+           if (retval == PAM_IGNORE) {
                D(("the configuration file ('%s') has an applicable '<domain> -' entry", pl->conf_file));
                globfree(&globbuf);
                return PAM_SUCCESS;
-           }
+           }
            if (retval != PAM_SUCCESS)
                goto out;
         }
@@ -1070,7 +1070,7 @@ out:
     globfree(&globbuf);
     if (retval != PAM_SUCCESS)
     {
-               pam_syslog(pamh, LOG_WARNING, "error parsing the configuration file: '%s' ",CONF_FILE);
+       pam_syslog(pamh, LOG_WARNING, "error parsing the configuration file: '%s' ",CONF_FILE);
        return retval;
     }
 
index 2a47de3ab22d9cdd745f985e1fc644ca44162ce1..f426d7216f2756d014fafac0a7ef23aefc83611d 100644 (file)
@@ -272,8 +272,8 @@ create_homedir(const struct passwd *pwd,
       }
 
       /* Set the proper ownership and permissions for the module. We make
-                the file a+w and then mask it with the set mask. This preseves
-                execute bits */
+         the file a+w and then mask it with the set mask. This preseves
+        execute bits */
       if (fchmod(destfd, (st.st_mode | 0222) & (~u_mask)) != 0 ||
          fchown(destfd, pwd->pw_uid, pwd->pw_gid) != 0)
       {
@@ -384,8 +384,8 @@ main(int argc, char *argv[])
 
    pwd = getpwnam(argv[1]);
    if (pwd == NULL) {
-       pam_syslog(NULL, LOG_ERR, "User unknown.");
-       return PAM_CRED_INSUFFICIENT;
+       pam_syslog(NULL, LOG_ERR, "User unknown.");
+       return PAM_CRED_INSUFFICIENT;
    }
 
    if (argc >= 3) {
@@ -399,11 +399,11 @@ main(int argc, char *argv[])
    }
 
    if (argc >= 4) {
-       if (strlen(argv[3]) >= sizeof(skeldir)) {
+       if (strlen(argv[3]) >= sizeof(skeldir)) {
                pam_syslog(NULL, LOG_ERR, "Too long skeldir path.");
                return PAM_SESSION_ERR;
-       }
-       strcpy(skeldir, argv[3]);
+       }
+       strcpy(skeldir, argv[3]);
    }
 
    /* Stat the home directory, if something exists then we assume it is
index dfc4979ea2c538dd34a2466dc0c8834332808853..5ac8a0f102d0519c0426f7ed8ec010b7772ad38e 100644 (file)
@@ -140,7 +140,7 @@ create_homedir (pam_handle_t *pamh, options_t *opt,
           if (rlim.rlim_max >= MAX_FD_NO)
                 rlim.rlim_max = MAX_FD_NO;
          for (i=0; i < (int)rlim.rlim_max; i++) {
-               close(i);
+               close(i);
          }
        }
 
index c79fb357689fd85e4b249034a54e27c041c4f299..ce4f7d6edb783448109095f71c1f92b9771c2310 100644 (file)
@@ -107,7 +107,7 @@ void MD5Name(MD5Update)(struct MD5Context *ctx, unsigned const char *buf, unsign
 }
 
 /*
- * Final wrapup - pad to 64-byte boundary with the bit pattern 
+ * Final wrapup - pad to 64-byte boundary with the bit pattern
  * 1 0* (64-bit count of bits processed, MSB-first)
  */
 void MD5Name(MD5Final)(unsigned char digest[16], struct MD5Context *ctx)
index f973225f9eebcdbaf97378f31b8185830e0edd1f..b611a0f218163a7c684421ab05928b358cf3e505 100644 (file)
@@ -5,8 +5,8 @@
 # Uncommenting the following three lines will polyinstantiate
 # /tmp, /var/tmp and user's home directories. /tmp and /var/tmp will
 # be polyinstantiated based on the MLS level part of the security context as well as user
-# name, Polyinstantion will not be performed for user root and adm for directories 
-# /tmp and /var/tmp, whereas home directories will be polyinstantiated for all users. 
+# name, Polyinstantion will not be performed for user root and adm for directories
+# /tmp and /var/tmp, whereas home directories will be polyinstantiated for all users.
 # The user name and context is appended to the instance prefix.
 #
 # Note that instance directories do not have to reside inside the
index 61c8673b34515b9957bd85770090e253ef1be467..673099b0e55aba0eb761020a787c95cd0ee59f38 100644 (file)
@@ -61,7 +61,7 @@
     <para>
       The second field, <replaceable>instance_prefix</replaceable> is
       the string prefix used to build the pathname for the instantiation
-      of &lt;polydir&gt;. Depending on the polyinstantiation 
+      of &lt;polydir&gt;. Depending on the polyinstantiation
       <replaceable>method</replaceable> it is then appended with
       "instance differentiation string" to generate the final
       instance directory path. This directory is created if it did not exist
@@ -75,7 +75,7 @@
     <para>
       The third field, <replaceable>method</replaceable>, is the method
       used for polyinstantiation. It can take these values; "user"
-      for polyinstantiation based on user name, "level" for 
+      for polyinstantiation based on user name, "level" for
       polyinstantiation based on process MLS level and user name, "context" for
       polyinstantiation based on process security context and user name,
       "tmpfs" for mounting tmpfs filesystem as an instance dir, and
@@ -97,7 +97,7 @@
       The <replaceable>method</replaceable> field can contain also following
       optional flags separated by <emphasis>:</emphasis> characters.
     </para>
-    
+
     <para><emphasis>create</emphasis>=<replaceable>mode</replaceable>,<replaceable>owner</replaceable>,<replaceable>group</replaceable>
       - create the polyinstantiated directory. The mode, owner and group parameters
       are optional. The default for mode is determined by umask, the default
index 9898bf3a851477e5b582f00d279fcd7e12daf7d0..9ab58062fa378575f75f5a8c27293c9724361b69 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh -p
-# It receives polydir path as $1, the instance path as $2, 
+# It receives polydir path as $1, the instance path as $2,
 # a flag whether the instance dir was newly created (0 - no, 1 - yes) in $3,
 # and user name in $4.
 #
index 4a99184acaa376390202e1b009b60e5da175a03a..f0bffa1515a7a66669f4f8b4cbe456899468f9f0 100644 (file)
@@ -76,7 +76,7 @@ static void del_polydir_list(struct polydir_s *polydirs_ptr)
         struct polydir_s *dptr = polydirs_ptr;
 
        while (dptr) {
-               struct polydir_s *tptr = dptr;
+               struct polydir_s *tptr = dptr;
                dptr = dptr->next;
                del_polydir(tptr);
        }
@@ -163,9 +163,9 @@ static int parse_create_params(char *params, struct polydir_s *poly)
     poly->group = (gid_t)ULONG_MAX;
 
     if (*params != '=')
-       return 0;
+       return 0;
     params++;
-    
+
     next = strchr(params, ',');
     if (next != NULL) {
        *next = '\0';
@@ -182,7 +182,7 @@ static int parse_create_params(char *params, struct polydir_s *poly)
 
     params = next;
     if (params == NULL)
-       return 0;
+       return 0;
     next = strchr(params, ',');
     if (next != NULL) {
        *next = '\0';
@@ -200,22 +200,22 @@ static int parse_create_params(char *params, struct polydir_s *poly)
     if (params == NULL || *params == '\0') {
        if (pwd != NULL)
            poly->group = pwd->pw_gid;
-       return 0;
+       return 0;
     }
     grp = getgrnam(params);
     if (grp == NULL)
-       return -1;
+       return -1;
     poly->group = grp->gr_gid;
-    
+
     return 0;
 }
 
 static int parse_iscript_params(char *params, struct polydir_s *poly)
 {
     if (*params != '=')
-       return 0;
+       return 0;
     params++;
-    
+
     if (*params != '\0') {
        if (*params != '/') { /* path is relative to NAMESPACE_D_DIR */
                if (asprintf(&poly->init_script, "%s%s", NAMESPACE_D_DIR, params) == -1)
@@ -235,11 +235,11 @@ static int parse_method(char *method, struct polydir_s *poly,
     enum polymethod pm;
     char *sptr = NULL;
     static const char *method_names[] = { "user", "context", "level", "tmpdir",
-       "tmpfs", NULL };
+       "tmpfs", NULL };
     static const char *flag_names[] = { "create", "noinit", "iscript",
-       "shared", NULL };
+       "shared", NULL };
     static const unsigned int flag_values[] = { POLYDIR_CREATE, POLYDIR_NOINIT,
-       POLYDIR_ISCRIPT, POLYDIR_SHARED };
+       POLYDIR_ISCRIPT, POLYDIR_SHARED };
     int i;
     char *flag;
 
@@ -247,41 +247,41 @@ static int parse_method(char *method, struct polydir_s *poly,
     pm = NONE;
 
     for (i = 0; method_names[i]; i++) {
-       if (strcmp(method, method_names[i]) == 0) {
-               pm = i + 1; /* 0 = NONE */
-       }
+       if (strcmp(method, method_names[i]) == 0) {
+               pm = i + 1; /* 0 = NONE */
+       }
     }
 
     if (pm == NONE) {
         pam_syslog(idata->pamh, LOG_NOTICE, "Unknown method");
         return -1;
     }
-    
+
     poly->method = pm;
-    
+
     while ((flag=strtok_r(NULL, ":", &sptr)) != NULL) {
-       for (i = 0; flag_names[i]; i++) {
-               int namelen = strlen(flag_names[i]);
-
-               if (strncmp(flag, flag_names[i], namelen) == 0) {
-                       poly->flags |= flag_values[i];
-                       switch (flag_values[i]) {
-                           case POLYDIR_CREATE:
-                               if (parse_create_params(flag+namelen, poly) != 0) {
+       for (i = 0; flag_names[i]; i++) {
+               int namelen = strlen(flag_names[i]);
+
+               if (strncmp(flag, flag_names[i], namelen) == 0) {
+                       poly->flags |= flag_values[i];
+                       switch (flag_values[i]) {
+                           case POLYDIR_CREATE:
+                               if (parse_create_params(flag+namelen, poly) != 0) {
                                        pam_syslog(idata->pamh, LOG_CRIT, "Invalid create parameters");
-                                       return -1;
-                               }
-                               break;
+                                       return -1;
+                               }
+                               break;
 
-                           case POLYDIR_ISCRIPT:
-                               if (parse_iscript_params(flag+namelen, poly) != 0) {
+                           case POLYDIR_ISCRIPT:
+                               if (parse_iscript_params(flag+namelen, poly) != 0) {
                                        pam_syslog(idata->pamh, LOG_CRIT, "Memory allocation error");
-                                       return -1;
-                               };
-                               break;
-                       }
-               }
-       }
+                                       return -1;
+                               };
+                               break;
+                       }
+               }
+       }
     }
 
     return 0;
@@ -337,7 +337,7 @@ static int process_line(char *line, const char *home, const char *rhome,
 
     poly = calloc(1, sizeof(*poly));
     if (poly == NULL)
-       goto erralloc;
+       goto erralloc;
 
     /*
      * Initialize and scan the five strings from the line from the
@@ -383,12 +383,12 @@ static int process_line(char *line, const char *home, const char *rhome,
            dir = NULL;
            goto erralloc;
     }
-    
+
     if ((dir=expand_variables(dir, var_names, var_values)) == NULL) {
            instance_prefix = NULL;
            goto erralloc;
     }
-    
+
     if ((instance_prefix=expand_variables(instance_prefix, var_names, var_values))
            == NULL) {
            goto erralloc;
@@ -409,12 +409,12 @@ static int process_line(char *line, const char *home, const char *rhome,
     if (len > 0 && rdir[len-1] == '/') {
            rdir[len-1] = '\0';
     }
-    
+
     if (dir[0] == '\0' || rdir[0] == '\0') {
-           pam_syslog(idata->pamh, LOG_NOTICE, "Invalid polydir");
-           goto skipping;
+           pam_syslog(idata->pamh, LOG_NOTICE, "Invalid polydir");
+           goto skipping;
     }
-    
+
     /*
      * Populate polyinstantiated directory structure with appropriate
      * pathnames and the method with which to polyinstantiate.
@@ -430,14 +430,14 @@ static int process_line(char *line, const char *home, const char *rhome,
     strcpy(poly->instance_prefix, instance_prefix);
 
     if (parse_method(method, poly, idata) != 0) {
-           goto skipping;
+           goto skipping;
     }
 
     if (poly->method == TMPDIR) {
-       if (sizeof(poly->instance_prefix) - strlen(poly->instance_prefix) < 7) {
-               pam_syslog(idata->pamh, LOG_NOTICE, "Pathnames too long");
-               goto skipping;
-       }
+       if (sizeof(poly->instance_prefix) - strlen(poly->instance_prefix) < 7) {
+               pam_syslog(idata->pamh, LOG_NOTICE, "Pathnames too long");
+               goto skipping;
+       }
        strcat(poly->instance_prefix, "XXXXXX");
     }
 
@@ -463,7 +463,7 @@ static int process_line(char *line, const char *home, const char *rhome,
         uid_t *uidptr;
         const char *ustr, *sstr;
         int count, i;
-       
+
        if (*uids == '~') {
                poly->flags |= POLYDIR_EXCLUSIVE;
                uids++;
@@ -488,8 +488,8 @@ static int process_line(char *line, const char *home, const char *rhome,
 
             pwd = pam_modutil_getpwnam(idata->pamh, ustr);
             if (pwd == NULL) {
-               pam_syslog(idata->pamh, LOG_ERR, "Unknown user %s in configuration", ustr);
-               poly->num_uids--;
+               pam_syslog(idata->pamh, LOG_ERR, "Unknown user %s in configuration", ustr);
+               poly->num_uids--;
             } else {
                 *uidptr = pwd->pw_uid;
                 uidptr++;
@@ -508,7 +508,7 @@ static int process_line(char *line, const char *home, const char *rhome,
 
 erralloc:
     pam_syslog(idata->pamh, LOG_CRIT, "Memory allocation error");
-    
+
 skipping:
     if (idata->flags & PAMNS_IGN_CONFIG_ERR)
         retval = 0;
@@ -554,9 +554,9 @@ static int parse_config_file(struct instance_data *idata)
         return PAM_SESSION_ERR;
     }
     if ((home=strdup(cpwd->pw_dir)) == NULL) {
-       pam_syslog(idata->pamh, LOG_CRIT,
-               "Memory allocation error");
-       return PAM_SESSION_ERR;
+       pam_syslog(idata->pamh, LOG_CRIT,
+               "Memory allocation error");
+       return PAM_SESSION_ERR;
     }
 
     cpwd = pam_modutil_getpwnam(idata->pamh, idata->ruser);
@@ -568,10 +568,10 @@ static int parse_config_file(struct instance_data *idata)
     }
 
     if ((rhome=strdup(cpwd->pw_dir)) == NULL) {
-       pam_syslog(idata->pamh, LOG_CRIT,
-               "Memory allocation error");
-       free(home);
-       return PAM_SESSION_ERR;
+       pam_syslog(idata->pamh, LOG_CRIT,
+               "Memory allocation error");
+       free(home);
+       return PAM_SESSION_ERR;
     }
 
     /*
@@ -594,7 +594,7 @@ static int parse_config_file(struct instance_data *idata)
        fil = fopen(confname, "r");
        if (fil == NULL) {
            pam_syslog(idata->pamh, LOG_ERR, "Error opening config file %s",
-               confname);          
+               confname);
             globfree(&globbuf);
            free(rhome);
            free(home);
@@ -625,14 +625,14 @@ static int parse_config_file(struct instance_data *idata)
        if (n >= globbuf.gl_pathc)
            break;
 
-       confname = globbuf.gl_pathv[n]; 
+       confname = globbuf.gl_pathv[n];
        n++;
     }
-    
+
     globfree(&globbuf);
     free(rhome);
     free(home);
-    
+
     /* All done...just some debug stuff */
     if (idata->flags & PAMNS_DEBUG) {
         struct polydir_s *dptr = idata->polydirs_ptr;
@@ -640,7 +640,7 @@ static int parse_config_file(struct instance_data *idata)
         uid_t i;
 
         pam_syslog(idata->pamh, LOG_DEBUG,
-           dptr?"Configured poly dirs:":"No configured poly dirs");
+           dptr?"Configured poly dirs:":"No configured poly dirs");
         while (dptr) {
             pam_syslog(idata->pamh, LOG_DEBUG, "dir='%s' iprefix='%s' meth=%d",
                   dptr->dir, dptr->instance_prefix, dptr->method);
@@ -667,7 +667,7 @@ static int ns_override(struct polydir_s *polyptr, struct instance_data *idata,
     unsigned int i;
 
     if (idata->flags & PAMNS_DEBUG)
-       pam_syslog(idata->pamh, LOG_DEBUG,
+       pam_syslog(idata->pamh, LOG_DEBUG,
                "Checking for ns override in dir %s for uid %d",
                polyptr->dir, uid);
 
@@ -745,7 +745,7 @@ static int form_context(const struct polydir_s *polyptr,
                rc = getexeccon(&scon);
        }
        if (rc < 0 || scon == NULL) {
-               pam_syslog(idata->pamh, LOG_ERR, 
+               pam_syslog(idata->pamh, LOG_ERR,
                           "Error getting exec context, %m");
                return PAM_SESSION_ERR;
        }
@@ -870,17 +870,17 @@ static int poly_name(const struct polydir_s *polyptr, char **i_name,
        }
         pm = USER;
     }
-    
+
     switch (pm) {
         case USER:
            if (asprintf(i_name, "%s", idata->user) < 0) {
                *i_name = NULL;
                goto fail;
-           }       
-           break;
+           }
+           break;
 
 #ifdef WITH_SELINUX
-       case LEVEL:
+       case LEVEL:
         case CONTEXT:
            if (selinux_trans_to_raw_context(*i_context, &rawcon) < 0) {
                pam_syslog(idata->pamh, LOG_ERR, "Error translating directory context");
@@ -890,27 +890,27 @@ static int poly_name(const struct polydir_s *polyptr, char **i_name,
                if (asprintf(i_name, "%s", rawcon) < 0) {
                        *i_name = NULL;
                        goto fail;
-               }
+               }
            } else {
                if (asprintf(i_name, "%s_%s", rawcon, idata->user) < 0) {
                        *i_name = NULL;
                        goto fail;
-               }
+               }
            }
-           break;
+           break;
 
 #endif /* WITH_SELINUX */
 
        case TMPDIR:
        case TMPFS:
            if ((*i_name=strdup("")) == NULL)
-               goto fail;
+               goto fail;
            return PAM_SUCCESS;
 
-       default:
-           if (idata->flags & PAMNS_DEBUG)
-               pam_syslog(idata->pamh, LOG_ERR, "Unknown method");
-           goto fail;
+       default:
+           if (idata->flags & PAMNS_DEBUG)
+               pam_syslog(idata->pamh, LOG_ERR, "Unknown method");
+           goto fail;
     }
 
     if (idata->flags & PAMNS_DEBUG)
@@ -919,24 +919,24 @@ static int poly_name(const struct polydir_s *polyptr, char **i_name,
     if ((idata->flags & PAMNS_GEN_HASH) || strlen(*i_name) > NAMESPACE_MAX_DIR_LEN) {
         hash = md5hash(*i_name, idata);
         if (hash == NULL) {
-           goto fail;
+           goto fail;
         }
         if (idata->flags & PAMNS_GEN_HASH) {
-           free(*i_name);
+           free(*i_name);
            *i_name = hash;
            hash = NULL;
         } else {
-           char *newname;
-           if (asprintf(&newname, "%.*s_%s", NAMESPACE_MAX_DIR_LEN-1-(int)strlen(hash),
-               *i_name, hash) < 0) {
-               goto fail;
-           }
-           free(*i_name);
-           *i_name = newname;
+           char *newname;
+           if (asprintf(&newname, "%.*s_%s", NAMESPACE_MAX_DIR_LEN-1-(int)strlen(hash),
+               *i_name, hash) < 0) {
+               goto fail;
+           }
+           free(*i_name);
+           *i_name = newname;
         }
     }
     rc = PAM_SUCCESS;
-    
+
 fail:
     free(hash);
 #ifdef WITH_SELINUX
@@ -959,34 +959,34 @@ static int protect_mount(int dfd, const char *path, struct instance_data *idata)
 {
        struct protect_dir_s *dir = idata->protect_dirs;
        char tmpbuf[64];
-       
+
        while (dir != NULL) {
                if (strcmp(path, dir->dir) == 0) {
                        return 0;
                }
                dir = dir->next;
        }
-       
+
        dir = calloc(1, sizeof(*dir));
-       
+
        if (dir == NULL) {
                return -1;
        }
-       
+
        dir->dir = strdup(path);
-       
+
        if (dir->dir == NULL) {
                free(dir);
                return -1;
        }
-       
+
        snprintf(tmpbuf, sizeof(tmpbuf), "/proc/self/fd/%d", dfd);
-       
+
        if (idata->flags & PAMNS_DEBUG) {
                pam_syslog(idata->pamh, LOG_INFO,
                        "Protect mount of %s over itself", path);
        }
-       
+
        if (mount(tmpbuf, tmpbuf, NULL, MS_BIND, NULL) != 0) {
                int save_errno = errno;
                pam_syslog(idata->pamh, LOG_ERR,
@@ -996,7 +996,7 @@ static int protect_mount(int dfd, const char *path, struct instance_data *idata)
                errno = save_errno;
                return -1;
        }
-       
+
        dir->next = idata->protect_dirs;
        idata->protect_dirs = dir;
 
@@ -1019,15 +1019,15 @@ static int protect_dir(const char *path, mode_t mode, int do_mkdir, int always,
        if (p == NULL) {
                goto error;
        }
-       
+
        if (*dir == '/') {
                dfd = open("/", flags);
                if (dfd == -1) {
                        goto error;
                }
-               dir++;  /* assume / is safe */
+               dir++;  /* assume / is safe */
        }
-       
+
        while ((d=strchr(dir, '/')) != NULL) {
                *d = '\0';
                dfd_next = openat(dfd, dir, flags);
@@ -1042,8 +1042,8 @@ static int protect_dir(const char *path, mode_t mode, int do_mkdir, int always,
                if (fstat(dfd, &st) != 0) {
                        goto error;
                }
-               
-               if (flags & O_NOFOLLOW) { 
+
+               if (flags & O_NOFOLLOW) {
                        /* we are inside user-owned dir - protect */
                        if (protect_mount(dfd, p, idata) == -1)
                                goto error;
@@ -1058,14 +1058,14 @@ static int protect_dir(const char *path, mode_t mode, int do_mkdir, int always,
        }
 
        rv = openat(dfd, dir, flags);
-       
+
        if (rv == -1) {
                if (!do_mkdir || mkdirat(dfd, dir, mode) != 0) {
                        goto error;
                }
                rv = openat(dfd, dir, flags);
        }
-       
+
        if (rv != -1) {
                if (fstat(rv, &st) != 0) {
                        save_errno = errno;
@@ -1082,7 +1082,7 @@ static int protect_dir(const char *path, mode_t mode, int do_mkdir, int always,
                }
        }
 
-       if ((flags & O_NOFOLLOW) || always) { 
+       if ((flags & O_NOFOLLOW) || always) {
                /* we are inside user-owned dir - protect */
                if (protect_mount(rv, p, idata) == -1) {
                        save_errno = errno;
@@ -1251,7 +1251,7 @@ static int create_polydir(struct polydir_s *polyptr,
                pam_syslog(idata->pamh, LOG_DEBUG,
                        "Polydir %s context: %s", dir, (char *)dircon);
            if (setfscreatecon(dircon) != 0)
-               pam_syslog(idata->pamh, LOG_NOTICE,
+               pam_syslog(idata->pamh, LOG_NOTICE,
                        "Error setting context for directory %s: %m", dir);
            freecon(dircon);
         }
@@ -1279,15 +1279,15 @@ static int create_polydir(struct polydir_s *polyptr,
             pam_syslog(idata->pamh, LOG_DEBUG, "Created polydir %s", dir);
 
     if (polyptr->mode != (mode_t)ULONG_MAX) {
-       /* explicit mode requested */
-       if (fchmod(rc, mode) != 0) {
+       /* explicit mode requested */
+       if (fchmod(rc, mode) != 0) {
                pam_syslog(idata->pamh, LOG_ERR,
-                       "Error changing mode of directory %s: %m", dir);
+                          "Error changing mode of directory %s: %m", dir);
                 close(rc);
                 umount(dir); /* undo the eventual protection bind mount */
-               rmdir(dir);
-               return PAM_SESSION_ERR;
-       }
+               rmdir(dir);
+               return PAM_SESSION_ERR;
+       }
     }
 
     if (polyptr->owner != (uid_t)ULONG_MAX)
@@ -1345,14 +1345,14 @@ static int create_instance(struct polydir_s *polyptr, char *ipath, struct stat *
      * attributes to match that of the original directory that is being
      * polyinstantiated.
      */
-    
+
     if (polyptr->method == TMPDIR) {
-       if (mkdtemp(polyptr->instance_prefix) == NULL) {
+       if (mkdtemp(polyptr->instance_prefix) == NULL) {
             pam_syslog(idata->pamh, LOG_ERR, "Error creating temporary instance %s, %m",
                        polyptr->instance_prefix);
            polyptr->method = NONE; /* do not clean up! */
            return PAM_SESSION_ERR;
-       }
+       }
        /* copy the actual directory name to ipath */
        strcpy(ipath, polyptr->instance_prefix);
     } else if (mkdir(ipath, S_IRUSR) < 0) {
@@ -1452,21 +1452,21 @@ static int ns_setup(struct polydir_s *polyptr,
     if (retval < 0 && errno != ENOENT) {
        pam_syslog(idata->pamh, LOG_ERR, "Polydir %s access error: %m",
                polyptr->dir);
-       return PAM_SESSION_ERR;    
+       return PAM_SESSION_ERR;
     }
 
     if (retval < 0) {
-       if ((polyptr->flags & POLYDIR_CREATE) &&
+       if ((polyptr->flags & POLYDIR_CREATE) &&
                create_polydir(polyptr, idata) != PAM_SUCCESS)
                return PAM_SESSION_ERR;
     } else {
-       close(retval);
+       close(retval);
     }
-    
+
     if (polyptr->method == TMPFS) {
        if (mount("tmpfs", polyptr->dir, "tmpfs", 0, NULL) < 0) {
            pam_syslog(idata->pamh, LOG_ERR, "Error mounting tmpfs on %s, %m",
-               polyptr->dir);
+               polyptr->dir);
             return PAM_SESSION_ERR;
        }
 
@@ -1481,7 +1481,7 @@ static int ns_setup(struct polydir_s *polyptr,
                polyptr->dir);
         return PAM_SESSION_ERR;
     }
+
     /*
      * Obtain the name of instance pathname based on the
      * polyinstantiation method and instance context returned by
@@ -1495,8 +1495,8 @@ static int ns_setup(struct polydir_s *polyptr,
 #endif
 
     if (retval != PAM_SUCCESS) {
-       if (retval != PAM_IGNORE)
-               pam_syslog(idata->pamh, LOG_ERR, "Error getting instance name");
+       if (retval != PAM_IGNORE)
+               pam_syslog(idata->pamh, LOG_ERR, "Error getting instance name");
         goto cleanup;
     } else {
 #ifdef WITH_SELINUX
@@ -1526,8 +1526,8 @@ static int ns_setup(struct polydir_s *polyptr,
 #endif
 
     if (retval == PAM_IGNORE) {
-       newdir = 0;
-       retval = PAM_SUCCESS;
+       newdir = 0;
+       retval = PAM_SUCCESS;
     }
 
     if (retval != PAM_SUCCESS) {
@@ -1647,7 +1647,7 @@ static int cleanup_tmpdirs(struct instance_data *idata)
                }
                if (!WIFEXITED(status) || WIFSIGNALED(status) > 0) {
                    pam_syslog(idata->pamh, LOG_ERR,
-                       "Error removing %s", pptr->instance_prefix);
+                       "Error removing %s", pptr->instance_prefix);
                }
            } else if (pid < 0) {
                pam_syslog(idata->pamh, LOG_ERR,
@@ -1686,14 +1686,14 @@ static int setup_namespace(struct instance_data *idata, enum unmnt_op unmnt)
      */
     for (pptr = idata->polydirs_ptr; pptr; pptr = pptr->next) {
         if (ns_override(pptr, idata, idata->uid)) {
-           if (unmnt == NO_UNMNT || ns_override(pptr, idata, idata->ruid)) {
-               if (idata->flags & PAMNS_DEBUG)
-                   pam_syslog(idata->pamh, LOG_DEBUG,
+           if (unmnt == NO_UNMNT || ns_override(pptr, idata, idata->ruid)) {
+               if (idata->flags & PAMNS_DEBUG)
+                   pam_syslog(idata->pamh, LOG_DEBUG,
                        "Overriding poly for user %d for dir %s",
                        idata->uid, pptr->dir);
            } else {
-               if (idata->flags & PAMNS_DEBUG)
-                   pam_syslog(idata->pamh, LOG_DEBUG,
+               if (idata->flags & PAMNS_DEBUG)
+                   pam_syslog(idata->pamh, LOG_DEBUG,
                        "Need unmount ns for user %d for dir %s",
                        idata->ruid, pptr->dir);
                need_poly = 1;
@@ -1721,7 +1721,7 @@ static int setup_namespace(struct instance_data *idata, enum unmnt_op unmnt)
             return PAM_SESSION_ERR;
         }
     } else {
-       del_polydir_list(idata->polydirs_ptr);
+       del_polydir_list(idata->polydirs_ptr);
         return PAM_SUCCESS;
     }
 
@@ -1768,12 +1768,12 @@ static int setup_namespace(struct instance_data *idata, enum unmnt_op unmnt)
                      * are available from
                      */
                     strcpy(poly_parent, pptr->rdir);
-                   fptr = strchr(poly_parent, '/');
-                   cptr = strrchr(poly_parent, '/');
-                   if (fptr && cptr && (fptr == cptr))
-                       strcpy(poly_parent, "/");
-                   else if (cptr)
-                       *cptr = '\0';
+                   fptr = strchr(poly_parent, '/');
+                   cptr = strrchr(poly_parent, '/');
+                   if (fptr && cptr && (fptr == cptr))
+                       strcpy(poly_parent, "/");
+                   else if (cptr)
+                       *cptr = '\0';
                     if (chdir(poly_parent) < 0) {
                         pam_syslog(idata->pamh, LOG_ERR,
                                "Can't chdir to %s, %m", poly_parent);
@@ -1781,12 +1781,12 @@ static int setup_namespace(struct instance_data *idata, enum unmnt_op unmnt)
                 }
 
                 if (umount(pptr->rdir) < 0) {
-                   int saved_errno = errno;
-                   pam_syslog(idata->pamh, LOG_ERR, "Unmount of %s failed, %m",
-                       pptr->rdir);
-                   if (saved_errno != EINVAL) {
-                       retval = PAM_SESSION_ERR;
-                       goto out;
+                   int saved_errno = errno;
+                   pam_syslog(idata->pamh, LOG_ERR, "Unmount of %s failed, %m",
+                       pptr->rdir);
+                   if (saved_errno != EINVAL) {
+                       retval = PAM_SESSION_ERR;
+                       goto out;
                     }
                 } else if (idata->flags & PAMNS_DEBUG)
                     pam_syslog(idata->pamh, LOG_DEBUG, "Umount succeeded %s",
@@ -1803,20 +1803,20 @@ static int setup_namespace(struct instance_data *idata, enum unmnt_op unmnt)
     }
 out:
     if (retval != PAM_SUCCESS) {
-       cleanup_tmpdirs(idata);
-       unprotect_dirs(idata->protect_dirs);
+       cleanup_tmpdirs(idata);
+       unprotect_dirs(idata->protect_dirs);
     } else if (pam_set_data(idata->pamh, NAMESPACE_PROTECT_DATA, idata->protect_dirs,
-               cleanup_protect_data) != PAM_SUCCESS) {
+               cleanup_protect_data) != PAM_SUCCESS) {
        pam_syslog(idata->pamh, LOG_ERR, "Unable to set namespace protect data");
-       cleanup_tmpdirs(idata);
-       unprotect_dirs(idata->protect_dirs);
+       cleanup_tmpdirs(idata);
+       unprotect_dirs(idata->protect_dirs);
        return PAM_SYSTEM_ERR;
     } else if (pam_set_data(idata->pamh, NAMESPACE_POLYDIR_DATA, idata->polydirs_ptr,
-               cleanup_polydir_data) != PAM_SUCCESS) {
+               cleanup_polydir_data) != PAM_SUCCESS) {
        pam_syslog(idata->pamh, LOG_ERR, "Unable to set namespace polydir data");
-       cleanup_tmpdirs(idata);
-       pam_set_data(idata->pamh, NAMESPACE_PROTECT_DATA, NULL, NULL);
-       idata->protect_dirs = NULL;
+       cleanup_tmpdirs(idata);
+       pam_set_data(idata->pamh, NAMESPACE_PROTECT_DATA, NULL, NULL);
+       idata->protect_dirs = NULL;
        return PAM_SYSTEM_ERR;
     }
     return retval;
@@ -1943,7 +1943,7 @@ static int get_user_data(struct instance_data *idata)
     int retval;
     char *user_name;
     struct passwd *pwd;
-    /* 
+    /*
      * Lookup user and fill struct items
      */
     retval = pam_get_item(idata->pamh, PAM_USER, (void*) &user_name );
@@ -1969,10 +1969,10 @@ static int get_user_data(struct instance_data *idata)
     /* Fill in RUSER too */
     retval = pam_get_item(idata->pamh, PAM_RUSER, (void*) &user_name );
     if ( user_name != NULL && retval == PAM_SUCCESS && user_name[0] != '\0' ) {
-       strncat(idata->ruser, user_name, sizeof(idata->ruser) - 1);
-       pwd = pam_modutil_getpwnam(idata->pamh, user_name);
+       strncat(idata->ruser, user_name, sizeof(idata->ruser) - 1);
+       pwd = pam_modutil_getpwnam(idata->pamh, user_name);
     } else {
-       pwd = pam_modutil_getpwuid(idata->pamh, getuid());
+       pwd = pam_modutil_getpwuid(idata->pamh, getuid());
     }
     if (!pwd) {
        pam_syslog(idata->pamh, LOG_ERR, "user unknown '%s'", user_name);
@@ -2005,7 +2005,7 @@ PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED,
 #ifdef WITH_SELINUX
     if (is_selinux_enabled())
         idata.flags |= PAMNS_SELINUX_ENABLED;
-    if (ctxt_based_inst_needed()) 
+    if (ctxt_based_inst_needed())
         idata.flags |= PAMNS_CTXT_BASED_INST;
 #endif
 
@@ -2036,7 +2036,7 @@ PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED,
             unmnt = UNMNT_ONLY;
        if (strcmp(argv[i], "require_selinux") == 0) {
                if (!(idata.flags & PAMNS_SELINUX_ENABLED)) {
-                       pam_syslog(idata.pamh, LOG_ERR,
+                       pam_syslog(idata.pamh, LOG_ERR,
                    "selinux_required option given and selinux is disabled");
                        return PAM_SESSION_ERR;
                }
@@ -2047,7 +2047,7 @@ PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED,
 
     retval = get_user_data(&idata);
     if (retval != PAM_SUCCESS)
-       return retval;
+       return retval;
 
     if (root_shared()) {
        idata.flags |= PAMNS_MOUNT_PRIVATE;
@@ -2135,13 +2135,13 @@ PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags UNUSED,
 
     retval = get_user_data(&idata);
     if (retval != PAM_SUCCESS)
-       return retval;
+       return retval;
 
     retval = pam_get_data(idata.pamh, NAMESPACE_POLYDIR_DATA, (const void **)&polyptr);
     if (retval != PAM_SUCCESS || polyptr == NULL)
-       /* nothing to reset */
-       return PAM_SUCCESS;
-       
+       /* nothing to reset */
+       return PAM_SUCCESS;
+
     idata.polydirs_ptr = polyptr;
 
     if (idata.flags & PAMNS_DEBUG)
@@ -2160,7 +2160,7 @@ PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags UNUSED,
 
     pam_set_data(idata.pamh, NAMESPACE_POLYDIR_DATA, NULL, NULL);
     pam_set_data(idata.pamh, NAMESPACE_PROTECT_DATA, NULL, NULL);
-    
+
     return PAM_SUCCESS;
 }
 
index c49995c0da6e1c60555e0df6ebe0e3374cc80579..6bca31c445fa14690d9d589add32e03a0408fd1e 100644 (file)
@@ -1,5 +1,5 @@
 /******************************************************************************
- * A module for Linux-PAM that will set the default namespace after 
+ * A module for Linux-PAM that will set the default namespace after
  * establishing a session via PAM.
  *
  * (C) Copyright IBM Corporation 2005
@@ -134,9 +134,9 @@ enum polymethod {
 /*
  * Depending on the application using this namespace module, we
  * may need to unmount priviously bind mounted instance directory.
- * Applications such as login and sshd, that establish a new 
+ * Applications such as login and sshd, that establish a new
  * session unmount of instance directory is not needed. For applications
- * such as su and newrole, that switch the identity, this module 
+ * such as su and newrole, that switch the identity, this module
  * has to unmount previous instance directory first and re-mount
  * based on the new indentity. For other trusted applications that
  * just want to undo polyinstantiation, only unmount of previous
@@ -182,4 +182,3 @@ struct instance_data {
     uid_t ruid;                        /* The uid of the requesting user */
     unsigned long flags;       /* Flags for debug, selinux etc */
 };
-
index 738483ac960130d7e89a9a6f36ef37cd3bf265dd..f896119b162d5ba5aeaa122d0a86756560916754 100644 (file)
@@ -395,7 +395,7 @@ save_old_password (pam_handle_t *pamh, const char *user, uid_t uid,
                                  entry.user, entry.uid, entry.count,
                                  oldpass) < 0)
                      {
-                       free (save);
+                       free (save);
                        retval = PAM_AUTHTOK_ERR;
                        fclose (oldpf);
                        fclose (newpf);
@@ -408,7 +408,7 @@ save_old_password (pam_handle_t *pamh, const char *user, uid_t uid,
                                  entry.user, entry.uid, entry.count,
                                  entry.old_passwords, oldpass) < 0)
                      {
-                       free (save);
+                       free (save);
                        retval = PAM_AUTHTOK_ERR;
                        fclose (oldpf);
                        fclose (newpf);
index 4e97ef59ce75144b2f09e66021f3aef9fac2e9f4..5f2d1bec32c98fe8e3cbf437aec105d8b28dcfc9 100644 (file)
@@ -203,9 +203,9 @@ securetty_perform_check (pam_handle_t *pamh, int ctrl,
 
                for (n = p; n != NULL; p = n+1) {
                    if ((n = strchr(p, ' ')) != NULL)
-                       *n = '\0';
+                       *n = '\0';
 
-                   if (strcmp(p, uttyname) == 0) {
+                   if (strcmp(p, uttyname) == 0) {
                        retval = 0;
                        break;
                    }
index 5c83acb48f2f22bcb6eb50a89609ce28b06902c2..ef142f4e8f57e8235af37c950dafde483551dc03 100644 (file)
@@ -10,7 +10,7 @@ EXTRA_DIST = README $(XMLS) pam_selinux.8 pam_selinux_check.8 \
 
 if HAVE_LIBSELINUX
   TESTS = tst-pam_selinux
-  man_MANS = pam_selinux.8 
+  man_MANS = pam_selinux.8
 endif
 
 XMLS = README.xml pam_selinux.8.xml
@@ -40,4 +40,3 @@ noinst_DATA = README pam_selinux.8
 README: pam_selinux.8.xml
 -include $(top_srcdir)/Make.xml.rules
 endif
-
index f99d433ae9eb2e1c5a53b8a3f2200ae651706959..b777b01e2dcb11a3a15172d8acb3306b05d07682 100644 (file)
@@ -142,7 +142,7 @@ query_response (pam_handle_t *pamh, const char *text, const char *def,
                char **response, int debug)
 {
   int rc;
-  if (def) 
+  if (def)
     rc = pam_prompt (pamh, PAM_PROMPT_ECHO_ON, response, "%s [%s] ", text, def);
   else
     rc = pam_prompt (pamh, PAM_PROMPT_ECHO_ON, response, "%s ", text);
@@ -150,7 +150,7 @@ query_response (pam_handle_t *pamh, const char *text, const char *def,
   if (*response == NULL) {
     rc = PAM_CONV_ERR;
   }
-  
+
   if (rc != PAM_SUCCESS) {
     pam_syslog(pamh, LOG_WARNING, "No response to query: %s", text);
   } else  if (debug)
@@ -190,11 +190,11 @@ manual_context (pam_handle_t *pamh, const char *user, int debug)
        /* Allow the user to enter each field of the context individually */
        if (query_response(pamh, _("role:"), NULL, &response, debug) == PAM_SUCCESS &&
            response[0] != '\0') {
-          if (context_role_set (new_context, response)) 
+          if (context_role_set (new_context, response))
               goto fail_set;
-          if (get_default_type(response, &type)) 
+          if (get_default_type(response, &type))
               goto fail_set;
-          if (context_type_set (new_context, type)) 
+          if (context_type_set (new_context, type))
               goto fail_set;
           _pam_drop(type);
        }
@@ -283,7 +283,7 @@ config_context (pam_handle_t *pamh, security_context_t defaultcon, int use_curre
 
   while (1) {
     if (query_response(pamh,
-                  _("Would you like to enter a different role or level?"), "n", 
+                  _("Would you like to enter a different role or level?"), "n",
                   &response, debug) == PAM_SUCCESS) {
        resp_val = response[0];
        _pam_drop(response);
@@ -293,22 +293,22 @@ config_context (pam_handle_t *pamh, security_context_t defaultcon, int use_curre
     if ((resp_val == 'y') || (resp_val == 'Y'))
       {
         if ((new_context = context_new(defaultcon)) == NULL)
-           goto fail_set;
+           goto fail_set;
 
        /* Allow the user to enter role and level individually */
-       if (query_response(pamh, _("role:"), context_role_get(new_context), 
+       if (query_response(pamh, _("role:"), context_role_get(new_context),
                       &response, debug) == PAM_SUCCESS && response[0]) {
          if (get_default_type(response, &type)) {
            pam_prompt (pamh, PAM_ERROR_MSG, NULL, _("No default type for role %s\n"), response);
            _pam_drop(response);
            continue;
          } else {
-           if (context_role_set(new_context, response)) 
+           if (context_role_set(new_context, response))
              goto fail_set;
            if (context_type_set (new_context, type))
              goto fail_set;
            _pam_drop(type);
-         } 
+         }
        }
        _pam_drop(response);
 
@@ -320,9 +320,9 @@ config_context (pam_handle_t *pamh, security_context_t defaultcon, int use_curre
 
                if (getcon(&mycon) != 0)
                    goto fail_set;
-               my_context = context_new(mycon);
+               my_context = context_new(mycon);
                if (my_context == NULL) {
-                   freecon(mycon);
+                   freecon(mycon);
                    goto fail_set;
                }
                freecon(mycon);
@@ -331,11 +331,11 @@ config_context (pam_handle_t *pamh, security_context_t defaultcon, int use_curre
                    goto fail_set;
                }
                context_free(my_context);
-           } else if (query_response(pamh, _("level:"), context_range_get(new_context), 
+           } else if (query_response(pamh, _("level:"), context_range_get(new_context),
                           &response, debug) == PAM_SUCCESS && response[0]) {
                if (context_range_set(new_context, response))
                    goto fail_set;
-           } 
+           }
            _pam_drop(response);
          }
 
@@ -355,7 +355,7 @@ config_context (pam_handle_t *pamh, security_context_t defaultcon, int use_curre
           if (mls_enabled && !mls_range_allowed(pamh, defaultcon, newcon, debug)) {
            pam_syslog(pamh, LOG_NOTICE, "Security context %s is not allowed for %s", defaultcon, newcon);
 
-           send_audit_message(pamh, 0, defaultcon, newcon);
+           send_audit_message(pamh, 0, defaultcon, newcon);
 
            free(newcon);
             goto fail_range;
@@ -380,7 +380,7 @@ config_context (pam_handle_t *pamh, security_context_t defaultcon, int use_curre
   context_free (new_context);
   send_audit_message(pamh, 0, defaultcon, NULL);
  fail_range:
-  return NULL;  
+  return NULL;
 }
 
 static security_context_t
@@ -405,7 +405,7 @@ context_from_env (pam_handle_t *pamh, security_context_t defaultcon, int env_par
        pam_syslog(pamh, LOG_NOTICE, "No default type for role %s", env);
        goto fail_set;
     } else {
-       if (context_role_set(new_context, env)) 
+       if (context_role_set(new_context, env))
            goto fail_set;
        if (context_type_set(new_context, type))
            goto fail_set;
@@ -449,7 +449,7 @@ context_from_env (pam_handle_t *pamh, security_context_t defaultcon, int env_par
 
   if (debug)
     pam_syslog(pamh, LOG_NOTICE, "Selected Security Context %s", newcon);
-  
+
   /* Get the string value of the context and see if it is valid. */
   if (security_check_context(newcon)) {
     pam_syslog(pamh, LOG_NOTICE, "Not a valid security context %s", newcon);
@@ -623,7 +623,7 @@ pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED,
       env_params = 1;
     }
   }
-  
+
   if (debug)
     pam_syslog(pamh, LOG_NOTICE, "Open Session");
 
@@ -656,9 +656,9 @@ pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED,
 #else
   if (getseuserbyname(username, &seuser, &level) == 0) {
 #endif
-         num_contexts = get_ordered_context_list_with_level(seuser, 
+         num_contexts = get_ordered_context_list_with_level(seuser,
                                                             level,
-                                                            NULL, 
+                                                            NULL,
                                                             &contextlist);
          if (debug)
                  pam_syslog(pamh, LOG_DEBUG, "Username= %s SELinux User = %s Level= %s",
@@ -692,7 +692,7 @@ pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED,
           return PAM_SUCCESS;
     }
   }
-  else { 
+  else {
       if (seuser != NULL) {
        user_context = manual_context(pamh,seuser,debug);
        free(seuser);
index d6fcdff12eca9a3a4455cd357e8552db25b874bd..34f578d77c85fb231f9ab4c94a9c0d2cc3aad5aa 100644 (file)
@@ -29,7 +29,7 @@ returns an exit code of 0 for success and > 0 on error:
 pam_selinux(8)
 
 .SH BUGS
-Let's hope not, but if you find any, please email the author.  
+Let's hope not, but if you find any, please email the author.
 
 .SH AUTHOR
 Dan Walsh <dwalsh@redhat.com>
index 4879b6856657ee91b6443d2522e7234af08d027d..f79984578a5b89b64a05a945698aeca3e5aef8ca 100644 (file)
@@ -85,11 +85,11 @@ match_process_uid(pid_t pid, uid_t uid)
        uid_t puid;
        FILE *f;
        int re = 0;
-       
+
        snprintf (buf, sizeof buf, PROC_BASE "/%d/status", pid);
        if (!(f = fopen (buf, "r")))
                return 0;
-       
+
        while (fgets(buf, sizeof buf, f)) {
                if (sscanf (buf, "Uid:\t%d", &puid)) {
                        re = uid == puid;
@@ -246,9 +246,9 @@ sepermit_match(pam_handle_t *pamh, const char *cfgfile, const char *user,
        int matched = 0;
        int exclusive = 0;
        int ignore = 0;
-       
+
        f = fopen(cfgfile, "r");
-       
+
        if (!f) {
                pam_syslog(pamh, LOG_ERR, "Failed to open config file %s: %m", cfgfile);
                return PAM_SERVICE_ERR;
@@ -276,7 +276,7 @@ sepermit_match(pam_handle_t *pamh, const char *cfgfile, const char *user,
                start = strtok_r(start, OPT_DELIM, &sptr);
 
                switch (start[0]) {
-                       case '@': 
+                       case '@':
                                ++start;
                                if (debug)
                                        pam_syslog(pamh, LOG_NOTICE, "Matching user %s against group %s", user, start);
@@ -411,9 +411,9 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
 }
 
 #ifdef PAM_STATIC
-    
+
 /* static module data */
-    
+
 struct pam_module _pam_sepermit_modstruct = {
     "pam_sepermit",
     pam_sm_authenticate,
@@ -424,4 +424,3 @@ struct pam_module _pam_sepermit_modstruct = {
     NULL
 };
 #endif
-
index 89fc297e62fe6dab9a022af7060969e0d9f75973..68bd60743ee48e4d96a2259adea330d6b990b96c 100644 (file)
@@ -57,7 +57,7 @@ static int perform_check(pam_handle_t *pamh)
            return PAM_SERVICE_ERR;
 
        /* It could still be NULL the second time. */
-       if (!userName || (userName[0] == '\0'))
+       if (!userName || (userName[0] == '\0'))
            return PAM_SERVICE_ERR;
     }
 
index b75a597d4f72d2b2ade5b44cefd75a943cd5364b..c1695d7f813a84b4fefdd49ac61f45c85984a204 100644 (file)
@@ -62,7 +62,7 @@ _pam_report (const pam_handle_t *pamh, int ctrl, const char *name,
          pam_syslog(pamh, LOG_DEBUG, "CALLED: %s", name);
          pam_syslog(pamh, LOG_DEBUG, "FLAGS : 0%o%s",
                     flags, (flags & PAM_SILENT) ? " (silent)":"");
-         pam_syslog(pamh, LOG_DEBUG, "CTRL  = 0%o", ctrl);
+         pam_syslog(pamh, LOG_DEBUG, "CTRL  = 0%o", ctrl);
          pam_syslog(pamh, LOG_DEBUG, "ARGV  :");
          while (argc--) {
               pam_syslog(pamh, LOG_DEBUG, " \"%s\"", *argv++);
index dffbc895c2cc5fe6c674cf0072914ca949175d03..c712885799de50a6999903717c1b36dd832c1b70 100644 (file)
@@ -134,7 +134,7 @@ static void
 log_phase_no_auth(pam_handle_t *pamh, int phase, const char *argv)
 {
     if ( phase != PHASE_AUTH ) {
-       pam_syslog(pamh, LOG_ERR,
+       pam_syslog(pamh, LOG_ERR,
                   "option %s allowed in auth phase only", argv);
     }
 }
@@ -194,12 +194,12 @@ tally_parse_args(pam_handle_t *pamh, struct tally_options *opts,
       else if ( ! strcmp( *argv, "per_user" ) )
       {
        log_phase_no_auth(pamh, phase, *argv);
-       opts->ctrl |= OPT_PER_USER;
+       opts->ctrl |= OPT_PER_USER;
       }
       else if ( ! strcmp( *argv, "no_lock_time") )
       {
        log_phase_no_auth(pamh, phase, *argv);
-       opts->ctrl |= OPT_NO_LOCK_TIME;
+       opts->ctrl |= OPT_NO_LOCK_TIME;
       }
       else if ( ! strcmp( *argv, "no_reset" ) ) {
         opts->ctrl |= OPT_NO_RESET;
@@ -463,19 +463,19 @@ tally_bump (int inc, time_t *oldtime, pam_handle_t *pamh,
     (void) pam_get_item(pamh, PAM_RHOST, &remote_host);
     if (!remote_host) {
 
-       (void) pam_get_item(pamh, PAM_TTY, &cur_tty);
+       (void) pam_get_item(pamh, PAM_TTY, &cur_tty);
        if (!cur_tty) {
-           strncpy(fsp->fs_faillog.fail_line, "unknown",
+           strncpy(fsp->fs_faillog.fail_line, "unknown",
                    sizeof(fsp->fs_faillog.fail_line) - 1);
            fsp->fs_faillog.fail_line[sizeof(fsp->fs_faillog.fail_line)-1] = 0;
        } else {
-           strncpy(fsp->fs_faillog.fail_line, cur_tty,
+           strncpy(fsp->fs_faillog.fail_line, cur_tty,
                    sizeof(fsp->fs_faillog.fail_line)-1);
            fsp->fs_faillog.fail_line[sizeof(fsp->fs_faillog.fail_line)-1] = 0;
        }
 
     } else {
-       strncpy(fsp->fs_faillog.fail_line, remote_host,
+       strncpy(fsp->fs_faillog.fail_line, remote_host,
                (size_t)sizeof(fsp->fs_faillog.fail_line));
        fsp->fs_faillog.fail_line[sizeof(fsp->fs_faillog.fail_line)-1] = 0;
     }
@@ -534,8 +534,8 @@ tally_check (time_t oldtime, pam_handle_t *pamh, uid_t uid,
       if (lock_time && oldtime
          && !(opts->ctrl & OPT_NO_LOCK_TIME) )
       {
-       if ( lock_time + oldtime > time(NULL) )
-       {
+       if ( lock_time + oldtime > time(NULL) )
+       {
          if (!(opts->ctrl & OPT_SILENT))
               pam_info (pamh,
                         _("Account temporary locked (%ld seconds left)"),
@@ -543,19 +543,19 @@ tally_check (time_t oldtime, pam_handle_t *pamh, uid_t uid,
 
          if (!(opts->ctrl & OPT_NOLOGNOTICE))
               pam_syslog (pamh, LOG_NOTICE,
-                          "user %s (%lu) has time limit [%lds left]"
+                          "user %s (%lu) has time limit [%lds left]"
                           " since last failure.",
                           user, (unsigned long int) uid,
                           oldtime+lock_time-time(NULL));
-               return PAM_AUTH_ERR;
-       }
+               return PAM_AUTH_ERR;
+       }
       }
       if (opts->unlock_time && oldtime)
       {
-       if ( opts->unlock_time + oldtime <= time(NULL) )
-       {       /* ignore deny check after unlock_time elapsed */
-               return PAM_SUCCESS;
-       }
+       if ( opts->unlock_time + oldtime <= time(NULL) )
+       {       /* ignore deny check after unlock_time elapsed */
+               return PAM_SUCCESS;
+       }
       }
       if (
         ( deny != 0 ) &&                     /* deny==0 means no deny        */
@@ -599,8 +599,8 @@ tally_reset (pam_handle_t *pamh, uid_t uid, struct tally_options *opts)
 
     if (tally == 0)
     {
-       fsp->fs_faillog.fail_time = (time_t) 0;
-       strcpy(fsp->fs_faillog.fail_line, "");
+       fsp->fs_faillog.fail_time = (time_t) 0;
+       strcpy(fsp->fs_faillog.fail_line, "");
     }
 
     i=set_tally(pamh, tally, uid, opts->filename, &TALLY, fsp);
@@ -866,8 +866,8 @@ int main ( int argc UNUSED, char **argv )
       if ( ! fread((char *) &fsp->fs_faillog,
                   sizeof (struct faillog), 1, TALLY)
           || ! fsp->fs_faillog.fail_cnt ) {
-       continue;
-       }
+       continue;
+      }
       tally = fsp->fs_faillog.fail_cnt;
 
       if ( ( pw=getpwuid(uid) ) ) {
index 9e6e1fafd062eb59e3303d773c7efbbe07a32774..ad28854948f1f6bfb319fe2173392b5d33ab79bd 100644 (file)
@@ -4,4 +4,3 @@
 
 #define MAIN
 #include "pam_tally.c"
-
index e1df6d7498d660e736f95d432fac133b66e5727e..c72d27a07dc87935f9d0203e4a3c3f1b2113f690 100644 (file)
@@ -159,7 +159,7 @@ static void
 log_phase_no_auth(pam_handle_t *pamh, int phase, const char *argv)
 {
     if ( phase != PHASE_AUTH ) {
-       pam_syslog(pamh, LOG_ERR,
+       pam_syslog(pamh, LOG_ERR,
                   "option %s allowed in auth phase only", argv);
     }
 }
@@ -407,7 +407,7 @@ get_tally(pam_handle_t *pamh, uid_t uid, const char *filename,
     if ((*tfile = open(filename, O_RDWR)) == -1) {
 #ifndef MAIN
       if (errno == EACCES) /* called with insufficient access rights */
-         return PAM_IGNORE;
+         return PAM_IGNORE;
 #endif
       pam_syslog(pamh, LOG_ALERT, "Error opening %s for update: %m", filename);
 
@@ -418,7 +418,7 @@ skip_open:
     if (lseek(*tfile, (off_t)uid*(off_t)sizeof(*tally), SEEK_SET) == (off_t)-1) {
         pam_syslog(pamh, LOG_ALERT, "lseek failed for %s: %m", filename);
         if (!preopened) {
-           close(*tfile);
+           close(*tfile);
             *tfile = -1;
         }
         return PAM_AUTH_ERR;
@@ -536,30 +536,30 @@ tally_check (tally_t oldcnt, time_t oldtime, pam_handle_t *pamh, uid_t uid,
         if (uid) {
             /* Unlock time check */
             if (opts->unlock_time && oldtime) {
-                if (opts->unlock_time + oldtime <= time(NULL))         {
+                if (opts->unlock_time + oldtime <= time(NULL)) {
                     /* ignore deny check after unlock_time elapsed */
 #ifdef HAVE_LIBAUDIT
                     snprintf(buf, sizeof(buf), "pam_tally2 uid=%u ", uid);
                     audit_log_user_message(audit_fd, AUDIT_RESP_ACCT_UNLOCK_TIMED, buf,
                                    NULL, NULL, NULL, 1);
 #endif
-                   rv = PAM_SUCCESS;
-                   goto cleanup;
-               }
+                   rv = PAM_SUCCESS;
+                   goto cleanup;
+               }
             }
         } else {
             /* Root unlock time check */
             if (opts->root_unlock_time && oldtime) {
                 if (opts->root_unlock_time + oldtime <= time(NULL)) {
-                   /* ignore deny check after unlock_time elapsed */
+                   /* ignore deny check after unlock_time elapsed */
 #ifdef HAVE_LIBAUDIT
                     snprintf(buf, sizeof(buf), "pam_tally2 uid=%u ", uid);
                     audit_log_user_message(audit_fd, AUDIT_RESP_ACCT_UNLOCK_TIMED, buf,
                                    NULL, NULL, NULL, 1);
 #endif
-                   rv = PAM_SUCCESS;
-                   goto cleanup;
-               }
+                   rv = PAM_SUCCESS;
+                   goto cleanup;
+               }
             }
         }
 
@@ -597,7 +597,7 @@ tally_check (tally_t oldcnt, time_t oldtime, pam_handle_t *pamh, uid_t uid,
                          oldtime+opts->lock_time-time(NULL));
             }
            if (!(opts->ctrl & OPT_NOLOGNOTICE)) {
-               pam_syslog(pamh, LOG_NOTICE,
+               pam_syslog(pamh, LOG_NOTICE,
                       "user %s (%lu) has time limit [%lds left]"
                       " since last failure.",
                        user, (unsigned long)uid,
@@ -605,7 +605,7 @@ tally_check (tally_t oldcnt, time_t oldtime, pam_handle_t *pamh, uid_t uid,
            }
            rv = PAM_AUTH_ERR;
            goto cleanup;
-       }
+       }
     }
 
 cleanup:
@@ -648,10 +648,10 @@ tally_bump (int inc, time_t *oldtime, pam_handle_t *pamh,
 
     (void) pam_get_item(pamh, PAM_RHOST, &remote_host);
     if (!remote_host) {
-       (void) pam_get_item(pamh, PAM_TTY, &remote_host);
+       (void) pam_get_item(pamh, PAM_TTY, &remote_host);
        if (!remote_host) {
-           remote_host = "unknown";
-       }
+           remote_host = "unknown";
+       }
     }
 
     strncpy(tally.fail_line, remote_host,
@@ -1019,14 +1019,14 @@ main( int argc UNUSED, char **argv )
     FILE *tfile=fopen(cline_filename, "r");
     uid_t uid=0;
     if (!tfile  && cline_reset != 0) {
-       perror(*argv);
-       exit(1);
+       perror(*argv);
+       exit(1);
     }
 
     for ( ; tfile && !feof(tfile); uid++ ) {
       if ( !fread(&tally, sizeof(tally), 1, tfile)
           || !tally.fail_cnt ) {
-        continue;
+        continue;
       }
       print_one(&tally, uid);
     }
index 681ed690537e7024f0a8fc7c4da274f86cc50701..b72e9bfdf2ab1f304330dd3e284fca1e7528970e 100644 (file)
@@ -4,4 +4,3 @@
 
 #define MAIN
 #include "pam_tally2.c"
-
index dff4a6da012ed7e8ae6e3bffd72b1ec69e2ba00d..c94737ca69d10f1b9c353df03a113d2539b8d304 100644 (file)
@@ -135,7 +135,7 @@ read_field(const pam_handle_t *pamh, int fd, char **buf, int *from, int *state)
            return -1;
        }
     }
+
 
     if (*from > 0)
        to = shift_buf(*buf, *from);
@@ -652,7 +652,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags UNUSED,
 #ifdef HAVE_LIBAUDIT
        if (!(ctrl & PAM_NO_AUDIT)) {
             pam_modutil_audit_write(pamh, AUDIT_ANOM_LOGIN_TIME,
-                   "pam_time", rv); /* ignore return value as we fail anyway */
+                   "pam_time", rv); /* ignore return value as we fail anyway */
         }
 #endif
        if (ctrl & PAM_DEBUG_ARG) {
index c7b7989c1a594c069df9555ece78f1c0266379db..68d2dadcd3cd269e54de86daaa21651ebf3cfc91 100644 (file)
@@ -1,4 +1,4 @@
-# this is an example configuration file for the pam_time module. Its syntax 
+# this is an example configuration file for the pam_time module. Its syntax
 # was initially based heavily on that of the shadow package (shadow-960129).
 #
 # the syntax of the lines is as follows:
index 224fda348f8c7825cca66dfdd648f4842ba3869d..82227ba0428500e4d1dc0baddbc1f7bb7542e2c3 100644 (file)
@@ -119,7 +119,7 @@ login ; tty* &amp; !ttyp* ; !root ; !Al0000-2400
       Games (configured to use PAM) are only to be accessed out of
       working hours. This rule does not apply to the user
       <emphasis>waster</emphasis>:
-      <programlisting> 
+      <programlisting>
 games ; * ; !waster ; Wd0000-2400 | Wk1800-0800
       </programlisting>
     </para>
index d2da5ff19c0da045e7a16dde340f73502ed64681..7c1f8bfbc80da64ea96948a00cc6dd0e88a38467 100644 (file)
@@ -63,7 +63,7 @@ testvectors(void)
                "b617318655057264e28bc0b6fb378c8ef146be00",
                },
 
-#ifdef HMAC_ALLOW_SHORT_KEYS 
+#ifdef HMAC_ALLOW_SHORT_KEYS
                {
                "Jefe", 4,
                "what do ya want for nothing?", 28,
index 5b3774ff53e72c070a87e8b090409ca8816e73ea..573ecf3bfd56097fc6b5b34145390aca5a8a1ad0 100644 (file)
@@ -69,8 +69,8 @@ hmac_key_create(pam_handle_t *pamh, const char *filename, size_t key_size,
                pam_syslog(pamh, LOG_ERR, "Cannot create %s: %m", filename);
                return;
        }
-       
-       
+
+
         if (fchown(keyfd, owner, group) == -1) {
                pam_syslog(pamh, LOG_ERR, "Cannot chown %s: %m", filename);
                return;
index adb87a79685e05341d0cd903c106a574f5eae971..fc6a927681534af844f2e45dcb51e3f4ff4a6631 100644 (file)
@@ -186,4 +186,3 @@ session optional pam_timestamp.so
   </refsect1>
 
 </refentry>
-
index 7ec7140e53a67932629172096ab6a0a188e9dc66..06432e0956dd3a0ed968691dd702ef01f5d4b911 100644 (file)
@@ -205,4 +205,3 @@ session optional pam_timestamp.so
   </refsect1>
 
 </refentry>
-
index e6705eb5c1c27c62fc803fbf53c21b82a23914da..576b4b41a44b52acf4bf373cbd270caaa5251d1b 100644 (file)
@@ -185,7 +185,7 @@ size_t
 sha1_output(struct sha1_context *ctx, unsigned char *out)
 {
        struct sha1_context ctx2;
-       
+
        /* Output the sum. */
        if (out != NULL) {
                u_int32_t c;
index 1476b579006d4e3d53b2d421cff904d0bfc2cfda..c18acc277eadbd7ce3af54456200c1b99c192115 100644 (file)
@@ -8,7 +8,7 @@ $Id$
 - temporarily removed the crypt16 stuff. I'm really paranoid about
   crypto stuff and exporting it, and there are a few too many 's-box'
   references in the code for my liking..
+
 * Wed Jun 30 1999 Steve Langasek <vorlon@netexpress.net>
 - further NIS+ fixes
 
@@ -50,6 +50,5 @@ $Id$
   is too lame to use it in real life)
 
 * Sun Mar 21 1999 Jan Rêkorajski <baggins@mimuw.edu.pl>
-- pam_unix_auth now correctly behave when user has NULL AUTHTOK 
+- pam_unix_auth now correctly behave when user has NULL AUTHTOK
 - pam_unix_auth returns PAM_PERM_DENIED when seteuid fails
-
index 9922d177e3acfe2451c3d07aad75244f4db25567..e10d1c5605ac5626335bc3a58a96843ae8e7ac68 100644 (file)
@@ -1,20 +1,20 @@
 /*
  * This function implements the "bigcrypt" algorithm specifically for
  * Linux-PAM.
- *  
+ *
  * This algorithm is algorithm 0 (default) shipped with the C2 secure
  * implementation of Digital UNIX.
- * 
+ *
  * Disclaimer: This work is not based on the source code to Digital
  * UNIX, nor am I connected to Digital Equipment Corp, in any way
  * other than as a customer. This code is based on published
  * interfaces and reasonable guesswork.
- * 
+ *
  * Description: The cleartext is divided into blocks of SEGMENT_SIZE=8
  * characters or less. Each block is encrypted using the standard UNIX
  * libc crypt function. The result of the encryption for one block
  * provides the salt for the suceeding block.
- * 
+ *
  * Restrictions: The buffer used to hold the encrypted result is
  * statically allocated. (see MAX_PASS_LEN below).  This is necessary,
  * as the returned pointer points to "static data that are overwritten
index 94d1c9da040dfcd82fe0a4f3b09432538a13fd66..7881db5dbc1841f33918e850c607885c3104b8a4 100644 (file)
@@ -107,7 +107,7 @@ void MD5Name(MD5Update)(struct MD5Context *ctx, unsigned const char *buf, unsign
 }
 
 /*
- * Final wrapup - pad to 64-byte boundary with the bit pattern 
+ * Final wrapup - pad to 64-byte boundary with the bit pattern
  * 1 0* (64-bit count of bits processed, MSB-first)
  */
 void MD5Name(MD5Final)(unsigned char digest[16], struct MD5Context *ctx)
index d9c4ea5583f42499b47d0e81880581be1d5429f1..1379d96cc8f38da21331df686dd7c856fab9049b 100644 (file)
@@ -206,7 +206,7 @@ pam_sm_setcred (pam_handle_t *pamh, int flags UNUSED,
           don't worry about an explicit check of argv. */
        if (pam_get_data(pamh, "unix_setcred_return", &pretval) == PAM_SUCCESS
            && pretval) {
-               retval = *(const int *)pretval;
+               retval = *(const int *)pretval;
                pam_set_data(pamh, "unix_setcred_return", NULL, NULL);
                D(("recovered data indicates that old retval was %d", retval));
        }
index 631df318ce5392fd7f501a645ebbd5c57d5b6da5..6ba2c2e6e452d532ccf83feaa9bb84dff34ca91f 100644 (file)
@@ -212,7 +212,7 @@ static int _unix_run_update_binary(pam_handle_t *pamh, unsigned int ctrl, const
            rlim.rlim_max = MAX_FD_NO;
          for (i=0; i < (int)rlim.rlim_max; i++) {
            if (i != STDIN_FILENO)
-                  close(i);
+               close(i);
          }
        }
 
@@ -262,7 +262,7 @@ static int _unix_run_update_binary(pam_handle_t *pamh, unsigned int ctrl, const
     } else {
        D(("fork failed"));
        close(fds[0]);
-       close(fds[1]);
+       close(fds[1]);
        retval = PAM_AUTH_ERR;
     }
 
index 778062e406e291c23993a6e9348a6a1226b3c694..72046ea0796c83f88a0df632e943ee720a3c8cd4 100644 (file)
  * 3. The name of the author may not be used to endorse or promote
  *    products derived from this software without specific prior
  *    written permission.
- * 
+ *
  * ALTERNATIVELY, this product may be distributed under the terms of
  * the GNU Public License, in which case the provisions of the GPL are
  * required INSTEAD OF the above restrictions.  (This clause is
  * necessary due to a potential bad interaction between the GPL and
  * the restrictions contained in a BSD-style copyright.)
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -140,4 +140,3 @@ struct pam_module _pam_unix_session_modstruct = {
     NULL,
 };
 #endif
-
index 5199a690794f91176747440d1a41e2815093f48a..089f4b836a96b6e82543bbcde5f5ce529d4ae27a 100644 (file)
@@ -89,17 +89,17 @@ verify_pwd_hash(const char *p, char *hash, unsigned int nullok)
        } else {
                if (!strncmp(hash, "$1$", 3)) {
                        pp = Goodcrypt_md5(p, hash);
-                       if (pp && strcmp(pp, hash) != 0) {
+                       if (pp && strcmp(pp, hash) != 0) {
                                _pam_delete(pp);
                                pp = Brokencrypt_md5(p, hash);
-                       }
+                       }
                } else if (*hash != '$' && hash_len >= 13) {
-                       pp = bigcrypt(p, hash);
-                       if (pp && hash_len == 13 && strlen(pp) > hash_len) {
+                       pp = bigcrypt(p, hash);
+                       if (pp && hash_len == 13 && strlen(pp) > hash_len) {
                                _pam_overwrite(pp + hash_len);
-                       }
+                       }
                } else {
-                       /*
+                       /*
                         * Ok, we don't know the crypt algorithm, but maybe
                         * libcrypt knows about it? We should try it.
                         */
@@ -448,12 +448,12 @@ unix_selinux_confined(void)
     char tempfile[]="/etc/.pwdXXXXXX";
 
     if (confined != -1)
-       return confined;
+       return confined;
 
     /* cannot be confined without SELinux enabled */
     if (!SELINUX_ENABLED){
-               confined = 0;
-               return confined;
+       confined = 0;
+       return confined;
     }
 
     /* let's try opening shadow read only */
@@ -633,7 +633,7 @@ save_old_password(pam_handle_t *pamh, const char *forwho, const char *oldpass,
            char *sptr = NULL;
            found = 1;
            if (howmany == 0)
-               continue;
+               continue;
            buf[strlen(buf) - 1] = '\0';
            s_luser = strtok_r(buf, ":", &sptr);
            s_uid = strtok_r(NULL, ":", &sptr);
index cc350e584d1f8391196ae060c0473e1bf1ae58aa..ab04535f485d51703a91216621b9bebf73342da4 100644 (file)
@@ -475,7 +475,7 @@ static int _unix_run_helper_binary(pam_handle_t *pamh, const char *passwd,
                 rlim.rlim_max = MAX_FD_NO;
          for (i=0; i < (int)rlim.rlim_max; i++) {
                if (i != STDIN_FILENO)
-                  close(i);
+                 close(i);
          }
        }
 
@@ -530,7 +530,7 @@ static int _unix_run_helper_binary(pam_handle_t *pamh, const char *passwd,
     } else {
        D(("fork failed"));
        close(fds[0]);
-       close(fds[1]);
+       close(fds[1]);
        retval = PAM_AUTH_ERR;
     }
 
index 702912d0e095e9d0773ea0fb5ca5adeaa8477245..6ea7ea511ce3f7965fdef544916c19ab85df4e68 100644 (file)
@@ -62,7 +62,7 @@ set_password(const char *forwho, const char *shadow, const char *remember)
     }
 
     if (lock_pwdf() != PAM_SUCCESS)
-       return PAM_AUTHTOK_LOCK_BUSY;
+       return PAM_AUTHTOK_LOCK_BUSY;
 
     pwd = getpwnam(forwho);
 
index b05cc6c68c174933c1592f3654a5a063ca5bf02e..77cc96085ac96c6ff6b3bad7b532d2f24393a773 100644 (file)
@@ -35,4 +35,3 @@ noinst_DATA = README pam_userdb.8
 README: pam_userdb.8.xml
 -include $(top_srcdir)/Make.xml.rules
 endif
-
index 224204b720c176c1b8ab27c7c4102263fffda195..06915c92357edfea7dc3d551b19560203790eeb2 100644 (file)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# this program creates a database in ARGV[1] from pairs given on 
+# this program creates a database in ARGV[1] from pairs given on
 # stdandard input
 #
 # $Id$
@@ -19,5 +19,3 @@ while (<STDIN>) {
   $lusers{$user} = $pass;
 }
 untie %lusers;
-
-
index 11b0d6bd220cde51d41f56f1c6ff267398edf439..c075c4b5825c19e4062dfff81bd4eeaa5c015dce 100644 (file)
@@ -145,7 +145,7 @@ _pam_parse (pam_handle_t *pamh, int argc, const char **argv,
  * return values:
  *      1  = User not found
  *      0  = OK
- *     -1  = Password incorrect
+ *     -1  = Password incorrect
  *     -2  = System error
  */
 static int
@@ -362,12 +362,12 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED,
      retval = pam_get_item(pamh, PAM_AUTHTOK, &password);
      if (retval != PAM_SUCCESS || password == NULL) {
         if ((ctrl & PAM_TRY_FPASS_ARG) != 0) {
-           /* Converse to obtain a password */
-           retval = obtain_authtok(pamh);
-           if (retval != PAM_SUCCESS) {
+           /* Converse to obtain a password */
+           retval = obtain_authtok(pamh);
+           if (retval != PAM_SUCCESS) {
                pam_syslog(pamh, LOG_ERR, "can not obtain password from user");
                return retval;
-           }
+           }
            retval = pam_get_item(pamh, PAM_AUTHTOK, &password);
        }
        if (retval != PAM_SUCCESS || password == NULL) {
index 4cd81baf4e7e78cb1de919598a3360ec76a5cd0e..3cd8fee03fa5dfe684bac6511db6488ac9c10ec3 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef _PAM_USERSDB_H
 #define _PAM_USERSDB_H
 /* $Id$ */
-   
+
 /* Header files */
 #include <security/pam_appl.h>
 
index f5ef83ad73181b67997cab9d6c4de491d2da4615..32677b4e6ae6ff6d1aad01638f1095e24db41db5 100644 (file)
@@ -4,4 +4,3 @@ Makefile.in
 *.gmo
 remove-potcdate.sed
 stamp-po
-
index e4770eeafbaffb9467c536a620786c50989701a4..3000055c94abca77dec8fe92240fd3d987187405 100644 (file)
@@ -45,4 +45,3 @@ int main(int argc, char **argv)
   return 0;
 #endif
 }
-
index 04fe3ef772ded3fa82451af9b6dfee42ae4cfc55..2cb34877828972f2878efd41ab2e7f5da5cbc00e 100644 (file)
@@ -1,3 +1,2 @@
 
 tst-pam_group1;tty1;tstpamgrp;Al0000-2400;tstpamgrpg
-
index f47ec34f66acb283028bf85b5e8d8c1568f9e37e..a70f2d9c9d6bbb7388a188020b631feebb5e2612 100644 (file)
@@ -3,4 +3,3 @@ auth     required       pam_access.so nodefgroup
 account  required       pam_permit.so
 password required       pam_permit.so
 session  required       pam_permit.so
-
index f47ec34f66acb283028bf85b5e8d8c1568f9e37e..a70f2d9c9d6bbb7388a188020b631feebb5e2612 100644 (file)
@@ -3,4 +3,3 @@ auth     required       pam_access.so nodefgroup
 account  required       pam_permit.so
 password required       pam_permit.so
 session  required       pam_permit.so
-
index f47ec34f66acb283028bf85b5e8d8c1568f9e37e..a70f2d9c9d6bbb7388a188020b631feebb5e2612 100644 (file)
@@ -3,4 +3,3 @@ auth     required       pam_access.so nodefgroup
 account  required       pam_permit.so
 password required       pam_permit.so
 session  required       pam_permit.so
-
index f47ec34f66acb283028bf85b5e8d8c1568f9e37e..a70f2d9c9d6bbb7388a188020b631feebb5e2612 100644 (file)
@@ -3,4 +3,3 @@ auth     required       pam_access.so nodefgroup
 account  required       pam_permit.so
 password required       pam_permit.so
 session  required       pam_permit.so
-
index afdbd6a4822454b0abd2dc9e0509d826f4bfce8e..0e7d8087f17d8a3cc0f45c6f9eb4c808e627270d 100644 (file)
@@ -60,14 +60,14 @@ main(int argc, char *argv[])
   if (argc > 2) {
     stack = argv[2];
   }
-  
+
   if (argc > 1) {
     if (strcmp (argv[1], "-d") == 0)
       debug = 1;
     else
       stack = argv[1];
   }
-    
+
 
   retval = pam_start(stack, user, &conv, &pamh);
   if (retval != PAM_SUCCESS)
index 8666f3f726455504ab22d6a4833f0c2fc7df30d1..c0ee80239445377b1002a8966bd05a7c6a586de7 100644 (file)
@@ -60,14 +60,14 @@ main(int argc, char *argv[])
   if (argc > 2) {
     stack = argv[2];
   }
-  
+
   if (argc > 1) {
     if (strcmp (argv[1], "-d") == 0)
       debug = 1;
     else
       stack = argv[1];
   }
-    
+
 
   retval = pam_start(stack, user, &conv, &pamh);
   if (retval != PAM_SUCCESS)
index 8172c5f23010560962afb5373fe6be007f6a1b0f..7f290abab5631c60415ac08b6d4916bed2000d42 100644 (file)
@@ -3,4 +3,3 @@ auth     optional       pam_debug.so auth=auth_err
 auth     sufficient     pam_debug.so auth=success
 auth     required      pam_debug.so auth=perm_denied
 account  required      pam_debug.so acct=acct_expired
-
index d78f3a6cb378fc8f1c0065a1455e80ef1651b4be..e75d0d1cdb2cd286688d61826bbce4a122deca3d 100644 (file)
@@ -4,4 +4,3 @@ auth     required       pam_permit.so
 account  required       pam_permit.so
 password required       pam_permit.so
 session  required       pam_permit.so
-
index 206ef1f791e0aecefbc1ed93e77fbcfa74dd6e9a..7b1771c401cce44d7ff55550fb21112c9d64b28d 100644 (file)
@@ -3,4 +3,3 @@ auth     required       pam_permit.so
 account  required       pam_permit.so
 password required       pam_permit.so
 session  required       pam_limits.so
-
index e096cc4f15b734a9b6f3fef8a9ddd3ab1e3b3f76..68e1b94211ffb93d1637aa3af121530e1bf8e1b5 100644 (file)
@@ -4,4 +4,3 @@ account  required       pam_permit.so
 password required      pam_pwhistory.so remember=10 retry=1
 password required      pam_unix.so     use_authtok md5
 session  required       pam_permit.so
-
index 6eab233ec17e224930dd11c0cbe5e4f69b63b6b8..8dfe1b82a400c7e569c06018c05c30d2e94e4552 100644 (file)
@@ -1,5 +1,5 @@
 #%PAM-1.0
-# Even if the substack succeeds with sufficient 
+# Even if the substack succeeds with sufficient
 # the whole stack should fail.
 auth     substack       tst-pam_substack1a
 auth     required      pam_debug.so auth=auth_err
index 1a2990c775bbed09a2bb46fe0065e315fc0211b3..6cd67b6a49f544143cd19b5c1ee50c8e2c79d85b 100644 (file)
@@ -3,4 +3,3 @@ auth     required       pam_unix.so
 account  required       pam_unix.so
 password required       pam_unix.so
 session  required       pam_unix.so
-
index 1a2990c775bbed09a2bb46fe0065e315fc0211b3..6cd67b6a49f544143cd19b5c1ee50c8e2c79d85b 100644 (file)
@@ -3,4 +3,3 @@ auth     required       pam_unix.so
 account  required       pam_unix.so
 password required       pam_unix.so
 session  required       pam_unix.so
-
index 1a2990c775bbed09a2bb46fe0065e315fc0211b3..6cd67b6a49f544143cd19b5c1ee50c8e2c79d85b 100644 (file)
@@ -3,4 +3,3 @@ auth     required       pam_unix.so
 account  required       pam_unix.so
 password required       pam_unix.so
 session  required       pam_unix.so
-
index 4dc414fce5fc0083b1cbaa70804e4e00676d328a..1affa8e1a54896173d9cbbcf0e783a190bd0df3e 100644 (file)
@@ -3,4 +3,3 @@ auth     required       pam_unix.so
 account  required       pam_unix.so
 password required       pam_unix.so debug
 session  required       pam_unix.so
-