Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37562314
en ru br
Репозитории ALT
5.1: 1.1.3-alt0.M51.1
4.1: 1.0.1-alt1
4.0: 0.99.6.3-alt2
3.0: 0.75-alt29
www.altlinux.org/Changes

Группа :: Система/Основа
Пакет: pam

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: pam-redhat-0.99.6.3-alt-log.patch
Скачать


diff -upk.orig Linux-PAM-0.80.orig/modules/pam_chroot/pam_chroot.c Linux-PAM-0.80/modules/pam_chroot/pam_chroot.c
diff -upk.orig Linux-PAM-0.80.orig/modules/pam_console/config.y Linux-PAM-0.80/modules/pam_console/config.y
--- Linux-PAM-0.80.orig/modules/pam_console/config.y	2005-07-14 13:13:44 +0000
+++ Linux-PAM-0.80/modules/pam_console/config.y	2005-09-08 20:33:35 +0000
@@ -25,9 +25,6 @@ static const char *consoleNameCache = NU
 static GHashTable *consoleHash = NULL;
 
 static void
-do_yyerror(const char *format, ...);
-
-static void
 empty_class(class *c);
 
 %}
@@ -280,16 +277,6 @@ reset_permissions(const char *consolenam
 /* local, static functions */
 
 static void
-do_yyerror(const char *format, ...) {
-  va_list ap;
-
-  va_start(ap, format);
-  openlog("pam_console", LOG_CONS|LOG_PID, LOG_AUTHPRIV);
-  vsyslog(LOG_PID|LOG_AUTHPRIV|LOG_ERR, format, ap);
-  va_end(ap);
-}
-
-static void
 empty_class(class *c) {
   g_free(c->name);
   c->name = NULL;
diff -upk.orig Linux-PAM-0.80.orig/modules/pam_console/pam_console.c Linux-PAM-0.80/modules/pam_console/pam_console.c
--- Linux-PAM-0.80.orig/modules/pam_console/pam_console.c	2005-07-14 13:13:44 +0000
+++ Linux-PAM-0.80/modules/pam_console/pam_console.c	2005-09-08 21:06:55 +0000
@@ -46,6 +46,7 @@
 #include <security/pam_modules.h>
 #include <security/_pam_macros.h>
 #include <security/_pam_modutil.h>
+#include <security/pam_ext.h>
 
 /* In order to avoid errors in pam_get_item(), we need a very
  * unfortunate cast.  This is a terrible design error in PAM
@@ -63,7 +64,7 @@ static int allow_nonroot_tty = 0;
 
 /* some syslogging */
 
-static void
+static void PAM_FORMAT((printf, 3, 4)) PAM_NONNULL((3))
 _pam_log(int err, int debug_p, const char *format, ...)
 {
     va_list args;
@@ -71,10 +72,8 @@ _pam_log(int err, int debug_p, const cha
     if (debug_p && !debug) return;
 
     va_start(args, format);
-    openlog("pam_console", LOG_CONS|LOG_PID, LOG_AUTHPRIV);
-    vsyslog(err, format, args);
+    pam_vsyslog(NULL, err, format, args);
     va_end(args);
-    closelog();
 }
 
 static void *
@@ -313,7 +312,7 @@ top:
 	     */
 	    _pam_log(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
diff -upk.orig Linux-PAM-0.80.orig/modules/pam_console/pam_console.h Linux-PAM-0.80/modules/pam_console/pam_console.h
--- Linux-PAM-0.80.orig/modules/pam_console/pam_console.h	2005-07-14 13:13:44 +0000
+++ Linux-PAM-0.80/modules/pam_console/pam_console.h	2005-09-08 21:06:12 +0000
@@ -8,7 +8,7 @@
 
 #define LOCKFILE "console.lock"
 
-static void
+static void PAM_FORMAT((printf, 3, 4)) PAM_NONNULL((3))
 _pam_log(int err, int debug_p, const char *format, ...);
 
 #endif /* _PAM_CONSOLE_H */
diff -upk.orig Linux-PAM-0.80.orig/modules/pam_console/pam_console_apply.c Linux-PAM-0.80/modules/pam_console/pam_console_apply.c
--- Linux-PAM-0.80.orig/modules/pam_console/pam_console_apply.c	2005-07-14 13:13:44 +0000
+++ Linux-PAM-0.80/modules/pam_console/pam_console_apply.c	2005-09-08 20:33:35 +0000
@@ -51,9 +51,7 @@ _pam_log(int err, int debug_p, const cha
 	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);
@@ -140,6 +138,9 @@ main(int argc, char **argv)
 		}
 	}
 
+	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]);
         }
--- Linux-PAM-0.80/modules/pam_timestamp/pam_timestamp.c.orig	2005-07-14 17:13:44 +0400
+++ Linux-PAM-0.80/modules/pam_timestamp/pam_timestamp.c	2005-09-09 02:56:16 +0400
@@ -56,6 +56,7 @@
 #include <time.h>
 #include <unistd.h>
 #include <utmp.h>
+#include <syslog.h>
 #include "hmacsha1.h"
 
 #include "../../_pam_aconf.h"
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin