Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22656c36a2 | ||
|
|
11071522a2 | ||
|
|
909036d714 | ||
|
|
de50b39475 | ||
|
|
b5c99ec30e | ||
|
|
58b96645c9 | ||
|
|
817f3283d1 | ||
|
|
0e0bcacf3c | ||
|
|
0004cc46dd | ||
|
|
1c330177f0 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
4
TODO
4
TODO
@@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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.2], [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
|
||||||
|
|||||||
135
lib/Makefile.am
135
lib/Makefile.am
@@ -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
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -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 */
|
||||||
@@ -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,
|
||||||
5
libmisc/.indent.pro
vendored
5
libmisc/.indent.pro
vendored
@@ -1,5 +0,0 @@
|
|||||||
-kr
|
|
||||||
-i8
|
|
||||||
-bad
|
|
||||||
-pcs
|
|
||||||
-l80
|
|
||||||
@@ -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
|
|
||||||
@@ -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\"
|
||||||
|
|||||||
@@ -198,6 +198,21 @@
|
|||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<option>-P</option>, <option>--prefix</option> <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> <replaceable>WARN_DAYS</replaceable>
|
<option>-W</option>, <option>--warndays</option> <replaceable>WARN_DAYS</replaceable>
|
||||||
|
|||||||
@@ -173,6 +173,21 @@
|
|||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<option>-P</option>, <option>--prefix</option> <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> <replaceable>ROUNDS</replaceable>
|
<option>-s</option>, <option>--sha-rounds</option> <replaceable>ROUNDS</replaceable>
|
||||||
|
|||||||
@@ -280,6 +280,21 @@
|
|||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<option>-P</option>, <option>--prefix</option> <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>
|
||||||
|
|||||||
116
po/POTFILES.in
116
po/POTFILES.in
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
4
src/su.c
4
src/su.c
@@ -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 */
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ all: test_nss libsubid_zzz.so
|
|||||||
|
|
||||||
test_nss: test_nss.c ../../../lib/nss.c
|
test_nss: test_nss.c ../../../lib/nss.c
|
||||||
gcc -c -I../../../lib/ -I../../.. -o test_nss.o test_nss.c
|
gcc -c -I../../../lib/ -I../../.. -o test_nss.o test_nss.c
|
||||||
gcc -o test_nss test_nss.o ../../../libmisc/.libs/libmisc.a ../../../lib/.libs/libshadow.a -ldl
|
gcc -o test_nss test_nss.o ../../../lib/.libs/libshadow.a -ldl
|
||||||
|
|
||||||
libsubid_zzz.so: libsubid_zzz.c
|
libsubid_zzz.so: libsubid_zzz.c
|
||||||
gcc -c -I../../../lib/ -I../../.. -I../../../libmisc -I../../../libsubid libsubid_zzz.c
|
gcc -c -I../../../lib/ -I../../.. -I../../../libsubid libsubid_zzz.c
|
||||||
gcc -L../../../libsubid -shared -o libsubid_zzz.so libsubid_zzz.o ../../../lib/.libs/libshadow.a -ldl
|
gcc -L../../../libsubid -shared -o libsubid_zzz.so libsubid_zzz.o ../../../lib/.libs/libshadow.a -ldl
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
Reference in New Issue
Block a user