2007-10-07 17:14:02 +05:30
|
|
|
|
* lib/prototypes.h, configure.in, libmisc/Makefile.am,
libmisc/xgetXXbyYY.c, libmisc/xgetpwnam.c, libmisc/xgetpwuid.c,
libmisc/xgetgrnam.c, libmisc/xgetgrgid.c, libmisc/xgetspnam.c:
Added functions xgetpwnam(), xgetpwuid(), xgetgrnam(),
xgetgrgid(), and xgetspnam(). They allocate memory for the
returned structure and are more robust to successive calls. They
are implemented with the libc's getxxyyy_r() functions if
available.
* libmisc/limits.c, libmisc/entry.c, libmisc/chowntty.c,
libmisc/addgrps.c, libmisc/myname.c, libmisc/rlogin.c,
libmisc/pwdcheck.c, src/newgrp.c, src/login_nopam.c,
src/userdel.c, src/lastlog.c, src/grpck.c, src/gpasswd.c,
src/newusers.c, src/chpasswd.c, src/chfn.c, src/groupmems.c,
src/usermod.c, src/expiry.c, src/groupdel.c, src/chgpasswd.c,
src/su.c, src/useradd.c, src/groupmod.c, src/passwd.c, src/pwck.c,
src/groupadd.c, src/chage.c, src/login.c, src/suauth.c,
src/faillog.c, src/groups.c, src/chsh.c, src/id.c: Review all the
usage of one of the getpwnam(), getpwuid(), getgrnam(),
getgrgid(), and getspnam() functions. It was noticed on
http://bugs.debian.org/341230 that chfn and chsh use a passwd
structure after calling a pam function, which result in using
information from the passwd structure requested by pam, not the
original one. It is much easier to use the new xget... functions
to avoid these issues. I've checked which call to the original
get... functions could be left (reducing the scope of the
structure if possible), and I've left comments to ease future
reviews (e.g. /* local, no need for xgetpwnam */).
Note: the getpwent/getgrent calls should probably be checked also.
* src/groupdel.c, src/expiry.c: Fix typos in comments.
* src/groupmod.c: Re-indent.
* libmisc/Makefile.am, lib/groupmem.c, lib/groupio.c, lib/pwmem.c,
lib/pwio.c, lib/shadowmem.c, lib/shadowio.c: Move the __<xx>_dup
functions (used by the xget... functions) from the <xx>io.c files
to the new <xx>mem.c files. This avoid linking some utils against
the SELinux library.
2007-11-19 04:45:26 +05:30
|
|
|
EXTRA_DIST = .indent.pro xgetXXbyYY.c
|
2007-10-07 17:14:02 +05:30
|
|
|
|
2007-10-07 17:15:23 +05:30
|
|
|
INCLUDES = -I$(top_srcdir)/lib
|
2007-10-07 17:14:02 +05:30
|
|
|
|
2007-10-07 17:15:40 +05:30
|
|
|
noinst_LIBRARIES = libmisc.a
|
2007-10-07 17:14:02 +05:30
|
|
|
|
2007-10-07 17:15:40 +05:30
|
|
|
libmisc_a_SOURCES = \
|
2007-10-07 17:14:38 +05:30
|
|
|
addgrps.c \
|
|
|
|
age.c \
|
2007-10-07 17:17:01 +05:30
|
|
|
audit_help.c \
|
2007-10-07 17:14:38 +05:30
|
|
|
basename.c \
|
|
|
|
chkname.c \
|
2007-10-07 17:14:51 +05:30
|
|
|
chkname.h \
|
2007-10-07 17:14:38 +05:30
|
|
|
chowndir.c \
|
|
|
|
chowntty.c \
|
2008-12-23 03:22:43 +05:30
|
|
|
cleanup.c \
|
|
|
|
cleanup_group.c \
|
|
|
|
cleanup_user.c \
|
2007-10-07 17:14:38 +05:30
|
|
|
console.c \
|
|
|
|
copydir.c \
|
|
|
|
entry.c \
|
|
|
|
env.c \
|
|
|
|
failure.c \
|
2007-10-07 17:14:51 +05:30
|
|
|
failure.h \
|
2007-10-07 17:14:38 +05:30
|
|
|
fields.c \
|
2008-06-16 00:03:52 +05:30
|
|
|
find_new_gid.c \
|
|
|
|
find_new_uid.c \
|
2007-10-07 17:14:51 +05:30
|
|
|
getdate.h \
|
2007-10-07 17:17:01 +05:30
|
|
|
getdate.y \
|
2009-04-11 04:04:10 +05:30
|
|
|
getgr_nam_gid.c \
|
2008-06-15 02:31:11 +05:30
|
|
|
getrange.c \
|
2007-10-07 17:14:38 +05:30
|
|
|
hushed.c \
|
|
|
|
isexpired.c \
|
|
|
|
limits.c \
|
|
|
|
list.c log.c \
|
|
|
|
loginprompt.c \
|
|
|
|
mail.c \
|
|
|
|
motd.c \
|
|
|
|
myname.c \
|
|
|
|
obscure.c \
|
|
|
|
pam_pass.c \
|
2009-05-09 18:45:25 +05:30
|
|
|
pam_pass_non_interractive.c \
|
2007-10-07 17:14:38 +05:30
|
|
|
pwd2spwd.c \
|
2007-10-07 17:14:44 +05:30
|
|
|
pwdcheck.c \
|
2007-10-07 17:14:38 +05:30
|
|
|
pwd_init.c \
|
|
|
|
rlogin.c \
|
|
|
|
salt.c \
|
|
|
|
setugid.c \
|
|
|
|
setupenv.c \
|
|
|
|
shell.c \
|
2009-04-11 21:04:10 +05:30
|
|
|
system.c \
|
2007-10-07 17:14:38 +05:30
|
|
|
strtoday.c \
|
|
|
|
sub.c \
|
|
|
|
sulog.c \
|
|
|
|
ttytype.c \
|
|
|
|
tz.c \
|
|
|
|
ulimit.c \
|
|
|
|
utmp.c \
|
|
|
|
valid.c \
|
* lib/prototypes.h, configure.in, libmisc/Makefile.am,
libmisc/xgetXXbyYY.c, libmisc/xgetpwnam.c, libmisc/xgetpwuid.c,
libmisc/xgetgrnam.c, libmisc/xgetgrgid.c, libmisc/xgetspnam.c:
Added functions xgetpwnam(), xgetpwuid(), xgetgrnam(),
xgetgrgid(), and xgetspnam(). They allocate memory for the
returned structure and are more robust to successive calls. They
are implemented with the libc's getxxyyy_r() functions if
available.
* libmisc/limits.c, libmisc/entry.c, libmisc/chowntty.c,
libmisc/addgrps.c, libmisc/myname.c, libmisc/rlogin.c,
libmisc/pwdcheck.c, src/newgrp.c, src/login_nopam.c,
src/userdel.c, src/lastlog.c, src/grpck.c, src/gpasswd.c,
src/newusers.c, src/chpasswd.c, src/chfn.c, src/groupmems.c,
src/usermod.c, src/expiry.c, src/groupdel.c, src/chgpasswd.c,
src/su.c, src/useradd.c, src/groupmod.c, src/passwd.c, src/pwck.c,
src/groupadd.c, src/chage.c, src/login.c, src/suauth.c,
src/faillog.c, src/groups.c, src/chsh.c, src/id.c: Review all the
usage of one of the getpwnam(), getpwuid(), getgrnam(),
getgrgid(), and getspnam() functions. It was noticed on
http://bugs.debian.org/341230 that chfn and chsh use a passwd
structure after calling a pam function, which result in using
information from the passwd structure requested by pam, not the
original one. It is much easier to use the new xget... functions
to avoid these issues. I've checked which call to the original
get... functions could be left (reducing the scope of the
structure if possible), and I've left comments to ease future
reviews (e.g. /* local, no need for xgetpwnam */).
Note: the getpwent/getgrent calls should probably be checked also.
* src/groupdel.c, src/expiry.c: Fix typos in comments.
* src/groupmod.c: Re-indent.
* libmisc/Makefile.am, lib/groupmem.c, lib/groupio.c, lib/pwmem.c,
lib/pwio.c, lib/shadowmem.c, lib/shadowio.c: Move the __<xx>_dup
functions (used by the xget... functions) from the <xx>io.c files
to the new <xx>mem.c files. This avoid linking some utils against
the SELinux library.
2007-11-19 04:45:26 +05:30
|
|
|
xgetpwnam.c \
|
|
|
|
xgetpwuid.c \
|
|
|
|
xgetgrnam.c \
|
|
|
|
xgetgrgid.c \
|
|
|
|
xgetspnam.c \
|
2007-12-26 22:20:38 +05:30
|
|
|
xmalloc.c \
|
|
|
|
yesno.c
|