]> granicus.if.org Git - shadow/log
shadow
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().

16 years ago * src/passwd.c: Use a bool when possible instead of int integers.
nekral-guest [Tue, 10 Jun 2008 17:50:21 +0000 (17:50 +0000)]
* src/passwd.c: Use a bool when possible instead of int integers.
* src/passwd.c: Avoid assignments in comparisons.
* src/passwd.c: Add brackets and parenthesis.
* src/passwd.c: Avoid implicit conversion of pointers / integers /
chars to booleans.
* src/passwd.c: Move the "context_t c" declaration at the
beginning check_selinux_access.
* src/passwd.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().

16 years ago * src/groupmod.c: Use a bool when possible instead of int
nekral-guest [Tue, 10 Jun 2008 17:45:08 +0000 (17:45 +0000)]
* src/groupmod.c: Use a bool when possible instead of int
integers.
* src/groupmod.c: Avoid assignments in comparisons.
* src/groupmod.c: Add brackets and parenthesis.
* src/groupmod.c: Avoid implicit conversion of pointers / integers
/ chars to booleans.
* src/groupmod.c: Use a %lu format to print GIDs, and cast the GID
to (unsigned long int).
* src/groupmod.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().
* src/groupmod.c: Ignore the return value of pam_end() before
exiting.

16 years ago * src/su.c: Ignore return value of setlocale(),
nekral-guest [Mon, 9 Jun 2008 22:28:16 +0000 (22:28 +0000)]
* src/su.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().

16 years ago * src/useradd.c: Use a bool when possible instead of int integers.
nekral-guest [Mon, 9 Jun 2008 22:08:08 +0000 (22:08 +0000)]
* src/useradd.c: Use a bool when possible instead of int integers.
* src/useradd.c: Avoid implicit conversion of pointers / integers
/ chars to booleans.
* src/useradd.c: Add brackets and parenthesis.
* src/useradd.c: Avoid assignments in comparisons.
* src/useradd.c: Ignore the return value of fclose() for read-only
files.
* src/useradd.c: Ignore the return value of fflush() before
closing the files.
* src/useradd.c: Avoid multi-statements lines.
* src/useradd.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().
* src/useradd.c: Ignore the return value of pam_end() before
exiting.

16 years ago * src/vipw.c: Use a bool when possible instead of int integers.
nekral-guest [Mon, 9 Jun 2008 21:18:28 +0000 (21:18 +0000)]
* src/vipw.c: Use a bool when possible instead of int integers.
* src/vipw.c: Ignore the return value of umask(), when the mask is
set again to the old value.
* src/vipw.c: Avoid implicit conversion of pointers / integers to
booleans.
* src/vipw.c: Add brackets and parenthesis.
* src/vipw.c: Avoid assignments in comparisons.
* src/vipw.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().
* src/vipw.c: Add missing termination of the longopts parameter
for getopt_long().

16 years ago * src/chgpasswd.c: Use a bool when possible instead of int
nekral-guest [Mon, 9 Jun 2008 20:56:03 +0000 (20:56 +0000)]
* src/chgpasswd.c: Use a bool when possible instead of int
integers.
* src/chgpasswd.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().
* src/chgpasswd.c: Avoid implicit conversion of integers to
booleans.

16 years ago * src/groupdel.c: Use a bool when possible instead of int
nekral-guest [Mon, 9 Jun 2008 20:54:04 +0000 (20:54 +0000)]
* src/groupdel.c: Use a bool when possible instead of int
integers.
* src/groupdel.c: Avoid implicit conversion of pointers / integers to
booleans.
* src/groupdel.c: Avoid assignments in comparisons.
* src/groupdel.c: Ignore the return value of pam_end() before
exiting.
* src/groupdel.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().

16 years ago * src/expiry.c: Ignore return value of setlocale(),
nekral-guest [Mon, 9 Jun 2008 20:36:24 +0000 (20:36 +0000)]
* src/expiry.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().
* src/expiry.c: Add brackets and parenthesis.
* src/expiry.c: Avoid assignments in comparisons.
* src/expiry.c: Avoid implicit conversion of pointers to booleans.

