diff options
author | Tito Ragusa <farmatito@tiscali.it> | 2011-01-16 23:39:45 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-01-16 23:39:45 +0100 |
commit | ad3d72f082cbdb152837ae87d1d285cbbf67913a (patch) | |
tree | 5d6891db54a1c179b1fe956bff485b29e2a8945d /include/libbb.h | |
parent | e8d0a1450a04d83b540f1f58297e79c2cf0f5b4f (diff) | |
download | busybox-w32-ad3d72f082cbdb152837ae87d1d285cbbf67913a.tar.gz busybox-w32-ad3d72f082cbdb152837ae87d1d285cbbf67913a.tar.bz2 busybox-w32-ad3d72f082cbdb152837ae87d1d285cbbf67913a.zip |
move passwd, shadow, group and gshadow path definitions to libbb.h
...and define them only if the used libc doesn't.
Signed-off-by: Tito Ragusa <farmatito@tiscali.it>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include/libbb.h')
-rw-r--r-- | include/libbb.h | 21 |
1 files changed, 17 insertions, 4 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 | ||