[Fedora-directory-commits] setuputil/installer/unix product.cc, 1.2, 1.3

Nathan Kinder (nkinder) fedora-directory-commits at redhat.com
Thu Jan 12 17:26:54 UTC 2006


Author: nkinder

Update of /cvs/dirsec/setuputil/installer/unix
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25561

Modified Files:
	product.cc 
Log Message:
174749 - Uninstall should not follow symlinks


Index: product.cc
===================================================================
RCS file: /cvs/dirsec/setuputil/installer/unix/product.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- product.cc	13 Dec 2005 20:58:22 -0000	1.2
+++ product.cc	12 Jan 2006 17:26:46 -0000	1.3
@@ -27,6 +27,9 @@
 **
 ** HISTORY:
 ** $Log$
+** Revision 1.3  2006/01/12 17:26:46  nkinder
+** 174749 - Uninstall should not follow symlinks
+**
 ** Revision 1.2  2005/12/13 20:58:22  nhosoi
 ** [175418] Admin Server ns-update crashes if necessary attribute-value is not given
 ** 1) Although Admin Server's PostInstall program ns-update expects it, PostInstall
@@ -369,6 +372,11 @@
    DIR *dirp;
    struct dirent *dir;
    int ret = 0;
+   struct stat fi;
+
+   // Just return if directory is a symlink
+   if (lstat(input, &fi) == 0 && S_ISLNK(fi.st_mode))
+      return ret;
 
     //Open the directory to read its contents
    dirp = opendir(input);




More information about the Fedora-directory-commits mailing list