]> granicus.if.org Git - shadow/log
shadow
16 years ago * lib/defines.h: Make sure the booleans are defined before using
nekral-guest [Sat, 26 Jul 2008 16:13:29 +0000 (16:13 +0000)]
* lib/defines.h: Make sure the booleans are defined before using
them.

16 years ago2008-07-26 Nicolas François <nicolas.francois@centraliens.net>
nekral-guest [Sat, 26 Jul 2008 16:11:49 +0000 (16:11 +0000)]
2008-07-26  Nicolas François  <nicolas.francois@centraliens.net>

* src/groupmems.c: Added Prog global variable to indicate the name
of the program in error messages.

2008-07-22  Lukáš Kuklínek  <lkukline@redhat.com>

* NEWS, src/groupmems.c: Check if the user added to group actually
exist. RedHat bug #455603
* NEWS, src/groupmems.c: Check if the group exists in the group
local database (/etc/group). RedHat bug #456088

16 years ago * lib/prototypes.h: Fix getrange prototype.
nekral-guest [Mon, 21 Jul 2008 22:45:49 +0000 (22:45 +0000)]
* lib/prototypes.h: Fix getrange prototype.

16 years agoRe-indent.
nekral-guest [Mon, 21 Jul 2008 22:45:08 +0000 (22:45 +0000)]
Re-indent.

16 years ago * README, NEWS, configure.in, lib/pam_defs.h, src/login.c: Add
nekral-guest [Mon, 21 Jul 2008 21:14:06 +0000 (21:14 +0000)]
* README, NEWS, configure.in, lib/pam_defs.h, src/login.c: Add
support for OpenPAM.

16 years ago * src/chage.c: Ignore the return value of pam_end() before exiting.
nekral-guest [Fri, 11 Jul 2008 22:31:43 +0000 (22:31 +0000)]
* src/chage.c: Ignore the return value of pam_end() before exiting.
* src/chage.c: Ignore return values of strftime(), snprintf(),
puts(), printf(), and fputs().
* src/chage.c: Check the return value of asctime().

16 years ago * lib/gshadow.c: Avoid assignments in comparison.
nekral-guest [Fri, 11 Jul 2008 22:23:42 +0000 (22:23 +0000)]
* lib/gshadow.c: Avoid assignments in comparison.

16 years agoRe-inject the changes from 4.1.2.1.
nekral-guest [Fri, 11 Jul 2008 22:20:43 +0000 (22:20 +0000)]
Re-inject the changes from 4.1.2.1.

16 years agoFix typo.
nekral-guest [Fri, 11 Jul 2008 22:04:02 +0000 (22:04 +0000)]
Fix typo.

16 years ago * src/usermod.c: Do not call usr_update() if it will have no
nekral-guest [Fri, 11 Jul 2008 21:50:05 +0000 (21:50 +0000)]
* src/usermod.c: Do not call usr_update() if it will have no
effects. This avoid checking if the user exists in the local passwd
file if not necessary, and thus allow to add LDAP users to local
groups. (The user is already checked against the system
configuration with getpwnam()). Thanks to Dan Kopecek.

