Author: baggins                      Date: Fri Sep 14 16:41:55 2007 GMT
Module: pam                           Tag: HEAD
---- Log message:
- updates from upstream (FC)

---- Files affected:
pam/modules/pam_console:
   50-default.perms (1.1 -> 1.2) , console.handlers (1.1 -> 1.2) , 
console.perms (1.1 -> 1.2) , pam_console.c (1.8 -> 1.9) 

---- Diffs:

================================================================
Index: pam/modules/pam_console/50-default.perms
diff -u pam/modules/pam_console/50-default.perms:1.1 
pam/modules/pam_console/50-default.perms:1.2
--- pam/modules/pam_console/50-default.perms:1.1        Mon Feb  5 00:11:52 2007
+++ pam/modules/pam_console/50-default.perms    Fri Sep 14 18:41:49 2007
@@ -26,6 +26,7 @@
 <raw1394>=/dev/raw1394
 <irda>=/dev/ircomm*
 <dvb>=/dev/dvb/adapter*/*
+<firewire>=/dev/iidc* /dev/vendorfw* /dev/avc*
 
 # permission definitions
 <console>  0660 <floppy>     0660 root.floppy

================================================================
Index: pam/modules/pam_console/console.handlers
diff -u pam/modules/pam_console/console.handlers:1.1 
pam/modules/pam_console/console.handlers:1.2
--- pam/modules/pam_console/console.handlers:1.1        Mon Feb  5 00:11:52 2007
+++ pam/modules/pam_console/console.handlers    Fri Sep 14 18:41:49 2007
@@ -14,6 +14,6 @@
 # echo lock wait Locking console for user on tty
 # touch unlock wait /var/run/console-unlocked
 
-console consoledevs tty[0-9][0-9]* vc/[0-9][0-9]* :[0-9]\.[0-9] :[0-9]
+console consoledevs tty[0-9][0-9]* vc/[0-9][0-9]* :[0-9]+\.[0-9]+ :[0-9]+
 /sbin/pam_console_apply lock logfail wait -t tty -s
 /sbin/pam_console_apply unlock logfail wait -r -t tty -s

================================================================
Index: pam/modules/pam_console/console.perms
diff -u pam/modules/pam_console/console.perms:1.1 
pam/modules/pam_console/console.perms:1.2
--- pam/modules/pam_console/console.perms:1.1   Mon Feb  5 00:11:52 2007
+++ pam/modules/pam_console/console.perms       Fri Sep 14 18:41:50 2007
@@ -18,8 +18,8 @@
 # Rather a new file in the console.perms.d directory should be created.
 
 # file classes -- these are regular expressions
-<console>=tty[0-9][0-9]* vc/[0-9][0-9]* :[0-9]\.[0-9] :[0-9]
-<xconsole>=:[0-9]\.[0-9] :[0-9]
+<console>=tty[0-9][0-9]* vc/[0-9][0-9]* :[0-9]+\.[0-9]+ :[0-9]+
+<xconsole>=:[0-9]+\.[0-9]+ :[0-9]+
 
 # device classes -- see console.perms.d/50-default.perms
 # permission definitions -- see console.perms.d/50-default.perms

================================================================
Index: pam/modules/pam_console/pam_console.c
diff -u pam/modules/pam_console/pam_console.c:1.8 
pam/modules/pam_console/pam_console.c:1.9
--- pam/modules/pam_console/pam_console.c:1.8   Mon Feb  5 16:15:55 2007
+++ pam/modules/pam_console/pam_console.c       Fri Sep 14 18:41:50 2007
@@ -19,7 +19,7 @@
  *
  * /var/run/console/<username> is used for reference counting
  * and to make console authentication easy -- if it exists, then
- * <username> has console access.
+ * <username> is logged on console.
  *
  * A system startup script should remove /var/run/console/console.lock
  * and everything in /var/run/console/
@@ -561,7 +561,7 @@
    */
     int fd;
     int count = 0;
-    int err;
+    int err = PAM_SUCCESS;
     int delete_consolelock = 0;
     const char *username = NULL, *user_prompt;
     char *lockfile = NULL;
@@ -606,7 +606,8 @@
                _pam_log(pamh, LOG_ERR, FALSE,
                        "\"impossible\" fstat error on %s", consolelock);
                close(fd);
-               err = PAM_SESSION_ERR; goto return_error;
+               err = PAM_SESSION_ERR;
+               goto decrement;
            }
            consoleuser = _do_malloc(st.st_size+1);
            if (st.st_size) {
@@ -615,7 +616,7 @@
                            "\"impossible\" read error on %s", consolelock);
                    err = PAM_SESSION_ERR; 
                    close(fd);
-                   goto return_error;
+                   goto decrement;
                }
                consoleuser[st.st_size] = '\0';
            }
@@ -628,23 +629,19 @@
                 */
                console_run_handlers(pamh, FALSE, username, tty);
            }
-       } else {
-           /* didn't open file */
-           err = PAM_SESSION_ERR; 
-           goto return_error;
        }
     }
 
+decrement:
     count = use_count(pamh, lockfile, -1, 1);
     if (count < 1 && delete_consolelock) {
        if (unlink(consolelock)) {
            _pam_log(pamh, LOG_ERR, FALSE,
                     "\"impossible\" unlink error on %s", consolelock);
-           err = PAM_SESSION_ERR; goto return_error;
+           err = PAM_SESSION_ERR;
        }
     }
 
-    err = PAM_SUCCESS;
 return_error:
     if (lockfile) free(lockfile);
     if (consoleuser) free (consoleuser);
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pam/modules/pam_console/50-default.perms?r1=1.1&r2=1.2&f=u
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pam/modules/pam_console/console.handlers?r1=1.1&r2=1.2&f=u
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pam/modules/pam_console/console.perms?r1=1.1&r2=1.2&f=u
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pam/modules/pam_console/pam_console.c?r1=1.8&r2=1.9&f=u

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

Reply via email to