* Merge two is_shadowgrp blocks.
* Indicate that we continue when *_unlock fail
This commit is contained in:
parent
75e65f72c2
commit
6461841ccd
@ -438,7 +438,8 @@ static void close_files (void)
|
|||||||
fail_exit (1);
|
fail_exit (1);
|
||||||
}
|
}
|
||||||
#ifdef SHADOWGRP
|
#ifdef SHADOWGRP
|
||||||
if (is_shadowgrp && (sgr_close () == 0)) {
|
if (is_shadowgrp) {
|
||||||
|
if (sgr_close () == 0) {
|
||||||
fprintf (stderr, _("%s: cannot rewrite the shadow group file\n"), Prog);
|
fprintf (stderr, _("%s: cannot rewrite the shadow group file\n"), Prog);
|
||||||
SYSLOG ((LOG_WARN, "cannot rewrite the shadow group file"));
|
SYSLOG ((LOG_WARN, "cannot rewrite the shadow group file"));
|
||||||
#ifdef WITH_AUDIT
|
#ifdef WITH_AUDIT
|
||||||
@ -448,7 +449,6 @@ static void close_files (void)
|
|||||||
#endif
|
#endif
|
||||||
fail_exit (1);
|
fail_exit (1);
|
||||||
}
|
}
|
||||||
if (is_shadowgrp) {
|
|
||||||
if (sgr_unlock () == 0) {
|
if (sgr_unlock () == 0) {
|
||||||
fprintf (stderr, _("%s: cannot unlock the shadow group file\n"), Prog);
|
fprintf (stderr, _("%s: cannot unlock the shadow group file\n"), Prog);
|
||||||
SYSLOG ((LOG_WARN, "cannot unlock the shadow group file"));
|
SYSLOG ((LOG_WARN, "cannot unlock the shadow group file"));
|
||||||
@ -457,6 +457,7 @@ static void close_files (void)
|
|||||||
"unlocking gshadow file",
|
"unlocking gshadow file",
|
||||||
group, AUDIT_NO_ID, 0);
|
group, AUDIT_NO_ID, 0);
|
||||||
#endif
|
#endif
|
||||||
|
/* continue */
|
||||||
}
|
}
|
||||||
gshadow_locked = false;
|
gshadow_locked = false;
|
||||||
}
|
}
|
||||||
@ -469,6 +470,7 @@ static void close_files (void)
|
|||||||
"unlocking group file",
|
"unlocking group file",
|
||||||
group, AUDIT_NO_ID, 0);
|
group, AUDIT_NO_ID, 0);
|
||||||
#endif
|
#endif
|
||||||
|
/* continue */
|
||||||
}
|
}
|
||||||
group_locked = false;
|
group_locked = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user