*/
void cleanup_unlock_group (MAYBE_UNUSED void *arg)
{
- if (gr_unlock () == 0) {
+ if (gr_unlock (true) == 0) {
fprintf (log_get_logfd(),
_("%s: failed to unlock %s\n"),
log_get_progname(), gr_dbname ());
return commonio_close (&group_db, process_selinux);
}
-int gr_unlock (void)
+int gr_unlock (bool process_selinux)
{
- return commonio_unlock (&group_db, true);
+ return commonio_unlock (&group_db, process_selinux);
}
void __gr_set_changed (void)
extern int gr_open (int mode);
extern int gr_remove (const char *name);
extern int gr_rewind (void);
-extern int gr_unlock (void);
+extern int gr_unlock (bool process_selinux);
extern int gr_update (const struct group *gr);
extern int gr_sort (void);
static void fail_exit (int code)
{
if (gr_locked) {
- if (gr_unlock () == 0) {
+ if (gr_unlock (true) == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ()));
/* continue */
SYSLOG ((LOG_ERR, "failure while writing changes to %s", gr_dbname ()));
fail_exit (1);
}
- if (gr_unlock () == 0) {
+ if (gr_unlock (true) == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ()));
/* continue */
static void fail_exit (int code)
{
if (gr_locked) {
- if (gr_unlock () == 0) {
+ if (gr_unlock (true) == 0) {
fprintf (stderr,
_("%s: failed to unlock %s\n"),
Prog, gr_dbname ());
fail_exit (EXIT_GROUP_FILE);
}
if (gr_locked) {
- if (gr_unlock () == 0) {
+ if (gr_unlock (true) == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ()));
/* continue */
static void fail_exit (int status)
{
if (gr_locked) {
- if (gr_unlock () == 0) {
+ if (gr_unlock (true) == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ()));
/* continue */
}
#endif
if (gr_locked) {
- if (gr_unlock () == 0) {
+ if (gr_unlock (true) == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ()));
/* continue */
static void fail_exit (int status)
{
if (gr_locked) {
- if (gr_unlock () == 0) {
+ if (gr_unlock (true) == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ()));
/* continue */
SYSLOG ((LOG_ERR, "failed to unlock %s", sgr_dbname ()));
/* continue */
}
- if (gr_unlock () == 0) {
+ if (gr_unlock (true) == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ()));
/* continue */
static void fail_exit (int status)
{
if (gr_locked) {
- if (gr_unlock () == 0) {
+ if (gr_unlock (true) == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ()));
/* continue */
fail_exit (3);
}
- if (gr_unlock () == 0) {
+ if (gr_unlock (true) == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ()));
/* continue */
}
}
if (gr_locked) {
- if (gr_unlock () == 0) {
+ if (gr_unlock (true) == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ()));
/* continue */
}
#endif /* ENABLE_SUBIDS */
- if (gr_unlock () == 0) {
+ if (gr_unlock (true) == 0) {
fprintf (stderr,
_("%s: failed to unlock %s\n"),
Prog, gr_dbname ());
SYSLOG((LOG_ERR, "failed to unlock %s", pw_dbname()));
/* continue */
}
- if (gr_locked && gr_unlock() == 0) {
+ if (gr_locked && gr_unlock(true) == 0) {
fprintf(stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname());
SYSLOG((LOG_ERR, "failed to unlock %s", gr_dbname()));
/* continue */
*/
static void unlock_group_files (void)
{
- if (gr_unlock () == 0) {
+ if (gr_unlock (true) == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ()));
#ifdef WITH_AUDIT
SYSLOG ((LOG_ERR, "failure while writing changes to %s", gr_dbname ()));
fail_exit (E_GRP_UPDATE);
}
- if (gr_unlock () == 0) {
+ if (gr_unlock (true) == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ()));
/* continue */
}
}
if (gr_locked) {
- if (gr_unlock () == 0) {
+ if (gr_unlock (true) == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ()));
/* continue */
fail_exit (int code)
{
if (gr_locked) {
- if (gr_unlock () == 0) {
+ if (gr_unlock (true) == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ()));
/* continue */
}
}
#endif
- if (gr_unlock () == 0) {
+ if (gr_unlock (true) == 0) {
fprintf (stderr,
_("%s: failed to unlock %s\n"),
Prog, gr_dbname ());