mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-06 05:38:15 +02:00
keyfile: fix chmod() error checking
This commit is contained in:
parent
c4a1c49539
commit
c2c0a4e4e0
1 changed files with 1 additions and 1 deletions
|
|
@ -443,7 +443,7 @@ write_connection (NMConnection *connection,
|
||||||
unlink (path);
|
unlink (path);
|
||||||
} else {
|
} else {
|
||||||
err = chmod (path, S_IRUSR | S_IWUSR);
|
err = chmod (path, S_IRUSR | S_IWUSR);
|
||||||
if (err > 0) {
|
if (err) {
|
||||||
g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INTERNAL_ERROR,
|
g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INTERNAL_ERROR,
|
||||||
"%s.%d: error setting permissions on '%s': %d", __FILE__,
|
"%s.%d: error setting permissions on '%s': %d", __FILE__,
|
||||||
__LINE__, path, errno);
|
__LINE__, path, errno);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue