Imported Upstream version 3.1.0
[debian/amanda] / common-src / rsh-security.c
index 4d14f3bdfaa3755a0d715794802b340213e360ef..3cd3664dcc8dd3ed8b20c448ad496eb80edb12ec 100644 (file)
 #include "util.h"
 #include "event.h"
 #include "packet.h"
-#include "queue.h"
 #include "security.h"
 #include "security-util.h"
 #include "stream.h"
-#include "version.h"
 
 /*
  * Path to the rsh binary.  This should be configurable.
@@ -230,11 +228,13 @@ runrsh(
        return (0);
     }
 
+    /* drop root privs permanently */
+    set_root_privs(-1);
+
     safe_fd(-1, 0);
 
     if(!xamandad_path || strlen(xamandad_path) <= 1) 
-       xamandad_path = vstralloc(amlibexecdir, "/", "amandad",
-                                versionsuffix(), NULL);
+       xamandad_path = vstralloc(amlibexecdir, "/", "amandad", NULL);
     if(!xclient_username || strlen(xclient_username) <= 1)
        xclient_username = CLIENT_LOGIN;