]> granicus.if.org Git - shadow/commitdiff
Force use shadow, even if missing.
authorDimitri John Ledkov <dimitri.j.ledkov@intel.com>
Fri, 27 Feb 2015 14:18:56 +0000 (14:18 +0000)
committerDimitri John Ledkov <dimitri.j.ledkov@intel.com>
Fri, 27 Feb 2015 17:01:30 +0000 (17:01 +0000)
etc/login.defs
lib/getdef.c
lib/sgroupio.c
lib/shadowio.c

index 5ac62d63d848e044029e4d4c1bf7871d5a6035c5..74312d70a5dfa2372eb6d85d4eaf64f4f5c68bc2 100644 (file)
@@ -393,3 +393,8 @@ USERGROUPS_ENAB yes
 #
 #CREATE_HOME     yes
 
+#
+# Force use shadow, even if shadow passwd & shadow group files are
+# missing.
+#
+#FORCE_SHADOW    yes
index 5f0504553a1cd8aedcb7435425b792fbb504a7f6..bea28129b1b58b4128a3a198277d811759c7f7fa 100644 (file)
@@ -139,6 +139,7 @@ static struct itemdef def_table[] = {
        {"TCB_SYMLINKS", NULL},
        {"USE_TCB", NULL},
 #endif
+       {"FORCE_SHADOW", NULL},
        {NULL, NULL}
 };
 
index faed0adf067e8b3f4527d435636a84bc90da0127..b497cd65db57cddbd02faef0fac31d9e8d3a3970 100644 (file)
@@ -249,6 +249,8 @@ int sgr_setdbname (const char *filename)
 
 bool sgr_file_present (void)
 {
+       if (getdef_bool ("FORCE_SHADOW"))
+               return true;
        return commonio_present (&gshadow_db);
 }
 
index 2930e65d10ebb9cc2da3bc5204e5e07ad256466f..1fb1bbab9ad1b6acb60b81680a3ae234fbf37542 100644 (file)
@@ -125,6 +125,8 @@ int spw_setdbname (const char *filename)
 
 bool spw_file_present (void)
 {
+       if (getdef_bool ("FORCE_SHADOW"))
+               return true;
        return commonio_present (&shadow_db);
 }