From 97f5514b75745ee78428d0d3e46ffb7bc21d4f51 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Sat, 17 Jun 2006 16:44:58 +0000 Subject: [PATCH] Relevant BUGIDs: Purpose of commit: bugfix Commit summary: --------------- 2006-06-17 Thorsten Kukuk * examples/vpass.c: UID is unsigned on Linux. * modules/pam_exec/pam_exec.c: Likewise. * modules/pam_unix/pam_unix_acct.c: Likewise. * modules/pam_unix/pam_unix_sess.c: Likewise. * modules/pam_succeed_if/pam_succeed_if.8.xml: Fix syntax error. * modules/pam_succeed_if/pam_succeed_if.8: Regenerated. * modules/pam_succeed_if/README: Regenerated. --- ChangeLog | 9 +++++++++ examples/vpass.c | 2 +- modules/pam_exec/pam_exec.c | 4 ++-- modules/pam_succeed_if/README | 6 +++--- modules/pam_succeed_if/pam_succeed_if.8 | 16 +++++++--------- modules/pam_succeed_if/pam_succeed_if.8.xml | 14 +++++++------- modules/pam_unix/pam_unix_acct.c | 4 ++-- modules/pam_unix/pam_unix_sess.c | 4 ++-- modules/pam_userdb/pam_userdb.c | 2 +- 9 files changed, 34 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b7fb981..d63779b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2006-06-17 Thorsten Kukuk + * examples/vpass.c: UID is unsigned on Linux. + * modules/pam_exec/pam_exec.c: Likewise. + * modules/pam_unix/pam_unix_acct.c: Likewise. + * modules/pam_unix/pam_unix_sess.c: Likewise. + + * modules/pam_succeed_if/pam_succeed_if.8.xml: Fix syntax error. + * modules/pam_succeed_if/pam_succeed_if.8: Regenerated. + * modules/pam_succeed_if/README: Regenerated. + * modules/pam_limits/Makefile.am: Include Make.xml.rules. * modules/pam_limits/limits.conf.5: New, generated from xml file. * modules/pam_limits/limits.conf.5.xml: New. diff --git a/examples/vpass.c b/examples/vpass.c index 1925dd66..a54ec061 100644 --- a/examples/vpass.c +++ b/examples/vpass.c @@ -33,7 +33,7 @@ int main(void) if (pw) { user = pw->pw_name; } else { - fprintf(stderr, "Invalid userid: %d\n", uid); + fprintf(stderr, "Invalid userid: %lu\n", (unsigned long) uid); exit(1); } diff --git a/modules/pam_exec/pam_exec.c b/modules/pam_exec/pam_exec.c index 7bbaed21..e0c8da03 100644 --- a/modules/pam_exec/pam_exec.c +++ b/modules/pam_exec/pam_exec.c @@ -190,8 +190,8 @@ call_exec (pam_handle_t *pamh, int argc, const char **argv) if (setuid (geteuid ()) == -1) { int err = errno; - pam_syslog (pamh, LOG_ERR, "setuid(%d) failed: %m", - geteuid ()); + pam_syslog (pamh, LOG_ERR, "setuid(%lu) failed: %m", + (unsigned long) geteuid ()); exit (err); } diff --git a/modules/pam_succeed_if/README b/modules/pam_succeed_if/README index e2ef2edf..c8d2ceff 100644 --- a/modules/pam_succeed_if/README +++ b/modules/pam_succeed_if/README @@ -92,14 +92,14 @@ EXAMPLES To emulate the behaviour of pam_wheel, except there is no fallback to group 0: - auth required pam_succeed_if.so quiet user ingroup wheel +auth required pam_succeed_if.so quiet user ingroup wheel Given that the type matches, only loads the othermodule rule if the UID is over 500. Adjust the number after default to skip several rules. - type [default=1 success=ignore] pam_succeed_if.so quiet uid > 500 - type required othermodule.so arguments... +type [default=1 success=ignore] pam_succeed_if.so quiet uid > 500 +type required othermodule.so arguments... AUTHOR diff --git a/modules/pam_succeed_if/pam_succeed_if.8 b/modules/pam_succeed_if/pam_succeed_if.8 index 3b63034e..ee6007cd 100644 --- a/modules/pam_succeed_if/pam_succeed_if.8 +++ b/modules/pam_succeed_if/pam_succeed_if.8 @@ -1,11 +1,11 @@ .\" Title: pam_succeed_if .\" Author: .\" Generator: DocBook XSL Stylesheets v1.70.1 -.\" Date: 06/02/2006 +.\" Date: 06/17/2006 .\" Manual: Linux\-PAM .\" Source: Linux\-PAM .\" -.TH "PAM_SUCCEED_IF" "8" "06/02/2006" "Linux\-PAM" "Linux\-PAM" +.TH "PAM_SUCCEED_IF" "8" "06/17/2006" "Linux\-PAM" "Linux\-PAM" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) @@ -103,22 +103,20 @@ To emulate the behaviour of .sp .RS 3n .nf - auth required pam_succeed_if.so quiet user ingroup wheel - +auth required pam_succeed_if.so quiet user ingroup wheel + .fi .RE -.sp .PP Given that the type matches, only loads the othermodule rule if the UID is over 500. Adjust the number after default to skip several rules. .sp .RS 3n .nf - type [default=1 success=ignore] pam_succeed_if.so quiet uid > 500 - type required othermodule.so arguments... - +type [default=1 success=ignore] pam_succeed_if.so quiet uid > 500 +type required othermodule.so arguments... + .fi .RE -.sp .SH "SEE ALSO" .PP diff --git a/modules/pam_succeed_if/pam_succeed_if.8.xml b/modules/pam_succeed_if/pam_succeed_if.8.xml index d6f26ce9..5df72628 100644 --- a/modules/pam_succeed_if/pam_succeed_if.8.xml +++ b/modules/pam_succeed_if/pam_succeed_if.8.xml @@ -230,20 +230,20 @@ To emulate the behaviour of pam_wheel, except there is no fallback to group 0: - - auth required pam_succeed_if.so quiet user ingroup wheel - + +auth required pam_succeed_if.so quiet user ingroup wheel + Given that the type matches, only loads the othermodule rule if the UID is over 500. Adjust the number after default to skip several rules. - - type [default=1 success=ignore] pam_succeed_if.so quiet uid > 500 - type required othermodule.so arguments... - + +type [default=1 success=ignore] pam_succeed_if.so quiet uid > 500 +type required othermodule.so arguments... + diff --git a/modules/pam_unix/pam_unix_acct.c b/modules/pam_unix/pam_unix_acct.c index 5559fd2c..6894cd09 100644 --- a/modules/pam_unix/pam_unix_acct.c +++ b/modules/pam_unix/pam_unix_acct.c @@ -209,8 +209,8 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t * pamh, int flags, D(("user = `%s'", uname)); if (retval != PAM_SUCCESS || uname == NULL) { pam_syslog(pamh, LOG_ALERT, - "could not identify user (from uid=%d)", - getuid()); + "could not identify user (from uid=%lu)", + (unsigned long int)getuid()); return PAM_USER_UNKNOWN; } diff --git a/modules/pam_unix/pam_unix_sess.c b/modules/pam_unix/pam_unix_sess.c index b0e40384..d8d96687 100644 --- a/modules/pam_unix/pam_unix_sess.c +++ b/modules/pam_unix/pam_unix_sess.c @@ -92,8 +92,8 @@ PAM_EXTERN int pam_sm_open_session(pam_handle_t * pamh, int flags, if (login_name == NULL) { login_name = ""; } - pam_syslog(pamh, LOG_INFO, "session opened for user %s by %s(uid=%d)", - user_name, login_name, getuid()); + pam_syslog(pamh, LOG_INFO, "session opened for user %s by %s(uid=%lu)", + user_name, login_name, (unsigned long)getuid()); return PAM_SUCCESS; } diff --git a/modules/pam_userdb/pam_userdb.c b/modules/pam_userdb/pam_userdb.c index fce5f3dd..a796b15e 100644 --- a/modules/pam_userdb/pam_userdb.c +++ b/modules/pam_userdb/pam_userdb.c @@ -457,7 +457,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags UNUSED, pam_syslog(pamh, LOG_ERR, "internal module error (retval = %d, user = `%s'", retval, username); - return PAM_SERVICE_ERR; + return PAM_SERVICE_ERR; } return PAM_SUCCESS; -- 2.40.0