Merge "Swift: Remove unused rootwrap"

This commit is contained in:
Zuul 2023-11-26 20:05:53 +00:00 committed by Gerrit Code Review
commit a9b4c5361f
4 changed files with 0 additions and 43 deletions

View File

@ -30,8 +30,6 @@ ADD swift-base-archive /swift-base-source
'/swift' '/swift'
] %} ] %}
COPY swift-rootwrap /var/lib/kolla/venv/bin/swift-rootwrap
COPY rootwrap.conf /etc/swift/rootwrap.conf
COPY swift_sudoers /etc/sudoers.d/kolla_swift_sudoers COPY swift_sudoers /etc/sudoers.d/kolla_swift_sudoers
RUN ln -s swift-base-source/* swift \ RUN ln -s swift-base-source/* swift \
@ -39,9 +37,6 @@ RUN ln -s swift-base-source/* swift \
&& mkdir -p /etc/swift /var/cache/swift /var/lock/swift \ && mkdir -p /etc/swift /var/cache/swift /var/lock/swift \
&& cp -r /swift/etc/* /etc/swift/ \ && cp -r /swift/etc/* /etc/swift/ \
&& chown -R swift: /var/cache/swift /var/lock/swift \ && chown -R swift: /var/cache/swift /var/lock/swift \
&& chmod 755 /var/lib/kolla/venv/bin/swift-rootwrap \
&& chmod 644 /etc/swift/rootwrap.conf \
&& sed -i 's|^exec_dirs.*|exec_dirs=/var/lib/kolla/venv/bin,/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin|g' /etc/swift/rootwrap.conf \
&& chmod 750 /etc/sudoers.d \ && chmod 750 /etc/sudoers.d \
&& chmod 440 /etc/sudoers.d/kolla_swift_sudoers \ && chmod 440 /etc/sudoers.d/kolla_swift_sudoers \
&& mkdir -p /opt/swift && mkdir -p /opt/swift

View File

@ -1,27 +0,0 @@
# Configuration for swift-rootwrap
# This file should be owned by (and only-writeable by) the root user
[DEFAULT]
# List of directories to load filter definitions from (separated by ',').
# These directories MUST all be only writeable by root !
filters_path=/etc/swift/rootwrap.d,/usr/share/swift/rootwrap
# List of directories to search executables in, in case filters do not
# explicitely specify a full path (separated by ',')
# If not specified, defaults to system PATH environment variable.
# These directories MUST all be only writeable by root !
exec_dirs=/sbin,/usr/sbin,/bin,/usr/bin
# Enable logging to syslog
# Default value is False
use_syslog=False
# Which syslog facility to use.
# Valid values include auth, authpriv, syslog, local0, local1...
# Default value is 'syslog'
syslog_log_facility=syslog
# Which messages to log.
# INFO means log all usage
# ERROR means only log unsuccessful attempts
syslog_log_level=ERROR

View File

@ -1,10 +0,0 @@
#!/usr/bin/python3
# PBR Generated from 'console_scripts'
import sys
from oslo_rootwrap.cmd import main
if __name__ == "__main__":
sys.exit(main())

View File

@ -1,3 +1,2 @@
swift ALL=(root) NOPASSWD: /bin/find /srv/node/ -maxdepth 1 -type d -execdir chown swift\:swift {} \\+ swift ALL=(root) NOPASSWD: /bin/find /srv/node/ -maxdepth 1 -type d -execdir chown swift\:swift {} \\+
swift ALL=(root) NOPASSWD: /usr/bin/find /srv/node/ -maxdepth 1 -type d -execdir chown swift\:swift {} \\+ swift ALL=(root) NOPASSWD: /usr/bin/find /srv/node/ -maxdepth 1 -type d -execdir chown swift\:swift {} \\+
swift ALL=(root) NOPASSWD: /var/lib/kolla/venv/bin/swift-rootwrap /etc/swift/rootwrap.conf *