[BusyBox] Busybox passwd/shadow database files place
Nick Fedchik
nick at fedchik.org.ua
Wed Jul 16 14:56:17 UTC 2003
Hi ALL!
libbb/messages.c has declared paths:
#ifdef L_passwd_file
#define PASSWD_FILE "/etc/passwd"
const char * const bb_path_passwd_file = PASSWD_FILE;
#endif
and the same declarations for group, shadow, gshadow files.
But inisde of most libpwdgrp files I see this lines:
#grep /etc/ busybox/libpwdgrp/*
busybox/libpwdgrp/getgrgid.c: if ((grp_fd = open("/etc/group", ...
busybox/libpwdgrp/getgrnam.c: if ((grp_fd = open("/etc/group", ...
busybox/libpwdgrp/getpwnam.c: if ((passwd_fd = open("/etc/passwd", ...
busybox/libpwdgrp/getpwuid.c: if ((passwd_fd = open("/etc/passwd", ...
busybox/libpwdgrp/grent.c: grp_fd = open("/etc/group", O_RDONLY);
busybox/libpwdgrp/initgroups.c: if ((grp_fd = open("/etc/group", O_RDONLY))
busybox/libpwdgrp/pwent.c: pw_fd = open("/etc/passwd", O_RDONLY);
Why?
Is it just raw code, or some shadow sense present here?
Also about patches for bb-1.0-pre: one time ago I post here the patch to
change dir of shadow file to another dir than default /etc.
Is it need for someone else than me?
I think if that lines into busybox/libpwdgrp/ files will be changed from
const strings to bb_path_passwd_*_file vars, then the patch for alternative
paths to passwd/shadow files can be easy and fine.
--
Best regards, Nick Fedchik
FNM3-RIPE(-UANIC) http://www.fedchik.org.ua
More information about the busybox
mailing list