return commonio_next (&gshadow_db);
}
-int sgr_close (void)
+int sgr_close (bool process_selinux)
{
- return commonio_close (&gshadow_db, true);
+ return commonio_close (&gshadow_db, process_selinux);
}
int sgr_unlock (void)
#include "shadow/gshadow/sgrp.h"
-extern int sgr_close (void);
+extern int sgr_close (bool process_selinux);
extern bool sgr_file_present (void);
extern /*@observer@*/ /*@null@*/const struct sgrp *sgr_locate (const char *name);
extern int sgr_lock (void);
{
#ifdef SHADOWGRP
if (is_shadow_grp) {
- if (sgr_close () == 0) {
+ if (sgr_close (true) == 0) {
fprintf (stderr,
_("%s: failure while writing changes to %s\n"),
Prog, sgr_dbname ());
#ifdef SHADOWGRP
if (is_shadowgrp) {
- if (sgr_close () == 0) {
+ if (sgr_close (true) == 0) {
fprintf (stderr,
_("%s: failure while writing changes to %s\n"),
Prog, sgr_dbname ());
sg->sg_adm[0] = NULL;
}
- if (sgr_close () == 0) {
+ if (sgr_close (true) == 0) {
fprintf (stderr,
_("%s: failure while closing read-only %s\n"),
Prog, sgr_dbname ());
/* Now, write the changes in the shadow database */
#ifdef SHADOWGRP
if (is_shadow_grp) {
- if (sgr_close () == 0) {
+ if (sgr_close (true) == 0) {
fprintf (stderr,
_("%s: failure while writing changes to %s\n"),
Prog, sgr_dbname ());
/* Then, write the changes in the shadow database */
#ifdef SHADOWGRP
if (is_shadow_grp) {
- if (sgr_close () == 0) {
+ if (sgr_close (true) == 0) {
fprintf (stderr,
_("%s: failure while writing changes to %s\n"),
Prog, sgr_dbname ());
#ifdef SHADOWGRP
if (is_shadowgrp) {
- if ((sgr_close () == 0) && !list) {
+ if ((sgr_close (true) == 0) && !list) {
fprintf (stderr, _("%s: failure while writing changes to %s\n"), Prog, sgr_dbname ());
SYSLOG ((LOG_ERR, "failure while writing changes to %s", sgr_dbname ()));
fail_exit (EXIT_GROUP_FILE);
#ifdef SHADOWGRP
if ( is_shadow_grp
&& (pflg || nflg || user_list)) {
- if (sgr_close () == 0) {
+ if (sgr_close (true) == 0) {
fprintf (stderr,
_("%s: failure while writing changes to %s\n"),
Prog, sgr_dbname ());
fail_exit (E_CANT_UPDATE);
}
#ifdef SHADOWGRP
- if (is_shadow && (sgr_close () == 0)) {
+ if (is_shadow && (sgr_close (true) == 0)) {
fprintf (stderr, _("%s: failure while writing changes to %s\n"),
Prog, sgr_file);
fail_exit (E_CANT_UPDATE);
}
}
- if (sgr_close () == 0) {
+ if (sgr_close (true) == 0) {
fprintf (stderr,
_("%s: failure while writing changes to %s\n"),
Prog, sgr_dbname ());
}
}
- (void) sgr_close (); /* was only open O_RDONLY */
+ (void) sgr_close (true); /* was only open O_RDONLY */
if (gr_close (true) == 0) {
fprintf (stderr,
#ifdef SHADOWGRP
if (is_shadow_grp) {
- if (sgr_close () == 0) {
+ if (sgr_close (true) == 0) {
fprintf (stderr,
_("%s: failure while writing changes to %s\n"),
Prog, sgr_dbname ());
fail_exit(E_GRP_UPDATE);
}
#ifdef SHADOWGRP
- if (is_shadow_grp && sgr_close() == 0) {
+ if (is_shadow_grp && sgr_close(true) == 0) {
fprintf(stderr,
_("%s: failure while writing changes to %s\n"),
Prog, sgr_dbname());
#ifdef SHADOWGRP
if (is_shadow_grp) {
- if (sgr_close () == 0) {
+ if (sgr_close (true) == 0) {
fprintf (stderr,
_("%s: failure while writing changes to %s\n"), Prog, sgr_dbname ());
SYSLOG ((LOG_ERR, "failure while writing changes to %s", sgr_dbname ()));
}
#ifdef SHADOWGRP
if (is_shadow_grp) {
- if (sgr_close () == 0) {
+ if (sgr_close (true) == 0) {
fprintf (stderr,
_("%s: failure while writing changes to %s\n"),
Prog, sgr_dbname ());