mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 19:07:06 +00:00
conf/ile: use lxc_safe_uint() in config_tty()
Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
This commit is contained in:
parent
226dc30e4f
commit
1c30b4adbd
@ -293,7 +293,7 @@ struct saved_nic {
|
|||||||
struct lxc_conf {
|
struct lxc_conf {
|
||||||
int is_execute;
|
int is_execute;
|
||||||
char *fstab;
|
char *fstab;
|
||||||
int tty;
|
unsigned int tty;
|
||||||
unsigned int pts;
|
unsigned int pts;
|
||||||
int reboot;
|
int reboot;
|
||||||
int need_utmp_watch;
|
int need_utmp_watch;
|
||||||
|
@ -1260,9 +1260,8 @@ freak_out:
|
|||||||
static int config_tty(const char *key, const char *value,
|
static int config_tty(const char *key, const char *value,
|
||||||
struct lxc_conf *lxc_conf)
|
struct lxc_conf *lxc_conf)
|
||||||
{
|
{
|
||||||
int nbtty = atoi(value);
|
if (lxc_safe_uint(value, &lxc_conf->tty) < 0)
|
||||||
|
return -1;
|
||||||
lxc_conf->tty = nbtty;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user