Rev 664: fixed the tsmsm module for non-root users on RHEL5 in http://samba.org/~tridge/3_0-ctdb

tridge at samba.org tridge at samba.org
Mon Nov 12 10:56:23 GMT 2007


------------------------------------------------------------
revno: 664
revision-id:tridge at samba.org-20071112105544-pjg096dj7spsm8zr
parent: tridge at samba.org-20071101003336-jb0gb3xd0zui7i6e
committer: Andrew Tridgell <tridge at samba.org>
branch nick: s3-ctdb-tridge
timestamp: Mon 2007-11-12 21:55:44 +1100
message:
  fixed the tsmsm module for non-root users on RHEL5
modified:
  source/modules/vfs_tsmsm.c     vfs_tsmsm.c-20070827024912-m3pirz28sej5g6pz-1
=== modified file 'source/modules/vfs_tsmsm.c'
--- a/source/modules/vfs_tsmsm.c	2007-08-27 02:51:20 +0000
+++ b/source/modules/vfs_tsmsm.c	2007-11-12 10:55:44 +0000
@@ -155,12 +155,10 @@
 		return 0;
 	}
 
-	/* AIX has DMAPI but no POSIX capablities support. In this case,
-	 * we need to be root to do DMAPI manipulations.
-	 */
-#ifndef HAVE_POSIX_CAPABILITIES
+	/* using POSIX capabilities does not work here. It's a slow path, so 
+	   become_root() is just as good anyway (tridge) */
 	become_root();
-#endif
+
 	/* go the slow DMAPI route */
 	if (dm_path_to_handle((char*)path, &dmhandle, &dmhandle_len) != 0) {
 		ret = -1;
@@ -178,10 +176,9 @@
 	ret = 0;
 
 	dm_handle_free(dmhandle, dmhandle_len);	
+
 done:
-#ifndef HAVE_POSIX_CAPABILITIES
 	unbecome_root();
-#endif
 	return ret;
 }
 



More information about the samba-cvs mailing list