[Pkg-shadow-commits] r2978 - in upstream/trunk: . libmisc
Nicolas FRANÇOIS
nekral-guest at alioth.debian.org
Fri May 22 10:16:12 UTC 2009
Author: nekral-guest
Date: 2009-05-22 10:16:12 +0000 (Fri, 22 May 2009)
New Revision: 2978
Modified:
upstream/trunk/ChangeLog
upstream/trunk/libmisc/copydir.c
Log:
* libmisc/copydir.c: Added warning for relative symlinks.
* libmisc/copydir.c (remove_tree): There is no need to check if
the root argument exist. opendir() will report this.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2009-05-21 16:46:43 UTC (rev 2977)
+++ upstream/trunk/ChangeLog 2009-05-22 10:16:12 UTC (rev 2978)
@@ -1,5 +1,11 @@
2009-05-21 Nicolas François <nicolas.francois at centraliens.net>
+ * libmisc/copydir.c: Added warning for relative symlinks.
+ * libmisc/copydir.c (remove_tree): There is no need to check if
+ the root argument exist. opendir() will report this.
+
+2009-05-21 Nicolas François <nicolas.francois at centraliens.net>
+
* man/faillog.8.xml: Minor updates.
2009-05-21 Nicolas François <nicolas.francois at centraliens.net>
Modified: upstream/trunk/libmisc/copydir.c
===================================================================
--- upstream/trunk/libmisc/copydir.c 2009-05-21 16:46:43 UTC (rev 2977)
+++ upstream/trunk/libmisc/copydir.c 2009-05-22 10:16:12 UTC (rev 2978)
@@ -494,6 +494,7 @@
/* If src was a link to an entry of the src_orig directory itself,
* create a link to the corresponding entry in the dst_orig
* directory.
+ * FIXME: This may change a relative link to an absolute link
*/
if (strncmp (oldlink, src_orig, strlen (src_orig)) == 0) {
size_t len = strlen (dst_orig) + strlen (oldlink) - strlen (src_orig) + 1;
@@ -546,7 +547,7 @@
return -1;
}
- /* FIXME: why is it unlinked? This is a copy, not a move*/
+ /* FIXME: why is it unlinked? This is a copy, not a move */
if (unlink (src) != 0) {
return -1;
}
@@ -675,14 +676,6 @@
DIR *dir;
/*
- * Make certain the directory exists.
- */
-
- if (access (root, F_OK) != 0) {
- return -1;
- }
-
- /*
* Open the source directory and read each entry. Every file
* entry in the directory is copied with the UID and GID set
* to the provided values. As an added security feature only
More information about the Pkg-shadow-commits
mailing list