* src/newusers.c: Add more information to the mkdir and chown
failure messages.
This commit is contained in:
parent
ce156b578f
commit
681c1d12b5
@ -1,3 +1,8 @@
|
|||||||
|
2009-04-12 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
* src/newusers.c: Add more information to the mkdir and chown
|
||||||
|
failure messages.
|
||||||
|
|
||||||
2009-04-12 Nicolas François <nicolas.francois@centraliens.net>
|
2009-04-12 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* man/po/fr.po: Updated some login.defs entries. Thanks to
|
* man/po/fr.po: Updated some login.defs entries. Thanks to
|
||||||
|
@ -50,6 +50,8 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <string.h>
|
||||||
#ifdef ACCT_TOOLS_SETUID
|
#ifdef ACCT_TOOLS_SETUID
|
||||||
#ifdef USE_PAM
|
#ifdef USE_PAM
|
||||||
#include "pam_defs.h"
|
#include "pam_defs.h"
|
||||||
@ -64,6 +66,7 @@
|
|||||||
#include "sgroupio.h"
|
#include "sgroupio.h"
|
||||||
#include "shadowio.h"
|
#include "shadowio.h"
|
||||||
#include "chkname.h"
|
#include "chkname.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Global variables
|
* Global variables
|
||||||
*/
|
*/
|
||||||
@ -928,14 +931,16 @@ int main (int argc, char **argv)
|
|||||||
GETDEF_DEFAULT_UMASK);
|
GETDEF_DEFAULT_UMASK);
|
||||||
if (mkdir (newpw.pw_dir, msk) != 0) {
|
if (mkdir (newpw.pw_dir, msk) != 0) {
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: line %d: mkdir failed\n"), Prog,
|
_("%s: line %d: mkdir %s failed: %s\n"),
|
||||||
line);
|
Prog, line, newpw.pw_dir,
|
||||||
|
strerror (errno));
|
||||||
} else if (chown (newpw.pw_dir,
|
} else if (chown (newpw.pw_dir,
|
||||||
newpw.pw_uid,
|
newpw.pw_uid,
|
||||||
newpw.pw_gid) != 0) {
|
newpw.pw_gid) != 0) {
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: line %d: chown failed\n"), Prog,
|
_("%s: line %d: chown %s failed: %s\n"),
|
||||||
line);
|
Prog, line, newpw.pw_dir,
|
||||||
|
strerror (errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user