]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/conf.c
conf: safely retrieve path of slave device
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 4 Jul 2018 12:51:48 +0000 (14:51 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 4 Jul 2018 12:52:54 +0000 (14:52 +0200)
commit77a3980598a4d6553ffc0ac8b922189c83d03430
tree92aa4e2117ddc6c31085f1f6a74ae078b443e20c
parent615f24ff503b0681cbb02a8156ff1fc05b206664
conf: safely retrieve path of slave device

openpty() is a horrible function that uses strcpy() into the char *name
argument if name != NULL. We can't rely on the path being sane in all cases so
let's split out the name retrieval to ttyname_r().

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.c