| |
else if (!strcasecmp(key, "sum") && cur->type == UCL_STRING &&
|
| |
strlen(ucl_object_tostring(cur)) == 64)
|
| |
sum = ucl_object_tostring(cur);
|
| - |
else if (!strcasecmp(key, "perm") && cur->type == UCL_STRING) {
|
| - |
if ((set = setmode(ucl_object_tostring(cur))) == NULL)
|
| + |
else if (!strcasecmp(key, "perm") &&
|
| + |
(cur->type == UCL_STRING || cur->type == UCL_INT)) {
|
| + |
if ((set = setmode(ucl_object_tostring_forced(cur))) == NULL)
|
| |
pkg_emit_error("Not a valid mode: %s",
|
| |
ucl_object_tostring(cur));
|
| |
else
|
| |
uname = ucl_object_tostring(cur);
|
| |
else if (!strcasecmp(key, "gname") && cur->type == UCL_STRING)
|
| |
gname = ucl_object_tostring(cur);
|
| - |
else if (!strcasecmp(key, "perm") && cur->type == UCL_STRING) {
|
| - |
if ((set = setmode(ucl_object_tostring(cur))) == NULL)
|
| + |
else if (!strcasecmp(key, "perm") &&
|
| + |
(cur->type == UCL_STRING || cur->type == UCL_INT)) {
|
| + |
if ((set = setmode(ucl_object_tostring_forced(cur))) == NULL)
|
| |
pkg_emit_error("Not a valid mode: %s",
|
| |
ucl_object_tostring(cur));
|
| |
else
|