Commit Graph

307 Commits

Author SHA1 Message Date
nekral-guest
902aad57af * NEWS, configure.in, libmisc/copydir.c, man/useradd.8.xml,
man/usermod.8.xml, src/Makefile.am: Added support for ACLs and
	Extended Attributes.
2010-03-30 21:01:27 +00:00
nekral-guest
6afd7859f8 * libmisc/copydir.c: Document the sections closed by #endif 2010-03-30 21:00:43 +00:00
nekral-guest
4375be4642 * lib/utent.c (getutline): Remove getutline(). This function is
no more used.
	* lib/groupmem.c: Limit the scope of variable i.
	* lib/shadow.c: Avoid implicit conversion of pointers and integers
	to booleans.
	* lib/shadow.c: Added brackets.
	* libmisc/limits.c: Limit the scope of variable tmpmask.
	* libmisc/copydir.c: Close opened file on failure.
	* libmisc/loginprompt.c: Limit the scope of variable envc.
	* libmisc/find_new_uid.c, libmisc/find_new_gid.c: Limit the scope
	of variable id.
2010-03-23 08:56:52 +00:00
nekral-guest
5ebb35654b * libmisc/find_new_gid.c, libmisc/find_new_uid.c: Detect some
misconfigurations of UID_MIN, UID_MAX, SYS_UID_MIN, SYS_UID_MAX (and
	the GID equivalents)
2010-03-21 01:20:50 +00:00
nekral-guest
f729486b33 * libmisc/limits.c: Re-indent to make pmccabe happy. 2010-03-20 10:29:27 +00:00
nekral-guest
f19f67c39c * libmisc/strtoday.c: Empty dates indicate a disabled date, this is
not an error.
2010-03-20 10:19:50 +00:00
nekral-guest
823735750a * libmisc/limits.c: Removed unused variable. 2010-03-19 11:25:56 +00:00
nekral-guest
dfce564026 * libmisc/limits.c: Re-indent.
* libmisc/limits.c: Reformat the documentation. Avoid personal
	comments.
	* man/limits.5.xml: Document the new features.
2010-03-18 23:20:24 +00:00
nekral-guest
52c2bb51fb * NEWS, libmisc/limits.c: Fix parsing of limits.
* NEWS, libmisc/limits.c, man/limits.5.xml: Add support for
	infinite limits.
	* NEWS, libmisc/limits.c, man/limits.5.xml: Add support for @group
	syntax.
2010-03-18 23:20:15 +00:00
nekral-guest
86498400da * libmisc/chowndir.c: Re-indent.
* libmisc/chowndir.c: Avoid assignment in comparisons.
	* libmisc/chowndir.c: Added brackets and parenthesis.
2010-03-18 18:52:53 +00:00
nekral-guest
0cbbdb32c4 * libmisc/strtoday.c: Add support for numerical dates, assuming
they are already specified in number of days since Epoch. Return
	-2 in case of errors to support the specification of -1.
	* src/usermod.c, src/useradd.c: Adapt to the new error value of
	strtoday().
	* src/chage.c:  Remove isnum(). Adapt to the new error value of
	strtoday(). Support for numerical dates is moved to strtoday().
2010-03-18 11:53:49 +00:00
nekral-guest
d562701538 * libmisc/copydir.c: Added parenthesis. 2010-03-11 22:00:41 +00:00
nekral-guest
391a384715 2010-01-30 Paweł Hajdan, Jr. <phajdan.jr@gentoo.org>
* NEWS: Add support for TCB.
	* lib/tcbfuncs.h, lib/tcbfuncs.c, lib/Makefile.am: New library to
	support TCB.
	* lib/prototypes, libmisc/copydir.c (remove_tree): Add boolean
	parameter remove_root.
	* configure.in: Add conditional WITH_TCB.
	* src/userdel.c, src/usermod.c: Add support for TCB. Update call to
	remove_tree().
	* src/pwconv.c, src/pwunconv.c: Should not be used with TCB enabled.
	* src/vipw.c: Add support for TCB. Update call to remove_tree().
	* src/useradd.c: Add support for TCB. Open the shadow file outside
	of open_files().
	* src/chage.c: Add support for TCB.
	* src/Makefile.am: Install passwd sgid shadow when TCB is enabled.
	* lib/getdefs.c, man/vipw.8.xml, man/login.defs.5.xml,
	man/login.defs/TCB_AUTH_GROUP.xml, man/login.defs/USE_TCB.xml,
	man/login.defs/TCB_SYMLINKS.xml, man/generate_mans.mak,
	man/generate_mans.deps, man/Makefile.am: New configuration
	parameters: TCB_AUTH_GROUP, TCB_SYMLINKS, USE_TCB.
	* lib/shadowio.c, lib/commonio.c: Add support for TCB.
2010-03-04 18:11:13 +00:00
nekral-guest
5ba95d4c53 * libmisc/env.c: Fix sanitize_env() noslash support. This fixes
Alioth#311740. Thanks to Jason Cassell.
2010-01-24 17:23:42 +00:00
nekral-guest
0fce70b091 * libmisc/setupenv.c: Fix typo from 2009-11-01. 2010-01-24 17:05:37 +00:00
nekral-guest
e770e87035 * NEWS, man/login.defs.d/ENV_SUPATH.xml, libmisc/setupenv.c:
Harmonize other paths and documentation with previous
	change.