16 years agoAdd brackets and parenthesis.
nekral-guest [Mon, 9 Jun 2008 20:32:17 +0000 (20:32 +0000)]
Add brackets and parenthesis.

16 years ago * src/pwunconv.c: Use a bool when possible instead of int
nekral-guest [Mon, 9 Jun 2008 20:30:34 +0000 (20:30 +0000)]
* src/pwunconv.c: Use a bool when possible instead of int
integers.
* src/pwunconv.c: Add brackets and parenthesis.
* src/pwunconv.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().
* src/pwunconv.c: Avoid implicit conversion of pointers / integers
/ chars to booleans.
* src/pwunconv.c: Avoid assignments in comparisons.

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

16 years ago * src/groupmems.c: Move the declaration of option_index and
nekral-guest [Mon, 9 Jun 2008 20:09:38 +0000 (20:09 +0000)]
* src/groupmems.c: Move the declaration of option_index and
long_options before the blocks of code.
* src/groupmems.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().
* src/groupmems.c: Ignore the return value of pam_end() before
exiting.

16 years ago * src/chfn.c: Use a bool when possible instead of int integers.
nekral-guest [Mon, 9 Jun 2008 20:05:13 +0000 (20:05 +0000)]
* src/chfn.c: Use a bool when possible instead of int integers.
* src/chfn.c: Avoid implicit conversion of integers / chars to
booleans.
* src/chfn.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().

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

16 years ago * src/chpasswd.c: Use a bool when possible instead of int
nekral-guest [Mon, 9 Jun 2008 19:46:11 +0000 (19:46 +0000)]
* src/chpasswd.c: Use a bool when possible instead of int
integers.
* src/chpasswd.c: Avoid implicit conversion of pointers / integers
/ chars to booleans.
* src/chpasswd.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().

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

16 years ago * NEWS, src/newusers.c: Implement the -r, --system option.
nekral-guest [Mon, 9 Jun 2008 19:36:08 +0000 (19:36 +0000)]
* NEWS, src/newusers.c: Implement the -r, --system option.
* src/newusers.c: Use a bool when possible instead of int
integers.
* src/newusers.c: Avoid implicit conversion of pointers / integers
/ chars to booleans.
* src/newusers.c: Ignore the return value of pam_end() before
exiting.
* src/newusers.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().
* src/newusers.c: Avoid multi-statements lines.
* src/newusers.c: Add brackets and parenthesis.

16 years ago * src/gpasswd.c: Use a bool when possible instead of int integers.
nekral-guest [Mon, 9 Jun 2008 19:26:19 +0000 (19:26 +0000)]
* src/gpasswd.c: Use a bool when possible instead of int integers.
* src/gpasswd.c: Avoid implicit conversion of pointers / integers
/ chars to booleans.
* src/gpasswd.c: Ignore the return value of putchar() and fflush()
before exiting.
* src/gpasswd.c: check_list() renamed is_valid_user_list(), and
return a bool.
* src/gpasswd.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().

16 years ago * src/grpck.c: Use a bool when possible instead of int integers.
nekral-guest [Mon, 9 Jun 2008 19:20:00 +0000 (19:20 +0000)]
* src/grpck.c: Use a bool when possible instead of int integers.
* src/grpck.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().

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

16 years ago * src/userdel.c: Use a bool for the is_shadow_pwd, is_shadow_grp,
nekral-guest [Mon, 9 Jun 2008 19:10:44 +0000 (19:10 +0000)]
* src/userdel.c: Use a bool for the is_shadow_pwd, is_shadow_grp,
deleted_user_group, was_member, was_admin, and the
options' flags.
* src/userdel.c: Change path_prefix() prototype to return a bool.
* src/userdel.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().
* src/userdel.c: Ignore the return value from pam_end() since we
are exiting anyway just afterwards.
* src/userdel.c: Avoid implicit conversion of pointers /
integers / chars to booleans.
* src/userdel.c: Add brackets and parenthesis.
* src/userdel.c: Avoid assignments in comparisons.
* src/userdel.c: Do not ignore the return value of the *_unlock()
functions.

