Deleted Added
full compact
smb_subr.c (82046) smb_subr.c (87192)
1/*
2 * Copyright (c) 2000-2001 Boris Popov
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
1/*
2 * Copyright (c) 2000-2001 Boris Popov
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * $FreeBSD: head/sys/netsmb/smb_subr.c 82046 2001-08-21 09:16:57Z bp $
32 * $FreeBSD: head/sys/netsmb/smb_subr.c 87192 2001-12-02 08:47:29Z bp $
33 */
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>
37#include <sys/malloc.h>
38#include <sys/proc.h>
39#include <sys/lock.h>
40#include <sys/sysctl.h>

--- 10 unchanged lines hidden (view full) ---

51
52MALLOC_DEFINE(M_SMBDATA, "SMBDATA", "Misc netsmb data");
53MALLOC_DEFINE(M_SMBSTR, "SMBSTR", "netsmb string data");
54MALLOC_DEFINE(M_SMBTEMP, "SMBTEMP", "Temp netsmb data");
55
56smb_unichar smb_unieol = 0;
57
58void
33 */
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>
37#include <sys/malloc.h>
38#include <sys/proc.h>
39#include <sys/lock.h>
40#include <sys/sysctl.h>

--- 10 unchanged lines hidden (view full) ---

51
52MALLOC_DEFINE(M_SMBDATA, "SMBDATA", "Misc netsmb data");
53MALLOC_DEFINE(M_SMBSTR, "SMBSTR", "netsmb string data");
54MALLOC_DEFINE(M_SMBTEMP, "SMBTEMP", "Temp netsmb data");
55
56smb_unichar smb_unieol = 0;
57
58void
59smb_makescred(struct smb_cred *scred, struct proc *p, struct ucred *cred)
59smb_makescred(struct smb_cred *scred, struct thread *td, struct ucred *cred)
60{
60{
61 if (p) {
62 scred->scr_p = p;
63 scred->scr_cred = cred ? cred : p->p_ucred;
61 if (td) {
62 scred->scr_td = td;
63 scred->scr_cred = cred ? cred : td->td_proc->p_ucred;
64 } else {
64 } else {
65 scred->scr_p = NULL;
65 scred->scr_td = NULL;
66 scred->scr_cred = cred ? cred : NULL;
67 }
68}
69
70int
71smb_proc_intr(struct proc *p)
72{
73 sigset_t tmpset;

--- 279 unchanged lines hidden ---
66 scred->scr_cred = cred ? cred : NULL;
67 }
68}
69
70int
71smb_proc_intr(struct proc *p)
72{
73 sigset_t tmpset;

--- 279 unchanged lines hidden ---