Commit Graph

679 Commits

Author SHA1 Message Date
nekral-guest a109ff1d85 * shadow.spec.in: Fix the source (new FTP). 2008-08-31 17:30:45 +00:00
nekral-guest 614e95af39 * src/su.c: Add brackets and parenthesis.
* src/su.c: Avoid implicit conversion of pointers to booleans.
2008-08-31 17:30:30 +00:00
nekral-guest 05e4cf9aae * libmisc/list.c: Added assertions for non NULL parameters. 2008-08-31 17:30:21 +00:00
nekral-guest d2c11f8bee * libmisc/list.c: Remove historical comment. 2008-08-31 17:30:12 +00:00
nekral-guest c04189bfb6 * src/pwconv.c, src/pwunconv.c: Fail if unexpected parameters are
provided.
2008-08-31 17:30:00 +00:00
nekral-guest 6c5e97e745 * src/passwd.c: Add brackets and parenthesis.
* src/passwd.c: Avoid implicit conversion of pointers to booleans.
	* src/passwd.c: Avoid assignments in comparisons.
2008-08-31 17:29:51 +00:00
nekral-guest 87b56b19fb * NEWS, src/groupmems.c, man/groupmems.8.xml: Added support for
shadow groups.
	* src/groupmems.c: Use fail_exit() instead of exit().
2008-08-31 17:29:34 +00:00
nekral-guest 046fe0cfe0 * src/groupmems.c: Avoid mixed declarations and code. 2008-08-31 17:29:17 +00:00
nekral-guest 81e1dbc90e * src/groupmems.c: The grp structure returned by gr_locate is a
const. Duplicate this structure before working on it.
	* src/groupmems.c: Do not fail and do not display warnings if a
	close failure happens with the --list option. (Files are opened
	read-only).
2008-08-31 17:29:08 +00:00
nekral-guest 281721cd15 * src/gpasswd.c: Replace the 'valid' variable by is_valid to avoid
clashes with the valid() function.
2008-08-31 17:28:59 +00:00
nekral-guest 0fcae007a0 * libmisc/obscure.c: Add brackets and parenthesis.
* libmisc/obscure.c: Avoid implicit conversion of pointers / chars to
	booleans.
	* libmisc/obscure.c: Simplify the list of if.
2008-08-31 17:28:49 +00:00
nekral-guest 6b3266f228 * src/passwd.c: Fix a typo in the Usage string. 2008-08-31 17:28:39 +00:00
nekral-guest ce4152c817 * src/logoutd.c: Fail if
unexpected parameters are provided.
2008-08-31 17:28:30 +00:00
nekral-guest 73877b22c4 * src/grpunconv.c: Fail if unexpected parameters
are provided.
	* src/grpunconv.c: Indicate that argc is not used
	in the no SHADOWGRP version.
2008-08-31 17:28:21 +00:00
nekral-guest bf3e8f290c * src/grpconv.c, src/groups.c: Name the parameters in the
prototypes of the static functions.
	* src/grpconv.c: Fail if unexpected parameters are provided.
	* src/grpconv.c: Indicate that argc is not used in the no
	SHADOWGRP version.
2008-08-31 17:28:12 +00:00
nekral-guest 399f453b4d * src/chgpasswd.c, src/chpasswd.c: Removed variable ok, which is
no more used.
2008-08-31 17:27:56 +00:00
nekral-guest 8e6c4b2e07 * src/chage.c: Fix the format for long integers (from %ul to %lu). 2008-08-31 17:27:47 +00:00
nekral-guest 4507bd32af * libmisc/utmp.c: Mark the line and host arguments of setutmp() as
not used in the __linux__ version.
2008-08-31 17:27:37 +00:00
nekral-guest e9a14b2409 * lib/nscd.c: Avoid redefinition of _GNU_SOURCE. 2008-08-31 17:27:26 +00:00
nekral-guest cd6a300222 * configure.in, src/login.c: Do not use HAVE_PAM_FAIL_DELAY, but
HAS_PAM_FAIL_DELAY, to avoid a redefinition with Linux PAM.
2008-08-31 17:27:16 +00:00
nekral-guest 978b3ef881 * configure.in: Indentation fix. 2008-08-31 17:27:06 +00:00
nekral-guest da693710f6 Revert " * src/groupmems.c: Added function open_°files and close_files to"
This reverts commit eb3860eb3647d1b092ffe9baa1eb2f73a27a0d87.
2008-08-31 17:26:55 +00:00
nekral-guest 71656e3cba * src/groupmems.c: Added function open_°files and close_files to
ease the support of gshadow.
	* src/groupmems.c: Always call check_perms(). This function now
	succeed when the requested action is to list the members.
