summaryrefslogtreecommitdiff
path: root/src/sbus/sssd_dbus_server.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-10-14 17:20:14 +0200
committerStephen Gallagher <sgallagh@redhat.com>2011-10-14 13:58:00 -0400
commit9acfdb15ab1b939b4ee9f764206598b83e4f4422 (patch)
tree99b927cfc49a2e99eeba8bd812d8af9ea81f140b /src/sbus/sssd_dbus_server.c
parent6d0fbda511f8ee2936e630110ee58d9c0d97b233 (diff)
downloadsssd-9acfdb15ab1b939b4ee9f764206598b83e4f4422.tar.gz
sssd-9acfdb15ab1b939b4ee9f764206598b83e4f4422.tar.bz2
sssd-9acfdb15ab1b939b4ee9f764206598b83e4f4422.zip
Fix off-by-one error in remove_socket_symlink()
https://fedorahosted.org/sssd/ticket/1043
Diffstat (limited to 'src/sbus/sssd_dbus_server.c')
-rw-r--r--src/sbus/sssd_dbus_server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sbus/sssd_dbus_server.c b/src/sbus/sssd_dbus_server.c
index 759eb69f..5366e807 100644
--- a/src/sbus/sssd_dbus_server.c
+++ b/src/sbus/sssd_dbus_server.c
@@ -132,7 +132,7 @@ remove_socket_symlink(const char *symlink_name)
ssize_t numread = 0;
errno = 0;
- numread = readlink(symlink_name, target, PATH_MAX);
+ numread = readlink(symlink_name, target, PATH_MAX-1);
if (numread < 0) {
ret = errno;
DEBUG(2, ("readlink failed [%d]: %s\n", ret, strerror(ret)));