#define E_SUB_GID_UPDATE 18 /* can't update the subordinate gid file */
#endif /* ENABLE_SUBIDS */
+/*
+ * Structures
+ */
+struct option_flags {
+ bool chroot;
+ bool prefix;
+};
+
/*
* Global variables
*/
#ifdef WITH_SELINUX
static bool Zflg = false;
#endif
-static bool Rflg = false;
static bool is_shadow_pwd;
int retval;
#endif /* USE_PAM */
#endif /* ACCT_TOOLS_SETUID */
+ struct option_flags flags;
log_set_progname(Prog);
log_set_logfd(stderr);
rflg = true;
break;
case 'R': /* no-op, handled in process_root_flag () */
- Rflg = true;
+ flags.chroot = true;
break;
case 'P': /* no-op, handled in process_prefix_flag () */
+ flags.prefix = true;
break;
#ifdef WITH_SELINUX
case 'Z':
* Note: This is a best effort basis. The user may log in between,
* a cron job may be started on her behalf, etc.
*/
- if (streq(prefix, "") && !Rflg && user_busy(user_name, user_id) != 0) {
+ if (streq(prefix, "") && !flags.chroot && user_busy(user_name, user_id) != 0) {
if (!fflg) {
#ifdef WITH_AUDIT
audit_logger (AUDIT_DEL_USER, Prog,