]> git.proxmox.com Git - mirror_lxcfs.git/blobdiff - bindings.c
pam_cgfs: improve cg_filter_and_set_cpus()
[mirror_lxcfs.git] / bindings.c
index 0ae8fcf9fff8fe16e4910de84251a3df8c9dc205..9fbabb6a947403f3b594df2a7e63b99d7273379b 100644 (file)
@@ -1673,17 +1673,6 @@ int cg_getattr(const char *path, struct stat *sb)
                        ret = -ENOENT;
                        goto out;
                }
-               /* We should only deny getting the attributes of a file if it
-                * neither contains O_RDONLY permission nor O_WRONLY
-                * permissions. Otherwise we ls -al will not show attributes on
-                * O_WRONLY files. Such files are quite common under /proc or
-                * /sys. */
-               if (!fc_may_access(fc, controller, path1, path2, O_RDONLY) &&
-                   !fc_may_access(fc, controller, path1, path2, O_WRONLY)) {
-                       ret = -EACCES;
-                       goto out;
-               }
-
                ret = 0;
        }
 
@@ -3203,11 +3192,11 @@ static int proc_meminfo_read(char *buf, size_t size, off_t offset,
                } else if (startswith(line, "SwapCached:")) {
                        snprintf(lbuf, 100, "SwapCached:     %8lu kB\n", 0UL);
                        printme = lbuf;
-               } else if (startswith(line, "Active")) {
+               } else if (startswith(line, "Active:")) {
                        snprintf(lbuf, 100, "Active:         %8lu kB\n",
                                        active_anon + active_file);
                        printme = lbuf;
-               } else if (startswith(line, "Inactive")) {
+               } else if (startswith(line, "Inactive:")) {
                        snprintf(lbuf, 100, "Inactive:       %8lu kB\n",
                                        inactive_anon + inactive_file);
                        printme = lbuf;