diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2011-10-14 17:23:09 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-10-14 13:58:00 -0400 |
commit | 8cfaeff2af47400c2bce0d4a23caa40d06500c55 (patch) | |
tree | 71891cc185be627cc5117d05b94dbf755193c6ce | |
parent | 9acfdb15ab1b939b4ee9f764206598b83e4f4422 (diff) | |
download | sssd-8cfaeff2af47400c2bce0d4a23caa40d06500c55.tar.gz sssd-8cfaeff2af47400c2bce0d4a23caa40d06500c55.tar.bz2 sssd-8cfaeff2af47400c2bce0d4a23caa40d06500c55.zip |
Report on errno, not return code in create_socket_symlink
https://fedorahosted.org/sssd/ticket/1044
-rw-r--r-- | src/sbus/sssd_dbus_server.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sbus/sssd_dbus_server.c b/src/sbus/sssd_dbus_server.c index 5366e807..57fa0e4d 100644 --- a/src/sbus/sssd_dbus_server.c +++ b/src/sbus/sssd_dbus_server.c @@ -103,8 +103,10 @@ create_socket_symlink(const char *filename, const char *symlink_filename) ret = symlink(filename, symlink_filename); if (ret != 0 && errno == EEXIST) { /* Perhaps cruft after a previous server? */ + errno = 0; ret = unlink(symlink_filename); if (ret != 0) { + ret = errno; DEBUG(1, ("Cannot remove old symlink: [%d][%s].\n", ret, strerror(ret))); return EIO; |