diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-04-24 12:03:45 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-04-24 12:03:45 +0300 |
commit | 39b75d24cfe50e65ca940cc5466beb03c801d033 (patch) | |
tree | f7777db67b55f5139676e4abf55e49b84ecad5af /lib/psm.c | |
parent | ae929240b7643927bc8a317e7992272f69a00fe0 (diff) | |
download | rpm-39b75d24cfe50e65ca940cc5466beb03c801d033.tar.gz rpm-39b75d24cfe50e65ca940cc5466beb03c801d033.tar.bz2 rpm-39b75d24cfe50e65ca940cc5466beb03c801d033.zip |
Force preloading of name service libraries early in initialization
- this used to be done in psm chroot operation, but we can end up chrooting
before that and without psm being involved
- don't bother with getpwnam() etc, a single gethostbyname() loads all
that we need
Diffstat (limited to 'lib/psm.c')
-rw-r--r-- | lib/psm.c | 14 |
1 files changed, 0 insertions, 14 deletions
@@ -1680,20 +1680,6 @@ assert(psm->mi == NULL); if (rootDir != NULL && !(rootDir[0] == '/' && rootDir[1] == '\0') && !rpmtsChrootDone(ts) && !psm->chrootDone) { - static int _pw_loaded = 0; - static int _gr_loaded = 0; - - if (!_pw_loaded) { - (void)getpwnam("root"); - endpwent(); - _pw_loaded++; - } - if (!_gr_loaded) { - (void)getgrnam("root"); - endgrent(); - _gr_loaded++; - } - xx = chdir("/"); if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/') rc = chroot(rootDir); |