16 years ago * src/usermod.c: Split update_files() into update_lastlog() and
nekral-guest [Fri, 11 Jul 2008 20:52:44 +0000 (20:52 +0000)]
* src/usermod.c: Split update_files() into update_lastlog() and
update_faillog(). Report errors (but don't fail) if the file
exist, but open(), lseek(), read(), write(), or close() fails.
* src/usermod.c: Add brackets and parenthesis.
* src/usermod.c: Ignore the return value of pam_end() before
exiting.
* src/usermod.c: Ignore the return value of strftime(),
snprintf(), and puts().
* src/usermod.c: Check the return value of gmtime() and asctime(),
and output the raw time_t on failures.

16 years ago * libmisc/setugid.c: Add brackets.
nekral-guest [Fri, 11 Jul 2008 20:23:07 +0000 (20:23 +0000)]
* libmisc/setugid.c: Add brackets.

16 years agoRe-indent.
nekral-guest [Tue, 17 Jun 2008 22:00:36 +0000 (22:00 +0000)]
Re-indent.

16 years ago * libmisc/env.c: Avoid implicit conversion of pointers / chars to
nekral-guest [Tue, 17 Jun 2008 21:58:46 +0000 (21:58 +0000)]
* libmisc/env.c: Avoid implicit conversion of pointers / chars to
booleans.
* libmisc/env.c: Add brackets and parenthesis.
* libmisc/env.c: Ignore the return value of puts() and fputs().
* libmisc/env.c: Avoid multi-statements lines.

16 years agoRe-indent.
nekral-guest [Tue, 17 Jun 2008 21:17:45 +0000 (21:17 +0000)]
Re-indent.

16 years ago * libmisc/utmp.c: Avoid implicit conversion of pointers / chars to
nekral-guest [Tue, 17 Jun 2008 21:13:30 +0000 (21:13 +0000)]
* libmisc/utmp.c: Avoid implicit conversion of pointers / chars to
booleans.
* libmisc/utmp.c: Add brackets and parenthesis.
* libmisc/utmp.c: Exit with the EXIT_FAILURE status code in case
of failure.
* libmisc/utmp.c: Avoid assignments in comparisons.
* lib/prototypes.h, libmisc/utmp.c: Change setutmp()'s prototype
to return an int because pututline() and pututxline() may fail.

16 years ago * libmisc/audit_help.c: Added one string for translation.
nekral-guest [Tue, 17 Jun 2008 20:52:19 +0000 (20:52 +0000)]
* libmisc/audit_help.c: Added one string for translation.
* po/POTFILES.in: Added libmisc/audit_help.c,
libmisc/find_new_gid.c, libmisc/find_new_uid.c, libmisc/getlong.c,
libmisc/getrange.c, libmisc/xgetXXbyYY.c, and libmisc/yesno.c.
Removed libmisc/find_new_ids.c

16 years ago * src/useradd.c: If the faillog file exist, warn in case of
nekral-guest [Sun, 15 Jun 2008 22:25:51 +0000 (22:25 +0000)]
* src/useradd.c: If the faillog file exist, warn in case of
failure when open(), lssek(), write() or close() fails when the
new user's faillog entry is reset.
* src/useradd.c: Ditto for the lastlog entry.

16 years ago * libmisc/limits.c: Add brackets and parenthesis.
nekral-guest [Sun, 15 Jun 2008 21:59:41 +0000 (21:59 +0000)]
* libmisc/limits.c: Add brackets and parenthesis.
* libmisc/limits.c: Avoid implicit conversion of pointers /
integers to booleans.
* libmisc/limits.c: Ignore the return value of umask(). We will
never return to the original umask.
* libmisc/limits.c: Avoid multi-statements lines.
* libmisc/limits.c: Added default to a switch(). Report invalid
limit strings to syslog.
* libmisc/limits.c: Ignore the return value of fclose().
/etc/limits is open read-only.
* libmisc/limits.c: Ignore the return value of fputs() and
sleep().
* libmisc/limits.c: Check the return value of nice() and
set_filesize_limit(), and report errors to syslog.

* libmisc/ulimit.c, lib/prototypes.h: Return failures of
set_filesize_limit(). Change the prototype to return an int
instead of void.

16 years ago * libmisc/failure.c: Try to close the open file if a failure
nekral-guest [Sun, 15 Jun 2008 19:16:34 +0000 (19:16 +0000)]
* libmisc/failure.c: Try to close the open file if a failure
occured during lseek(), read() or write().

16 years ago * libmisc/log.c: Check return values. If lseek() failed, avoid
nekral-guest [Sun, 15 Jun 2008 19:15:15 +0000 (19:15 +0000)]
* libmisc/log.c: Check return values. If lseek() failed, avoid
reading or writing at an unspecified location. Log to syslog in
case of failure.
* libmisc/log.c: Use the right casts.

16 years ago * libmisc/find_new_ids.c, libmisc/find_new_gid.c,
nekral-guest [Sun, 15 Jun 2008 18:33:52 +0000 (18:33 +0000)]
* libmisc/find_new_ids.c, libmisc/find_new_gid.c,
libmisc/find_new_uid.c, libmisc/Makefile.am, lib/prototypes.h:
Split find_new_ids.c into find_new_gid.c and find_new_uid.c to
ease the description of login.defs variables in the different
tools.

16 years ago * libmisc/failure.c: Ignore the return value of strftime() and
nekral-guest [Sun, 15 Jun 2008 00:01:46 +0000 (00:01 +0000)]
* libmisc/failure.c: Ignore the return value of strftime() and
printf().
* libmisc/failure.c: Fix syslog call. The UID is not available.
User the username specified in the utmp/utmpx entry.

16 years ago * lib/defines.h: Avoid implicit conversion of pointers to
nekral-guest [Sat, 14 Jun 2008 23:41:38 +0000 (23:41 +0000)]
* lib/defines.h: Avoid implicit conversion of pointers to
booleans.
* lib/defines.h: Ignore return values of setlocale() except the
first call.
* lib/defines.h: Fix a splint observer warning by using an
intermediate variable (old_locale).

16 years ago * libmisc/failure.c: Check return values. If lseek() failed, avoid
nekral-guest [Sat, 14 Jun 2008 23:38:43 +0000 (23:38 +0000)]
* libmisc/failure.c: Check return values. If lseek() failed, avoid
reading or writing at an unspecified location. Log to syslog in
case of failure when reading a faillog entry or writing in
faillog or btmp.
* libmisc/failure.c: Check if the file exist before opening it.
* libmisc/failure.c: Log failures of open() and close() when
necessary.

16 years ago * lib/prototypes.h: Add the getrange() prototype.
nekral-guest [Sat, 14 Jun 2008 21:11:19 +0000 (21:11 +0000)]
* lib/prototypes.h: Add the getrange() prototype.
* lib/prototypes.h: Fix the valid_field() prototype (does not
return an bool).
* lib/prototypes.h: Fix the valid() prototype (it does return a
bool).

16 years ago * lib/getdef.c: Fix the getdef_ulong() prototype.
nekral-guest [Sat, 14 Jun 2008 21:09:33 +0000 (21:09 +0000)]
* lib/getdef.c: Fix the getdef_ulong() prototype.
* lib/getdef.h: Fix the getdef_ulong() prototype.

16 years ago * src/lastlog.c: Use getrange to parse the range of users.
nekral-guest [Sat, 14 Jun 2008 21:06:53 +0000 (21:06 +0000)]
* src/lastlog.c: Use getrange to parse the range of users.
* src/lastlog.c: umin and umax do not need to be signed long. Use
an unsigned long which might be needed to parse a GID or UID. Add
the has_umin and has_umax to replace the -1 values.
* src/lastlog.c: Cast dates to time_t.
* src/lastlog.c: Prefix lastlog errors with "lastlog: ".

16 years ago * libmisc/getlong.c: Reset errno before calling strtol().
nekral-guest [Sat, 14 Jun 2008 21:02:52 +0000 (21:02 +0000)]
* libmisc/getlong.c: Reset errno before calling strtol().
Otherwise, errno could be already set to ERANGE.

16 years ago * libmisc/Makefile.am, libmisc/getrange.c: Added function to parse
nekral-guest [Sat, 14 Jun 2008 21:01:11 +0000 (21:01 +0000)]
* libmisc/Makefile.am, libmisc/getrange.c: Added function to parse
a range (useful for lastlog).

16 years ago * src/chsh.c: <signal.h> is not needed.
nekral-guest [Sat, 14 Jun 2008 15:03:58 +0000 (15:03 +0000)]
* src/chsh.c: <signal.h> is not needed.

16 years ago * lib/prototypes.h: Define AUDIT_NO_ID to (unsigned int) -1. This
nekral-guest [Fri, 13 Jun 2008 21:57:47 +0000 (21:57 +0000)]
* lib/prototypes.h: Define AUDIT_NO_ID to (unsigned int) -1. This
value should be used when the ID should not be considered.
* lib/prototypes.h: Fix the prototype of do_rlogin() according to
earlier changes.

16 years ago * lib/shadow.c: Use SHADOW_SP_FLAG_UNSET for the initial
nekral-guest [Fri, 13 Jun 2008 21:55:51 +0000 (21:55 +0000)]
* lib/shadow.c: Use SHADOW_SP_FLAG_UNSET for the initial
value of spwd.sp_flag.
* lib/shadow.c: Add brackets.
* lib/shadow.c: Avoid implicit conversion of pointers to
booleans.
* lib/shadow.c: The size argument of fgets is an int, not a
size_t.

16 years ago * lib/commonio.c: len should be typed ssize_t as it is the return
nekral-guest [Fri, 13 Jun 2008 21:53:41 +0000 (21:53 +0000)]
* lib/commonio.c: len should be typed ssize_t as it is the return
of read(), and is compared to 0. Cast to size_t when necessary.

16 years ago * libmisc/find_new_ids.c: Use getdef_ulong to retrieve UIDs/GIDs
nekral-guest [Fri, 13 Jun 2008 21:49:57 +0000 (21:49 +0000)]
* libmisc/find_new_ids.c: Use getdef_ulong to retrieve UIDs/GIDs
from login.defs. Type constants to long integers.

16 years ago * lib/gshadow.c: Use a bool when possible instead of int integers.
nekral-guest [Fri, 13 Jun 2008 21:45:47 +0000 (21:45 +0000)]
* lib/gshadow.c: Use a bool when possible instead of int integers.
* lib/gshadow.c: Remove __setsgNIS() -never used).
* lib/gshadow.c: Avoid multi-statements lines.
* lib/gshadow.c: Avoid assignments in comparisons.
* lib/gshadow.c: ptr[nelem] is a string. Initialize it to NULL
instead of '\0'.
* lib/gshadow.c: Add brackets and parenthesis.
* lib/gshadow.c: The size argument of strncpy is a size_t and the
size argument of fgets is an int.

