Bug #63 ยป smb.diff
smb_conn.c 17 Jan 2006 12:51:29 -0000 | ||
---|---|---|
struct smb_cred *scred, struct smb_vc **vcpp)
|
||
{
|
||
struct thread *td = scred->scr_td;
|
||
struct smb_connobj *scp;
|
||
struct smb_vc *vcp;
|
||
int exact = 1;
|
||
int error;
|
||
vcspec->shspec = shspec;
|
||
error = ENOENT;
|
||
SMBCO_FOREACH((struct smb_connobj*)vcp, &smb_vclist) {
|
||
vcp = NULL;
|
||
SMBCO_FOREACH(scp, &smb_vclist) {
|
||
vcp = (struct smb_vc *)scp;
|
||
error = smb_vc_lock(vcp, LK_EXCLUSIVE, td);
|
||
if (error)
|
||
continue;
|
||
... | ... | |
struct smb_cred *scred, struct smb_share **sspp)
|
||
{
|
||
struct thread *td = scred->scr_td;
|
||
struct smb_connobj *scp;
|
||
struct smb_share *ssp = NULL;
|
||
int error;
|
||
*sspp = NULL;
|
||
dp->scred = scred;
|
||
SMBCO_FOREACH((struct smb_connobj*)ssp, VCTOCP(vcp)) {
|
||
SMBCO_FOREACH(scp, VCTOCP(vcp)) {
|
||
ssp = (struct smb_share *)scp;
|
||
error = smb_share_lock(ssp, LK_EXCLUSIVE, td);
|
||
if (error)
|
||
continue;
|
||
... | ... | |
struct smb_share *ssp;
|
||
struct smb_vc_info vci;
|
||
struct smb_share_info ssi;
|
||
struct smb_connobj *scp1, *scp2;
|
||
int error, itype;
|
||
KKASSERT(td->td_proc);
|
||
... | ... | |
error = smb_sm_lockvclist(LK_SHARED, td);
|
||
if (error)
|
||
return error;
|
||
SMBCO_FOREACH((struct smb_connobj*)vcp, &smb_vclist) {
|
||
SMBCO_FOREACH(scp1, &smb_vclist) {
|
||
vcp = (struct smb_vc *)scp1;
|
||
error = smb_vc_lock(vcp, LK_SHARED, td);
|
||
if (error)
|
||
continue;
|
||
... | ... | |
smb_vc_unlock(vcp, 0, td);
|
||
break;
|
||
}
|
||
SMBCO_FOREACH((struct smb_connobj*)ssp, VCTOCP(vcp)) {
|
||
SMBCO_FOREACH(scp2, VCTOCP(vcp)) {
|
||
ssp = (struct smb_share *)scp2;
|
||
error = smb_share_lock(ssp, LK_SHARED, td);
|
||
if (error) {
|
||
error = 0;
|
smb_usr.c 17 Jan 2006 13:03:35 -0000 | ||
---|---|---|
struct mdchain *mdp;
|
||
int error, len;
|
||
if (dp->ioc_tparamcnt > 0xffff || dp->ioc_tdatacnt > 0xffff ||
|
||
dp->ioc_setupcnt > 3)
|
||
if (dp->ioc_setupcnt > 3)
|
||
return EINVAL;
|
||
error = smb_t2_init(t2p, SSTOCP(ssp), dp->ioc_setup[0], scred);
|
||
if (error)
|