2008-08-30 18:34:43 +00:00
nekral-guest 72d75d50d9 * src/groupmems.c: Added functions add_user(), remove_user(), and
purge_members() to ease the support of gshadow.
2008-08-30 18:34:24 +00:00
nekral-guest cdf963b2b3 * src/expiry.c: Use Basename for Prog.
* src/expiry.c: Added missing OPENLOG.
2008-08-30 18:34:04 +00:00
nekral-guest de11907053 * lib/nscd.c: Make sure the file is not empty when configured
without nscd support.
2008-08-30 18:33:13 +00:00
nekral-guest 8075d27e32 * configure.in: Remove the USE_NSCD AM_CONDITIONAL (USE_NSCD is
not used in any Makefile.am).
	* configure.in: Make sure posix_spawn is present when configured
	with nscd support.
2008-08-30 18:32:43 +00:00
nekral-guest 7109072b8f * lib/groupmem.c, lib/pwmem.c, lib/shadowmem.c: Added brackets and
parenthesis.
	* lib/groupmem.c, lib/pwmem.c, lib/shadowmem.c: Avoid assignments
	in comparisons.
2008-08-30 18:32:19 +00:00
nekral-guest cf4aea18b4 * libmisc/mail.c: Added brackets and parenthesis.
* libmisc/mail.c: Avoid assignments in comparisons.
2008-08-30 18:31:56 +00:00
nekral-guest 68b7aad535 * configure.in: Check if the stat structure has a st_atim or
st_atimensec field.
	* libmisc/copydir.c: Conditionally use the stat's st_atim and
	st_atimensec fields.
2008-08-30 18:31:21 +00:00
nekral-guest f86b2704d5 * lib/groupio.h, lib/prototypes.h, lib/pwio.h, lib/sgetgrent.c:
Include <sys/types.h> before <pwd.h> and <grp.h>. It is necessary
	for the definition of uid_t and gid_t.
	* lib/pwmem.c: do not include <pwd.h>, "pwio.h" is sufficient
	here.
2008-08-30 18:30:58 +00:00
nekral-guest c59126a817 * configure.in, lib/nscd.h, lib/nscd.c: Added --with-nscd flag to
support systems without nscd.
2008-08-30 18:30:36 +00:00
nekral-guest 76ea48bb64 * NEWS: Added support for uclibc.
* configure.in, libmisc/copydir.c: futimes() and lutimes() are not
	standard. Check if they are implemented before using them. Do not
	set the time of links if lutimes() does not exist, and use
	utimes() as a replacement for futimes().
2008-08-30 18:29:55 +00:00
nekral-guest 0802405344 * src/groupmems.c: Handle the options alphabetically. 2008-08-30 18:29:31 +00:00
nekral-guest 0c7df2f9a0 * src/groupmems.c: When removing an user, check if deluser is on
the list, not adduser. This fixes a segmentation fault for every
	call of groupmems -d.
	* libmisc/list.c: Add assertions to help identifying these issues.
	* libmisc/list.c: Avoid implicit conversion of pointers to
	booleans.
2008-08-30 18:29:08 +00:00
nekral-guest 77f81fa0b6 * NEWS, src/groupmems.c: Use the "groupmems" PAM service name
instead of "groupmod".
2008-08-30 18:28:45 +00:00
nekral-guest 8851893412 * src/chfn.c: Merge some translated messages.
* src/groupmems.c, src/groupadd.c, src/gpasswd.c, src/chsh.c,
	src/chfn.c: Harmonize *_update() failure messages.
	* src/groupmems.c: Harmonize gr_close() failure messages.
	* src/newgrp.c: Harmonize "unknown GID" messages.
	* src/newusers.c: Move the pwd declaration to a inner block scope.
2008-08-30 18:28:24 +00:00
nekral-guest aa2fee4969 * src/useradd.c: Harmonize some error messages.
* src/userdel.c: Add log to syslog when the mail file could not be
	removed.
	* src/userdel.c: Give more context an error message (merge with
	perror()).
	* src/usermod.c: Harmonize some error messages.
2008-08-30 18:27:59 +00:00
nekral-guest d7b55ce2bb * src/groupmems.c: Check the return value of gr_update().
* src/chage.c, src/chfn.c, src/chgpasswd.c, src/chpasswd.c,
	src/chsh.c, src/gpasswd.c, src/groupadd.c, src/groupmems.c,
	src/groupmod.c, src/grpck.c, src/grpconv.c, src/grpunconv.c,
	src/passwd.c, src/pwck.c, src/pwconv.c, src/pwunconv.c,
	src/useradd.c, src/userdel.c, src/usermod.c: Harmonize the error
	message sent to stderr in case of *_update () failure.
	* src/chage.c, src/chsh.c, src/groupadd.c, src/passwd.c: Do not
	log to syslog when pw_update() or spw_update() fail.
	* src/newusers.c: Do not log specific error message to stderr when
	sgr_update() fails.
	* src/pwconv.c: Remove duplicated definition of Prog.
