Commit db934c4a by Christian Brauner Committed by Stéphane Graber

conf/ile: use lxc_safe_uint() in config_monitor()

parent e68d7e3c
......@@ -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;
......
......@@ -1171,7 +1171,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment