]> git.pld-linux.org Git - packages/libcgroup.git/blob - libcgroup-0.37-chmod.patch
- rel 5; add patches from FC
[packages/libcgroup.git] / libcgroup-0.37-chmod.patch
1 diff -up libcgroup-0.41/src/api.c.chmod libcgroup-0.41/src/api.c
2 --- libcgroup-0.41/src/api.c.chmod      2014-01-13 15:05:56.000000000 +0100
3 +++ libcgroup-0.41/src/api.c    2014-01-13 20:41:55.255577622 +0100
4 @@ -153,6 +153,10 @@ static int cg_chown_file(FTS *fts, FTSEN
5         return ret;
6  }
7  
8 +int cg_chmod_file(FTS *fts, FTSENT *ent, mode_t dir_mode,
9 +       int dirm_change, mode_t file_mode, int filem_change,
10 +       int owner_is_umask);
11 +
12  /*
13   * TODO: Need to decide a better place to put this function.
14   */
15 @@ -160,6 +164,8 @@ static int cg_chown_recursive(char **pat
16  {
17         int ret = 0;
18         FTS *fts;
19 +       /* mode 664 */
20 +       mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH;
21  
22         cgroup_dbg("chown: path is %s\n", *path);
23         fts = fts_open(path, FTS_PHYSICAL | FTS_NOCHDIR |
24 @@ -177,6 +183,7 @@ static int cg_chown_recursive(char **pat
25                         cgroup_warn("Warning: fts_read failed\n");
26                         break;
27                 }
28 +               cg_chmod_file(fts, ent, mode, 0, mode, 1, 1);
29                 ret = cg_chown_file(fts, ent, owner, group);
30         }
31         fts_close(fts);
This page took 0.305564 seconds and 3 git commands to generate.