2009-11-01 16:59:48 +00:00
nekral-guest
1e51ab0b23 * lib/commonio.c: Avoid pre-decrement operator (--n). Add some
comments.
	* libmisc/cleanup.c: Fix off by one in an assertion.
2009-09-08 21:00:12 +00:00
nekral-guest
031279dfb2 * libmisc/limits.c: Fix the format to match the unsigned long
variable in argument.
	* libmisc/utmp.c: Fix tests. tmptty is a variable stack. ut_host
	is an array of the ut structure. None of them can be NULL.
2009-09-07 19:50:00 +00:00
nekral-guest
1e6b107d99 2009-09-07 Steve Grubb <sgrubb@redhat.com>
* libmisc/copydir.c, lib/shadowmem.c, lib/groupmem.c, lib/pwmem.c:
	Fix some memory leaks.
2009-09-07 18:53:47 +00:00
nekral-guest
24cfe44b07 * libmisc/shell.c, src/su.c: Execute the scripts with "sh -"
rather than "sh".
2009-07-22 13:35:57 +00:00
nekral-guest
db38a728d1 * configure.in, libmisc/shell.c, libmisc/setupenv.c, src/newgrp.c,
src/su.c: Let the system shell be configurable.
2009-07-22 13:30:06 +00:00
nekral-guest
4ad827768e * NEWS, src/su.c, libmisc/shell.c: Added support for shells being a
shell script without a shebang.
2009-07-20 14:00:50 +00:00
nekral-guest
56c7096000 2009-07-18 Peter Vrabec <pvrabec@redhat.com>
* NEWS, libmisc/find_new_gid.c, libmisc/find_new_uid.c: Since
	system accounts are allocated from SYS_?ID_MIN to SYS_?ID_MAX in
	reverse order, accounts are packed close to SYS_?ID_MAX if
	SYS_?ID_MIN is already used but there are still dome gaps.
2009-07-18 00:35:35 +00:00
nekral-guest
b0bcb01888 * NEWS, libmisc/find_new_gid.c, libmisc/find_new_uid.c: Do not use
getpwent / getgrent for system accounts. Trying the low-IDs with
	getpwuid / getgrgid should be more efficient on LDAP configured
	systems with many accounts.
2009-07-17 22:54:23 +00:00
nekral-guest
fa69d08d13 * libmisc/xgetXXbyYY.c, libmisc/xgetpwnam.c, libmisc/xgetgrnam.c,
libmisc/xgetpwuid.c, libmisc/xgetgrgid.c, libmisc/xgetspnam.c: Do
	not limit the size of the buffer to hold the group or user
	structure. It used to be limited to 16k, which caused issues with
	groups having many users.
2009-06-11 21:33:00 +00:00
nekral-guest
738ebc04b9 * libmisc/copydir.c: Added warning for relative symlinks.
* libmisc/copydir.c (remove_tree): There is no need to check if
	the root argument exist. opendir() will report this.
2009-05-22 10:16:12 +00:00
nekral-guest
c859ad91c4 Added missing return value. 2009-05-18 22:46:13 +00:00
nekral-guest
4a4549c49b * src/userdel.c, libmisc/user_busy.c, libmisc/Makefile.am,
lib/prototypes.h: Move user_busy() to libmisc/user_busy.c.
	* NEWS, libmisc/user_busy.c: On Linux, do not check if an user is
	logged in with utmp, but check if the user is running some
	processes. If not on Linux, continue to search for an utmp record,
	but make sure the process recorded in the utmp entry is still
	running.
2009-05-18 18:32:17 +00:00
nekral-guest
f634cd3e2c * libmisc/console.c (console): Remove the leading /dev/ from the
tty before comparing with the lines specified by CONSOLE.
	* src/su.c: Do not remove the /dev/ prefix since it is done by
	console().
2009-05-16 18:19:24 +00:00
nekral-guest
87bb724151 * libmisc/shell.c: Removed invalid code that executed the user's
shell as a shell script when the direct execution of the user's
	shell failed with ENOEXEC and the user's shell has a shebang. The
	interpreter might not be the right one.  Executing the user's
	shell with sh -c might be better, but I'm not sure we should try
	harder when there is a failure. Note: The removed code was only
	included #ifndef __linux__.
2009-05-12 20:01:41 +00:00
nekral-guest
24875bb422 * libmisc/copydir.c: Added prototype of readlink_malloc(), and
readlink_malloc() changed to static.
2009-05-10 18:21:58 +00:00
nekral-guest
750093a3ed * lib/commonio.c: Avoid PATH_MAX. On glibc, we can use realpath
with a NULL argument.
	* src/useradd.c: Replace PATH_MAX by a fixed constant. The buffer
	was not meant as a storage for a path.
	* src/useradd.c, src/newusers.c, src/chpasswd.c: Better detection
	of fgets errors. Lines shall end with a \n, unless we reached the
	end of file.
	* libmisc/copydir.c: Avoid PATH_MAX. Support file paths with any
	length. Added readlink_malloc().