16 years ago * lib/groupio.c: Add brackets.
nekral-guest [Fri, 13 Jun 2008 21:39:24 +0000 (21:39 +0000)]
* lib/groupio.c: Add brackets.
* lib/groupio.c: Make sure malloc receives a size_t.
* lib/groupio.c: Avoid multi-statements lines.

16 years ago * lib/sgetspent.c: Use SHADOW_SP_FLAG_UNSET for the initial
nekral-guest [Fri, 13 Jun 2008 21:36:41 +0000 (21:36 +0000)]
* lib/sgetspent.c: Use SHADOW_SP_FLAG_UNSET for the initial
value of spwd.sp_flag.

16 years ago * lib/getdef.h, lib/getdef.c: Add getdef_ulong().
nekral-guest [Fri, 13 Jun 2008 21:35:22 +0000 (21:35 +0000)]
* lib/getdef.h, lib/getdef.c: Add getdef_ulong().
* lib/getdef.c: Added TODOs because of lack of error checking.
* lib/getdef.c: The size argument of fgets is an int, not a
size_t.
* lib/getdef.c: Avoid multi-statements lines.

16 years ago * src/id.c: Make sure malloc receives a size_t.
nekral-guest [Fri, 13 Jun 2008 21:31:23 +0000 (21:31 +0000)]
* src/id.c: Make sure malloc receives a size_t.
* src/id.c: Use a %lu format and cast group and user IDs to
unsigned long integers.