2008-08-30 18:27:34 +00:00
nekral-guest 38a50366bc * src/chfn.c, src/chsh.c, src/expiry.c, src/gpasswd.c,
src/newgrp.c, src/passwd.c, src/su.c: Use the same stderr and
	syslog warnings when the username cannot be determined.
	* src/newgrp.c: Reuse the same stderr message for groups which do
	not exist in the system.
2008-08-30 18:27:07 +00:00
nekral-guest 307f703b99 * src/usermod.c: Log errors while *_close to syslog.
* src/usermod.c: Added missing }
2008-08-22 02:34:04 +00:00
nekral-guest 306f19b805 * src/grpconv.c: Use Basename for the definition of Prog. Prog
needs a file visibility.
	* src/grpunconv.c: Likewise.
2008-08-22 02:33:08 +00:00
nekral-guest a3be8ff055 * src/chfn.c: Do not exit on pw_unlock failures.
* src/grpconv.c, src/grpunconv.c, src/pwconv.c, src/pwunconv.c,
	src/vipw.c: Open syslog with the right identification name.
	* src/vipw.c: Log unlock errors to syslog.
	* src/vipw.c: Log edits to syslog.
	* src/chage.c, src/chfn.c, src/chsh.c, src/gpasswd.c,
	src/groupadd.c, src/groupdel.c, src/groupmod.c, src/grpconv.c,
	src/grpunconv.c, src/passwd.c, src/pwck.c, src/pwunconv.c,
	src/useradd.c, src/usermod.c: Harmonize the syslog levels. Failure
	to close or unlock are errors. Failure to open files are warnings.
2008-08-22 02:30:33 +00:00
nekral-guest c9119dc6bb * src/newusers.c: Open syslog with the right identification name.
* src/newusers.c: Mark the files as locked only if they are really
	locked (i.e. if shadow is not enabled, the files are not locked).
2008-08-22 02:29:31 +00:00
nekral-guest cfeacc4d67 * NEWS, src/gpasswd.c: Use getopt_long instead of getopt. Added
support for long options --add (-a), --delete (-d),
	--remove-password (-r), --restrict (-R), --administrators (-A),
	and --members (-M)
	* man/gpasswd.1.xml: Document the new long options.
	* src/gpasswd.c: The sgrp structure is only used if SHADOWGRP is
	defined.
2008-08-22 02:28:15 +00:00
nekral-guest 2bdcb9c33d * src/grpck.c: Added function fail_exit(). Check failure to unlock
files. Report errors to stderr and syslog, but continue.
	* src/grpconv.c: Check failure to unlock files. Report errors to
	stderr and syslog, but continue.
2008-08-22 02:26:46 +00:00
nekral-guest 7ae6b8fc34 * src/passwd.c: Check failure to unlock files. Report errors to
stderr and syslog, but continue.
2008-08-22 02:24:29 +00:00
nekral-guest 82779cd336 * src/chfn.c, src/chgpasswd.c, src/chpasswd.c, src/gpasswd.c,
src/groupadd.c, src/groupdel.c, src/groupmems.c, src/groupmod.c,
	src/grpconv.c, src/grpunconv.c, src/newusers.c, src/pwconv.c,
	src/pwunconv.c, src/useradd.c, src/userdel.c: Harmonize the name
	of the variables keeping the lock status, to match the shadow
	library prefixes.
2008-08-22 02:22:34 +00:00
nekral-guest 82ed690817 * src/chage.c, src/chgpasswd.c, src/chpasswd.c, src/chsh.c,
src/gpasswd.c, src/groupadd.c, src/groupdel.c, src/groupmems.c,
	src/groupmod.c, src/grpck.c, src/grpconv.c, src/grpunconv.c,
	src/newusers.c, src/passwd.c, src/pwck.c, src/pwconv.c,
	src/pwunconv.c, src/useradd.c, src/userdel.c, src/usermod.c: In
	case of a lock failure, indicate to the user that she can try
	again later. Do not log to syslog.
2008-08-22 02:20:53 +00:00
nekral-guest 1355d5d3eb * NEWS, src/passwd.c: For compatibility with other passwd version,
the --lock an --unlock options do not lock or unlock the user
	account anymore.  They only lock or unlock the user's password.
	* man/passwd.1.xml: Document above change. Document how an account
	can be locked and what a password lock means.
2008-08-22 02:16:21 +00:00