/illumos-gate/usr/src/common/smbsrv/ |
H A D | smb_door_legacy.c | 51 smb_dr_ctx_t *ctx = MEM_MALLOC("CommonDoor", sizeof (smb_dr_ctx_t)); in smb_dr_decode_start() local 52 if (ctx) { in smb_dr_decode_start() 53 ctx->start_ptr = ctx->ptr = ptr; in smb_dr_decode_start() 54 ctx->end_ptr = ptr + size; in smb_dr_decode_start() 55 ctx->status = 0; in smb_dr_decode_start() 57 return (ctx); in smb_dr_decode_start() 61 smb_dr_decode_finish(smb_dr_ctx_t *ctx) in smb_dr_decode_finish() argument 63 int status = ctx->status; in smb_dr_decode_finish() 64 if (status == 0 && ctx->ptr != ctx->end_ptr) in smb_dr_decode_finish() 67 MEM_FREE("CommonDoor", ctx); in smb_dr_decode_finish() [all …]
|
/illumos-gate/usr/src/lib/auditd_plugins/syslog/ |
H A D | systoken.c | 83 parse_token(parse_context_t *ctx) in parse_token() argument 98 adrm_char(&(ctx->adr), &tokenid, 1); in parse_token() 101 rc = (*tokentable[tokenid].func)(ctx); in parse_token() 113 file_token(parse_context_t *ctx) in file_token() argument 121 file64_token(parse_context_t *ctx) in file64_token() argument 127 common_header(parse_context_t *ctx) in common_header() argument 129 adrm_u_int32(&(ctx->adr), &(ctx->out.sf_reclen), 1); in common_header() 130 ctx->adr.adr_now += sizeof (char); /* version number */ in common_header() 131 adrm_u_short(&(ctx->adr), &(ctx->out.sf_eventid), 1); in common_header() 132 ctx->adr.adr_now += sizeof (short); /* modifier */ in common_header() [all …]
|
/illumos-gate/usr/src/lib/libndmp/common/ |
H A D | libndmp_door_data.c | 52 ndmp_door_ctx_t *ctx = malloc(sizeof (ndmp_door_ctx_t)); in ndmp_door_decode_start() local 53 if (ctx) { in ndmp_door_decode_start() 54 ctx->start_ptr = ctx->ptr = ptr; in ndmp_door_decode_start() 55 ctx->end_ptr = ptr + size; in ndmp_door_decode_start() 56 ctx->status = 0; in ndmp_door_decode_start() 58 return (ctx); in ndmp_door_decode_start() 62 ndmp_door_decode_finish(ndmp_door_ctx_t *ctx) in ndmp_door_decode_finish() argument 64 int status = ctx->status; in ndmp_door_decode_finish() 65 if ((status == 0) && (ctx->ptr != ctx->end_ptr)) { in ndmp_door_decode_finish() 68 free(ctx); in ndmp_door_decode_finish() [all …]
|
/illumos-gate/usr/src/lib/libresolv2/common/isc/ |
H A D | ctl_clnt.c | 54 #define donefunc_p(ctx) ((ctx).donefunc != NULL) argument 71 struct ctl_cctx * ctx; member 148 struct ctl_cctx *ctx; in ctl_client() local 153 ctx = memget(sizeof *ctx); in ctl_client() 154 if (ctx == NULL) { in ctl_client() 158 ctx->state = initializing; in ctl_client() 159 ctx->ev = lev; in ctl_client() 160 ctx->logger = logger; in ctl_client() 161 ctx->timeout = evConsTime(timeout, 0); in ctl_client() 162 ctx->donefunc = donefunc; in ctl_client() [all …]
|
H A D | heap.c | 51 heap_context ctx; in heap_new() local 56 ctx = (heap_context)malloc(sizeof (struct heap_context)); in heap_new() 57 if (ctx == NULL) in heap_new() 60 ctx->array_size = 0; in heap_new() 62 ctx->array_size_increment = ARRAY_SIZE_INCREMENT; in heap_new() 64 ctx->array_size_increment = array_size_increment; in heap_new() 65 ctx->heap_size = 0; in heap_new() 66 ctx->heap = NULL; in heap_new() 67 ctx->higher_priority = higher_priority; in heap_new() 68 ctx->index = index; in heap_new() [all …]
|
H A D | eventlib.c | 64 evContext_p *ctx; in evCreate() local 70 OKNEW(ctx); in evCreate() 73 ctx->cur = NULL; in evCreate() 76 ctx->debug = 0; in evCreate() 77 ctx->output = NULL; in evCreate() 80 ctx->conns = NULL; in evCreate() 81 INIT_LIST(ctx->accepts); in evCreate() 84 ctx->files = NULL; in evCreate() 86 ctx->pollfds = NULL; in evCreate() 87 ctx->maxnfds = 0; in evCreate() [all …]
|
H A D | ctl_srvr.c | 62 tmp, sizeof tmp, ctx->logger) 80 struct ctl_sctx * ctx; member 173 struct ctl_sctx *ctx; in ctl_server() local 187 ctx = memget(sizeof *ctx); in ctl_server() 188 if (ctx == NULL) { in ctl_server() 192 ctx->ev = lev; in ctl_server() 193 ctx->uctx = uctx; in ctl_server() 194 ctx->unkncode = unkncode; in ctl_server() 195 ctx->timeoutcode = timeoutcode; in ctl_server() 196 ctx->verbs = verbs; in ctl_server() [all …]
|
/illumos-gate/usr/src/common/crypto/skein/ |
H A D | skein.c | 16 void Skein_256_Process_Block(Skein_256_Ctxt_t *ctx, const uint8_t *blkPtr, 18 void Skein_512_Process_Block(Skein_512_Ctxt_t *ctx, const uint8_t *blkPtr, 20 void Skein1024_Process_Block(Skein1024_Ctxt_t *ctx, const uint8_t *blkPtr, 26 Skein_256_Init(Skein_256_Ctxt_t *ctx, size_t hashBitLen) in Skein_256_Init() argument 34 ctx->h.hashBitLen = hashBitLen; /* output hash bit count */ in Skein_256_Init() 39 bcopy(SKEIN_256_IV_256, ctx->X, sizeof (ctx->X)); in Skein_256_Init() 42 bcopy(SKEIN_256_IV_224, ctx->X, sizeof (ctx->X)); in Skein_256_Init() 45 bcopy(SKEIN_256_IV_160, ctx->X, sizeof (ctx->X)); in Skein_256_Init() 48 bcopy(SKEIN_256_IV_128, ctx->X, sizeof (ctx->X)); in Skein_256_Init() 58 Skein_Start_New_Type(ctx, CFG_FINAL); in Skein_256_Init() [all …]
|
/illumos-gate/usr/src/cmd/smbsrv/smbd/ |
H A D | smbd_authsvc.c | 281 authsvc_context_t *ctx; in smbd_authsvc_listen() local 334 ctx = smbd_authctx_create(); in smbd_authsvc_listen() 335 if (ctx == NULL) { in smbd_authsvc_listen() 343 ctx->ctx_socket = ns; in smbd_authsvc_listen() 345 rc = pthread_create(&tid, &attr, smbd_authsvc_work, ctx); in smbd_authsvc_listen() 351 smbd_authctx_destroy(ctx); in smbd_authsvc_listen() 352 ctx = NULL; in smbd_authsvc_listen() 355 ctx = NULL; /* given to the new thread or destroyed */ in smbd_authsvc_listen() 383 authsvc_context_t *ctx; in smbd_authctx_create() local 385 ctx = malloc(sizeof (*ctx)); in smbd_authctx_create() [all …]
|
/illumos-gate/usr/src/common/zfs/ |
H A D | zfs_fletcher_superscalar4.c | 55 fletcher_4_superscalar4_init(fletcher_4_ctx_t *ctx) in fletcher_4_superscalar4_init() argument 57 bzero(ctx->superscalar, 4 * sizeof (zfs_fletcher_superscalar_t)); in fletcher_4_superscalar4_init() 61 fletcher_4_superscalar4_fini(fletcher_4_ctx_t *ctx, zio_cksum_t *zcp) in fletcher_4_superscalar4_fini() argument 65 A = ctx->superscalar[0].v[0] + ctx->superscalar[0].v[1] + in fletcher_4_superscalar4_fini() 66 ctx->superscalar[0].v[2] + ctx->superscalar[0].v[3]; in fletcher_4_superscalar4_fini() 67 B = 0 - ctx->superscalar[0].v[1] - 2 * ctx->superscalar[0].v[2] - in fletcher_4_superscalar4_fini() 68 3 * ctx->superscalar[0].v[3] + 4 * ctx->superscalar[1].v[0] + in fletcher_4_superscalar4_fini() 69 4 * ctx->superscalar[1].v[1] + 4 * ctx->superscalar[1].v[2] + in fletcher_4_superscalar4_fini() 70 4 * ctx->superscalar[1].v[3]; in fletcher_4_superscalar4_fini() 72 C = ctx->superscalar[0].v[2] + 3 * ctx->superscalar[0].v[3] - in fletcher_4_superscalar4_fini() [all …]
|
H A D | zfs_fletcher_intel.c | 55 fletcher_4_avx2_init(fletcher_4_ctx_t *ctx) in fletcher_4_avx2_init() argument 57 bzero(ctx->avx, 4 * sizeof (zfs_fletcher_avx_t)); in fletcher_4_avx2_init() 61 fletcher_4_avx2_fini(fletcher_4_ctx_t *ctx, zio_cksum_t *zcp) in fletcher_4_avx2_fini() argument 65 A = ctx->avx[0].v[0] + ctx->avx[0].v[1] + in fletcher_4_avx2_fini() 66 ctx->avx[0].v[2] + ctx->avx[0].v[3]; in fletcher_4_avx2_fini() 67 B = 0 - ctx->avx[0].v[1] - 2 * ctx->avx[0].v[2] - 3 * ctx->avx[0].v[3] + in fletcher_4_avx2_fini() 68 4 * ctx->avx[1].v[0] + 4 * ctx->avx[1].v[1] + 4 * ctx->avx[1].v[2] + in fletcher_4_avx2_fini() 69 4 * ctx->avx[1].v[3]; in fletcher_4_avx2_fini() 71 C = ctx->avx[0].v[2] + 3 * ctx->avx[0].v[3] - 6 * ctx->avx[1].v[0] - in fletcher_4_avx2_fini() 72 10 * ctx->avx[1].v[1] - 14 * ctx->avx[1].v[2] - in fletcher_4_avx2_fini() [all …]
|
H A D | zfs_fletcher_superscalar.c | 55 fletcher_4_superscalar_init(fletcher_4_ctx_t *ctx) in fletcher_4_superscalar_init() argument 57 bzero(ctx->superscalar, 4 * sizeof (zfs_fletcher_superscalar_t)); in fletcher_4_superscalar_init() 61 fletcher_4_superscalar_fini(fletcher_4_ctx_t *ctx, zio_cksum_t *zcp) in fletcher_4_superscalar_fini() argument 64 A = ctx->superscalar[0].v[0] + ctx->superscalar[0].v[1]; in fletcher_4_superscalar_fini() 65 B = 2 * ctx->superscalar[1].v[0] + 2 * ctx->superscalar[1].v[1] - in fletcher_4_superscalar_fini() 66 ctx->superscalar[0].v[1]; in fletcher_4_superscalar_fini() 67 C = 4 * ctx->superscalar[2].v[0] - ctx->superscalar[1].v[0] + in fletcher_4_superscalar_fini() 68 4 * ctx->superscalar[2].v[1] - 3 * ctx->superscalar[1].v[1]; in fletcher_4_superscalar_fini() 69 D = 8 * ctx->superscalar[3].v[0] - 4 * ctx->superscalar[2].v[0] + in fletcher_4_superscalar_fini() 70 8 * ctx->superscalar[3].v[1] - 8 * ctx->superscalar[2].v[1] + in fletcher_4_superscalar_fini() [all …]
|
/illumos-gate/usr/src/lib/libsmbfs/smb/ |
H A D | ctx.c | 110 rpc_cleanup_smbctx(struct smb_ctx *ctx) in rpc_cleanup_smbctx() argument 113 (*close_hook)(ctx); in rpc_cleanup_smbctx() 186 dump_ctx(char *where, struct smb_ctx *ctx) in dump_ctx() argument 189 dump_ctx_flags(ctx->ct_flags); in dump_ctx() 191 if (ctx->ct_locname) in dump_ctx() 192 printf(" localname=\"%s\"", ctx->ct_locname); in dump_ctx() 196 if (ctx->ct_fullserver) in dump_ctx() 197 printf(" fullserver=\"%s\"", ctx->ct_fullserver); in dump_ctx() 201 if (ctx->ct_srvaddr_s) in dump_ctx() 202 printf(" srvaddr_s=\"%s\"\n", ctx->ct_srvaddr_s); in dump_ctx() [all …]
|
/illumos-gate/usr/src/common/crypto/modes/ |
H A D | ccm.c | 48 ccm_mode_encrypt_contiguous_blocks(ccm_ctx_t *ctx, char *data, size_t length, in ccm_mode_encrypt_contiguous_blocks() argument 67 if (length + ctx->ccm_remainder_len < block_size) { in ccm_mode_encrypt_contiguous_blocks() 70 (uint8_t *)ctx->ccm_remainder + ctx->ccm_remainder_len, in ccm_mode_encrypt_contiguous_blocks() 72 ctx->ccm_remainder_len += length; in ccm_mode_encrypt_contiguous_blocks() 73 ctx->ccm_copy_to = datap; in ccm_mode_encrypt_contiguous_blocks() 77 lastp = (uint8_t *)ctx->ccm_cb; in ccm_mode_encrypt_contiguous_blocks() 81 mac_buf = (uint8_t *)ctx->ccm_mac_buf; in ccm_mode_encrypt_contiguous_blocks() 85 if (ctx->ccm_remainder_len > 0) { in ccm_mode_encrypt_contiguous_blocks() 86 need = block_size - ctx->ccm_remainder_len; in ccm_mode_encrypt_contiguous_blocks() 91 bcopy(datap, &((uint8_t *)ctx->ccm_remainder) in ccm_mode_encrypt_contiguous_blocks() [all …]
|
H A D | gcm.c | 131 gcm_mode_encrypt_contiguous_blocks(gcm_ctx_t *ctx, char *data, size_t length, in gcm_mode_encrypt_contiguous_blocks() argument 150 if (length + ctx->gcm_remainder_len < block_size) { in gcm_mode_encrypt_contiguous_blocks() 153 (uint8_t *)ctx->gcm_remainder + ctx->gcm_remainder_len, in gcm_mode_encrypt_contiguous_blocks() 155 ctx->gcm_remainder_len += length; in gcm_mode_encrypt_contiguous_blocks() 156 ctx->gcm_copy_to = datap; in gcm_mode_encrypt_contiguous_blocks() 160 lastp = (uint8_t *)ctx->gcm_cb; in gcm_mode_encrypt_contiguous_blocks() 166 if (ctx->gcm_remainder_len > 0) { in gcm_mode_encrypt_contiguous_blocks() 167 need = block_size - ctx->gcm_remainder_len; in gcm_mode_encrypt_contiguous_blocks() 172 bcopy(datap, &((uint8_t *)ctx->gcm_remainder) in gcm_mode_encrypt_contiguous_blocks() 173 [ctx->gcm_remainder_len], need); in gcm_mode_encrypt_contiguous_blocks() [all …]
|
/illumos-gate/usr/src/lib/libsasl/lib/ |
H A D | auxprop.c | 131 static int prop_init(struct propctx *ctx, unsigned estimate) in prop_init() argument 135 ctx->mem_base = alloc_proppool(VALUES_SIZE + estimate); in prop_init() 136 if(!ctx->mem_base) return SASL_NOMEM; in prop_init() 138 ctx->mem_cur = ctx->mem_base; in prop_init() 140 ctx->values = (struct propval *)ctx->mem_base->data; in prop_init() 141 ctx->mem_base->unused = ctx->mem_base->size - VALUES_SIZE; in prop_init() 142 ctx->allocated_values = PROP_DEFAULT; in prop_init() 143 ctx->used_values = 0; in prop_init() 145 ctx->data_end = ctx->mem_base->data + ctx->mem_base->size; in prop_init() 146 ctx->list_end = (char **)(ctx->mem_base->data + VALUES_SIZE); in prop_init() [all …]
|
/illumos-gate/usr/src/uts/common/gssapi/mechs/krb5/krb5/krb/ |
H A D | init_ctx.c | 203 krb5_reinit_ef_handle(krb5_context ctx) in krb5_reinit_ef_handle() argument 205 ctx->cryptoki_initialized = FALSE; in krb5_reinit_ef_handle() 207 if (krb5_init_ef_handle(ctx) != 0) { in krb5_reinit_ef_handle() 217 ctx->pid = __krb5_current_pid; in krb5_reinit_ef_handle() 220 if (ctx->arcfour_ctx.initialized) { in krb5_reinit_ef_handle() 222 ret = krb5_open_pkcs11_session(&ctx->arcfour_ctx.eSession); in krb5_reinit_ef_handle() 224 ctx->arcfour_ctx.initialized = 0; in krb5_reinit_ef_handle() 225 ctx->arcfour_ctx.eSession = CK_INVALID_HANDLE; in krb5_reinit_ef_handle() 226 C_CloseSession(ctx->hSession); in krb5_reinit_ef_handle() 227 ctx->hSession = CK_INVALID_HANDLE; in krb5_reinit_ef_handle() [all …]
|
/illumos-gate/usr/src/lib/libadutils/common/ |
H A D | addisc.c | 139 #define DO_RES_NINIT(ctx) \ argument 140 if (!(ctx)->res_ninitted) \ 141 (void) do_res_ninit(ctx) 147 #define DEBUG1STATUS(ctx, ...) do { \ argument 150 if (ctx->status_fp) { \ 151 (void) fprintf(ctx->status_fp, __VA_ARGS__); \ 152 (void) fprintf(ctx->status_fp, "\n"); \ 165 static ad_item_t *validate_SiteName(ad_disc_t ctx); 166 static ad_item_t *validate_PreferredDC(ad_disc_t ctx); 174 do_res_ninit(ad_disc_t ctx) in do_res_ninit() argument [all …]
|
/illumos-gate/usr/src/cmd/vscan/vscand/ |
H A D | vs_icap.c | 239 vs_scan_ctx_t ctx; in vs_icap_scan_file() local 258 (void) memset(&ctx, 0, sizeof (vs_scan_ctx_t)); in vs_icap_scan_file() 259 ctx.vsc_idx = eng->vse_eidx; in vs_icap_scan_file() 260 (void) strlcpy(ctx.vsc_host, eng->vse_host, sizeof (ctx.vsc_host)); in vs_icap_scan_file() 261 ctx.vsc_port = eng->vse_port; in vs_icap_scan_file() 262 ctx.vsc_sockfd = eng->vse_sockfd; in vs_icap_scan_file() 263 ctx.vsc_fd = fd; in vs_icap_scan_file() 264 ctx.vsc_fname = fname; in vs_icap_scan_file() 265 ctx.vsc_fsize = fsize; in vs_icap_scan_file() 266 ctx.vsc_flags = flags; in vs_icap_scan_file() [all …]
|
/illumos-gate/usr/src/lib/pkcs11/pkcs11_tpm/common/ |
H A D | dig_mgr.c | 301 DIGEST_CONTEXT *ctx, in digest_mgr_init() argument 304 if (! sess || ! ctx) { in digest_mgr_init() 307 if (ctx->active != FALSE) { in digest_mgr_init() 314 ctx->context_len = sizeof (SHA1_CTX); in digest_mgr_init() 315 ctx->context.sha1ctx = (SHA1_CTX *) in digest_mgr_init() 316 malloc(ctx->context_len); in digest_mgr_init() 317 if (!ctx->context.sha1ctx) in digest_mgr_init() 319 SHA1Init(ctx->context.sha1ctx); in digest_mgr_init() 325 ctx->context_len = sizeof (MD5_CTX); in digest_mgr_init() 326 ctx->context.md5ctx = (MD5_CTX *) in digest_mgr_init() [all …]
|
H A D | verify_mgr.c | 32 SIGN_VERIFY_CONTEXT * ctx, in verify_mgr_init() argument 45 if (! sess || ! ctx) { in verify_mgr_init() 48 if (ctx->active != FALSE) { in verify_mgr_init() 96 ctx->context_len = 0; in verify_mgr_init() 97 ctx->context = NULL; in verify_mgr_init() 126 ctx->context_len = sizeof (RSA_DIGEST_CONTEXT); in verify_mgr_init() 127 ctx->context = (CK_BYTE *)malloc( in verify_mgr_init() 129 if (! ctx->context) { in verify_mgr_init() 132 (void) memset(ctx->context, 0x0, in verify_mgr_init() 152 ctx->context_len = 0; in verify_mgr_init() [all …]
|
/illumos-gate/usr/src/lib/libmlrpc/common/ |
H A D | ndr_auth.c | 26 ndr_add_auth_token(ndr_auth_ctx_t *ctx, ndr_xa_t *mxa) in ndr_add_auth_token() argument 31 secp->auth_type = ctx->auth_type; in ndr_add_auth_token() 32 secp->auth_level = ctx->auth_level; in ndr_add_auth_token() 50 secp->auth_context_id = ctx->auth_context_id; in ndr_add_auth_token() 64 ndr_add_sec_context(ndr_auth_ctx_t *ctx, ndr_xa_t *mxa) in ndr_add_sec_context() argument 68 if (ctx->auth_level == NDR_C_AUTHN_NONE || in ndr_add_sec_context() 69 ctx->auth_type == NDR_C_AUTHN_NONE) in ndr_add_sec_context() 72 if (ctx->auth_type != NDR_C_AUTHN_GSS_NETLOGON) in ndr_add_sec_context() 75 if (ctx->auth_level != NDR_C_AUTHN_LEVEL_PKT_INTEGRITY && in ndr_add_sec_context() 76 ctx->auth_level != NDR_C_AUTHN_LEVEL_PKT_PRIVACY) in ndr_add_sec_context() [all …]
|
/illumos-gate/usr/src/lib/libresolv2/common/irs/ |
H A D | hesiod.c | 61 static int parse_config_file(struct hesiod_p *ctx, const char *filename); 62 static char ** get_txt_records(struct hesiod_p *ctx, int class, 64 static int init(struct hesiod_p *ctx); 73 struct hesiod_p *ctx; in hesiod_init() local 76 ctx = malloc(sizeof(struct hesiod_p)); in hesiod_init() 77 if (ctx == 0) { in hesiod_init() 82 memset(ctx, 0, sizeof (*ctx)); in hesiod_init() 84 if (parse_config_file(ctx, _PATH_HESIOD_CONF) < 0) { in hesiod_init() 89 ctx->LHS = malloc(strlen(DEF_LHS) + 1); in hesiod_init() 90 ctx->RHS = malloc(strlen(DEF_RHS) + 1); in hesiod_init() [all …]
|
/illumos-gate/usr/src/tools/cw/ |
H A D | cw.c | 300 cw_ictx_t *ctx = calloc(1, sizeof (cw_ictx_t)); in newictx() local 301 if (ctx) in newictx() 302 if ((ctx->i_ae = calloc(1, sizeof (struct aelist))) == NULL) { in newictx() 303 free(ctx); in newictx() 307 return (ctx); in newictx() 425 discard_file_name(cw_ictx_t *ctx, const char *path) in discard_file_name() argument 447 (void) asprintf(&ret, "%s/%s%s", ctx->i_tmpdir, tmpl, in discard_file_name() 489 do_gcc(cw_ictx_t *ctx) in do_gcc() argument 500 if (ctx->i_flags & CW_F_PROG) { in do_gcc() 501 newae(ctx->i_ae, "--version"); in do_gcc() [all …]
|
/illumos-gate/usr/src/uts/common/os/ |
H A D | kcpc.c | 83 static void kcpc_ctx_clone(kcpc_ctx_t *ctx, kcpc_ctx_t *cctx); 96 #define KCPC_CTX_FLAG_SET(ctx, flag) atomic_or_uint(&(ctx)->kc_flags, (flag)) argument 97 #define KCPC_CTX_FLAG_CLR(ctx, flag) atomic_and_uint(&(ctx)->kc_flags, ~(flag)) argument 184 kcpc_ctx_t *ctx; in kcpc_bind_cpu() local 188 ctx = kcpc_ctx_alloc(KM_SLEEP); in kcpc_bind_cpu() 190 if (kcpc_assign_reqs(set, ctx) != 0) { in kcpc_bind_cpu() 191 kcpc_ctx_free(ctx); in kcpc_bind_cpu() 196 ctx->kc_cpuid = cpuid; in kcpc_bind_cpu() 197 ctx->kc_thread = curthread; in kcpc_bind_cpu() 201 if ((error = kcpc_configure_reqs(ctx, set, subcode)) != 0) { in kcpc_bind_cpu() [all …]
|