* src/useradd.c: Re-indent.
This commit is contained in:
parent
06c81b67c2
commit
95bc6eb7b2
@ -1,5 +1,6 @@
|
||||
2009-04-06 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* src/useradd.c: Re-indent.
|
||||
* src/useradd.c: Use getlong instead of get_number.
|
||||
|
||||
2009-04-06 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
@ -443,13 +443,15 @@ static int set_defaults (void)
|
||||
ofd = mkstemp (new_file);
|
||||
if (-1 == ofd) {
|
||||
fprintf (stderr,
|
||||
_("%s: cannot create new defaults file\n"), Prog);
|
||||
_("%s: cannot create new defaults file\n"),
|
||||
Prog);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ofp = fdopen (ofd, "w");
|
||||
if (NULL == ofp) {
|
||||
fprintf (stderr, _("%s: cannot open new defaults file\n"),
|
||||
fprintf (stderr,
|
||||
_("%s: cannot open new defaults file\n"),
|
||||
Prog);
|
||||
return -1;
|
||||
}
|
||||
@ -491,7 +493,8 @@ static int set_defaults (void)
|
||||
out_skel = true;
|
||||
} else if (!out_create_mail_spool
|
||||
&& MATCH (buf, CREATE_MAIL_SPOOL)) {
|
||||
fprintf (ofp, CREATE_MAIL_SPOOL "%s\n",
|
||||
fprintf (ofp,
|
||||
CREATE_MAIL_SPOOL "%s\n",
|
||||
def_create_mail_spool);
|
||||
out_create_mail_spool = true;
|
||||
} else
|
||||
@ -610,7 +613,8 @@ static int get_groups (char *list)
|
||||
* string name.
|
||||
*/
|
||||
if (NULL == grp) {
|
||||
fprintf (stderr, _("%s: group '%s' does not exist\n"),
|
||||
fprintf (stderr,
|
||||
_("%s: group '%s' does not exist\n"),
|
||||
Prog, list);
|
||||
errors++;
|
||||
}
|
||||
@ -639,8 +643,7 @@ static int get_groups (char *list)
|
||||
|
||||
if (ngroups == sys_ngroups) {
|
||||
fprintf (stderr,
|
||||
_
|
||||
("%s: too many groups specified (max %d).\n"),
|
||||
_("%s: too many groups specified (max %d).\n"),
|
||||
Prog, ngroups);
|
||||
break;
|
||||
}
|
||||
@ -848,7 +851,8 @@ static void grp_update (void)
|
||||
user_name, AUDIT_NO_ID,
|
||||
SHADOW_AUDIT_SUCCESS);
|
||||
#endif
|
||||
SYSLOG ((LOG_INFO, "add '%s' to group '%s'",
|
||||
SYSLOG ((LOG_INFO,
|
||||
"add '%s' to group '%s'",
|
||||
user_name, ngrp->gr_name));
|
||||
}
|
||||
|
||||
@ -918,7 +922,8 @@ static void grp_update (void)
|
||||
user_name, AUDIT_NO_ID,
|
||||
SHADOW_AUDIT_SUCCESS);
|
||||
#endif
|
||||
SYSLOG ((LOG_INFO, "add '%s' to shadow group '%s'",
|
||||
SYSLOG ((LOG_INFO,
|
||||
"add '%s' to shadow group '%s'",
|
||||
user_name, nsgrp->sg_name));
|
||||
}
|
||||
#endif /* SHADOWGRP */
|
||||
@ -1680,8 +1685,7 @@ static void create_home (void)
|
||||
/* XXX - create missing parent directories. --marekm */
|
||||
if (mkdir (user_home, 0) != 0) {
|
||||
fprintf (stderr,
|
||||
_
|
||||
("%s: cannot create directory %s\n"),
|
||||
_("%s: cannot create directory %s\n"),
|
||||
Prog, user_home);
|
||||
#ifdef WITH_AUDIT
|
||||
audit_logger (AUDIT_ADD_USER, Prog,
|
||||
@ -1931,14 +1935,14 @@ int main (int argc, char **argv)
|
||||
|
||||
if (mflg) {
|
||||
create_home ();
|
||||
if (home_added)
|
||||
if (home_added) {
|
||||
copy_tree (def_template, user_home, user_id, user_gid);
|
||||
else
|
||||
} else {
|
||||
fprintf (stderr,
|
||||
_
|
||||
("%s: warning: the home directory already exists.\n"
|
||||
_("%s: warning: the home directory already exists.\n"
|
||||
"Not copying any file from skel directory into it.\n"),
|
||||
Prog);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user