projects
/
debian
/
amanda
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'upstream/3.3.2'
[debian/amanda]
/
common-src
/
local-security.c
diff --git
a/common-src/local-security.c
b/common-src/local-security.c
index 24016e7ed1efb7bc87780d0be09bcacdd866d357..9a27dff4099ad5ac2a4b6cdf9b7d30181749c415 100644
(file)
--- a/
common-src/local-security.c
+++ b/
common-src/local-security.c
@@
-61,7
+61,7
@@
const security_driver_t local_security_driver = {
"LOCAL",
local_connect,
sec_accept,
"LOCAL",
local_connect,
sec_accept,
- sec_get_authenticated_peer_name_
localhost
,
+ sec_get_authenticated_peer_name_
gethostname
,
sec_close,
stream_sendpkt,
stream_recvpkt,
sec_close,
stream_sendpkt,
stream_recvpkt,
@@
-246,20
+246,25
@@
runlocal(
/* drop root privs for good */
set_root_privs(-1);
/* drop root privs for good */
set_root_privs(-1);
- safe_fd(-1, 0);
-
if(!xamandad_path || strlen(xamandad_path) <= 1)
xamandad_path = vstralloc(amlibexecdir, "/", "amandad", NULL);
#ifndef SINGLE_USERID
if(!xamandad_path || strlen(xamandad_path) <= 1)
xamandad_path = vstralloc(amlibexecdir, "/", "amandad", NULL);
#ifndef SINGLE_USERID
+ if (client_username && *client_username != '\0') {
+ initgroups(client_username, gid);
+ } else {
+ initgroups(CLIENT_LOGIN, gid);
+ }
+ if (gid != 0)
+ setregid(uid, gid);
if (uid != 0)
setreuid(uid, uid);
if (uid != 0)
setreuid(uid, uid);
- if (gid != 0)
- setregid(gid, gid);
#endif
#endif
+ safe_fd(-1, 0);
+
execlp(xamandad_path, xamandad_path,
execlp(xamandad_path, xamandad_path,
- "-auth=local",
"amdump", "amindexd", "amidxtaped",
(char *)NULL);
+ "-auth=local", (char *)NULL);
error(_("error: couldn't exec %s: %s"), xamandad_path, strerror(errno));
/* should never go here, shut up compiler warning */
error(_("error: couldn't exec %s: %s"), xamandad_path, strerror(errno));
/* should never go here, shut up compiler warning */