diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-03-17 11:29:43 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-03-17 11:29:43 -0700 |
commit | 270b7f05def72d184e7484bcbbd6cf116b0a9ac9 (patch) | |
tree | 074d2e3e047d3ede4ad0102661910c096bd4aebe | |
parent | ba4639d5d1fd9c20d180d80f2a2fc95a8cde9494 (diff) | |
parent | 00da1455d0f35193aa6aae2d7e74edb48971e778 (diff) | |
download | vyatta-cfg-quagga-270b7f05def72d184e7484bcbbd6cf116b0a9ac9.tar.gz vyatta-cfg-quagga-270b7f05def72d184e7484bcbbd6cf116b0a9ac9.zip |
Merge branch 'larkspur' of suva.vyatta.com:/git/vyatta-cfg-system into larkspur
-rw-r--r-- | debian/changelog | 8 | ||||
-rwxr-xr-x | lib/Vyatta/Login/User.pm | 9 | ||||
-rwxr-xr-x | scripts/rl-system.init | 1 |
3 files changed, 14 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog index 38ed8db4..fd2d376f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +vyatta-cfg-system (0.17.21) unstable; urgency=low + + * Make /var/run/vyatta and /var/log/vyatta + * Use userdel -f to force removal of user + * Better version of forcing user logout + + -- Stephen Hemminger <stephen.hemminger@vyatta.com> Mon, 15 Mar 2010 10:45:04 -0700 + vyatta-cfg-system (0.17.20) unstable; urgency=low [ Stephen Hemminger ] diff --git a/lib/Vyatta/Login/User.pm b/lib/Vyatta/Login/User.pm index a65e5cb1..afc3cf53 100755 --- a/lib/Vyatta/Login/User.pm +++ b/lib/Vyatta/Login/User.pm @@ -109,10 +109,11 @@ sub _delete_user { } elsif ( getlogin() eq $user ) { die "Attempting to delete current user: $user\n"; } else { - # This logs out user (so we can delete it) - system("pkill -HUP -U $user"); - sleep(1); - system("pkill -9 -U $user"); + if (`who | grep "^$user"` ne '') { + warn "$user is logged in, forcing logout\n"; + system("pkill -HUP -u $user"); + } + system("pkill -9 -u $user"); system("userdel $user") == 0 or die "userdel of $user failed: $?\n"; diff --git a/scripts/rl-system.init b/scripts/rl-system.init index 607bbb45..e7eaed14 100755 --- a/scripts/rl-system.init +++ b/scripts/rl-system.init @@ -171,6 +171,7 @@ setup_ntp_config_file () { # system defaults. security_reset () { # restore PAM back to virgin state (no radius other services) + rm -f /etc/pam_radius_auth.conf if grep -q radius /etc/pam.d/common-auth then pam-auth-update --remove radius fi |