mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 06:21:08 +00:00
usernsexec: init log fd
lxc-usernsexec uses some functions (e.g. lxc_map_ids()), which are part of the lxc library and thus use the WARN etc. macros to emit log messages. However, it doesn't initialize the log in any way, so these messages go into the ether. lxc-usernsexec currently has no log parameters, so let's just log these to stderr. Someone can do something fancier later if they want. Signed-off-by: Tycho Andersen <tycho@tycho.ws>
This commit is contained in:
parent
f392f4edf3
commit
2d22b22dd4
@ -53,6 +53,8 @@
|
|||||||
#define MS_SLAVE (1 << 19)
|
#define MS_SLAVE (1 << 19)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern int lxc_log_fd;
|
||||||
|
|
||||||
int unshare(int flags);
|
int unshare(int flags);
|
||||||
|
|
||||||
static void usage(const char *name)
|
static void usage(const char *name)
|
||||||
@ -274,6 +276,8 @@ int main(int argc, char *argv[])
|
|||||||
int pipe1[2], /* child tells parent it has unshared */
|
int pipe1[2], /* child tells parent it has unshared */
|
||||||
pipe2[2]; /* parent tells child it is mapped and may proceed */
|
pipe2[2]; /* parent tells child it is mapped and may proceed */
|
||||||
|
|
||||||
|
lxc_log_fd = STDERR_FILENO;
|
||||||
|
|
||||||
memset(ttyname0, '\0', sizeof(ttyname0));
|
memset(ttyname0, '\0', sizeof(ttyname0));
|
||||||
memset(ttyname1, '\0', sizeof(ttyname1));
|
memset(ttyname1, '\0', sizeof(ttyname1));
|
||||||
memset(ttyname2, '\0', sizeof(ttyname2));
|
memset(ttyname2, '\0', sizeof(ttyname2));
|
||||||
|
Loading…
Reference in New Issue
Block a user