diff options
-rw-r--r-- | include/libbb.h | 21 | ||||
-rw-r--r-- | include/shadow_.h | 5 | ||||
-rw-r--r-- | libpwdgrp/pwd_grp.c | 10 |
3 files changed, 17 insertions, 19 deletions
diff --git a/include/libbb.h b/include/libbb.h index d3ad6e294..67dfbc361 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -68,6 +68,19 @@ | |||
68 | # include <shadow.h> | 68 | # include <shadow.h> |
69 | # endif | 69 | # endif |
70 | #endif | 70 | #endif |
71 | /* Just in case libc doesn't define some of these... */ | ||
72 | #ifndef _PATH_PASSWD | ||
73 | #define _PATH_PASSWD "/etc/passwd" | ||
74 | #endif | ||
75 | #ifndef _PATH_GROUP | ||
76 | #define _PATH_GROUP "/etc/group" | ||
77 | #endif | ||
78 | #ifndef _PATH_SHADOW | ||
79 | #define _PATH_SHADOW "/etc/shadow" | ||
80 | #endif | ||
81 | #ifndef _PATH_GSHADOW | ||
82 | #define _PATH_GSHADOW "/etc/gshadow" | ||
83 | #endif | ||
71 | #if defined __FreeBSD__ || defined __OpenBSD__ | 84 | #if defined __FreeBSD__ || defined __OpenBSD__ |
72 | # include <netinet/in.h> | 85 | # include <netinet/in.h> |
73 | # include <arpa/inet.h> | 86 | # include <arpa/inet.h> |
@@ -1604,10 +1617,10 @@ extern const char bb_path_wtmp_file[]; | |||
1604 | * get the list of currently mounted filesystems */ | 1617 | * get the list of currently mounted filesystems */ |
1605 | #define bb_path_mtab_file IF_FEATURE_MTAB_SUPPORT("/etc/mtab")IF_NOT_FEATURE_MTAB_SUPPORT("/proc/mounts") | 1618 | #define bb_path_mtab_file IF_FEATURE_MTAB_SUPPORT("/etc/mtab")IF_NOT_FEATURE_MTAB_SUPPORT("/proc/mounts") |
1606 | 1619 | ||
1607 | #define bb_path_passwd_file "/etc/passwd" | 1620 | #define bb_path_passwd_file _PATH_PASSWD |
1608 | #define bb_path_shadow_file "/etc/shadow" | 1621 | #define bb_path_group_file _PATH_GROUP |
1609 | #define bb_path_gshadow_file "/etc/gshadow" | 1622 | #define bb_path_shadow_file _PATH_SHADOW |
1610 | #define bb_path_group_file "/etc/group" | 1623 | #define bb_path_gshadow_file _PATH_GSHADOW |
1611 | 1624 | ||
1612 | #define bb_path_motd_file "/etc/motd" | 1625 | #define bb_path_motd_file "/etc/motd" |
1613 | 1626 | ||
diff --git a/include/shadow_.h b/include/shadow_.h index de126ddec..648a62ab3 100644 --- a/include/shadow_.h +++ b/include/shadow_.h | |||
@@ -37,11 +37,6 @@ struct spwd { | |||
37 | unsigned long sp_flag; /* Reserved */ | 37 | unsigned long sp_flag; /* Reserved */ |
38 | }; | 38 | }; |
39 | 39 | ||
40 | /* Paths to the user database files */ | ||
41 | #ifndef _PATH_SHADOW | ||
42 | #define _PATH_SHADOW "/etc/shadow" | ||
43 | #endif | ||
44 | |||
45 | #define setspent bb_internal_setspent | 40 | #define setspent bb_internal_setspent |
46 | #define endspent bb_internal_endspent | 41 | #define endspent bb_internal_endspent |
47 | #define getspent bb_internal_getspent | 42 | #define getspent bb_internal_getspent |
diff --git a/libpwdgrp/pwd_grp.c b/libpwdgrp/pwd_grp.c index abb6f189a..2eb9d9dd1 100644 --- a/libpwdgrp/pwd_grp.c +++ b/libpwdgrp/pwd_grp.c | |||
@@ -20,16 +20,6 @@ | |||
20 | #include "libbb.h" | 20 | #include "libbb.h" |
21 | #include <assert.h> | 21 | #include <assert.h> |
22 | 22 | ||
23 | #ifndef _PATH_SHADOW | ||
24 | #define _PATH_SHADOW "/etc/shadow" | ||
25 | #endif | ||
26 | #ifndef _PATH_PASSWD | ||
27 | #define _PATH_PASSWD "/etc/passwd" | ||
28 | #endif | ||
29 | #ifndef _PATH_GROUP | ||
30 | #define _PATH_GROUP "/etc/group" | ||
31 | #endif | ||
32 | |||
33 | /**********************************************************************/ | 23 | /**********************************************************************/ |
34 | /* Sizes for statically allocated buffers. */ | 24 | /* Sizes for statically allocated buffers. */ |
35 | 25 | ||