FreeBSD Bugzilla – Attachment 13076 Details for
Bug 25012
tar(1) as root does not preserve ownership of symlinks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 911 bytes, created by
Martin Kammerhofer
on 2001-02-11 22:50:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Martin Kammerhofer
Created:
2001-02-11 22:50:01 UTC
Size:
911 bytes
patch
obsolete
>Index: extract.c >=================================================================== >RCS file: /home/ncvs/src/gnu/usr.bin/tar/extract.c,v >retrieving revision 1.5 >diff -u -r1.5 extract.c >--- extract.c 1997/04/13 08:39:38 1.5 >+++ extract.c 2001/02/10 15:36:35 >@@ -605,9 +605,19 @@ > > check = symlink (current_link_name, > skipcrud + current_file_name); >- /* FIXME, don't worry uid, gid, etc... */ >- if (check == 0) >- break; >+ if (check == 0) { >+ if (we_are_root || f_do_chown) >+ { >+ if (lchown (skipcrud + current_file_name, >+ hstat.st_uid, hstat.st_gid) < 0) >+ { >+ msg_perror ("cannot chown slink %s to uid %d gid %d", >+ skipcrud + current_file_name, >+ hstat.st_uid, hstat.st_gid); >+ } >+ } >+ break; >+ } > if (make_dirs (current_file_name + skipcrud)) > goto again_symlink; > msg_perror ("Could not create symlink to %s",
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 25012
: 13076