| /sssd-io/src/util/ |
| H A D | io.c | 40 int fd; local 49 fd = open(pathname, oflags); 50 if (fd == -1) { 60 v = fcntl(fd, F_GETFD, 0); 63 (void)fcntl(fd, F_SETFD, v | FD_CLOEXEC); 66 return fd; 71 int fd; local 80 fd = openat(dir_fd, pathname, oflags); 81 if (fd == -1) { 91 v = fcntl(fd, F_GETF [all...] |
| H A D | atomic_io.h | 35 ssize_t sss_atomic_io_s(int fd, void *buf, size_t n, bool do_read); 37 #define sss_atomic_read_s(fd, buf, n) sss_atomic_io_s(fd, buf, n, true) 38 #define sss_atomic_write_s(fd, buf, n) sss_atomic_io_s(fd, buf, n, false)
|
| H A D | atomic_io.c | 24 ssize_t sss_atomic_io_s(int fd, void *buf, size_t n, bool do_read) argument 31 pfd.fd = fd; 36 res = read(fd, b + pos, n - pos); 38 res = write(fd, b + pos, n - pos);
|
| H A D | check_and_open.c | 64 errno_t check_fd(int fd, uid_t uid, gid_t gid, argument 78 ret = fstat(fd, stat_buf); 81 "fstat for [%d] failed: [%d][%s].\n", fd, errno, 127 errno_t check_and_open_readonly(const char *filename, int *fd, argument 134 *fd = open(filename, O_RDONLY); 135 if (*fd == -1) { 142 ret = check_fd(*fd, uid, gid, mode, mask, &stat_buf); 144 close(*fd); 145 *fd = -1;
|
| H A D | sss_sockets.h | 27 int fd,
|
| H A D | sss_sockets.c | 35 static errno_t set_fcntl_flags(int fd, int fd_flags, int fl_flags) argument 40 ret = fcntl(fd, F_GETFD, 0); 49 ret = fcntl(fd, F_SETFD, cur_flags | fd_flags); 57 ret = fcntl(fd, F_GETFL, 0); 66 ret = fcntl(fd, F_SETFL, cur_flags | fl_flags); 77 static errno_t set_fd_common_opts(int fd) argument 84 ret = setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &dummy, sizeof(dummy)); 92 ret = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &dummy, sizeof(dummy)); 106 int fd; member in struct:sssd_async_connect_state 117 int fd, 115 sssd_async_connect_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, int fd, const struct sockaddr *addr, socklen_t addr_len) argument [all...] |
| H A D | util_lock.c | 31 errno_t sss_br_lock_file(int fd, size_t start, size_t len, argument 49 ret = fcntl(fd, F_SETLK, &lock);
|
| H A D | server.c | 47 int fd; local 57 fd = open("/dev/null", O_RDWR, 0); 58 if (fd < 0) 59 fd = open("/dev/null", O_WRONLY, 0); 60 if (fd < 0) { 64 if (fd != i) { 148 int fd; local 160 fd = open(file, O_RDONLY, 0644); 162 if (fd != -1) { 164 len = sss_atomic_read_s(fd, pid_st [all...] |
| H A D | child_common.h | 95 uint8_t *buf, size_t len, int fd); 99 struct tevent_context *ev, int fd); 104 void fd_nonblocking(int fd);
|
| H A D | find_uid.c | 67 int fd; local 84 fd = open(path, O_RDONLY); 85 if (fd == -1) { 98 ret = fstat(fd, &stat_buf); 120 ret = sss_atomic_read_s(fd, buf, BUFSIZE); 131 ret = close(fd); 170 close(fd);
|
| H A D | child_common.c | 331 int fd; member in struct:write_pipe_state 343 uint8_t *buf, size_t len, int fd) 352 state->fd = fd; 357 fde = tevent_add_fd(ev, state, fd, TEVENT_FD_WRITE, 389 state->written = sss_atomic_write_s(state->fd, state->buf, state->len); 418 int fd; member in struct:read_pipe_state 428 struct tevent_context *ev, int fd) 437 state->fd = fd; 341 write_pipe_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, uint8_t *buf, size_t len, int fd) argument 427 read_pipe_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, int fd) argument [all...] |
| /sssd-io/src/util/crypto/ |
| H A D | sss_crypto.c | 33 int fd; local 35 fd = open("/dev/urandom", O_RDONLY); 36 if (fd == -1) return errno; 38 rsize = sss_atomic_read_s(fd, buf, size); 49 close(fd);
|
| /sssd-io/src/tests/ |
| H A D | check_and_open-tests.c | 41 int fd; variable 60 fd = -1; 67 if (fd != -1) { 68 ret = close(fd); 82 ret = check_and_open_readonly("/bla/bla/bla", &fd, 86 fail_unless(fd == -1, "check_and_open_readonly file descriptor not -1"); 148 ret = check_and_open_readonly("/dev/null", &fd, uid, gid, S_IFREG|mode, 0); 151 fail_unless(fd == -1, "check_and_open_readonly file descriptor not -1"); 159 ret = check_and_open_readonly(filename, &fd, uid+1, gid, S_IFREG|mode, 0); 162 fail_unless(fd [all...] |
| H A D | files-tests.c | 87 int fd; local 91 fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0700); 92 fail_if(fd == -1, "Cannot create simple file\n"); 94 size = write(fd, "abc", 3); 97 ret = fsync(fd); 100 ret = close(fd); 212 int fd = -1; local 250 ret = check_and_open_readonly(tmp, &fd, uid, gid, S_IFREG|S_IRWXU, 0); 252 close(fd); 264 int fd local [all...] |
| /sssd-io/src/tests/cmocka/ |
| H A D | test_io.c | 168 int fd; local 175 fd = sss_open_cloexec(file_path, flags, &ret); 176 assert_int_not_equal(fd, -1); 178 ret_flag = fcntl(fd, F_GETFD, 0); 182 close(fd); 187 int fd; local 191 fd = sss_open_cloexec(NON_EX_PATH, flags, &ret); 193 assert_true(fd == -1); 199 int fd; local 206 fd 218 int fd; local [all...] |
| H A D | test_inotify.c | 89 int fd; local 102 fd = mkstemp(ctx->filename); 103 if (fd == -1) { 107 close(fd); 289 int fd; local 295 fd = mkstemp(src_tmp_file); 296 if (fd == -1) { 302 f = fdopen(fd, "w"); 304 close(fd);
|
| /sssd-io/src/sbus/ |
| H A D | sssd_dbus_common.c | 34 static struct sbus_watch_ctx *fd_to_watch(struct sbus_watch_ctx *list, int fd) argument 40 if (watch_iter->fd == fd) { 118 int fd; local 123 fd = dbus_watch_get_unix_fd(dbus_watch); 125 fd = dbus_watch_get_fd(dbus_watch); 128 watch = fd_to_watch(conn->watch_list, fd); 137 watch->fd = fd; 170 watch, fd, event_flag 201 int fd = -1; local [all...] |
| /sssd-io/src/responder/common/ |
| H A D | responder_packet.h | 38 int sss_packet_recv(struct sss_packet *packet, int fd); 39 int sss_packet_send(struct sss_packet *packet, int fd);
|
| /sssd-io/src/providers/ldap/ |
| H A D | sdap_fd_events.c | 36 int get_fd_from_ldap(LDAP *ldap, int *fd) argument 40 ret = ldap_get_option(ldap, LDAP_OPT_DESC, fd); 41 if (ret != LDAP_OPT_SUCCESS || *fd < 0) { 42 DEBUG(SSSDBG_CRIT_FAILURE, "Failed to get fd from ldap!!\n"); 43 *fd = -1; 110 DEBUG(SSSDBG_TRACE_LIBS, "New LDAP connection to [%s] with fd [%d].\n", 129 fd_event_item->fd = ber_fd; 154 DEBUG(SSSDBG_TRACE_ALL, "Closing LDAP connection with fd [%d].\n", ber_fd); 157 if (fd_event_item->fd == ber_fd) { 162 DEBUG(SSSDBG_CRIT_FAILURE, "No event for fd [ 177 int fd; local 285 sdap_call_conn_cb(const char *uri,int fd, struct sdap_handle *sh) argument [all...] |
| /sssd-io/src/tests/cwrap/ |
| H A D | test_responder_common.c | 110 int fd; member in struct:create_pipe_ctx 120 ctx->fd = -1; 141 ret = getsockopt(ctx->fd, SOL_SOCKET, SO_DOMAIN, &optval, &optlen); 146 ret = getsockopt(ctx->fd, SOL_SOCKET, SO_TYPE, &optval, &optlen); 152 ret = getsockopt(ctx->fd, SOL_SOCKET, SO_ACCEPTCONN, &optval, &optlen); 158 ret = getsockopt(ctx->fd, SOL_SOCKET, SO_PROTOCOL, &optval, &optlen); 173 ret = create_pipe_fd(ctx->sock_name, &ctx->fd, 0111); 175 assert_int_not_equal(ctx->fd, -1); 179 ret = create_pipe_fd(ctx->sock_name, &ctx->fd, 0000); 181 assert_int_not_equal(ctx->fd, [all...] |
| H A D | test_server.c | 47 int fd; local 69 fd = open(pidfile, O_RDONLY); 70 assert_false(fd < 0); 72 ret = read(fd, buf, sizeof(buf)); 73 close(fd);
|
| /sssd-io/src/responder/ssh/ |
| H A D | ssh_known_hosts.c | 169 int fd) 234 wret = sss_atomic_write_s(fd, entstr, strlen(entstr)); 265 int fd = -1; local 291 fd = sss_unique_file_ex(tmp_ctx, filename, 0133, &ret); 292 if (fd == -1) { 298 ret = ssh_write_known_hosts(domains, hash_known_hosts, now, fd); 307 ret = fchmod(fd, 0644); 324 if (fd != -1) { 325 close(fd); 166 ssh_write_known_hosts(struct sss_domain_info *domains, bool hash_known_hosts, time_t now, int fd) argument
|
| /sssd-io/src/sss_client/ |
| H A D | nss_mc_common.c | 104 ret = fstat(ctx->fd, &fdstat); 124 if (ctx->fd != -1) { 125 close(ctx->fd); 128 ctx->fd = -1; 154 ctx->fd = sss_open_cloexec(file, O_RDONLY, &ret); 155 if (ctx->fd == -1) { 159 ret = fstat(ctx->fd, &fdstat); 172 PROT_READ, MAP_SHARED, ctx->fd, 0);
|
| /sssd-io/src/tests/intg/ |
| H A D | getsockopt_wrapper.c | 13 static bool is_dbus_socket(int fd) argument 20 ret = getsockname(fd, (struct sockaddr *)&addr, &addrlen);
|
| /sssd-io/src/responder/kcm/ |
| H A D | kcmsrv_cmd.c | 63 static errno_t kcm_iovec_op(int fd, struct kcm_iovec *kiov, bool do_read) argument 76 len = readv(fd, iov, 1); 78 len = writev(fd, iov, 1); 90 /* Read event on fd that doesn't yield data? error */ 99 static errno_t kcm_read_iovec(int fd, struct kcm_iovec *kiov) argument 101 return kcm_iovec_op(fd, kiov, true); 104 static errno_t kcm_write_iovec(int fd, struct kcm_iovec *kiov) argument 106 return kcm_iovec_op(fd, kiov, false); 416 int fd, 423 ret = kcm_read_iovec(fd, 415 kcm_recv_data(TALLOC_CTX *mem_ctx, int fd, struct kcm_reqbuf *reqbuf) argument [all...] |