Bug 66819 - useradd not changing symlink ownership when copying from /etc/skel
Summary: useradd not changing symlink ownership when copying from /etc/skel
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: shadow-utils (Show other bugs)
(Show other bugs)
Version: 7.2
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Eido Inoue
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-06-17 12:33 UTC by Michael Weiser
Modified: 2007-04-18 16:43 UTC (History)
0 users

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: ---


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

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.


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