16 years ago * src/sulogin.c: Ignore the return value of signal().
nekral-guest [Fri, 13 Jun 2008 21:30:09 +0000 (21:30 +0000)]
* src/sulogin.c: Ignore the return value of signal().

16 years ago * src/groups.c: sys_ngroups is only used when HAVE_GETGROUPS is
nekral-guest [Fri, 13 Jun 2008 21:29:13 +0000 (21:29 +0000)]
* src/groups.c: sys_ngroups is only used when HAVE_GETGROUPS is
defined.

16 years ago * src/faillog.c: Ignore return value of time() when use with a
nekral-guest [Fri, 13 Jun 2008 21:28:11 +0000 (21:28 +0000)]
* src/faillog.c: Ignore return value of time() when use with a
non NULL argument.
* src/faillog.c: Use a %lu format and cast number of days to
unsigned long integers.
* src/faillog.c: Cast dates to time_t.

16 years ago * src/login.c: Ignore the return value of signal().
nekral-guest [Fri, 13 Jun 2008 21:25:15 +0000 (21:25 +0000)]
* 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().

16 years ago * src/chage.c: Add the arguments' names in the functions
nekral-guest [Fri, 13 Jun 2008 21:23:09 +0000 (21:23 +0000)]
* src/chage.c: Add the arguments' names in the functions
prototypes.
* src/chage.c: The ID argument of audit_logger is an unsigned
int. Use AUDIT_NO_ID instead of -1.
* src/chage.c: print_date() received a time_t.
* src/chage.c: Use SHADOW_SP_FLAG_UNSET for the initial
value of spwent.sp_flag.

16 years ago * src/groupadd.c: The ID argument of audit_logger is an unsigned
nekral-guest [Fri, 13 Jun 2008 21:19:07 +0000 (21:19 +0000)]
* src/groupadd.c: The ID argument of audit_logger is an unsigned
int. Use AUDIT_NO_ID instead of -1.
* src/groupadd.c: Cast the parsed GID/UID to a gid_t/uid_t.

16 years ago * src/pwck.c: Use a %lu format and cast group and user IDs to
nekral-guest [Fri, 13 Jun 2008 21:16:01 +0000 (21:16 +0000)]
* src/pwck.c: Use a %lu format and cast group and user IDs to
unsigned long integers.
* src/pwck.c: Cast number of days to a long integer.
* src/pwck.c: Use the SCALE macro instead of (24L * 3600L)
for the values to be set in /etc/shadow.
* src/pwck.c: Use SHADOW_SP_FLAG_UNSET for the initial
value of spent.sp_flag.

16 years ago * src/passwd.c: Ignore return value of time() when use with a
nekral-guest [Fri, 13 Jun 2008 21:09:14 +0000 (21:09 +0000)]
* src/passwd.c: Ignore return value of time() when use with a
non NULL argument.
* src/passwd.c: Cast number of days to a long integer.

16 years ago * src/groupmod.c: The ID argument of audit_logger is an unsigned
nekral-guest [Fri, 13 Jun 2008 21:08:06 +0000 (21:08 +0000)]
* src/groupmod.c: The ID argument of audit_logger is an unsigned
int. Use AUDIT_NO_ID instead of -1.
* src/groupmod.c:  Use a %lu format and cast group and user IDs to
unsigned long integers.
* src/groupmod.c: Cast the parsed GID/UID to a gid_t/uid_t.

16 years ago * src/useradd.c: The ID argument of audit_logger is an unsigned
nekral-guest [Fri, 13 Jun 2008 21:06:04 +0000 (21:06 +0000)]
* src/useradd.c: The ID argument of audit_logger is an unsigned
int. Use AUDIT_NO_ID instead of -1.
* src/useradd.c: Cast the parsed GID/UID to a gid_t/uid_t.
* src/useradd.c: The size argument of fgets is an int, not a
size_t.
* src/useradd.c: Cast number of days to a long integer.
* src/useradd.c: Use SHADOW_SP_FLAG_UNSET for the initial
value of spent.sp_flag.
* src/useradd.c: Use a %lu format and cast group and user IDs to
unsigned long integers.

16 years agoFix typo.
nekral-guest [Fri, 13 Jun 2008 21:02:26 +0000 (21:02 +0000)]
Fix typo.

