Bug 66819

Summary: useradd not changing symlink ownership when copying from /etc/skel
Product: [Retired] Red Hat Linux Reporter: Michael Weiser <mweiser>
Component: shadow-utilsAssignee: Eido Inoue <havill>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 4.0.3-36 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-18 20:23:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch adding lchown to symlink creation in useradd none

Description Michael Weiser 2002-06-17 12:33:32 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020605

Description of problem:
When placing symlinks into /etc/skel copy_tree of libmisc/copydir.c will
properly create the symlink in the destination directory but not change the
ownership to the target user/group. This makes httpd Option SymlinkIfOwnerMatch
break for default weg pages including symlinks placed into /etc/skel/public_html
for example.

Version-Release number of selected component (if applicable):
20000902-4

How reproducible:
Always

Steps to Reproduce:
[root@zaphod root]# touch /etc/skel/boo
[root@zaphod root]# ln -s boo /etc/skel/boo2
[root@zaphod root]# ls -l /etc/skel
total 0
-rw-r--r--    1 root     root            0 Jun 17 13:28 boo
lrwxrwxrwx    1 root     root            3 Jun 17 13:28 boo2 -> boo
[root@zaphod root]# useradd -m boo


Actual Results:  [root@zaphod root]# ls -l /home/boo
total 0
-rw-r--r--    1 boo      boo             0 Jun 17 13:29 boo
lrwxrwxrwx    1 root     root            3 Jun 17 13:29 boo2 -> boo

Expected Results:  [root@zaphod root]# ls -l /home/boo
total 0
-rw-r--r--    1 boo      boo             0 Jun 17 13:29 boo
lrwxrwxrwx    1 boo      boo             3 Jun 17 13:29 boo2 -> boo

Additional info:

I'll see whether I can attach the patch I've done that seems to do the magic for me.

Comment 1 Michael Weiser 2002-06-17 12:34:39 UTC
Created attachment 61164 [details]
patch adding lchown to symlink creation in useradd

Comment 2 Miloslav Trmač 2004-10-18 20:23:03 UTC
Fixed in shadow-utils-4.0.3-36. Thanks for the patch.