Skip to content

Commit a40e54d

Browse files
committed
Require XC_ENABLE_MULTIUSER to be set to enable multiuser
SOFTWARE-5481. Multiuser causes xrootd to fail to start if we don't have CAP_SETUID and CAP_SETGID; allow enabling/disabling it via an environment variable. The *-privileged.service files will set that environment variable.
1 parent ad46e60 commit a40e54d

3 files changed

Lines changed: 13 additions & 9 deletions

File tree

configs/60-osg-multiuser.cfg

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
# Enable multiuser plugin. This makes XRootD to write the files with the
22
# ownership of the user that authenticated to the server and not as the
33
# 'xrootd' user
4-
if exec xrootd
4+
if exec xrootd && defined ?~XC_ENABLE_MULTIUSER
55
ofs.osslib ++ libXrdMultiuser.so
6-
else
6+
else if defined ?~XC_ENABLE_MULTIUSER
77
ofs.osslib libXrdMultiuser.so default
88
fi
99

10-
# Enable the checksum wrapper
11-
ofs.ckslib * libXrdMultiuser.so
10+
if defined ?~XC_ENABLE_MULTIUSER
11+
# Enable the checksum wrapper
12+
ofs.ckslib * libXrdMultiuser.so
1213

13-
xrootd.chksum max 2 md5 adler32 crc32
14+
xrootd.chksum max 2 md5 adler32 crc32
1415

15-
# The checksum plugin that is included in the multiuser can also
16-
# checksum while it is writing a file. To turn this on, uncomment the
17-
# following line:
18-
# multiuser.checksumonwrite on
16+
# The checksum plugin that is included in the multiuser can also
17+
# checksum while it is writing a file. To turn this on, uncomment the
18+
# following line:
19+
# multiuser.checksumonwrite on
20+
fi

configs/cmsd-privileged@.service

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ After=network-online.target
88
[Service]
99
# Note "-R xrootd" here instructs xrootd to drop privileges to the xrootd Unix user.
1010
ExecStart=/usr/bin/cmsd -l /var/log/xrootd/cmsd.log -c /etc/xrootd/xrootd-%i.cfg -k fifo -s /var/run/xrootd/cmsd-%i.pid -n %i -R xrootd
11+
Environment=XC_ENABLE_MULTIUSER=1
1112
Type=simple
1213
Restart=on-abort
1314
RestartSec=0

configs/xrootd-privileged@.service

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ After=network-online.target
88
[Service]
99
# Note "-R xrootd" here instructs xrootd to drop privileges to the xrootd Unix user.
1010
ExecStart=/usr/bin/xrootd -l /var/log/xrootd/xrootd.log -c /etc/xrootd/xrootd-%i.cfg -k fifo -s /var/run/xrootd/xrootd-%i.pid -n %i -R xrootd
11+
Environment=XC_ENABLE_MULTIUSER=1
1112
Type=simple
1213
Restart=on-abort
1314
RestartSec=0

0 commit comments

Comments
 (0)