16 years ago * src/su.c: fork() and waitpid() return a pid_t, not an int.
nekral-guest [Fri, 13 Jun 2008 21:02:07 +0000 (21:02 +0000)]
* src/su.c: fork() and waitpid() return a pid_t, not an int.
* src/su.c: Add brackets and parenthesis.
* src/su.c: Ignore the return value of signal().

16 years ago * src/groupdel.c: The ID argument of audit_logger is an unsigned
nekral-guest [Fri, 13 Jun 2008 20:59:04 +0000 (20:59 +0000)]
* src/groupdel.c: The ID argument of audit_logger is an unsigned
int. Use AUDIT_NO_ID instead of -1.

16 years ago * src/expiry.c: Ignore the return value of signal().
nekral-guest [Fri, 13 Jun 2008 20:57:20 +0000 (20:57 +0000)]
* src/expiry.c: Ignore the return value of signal().

16 years ago * src/newusers.c: Fix the check for GID/UID validity.
nekral-guest [Fri, 13 Jun 2008 20:56:44 +0000 (20:56 +0000)]
* src/newusers.c: Fix the check for GID/UID validity.
* src/newusers.c: Comment why we use both getgrgid() and
gr_locate_gid().
* src/newusers.c: Cast the parsed GID/UID to a gid_t/uid_t.
* src/newusers.c: Cast the number of days to a long integer.
* src/newusers.c: Use SHADOW_SP_FLAG_UNSET for the initial
value of spent.sp_flag.
* src/newusers.c: The size argument of fgets is an int, not a
size_t.

16 years ago * src/usermod.c: Cast dates to time_t, and number of days to a
nekral-guest [Fri, 13 Jun 2008 20:40:04 +0000 (20:40 +0000)]
* src/usermod.c: Cast dates to time_t, and number of days to a
long integer.
* src/usermod.c: Cast UIDs and GIDs to uid_t and gid_t after
checking the ranges.
* src/usermod.c: The ID argument of audit_logger is an unsigned
int.
* src/usermod.c: read() returns a ssize_t.
* src/usermod.c: Cast the return value of malloc and make sure it
receives a size_t.

16 years ago * src/logoutd.c: Ignore return value of time() when use with a
nekral-guest [Fri, 13 Jun 2008 20:34:46 +0000 (20:34 +0000)]
* src/logoutd.c: Ignore return value of time() when use with a
non NULL argument.

16 years ago * src/pwconv.c: Use SHADOW_SP_FLAG_UNSET for the initial
nekral-guest [Fri, 13 Jun 2008 20:33:38 +0000 (20:33 +0000)]
* src/pwconv.c: Use SHADOW_SP_FLAG_UNSET for the initial
value of sp.sp_flag.
* src/pwconv.c: Cast number of days to a long integer.

16 years ago * src/gpasswd.c: The ID argument of audit_logger is an unsigned
nekral-guest [Fri, 13 Jun 2008 20:29:58 +0000 (20:29 +0000)]
* src/gpasswd.c: The ID argument of audit_logger is an unsigned
int.
* src/gpasswd.c: Ignore the return value of signal(). The signal
handlers are only changed for the last steps of gpasswd, and there
is no need to restore them.

16 years ago * src/userdel.c: The ID argument of audit_logger is an unsigned
nekral-guest [Fri, 13 Jun 2008 20:23:26 +0000 (20:23 +0000)]
* src/userdel.c: The ID argument of audit_logger is an unsigned
int.
* src/userdel.c: fork() and wait() return a pid_t, not an int.

16 years ago * src/newgrp.c: Use a %lu format and cast group and user IDs to
nekral-guest [Fri, 13 Jun 2008 20:21:24 +0000 (20:21 +0000)]
* src/newgrp.c: Use a %lu format and cast group and user IDs to
unsigned long integers.
* src/newgrp.c: The ID argument of audit_logger is an unsigned
int.
* src/newgrp.c: Ignore the return value of signal() (the signal
handlers are assumed to be the default one and are restored
later).
* src/newgrp.c: Do not checl if a pid_t is < 0, check if equal
to (pid_t)-1.

16 years ago * libmisc/isexpired.c: Cast number of days to a long integer.
nekral-guest [Fri, 13 Jun 2008 20:12:03 +0000 (20:12 +0000)]
* libmisc/isexpired.c: Cast number of days to a long integer.
* libmisc/isexpired.c: Add brackets and parenthesis.

16 years ago * libmisc/copydir.c: Do not specify a size of arrays in the
nekral-guest [Fri, 13 Jun 2008 20:10:53 +0000 (20:10 +0000)]
* libmisc/copydir.c: Do not specify a size of arrays in the
prototypes.
* libmisc/copydir.c: Use a size_t for the length of strings.
* libmisc/copydir.c: Cast the return value of malloc().
* libmisc/copydir.c: The size argument of write() is a size_t.

