revert: Description : Adding to enable/disable the multiuser feature.
authorINSUN PYO <insun.pyo@samsung.com>
Wed, 28 Feb 2018 02:29:47 +0000 (11:29 +0900)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Mon, 12 Feb 2024 15:37:43 +0000 (16:37 +0100)
* I don't revert "unit/user@.service.m4.in (Environment=XDG_RUNTIME_DIR=/run/user/%U)
* If you want to revert this, you should add "session  required pam_loginuid.so" to /etc/pam.d/systemd-user

Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I6f8e132eb46a150968662bc2574fdf85eb715a52

Makefile.am
configure.ac
packaging/systemd.spec
src/core/execute.c
tmpfiles.d/systemd.conf.m4
units/run-user-5001.mount [deleted file]

index 9bc325a..be9eb0a 100644 (file)
@@ -5938,16 +5938,8 @@ dist_udevrules_DATA += \
 nodist_udevrules_DATA += \
        src/login/71-seat.rules \
        src/login/73-seat-late.rules
-else
-MULTI_USER_TARGET_WANTS += \
-       user@5001.service
-endif
 
-dist_systemunit_DATA += \
-       units/run-user-5001.mount
-
-SYSINIT_TARGET_WANTS += \
-       run-user-5001.mount
+endif
 
 polkitpolicy_in_files += \
        src/login/org.freedesktop.login1.policy.in
index 0bba479..057beaa 100644 (file)
@@ -1029,7 +1029,6 @@ have_logind=no
 AC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
 if test "x$enable_logind" != "xno"; then
         have_logind=yes
-        M4_DEFINES="$M4_DEFINES -DHAVE_LOGIND"
 fi
 AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
 AS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ])
index 18762bb..672d68f 100644 (file)
@@ -9,7 +9,6 @@
 %define WITH_BACKLIGHT 0
 %define WITH_TIMEDATED 0
 %define WITH_RFKILL 0
-%define with_multiuser 1
 %define WITH_MACHINED 0
 %define WITH_DOC 0
 %define WITH_HOSTNAMED 0
@@ -166,9 +165,6 @@ cp %{SOURCE3} .
         --with-sysvinit-path= \
         --with-sysvrcnd-path= \
         --with-smack-run-label=System::Privileged \
-%if ! %{?with_multiuser}
-        --disable-logind \
-%endif
         cc_cv_CFLAGS__flto=no
 make %{?_smp_mflags} \
         systemunitdir=%{_unitdir} \
@@ -210,9 +206,7 @@ EOF
 /usr/bin/ln -s ../bin/systemctl %{buildroot}%{_sbindir}/runlevel
 
 # legacy links
-%if %{?with_multiuser}
 /usr/bin/ln -s loginctl %{buildroot}%{_bindir}/systemd-loginctl
-%endif
 
 # We create all wants links manually at installation time to make sure
 # they are not owned and hence overriden by rpm after the used deleted
@@ -310,9 +304,7 @@ ln -sf ./libsystemd.pc %{buildroot}%{_libdir}/pkgconfig/libsystemd-login.pc
 /usr/bin/systemctl stop systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd.service >/dev/null 2>&1 || :
 
 # Rename configuration files that changed their names
-%if %{?with_multiuser}
 /usr/bin/mv -n %{_sysconfdir}/systemd/systemd-logind.conf %{_sysconfdir}/systemd/logind.conf >/dev/null 2>&1 || :
-%endif
 /usr/bin/mv -n %{_sysconfdir}/systemd/systemd-journald.conf %{_sysconfdir}/systemd/journald.conf >/dev/null 2>&1 || :
 
 %post
@@ -348,9 +340,7 @@ fi
 %files
 %manifest %{name}.manifest
 %license LICENSE.LGPL2.1  LICENSE.GPL2
-%if %{with_multiuser}
 %config %{_sysconfdir}/pam.d/systemd-user
