]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/terminal.c
terminal: safely retrieve path of slave device
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 30 Jun 2018 09:15:36 +0000 (11:15 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 1 Jul 2018 18:00:14 +0000 (20:00 +0200)
commit3f15bdd9ca7bc2b163c272728f9cc3871800584b
tree303937c312743632d02736b3059ae7b9e9766819
parent882671aa99ffcc4ad29cede85d93701f2b94080d
terminal: 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/terminal.c