]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/priv.c
Tweak mutex order for SD
[bacula/bacula] / bacula / src / lib / priv.c
index 82f416554e0e8debbfb817d55866d6673ce44e91..01ae7ac276cfb1b81e0bcf492169a6e0234d4b90 100644 (file)
@@ -48,6 +48,7 @@ extern "C" int initgroups(const char *,int);
  */
 void drop(char *uname, char *gname, bool keep_readall_caps)
 {
+#if   defined(HAVE_PWD_H) && defined(HAVE_GRP_H)
    struct passwd *passw = NULL;
    struct group *group = NULL;
    gid_t gid;
@@ -125,10 +126,11 @@ void drop(char *uname, char *gname, bool keep_readall_caps)
       }
       cap_free(caps);
 #else
-      Emsg0(M_ERROR_TERM, 0, _("Keep readall capabilities is not implemented on this platform yet\n"));
+      Emsg0(M_ERROR_TERM, 0, _("Keep readall caps not implemented this OS or missing libraries.\n"));
 #endif
    } else if (setuid(uid)) {
       berrno be;
       Emsg1(M_ERROR_TERM, 0, _("Could not set specified userid: %s\n"), username);
    }
+#endif
 }