16 years ago * libmisc/pwd2spwd.c: Cast number of days to a long integer.
nekral-guest [Fri, 13 Jun 2008 20:08:33 +0000 (20:08 +0000)]
* libmisc/pwd2spwd.c: Cast number of days to a long integer.
* libmisc/pwd2spwd.c: Use SHADOW_SP_FLAG_UNSET for the initial
value of sp.sp_flag.

16 years ago * lib/defines.h: Include <config.h> since it uses the macro that
nekral-guest [Fri, 13 Jun 2008 20:05:51 +0000 (20:05 +0000)]
* lib/defines.h: Include <config.h> since it uses the macro that
might be defined in this header file.
* lib/defines.h: Prefer checking if HAVE_LOCALE_H or ENABLE_NLS
are defined (rather than set to non 0).
* lib/defines.h: The dummy implementations of bindtextdomain() and
textdomain() should return a pointer. Return NULL instead of
/* empty */
* lib/defines.h: Define SHADOW_SP_FLAG_UNSET, to be used for the
initialization of sp_flag field of the shadow structures.
* lib/defines.h: Define LC_ALL, needed even if HAVE_LOCALE_H is
not defined.

16 years ago * libmisc/sulog.c: Ignore the return value of umask() when the
nekral-guest [Fri, 13 Jun 2008 19:52:58 +0000 (19:52 +0000)]
* libmisc/sulog.c: Ignore the return value of umask() when the
mask is restored.
* libmisc/sulog.c: Add brackets.
* libmisc/sulog.c: Ignore return value of time() when use with a
non NULL argument.

16 years ago * libmisc/log.c: Avoid assignments in comparisons.
nekral-guest [Fri, 13 Jun 2008 19:50:49 +0000 (19:50 +0000)]
* libmisc/log.c: Avoid assignments in comparisons.
* libmisc/log.c: Add brackets and parenthesis.
* libmisc/log.c: read() returns a ssize_t (note size_t).
* libmisc/log.c: Avoid implicit conversion of pointers to
booleans.
* libmisc/log.c: Ignore return value of time() when use with a
non NULL argument.

16 years ago * libmisc/strtoday.c: Avoid implicit conversion of pointers to
nekral-guest [Fri, 13 Jun 2008 19:48:11 +0000 (19:48 +0000)]
* libmisc/strtoday.c: Avoid implicit conversion of pointers to
booleans.
* libmisc/strtoday.c: Add brackets and parenthesis.

16 years ago * libmisc/salt.c: Use a size_t for the size of strings instead of
nekral-guest [Fri, 13 Jun 2008 19:37:15 +0000 (19:37 +0000)]
* libmisc/salt.c: Use a size_t for the size of strings instead of
unsigned int.
* libmisc/salt.c: Add brackets and parenthesis.
* libmisc/salt.c: Avoid assignments in comparisons.

16 years ago * libmisc/age.c: fork() and wait return a pid_t, not an int.
nekral-guest [Fri, 13 Jun 2008 19:24:27 +0000 (19:24 +0000)]
* libmisc/age.c: fork() and wait return a pid_t, not an int.
* libmisc/age.c: Avoid implicit conversion of pointers to
booleans.
* libmisc/age.c: Avoid assignments in comparisons.
* libmisc/age.c: Ignore the return value of printf(), puts(),
fputs() and fflush().
* libmisc/age.c: Add brackets and parenthesis.
* libmisc/age.c: Cast the return value of time() to long and
converted to a date.

16 years ago * libmisc/rlogin.c: The size argument of read() is a size_t.
nekral-guest [Fri, 13 Jun 2008 18:34:27 +0000 (18:34 +0000)]
* libmisc/rlogin.c: The size argument of read() is a size_t.
Propagate this time to the callers (the get_remote_string() and
do_rlogin() functions).
* libmisc/rlogin.c: Add brackets and parenthesis.
* libmisc/rlogin.c: Avoid multi-statements lines.
* libmisc/rlogin.c: Avoid assignments in comparisons.
* libmisc/rlogin.c: Avoid implicit conversion of pointers to
booleans.

16 years ago * libmisc/failure.c: Avoid assignments in comparisons.
nekral-guest [Fri, 13 Jun 2008 18:31:13 +0000 (18:31 +0000)]
* libmisc/failure.c: Avoid assignments in comparisons.
* libmisc/failure.c: read() returns a ssize_t.
* libmisc/failure.c: Add brackets and parenthesis.
* libmisc/failure.c: Ignore return value of time() when use with a
non NULL argument.

16 years ago * libmisc/chowntty.c: Avoid assignments in comparisons.
nekral-guest [Fri, 13 Jun 2008 18:29:02 +0000 (18:29 +0000)]
* libmisc/chowntty.c: Avoid assignments in comparisons.
* libmisc/chowntty.c: Avoid implicit conversion of pointers to
booleans.
* libmisc/chowntty.c: Add brackets and parenthesis.

16 years ago * libmisc/audit_help.c: Add brackets.
nekral-guest [Fri, 13 Jun 2008 18:24:37 +0000 (18:24 +0000)]
* libmisc/audit_help.c: Add brackets.

