/sssd/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 | 41 Close the low 3 fd's and open dev/null in their place. 46 int fd; local 56 fd = open("/dev/null", O_RDWR, 0); 57 if (fd < 0) 58 fd = open("/dev/null", O_WRONLY, 0); 59 if (fd < 0) { 63 if (fd != i) { 138 /* Close fd's 0,1,2. Needed if started by rsh */ 147 int fd; local 159 fd [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 | 330 int fd; member in struct:write_pipe_state 342 uint8_t *buf, size_t len, int fd) 351 state->fd = fd; 356 fde = tevent_add_fd(ev, state, fd, TEVENT_FD_WRITE, 388 state->written = sss_atomic_write_s(state->fd, state->buf, state->len); 417 int fd; member in struct:read_pipe_state 427 struct tevent_context *ev, int fd) 436 state->fd = fd; 340 write_pipe_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, uint8_t *buf, size_t len, int fd) argument 426 read_pipe_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, int fd) argument [all...] |
/sssd/src/util/crypto/ |
H A D | sss_crypto.c | 29 int fd; local 31 fd = open("/dev/urandom", O_RDONLY); 32 if (fd == -1) return errno; 34 rsize = sss_atomic_read_s(fd, buf, size); 45 close(fd);
|
/sssd/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 | 88 int fd; local 92 fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0700); 93 fail_if(fd == -1, "Cannot create simple file\n"); 95 size = write(fd, "abc", 3); 98 ret = fsync(fd); 101 ret = close(fd); 213 int fd = -1; local 251 ret = check_and_open_readonly(tmp, &fd, uid, gid, S_IFREG|S_IRWXU, 0); 253 close(fd); 265 int fd local [all...] |
H A D | debug-tests.c | 128 int fd; local 137 fd = mkstemp(filename); 139 if (fd == -1) { 146 file = fdopen(fd, "r"); 153 ret = set_debug_file_from_fd(fd); 267 int fd; local 277 fd = mkstemp(filename); 279 if (fd == -1) { 283 file = fdopen(fd, "r"); 290 ret = set_debug_file_from_fd(fd); [all...] |
/sssd/src/responder/common/ |
H A D | responder_packet.h | 37 int sss_packet_recv(struct sss_packet *packet, int fd); 38 int sss_packet_send(struct sss_packet *packet, int fd);
|
/sssd/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...] |
/sssd/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/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/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/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);
|
H A D | common.c | 108 pfd.fd = sss_cli_sd; 216 pfd.fd = sss_cli_sd; 439 static int make_nonstd_fd_internals(int fd, int limit) argument 442 if (fd >= 0 && fd <= 2) { 444 if ((new_fd = fcntl(fd, F_DUPFD, 3)) == -1) { 452 close(fd); 458 new_fd = dup(fd); 464 close(fd); 468 return fd; 479 make_safe_fd(int fd) argument [all...] |
/sssd/src/responder/secrets/ |
H A D | secsrv_private.h | 144 int sec_send_data(int fd, struct sec_data *data); 145 int sec_recv_data(int fd, struct sec_data *data);
|
/sssd/src/krb5_plugin/ |
H A D | sssd_krb5_locator_plugin.c | 90 int fd = -1; local 125 fd = open(krb5info_name, O_RDONLY); 126 if (fd == -1) { 136 len = sss_atomic_read_s(fd, buf, BUFSIZE); 140 close(fd); 143 close(fd);
|