diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2013-03-08 15:27:14 +0100 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2013-03-13 14:41:38 -0400 |
commit | 7800c9da75ad0dc3b4a530b15adce86d6c4f26e5 (patch) | |
tree | dcfc6899b784dba3b24df2a5c3de39d00f4da007 /src/providers/ldap | |
parent | 22d381367c27910fe82f476a76b9f4ede555e35a (diff) | |
download | sssd-7800c9da75ad0dc3b4a530b15adce86d6c4f26e5.tar.gz sssd-7800c9da75ad0dc3b4a530b15adce86d6c4f26e5.tar.bz2 sssd-7800c9da75ad0dc3b4a530b15adce86d6c4f26e5.zip |
More generalized function open_debug_file_ex()
Function open_debug_file_ex() set flag FD_CLOEXEC to opened
file according to the value of third parameter.
Removed duplicity of unsetting FD_CLOEXEC after calling function
open_debug_file_ex()
Diffstat (limited to 'src/providers/ldap')
-rw-r--r-- | src/providers/ldap/sdap_child_helpers.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/providers/ldap/sdap_child_helpers.c b/src/providers/ldap/sdap_child_helpers.c index f2412f9e..c63c3cb7 100644 --- a/src/providers/ldap/sdap_child_helpers.c +++ b/src/providers/ldap/sdap_child_helpers.c @@ -453,11 +453,10 @@ static errno_t set_tgt_child_timeout(struct tevent_req *req, int setup_child(struct sdap_id_ctx *ctx) { int ret; - unsigned v; FILE *debug_filep; if (debug_to_file != 0 && ldap_child_debug_fd == -1) { - ret = open_debug_file_ex(LDAP_CHILD_LOG_FILE, &debug_filep); + ret = open_debug_file_ex(LDAP_CHILD_LOG_FILE, &debug_filep, false); if (ret != EOK) { DEBUG(0, ("Error setting up logging (%d) [%s]\n", ret, strerror(ret))); @@ -470,9 +469,6 @@ int setup_child(struct sdap_id_ctx *ctx) ret = errno; return ret; } - - v = fcntl(ldap_child_debug_fd, F_GETFD, 0); - fcntl(ldap_child_debug_fd, F_SETFD, v & ~FD_CLOEXEC); } return EOK; |