16 years ago * src/login_nopam.c: Do not use the YES and NO macros. Use the
nekral-guest [Mon, 9 Jun 2008 18:35:32 +0000 (18:35 +0000)]
* src/login_nopam.c: Do not use the YES and NO macros. Use the
booleans true and false instead. Change the prototypes of
list_match(), user_match(), from_match(), and string_match()
accordingly. Also use booleans internally.
* src/login_nopam.c: Add brackets and parenthesis.
* src/login_nopam.c: Avoid implicit conversion of pointers /
integers / chars to booleans.
* src/login_nopam.c: Avoid assignments in comparisons.

16 years ago * src/newgrp.c: Use a bool for is_newgrp, notfound, needspasswd,
nekral-guest [Mon, 9 Jun 2008 18:23:23 +0000 (18:23 +0000)]
* src/newgrp.c: Use a bool for is_newgrp, notfound, needspasswd,
initflag, and cflag.
* src/newgrp.c: Add brackets and parenthesis.
* src/newgrp.c: Avoid implicit conversion of pointers / integers /
chars to booleans.
* src/newgrp.c: Avoid multi-statements lines.
* src/newgrp.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().
* src/newgrp.c: Avoid assignments in comparisons.

16 years ago * libmisc/list.c: Change is_on_list() prototype to return a bool.
nekral-guest [Mon, 9 Jun 2008 18:13:52 +0000 (18:13 +0000)]
* libmisc/list.c: Change is_on_list() prototype to return a bool.

16 years ago * libmisc/find_new_ids.c: Change find_new_uid() and find_new_gid()
nekral-guest [Mon, 9 Jun 2008 18:13:09 +0000 (18:13 +0000)]
* libmisc/find_new_ids.c: Change find_new_uid() and find_new_gid()
prototypes to use a bool for their first argument (sys_user /
sys_group).

16 years ago * libmisc/console.c: Change is_listed() prototype to return a bool.
nekral-guest [Mon, 9 Jun 2008 18:11:20 +0000 (18:11 +0000)]
* libmisc/console.c: Change is_listed() prototype to return a bool.
The default parameter should also be a bool.
* libmisc/console.c: Add brackets and parenthesis.
* libmisc/console.c: Avoid assignments in comparisons.
* libmisc/console.c: Change console() prototype to return a bool.

16 years ago * lib/sgetspent.c: Add brackets and parenthesis.
nekral-guest [Mon, 26 May 2008 09:39:29 +0000 (09:39 +0000)]
* lib/sgetspent.c: Add brackets and parenthesis.
* lib/sgetspent.c: Avoid assignments in comparisons.
* lib/sgetspent.c: Avoid implicit conversion of pointers / chars to booleans.
* lib/sgetspent.c: Avoid multi-statements lines.

16 years agoAvoid assignments in comparisons.
nekral-guest [Mon, 26 May 2008 09:22:44 +0000 (09:22 +0000)]
Avoid assignments in comparisons.
Add note about possible bug.

16 years agoDo not check twice if fields[2] and fields[3] are not empty.
nekral-guest [Mon, 26 May 2008 09:17:17 +0000 (09:17 +0000)]
Do not check twice if fields[2] and fields[3] are not empty.

16 years ago * lib/sgetpwent.c: Avoid implicit conversion of pointers / chars to booleans.
nekral-guest [Mon, 26 May 2008 09:15:02 +0000 (09:15 +0000)]
* lib/sgetpwent.c: Avoid implicit conversion of pointers / chars to booleans.
* lib/sgetpwent.c: Add brackets and parenthesis.
* lib/sgetpwent.c: Return NULL instead of 0.

16 years ago* Avoid implicit conversion of pointers to booleans.
nekral-guest [Mon, 26 May 2008 09:12:34 +0000 (09:12 +0000)]
* Avoid implicit conversion of pointers to booleans.
* Add parenthesis.

