mirror of
git://github.com/lxc/lxc
synced 2025-08-30 11:02:03 +00:00
conf/ile: use lxc_safe_uint() in config_monitor()
Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
This commit is contained in:
parent
3590152f01
commit
226dc30e4f
@ -350,7 +350,7 @@ struct lxc_conf {
|
||||
int nbd_idx;
|
||||
|
||||
/* unshare the mount namespace in the monitor */
|
||||
int monitor_unshare;
|
||||
unsigned int monitor_unshare;
|
||||
|
||||
/* set to true when rootfs has been setup */
|
||||
bool rootfs_setup;
|
||||
|
@ -1176,7 +1176,8 @@ static int config_monitor(const char *key, const char *value,
|
||||
struct lxc_conf *lxc_conf)
|
||||
{
|
||||
if(strcmp(key, "lxc.monitor.unshare") == 0) {
|
||||
lxc_conf->monitor_unshare = atoi(value);
|
||||
if (lxc_safe_uint(value, &lxc_conf->monitor_unshare) < 0)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
SYSERROR("Unknown key: %s", key);
|
||||
|
Loading…
x
Reference in New Issue
Block a user