Searched refs:buf (Results 1 - 25 of 58) sorted by relevance

123

/sssd/src/util/
H A Datomic_io.h35 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 Dauthtok-utils.c29 uint8_t *buf, size_t buf_len,
37 || (buf == NULL && buf_len != 0)) {
58 if (buf == NULL || buf_len < *_2fa_blob_len) {
64 SAFEALIGN_COPY_UINT32(buf, &tmp_uint32_t, &c);
66 SAFEALIGN_COPY_UINT32(buf + c, &tmp_uint32_t, &c);
68 memcpy(buf + c, fa1, fa1_len + 1);
71 memcpy(buf + c, fa2, fa2_len + 1);
27 sss_auth_pack_2fa_blob(const char *fa1, size_t fa1_len, const char *fa2, size_t fa2_len, uint8_t *buf, size_t buf_len, size_t *_2fa_blob_len) argument
H A Dauthtok-utils.h36 * @param[in] buf memory buffer of size buf_len
37 * @param[in] buf_len size of memory buffer buf
48 uint8_t *buf, size_t buf_len,
H A Datomic_io.c24 ssize_t sss_atomic_io_s(int fd, void *buf, size_t n, bool do_read) argument
26 char *b = buf;
H A Dbackup_file.c32 char buf[BUFFER_SIZE]; local
87 numread = sss_atomic_read_s(src_fd, buf, BUFFER_SIZE);
97 written = sss_atomic_write_s(dst_fd, buf, numread);
H A Dchild_common.h42 uint8_t *buf; member in struct:response
95 uint8_t *buf, size_t len, int fd);
101 uint8_t **buf, ssize_t *len);
H A Dchild_common.c331 uint8_t *buf; member in struct:write_pipe_state
342 uint8_t *buf, size_t len, int fd)
352 state->buf = buf;
388 state->written = sss_atomic_write_s(state->fd, state->buf, state->len);
418 uint8_t *buf; member in struct:read_pipe_state
437 state->buf = NULL;
463 uint8_t buf[CHILD_MSG_CHUNK]; local
473 buf,
483 state->buf
340 write_pipe_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, uint8_t *buf, size_t len, int fd) argument
507 read_pipe_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, uint8_t **buf, ssize_t *len) argument
[all...]
/sssd/src/sss_client/
H A Dpam_message.c36 uint8_t *buf)
44 memcpy(&buf[rp], &c, sizeof(uint32_t));
48 memcpy(&buf[rp], &c, sizeof(uint32_t));
52 memcpy(&buf[rp], &c, sizeof(uint32_t));
55 memcpy(&buf[rp], tok, size);
62 uint8_t *buf)
68 memcpy(&buf[rp], &c, sizeof(uint32_t));
72 memcpy(&buf[rp], &c, sizeof(uint32_t));
76 memcpy(&buf[rp], &c, sizeof(uint32_t));
83 const size_t size, uint8_t *buf)
33 add_authtok_item(enum pam_item_type type, enum sss_authtok_type authtok_type, const char *tok, const size_t size, uint8_t *buf) argument
61 add_uint32_t_item(enum pam_item_type type, const uint32_t val, uint8_t *buf) argument
82 add_string_item(enum pam_item_type type, const char *str, const size_t size, uint8_t *buf) argument
107 uint8_t *buf; local
[all...]
H A Dpam_sss.c452 uint8_t *buf)
467 memcpy(&expire_date, buf + sizeof(uint32_t), sizeof(int64_t));
501 uint8_t *buf)
511 memcpy(&grace, buf + sizeof(uint32_t), sizeof(uint32_t));
535 uint8_t *buf)
546 memcpy(&expire, buf + sizeof(uint32_t), sizeof(uint32_t));
575 uint8_t *buf)
590 memcpy(&delayed_until, buf + sizeof(uint32_t), sizeof(int64_t));
656 uint8_t *buf)
663 /* resp_type and length of message are expected to be in buf */
451 user_info_offline_auth(pam_handle_t *pamh, size_t buflen, uint8_t *buf) argument
499 user_info_grace_login(pam_handle_t *pamh, size_t buflen, uint8_t *buf) argument
533 user_info_expire_warn(pam_handle_t *pamh, size_t buflen, uint8_t *buf) argument
574 user_info_offline_auth_delayed(pam_handle_t *pamh, size_t buflen, uint8_t *buf) argument
655 user_info_account_expired(pam_handle_t *pamh, size_t buflen, uint8_t *buf) argument
712 user_info_chpass_error(pam_handle_t *pamh, size_t buflen, uint8_t *buf) argument
767 eval_user_info_response(pam_handle_t *pamh, size_t buflen, uint8_t *buf) argument
813 eval_response(pam_handle_t *pamh, size_t buflen, uint8_t *buf, struct pam_items *pi) argument
1143 uint8_t *buf = NULL; local
[all...]
/sssd/src/util/crypto/
H A Dsss_crypto.c25 int generate_csprng_buffer(uint8_t *buf, size_t size) argument
34 rsize = sss_atomic_read_s(fd, buf, size);
/sssd/src/providers/ldap/
H A Dsdap_child_helpers.c153 struct io_buffer *buf; local
156 buf = talloc(mem_ctx, struct io_buffer);
157 if (buf == NULL) {
162 buf->size = 6 * sizeof(uint32_t);
164 buf->size += strlen(realm_str);
167 buf->size += strlen(princ_str);
170 buf->size += strlen(keytab_name);
173 DEBUG(SSSDBG_TRACE_FUNC, "buffer size: %zu\n", buf->size);
175 buf->data = talloc_size(buf, bu
221 parse_child_response(TALLOC_CTX *mem_ctx, uint8_t *buf, ssize_t size, int *result, krb5_error_code *kerr, char **ccache, time_t *expire_time_out) argument
271 uint8_t *buf; member in struct:sdap_get_tgt_state
292 struct io_buffer *buf; local
[all...]
H A Dldap_child.c80 static errno_t unpack_buffer(uint8_t *buf, size_t size, argument
89 SAFEALIGN_COPY_UINT32_CHECK(&len, buf + p, size, &p);
94 ibuf->realm_str = talloc_strndup(ibuf, (char *)(buf + p), len);
101 SAFEALIGN_COPY_UINT32_CHECK(&len, buf + p, size, &p);
106 ibuf->princ_str = talloc_strndup(ibuf, (char *)(buf + p), len);
113 SAFEALIGN_COPY_UINT32_CHECK(&len, buf + p, size, &p);
118 ibuf->keytab_name = talloc_strndup(ibuf, (char *)(buf + p), len);
125 SAFEALIGN_COPY_UINT32_CHECK(&ibuf->lifetime, buf + p, size, &p);
129 SAFEALIGN_COPY_UINT32_CHECK(&ibuf->uid, buf + p, size, &p);
130 SAFEALIGN_COPY_UINT32_CHECK(&ibuf->gid, buf
605 uint8_t *buf = NULL; local
[all...]
/sssd/src/sss_client/libwbclient/
H A Dwbc_sid_common.c35 int wbcSidToStringBuf(const struct wbcDomainSid *sid, char *buf, int buflen) argument
41 strncpy(buf, "(NULL SID)", buflen);
42 buf[buflen < 10 ? buflen :10] = '\0';
53 ofs = snprintf(buf, buflen, "S-%hhu-", (unsigned char)sid->sid_rev_num);
55 ofs += snprintf(buf + ofs, MAX(buflen - ofs, 0), "0x%llx",
58 ofs += snprintf(buf + ofs, MAX(buflen - ofs, 0), "%llu",
63 ofs += snprintf(buf + ofs, MAX(buflen - ofs, 0), "-%u",
73 char buf[WBC_SID_STRING_BUFLEN]; local
81 len = wbcSidToStringBuf(sid, buf, sizeof(buf));
[all...]
/sssd/src/util/cert/libcrypto/
H A Dcert.c98 unsigned char *buf; local
136 buf = talloc_size(mem_ctx, buf_size);
137 if (buf == NULL) {
143 der_blob = buf;
145 der_size = i2d_X509(x509, &buf);
182 uint8_t *buf = NULL; local
243 buf = talloc_size(mem_ctx, size);
244 if (buf == NULL) {
252 SAFEALIGN_SET_UINT32(buf, htobe32(SSH_RSA_HEADER_LEN), &c);
253 safealign_memcpy(&buf[
[all...]
/sssd/src/providers/krb5/
H A Dkrb5_child_handler.c47 uint8_t *buf; member in struct:handle_child_state
56 static errno_t pack_authtok(struct io_buffer *buf, size_t *rp, argument
89 SAFEALIGN_COPY_UINT32(&buf->data[*rp], &auth_token_type, rp);
90 SAFEALIGN_COPY_UINT32(&buf->data[*rp], &auth_token_length, rp);
91 safealign_memcpy(&buf->data[*rp], data, auth_token_length, rp);
100 struct io_buffer *buf; local
137 buf = talloc(kr, struct io_buffer);
138 if (buf == NULL) {
143 buf->size = 8*sizeof(uint32_t) + strlen(kr->upn);
149 buf
486 struct io_buffer *buf = NULL; local
586 handle_child_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, uint8_t **buf, ssize_t *len) argument
601 parse_krb5_child_response(TALLOC_CTX *mem_ctx, uint8_t *buf, ssize_t len, struct pam_data *pd, int pwd_exp_warning, struct krb5_child_response **_res) argument
[all...]
/sssd/src/providers/ipa/
H A Dselinux_child.c41 static errno_t unpack_buffer(uint8_t *buf, argument
49 SAFEALIGN_COPY_UINT32_CHECK(&len, buf + p, size, &p);
57 ibuf->seuser = talloc_strndup(ibuf, (char *)(buf + p), len);
64 SAFEALIGN_COPY_UINT32_CHECK(&len, buf + p, size, &p);
73 ibuf->mls_range = talloc_strndup(ibuf, (char *)(buf + p), len);
80 SAFEALIGN_COPY_UINT32_CHECK(&len, buf + p, size, &p);
87 ibuf->username = talloc_strndup(ibuf, (char *)(buf + p), len);
105 r->buf = talloc_array(r, uint8_t, r->size);
106 if(r->buf == NULL) {
113 SAFEALIGN_SET_UINT32(&r->buf[
198 uint8_t *buf = NULL; local
[all...]
/sssd/src/sss_client/nfs/
H A Dsss_nfs_client.c70 char *buf = NULL; local
83 if ((p = realloc(buf, buflen)) == NULL) {
87 buf = p;
88 rc = sss_nss_mc_getpwnam(name, len, &pwd, buf, buflen);
99 free(buf);
107 char *buf = NULL; local
120 if ((p = realloc(buf, buflen)) == NULL) {
124 buf = p;
125 rc = sss_nss_mc_getgrnam(name, len, &grp, buf, buflen);
136 free(buf);
144 char *buf = NULL; local
185 char *buf = NULL; local
328 const char *buf; local
[all...]
/sssd/src/tests/cmocka/
H A Dtest_resolv_fake.c53 static ssize_t dns_header(unsigned char **buf, size_t ancount) argument
58 hb = *buf;
73 *buf = hb;
162 unsigned char *buf; local
168 buf = talloc_zero_array(mem_ctx, unsigned char, TEST_BUFSIZE);
169 assert_non_null(buf);
170 buf_head = buf;
172 len = dns_header(&buf, n_rrs);
176 len = dns_question(question, ns_t_srv, &buf, TEST_BUFSIZE - total);
182 len = add_srv_rr(&rrs[i], question, buf, TEST_BUFSIZ
307 unsigned char *buf; local
[all...]
H A Ddummy_child.c41 uint8_t buf[IN_BUF_SIZE]; local
108 len = sss_atomic_read_s(STDIN_FILENO, buf, IN_BUF_SIZE);
117 written = sss_atomic_write_s(3, buf, len);
/sssd/src/providers/ad/
H A Dad_gpo_child.c53 unpack_buffer(uint8_t *buf, argument
62 SAFEALIGN_COPY_UINT32_CHECK(&cached_gpt_version, buf + p, size, &p);
67 SAFEALIGN_COPY_UINT32_CHECK(&len, buf + p, size, &p);
73 ibuf->smb_server = talloc_strndup(ibuf, (char *)(buf + p), len);
80 SAFEALIGN_COPY_UINT32_CHECK(&len, buf + p, size, &p);
86 ibuf->smb_share = talloc_strndup(ibuf, (char *)(buf + p), len);
93 SAFEALIGN_COPY_UINT32_CHECK(&len, buf + p, size, &p);
99 ibuf->smb_path = talloc_strndup(ibuf, (char *)(buf + p), len);
106 SAFEALIGN_COPY_UINT32_CHECK(&len, buf + p, size, &p);
112 ibuf->smb_cse_suffix = talloc_strndup(ibuf, (char *)(buf
278 gpo_cache_store_file(const char *smb_path, const char *smb_cse_suffix, uint8_t *buf, int buflen) argument
534 uint8_t *buf = NULL; local
694 uint8_t *buf = NULL; local
[all...]
/sssd/src/util/cert/nss/
H A Dcert.c236 uint8_t *buf = NULL; local
363 buf = talloc_size(mem_ctx, size);
364 if (buf == NULL) {
372 SAFEALIGN_SET_UINT32(buf, htobe32(SSH_RSA_HEADER_LEN), &c);
373 safealign_memcpy(&buf[c], SSH_RSA_HEADER, SSH_RSA_HEADER_LEN, &c);
374 SAFEALIGN_SET_UINT32(&buf[c],
378 SAFEALIGN_SETMEM_VALUE(&buf[c], '\0', unsigned char, &c);
380 safealign_memcpy(&buf[c], cert_pub_key->u.rsa.publicExponent.data,
383 SAFEALIGN_SET_UINT32(&buf[c],
387 SAFEALIGN_SETMEM_VALUE(&buf[
[all...]
/sssd/src/tests/cwrap/
H A Dtest_server.c49 char buf[16]; local
72 ret = read(fd, buf, sizeof(buf));
76 buf[sizeof(buf) - 1] = '\0';
79 tmp = strtouint32(buf, NULL, 10);
/sssd/src/tests/
H A Dfail_over-tests.c114 char buf[16]; local
115 sprintf(buf, "service_%d", i);
118 ret = fo_new_service(ctx->fo_ctx, buf, NULL, &services[i]);
126 char buf[16]; local
127 sprintf(buf, "service_%d", i);
129 ret = fo_get_service(ctx->fo_ctx, buf, &service);
135 ret = fo_get_service(ctx->fo_ctx, buf, &service);
179 char buf[256]; local
181 inet_ntop(he->family, he->addr_list[i]->ipaddr, buf, sizeof(buf));
[all...]
/sssd/src/responder/pam/
H A Dpamsrv_p11.c87 uint8_t *buf; local
108 buf = talloc_size(mem_ctx, len);
109 if (buf == NULL) {
114 safealign_memcpy(buf, pin, len, NULL);
120 buf = NULL;
129 *_buf = buf;
134 static errno_t parse_p11_child_response(TALLOC_CTX *mem_ctx, uint8_t *buf, argument
157 p = memchr(buf, '\n', buf_len);
162 if (p == buf) {
173 token_name = talloc_strndup(tmp_ctx, (char*) buf, (
442 uint8_t *buf; local
[all...]
/sssd/src/monitor/
H A Dmonitor_netlink.c178 char buf[BUFSIZE]; local
199 memset(buf, 0, BUFSIZE);
201 ret = sss_atomic_read_s(fd, buf, BUFSIZE);
210 buf[BUFSIZE-1] = '\0';
212 return strncmp(buf, "1\n", BUFSIZE) == 0;
293 static void nladdr_to_string(struct nl_addr *nl, char *buf, size_t bufsize) argument
300 strncpy(buf, "unknown", bufsize);
307 if (inet_ntop(addr_family, addr, buf, bufsize) == NULL) {
309 snprintf(buf, bufsize, "unknown");
575 char buf[INET6_ADDRSTRLE local
658 char buf[INET6_ADDRSTRLEN]; local
[all...]

Completed in 1340 milliseconds

123