Blame SOURCES/libcgroup-0.37-chmod.patch

705669
diff -up libcgroup-0.41/src/api.c.chmod libcgroup-0.41/src/api.c
705669
--- libcgroup-0.41/src/api.c.chmod	2014-01-13 15:05:56.000000000 +0100
705669
+++ libcgroup-0.41/src/api.c	2014-01-13 20:41:55.255577622 +0100
705669
@@ -153,6 +153,10 @@ static int cg_chown_file(FTS *fts, FTSEN
da3e87
 	return ret;
da3e87
 }
da3e87
 
da3e87
+int cg_chmod_file(FTS *fts, FTSENT *ent, mode_t dir_mode,
da3e87
+	int dirm_change, mode_t file_mode, int filem_change,
da3e87
+	int owner_is_umask);
da3e87
+
da3e87
 /*
da3e87
  * TODO: Need to decide a better place to put this function.
da3e87
  */
705669
@@ -160,6 +164,8 @@ static int cg_chown_recursive(char **pat
da3e87
 {
da3e87
 	int ret = 0;
da3e87
 	FTS *fts;
da3e87
+	/* mode 664 */
da3e87
+	mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH;
da3e87
 
da3e87
 	cgroup_dbg("chown: path is %s\n", *path);
da3e87
 	fts = fts_open(path, FTS_PHYSICAL | FTS_NOCHDIR |
705669
@@ -177,6 +183,7 @@ static int cg_chown_recursive(char **pat
da3e87
 			cgroup_warn("Warning: fts_read failed\n");
da3e87
 			break;
da3e87
 		}
da3e87
+		cg_chmod_file(fts, ent, mode, 0, mode, 1, 1);
da3e87
 		ret = cg_chown_file(fts, ent, owner, group);
da3e87
 	}
da3e87
 	fts_close(fts);