summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/sbus/sssd_dbus_server.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sbus/sssd_dbus_server.c b/src/sbus/sssd_dbus_server.c
index 5366e8072..57fa0e4dd 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;