write_file
extern int write_file(int fd, unsigned long long *offset, const char *buf,
ret = write_file(HOSTFS_I(inode)->fd, &pos, buffer, count);
err = write_file(FILE_HOSTFS_I(iocb->ki_filp)->fd, &pos, buffer, copied);
EXPORT_SYMBOL_GPL(write_file);
write_file();
rc = write_file(fname);
int write_file = 0;
write_file = 1;
if (write_file) {
int write_file = 0;
write_file = 1;
if (write_file) {
err = write_file("/proc/sys/net/ipv4/ip_forward", enable ? "1" : "0");
err = write_file("/proc/sys/net/ipv6/conf/all/forwarding", enable ? "1" : "0");
if (write_file("/proc/self/setgroups", "deny", sizeof("deny") - 1) &&
if (write_file("/proc/self/uid_map", map, strlen(map)))
if (write_file("/proc/self/gid_map", map, strlen(map)))
write_file("/proc/self/uid_map", "%d %d 1", inner_uid, outer_uid);
write_file("/proc/self/gid_map", "0 %d 1", outer_gid);
write_file(_metadata, "/proc/self/uid_map", buf);
write_file(_metadata, "/proc/self/setgroups", "deny");
write_file(_metadata, "/proc/self/gid_map", buf);
write_file("/proc/self/uid_map", buf);
write_file("/proc/self/setgroups", "deny");
write_file("/proc/self/gid_map", buf);
ret = write_file("/proc/self/uid_map", buf);
ret = write_file("/proc/self/setgroups", "deny");
ret = write_file("/proc/self/gid_map", buf);
ret = write_file("/proc/self/uid_map", buf);
ret = write_file("/proc/self/setgroups", "deny");
ret = write_file("/proc/self/gid_map", buf);
TEST_F(audit_layout1, write_file)
write_file("/proc/sys/vm/drop_caches", "3", 2);
write_file(SPLIT_DEBUGFS, input, ret + 1);
if (!write_file(path, buf, strlen(buf) + 1)) {
if (!write_file(path, val, strlen(val) + 1)) {
int write_file(const char *path, const char *buf, size_t buflen);
write_file("/proc/self/uid_map", "0 %d 1", uid);
write_file("/proc/self/gid_map", "0 %d 1", gid);
write_file("/proc/self/uid_map", "0 %d 1", uid);
write_file("/proc/self/gid_map", "0 %d 1", gid);
if (write_file(procfile, map, strlen(map)))
if (write_file(procfile, map, strlen(map)))
if (write_file("/proc/self/setgroups", "deny", sizeof("deny") - 1) &&
if (write_file("/proc/self/uid_map", map, strlen(map)))
if (write_file("/proc/self/gid_map", map, strlen(map)))
if (write_file("/proc/self/setgroups", "deny", sizeof("deny") - 1) &&
if (write_file("/proc/self/uid_map", map, strlen(map)))
if (write_file("/proc/self/gid_map", map, strlen(map)))
int write_file(const char *path, const char *buf, size_t count);
if (write_file(outname, outbuf, dsttotlen)) {
err = write_file(core_pattern_file, core_pattern, strlen(core_pattern));
return write_file(path, buf, count);
err = write_file(path, buffer, len);
err = write_file(path, buffer, len);
success = write_file(map_file_name, "0 %d 1", uid);
write_file(TR_MAXLAT, NULL, "0", ERR_CLEANUP);
write_file(TR_CURRENT, NULL, NOP_TRACER, ERR_EXIT);
write_file(TR_THRESH, save_state.thresh, threshold, ERR_CLEANUP);
write_file(TR_CURRENT, NOP_TRACER, current_tracer, ERR_CLEANUP);