mirror of
git://github.com/lxc/lxc
synced 2025-09-01 15:10:25 +00:00
conf: log failure to create tty mountpoint
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
@@ -946,11 +946,20 @@ static int open_ttymnt_at(int dfd, const char *path)
|
|||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
fd = open_at(dfd, path, PROTECT_OPEN | O_CREAT | O_EXCL,
|
fd = open_at(dfd, path,
|
||||||
PROTECT_LOOKUP_BENEATH, 0);
|
PROTECT_OPEN | O_CREAT | O_EXCL,
|
||||||
if (fd < 0 && (errno == ENXIO || errno == EEXIST))
|
PROTECT_LOOKUP_BENEATH,
|
||||||
fd = open_at(dfd, path, PROTECT_OPATH_FILE,
|
0);
|
||||||
PROTECT_LOOKUP_BENEATH, 0);
|
if (fd < 0) {
|
||||||
|
if (!IN_SET(errno, ENXIO, EEXIST))
|
||||||
|
return syserror("Failed to create \"%d/\%s\"", dfd, path);
|
||||||
|
|
||||||
|
SYSINFO("Failed to create \"%d/\%s\"", dfd, path);
|
||||||
|
fd = open_at(dfd, path,
|
||||||
|
PROTECT_OPATH_FILE,
|
||||||
|
PROTECT_LOOKUP_BENEATH,
|
||||||
|
0);
|
||||||
|
}
|
||||||
|
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user