16 years ago * libmisc/addgrps.c: Avoid implicit conversion of pointers to
nekral-guest [Fri, 13 Jun 2008 18:19:34 +0000 (18:19 +0000)]
* libmisc/addgrps.c: Avoid implicit conversion of pointers to
booleans.
* libmisc/addgrps.c: Add brackets.

16 years ago * libmisc/utmp.c: Avoid implicit conversion of pointers to
nekral-guest [Fri, 13 Jun 2008 18:17:10 +0000 (18:17 +0000)]
* libmisc/utmp.c: Avoid implicit conversion of pointers to
booleans
+ add missing changelog from last commit.

16 years ago * libmisc/console.c, libmisc/hushed.c, libmisc/yesno.c,
nekral-guest [Fri, 13 Jun 2008 18:11:09 +0000 (18:11 +0000)]
* libmisc/console.c, libmisc/hushed.c, libmisc/yesno.c,
libmisc/loginprompt.c, libmisc/ttytype.c, libmisc/tz.c,
src/login_nopam.c, src/chpasswd.c, src/chgpasswd.c, lib/port.c:
The size argument of fgets is an int, not a size_t.
* libmisc/loginprompt.c: Ignore the return value from signal()
when the signal handlers are restored.
* src/chpasswd.c: Cast the return value of time() to a long
integer.
* src/chpasswd.c: Use the SCALE macro instead of (24L * 3600L)
for the values to be set in /etc/shadow.

16 years agoAvoid implicit conversion of pointers to booleans.
nekral-guest [Tue, 10 Jun 2008 22:10:47 +0000 (22:10 +0000)]
Avoid implicit conversion of pointers to booleans.

16 years agoAdd brackets.
nekral-guest [Tue, 10 Jun 2008 22:10:21 +0000 (22:10 +0000)]
Add brackets.

16 years ago * src/pwck.c: Use a bool when possible instead of int integers.
nekral-guest [Tue, 10 Jun 2008 22:09:12 +0000 (22:09 +0000)]
* src/pwck.c: Use a bool when possible instead of int integers.
* src/pwck.c: Avoid implicit conversion of integers to booleans.

16 years ago * src/su.c: Use a bool when possible instead of int integers.
nekral-guest [Tue, 10 Jun 2008 22:07:51 +0000 (22:07 +0000)]
* src/su.c: Use a bool when possible instead of int integers.
* src/su.c: Add brackets and parenthesis.
* src/su.c: Avoid implicit conversion of pointers / integers
/ chars to booleans.
* src/su.c: Ignore the return value of pam_end() before
exiting.
* src/su.c: Avoid assignments in comparisons.
* src/su.c: Avoid multi-statements lines.

16 years ago * lib/prototypes.h, libmisc/valid.c: Change the prototype of
nekral-guest [Tue, 10 Jun 2008 21:52:34 +0000 (21:52 +0000)]
* lib/prototypes.h, libmisc/valid.c: Change the prototype of
valid() to return a bool.
* libmisc/valid.c: Add parenthesis.

16 years agoAvoid implicit conversion of integer to boolean.
nekral-guest [Tue, 10 Jun 2008 20:34:25 +0000 (20:34 +0000)]
Avoid implicit conversion of integer to boolean.

16 years ago * lib/commonio.c: Add brackets and parenthesis.
nekral-guest [Tue, 10 Jun 2008 20:27:16 +0000 (20:27 +0000)]
* lib/commonio.c: Add brackets and parenthesis.
* lib/commonio.c: Check the result of fgets().
* lib/commonio.c: Avoid implicit conversion of pointers to
booleans.

16 years ago * lib/prototypes.h: Fix the prototypes to match earlier changes.
nekral-guest [Tue, 10 Jun 2008 20:02:47 +0000 (20:02 +0000)]
* lib/prototypes.h: Fix the prototypes to match earlier changes.

16 years agoFix typo. Compil fix.
nekral-guest [Tue, 10 Jun 2008 20:02:12 +0000 (20:02 +0000)]
Fix typo. Compil fix.

16 years ago * lib/nscd.c: Include defines.h.
nekral-guest [Tue, 10 Jun 2008 20:01:55 +0000 (20:01 +0000)]
* lib/nscd.c: Include defines.h.
* lib/nscd.c: Always warn when the nscd cache cannot be flushed.
* lib/nscd.c: Avoid assignments in comparisons.
* lib/nscd.c: Ignore the return value of fputs() when printing
errors.

16 years ago * lib/port.c: Add brackets and parenthesis.
nekral-guest [Tue, 10 Jun 2008 19:59:26 +0000 (19:59 +0000)]
* lib/port.c: Add brackets and parenthesis.
* lib/port.c: Change isttytime() prototype to return a bool.
* lib/port.c: Ignore the return value of fclose () (file open
read-only).
* lib/port.c: Avoid multi-statements lines.

