Skip to content
Snippets Groups Projects
Commit 1e057556 authored by Steven Murray's avatar Steven Murray
Browse files

CASTOR-4792 RFE: writetp and rtcpd of 2.1.15-x should only allow pool owners to migrate files

Fixed.
parent 996b30ca
No related branches found
No related tags found
No related merge requests found
......@@ -62,11 +62,16 @@ int vmgrchecki(char *vid, char *vsn, char *dgn, char *den, char *lbl, int mode,
return (EINVAL);
sleep (60);
}
if (((pool_uid != uid && uid != 0) ||
(pool_gid != gid && gid != 0)) &&
(Cupv_check (uid, gid, clienthost, "TAPE_SERVERS", P_ADMIN) &&
Cupv_check (uid, gid, clienthost, NULL, P_ADMIN)))
const int poolHasOwner = 0 != pool_uid && 0 != pool_gid;
if(!poolHasOwner) {
return (EACCES);
}
const int userOwnsPool = pool_uid == uid && pool_gid == gid;
if(!userOwnsPool) {
return (EACCES);
}
}
if (*vsn) {
if (strcmp (vsn, tape_info.vsn)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment