Compare commits

...

12 Commits

Author SHA1 Message Date
Alejandro Colomar eae0b02796 Release 4.14.3
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-01-16 00:01:06 +01:00
Samanta Navarro 1c6a1206bd lib/sgetgrent.c: fix null pointer dereference
If reallocation fails in function list, then reset the size to 0 again.
Without the reset, the next call assumes that `members` points to
a memory location with reserved space.

Also use size_t instead of int for size to prevent signed integer
overflows. The length of group lines is not limited.

Fixes 45c0003e53 (4.14 release series)

Proof of Concept:

-  Prepare a group file (one long group line and a shorter one, both with a list of users)

	$ echo -n "root:x:0:" > /tmp/uwu
	$ yes , | tr -d '\n' | dd of=/tmp/uwu bs=10 count=3145728 seek=1 conv=notrunc iflag=fullblock
	$ echo -e "\nbin:x:1:," >> /tmp/uwu

-  Run grpck with tight memory constraints

	$ ulimit -d 102400
	$ grpck /tmp/uwu
	Segmentation fault (core dumped)

Reviewed-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
Cherry-picked-from: a9e07c0feb ("lib/sgetgrent.c: fix null pointer dereference")
Link: <https://github.com/shadow-maint/shadow/pull/904>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-01-16 00:00:43 +01:00
Alejandro Colomar 22656c36a2 Release 4.14.2
Link: <https://github.com/shadow-maint/shadow/pull/824>
Reviewed-by: Michael Vetter <jubalh@iodoru.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-10-30 00:14:15 +01:00
Michael Vetter 11071522a2 man: document --prefix option in chage, chpasswd and passwd
Support for `--prefix` was added in
https://github.com/shadow-maint/shadow/pull/714 and is available since
shadow 4.14.0.

Close https://github.com/shadow-maint/shadow/issues/822

Cherry-picked-from: 01f6258df7 ("man: document --prefix option in chage, chpasswd and passwd")
Link: <https://github.com/shadow-maint/shadow/pull/823>
Suggested-by: Michael Vetter <jubalh@iodoru.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-10-30 00:00:28 +01:00
Johannes Segitz 909036d714 useradd: Set proper SELinux labels for def_usrtemplate
Fixes: 74c17c716 ("Add support for skeleton files from /usr/etc/skel")

Signed-off-by: Johannes Segitz <jsegitz@suse.com>
Cherry-picked-from: 48aa12af31
Link: <https://github.com/shadow-maint/shadow/pull/812>
Reviewed-by: Michael Vetter <jubalh@iodoru.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-10-30 00:00:24 +01:00
Iker Pedrosa de50b39475 utmp: call prepare_utmp() even if utent is NULL
update_utmp() should also return 0 when success.

