[svn-upgrade] Integrating new upstream version, shadow (4.0.16)
This commit is contained in:
@@ -164,6 +164,8 @@ U = @U@
|
||||
USE_NLS = @USE_NLS@
|
||||
USE_NLS_FALSE = @USE_NLS_FALSE@
|
||||
USE_NLS_TRUE = @USE_NLS_TRUE@
|
||||
USE_PAM_FALSE = @USE_PAM_FALSE@
|
||||
USE_PAM_TRUE = @USE_PAM_TRUE@
|
||||
VERSION = @VERSION@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XMLCATALOG = @XMLCATALOG@
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: copydir.c,v 1.13 2005/08/31 17:24:57 kloczek Exp $"
|
||||
#ident "$Id: copydir.c,v 1.14 2006/05/07 18:10:10 kloczek Exp $"
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
@@ -225,12 +225,12 @@ int copy_tree (const char *src_root, const char *dst_root, uid_t uid, gid_t gid)
|
||||
#ifdef WITH_SELINUX
|
||||
selinux_file_context (dst_name);
|
||||
#endif
|
||||
mkdir (dst_name, sb.st_mode & 0777);
|
||||
chown (dst_name,
|
||||
uid == (uid_t) - 1 ? sb.st_uid : uid,
|
||||
gid == (gid_t) - 1 ? sb.st_gid : gid);
|
||||
|
||||
if (copy_tree (src_name, dst_name, uid, gid)) {
|
||||
if (mkdir (dst_name, sb.st_mode)
|
||||
|| chown (dst_name,
|
||||
uid == (uid_t) - 1 ? sb.st_uid : uid,
|
||||
gid == (gid_t) - 1 ? sb.st_gid : gid)
|
||||
|| chmod (dst_name, sb.st_mode)
|
||||
|| copy_tree (src_name, dst_name, uid, gid)) {
|
||||
err++;
|
||||
break;
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: setupenv.c,v 1.21 2006/01/18 19:55:15 kloczek Exp $"
|
||||
#ident "$Id: setupenv.c,v 1.24 2006/05/12 23:11:13 kloczek Exp $"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -186,8 +186,8 @@ void setup_env (struct passwd *info)
|
||||
{
|
||||
#ifndef USE_PAM
|
||||
char *envf;
|
||||
#endif
|
||||
char *cp;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Change the current working directory to be the home directory
|
||||
@@ -204,7 +204,7 @@ void setup_env (struct passwd *info)
|
||||
static char temp_pw_dir[] = "/";
|
||||
|
||||
if (!getdef_bool ("DEFAULT_HOME") || chdir ("/") == -1) {
|
||||
fprintf (stderr, _("Unable to cd to \"%s\"\n"),
|
||||
fprintf (stderr, _("Unable to cd to '%s'\n"),
|
||||
info->pw_dir);
|
||||
SYSLOG ((LOG_WARN,
|
||||
"unable to cd to `%s' for user `%s'\n",
|
||||
@@ -265,16 +265,18 @@ void setup_env (struct passwd *info)
|
||||
* knows the prefix.
|
||||
*/
|
||||
|
||||
if ((cp = getdef_str ("MAIL_DIR")))
|
||||
addenv_path ("MAIL", cp, info->pw_name);
|
||||
else if ((cp = getdef_str ("MAIL_FILE")))
|
||||
addenv_path ("MAIL", info->pw_dir, cp);
|
||||
else {
|
||||
if (getdef_bool ("MAIL_CHECK_ENAB")) {
|
||||
if ((cp = getdef_str ("MAIL_DIR")))
|
||||
addenv_path ("MAIL", cp, info->pw_name);
|
||||
else if ((cp = getdef_str ("MAIL_FILE")))
|
||||
addenv_path ("MAIL", info->pw_dir, cp);
|
||||
else {
|
||||
#if defined(MAIL_SPOOL_FILE)
|
||||
addenv_path ("MAIL", info->pw_dir, MAIL_SPOOL_FILE);
|
||||
addenv_path ("MAIL", info->pw_dir, MAIL_SPOOL_FILE);
|
||||
#elif defined(MAIL_SPOOL_DIR)
|
||||
addenv_path ("MAIL", MAIL_SPOOL_DIR, info->pw_name);
|
||||
addenv_path ("MAIL", MAIL_SPOOL_DIR, info->pw_name);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: sub.c,v 1.9 2005/08/31 17:24:58 kloczek Exp $"
|
||||
#ident "$Id: sub.c,v 1.10 2006/05/07 16:12:16 kloczek Exp $"
|
||||
|
||||
#include <pwd.h>
|
||||
#include <stdio.h>
|
||||
@@ -53,7 +53,7 @@ void subsystem (const struct passwd *pw)
|
||||
*/
|
||||
|
||||
if (pw->pw_dir[0] != '/') {
|
||||
printf (_("Invalid root directory \"%s\"\n"), pw->pw_dir);
|
||||
printf (_("Invalid root directory '%s'\n"), pw->pw_dir);
|
||||
SYSLOG ((LOG_WARN, BAD_SUBROOT2, pw->pw_dir, pw->pw_name));
|
||||
closelog ();
|
||||
exit (1);
|
||||
@@ -65,7 +65,7 @@ void subsystem (const struct passwd *pw)
|
||||
*/
|
||||
|
||||
if (chdir (pw->pw_dir) || chroot (pw->pw_dir)) {
|
||||
printf (_("Can't change root directory to \"%s\"\n"),
|
||||
printf (_("Can't change root directory to '%s'\n"),
|
||||
pw->pw_dir);
|
||||
SYSLOG ((LOG_WARN, NO_SUBROOT2, pw->pw_dir, pw->pw_name));
|
||||
closelog ();
|
||||
|
Reference in New Issue
Block a user