Deleted Added
full compact
smb_smb.c (139823) smb_smb.c (156326)
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

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

30 * SUCH DAMAGE.
31 */
32
33/*
34 * various SMB requests. Most of the routines merely packs data into mbufs.
35 */
36
37#include <sys/cdefs.h>
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

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

30 * SUCH DAMAGE.
31 */
32
33/*
34 * various SMB requests. Most of the routines merely packs data into mbufs.
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/sys/netsmb/smb_smb.c 139823 2005-01-07 01:45:51Z imp $");
38__FBSDID("$FreeBSD: head/sys/netsmb/smb_smb.c 156326 2006-03-05 22:52:17Z yar $");
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/kernel.h>
43#include <sys/malloc.h>
44#include <sys/proc.h>
45#include <sys/lock.h>
46#include <sys/sysctl.h>

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

192 if (sp->sv_caps & SMB_CAP_EXT_SECURITY)
193 md_get_mem(mdp, NULL, 16, MB_MSYSTEM);
194 error = md_get_mem(mdp, vcp->vc_ch, sblen, MB_MSYSTEM);
195 if (error)
196 break;
197 vcp->vc_chlen = sblen;
198 vcp->obj.co_flags |= SMBV_ENCRYPT;
199 }
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/kernel.h>
43#include <sys/malloc.h>
44#include <sys/proc.h>
45#include <sys/lock.h>
46#include <sys/sysctl.h>

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

192 if (sp->sv_caps & SMB_CAP_EXT_SECURITY)
193 md_get_mem(mdp, NULL, 16, MB_MSYSTEM);
194 error = md_get_mem(mdp, vcp->vc_ch, sblen, MB_MSYSTEM);
195 if (error)
196 break;
197 vcp->vc_chlen = sblen;
198 vcp->obj.co_flags |= SMBV_ENCRYPT;
199 }
200#ifdef NETSMBCRYPTO
201 if (sp->sv_sm & SMB_SM_SIGS_REQUIRE)
202 vcp->vc_hflags2 |= SMB_FLAGS2_SECURITY_SIGNATURE;
200 if (sp->sv_sm & SMB_SM_SIGS_REQUIRE)
201 vcp->vc_hflags2 |= SMB_FLAGS2_SECURITY_SIGNATURE;
203#endif
204 vcp->vc_hflags2 |= SMB_FLAGS2_KNOWS_LONG_NAMES;
205 if (dp->d_id == SMB_DIALECT_NTLM0_12 &&
206 sp->sv_maxtx < 4096 &&
207 (sp->sv_caps & SMB_CAP_NT_SMBS) == 0) {
208 vcp->obj.co_flags |= SMBV_WIN95;
209 SMBSDEBUG("Win95 detected\n");
210 }
211 } else if (dp->d_id > SMB_DIALECT_CORE) {

--- 718 unchanged lines hidden ---
202 vcp->vc_hflags2 |= SMB_FLAGS2_KNOWS_LONG_NAMES;
203 if (dp->d_id == SMB_DIALECT_NTLM0_12 &&
204 sp->sv_maxtx < 4096 &&
205 (sp->sv_caps & SMB_CAP_NT_SMBS) == 0) {
206 vcp->obj.co_flags |= SMBV_WIN95;
207 SMBSDEBUG("Win95 detected\n");
208 }
209 } else if (dp->d_id > SMB_DIALECT_CORE) {

--- 718 unchanged lines hidden ---