Change passwd, group, shadow file's location 70/122970/1 accepted/tizen/base/20170407.191348 submit/tizen_base/20170407.070422
authorYunmi Ha <yunmi.ha@samsung.com>
Tue, 4 Apr 2017 05:49:48 +0000 (14:49 +0900)
committerYunmi Ha <yunmi.ha@samsung.com>
Tue, 4 Apr 2017 05:49:48 +0000 (14:49 +0900)
To support read-only filesystem, {passwd, group, shadow, gshadow} files are
moved to /opt/etc by setup package. Although they stil have symlinks from old
files, shadow-utils cannot use the symlinks because of rename's error 18 (error
on renaming through different filesystems). Now shadow-utils handles the files
on /opt directly.

Change-Id: I4f845d52e3ce90d2ebe6eaeb52fde1feacc6f797
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
lib/defines.h

index 0c94fd3..4782e1c 100644 (file)
@@ -299,20 +299,20 @@ char *strchr (), *strrchr (), *strtok ();
        (strncpy((A), (B), sizeof(A) - 1), (A)[sizeof(A) - 1] = '\0')
 
 #ifndef PASSWD_FILE
-#define PASSWD_FILE "/etc/passwd"
+#define PASSWD_FILE "/opt/etc/passwd"
 #endif
 
 #ifndef GROUP_FILE
-#define GROUP_FILE "/etc/group"
+#define GROUP_FILE "/opt/etc/group"
 #endif
 
 #ifndef SHADOW_FILE
-#define SHADOW_FILE "/etc/shadow"
+#define SHADOW_FILE "/opt/etc/shadow"
 #endif
 
 #ifdef SHADOWGRP
 #ifndef SGROUP_FILE
-#define SGROUP_FILE "/etc/gshadow"
+#define SGROUP_FILE "/opt/etc/gshadow"
 #endif
 #endif