diff options
| author | Russ White <russ@riw.us> | 2021-01-19 07:44:21 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-19 07:44:21 -0500 |
| commit | a02d1bbfaa9f1776ee14eb083ca49a1ab410b344 (patch) | |
| tree | 7c30bba5e566ad1607e9cdc77241114e37e85360 /lib/northbound_cli.c | |
| parent | 4c35f214b765528e3b95c1182555234450923bb1 (diff) | |
| parent | 46e6f9f2ad21296c643686622419ce4122730aa7 (diff) | |
Merge pull request #7884 from donaldsharp/null_stuff
Null stuff
Diffstat (limited to 'lib/northbound_cli.c')
| -rw-r--r-- | lib/northbound_cli.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/northbound_cli.c b/lib/northbound_cli.c index 7048df99fb..853f643472 100644 --- a/lib/northbound_cli.c +++ b/lib/northbound_cli.c @@ -693,6 +693,12 @@ static int nb_write_config(struct nb_config *config, enum nb_cfg_format format, __func__, safe_strerror(errno)); return -1; } + if (fchmod(fd, CONFIGFILE_MASK) != 0) { + flog_warn(EC_LIB_SYSTEM_CALL, + "%s: fchmod() failed: %s(%d):", __func__, + safe_strerror(errno), errno); + return -1; + } /* Make vty for configuration file. */ file_vty = vty_new(); |