2009-05-10 13:49:03 +00:00
nekral-guest
8f64190223 Fix typos. 2009-05-09 13:15:38 +00:00
nekral-guest
d1534c53f7 * libmisc/non_interactive_pam_conv.c,
libmisc/pam_pass_non_interractive.c, libmisc/Makefile.am: Renamed.
	* libmisc/pam_pass_non_interractive.c, lib/prototypes.h:
	non_interactive_password and non_interactive_pam_conv do not need
	to be externally visible.
	* libmisc/pam_pass_non_interractive.c: Added declaration of
	ni_conv.
	* libmisc/pam_pass_non_interractive.c: Only compile ifdef USE_PAM.
	* libmisc/pam_pass_non_interractive.c, lib/prototypes.h:
	Added do_pam_passwd_non_interractive().
	* src/chpasswd.c: Use do_pam_passwd_non_interractive().
2009-05-09 13:15:25 +00:00
nekral-guest
19b672c3a4 * libmisc/pam_pass.c: Removed comment regarding pam_misc. This is
checked by configure.in.
2009-05-09 13:15:17 +00:00
nekral-guest
c527c0196b * libmisc/getgr_nam_gid.c, lib/get_gid.c, lib/get_pid.c,
lib/get_uid.c: Added splint annotations.
2009-04-30 21:12:33 +00:00
nekral-guest
a326ffa435 * lib/exitcodes.h: Define E_SUCCESS as EXIT_SUCCESS. Added FIXMEs.
* libmisc/chowntty.c, libmisc/rlogin.c, libmisc/sub.c,
	src/newusers.c, libmisc/sulog.c, libmisc/system.c, src/logoutd.c,
	src/groups.c, src/id.c, lib/encrypt.c, libmisc/audit_help.c,
	libmisc/limits.c: Return EXIT_FAILURE instead of 1, and
	EXIT_SUCCESS instead of 0.
	* libmisc/audit_help.c: Replace an fprintf() by fputs().
	* libmisc/audit_help.c: Remove documentation of the audit_logger
	returned values. The function returns void.
	* libmisc/system.c: Only return status if waitpid succeeded.
	Return -1 otherwise.
2009-04-30 21:08:49 +00:00
nekral-guest
0f448edf19 Fix some splint warnings.
Rmove debug code.
2009-04-28 22:01:20 +00:00
nekral-guest
a1591f77e8 * libmisc/Makefile.am, lib/prototypes.h,
libmisc/non_interactive_pam_conv.c: Added
	non_interactive_pam_conv() and non_interactive_password.
2009-04-28 20:07:24 +00:00
nekral-guest
102253834a * lib/prototypes.h: Replace #if by #ifdef
* lib/prototypes.h, libmisc/non_interactive_pam_conv.c: Added
	non_interactive_pam_conv() and non_interactive_password.
2009-04-28 20:06:46 +00:00
nekral-guest
dd85562fac * libmisc/utmp.c, src/userdel.c, src/logoutd.c: Replace #if by #ifdef 2009-04-28 20:03:23 +00:00
nekral-guest
a5188d2f05 * libmisc/failure.h: Replace HAVE_UTMPX_H by USE_UTMPX. 2009-04-28 19:19:33 +00:00
nekral-guest
6547cbda6f * libmisc/rlogin.c: Replace atoi() by getulong(). 2009-04-28 19:17:21 +00:00
nekral-guest
79919f184c * libmisc/failure.c: Replace HAVE_UTMPX_H by USE_UTMPX. 2009-04-28 19:14:50 +00:00
nekral-guest
e6b23e1431 * libmisc/chkname.c: Do not include <utmp.h> and <utmpx.h>. There
are no more needed.
2009-04-28 19:14:05 +00:00
nekral-guest
b0c0a94c66 * libmisc/limits.c: Replace strtol() by getlong().
* libmisc/limits.c: Replace HAVE_UTMPX_H by USE_UTMPX.
2009-04-28 19:12:48 +00:00
nekral-guest
851245107d * lib/prototypes.h: Replace HAVE_UTMPX_H by USE_UTMPX.
* lib/prototypes.h, libmisc/log.c: Added splint annotations.
	* libmisc/log.c: Added SYSLOG warning when lseek fails (should not
	happen).
2009-04-27 20:15:09 +00:00
nekral-guest
e88d1f5803 * libmisc/mail.c, libmisc/copydir.c: Added missing include of
<assert.h>
2009-04-27 20:09:18 +00:00
nekral-guest
988f7334ad * libmisc/env.c: Added assertions on the snprintf results. 2009-04-27 20:07:59 +00:00
nekral-guest
80fd2969c9 * libmisc/utmp.c: Replace HAVE_UTMPX_H by USE_UTMPX.
* libmisc/utmp.c: Removed old comment on HAVE_STRUCT_UTMP_UT_ID
	and UTMPX support.
2009-04-27 20:06:25 +00:00