+2008-06-13 Nicolas François <nicolas.francois@centraliens.net>
+
+ * src/login.c: Ignore the return value of signal().
+ * src/login.c: Use a %lu format and cast group and user IDs to
+ unsigned long integers.
+ * src/login.c: Ignore return value of setlocale(),
+ bindtextdomain(), and textdomain().
+
2008-06-13 Nicolas François <nicolas.francois@centraliens.net>
* src/chage.c: Add the arguments' names in the functions
top:
/* only allow ALARM sec. for login */
- signal (SIGALRM, alarm_handler);
+ (void) signal (SIGALRM, alarm_handler);
timeout = getdef_num ("LOGIN_TIMEOUT", ALARM);
if (timeout > 0) {
alarm (timeout);
pw = getpwnam (username);
if (NULL != pw) {
snprintf (buf, sizeof (buf),
- "uid=%d", pw->pw_uid);
+ "uid=%lu",
+ (unsigned long) pw->pw_uid);
audit_log_user_message
(audit_fd, AUDIT_USER_LOGIN,
buf, hostname, NULL,
char buf[32];
audit_fd = audit_open ();
- snprintf (buf, sizeof (buf), "uid=%d", pwd->pw_uid);
+ snprintf (buf, sizeof (buf), "uid=%lu",
+ (unsigned long) pwd->pw_uid);
audit_log_user_message (audit_fd, AUDIT_USER_LOGIN,
buf, hostname, NULL, tty, 1);
close (audit_fd);
* We must fork before setuid() because we need to call
* pam_close_session() as root.
*/
- signal (SIGINT, SIG_IGN);
+ (void) signal (SIGINT, SIG_IGN);
child = fork ();
if (child < 0) {
/* error in fork() */
}
#endif
- setlocale (LC_ALL, "");
- bindtextdomain (PACKAGE, LOCALEDIR);
- textdomain (PACKAGE);
+ (void) setlocale (LC_ALL, "");
+ (void) bindtextdomain (PACKAGE, LOCALEDIR);
+ (void) textdomain (PACKAGE);
if (!hushed (&pwent)) {
addenv ("HUSHLOGIN=FALSE", NULL);
ttytype (tty);
}
- signal (SIGQUIT, SIG_DFL); /* default quit signal */
- signal (SIGTERM, SIG_DFL); /* default terminate signal */
- signal (SIGALRM, SIG_DFL); /* default alarm signal */
- signal (SIGHUP, SIG_DFL); /* added this. --marekm */
- signal (SIGINT, SIG_DFL); /* default interrupt signal */
+ (void) signal (SIGQUIT, SIG_DFL); /* default quit signal */
+ (void) signal (SIGTERM, SIG_DFL); /* default terminate signal */
+ (void) signal (SIGALRM, SIG_DFL); /* default alarm signal */
+ (void) signal (SIGHUP, SIG_DFL); /* added this. --marekm */
+ (void) signal (SIGINT, SIG_DFL); /* default interrupt signal */
endpwent (); /* stop access to password file */
endgrent (); /* stop access to group file */