16 years ago * libmisc/getdate.y: abbrev is a bool.
nekral-guest [Mon, 26 May 2008 08:59:54 +0000 (08:59 +0000)]
* libmisc/getdate.y: abbrev is a bool.
* libmisc/getdate.y: Avoid implicit conversion of pointers / chars / integers to booleans.

16 years ago * lib/prototypes.h: Fix prototypes according to earlier changes (usage of the bool...
nekral-guest [Mon, 26 May 2008 08:56:34 +0000 (08:56 +0000)]
* lib/prototypes.h: Fix prototypes according to earlier changes (usage of the bool type).
* lib/prototypes.h: Add the arguments' name to the prototypes.

16 years agoAdd protection against multiple inclusions.
nekral-guest [Mon, 26 May 2008 08:53:56 +0000 (08:53 +0000)]
Add protection against multiple inclusions.

16 years agoIndicate that defines.h is included for the definition of the "bool" type.
nekral-guest [Mon, 26 May 2008 08:52:34 +0000 (08:52 +0000)]
Indicate that defines.h is included for the definition of the "bool" type.

16 years agoThe changed, isopen, locked, and readonly fields of the db are booleans.
nekral-guest [Mon, 26 May 2008 08:51:45 +0000 (08:51 +0000)]
The changed, isopen, locked, and readonly fields of the db are booleans.

16 years ago * lib/pwio.h: Add protection against multiple inclusions.
nekral-guest [Mon, 26 May 2008 08:49:44 +0000 (08:49 +0000)]
* lib/pwio.h: Add protection against multiple inclusions.
* lib/pwio.c: The changed, isopen, locked, and readonly fields of the db are booleans.

16 years ago * lib/sgroupio.c: Avoid assignments in comparisons.
nekral-guest [Mon, 26 May 2008 08:46:41 +0000 (08:46 +0000)]
* lib/sgroupio.c: Avoid assignments in comparisons.
* lib/sgroupio.c: Add brackets.
* lib/sgroupio.c: Avoid implicit conversion of pointers / integers to booleans.
* lib/sgroupio.c: The changed, isopen, locked, and readonly fields of the db are booleans.
* lib/sgroupio.h, lib/sgroupio.c: sgr_file_present returns a bool.
* lib/sgroupio.h: Add protection against multiple inclusions.

16 years ago * lib/shadowio.h, lib/shadowio.c: spw_file_present returns a bool.
nekral-guest [Mon, 26 May 2008 08:45:34 +0000 (08:45 +0000)]
* lib/shadowio.h, lib/shadowio.c: spw_file_present returns a bool.
* lib/shadowio.h: Add protection against multiple inclusions.

16 years ago * lib/sgroupio.c: Avoid assignments in comparisons.
nekral-guest [Mon, 26 May 2008 08:43:50 +0000 (08:43 +0000)]
* lib/sgroupio.c: Avoid assignments in comparisons.
* lib/sgroupio.c: Add brackets.
* lib/sgroupio.c: Avoid implicit conversion of pointers / integers to booleans.
* lib/sgroupio.c: The changed, isopen, locked, and readonly fields of the db are booleans.
* lib/sgroupio.h, lib/sgroupio.c: sgr_file_present returns a bool.
* lib/sgroupio.h: Add protection against multiple inclusions.

16 years ago * lib/gshadow.c: nis_used and nis_bound are booleans.
nekral-guest [Mon, 26 May 2008 08:40:04 +0000 (08:40 +0000)]
* lib/gshadow.c: nis_used and nis_bound are booleans.
* lib/gshadow.c: Avoid implicit conversion of pointers / integers to booleans.
* lib/gshadow.c: Avoid assignments in comparisons.
* lib/gshadow.c: Add brackets.

16 years agoAdd protection against multiple inclusion
nekral-guest [Mon, 26 May 2008 08:35:13 +0000 (08:35 +0000)]
Add protection against multiple inclusion

16 years agoThe changed, isopen, locked, and readonly fields of the db are booleans.
nekral-guest [Mon, 26 May 2008 08:34:04 +0000 (08:34 +0000)]
The changed, isopen, locked, and readonly fields of the db are booleans.

16 years ago * lib/sgetgrent.c: implicit conversion of pointers / chars to booleans.
nekral-guest [Mon, 26 May 2008 08:31:14 +0000 (08:31 +0000)]
* lib/sgetgrent.c: implicit conversion of pointers / chars to booleans.
* lib/sgetgrent.c: Avoid assignments in comparisons.
* lib/sgetgrent.c: Add brackets.

16 years ago * lib/encrypt.c: Avoid implicit conversion of pointers to booleans.
nekral-guest [Mon, 26 May 2008 01:07:13 +0000 (01:07 +0000)]
* lib/encrypt.c: Avoid implicit conversion of pointers to booleans.
* lib/encrypt.c: Add parenthesis.

16 years ago * lib/port.c: Avoid implicit conversion of pointers / integers / chars to booleans.
nekral-guest [Mon, 26 May 2008 01:05:04 +0000 (01:05 +0000)]
* lib/port.c: Avoid implicit conversion of pointers / integers / chars to booleans.
* lib/port.c: Avoid multiple statement on the same line.
* lib/port.c: Add brackets and parenthesis.
* lib/port.c: Avoid assignments in comparisons.
* lib/port.c: Fix typo comparision -> comparison (in comment).

16 years ago * lib/fputsx.c: Add brackets.
nekral-guest [Mon, 26 May 2008 00:59:42 +0000 (00:59 +0000)]
* lib/fputsx.c: Add brackets.
* lib/fputsx.c: Avoid assignments in comparisons.
* lib/fputsx.c: Avoid implicit conversion of pointers / integers / chars to booleans.

16 years ago * lib/commonio.h: commonio_entry.changed, commonio_db.changed, commonio_db.isopen...
nekral-guest [Mon, 26 May 2008 00:46:25 +0000 (00:46 +0000)]
* lib/commonio.h: commonio_entry.changed, commonio_db.changed, commonio_db.isopen, commonio_db.locked, and commonio_db.readonly are no booleans.
* lib/commonio.h: Include defines.h to get the definition of bool.
* lib/commonio.h: commonio_present returns a bool
* lib/commonio.c: Implement above changes.
* lib/commonio.c: add argument names in prototypes.
* lib/commonio.c: name_is_nis returns a bool.
* lib/commonio.c: nscd_need_reload is a bool.
* lib/commonio.c: Improve types (use size_t / pid_t when needed instead of int).
* lib/commonio.c: Avoid assignments in comparisons.
* lib/commonio.c: Add brackets and parenthesis.
* lib/commonio.c: Avoid implicit conversion of pointers / integers to booleans
* lib/commonio.c: The return values of utime is not checked on purpose.

16 years agocheckutmp is implemented twice. I only changed the second one. Now fix the
nekral-guest [Mon, 26 May 2008 00:26:33 +0000 (00:26 +0000)]
checkutmp is implemented twice. I only changed the second one. Now fix the
first one.

16 years ago * libmisc/isexpired.c: ARGSUSED is no more needed (shadow is always supported).
nekral-guest [Mon, 26 May 2008 00:14:10 +0000 (00:14 +0000)]
* libmisc/isexpired.c: ARGSUSED is no more needed (shadow is always supported).
* libmisc/isexpired.c: Avoid implicit conversion of pointers to booleans.
* libmisc/isexpired.c: Add brackets and parenthesis.

16 years ago * libmisc/sulog.c (sulog): The success argument is a bool.
nekral-guest [Mon, 26 May 2008 00:09:24 +0000 (00:09 +0000)]
* libmisc/sulog.c (sulog): The success argument is a bool.
* libmisc/sulog.c: The return values of fflush is not checked on purpose.
* libmisc/sulog.c: Indicate that some return values should be checked.

16 years agoUpdated copyright dates.
nekral-guest [Mon, 26 May 2008 00:04:30 +0000 (00:04 +0000)]
Updated copyright dates.