Home
last modified time | relevance | path

Searched refs:scred (Results 1 – 21 of 21) sorted by relevance

/freebsd/sys/fs/smbfs/
H A Dsmbfs_subr.h128 off_t start, off_t end, struct smb_cred *scred);
130 struct smb_cred *scred);
132 struct smb_cred *scred);
135 struct smbfattr *fap, struct smb_cred *scred);
137 struct timespec *mtime, struct smb_cred *scred);
139 struct timespec *atime, int attr, struct smb_cred *scred);
141 struct timespec *mtime, struct timespec *atime, struct smb_cred *scred);
144 struct timespec *atime, struct smb_cred *scred);
146 struct timespec *mtime, struct timespec *atime, struct smb_cred *scred);
148 int smbfs_smb_open(struct smbnode *np, int accmode, struct smb_cred *scred);
[all …]
H A Dsmbfs_vnops.c144 struct smb_cred *scred; in smbfs_open() local
188 scred = smbfs_malloc_scred(); in smbfs_open()
189 smb_makescred(scred, ap->a_td, ap->a_cred); in smbfs_open()
190 error = smbfs_smb_open(np, accmode, scred); in smbfs_open()
196 error = smbfs_smb_open(np, accmode, scred); in smbfs_open()
204 smbfs_free_scred(scred); in smbfs_open()
214 struct smb_cred *scred; in smbfs_close() local
218 scred = smbfs_malloc_scred(); in smbfs_close()
219 smb_makescred(scred, td, ap->a_cred); in smbfs_close()
220 smbfs_findclose(np->n_dirseq, scred); in smbfs_close()
[all …]
H A Dsmbfs_vfsops.c138 struct smb_cred *scred; in smbfs_mount() local
152 scred = smbfs_malloc_scred(); in smbfs_mount()
153 smb_makescred(scred, td, td->td_ucred); in smbfs_mount()
158 smbfs_free_scred(scred); in smbfs_mount()
161 error = smb_dev2share(v, SMBM_EXEC, scred, &ssp, &dev); in smbfs_mount()
166 smbfs_free_scred(scred); in smbfs_mount()
240 smbfs_free_scred(scred); in smbfs_mount()
244 smb_share_put(ssp, scred); in smbfs_mount()
245 smbfs_free_scred(scred); in smbfs_mount()
262 struct smb_cred *scred; in smbfs_unmount() local
[all …]
H A Dsmbfs_io.c78 struct smb_cred *scred; in smbfs_readvdir() local
87 scred = smbfs_malloc_scred(); in smbfs_readvdir()
88 smb_makescred(scred, uio->uio_td, cred); in smbfs_readvdir()
122 smbfs_findclose(np->n_dirseq, scred); in smbfs_readvdir()
128 scred, &ctx); in smbfs_readvdir()
137 error = smbfs_findnext(ctx, offset - np->n_dirofs++, scred); in smbfs_readvdir()
139 smbfs_findclose(np->n_dirseq, scred); in smbfs_readvdir()
147 error = smbfs_findnext(ctx, limit, scred); in smbfs_readvdir()
177 smbfs_free_scred(scred); in smbfs_readvdir()
188 struct smb_cred *scred; in smbfs_readvnode() local
[all …]
H A Dsmbfs_smb.c87 struct smb_cred *scred) in smbfs_smb_lockandx() argument
98 error = smb_rq_alloc(SSTOCP(ssp), SMB_COM_LOCKING_ANDX, scred, &rqp); in smbfs_smb_lockandx()
125 off_t start, off_t end, struct smb_cred *scred) in smbfs_smb_lock() argument
135 return smbfs_smb_lockandx(np, op, (uintptr_t)id, start, end, scred); in smbfs_smb_lock()
140 struct smb_cred *scred) in smbfs_query_info_fs() argument
150 scred, &t2p); in smbfs_query_info_fs()
180 struct smb_cred *scred) in smbfs_query_info_alloc() argument
190 scred, &t2p); in smbfs_query_info_alloc()
221 struct smb_cred *scred) in smbfs_query_info_disk() argument
229 scred, &rqp); in smbfs_query_info_disk()
[all …]
H A Dsmbfs_node.c300 struct smb_cred *scred; in smbfs_inactive() local
305 scred = smbfs_malloc_scred(); in smbfs_inactive()
306 smb_makescred(scred, td, cred); in smbfs_inactive()
311 &np->n_mtime, scred); in smbfs_inactive()
314 smbfs_findclose(np->n_dirseq, scred); in smbfs_inactive()
320 smbfs_free_scred(scred); in smbfs_inactive()
H A Dsmbfs_subr.c200 smbfs_free_scred(void *scred) in smbfs_free_scred() argument
202 free(scred, M_SMBFSCRED); in smbfs_free_scred()
/freebsd/sys/netsmb/
H A Dsmb_conn.h190 typedef void smb_co_gone_t (struct smb_connobj *cp, struct smb_cred *scred);
331 struct smb_cred *scred; member
345 struct smb_cred *scred; member
354 struct smb_sharespec *shspec, struct smb_cred *scred,
361 void smb_co_rele(struct smb_connobj *cp, struct smb_cred *scred);
362 int smb_co_get(struct smb_connobj *cp, struct smb_cred *scred);
363 void smb_co_put(struct smb_connobj *cp, struct smb_cred *scred);
371 struct smb_cred *scred, struct smb_vc **vcpp);
372 int smb_vc_connect(struct smb_vc *vcp, struct smb_cred *scred);
373 int smb_vc_access(struct smb_vc *vcp, struct smb_cred *scred, mode_t mode);
[all …]
H A Dsmb_dev.c145 struct smb_cred *scred; in sdp_trydestroy() local
154 scred = malloc(sizeof(struct smb_cred), M_NSMBDEV, M_WAITOK); in sdp_trydestroy()
155 smb_makescred(scred, curthread, NULL); in sdp_trydestroy()
159 smb_share_rele(ssp, scred); in sdp_trydestroy()
164 smb_vc_rele(vcp, scred); in sdp_trydestroy()
166 free(scred, M_NSMBDEV); in sdp_trydestroy()
177 struct smb_cred *scred; in nsmb_dev_ioctl() local
183 scred = malloc(sizeof(struct smb_cred), M_NSMBDEV, M_WAITOK); in nsmb_dev_ioctl()
185 smb_makescred(scred, td, NULL); in nsmb_dev_ioctl()
193 scred, &vcp); in nsmb_dev_ioctl()
[all …]
H A Dsmb_conn.c64 static void smb_vc_gone(struct smb_connobj *cp, struct smb_cred *scred);
122 struct smb_cred *scred, struct smb_vc **vcpp) in smb_sm_lookupint() argument
157 if (smb_vc_access(vcp, scred, vcspec->mode) != 0) in smb_sm_lookupint()
161 error = (int)smb_vc_lookupshare(vcp, shspec, scred, in smb_sm_lookupint()
182 struct smb_cred *scred, struct smb_vc **vcpp) in smb_sm_lookup() argument
193 error = smb_sm_lookupint(vcspec, shspec, scred, vcpp); in smb_sm_lookup()
198 error = smb_sm_lookupint(vcspec, NULL, scred, &vcp); in smb_sm_lookup()
200 error = smb_vc_create(vcspec, scred, &vcp); in smb_sm_lookup()
203 error = smb_vc_connect(vcp, scred); in smb_sm_lookup()
209 error = smb_share_create(vcp, shspec, scred, &ssp); in smb_sm_lookup()
[all …]
H A Dsmb_smb.c102 smb_smb_nomux(struct smb_vc *vcp, struct smb_cred *scred, const char *name) in smb_smb_nomux() argument
104 if (scred->scr_td->td_proc == vcp->vc_iod->iod_p) in smb_smb_nomux()
111 smb_smb_negotiate(struct smb_vc *vcp, struct smb_cred *scred) in smb_smb_negotiate() argument
125 if (smb_smb_nomux(vcp, scred, __func__) != 0) in smb_smb_negotiate()
137 error = smb_rq_alloc(VCTOCP(vcp), SMB_COM_NEGOTIATE, scred, &rqp); in smb_smb_negotiate()
291 smb_smb_ssnsetup(struct smb_vc *vcp, struct smb_cred *scred) in smb_smb_ssnsetup() argument
311 if (smb_smb_nomux(vcp, scred, __func__) != 0) in smb_smb_ssnsetup()
314 error = smb_rq_alloc(VCTOCP(vcp), SMB_COM_SESSION_SETUP_ANDX, scred, &rqp); in smb_smb_ssnsetup()
438 smb_smb_ssnclose(struct smb_vc *vcp, struct smb_cred *scred) in smb_smb_ssnclose() argument
447 if (smb_smb_nomux(vcp, scred, __func__) != 0) in smb_smb_ssnclose()
[all …]
H A Dsmb_usr.c125 smb_usr_lookup(struct smbioc_lookup *dp, struct smb_cred *scred, in smb_usr_lookup() argument
147 error = smb_sm_lookup(&vspec, sspecp, scred, &vcp); in smb_usr_lookup()
163 smb_usr_opensession(struct smbioc_ossn *dp, struct smb_cred *scred, in smb_usr_opensession() argument
176 error = smb_sm_lookup(&vspec, NULL, scred, &vcp); in smb_usr_opensession()
183 struct smb_cred *scred, struct smb_share **sspp) in smb_usr_openshare() argument
192 error = smb_vc_lookupshare(vcp, &shspec, scred, &ssp); in smb_usr_openshare()
199 error = smb_share_create(vcp, &shspec, scred, &ssp); in smb_usr_openshare()
202 error = smb_smb_treeconnect(ssp, scred); in smb_usr_openshare()
204 smb_share_put(ssp, scred); in smb_usr_openshare()
212 struct smb_cred *scred) in smb_usr_simplerequest() argument
[all …]
H A Dsmb_dev.h183 int smb_usr_lookup(struct smbioc_lookup *dp, struct smb_cred *scred,
186 struct smb_cred *scred, struct smb_vc **vcpp);
188 struct smb_cred *scred, struct smb_share **sspp);
190 struct smb_cred *scred);
192 struct smb_cred *scred);
193 int smb_dev2share(int fd, int mode, struct smb_cred *scred,
H A Dsmb_rq.h128 struct smb_cred *scred, struct smb_rq **rqpp);
130 struct smb_cred *scred);
141 int smb_t2_alloc(struct smb_connobj *layer, u_short setup, struct smb_cred *scred,
144 struct smb_cred *scred);
H A Dsmb_rq.c60 smb_rq_alloc(struct smb_connobj *layer, u_char cmd, struct smb_cred *scred, in smb_rq_alloc() argument
67 error = smb_rq_init(rqp, layer, cmd, scred); in smb_rq_alloc()
81 struct smb_cred *scred) in smb_rq_init() argument
90 error = smb_vc_access(rqp->sr_vc, scred, SMBM_EXEC); in smb_rq_init()
94 error = smb_share_access(rqp->sr_share, scred, SMBM_EXEC); in smb_rq_init()
98 rqp->sr_cred = scred; in smb_rq_init()
370 smb_t2_alloc(struct smb_connobj *layer, u_short setup, struct smb_cred *scred, in smb_t2_alloc() argument
377 error = smb_t2_init(t2p, layer, setup, scred); in smb_t2_alloc()
389 struct smb_cred *scred) in smb_t2_init() argument
399 t2p->t2_cred = scred; in smb_t2_init()
[all …]
H A Dsmb_subr.c55 smb_makescred(struct smb_cred *scred, struct thread *td, struct ucred *cred) in smb_makescred() argument
58 scred->scr_td = td; in smb_makescred()
59 scred->scr_cred = cred ? cred : td->td_ucred; in smb_makescred()
61 scred->scr_td = NULL; in smb_makescred()
62 scred->scr_cred = cred ? cred : NULL; in smb_makescred()
H A Dsmb_subr.h99 void smb_makescred(struct smb_cred *scred, struct thread *td, struct ucred *cred);
/freebsd/contrib/openpam/lib/libpam/
H A Dopenpam_borrow_cred.c63 struct pam_saved_cred *scred; in openpam_borrow_cred() local
79 scred = calloc(1, sizeof *scred); in openpam_borrow_cred()
80 if (scred == NULL) in openpam_borrow_cred()
82 scred->euid = geteuid(); in openpam_borrow_cred()
83 scred->egid = getegid(); in openpam_borrow_cred()
84 r = getgroups(NGROUPS_MAX, scred->groups); in openpam_borrow_cred()
86 FREE(scred); in openpam_borrow_cred()
89 scred->ngroups = r; in openpam_borrow_cred()
90 r = pam_set_data(pamh, PAM_SAVED_CRED, scred, &openpam_free_data); in openpam_borrow_cred()
92 FREE(scred); in openpam_borrow_cred()
H A Dopenpam_restore_cred.c62 const struct pam_saved_cred *scred; in openpam_restore_cred() local
72 scred = scredp; in openpam_restore_cred()
73 if (scred->euid != geteuid()) { in openpam_restore_cred()
74 if (seteuid(scred->euid) < 0 || in openpam_restore_cred()
75 setgroups(scred->ngroups, scred->groups) < 0 || in openpam_restore_cred()
76 setegid(scred->egid) < 0) in openpam_restore_cred()
/freebsd/crypto/heimdal/lib/kadm5/
H A Dad.c128 struct berval ccred, *scred; in ldap_tsasl_bind_s() local
190 serverControls, clientControls, &scred); in ldap_tsasl_bind_s()
194 if(scred && scred->bv_len) in ldap_tsasl_bind_s()
195 ber_bvfree(scred); in ldap_tsasl_bind_s()
199 in.tb_data = malloc(scred->bv_len); in ldap_tsasl_bind_s()
204 memcpy(in.tb_data, scred->bv_val, scred->bv_len); in ldap_tsasl_bind_s()
205 in.tb_size = scred->bv_len; in ldap_tsasl_bind_s()
206 ber_bvfree(scred); in ldap_tsasl_bind_s()
/freebsd/sys/compat/linux/
H A Dlinux_socket.c1605 struct sockcred2 *scred; in recvmsg_scm_creds2() local
1608 scred = *data; in recvmsg_scm_creds2()
1609 lu.pid = scred->sc_pid; in recvmsg_scm_creds2()
1610 lu.uid = scred->sc_uid; in recvmsg_scm_creds2()
1611 lu.gid = scred->sc_gid; in recvmsg_scm_creds2()