2006-06-17 Thorsten Kukuk <kukuk@thkukuk.de>
+ * 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.
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);
}
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);
}
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
.\" Title: pam_succeed_if
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
-.\" 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)
.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
<para>
To emulate the behaviour of <emphasis>pam_wheel</emphasis>, except
there is no fallback to group 0:
- <programlisting>
- auth required pam_succeed_if.so quiet user ingroup wheel
- </programlisting>
</para>
+ <programlisting>
+auth required pam_succeed_if.so quiet user ingroup wheel
+ </programlisting>
<para>
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.
- <programlisting>
- type [default=1 success=ignore] pam_succeed_if.so quiet uid > 500
- type required othermodule.so arguments...
- </programlisting>
</para>
+ <programlisting>
+type [default=1 success=ignore] pam_succeed_if.so quiet uid > 500
+type required othermodule.so arguments...
+ </programlisting>
</refsect1>
<refsect1 id='pam_succeed_if-see_also'>
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;
}
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;
}
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;