return commonio_next (&group_db);
}
-int gr_close (void)
+int gr_close (bool process_selinux)
{
- return commonio_close (&group_db, true);
+ return commonio_close (&group_db, process_selinux);
}
int gr_unlock (void)
#include <sys/types.h>
#include <grp.h>
+#include <stdbool.h>
-extern int gr_close (void);
+extern int gr_close (bool process_selinux);
extern /*@observer@*/ /*@null@*/const struct group *gr_locate (const char *name);
extern /*@observer@*/ /*@null@*/const struct group *gr_locate_gid (gid_t gid);
extern int gr_lock (void);
}
#endif
- if (gr_close () == 0) {
+ if (gr_close (true) == 0) {
fprintf (stderr,
_("%s: failure while writing changes to %s\n"),
Prog, gr_dbname ());
*/
static void close_files (void)
{
- if (gr_close () == 0) {
+ if (gr_close (true) == 0) {
fprintf (stderr,
_("%s: failure while writing changes to %s\n"),
Prog, gr_dbname ());
gr->gr_passwd = xstrdup (tmpgr->gr_passwd);
gr->gr_mem = dup_list (tmpgr->gr_mem);
- if (gr_close () == 0) {
+ if (gr_close (true) == 0) {
fprintf (stderr,
_("%s: failure while closing read-only %s\n"),
Prog, gr_dbname ());
static void close_files (void)
{
/* First, write the changes in the regular group database */
- if (gr_close () == 0) {
+ if (gr_close (true) == 0) {
fprintf (stderr,
_("%s: failure while writing changes to %s\n"),
Prog, gr_dbname ());
static void close_files (void)
{
/* First, write the changes in the regular group database */
- if (gr_close () == 0) {
+ if (gr_close (true) == 0) {
fprintf (stderr,
_("%s: failure while writing changes to %s\n"),
Prog, gr_dbname ());
static void close_files (void)
{
- if ((gr_close () == 0) && !list) {
+ if ((gr_close (true) == 0) && !list) {
fprintf (stderr, _("%s: failure while writing changes to %s\n"), Prog, gr_dbname ());
SYSLOG ((LOG_ERR, "failure while writing changes to %s", gr_dbname ()));
fail_exit (EXIT_GROUP_FILE);
*/
static void close_files (void)
{
- if (gr_close () == 0) {
+ if (gr_close (true) == 0) {
fprintf (stderr,
_("%s: failure while writing changes to %s\n"),
Prog, gr_dbname ());
* changes to the files.
*/
if (changed) {
- if (gr_close () == 0) {
+ if (gr_close (true) == 0) {
fprintf (stderr, _("%s: failure while writing changes to %s\n"),
Prog, grp_file);
fail_exit (E_CANT_UPDATE);
SYSLOG ((LOG_ERR, "failure while writing changes to %s", sgr_dbname ()));
fail_exit (3);
}
- if (gr_close () == 0) {
+ if (gr_close (true) == 0) {
fprintf (stderr,
_("%s: failure while writing changes to %s\n"),
Prog, gr_dbname ());
(void) sgr_close (); /* was only open O_RDONLY */
- if (gr_close () == 0) {
+ if (gr_close (true) == 0) {
fprintf (stderr,
_("%s: failure while writing changes to %s\n"),
Prog, gr_dbname ());
spw_locked = false;
}
- if (gr_close () == 0) {
+ if (gr_close (true) == 0) {
fprintf (stderr,
_("%s: failure while writing changes to %s\n"),
Prog, gr_dbname ());
if (!do_grp_update)
return;
- if (gr_close() == 0) {
+ if (gr_close(true) == 0) {
fprintf(stderr,
_("%s: failure while writing changes to %s\n"),
Prog, gr_dbname());
spw_locked = false;
}
- if (gr_close () == 0) {
+ if (gr_close (true) == 0) {
fprintf (stderr, _("%s: failure while writing changes to %s\n"), Prog, gr_dbname ());
SYSLOG ((LOG_ERR, "failure while writing changes to %s", gr_dbname ()));
fail_exit (E_GRP_UPDATE);
}
if (Gflg || lflg) {
- if (gr_close () == 0) {
+ if (gr_close (true) == 0) {
fprintf (stderr,
_("%s: failure while writing changes to %s\n"),
Prog, gr_dbname ());