#define SUBGID_FILE "/etc/subgid"
#endif
-#ifdef SHADOWGRP
-#ifndef SGROUP_FILE
-#define SGROUP_FILE "/etc/gshadow"
-#endif
-#endif
-
/*
* string to use for the pw_passwd field in /etc/passwd when using
* shadow passwords - most systems use "x" but there are a few
if (NULL != gshadow) {
rewind(gshadow);
} else {
- gshadow = fopen(SGROUP_FILE, "re");
+ gshadow = fopen(_PATH_GSHADOW, "re");
}
}
#ident "$Id$"
+#include <paths.h>
#include <stdio.h>
+
#include <assert.h>
#include "atoi/getnum.h"
#include "subordinateio.h"
#endif /* ENABLE_SUBIDS */
#include "getdef.h"
+#include "shadow/gshadow/gshadow.h"
#include "shadowlog.h"
#include "string/sprintf/xaprintf.h"
#include "string/strcmp/streq.h"
gr_setdbname(group_db_file);
#ifdef SHADOWGRP
- sgroup_db_file = xaprintf("%s/%s", prefix, SGROUP_FILE);
+ sgroup_db_file = xaprintf("%s/%s", prefix, _PATH_GSHADOW);
sgr_setdbname(sgroup_db_file);
#endif
#ifdef SHADOWGRP
-#ident "$Id$"
+#include <paths.h>
#include "alloc/calloc.h"
#include "alloc/malloc.h"
#include "fields.h"
#include "getdef.h"
#include "sgroupio.h"
+#include "shadow/gshadow/gshadow.h"
#include "shadow/gshadow/putsgent.h"
#include "string/memset/memzero.h"
};
static struct commonio_db gshadow_db = {
- SGROUP_FILE, /* filename */
+ _PATH_GSHADOW, /* filename */
&gshadow_ops, /* ops */
NULL, /* fp */
#ifdef WITH_SELINUX
#include "config.h"
+#include <paths.h>
#include <stdio.h>
+#ifndef _PATH_GSHADOW
+# define _PATH_GSHADOW "/etc/gshadow"
+#endif
+
+
extern FILE *gshadow;
#include <fcntl.h>
#include <grp.h>
+#include <paths.h>
#include <pwd.h>
#include <stdio.h>
#include <getopt.h>
#include "groupio.h"
#include "nscd.h"
#include "prototypes.h"
+#include "shadow/gshadow/gshadow.h"
#include "shadowlog.h"
#include "sssd.h"
#include "string/strcmp/streq.h"
#include "sgroupio.h"
#endif
+
/*
* Exit codes
*/
static bool use_system_grp_file = true;
#ifdef SHADOWGRP
-static const char *sgr_file = SGROUP_FILE;
+static const char *sgr_file = _PATH_GSHADOW;
static bool use_system_sgr_file = true;
static bool is_shadow = false;
static bool sgr_locked = false;
#include "config.h"
-#ident "$Id$"
-
+#include <paths.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef SHADOWGRP
#include "groupio.h"
#include "sgroupio.h"
+#include "shadow/gshadow/gshadow.h"
#include "shadowlog.h"
fail_exit (3);
}
- if (unlink (SGROUP_FILE) != 0) {
+ if (unlink(_PATH_GSHADOW) != 0) {
fprintf (stderr,
_("%s: cannot delete %s\n"),
- Prog, SGROUP_FILE);
- SYSLOG ((LOG_ERR, "cannot delete %s", SGROUP_FILE));
+ Prog, _PATH_GSHADOW);
+ SYSLOG((LOG_ERR, "cannot delete %s", _PATH_GSHADOW));
fail_exit (3);
}