Bug 66819 - useradd not changing symlink ownership when copying from /etc/skel
useradd not changing symlink ownership when copying from /etc/skel
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: shadow-utils (Show other bugs)
7.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Eido Inoue
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-06-17 08:33 EDT by Michael Weiser
Modified: 2007-04-18 12:43 EDT (History)
0 users

See Also:
Fixed In Version: 4.0.3-36
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-18 16:23:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch adding lchown to symlink creation in useradd (445 bytes, patch)
2002-06-17 08:34 EDT, Michael Weiser
no flags Details | Diff

  None (edit)
Description Michael Weiser 2002-06-17 08:33:32 EDT
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 08:34:39 EDT
Created attachment 61164 [details]
patch adding lchown to symlink creation in useradd
Comment 2 Miloslav Trmač 2004-10-18 16:23:03 EDT
Fixed in shadow-utils-4.0.3-36. Thanks for the patch.

Note You need to log in before you can comment on or make changes to this bug.