chiark / gitweb /
nss: don't disable nscd anymore, since it doesn't make sense to socket-activate nscd...
authorLennart Poettering <lennart@poettering.net>
Tue, 17 Aug 2010 16:00:48 +0000 (18:00 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 17 Aug 2010 16:13:46 +0000 (18:13 +0200)
src/main.c
src/util.c
src/util.h

index 51253c66c878a09273660f473793d092333d27d3..43b469fb06e2cde615ea93d4f5a4534b5b53efa5 100644 (file)
@@ -975,20 +975,14 @@ int main(int argc, char *argv[]) {
         log_full(arg_running_as == MANAGER_SYSTEM ? LOG_INFO : LOG_DEBUG,
                  PACKAGE_STRING " running in %s mode. (" SYSTEMD_FEATURES ")", manager_running_as_to_string(arg_running_as));
 
-        if (arg_running_as == MANAGER_SYSTEM) {
+        if (arg_running_as == MANAGER_SYSTEM && !serialization) {
+                if (arg_show_status)
+                        status_welcome();
 
-                /* Disable nscd, to avoid deadlocks when systemd uses
-                 * NSS and the nscd socket is maintained by us. */
-                nss_disable_nscd();
-
-                if (!serialization) {
-                        if (arg_show_status)
-                                status_welcome();
-                        modprobe_setup(arg_nomodules);
-                        kmod_setup();
-                        hostname_setup();
-                        loopback_setup();
-                }
+                modprobe_setup(arg_nomodules);
+                kmod_setup();
+                hostname_setup();
+                loopback_setup();
         }
 
         if ((r = manager_new(arg_running_as, &m)) < 0) {
index 3bcce2f019bcf6af535d5f4942d135185da4a870..0b0063ee0e6078a48cdec42f053be97c42a7742a 100644 (file)
@@ -2981,23 +2981,6 @@ char *ellipsize(const char *s, unsigned length, unsigned percent) {
         return r;
 }
 
-void nss_disable_nscd(void) {
-
-        void (*func)(void);
-
-        /* This is an internal glibc function call. We are not
-         * supposed to call this, because we are not nscd. However
-         * sometimes we feel really dangerous and do it
-         * nonetheless. Muahahah! But at least we protect this with a
-         * dlsym() just in case glibc takes this away from us. */
-
-        if ((func = dlsym(RTLD_DEFAULT, "__nss_disable_nscd"))) {
-                log_debug("Disabling nscd.");
-                func();
-        } else
-                log_debug("Cannot disable nscd.");
-}
-
 int touch(const char *path) {
         int fd;
 
index 18dfa97b8c183d54832940f4e7396fd6a9d3aef5..97e1b1ba41d5ced38b93bbc13227930da447900c 100644 (file)
@@ -336,8 +336,6 @@ int running_in_chroot(void);
 
 char *ellipsize(const char *s, unsigned length, unsigned percent);
 
-void nss_disable_nscd(void);
-
 int touch(const char *path);
 
 const char *ioprio_class_to_string(int i);