coverity: #1427191

parent d9b2f087
......@@ -2411,6 +2411,7 @@ int write_id_mapping(enum idtype idtype, pid_t pid, const char *buf,
return -1;
}
if (fd >= 0) {
buflen = sizeof("deny\n") - 1;
errno = 0;
ret = lxc_write_nointr(fd, "deny\n", buflen);
......@@ -2421,6 +2422,7 @@ int write_id_mapping(enum idtype idtype, pid_t pid, const char *buf,
}
close(fd);
}
}
ret = snprintf(path, MAXPATHLEN, "/proc/%d/%cid_map", pid,
idtype == ID_TYPE_UID ? 'u' : 'g');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment