Whamcloud - gitweb
LU-4746 libcfs: Use Linux kernel current_umask() function 42/11642/2
authorJames Simmons <uja.ornl@gmail.com>
Thu, 28 Aug 2014 18:58:50 +0000 (14:58 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 15 Sep 2014 16:47:49 +0000 (16:47 +0000)
Lustre not using kernel current_umask() function breaks GRSecurity
umask handling. This is also needed for the linux api cleanup.

Replaces current->fs->umask with more secure current_umask() function

Change-Id: Ide0b83eb3e6c69e1e2178ede37ce708227f1c107
Signed-off-by: Andrew Prout <ajprout@hotmail.com>
Signed-off-by: Cliff White <cliffwhi@intel.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/11642
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
libcfs/include/libcfs/linux/libcfs.h

index f96a780..8c6864f 100644 (file)
@@ -127,7 +127,6 @@ struct cfs_stack_trace {
  * Macros to access common characteristics of "current" UNIX process.
  */
 #define current_pid()             (current->pid)
-#define current_umask()           (current->fs->umask)
 #define current_comm()            (current->comm)
 
 /* check if task is running in compat mode.*/