16 years ago * src/id.c: Ignore the return value of fputs(), puts(), putchar(),
nekral-guest [Tue, 10 Jun 2008 19:45:06 +0000 (19:45 +0000)]
* src/id.c: Ignore the return value of fputs(), puts(), putchar(),
and printf().
* src/id.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().
* src/id.c: Add brackets and parenthesis.
* src/id.c: Avoid implicit conversion of pointers / integers
to booleans.

16 years ago * src/chsh.c: Use a bool when possible instead of int integers.
nekral-guest [Tue, 10 Jun 2008 19:42:22 +0000 (19:42 +0000)]
* src/chsh.c: Use a bool when possible instead of int integers.
* src/chsh.c: restricted_shell() renamed is_restricted_shell().
check_shell() renamed shell_is_listed().
* src/chsh.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().
* src/chsh.c: Avoid implicit conversion of pointers / integers
to booleans.
* src/chsh.c: Ignore the return value of pam_end() before
exiting.

16 years ago * src/grpunconv.c: Use a bool when possible instead of int
nekral-guest [Tue, 10 Jun 2008 19:39:18 +0000 (19:39 +0000)]
* src/grpunconv.c: Use a bool when possible instead of int
integers.
* src/grpunconv.c: Add brackets and parenthesis.
* src/grpunconv.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().
* src/grpunconv.c: Avoid implicit conversion of pointers / integers
to booleans.

16 years ago * src/sulogin.c: Ignore return value of setlocale(),
nekral-guest [Tue, 10 Jun 2008 19:36:05 +0000 (19:36 +0000)]
* src/sulogin.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().
* src/sulogin.c: Avoid implicit conversion of pointers / integers
/ chars to booleans.
* src/sulogin.c: Avoid assignments in comparisons.
* src/sulogin.c: Ignore the return value of alarm().

16 years ago * src/groups.c: Use a bool when possible instead of int integers.
nekral-guest [Tue, 10 Jun 2008 19:29:54 +0000 (19:29 +0000)]
* src/groups.c: Use a bool when possible instead of int integers.
* src/groups.c: Add brackets and parenthesis.
* src/groups.c: Avoid implicit conversion of pointers / integers
to booleans.
* src/groups.c: Avoid assignments in comparisons.
* src/groups.c: Ignore the return value of putchar(), printf()
* src/groups.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().

16 years agore-indent.
nekral-guest [Tue, 10 Jun 2008 19:18:44 +0000 (19:18 +0000)]
re-indent.

16 years ago * src/grpconv.c: Use a bool when possible instead of int integers.
nekral-guest [Tue, 10 Jun 2008 19:18:34 +0000 (19:18 +0000)]
* src/grpconv.c: Use a bool when possible instead of int integers.
* src/grpconv.c: Add brackets and parenthesis.
* src/grpconv.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().
* src/grpconv.c: Avoid implicit conversion of pointers / integers
to booleans.

16 years ago * src/faillog.c: Use a bool when possible instead of int integers.
nekral-guest [Tue, 10 Jun 2008 19:16:02 +0000 (19:16 +0000)]
* src/faillog.c: Use a bool when possible instead of int integers.
* src/faillog.c: Avoid implicit conversion of pointers / integers
/ chars to booleans.
* src/faillog.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().
* src/faillog.c: Add brackets and parenthesis.

16 years ago * src/login.c: Avoid multi-statements lines.
nekral-guest [Tue, 10 Jun 2008 18:56:23 +0000 (18:56 +0000)]
* src/login.c: Avoid multi-statements lines.
* src/login.c: Ignore the return value of pam_end() before
exiting.
* src/login.c: Use a bool when possible instead of int integers.
* src/login.c: Add brackets and parenthesis.
* src/login.c: Ignore the return values of fflush(), putchar(), puts().
* src/login.c: Ignore the return value of fclose() for read-only
files.
* src/login.c: Avoid assignments in comparisons.
* src/login.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().

16 years ago * src/chage.c: Use a bool when possible instead of int integers.
nekral-guest [Tue, 10 Jun 2008 17:56:53 +0000 (17:56 +0000)]
* src/chage.c: Use a bool when possible instead of int integers.
* src/chage.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().

16 years ago * src/groupadd.c: Use a bool when possible instead of int
nekral-guest [Tue, 10 Jun 2008 17:53:35 +0000 (17:53 +0000)]
* src/groupadd.c: Use a bool when possible instead of int
integers.
* src/groupadd.c: Add brackets and parenthesis.
* src/groupadd.c: Avoid implicit conversion of pointers / integers
/ chars to booleans.
* src/groupadd.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().
* src/groupadd.c: Ignore the return value of pam_end() before
exiting.

16 years ago * src/pwck.c: Use a bool when possible instead of int integers.
nekral-guest [Tue, 10 Jun 2008 17:51:30 +0000 (17:51 +0000)]
* src/pwck.c: Use a bool when possible instead of int integers.
* src/pwck.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().