summaryrefslogtreecommitdiff
path: root/src/sbus
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-10-14 17:23:09 +0200
committerStephen Gallagher <sgallagh@redhat.com>2011-10-14 13:58:00 -0400
commit8cfaeff2af47400c2bce0d4a23caa40d06500c55 (patch)
tree71891cc185be627cc5117d05b94dbf755193c6ce /src/sbus
parent9acfdb15ab1b939b4ee9f764206598b83e4f4422 (diff)
downloadsssd-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
Diffstat (limited to 'src/sbus')
-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 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;