[Bug 34299] Re: deluser fails to remove home because of Examples link

2011-01-06 Thread Launchpad Bug Tracker
This bug was fixed in the package adduser - 3.112+nmu1ubuntu3

---
adduser (3.112+nmu1ubuntu3) natty; urgency=low

  * deluser: Remove symlinks to directories with rm, not rmdir (Jim Cheetham).
LP: #34299.
 -- Matthias Klose d...@ubuntu.com   Thu, 06 Jan 2011 21:48:21 +0100

** Changed in: adduser (Ubuntu)
   Status: Confirmed = Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.
https://bugs.launchpad.net/bugs/34299

Title:
  deluser fails to remove home because of Examples link

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 34299] Re: deluser fails to remove home because of Examples link

2010-08-21 Thread Nigel Babu
On a karmic system which I just tested, a new user does not have a sym
link to Examples.  Closing the bug as fixed.  Please reopen if it isn't.

** Changed in: adduser (Ubuntu)
   Status: In Progress = Fix Released

-- 
deluser fails to remove home because of Examples link
https://bugs.launchpad.net/bugs/34299
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 34299] Re: deluser fails to remove home because of Examples link

2010-08-21 Thread Jim Cheetham
Sorry, the lack of an Examples symlink in current distro versions
isn't sufficient to fix the fault. The bug is still present on 10.04,
for example ... although to trigger it you now have to create your own
symlink rather than one being created by default for you.

** Changed in: adduser (Ubuntu)
   Status: Fix Released = Incomplete

** Changed in: adduser (Ubuntu)
   Status: Incomplete = Confirmed

-- 
deluser fails to remove home because of Examples link
https://bugs.launchpad.net/bugs/34299
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 34299] Re: deluser fails to remove home because of Examples link

2010-08-21 Thread Nigel Babu
Thank you for your quick response, please forward the patch upstream to
Debian so they can take a look at it.  Thank you for looking into this.

-- 
deluser fails to remove home because of Examples link
https://bugs.launchpad.net/bugs/34299
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 34299] Re: deluser fails to remove home because of Examples link

2008-06-25 Thread Jim Cheetham
This bug needs to be re-opened, as the previous fix did not account for
the --remove-all-files usage.

deluser --remove-all-files fails to remove the Examples symlink in the more 
recent version of adduser in Hardy, adduser 3.105ubuntu1.
deluser --remove-home is OK.

[EMAIL PROTECTED]:~# adduser worik
Adding user `worik' ...
Adding new group `worik' (1001) ...
Adding new user `worik' (1001) with group `worik' ...
Creating home directory `/home/worik' ...
Copying files from `/etc/skel' ...
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
Changing the user information for worik
Enter the new value, or press ENTER for the default
Full Name []: 
Room Number []: 
Work Phone []: 
Home Phone []: 
Other []: 
Is the information correct? [y/N] y
[EMAIL PROTECTED]:~# ls -la /home/worik
total 20
drwxr-xr-x 2 worik worik 4096 2008-06-25 20:24 .
drwxr-xr-x 5 root  root  4096 2008-06-25 20:24 ..
-rw-r--r-- 1 worik worik  220 2008-06-25 20:24 .bash_logout
-rw-r--r-- 1 worik worik 2940 2008-06-25 20:24 .bashrc
lrwxrwxrwx 1 worik worik   26 2008-06-25 20:24 Examples - 
/usr/share/example-content
-rw-r--r-- 1 worik worik  586 2008-06-25 20:24 .profile

Now to delete the user :-
[EMAIL PROTECTED]:~# deluser --remove-all-files worik
Looking for files to backup/remove ...
Removing files ...
Removing user `worik' ...
Warning: Removing group `worik', since no other user is part of it.
Done.
[EMAIL PROTECTED]:~# ls -la /home/worik
total 8
drwxr-xr-x 2 1001 1001 4096 2008-06-25 20:26 .
drwxr-xr-x 5 root root 4096 2008-06-25 20:24 ..
lrwxrwxrwx 1 1001 1001   26 2008-06-25 20:24 Examples - 
/usr/share/example-content

The problem seems to be that deluser believes ~/Examples is a directory,
and tries to rmdir() it unstead of unlink()ing.

That implies that find_match() is having problems. home_match() assigns
a filename to @files on both -f and -l filetest conditions, which means
that the Examples symlink ends up in both @files and @dirs -- the dual
categorisation is harmless, because by the time rmdir() is called, it
has already been unlink()ed. But the different test structure of
find_match() won't allow dual categorisation.

Changing find_match() to test for -l before -d , and pushing -l results
into @files, fixes the problem. I hope it doesn't introduce others, but
that seems unlikely ...

Patch attached.


** Attachment added: Makes find_match assign symlinks to directories to 
@files, not @dirs
   http://launchpadlibrarian.net/15576258/deluser.34299.patch

-- 
deluser fails to remove home because of Examples link
https://bugs.launchpad.net/bugs/34299
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 34299] Re: deluser fails to remove home because of Examples link

2008-06-25 Thread Jim Cheetham
Changing bug status to In Progress as the previous fix did not account
for all use cases.

** Changed in: adduser (Ubuntu)
   Status: Fix Released = In Progress

-- 
deluser fails to remove home because of Examples link
https://bugs.launchpad.net/bugs/34299
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 34299] Re: deluser fails to remove home because of Examples link

2008-06-25 Thread Jim Cheetham
Sorry, my comment was slightly inaccurate, although the fix  patch are
still valid ...

 home_match() assigns a filename to @files on both -f and -l filetest
conditions, which means that the Examples symlink ends up in both @files
and @dirs

That should have been

 home_match() assigns a symlinked directory to @files on the -l
filetest condition, and to @dirs on the -d filetest condition, which
means that the Examples symlink ends up in both @files and @dirs

-- 
deluser fails to remove home because of Examples link
https://bugs.launchpad.net/bugs/34299
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs