Per patch from Nick Fedchik, use SHADOW_FILE, not "/etc/shadow".
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>
Thu, 26 Jun 2003 08:53:49 +0000 (08:53 +0000)
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>
Thu, 26 Jun 2003 08:53:49 +0000 (08:53 +0000)
Change fopen to bb_xfopen

git-svn-id: svn://busybox.net/trunk/busybox@6980 69ca8d6d-28ef-0310-b511-8ec308f3f277

libpwdgrp/shadow.c

index f3d6242..3a9c4b8 100644 (file)
@@ -54,8 +54,7 @@ void setspent(void)
        if (shadow) {
                rewind(shadow);
        } else {
-               if ((shadow = fopen("/etc/shadow", "r")) == NULL)
-                       bb_perror_msg_and_die("/etc/shadow");
+               shadow == bb_xfopen(SHADOW_FILE, "r");
        }
 }