Fixes: 1f368e1c18 ("utmp: update
`update_utmp()")
Resolves: https://github.com/shadow-maint/shadow/issues/805

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Cherry-picked-from: 5178f8c5af
Link: <https://github.com/shadow-maint/shadow/issues/805>
Link: <https://github.com/shadow-maint/shadow/pull/808>
Reviewed-by: Michael Vetter <jubalh@iodoru.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-10-30 00:00:19 +01:00
Christian Göttsche b5c99ec30e lib/btrfs: avoid NULL-dereference
btrfs.c:42:13: warning: use of NULL 'cmd' where non-null expected [CWE-476] [-Wanalyzer-null-argument]

Reviewed-by: Alejandro Colomar <alx@kernel.org>
Cherry-picked-from: 54ab542887
Link: <https://github.com/shadow-maint/shadow/pull/770>
Reviewed-by: Michael Vetter <jubalh@iodoru.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-10-30 00:00:15 +01:00
Heiko Becker 58b96645c9 Replace __{BEGIN,END}_DECLS with #ifdef __cplusplus
Fixes the build with musl libc.

Cherry-picked-from: 890f911e17
Link: <https://github.com/shadow-maint/shadow/pull/789>
Reviewed-by: Michael Vetter <jubalh@iodoru.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-10-30 00:00:10 +01:00
Alejandro Colomar 817f3283d1 Release 4.14.1
The same thing, but this time, it's official.  :)

Link: <https://lists.sr.ht/~hallyn/shadow/%3Cphikwsgcwerp4anb4qpfkruwqqy4rqsmowv6pi23m5rqvhxw4i%40yuexyhynkim3%3E>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-09-25 17:55:14 +02:00
Alejandro Colomar 0e0bcacf3c Release 4.14.1-alx
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-09-18 14:50:02 +02:00
Alejandro Colomar 0004cc46dd lib: Merge libmisc into libshadow
The separation was unnecessary, and caused build problems.  Let's go
wild and obliterate the library.  The files are moved to libshadow.

Scripted change:

$ find libmisc/ -type f \
| grep '\.[chy]$' \
| xargs mv -t lib;

Plus updating the Makefile and other references.  While at it, I've
sorted the sources lists.

Link: <https://github.com/shadow-maint/shadow/pull/792>
Reported-by: David Seifert <soap@gentoo.org>
Cc: Sam James <sam@gentoo.org>
Cc: Christian Bricart <christian@bricart.de>
Cc: Michael Vetter <jubalh@iodoru.org>
Cc: Robert Förster <Dessa@gmake.de>
[ soap tested the Gentoo package ]
Tested-by: David Seifert <soap@gentoo.org>
Acked-by: David Seifert <soap@gentoo.org>
Acked-by: Serge Hallyn <serge@hallyn.com>
Acked-by: Iker Pedrosa <ipedrosa@redhat.com>
Acked-by: <lslebodn@fedoraproject.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-09-10 14:13:01 +02:00
Alejandro Colomar 1c330177f0 lib, libmisc: Move source files to lib (where their headers were)
Scripted change:

$ find lib/ -type f \
| grep '\.h$' \
| sed 's,lib/,libmisc/,' \
| sed 's,\.h$,.c,' \
| xargs find 2>/dev/null \
| xargs mv -t lib/;

Plus updating the Makefiles.

Closes: <https://github.com/shadow-maint/shadow/issues/791>
Closes: <https://bugs.gentoo.org/912446>
Link: <https://github.com/shadow-maint/shadow/issues/763#issuecomment-1664383425>
Link: <https://github.com/shadow-maint/shadow/pull/776>
Link: <https://github.com/shadow-maint/shadow/commit/d0518cc250afeaceb772a7f50a900cfc9b3ab937>
Reported-by: Christian Bricart <christian@bricart.de>
Reported-by: Robert Marmorstein <robert@marmorstein.org>
Cc: Sam James <sam@gentoo.org>
[ jubalh tested the openSUSE package ]
Tested-by: Michael Vetter <jubalh@iodoru.org>
Acked-by: Michael Vetter <jubalh@iodoru.org>
[ Robert F. tested the Gentoo package ]
Tested-by: Robert Förster <Dessa@gmake.de>
Cc: David Seifert <soap@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-09-10 14:12:54 +02:00
101 changed files with 254 additions and 231 deletions
+1 -1
View File
@@ -47,5 +47,5 @@ Makefile.in
/shadow.spec /shadow.spec
/shadow-*.tar.* /shadow-*.tar.*
/libmisc/getdate.c /lib/getdate.c
/libsubid/subid.h /libsubid/subid.h
+1 -1
View File
@@ -2,7 +2,7 @@
EXTRA_DIST = NEWS README TODO shadow.spec.in EXTRA_DIST = NEWS README TODO shadow.spec.in
SUBDIRS = libmisc lib SUBDIRS = lib
if ENABLE_SUBIDS if ENABLE_SUBIDS
SUBDIRS += libsubid SUBDIRS += libsubid
+2 -2
View File
@@ -10,13 +10,13 @@
Check when RLOGIN is enabled if ruserok() exists Check when RLOGIN is enabled if ruserok() exists
Move selinux_file_context out of libmisc/copydir.c Move selinux_file_context out of lib/copydir.c
Review hardcoded root account? Review hardcoded root account?
review all call to strto review all call to strto
libmisc/cleanup_user.c lib/cleanup_user.c
cleanup needed (cleanup_report_add_user* not used) cleanup needed (cleanup_report_add_user* not used)
+1 -2
View File
@@ -4,7 +4,7 @@ m4_define([libsubid_abi_major], 4)
m4_define([libsubid_abi_minor], 0) m4_define([libsubid_abi_minor], 0)
m4_define([libsubid_abi_micro], 0) m4_define([libsubid_abi_micro], 0)
m4_define([libsubid_abi], [libsubid_abi_major.libsubid_abi_minor.libsubid_abi_micro]) m4_define([libsubid_abi], [libsubid_abi_major.libsubid_abi_minor.libsubid_abi_micro])
AC_INIT([shadow], [4.14.0], [pkg-shadow-devel@lists.alioth.debian.org], [], AC_INIT([shadow], [4.14.3], [pkg-shadow-devel@lists.alioth.debian.org], [],
[https://github.com/shadow-maint/shadow]) [https://github.com/shadow-maint/shadow])
AM_INIT_AUTOMAKE([1.11 foreign dist-xz]) AM_INIT_AUTOMAKE([1.11 foreign dist-xz])
AC_CONFIG_MACRO_DIRS([m4]) AC_CONFIG_MACRO_DIRS([m4])
@@ -753,7 +753,6 @@ AC_CONFIG_FILES([
man/uk/Makefile man/uk/Makefile
man/zh_CN/Makefile man/zh_CN/Makefile
man/zh_TW/Makefile man/zh_TW/Makefile
libmisc/Makefile
lib/Makefile lib/Makefile
libsubid/Makefile libsubid/Makefile
libsubid/subid.h libsubid/subid.h
+122 -13
View File
@@ -5,58 +5,117 @@ DEFS =
noinst_LTLIBRARIES = libshadow.la noinst_LTLIBRARIES = libshadow.la
if USE_PAM
LIBCRYPT_PAM = $(LIBCRYPT)
else
LIBCRYPT_PAM =
endif
AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir) $(ECONF_CPPFLAGS)
libshadow_la_CPPFLAGS = $(ECONF_CPPFLAGS) libshadow_la_CPPFLAGS = $(ECONF_CPPFLAGS)
if HAVE_VENDORDIR if HAVE_VENDORDIR
libshadow_la_CPPFLAGS += -DVENDORDIR=\"$(VENDORDIR)\" libshadow_la_CPPFLAGS += -DVENDORDIR=\"$(VENDORDIR)\"
endif endif
libshadow_la_CPPFLAGS += -I$(top_srcdir) libshadow_la_CPPFLAGS += -I$(top_srcdir)
libshadow_la_CFLAGS = $(LIBBSD_CFLAGS) libshadow_la_CFLAGS = $(LIBBSD_CFLAGS) $(LIBCRYPT_PAM) $(LIBSYSTEMD)
libshadow_la_SOURCES = \ libshadow_la_SOURCES = \
addgrps.c \
age.c \
agetpass.c \
alloc.c \
alloc.h \
audit_help.c \
basename.c \
bit.c \
bit.h \
chkname.c \
chkname.h \
chowndir.c \
chowntty.c \
cleanup.c \
cleanup_group.c \
cleanup_user.c \
commonio.c \ commonio.c \
commonio.h \ commonio.h \
console.c \
copydir.c \
csrand.c \
date_to_str.c \
defines.h \ defines.h \
encrypt.c \ encrypt.c \
entry.c \
env.c \
exitcodes.h \ exitcodes.h \
faillog.h \ faillog.h \
failure.c \
failure.h \
fields.c \ fields.c \
find_new_gid.c \
find_new_uid.c \
find_new_sub_gids.c \
find_new_sub_uids.c \
fputsx.c \ fputsx.c \
getdef.c \
getdef.h \
get_gid.c \ get_gid.c \
getlong.c \
get_pid.c \ get_pid.c \
get_uid.c \ get_uid.c \
getdate.h \
getdate.y \
getdef.c \
getdef.h \
getlong.c \
getgr_nam_gid.c \
getrange.c \
gettime.c \
getulong.c \ getulong.c \
groupio.c \ groupio.c \
groupmem.c \ groupmem.c \
groupio.h \ groupio.h \
gshadow.c \ gshadow.c \
hushed.c \
idmapping.h \
idmapping.c \
isexpired.c \
limits.c \
list.c \
lockpw.c \ lockpw.c \
loginprompt.c \
mail.c \
mempcpy.c \
mempcpy.h \
motd.c \
myname.c \
nss.c \ nss.c \
nscd.c \ nscd.c \
nscd.h \ nscd.h \
shadowlog.c \ obscure.c \
shadowlog.h \
shadowlog_internal.h \
sssd.c \
sssd.h \
pam_defs.h \ pam_defs.h \
pam_pass.c \
pam_pass_non_interactive.c \
port.c \ port.c \
port.h \ port.h \
prefix_flag.c \
prototypes.h \ prototypes.h \
pwauth.c \ pwauth.c \
pwauth.h \ pwauth.h \
pwio.c \ pwio.c \
pwio.h \ pwio.h \
pwd_init.c \
pwd2spwd.c \
pwdcheck.c \
pwmem.c \ pwmem.c \
remove_tree.c \
rlogin.c \
root_flag.c \
run_part.h \ run_part.h \
run_part.c \ run_part.c \
subordinateio.h \ salt.c \
subordinateio.c \
selinux.c \ selinux.c \
semanage.c \ semanage.c \
setugid.c \
setupenv.c \
sgetgrent.c \ sgetgrent.c \
sgetpwent.c \ sgetpwent.c \
sgetspent.c \ sgetspent.c \
@@ -65,14 +124,63 @@ libshadow_la_SOURCES = \
shadow.c \ shadow.c \
shadowio.c \ shadowio.c \
shadowio.h \ shadowio.h \
shadowlog.c \
shadowlog.h \
shadowlog_internal.h \
shadowmem.c \ shadowmem.c \
shell.c \
spawn.c \ spawn.c \
write_full.c sssd.c \
sssd.h \
stpecpy.c \
stpecpy.h \
stpeprintf.c \
stpeprintf.h \
strtoday.c \
sub.c \
subordinateio.h \
subordinateio.c \
sulog.c \
ttytype.c \
tz.c \
ulimit.c \
user_busy.c \
valid.c \
write_full.c \
xgetpwnam.c \
xprefix_getpwnam.c \
xgetpwuid.c \
xgetgrnam.c \
xgetgrgid.c \
xgetspnam.c \
yesno.c
if WITH_TCB if WITH_TCB
libshadow_la_SOURCES += tcbfuncs.c tcbfuncs.h libshadow_la_SOURCES += tcbfuncs.c tcbfuncs.h
endif endif
if WITH_BTRFS
libshadow_la_SOURCES += btrfs.c
endif
if ENABLE_LASTLOG
libshadow_la_SOURCES += log.c
endif
if ENABLE_LOGIND
libshadow_la_SOURCES += logind.c
else
libshadow_la_SOURCES += utmp.c
endif
if !WITH_LIBBSD
libshadow_la_SOURCES += \
freezero.h \
freezero.c \
readpassphrase.h \
readpassphrase.c
endif
# These files are unneeded for some reason, listed in # These files are unneeded for some reason, listed in
# order of appearance: # order of appearance:
# #
@@ -80,4 +188,5 @@ endif
EXTRA_DIST = \ EXTRA_DIST = \
.indent.pro \ .indent.pro \
gshadow_.h gshadow_.h \
xgetXXbyYY.c
View File
View File
View File
View File
+1 -1
View File
@@ -39,7 +39,7 @@ static int run_btrfs_subvolume_cmd(const char *subcmd, const char *arg1, const c
NULL NULL
}; };
if (access(cmd, X_OK)) { if (!cmd || access(cmd, X_OK)) {
return 1; return 1;
} }
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
+1 -1
View File
@@ -10,7 +10,7 @@
/* /*
* prototypes.h * prototypes.h
* *
* prototypes of libmisc functions, and private lib functions. * prototypes of some lib functions, and private lib functions.
* *
* $Id$ * $Id$
* *
@@ -36,8 +36,12 @@
#endif #endif
#include <sys/types.h> #include <sys/types.h>
__BEGIN_DECLS #ifdef __cplusplus
extern "C" {
#endif
char * readpassphrase(const char *, char *, size_t, int); char * readpassphrase(const char *, char *, size_t, int);
__END_DECLS #ifdef __cplusplus
}
#endif
#endif /* !LIBBSD_READPASSPHRASE_H */ #endif /* !LIBBSD_READPASSPHRASE_H */
View File
View File
View File
+5 -3
View File
@@ -37,8 +37,8 @@
static char **list (char *s) static char **list (char *s)
{ {
static char **members = NULL; static char **members = NULL;
static int size = 0; /* max members + 1 */ static size_t size = 0; /* max members + 1 */
int i; size_t i;
i = 0; i = 0;
for (;;) { for (;;) {
@@ -47,8 +47,10 @@ static char **list (char *s)
if (i >= size) { if (i >= size) {
size = i + 100; /* at least: i + 1 */ size = i + 100; /* at least: i + 1 */
members = REALLOCF(members, size, char *); members = REALLOCF(members, size, char *);
if (!members) if (!members) {
size = 0;
return NULL; return NULL;
}
} }
if (!s || s[0] == '\0') if (!s || s[0] == '\0')
break; break;
View File
View File
View File
View File
View File
View File
View File
+5 -6
View File
@@ -368,17 +368,16 @@ int update_utmp (const char *user,
struct utmp *utent, *ut; struct utmp *utent, *ut;
utent = get_current_utmp (); utent = get_current_utmp ();
if (utent == NULL) {
return -1;
}
ut = prepare_utmp (user, tty, host, utent); ut = prepare_utmp (user, tty, host, utent);
(void) setutmp (ut); /* make entry in the utmp & wtmp files */ (void) setutmp (ut); /* make entry in the utmp & wtmp files */
free (utent);
if (utent != NULL) {
free (utent);
}
free (ut); free (ut);
return 1; return 0;
} }
void record_failure(const char *failent_user, void record_failure(const char *failent_user,
View File
View File
-5
View File
@@ -1,5 +0,0 @@
-kr
-i8
-bad
-pcs
-l80
-114
View File
@@ -1,114 +0,0 @@
EXTRA_DIST = .indent.pro xgetXXbyYY.c
AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir) $(ECONF_CPPFLAGS)
noinst_LTLIBRARIES = libmisc.la
if USE_PAM
LIBCRYPT_PAM = $(LIBCRYPT)
else
LIBCRYPT_PAM =
endif
libmisc_la_CFLAGS = $(LIBBSD_CFLAGS) $(LIBCRYPT_PAM) $(LIBSYSTEMD)
libmisc_la_SOURCES = \
addgrps.c \
age.c \
agetpass.c \
alloc.c \
../lib/alloc.h \
audit_help.c \
basename.c \
bit.c \
../lib/bit.h \
chkname.c \
chkname.h \
chowndir.c \
chowntty.c \
cleanup.c \
cleanup_group.c \
cleanup_user.c \
console.c \
copydir.c \
date_to_str.c \
entry.c \
env.c \
failure.c \
failure.h \
find_new_gid.c \
find_new_uid.c \
find_new_sub_gids.c \
find_new_sub_uids.c \
getdate.h \
getdate.y \
getgr_nam_gid.c \
getrange.c \
gettime.c \
hushed.c \
idmapping.h \
idmapping.c \
isexpired.c \
limits.c \
list.c \
loginprompt.c \
mail.c \
mempcpy.c \
motd.c \
myname.c \
obscure.c \
pam_pass.c \
pam_pass_non_interactive.c \
prefix_flag.c \
pwd2spwd.c \
pwdcheck.c \
pwd_init.c \
csrand.c \
remove_tree.c \
rlogin.c \
root_flag.c \
salt.c \
setugid.c \
setupenv.c \
shell.c \
stpecpy.c \
../lib/stpecpy.h \
stpeprintf.c \
../lib/stpeprintf.h \
strtoday.c \
sub.c \
sulog.c \
ttytype.c \
tz.c \
ulimit.c \
user_busy.c \
valid.c \
xgetpwnam.c \
xprefix_getpwnam.c \
xgetpwuid.c \
xgetgrnam.c \
xgetgrgid.c \
xgetspnam.c \
yesno.c
if WITH_BTRFS
libmisc_la_SOURCES += btrfs.c
endif
if ENABLE_LASTLOG
libmisc_la_SOURCES += log.c
endif
if ENABLE_LOGIND
libmisc_la_SOURCES += logind.c
else
libmisc_la_SOURCES += utmp.c
endif
if !WITH_LIBBSD
libmisc_la_SOURCES += \
freezero.h \
freezero.c \
readpassphrase.h \
readpassphrase.c
endif
-2
View File
@@ -21,10 +21,8 @@ MISCLIBS = \
libsubid_la_LIBADD = \ libsubid_la_LIBADD = \
$(top_builddir)/lib/libshadow.la \ $(top_builddir)/lib/libshadow.la \
$(top_builddir)/libmisc/libmisc.la \
$(MISCLIBS) -ldl $(MISCLIBS) -ldl
AM_CPPFLAGS = \ AM_CPPFLAGS = \
-I${top_srcdir}/lib \ -I${top_srcdir}/lib \
-I${top_srcdir}/libmisc \
-DLOCALEDIR=\"$(datadir)/locale\" -DLOCALEDIR=\"$(datadir)/locale\"
+15
View File
@@ -198,6 +198,21 @@
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>
<option>-P</option>, <option>--prefix</option>&nbsp;<replaceable>PREFIX_DIR</replaceable>
</term>
<listitem>
<para>
Apply changes to configuration files under the root filesystem
found under the directory <replaceable>PREFIX_DIR</replaceable>.
This option does not chroot and is intended for preparing a cross-compilation
target. Some limitations: NIS and LDAP users/groups are
not verified. PAM authentication is using the host files.
No SELINUX support.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term> <term>
<option>-W</option>, <option>--warndays</option>&nbsp;<replaceable>WARN_DAYS</replaceable> <option>-W</option>, <option>--warndays</option>&nbsp;<replaceable>WARN_DAYS</replaceable>
+15
View File
@@ -173,6 +173,21 @@
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>
<option>-P</option>, <option>--prefix</option>&nbsp;<replaceable>PREFIX_DIR</replaceable>
</term>
<listitem>
<para>
Apply changes to configuration files under the root filesystem
found under the directory <replaceable>PREFIX_DIR</replaceable>.
This option does not chroot and is intended for preparing a cross-compilation
target. Some limitations: NIS and LDAP users/groups are
not verified. PAM authentication is using the host files.
No SELINUX support.
</para>
</listitem>
</varlistentry>
<varlistentry condition="sha_crypt"> <varlistentry condition="sha_crypt">
<term> <term>
<option>-s</option>, <option>--sha-rounds</option>&nbsp;<replaceable>ROUNDS</replaceable> <option>-s</option>, <option>--sha-rounds</option>&nbsp;<replaceable>ROUNDS</replaceable>
+15
View File
@@ -280,6 +280,21 @@
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>
<option>-P</option>, <option>--prefix</option>&nbsp;<replaceable>PREFIX_DIR</replaceable>
</term>
<listitem>
<para>
Apply changes to configuration files under the root filesystem
found under the directory <replaceable>PREFIX_DIR</replaceable>.
This option does not chroot and is intended for preparing a cross-compilation
target. Some limitations: NIS and LDAP users/groups are
not verified. PAM authentication is using the host files.
No SELINUX support.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term> <term>
<option>-S</option>, <option>--status</option> <option>-S</option>, <option>--status</option>
+58 -58
View File
@@ -1,24 +1,68 @@
# List of files which contain translatable strings. # List of files which contain translatable strings.
lib/addgrps.c
lib/age.c
lib/audit_help.c
lib/basename.c
lib/chkname.c
lib/chowndir.c
lib/chowntty.c
lib/cleanup.c
lib/cleanup_group.c
lib/cleanup_user.c
lib/commonio.c lib/commonio.c
lib/console.c
lib/copydir.c
lib/date_to_str.c
lib/encrypt.c lib/encrypt.c
lib/entry.c
lib/env.c
lib/failure.c
lib/fields.c lib/fields.c
lib/find_new_gid.c
lib/find_new_sub_gids.c
lib/find_new_sub_uids.c
lib/find_new_uid.c
lib/fputsx.c lib/fputsx.c
lib/getdef.c
lib/get_gid.c lib/get_gid.c
lib/getlong.c
lib/get_uid.c lib/get_uid.c
lib/getdef.c
lib/getlong.c
lib/getgr_nam_gid.c
lib/getrange.c
lib/groupio.c lib/groupio.c
lib/groupmem.c lib/groupmem.c
lib/gshadow.c lib/gshadow.c
lib/hushed.c
lib/idmapping.c
lib/isexpired.c
lib/limits.c
lib/list.c
lib/lockpw.c lib/lockpw.c
lib/log.c
lib/loginprompt.c
lib/mail.c
lib/motd.c
lib/myname.c
lib/nscd.c lib/nscd.c
lib/obscure.c
lib/pam_pass.c
lib/pam_pass_non_interactive.c
lib/port.c lib/port.c
lib/pwauth.c lib/pwauth.c
lib/pwd_init.c
lib/pwd2spwd.c
lib/pwdcheck.c
lib/pwio.c lib/pwio.c
lib/pwmem.c lib/pwmem.c
lib/remove_tree.c
lib/rlogin.c
lib/root_flag.c
lib/salt.c
lib/selinux.c lib/selinux.c
lib/semanage.c lib/semanage.c
lib/setugid.c
lib/setupenv.c
lib/sgetgrent.c lib/sgetgrent.c
lib/sgetpwent.c lib/sgetpwent.c
lib/sgetspent.c lib/sgetspent.c
@@ -26,64 +70,20 @@ lib/sgroupio.c
lib/shadow.c lib/shadow.c
lib/shadowio.c lib/shadowio.c
lib/shadowmem.c lib/shadowmem.c
lib/shell.c
lib/spawn.c lib/spawn.c
lib/strtoday.c
lib/sub.c
lib/sulog.c
lib/tcbfuncs.c lib/tcbfuncs.c
libmisc/addgrps.c lib/ttytype.c
libmisc/age.c lib/tz.c
libmisc/audit_help.c lib/ulimit.c
libmisc/basename.c lib/user_busy.c
libmisc/chkname.c lib/utmp.c
libmisc/chowndir.c lib/valid.c
libmisc/chowntty.c lib/xgetXXbyYY.c
libmisc/cleanup.c lib/yesno.c
libmisc/cleanup_group.c
libmisc/cleanup_user.c
libmisc/console.c
libmisc/copydir.c
libmisc/date_to_str.c
libmisc/entry.c
libmisc/env.c
libmisc/failure.c
libmisc/find_new_gid.c
libmisc/find_new_sub_gids.c
libmisc/find_new_sub_uids.c
libmisc/find_new_uid.c
libmisc/getgr_nam_gid.c
libmisc/getrange.c
libmisc/hushed.c
libmisc/idmapping.c
libmisc/isexpired.c
libmisc/limits.c
libmisc/list.c
libmisc/log.c
libmisc/loginprompt.c
libmisc/mail.c
libmisc/motd.c
libmisc/myname.c
libmisc/obscure.c
libmisc/pam_pass.c
libmisc/pam_pass_non_interactive.c
libmisc/pwd2spwd.c
libmisc/pwdcheck.c
libmisc/pwd_init.c
libmisc/remove_tree.c
libmisc/rlogin.c
libmisc/root_flag.c
libmisc/salt.c
libmisc/setugid.c
libmisc/setupenv.c
libmisc/shell.c
libmisc/strtoday.c
libmisc/sub.c
libmisc/sulog.c
libmisc/ttytype.c
libmisc/tz.c
libmisc/ulimit.c
libmisc/user_busy.c
libmisc/utmp.c
libmisc/valid.c
libmisc/xgetXXbyYY.c
libmisc/yesno.c
src/chage.c src/chage.c
src/chfn.c src/chfn.c
src/chgpasswd.c src/chgpasswd.c
+1 -13
View File
@@ -9,7 +9,6 @@ sgidperms = 2755
AM_CPPFLAGS = \ AM_CPPFLAGS = \
-I${top_srcdir}/lib \ -I${top_srcdir}/lib \
-I$(top_srcdir)/libmisc \
-I$(top_srcdir) \ -I$(top_srcdir) \
-DLOCALEDIR=\"$(datadir)/locale\" \ -DLOCALEDIR=\"$(datadir)/locale\" \
$(ECONF_CPPFLAGS) $(ECONF_CPPFLAGS)
@@ -85,7 +84,6 @@ shadowsgidubins = passwd
endif endif
LDADD = $(INTLLIBS) \ LDADD = $(INTLLIBS) \
$(top_builddir)/libmisc/libmisc.la \
$(top_builddir)/lib/libshadow.la \ $(top_builddir)/lib/libshadow.la \
$(LIBTCB) $(LIBTCB)
@@ -183,59 +181,49 @@ MISCLIBS = \
getsubids_LDADD = \ getsubids_LDADD = \
$(top_builddir)/lib/libshadow.la \ $(top_builddir)/lib/libshadow.la \
$(top_builddir)/libmisc/libmisc.la \
$(top_builddir)/libsubid/libsubid.la \ $(top_builddir)/libsubid/libsubid.la \
$(MISCLIBS) -ldl $(MISCLIBS) -ldl
getsubids_CPPFLAGS = \ getsubids_CPPFLAGS = \
-I$(top_srcdir)/lib \ -I$(top_srcdir)/lib \
-I$(top_srcdir)/libmisc \
-I$(top_srcdir) \ -I$(top_srcdir) \
-I$(top_builddir)/libsubid -I$(top_builddir)/libsubid
get_subid_owners_LDADD = \ get_subid_owners_LDADD = \
$(top_builddir)/lib/libshadow.la \ $(top_builddir)/lib/libshadow.la \
$(top_builddir)/libmisc/libmisc.la \
$(top_builddir)/libsubid/libsubid.la \ $(top_builddir)/libsubid/libsubid.la \
$(MISCLIBS) -ldl $(MISCLIBS) -ldl
get_subid_owners_CPPFLAGS = \ get_subid_owners_CPPFLAGS = \
-I$(top_srcdir)/lib \ -I$(top_srcdir)/lib \
-I$(top_srcdir)/libmisc \
-I$(top_srcdir) \ -I$(top_srcdir) \
-I$(top_builddir)/libsubid -I$(top_builddir)/libsubid
new_subid_range_CPPFLAGS = \ new_subid_range_CPPFLAGS = \
-I$(top_srcdir)/lib \ -I$(top_srcdir)/lib \
-I$(top_srcdir)/libmisc \
-I$(top_srcdir) \ -I$(top_srcdir) \
-I$(top_builddir)/libsubid -I$(top_builddir)/libsubid
new_subid_range_LDADD = \ new_subid_range_LDADD = \
$(top_builddir)/lib/libshadow.la \ $(top_builddir)/lib/libshadow.la \
$(top_builddir)/libmisc/libmisc.la \
$(top_builddir)/libsubid/libsubid.la \ $(top_builddir)/libsubid/libsubid.la \
$(MISCLIBS) -ldl $(MISCLIBS) -ldl
free_subid_range_CPPFLAGS = \ free_subid_range_CPPFLAGS = \
-I$(top_srcdir)/lib \ -I$(top_srcdir)/lib \
-I$(top_srcdir)/libmisc \
-I$(top_srcdir) \ -I$(top_srcdir) \
-I$(top_builddir)/libsubid -I$(top_builddir)/libsubid
free_subid_range_LDADD = \ free_subid_range_LDADD = \
$(top_builddir)/lib/libshadow.la \ $(top_builddir)/lib/libshadow.la \
$(top_builddir)/libmisc/libmisc.la \
$(top_builddir)/libsubid/libsubid.la \ $(top_builddir)/libsubid/libsubid.la \
$(MISCLIBS) -ldl $(MISCLIBS) -ldl
check_subid_range_CPPFLAGS = \ check_subid_range_CPPFLAGS = \
-I$(top_srcdir)/lib \ -I$(top_srcdir)/lib \
-I$(top_srcdir) \ -I$(top_srcdir)
-I$(top_srcdir)/libmisc
check_subid_range_LDADD = \ check_subid_range_LDADD = \
$(top_builddir)/lib/libshadow.la \ $(top_builddir)/lib/libshadow.la \
$(top_builddir)/libmisc/libmisc.la \
$(MISCLIBS) -ldl $(MISCLIBS) -ldl
endif endif
+2 -2
View File
@@ -97,8 +97,8 @@ static pid_t pid_child = 0;
* External identifiers * External identifiers
*/ */
extern char **newenvp; /* libmisc/env.c */ extern char **newenvp; /* lib/env.c */
extern size_t newenvc; /* libmisc/env.c */ extern size_t newenvc; /* lib/env.c */
/* local function prototypes */ /* local function prototypes */
+1 -1
View File
@@ -2787,7 +2787,7 @@ int main (int argc, char **argv)
if (home_added) { if (home_added) {
copy_tree (def_template, prefix_user_home, false, true, copy_tree (def_template, prefix_user_home, false, true,
(uid_t)-1, user_id, (gid_t)-1, user_gid); (uid_t)-1, user_id, (gid_t)-1, user_gid);
copy_tree (def_usrtemplate, prefix_user_home, false, false, copy_tree (def_usrtemplate, prefix_user_home, false, true,
(uid_t)-1, user_id, (gid_t)-1, user_gid); (uid_t)-1, user_id, (gid_t)-1, user_gid);
} else { } else {
fprintf (stderr, fprintf (stderr,
-2
View File
@@ -82,7 +82,6 @@ prepare_chroot ()
# Copy existing gcda # Copy existing gcda
mkdir -p tmp/root$build_path/lib mkdir -p tmp/root$build_path/lib
mkdir -p tmp/root$build_path/libmisc
mkdir -p tmp/root$build_path/src mkdir -p tmp/root$build_path/src
find "$build_path" -name "*.gcda" | while read f find "$build_path" -name "*.gcda" | while read f
do do
@@ -113,7 +112,6 @@ clean_chroot ()
mv "$f" "$g" mv "$f" "$g"
done done
rmdir tmp/root$build_path/lib rmdir tmp/root$build_path/lib
rmdir tmp/root$build_path/libmisc
rmdir tmp/root$build_path/src rmdir tmp/root$build_path/src
rmdir tmp/root$build_path rmdir tmp/root$build_path
rmdir tmp/root/root/build rmdir tmp/root/root/build

Some files were not shown because too many files have changed in this diff Show More