Hello community,

here is the log from the commit of package permissions for openSUSE:Factory
checked in at Fri May 27 11:16:12 CEST 2011.



--------
--- permissions/permissions.changes     2011-05-12 13:48:45.000000000 +0200
+++ /mounts/work_src_done/STABLE/permissions/permissions.changes        
2011-05-26 17:24:27.000000000 +0200
@@ -1,0 +2,5 @@
+Thu May 26 15:23:49 UTC 2011 - [email protected]
+
+- read /sys/kernel/fscaps for fscaps settings
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


Old:
----
  permissions-2011.05.12.1347.tar.bz2

New:
----
  permissions-2011.05.26.1717.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ permissions.spec ++++++
--- /var/tmp/diff_new_pack.HxJLto/_old  2011-05-27 11:14:52.000000000 +0200
+++ /var/tmp/diff_new_pack.HxJLto/_new  2011-05-27 11:14:52.000000000 +0200
@@ -24,7 +24,7 @@
 License:        GPLv2+
 Group:          Productivity/Security
 AutoReqProv:    on
-Version:        2011.05.12.1347
+Version:        2011.05.26.1717
 Release:        1
 Provides:       aaa_base:/etc/permissions
 PreReq:         %fillup_prereq

++++++ permissions-2011.05.12.1347.tar.bz2 -> 
permissions-2011.05.26.1717.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/permissions-2011.05.12.1347/chkstat.c 
new/permissions-2011.05.26.1717/chkstat.c
--- old/permissions-2011.05.12.1347/chkstat.c   2011-05-12 13:47:52.000000000 
+0200
+++ new/permissions-2011.05.26.1717/chkstat.c   2011-05-26 17:17:58.000000000 
+0200
@@ -509,31 +509,20 @@
     }
 }
 
-/* that's really ugly. There should be sysctl or something */
+/* check /sys/kernel/fscaps, 2.6.39 */
 static int
-check_fscaps_cmdline()
+check_fscaps_enabled()
 {
   FILE* fp;
-  char line[4096];
+  char line[128];
   int have_fscaps = FSCAPS_DEFAULT_ENABLED;
-  if ((fp = fopen("/proc/cmdline", "r")) == 0)
+  if ((fp = fopen("/sys/kernel/fscaps", "r")) == 0)
     {
       goto out;
     }
   if (readline(fp, line, sizeof(line)))
     {
-      char* p;
-      if ((p = strstr(line, "file_caps")))
-       {
-         if (p - line == 3 && !strncmp("no_", p, 3))
-           {
-             have_fscaps = 0;
-           }
-         else
-           {
-             have_fscaps = 1;
-           }
-       }
+      have_fscaps = atoi(line);
     }
   fclose(fp);
 out:
@@ -704,7 +693,7 @@
     }
 
   if (have_fscaps == -1)
-      have_fscaps = check_fscaps_cmdline();
+      have_fscaps = check_fscaps_enabled();
 
   if (systemmode)
     {
@@ -913,7 +902,7 @@
            printf("\t%s\n", permfiles[i]);
          if (!have_fscaps)
            {
-             printf("fscaps support disabled (file_caps missing in 
/proc/cmdline).\n");
+             printf("kernel has fscaps support disabled.\n");
            }
          if (rootl)
            {


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to