// Running as root
if (uid == 0) {
- r = pakfire_file_write(jail->pakfire, path, 0, 0, 0,
+ r = pakfire_file_write(path, 0, 0, 0,
"0 %u %zu\n", subuid->id, subuid->length);
} else {
- r = pakfire_file_write(jail->pakfire, path, 0, 0, 0,
+ r = pakfire_file_write(path, 0, 0, 0,
"0 %u 1\n1 %u %zu\n", uid, subuid->id, subuid->length);
}
// Running as root
if (gid == 0) {
- r = pakfire_file_write(jail->pakfire, path, 0, 0, 0,
+ r = pakfire_file_write(path, 0, 0, 0,
"0 %u %zu\n", subgid->id, subgid->length);
} else {
- r = pakfire_file_write(jail->pakfire, path, 0, 0, 0,
+ r = pakfire_file_write(path, 0, 0, 0,
"0 %u 1\n1 %u %zu\n", gid, subgid->id, subgid->length);
}
if (r)
return r;
- r = pakfire_file_write(jail->pakfire, path, 0, 0, 0, "deny\n");
+ r = pakfire_file_write(path, 0, 0, 0, "deny\n");
if (r) {
ERROR(jail->ctx, "Could not set setgroups to deny: %s\n", strerror(errno));
r = -errno;
return fseek(f, 0, SEEK_SET);
}
-int pakfire_file_write(struct pakfire* pakfire, const char* path,
- uid_t owner, gid_t group, mode_t mode, const char* format, ...)
- __attribute__((format(printf, 6, 7)));
+int pakfire_file_write(const char* path, uid_t owner, gid_t group, mode_t mode,
+ const char* format, ...) __attribute__((format(printf, 5, 6)));
int pakfire_touch(const char* path, mode_t mode);
int pakfire_mkparentdir(const char* path, mode_t mode);