Lines Matching refs:buf
80 static errno_t unpack_buffer(uint8_t *buf, size_t size,
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 + p, size, &p);
149 r->buf = talloc_array(r, uint8_t, r->size);
150 if(!r->buf) {
159 SAFEALIGN_SET_UINT32(&r->buf[p], result, &p);
162 safealign_memcpy(&r->buf[p], &krberr, sizeof(krberr), &p);
165 SAFEALIGN_SET_UINT32(&r->buf[p], len, &p);
168 safealign_memcpy(&r->buf[p], msg, len, &p);
171 safealign_memcpy(&r->buf[p], &expire_time, sizeof(expire_time), &p);
545 r->buf = NULL;
605 uint8_t *buf = NULL;
673 buf = talloc_size(main_ctx, sizeof(uint8_t)*IN_BUF_SIZE);
674 if (buf == NULL) {
688 len = sss_atomic_read_s(STDIN_FILENO, buf, IN_BUF_SIZE);
697 ret = unpack_buffer(buf, len, ibuf);
738 written = sss_atomic_write_s(STDOUT_FILENO, resp->buf, resp->size);