Author: baggins                      Date: Mon Nov  9 12:03:18 2009 GMT
Module: pam                           Tag: HEAD
---- Log message:
- sync with fedora (cosmetics mainly)

---- Files affected:
pam/modules/pam_console:
   chmod.c (1.2 -> 1.3) , pam_console.c (1.9 -> 1.10) , pam_console.h (1.1 -> 
1.2) , pam_console_apply.c (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: pam/modules/pam_console/chmod.c
diff -u pam/modules/pam_console/chmod.c:1.2 pam/modules/pam_console/chmod.c:1.3
--- pam/modules/pam_console/chmod.c:1.2 Mon Feb  5 16:15:55 2007
+++ pam/modules/pam_console/chmod.c     Mon Nov  9 13:03:13 2009
@@ -85,7 +85,7 @@
 
 static int
 change_file (const char *file, const struct mode_change *changes,
-            const int deref_symlink UNUSED, uid_t user, gid_t group)
+            const int deref_symlink, uid_t user, gid_t group)
 {
   struct stat file_stats;
   unsigned short newmode;
@@ -177,7 +177,7 @@
 
 
 static int
-glob_errfn(const char *pathname UNUSED, int theerr UNUSED) {
+glob_errfn(const char *pathname, int theerr) {
   /* silently ignore inaccessible files */
   return 0;
 }
@@ -205,7 +205,7 @@
   glob_t result;
   char *filename = NULL;
   int flags = GLOB_NOCHECK;
-  unsigned int i, rc;
+  int i, rc;
 
   changes = mode_compile (mode,
                          MODE_MASK_EQUALS | MODE_MASK_PLUS | MODE_MASK_MINUS);

================================================================
Index: pam/modules/pam_console/pam_console.c
diff -u pam/modules/pam_console/pam_console.c:1.9 
pam/modules/pam_console/pam_console.c:1.10
--- pam/modules/pam_console/pam_console.c:1.9   Fri Sep 14 18:41:50 2007
+++ pam/modules/pam_console/pam_console.c       Mon Nov  9 13:03:13 2009
@@ -307,7 +307,7 @@
             */
            _pam_log(pamh, LOG_ERR, FALSE,
                    "ignoring stale lock on file %s by process %d",
-                   lockinfo.l_pid, filename);
+                   filename, lockinfo.l_pid);
        }
 
        /* it is possible at this point that the file has been removed
@@ -378,7 +378,8 @@
 }
 
 PAM_EXTERN int
-pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED, int argc, const char 
**argv)
+pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED,
+                   int argc, const char **argv)
 {
   /* getuid() must return an id that maps to a username as a filename in
    * /var/run/console/
@@ -472,13 +473,14 @@
 
 PAM_EXTERN int
 pam_sm_setcred(pam_handle_t *pamh UNUSED, int flags UNUSED,
-               int argc UNUSED, const char **argv UNUSED)
+              int argc UNUSED, const char **argv UNUSED)
 {
     return PAM_SUCCESS;
 }
 
 PAM_EXTERN int
-pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED, int argc, const char 
**argv)
+pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED,
+                   int argc, const char **argv)
 {
   /* Create /var/run/console/console.lock if it does not exist
    * Create /var/run/console/<username> if it does not exist
@@ -548,7 +550,8 @@
 }
 
 PAM_EXTERN int
-pam_sm_close_session(pam_handle_t *pamh, int flags UNUSED, int argc, const 
char **argv)
+pam_sm_close_session(pam_handle_t *pamh, int flags UNUSED,
+                    int argc, const char **argv)
 {
   /* Get /var/run/console/<username> use count, leave it locked
    * If use count is now 1:

================================================================
Index: pam/modules/pam_console/pam_console.h
diff -u pam/modules/pam_console/pam_console.h:1.1 
pam/modules/pam_console/pam_console.h:1.2
--- pam/modules/pam_console/pam_console.h:1.1   Mon Feb  5 00:11:52 2007
+++ pam/modules/pam_console/pam_console.h       Mon Nov  9 13:03:13 2009
@@ -16,7 +16,7 @@
 #define TRUE (!FALSE)
 #endif
 
-void
+void PAM_FORMAT((printf, 4, 5)) PAM_NONNULL((4))
 _pam_log(pam_handle_t *pamh, int err, int debug_p, const char *format, ...);
 
 void

================================================================
Index: pam/modules/pam_console/pam_console_apply.c
diff -u pam/modules/pam_console/pam_console_apply.c:1.2 
pam/modules/pam_console/pam_console_apply.c:1.3
--- pam/modules/pam_console/pam_console_apply.c:1.2     Mon Feb  5 16:15:55 2007
+++ pam/modules/pam_console/pam_console_apply.c Mon Nov  9 13:03:13 2009
@@ -35,15 +35,13 @@
 static int syslogging = 0;
 
 void
-_pam_log(pam_handle_t *pamh UNUSED, int err, int debug_p, const char *format, 
...)
+_pam_log(pam_handle_t *pamh, int err, int debug_p, const char *format, ...)
 {
        va_list args;
        if (debug_p && !debug) return;
        va_start(args, format);
        if (syslogging) {
-               openlog("pam_console_apply", LOG_CONS|LOG_PID, LOG_AUTHPRIV);
                vsyslog(err, format, args);
-               closelog();
        }
        else {
                vfprintf(stderr, format, args);
@@ -52,12 +50,6 @@
        va_end(args);
 }
 
-static int
-pf_glob_errorfn(const char *epath UNUSED, int eerrno UNUSED)
-{
-       return 0;
-}
-
 static void
 parse_files(void)
 {
@@ -73,11 +65,10 @@
        on system locale */
        oldlocale = setlocale(LC_COLLATE, "C");
 
-       rc = glob(PERMS_GLOB, GLOB_NOCHECK, pf_glob_errorfn, &globbuf);
+       rc = glob(PERMS_GLOB, GLOB_NOCHECK, NULL, &globbuf);
        setlocale(LC_COLLATE, oldlocale);
-       if (rc == GLOB_NOSPACE) {
+       if (rc)
                return;
-       }
 
        for (i = 0; globbuf.gl_pathv[i] != NULL; i++) {
                parse_file(globbuf.gl_pathv[i]);
@@ -129,6 +120,9 @@
                                  exit(1);
                }
        }
+
+       if (syslogging)
+               openlog("pam_console_apply", LOG_CONS|LOG_PID, LOG_AUTH);
 
        for (i = argc-1; i >= optind;  i--) {
                files = g_slist_prepend(files, argv[i]);
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pam/modules/pam_console/chmod.c?r1=1.2&r2=1.3&f=u
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pam/modules/pam_console/pam_console.c?r1=1.9&r2=1.10&f=u
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pam/modules/pam_console/pam_console.h?r1=1.1&r2=1.2&f=u
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pam/modules/pam_console/pam_console_apply.c?r1=1.2&r2=1.3&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to