-%endif
 %{_bindir}/bootctl
 %{_bindir}/busctl
 %{_bindir}/kernel-install
@@ -407,9 +397,7 @@ fi
 %if %{?WITH_HOSTNAMED}
 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf
 %endif
-%if %{?with_multiuser}
 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf
-%endif
 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf
 %if %{?WITH_TIMEDATED}
 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf
@@ -422,9 +410,7 @@ fi
 %endif
 %config(noreplace) %{_sysconfdir}/systemd/system.conf
 %config(noreplace) %{_sysconfdir}/systemd/user.conf
-%if %{?with_multiuser}
 %config(noreplace) %{_sysconfdir}/systemd/logind.conf
-%endif
 %config(noreplace) %{_sysconfdir}/systemd/journald.conf
 %config(noreplace) %{_sysconfdir}/udev/udev.conf
 %{_sysconfdir}/xdg/systemd
@@ -442,10 +428,8 @@ fi
 %{_bindir}/systemd-tty-ask-password-agent
 %{_bindir}/systemd-machine-id-setup
 %{_bindir}/systemd-socket-activate
-%if %{?with_multiuser}
 %{_bindir}/loginctl
 %{_bindir}/systemd-loginctl
-%endif
 %{_bindir}/journalctl
 %{_bindir}/systemd-tmpfiles
 %{_bindir}/systemd-nspawn
@@ -455,9 +439,7 @@ fi
 %{_bindir}/systemd-cgtop
 %{_bindir}/systemd-delta
 %{_bindir}/systemd-detect-virt
-%if %{?with_multiuser}
 %{_bindir}/systemd-inhibit
-%endif
 %{_bindir}/udevadm
 %{_bindir}/systemd-escape
 %{_bindir}/systemd-path
@@ -522,9 +504,7 @@ fi
 %if %{?WITH_HOSTNAMED}
 %{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service
 %endif
-%if %{?with_multiuser}
 %{_datadir}/dbus-1/system-services/org.freedesktop.login1.service
-%endif
 %{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service
 %if %{?WITH_TIMEDATED}
 %{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service
@@ -544,9 +524,7 @@ fi
 %files -n libsystemd
 %manifest %{name}.manifest
 %license LICENSE.LGPL2.1
-%if %{?with_multiuser}
 %{_libdir}/security/pam_systemd.so
-%endif
 %{_libdir}/libsystemd.so.*
 %{_libdir}/libudev.so.*
 %{_libdir}/libnss_myhostname.so.2
index e005986..4b81c83 100644 (file)
@@ -920,7 +920,6 @@ static int setup_pam(
 
         parent_pid = getpid();
 
-#ifdef HAVE_LOGIND
         pam_pid = fork();
         if (pam_pid < 0) {
                 r = -errno;
@@ -999,7 +998,6 @@ static int setup_pam(
                 pam_end(handle, pam_code | flags);
                 _exit(ret);
         }
-#endif // HAVE_LOGIND
 
         barrier_set_role(&barrier, BARRIER_PARENT);
 
index 3681756..2cd58e9 100644 (file)
@@ -71,10 +71,3 @@ a+ /var/log/journal/%m/system.journal - - - - group:wheel:r--
 
 d /var/lib/systemd 0755 root root -
 d /var/lib/systemd/coredump 0755 root root 3d
-
-m4_ifdef(`HAVE_LOGIND',
-`',
-`
-f /run/systemd/users/5001 0775 owner users -
-'
-)m4_dnl
diff --git a/units/run-user-5001.mount b/units/run-user-5001.mount
deleted file mode 100644 (file)
index 8957251..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=Default User Directory
-DefaultDependencies=no
-Conflicts=umount.target
-After=systemd-tmpfiles-setup.service
-
-[Mount]
-What=tmpfs
-Where=/run/user/5001
-Type=tmpfs
-Options=mode=700,smackfsroot=*,nosuid,noexec,nodev,uid=5001,gid=100,size=98748k