1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

37 Commits

Author SHA1 Message Date
Andrew Tridgell
f1e71ed1b9 CVAL_NC() doesn't need the (unsigned) fix and breaks the IRIX build
Thanks to Herb for pointing this out!
(This used to be commit 87ede8d310)
2003-07-31 23:22:21 +00:00
Andrew Tridgell
ddf3c6d5cc This is a critical bug fix for a data corruption bug. If you
maintain another tree then please apply!

On non-X86 machines out byte-order macros fails for one particular
value. If you asked for IVAL() of 0xFFFFFFFF and assigned it to a 64
bit quantity then you got a 63 bit number 0x7FFFFFFFFFFFFFFF rather
than the expected 0xFFFFFFFF. This is due to some rather bizarre and
obscure sign extension rules to do with unsigned chars and arithmetic
operators (basically if you | together two unsigned chars you get a
signed result!)

This affected a byte range lock using the large lockingX format and a
lock of offset 0 and length 0xFFFFFFFF. Microsoft Excel does one of
these locks when opening a .csv file. If the platform you run on does
not then handle locks of length 0x7FFFFFFFFFFFFFFF then the posix lock
fails and the client is given a lockingX failure. This causes the .csv
file to be trunated!!
(This used to be commit 886661c377)
2003-07-31 04:01:32 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00
Jeremy Allison
c8e924c7a3 Added requested cast for splint.
Jeremy.
(This used to be commit 0496508671)
2002-03-01 22:02:53 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Jeremy Allison
d6823366b8 Same fix as went into 2.2 (I'm waiting for jerry to finish some code).
Jeremy.
(This used to be commit 01ff6ce496)
2002-01-11 19:10:25 +00:00
Jeremy Allison
92368833fa configure configure.in include/config.h.in lib/replace.c: Added test and replacement
for setlinebuf which apparantly doesn't exist on HPUX 11.
include/byteorder.h:
rpc_parse/parse_prs.c:
Ding Dong the witch is dead ! :-). Ok, I'm happy 'cos I've finally deleted
all the *HORRIBLE* DBG_RW_XXX and RW_XXX macros from include/byteorder.h.
They were macros that included macros that had conditional macros included.
No one understood them (they were the cause of most of the bigendian issue
bugs). Finally, I went into parse_prs.c and inlined all of that stuff with
regular function calls. They're understandable, they're easy to edit and
they don't include macros !
JF - please look at the one comment I added (JF PLEASE CHECK). I have
tested this partly with IRIX (a bigendian system) running with AS/U on
a Solaris box in SGI's lab, and I've also confirmed these new changes
work with W2K (vmware) but there may be the odd bug lurking. Herb, if
you could re-checkout and test again with this code that would help.

Extra.  Fixed bug spotted by the sharp eyes of JF - big endian unicode
packet would cause a early truncate of string parsing as we were checking for a char *
0, not a uint16 * 0.

Jeremy.
(This used to be commit 13765eca71)
2001-03-31 19:06:45 +00:00
Jeremy Allison
4ab6182a0f AS/U on a sparc now joins and authenticates against a Samba PDC !
Jeremy.
(This used to be commit 28a0bc5f57)
2001-03-15 00:49:13 +00:00
Jeremy Allison
4743965cd9 Andrew made it faster :-).
Jeremy.
(This used to be commit f2a775d3fb)
2000-04-11 23:58:53 +00:00
Jeremy Allison
a110c7ce51 Bloody typo ! It should be & 3 , & 1 *not* &~3, &~1.
Jeremy.
(This used to be commit 83734b6761)
2000-04-11 23:43:56 +00:00
Jeremy Allison
f6be38cae2 include/byteorder.h: ALIGN4/ALIGN2 macros.
include/includes.h: Added SMB_BIG_UINT_BITS.
lib/util.c: Removed align2/align4 - use macros.
libsmb/namequery.c: Use ALIGN2.
locking/locking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
                   Needed to move to hiding POSIX locks at a lower layer.
nmbd/nmbd_processlogon.c: Use ALIGN2/ALIGN4 macros.
smbd/blocking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
smbd/reply.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
Jeremy.
(This used to be commit 491eea8a20)
2000-04-11 19:44:54 +00:00
Jeremy Allison
8f1620125d acconfig.h configure configure.in: Added check for UT_SYSLEN for utmp code.
include/byteorder.h: Added alignment macros.
include/nameserv.h: Added defines for msg_type field options - from rfc1002.
lib/time.c: Typo fix.
lib/util_unistr.c: Updates from UNICODE branch.
printing/nt_printing.c: bzero -> memset.
smbd/connection.c: Added check for UT_SYSLEN for utmp code.

Other fixes : Rollback of unapproved commit from Luke.
Please *ask* next time before doing large changes to HEAD.

Jeremy.
(This used to be commit f02999dbf7)
2000-03-22 19:03:12 +00:00
Andrew Tridgell
3db52feb1f first pass at updating head branch to be to be the same as the SAMBA_2_0 branch
(This used to be commit 453a822a76)
1999-12-13 13:27:58 +00:00
Luke Leighton
5612824426 - typecast malloc / Realloc issues.
- signed / unsigned issues.
(This used to be commit c8fd555179)
1999-10-25 19:03:27 +00:00
Luke Leighton
748627dbfb use DEBUGADD instead of DEBUG: clears up some of the more verbose trash.
(This used to be commit 63431997ee)
1999-10-21 15:22:30 +00:00
Luke Leighton
4f20234c78 const issues with byte mod / byte read macros.
(This used to be commit 98ecb88704)
1999-02-12 15:34:57 +00:00
Luke Leighton
60a91a1dca clearing up security descriptor
(This used to be commit abdc9d790b)
1998-11-11 19:22:08 +00:00
Jeremy Allison
55f400bd84 This is *not* a big change (although it looks like one).
This is merely updating the Copyright statements from 1997 to 1998.
It's a once a year thing :-).
NO OTHER CHANGES WERE MADE.
Jeremy.
(This used to be commit b9c1697723)
1998-01-22 13:27:43 +00:00
Jeremy Allison
77aec4ae63 Rolled back tree state to 11:59pm 8th November 1997 EST to
remove problems.
Jeremy
(This used to be commit 4a36ac236c)
1997-11-10 19:23:17 +00:00
Luke Leighton
cc512947c9 byteorder.h :
typecasting for the debug messages of the data dump.  hm.

#ifdef NTDOMAIN

ntclient.c rpc_pipes/lsaparse.c rpc_pipes/ntclientnet.c rpc_pipes/smbparse.c :

	adding "Net Server Password Set" functionality to smbclient.

#endif
(This used to be commit ad43183d2d)
1997-11-09 20:42:47 +00:00
Luke Leighton
21fda98dc9 byteorder.h :
have another go at reporting stuff the right way round (on SPARCs)

srvparse.c :

	copyright messages
(This used to be commit 4b54d22d59)
1997-10-29 20:23:01 +00:00
Luke Leighton
77cc0d6bac typecast in calls to print_asc() wrong
(This used to be commit 4088683ee0)
1997-10-29 19:58:20 +00:00
Luke Leighton
fe0a702322 byteorder.h :
added mode for printing debug array data as chars not uint8/16/32s.
	only really useful for (uint8) strings or (uint16) unicode strings

lsaparse.c smbparse.c smb.h :

	rpc bind and rpc bind ack structures and parsing and creation functions.

ipc.c pipes.c pipenetlog.c pipentlsa.c pipesrvsvc.c :

	using rpc bind / bind ack parsing routines instead of incorrect use of
	api_LsarpcTNP1 function.

ntclient.c :

	creation of do_rpc_bind() function.

THAT'S IT, FOLKS!
(This used to be commit 21c89e2f17)
1997-10-29 00:04:14 +00:00
Luke Leighton
13291ce01d added LSA Query Info Policy.
fixed a problem with byte ordering (doing an SIVAL of the setup parameters
which was _also_ being done in the creation of the SMB header.  oops).
(This used to be commit 541fb82895)
1997-10-27 17:04:15 +00:00
Luke Leighton
390c1f3c4d Makefile :
adding bits for new nt domain code

byteorder.h :

	trying to get macros right, and not to crash on SUNOS5...

client.c :

	added #ifdef NTDOMAIN, and created do_nt_login() function.  don't
	want to have to recompile client.c unless absolutely necessary.

credentials.c :

	moved deal_with_creds() [possibly inappropriately] into credentials.c

ipc.c reply.c server.c uid.c :

	attempting to make (un)become_root() functions calleable from smbclient.
	this is a little tricky: smbclient might have to be another setuid
	root program, immediately setuid'ing to non-root, so that we can
	reset-uid to root to get at the smbpasswd file.  or, have a secure
	pipe mechanism to smbd to grab smbpasswd entries.  or the like.

smbdes.c smbencrypt.c :

	created a function to generate lm and nt owf hashes.

lsaparse.c ntclient.c smbparse.c :

	added nt client LSA_AUTH2 code.  it works, too!

pipenetlog.c pipentlsa.c pipesrvsvc.c :

	simplification.  code-shuffling.  getting that damn offset right
	for the opcode in RPC_HDR.

smb.h :

	changed dcinfo xxx_creds to DOM_CRED structures instead of DOM_CHAL.
	we might need to store the server times as well.

proto.h :

	the usual.
(This used to be commit 82436a3d99)
1997-10-25 10:58:18 +00:00
Luke Leighton
d838452413 smb.h smbparse.c pipenetlog.c :
whoops, the SAM Logon structure was wrong.  updated this, and
	cifsntdomain.txt.  more debug info in pipenetlog.c.  the crash
	is somewhere around deal_with_credentials().

byteorder.h :

	put in uint8, uint16 and uint32 typecasts around debug info, because
	sign extending was resulting in ffffffe8 being displayed instead of e8.

credentials.c :

	some debugging info, because i'm tracking a coredump.  without gdb.
	nothing like making things difficult.

reply.c :

	whoops, missed this (important) bit from paul's code, which tells
	the NT workstation that the MACHINE$ entry doesn't already exist,
	and we're going to create a default entry with a password "machine"
	right now.

proto.h:

	the usual.
(This used to be commit ed606bc7d4)
1997-10-15 19:16:38 +00:00
Luke Leighton
8fe499f775 byteorder.h:
created a RW_PIVAL macro which was missing.

smbparse.c:

	smb_io_dom_sid() was storing its sub-authorities as uint16s instead
	of uint32s.  used the DBG_RW_PIVAL macro instead of DBG_RW_PSVAL.

pipentlsa.c:

	not sure.  something to do with the Query Info reply.

pipeutil.c:

	make_rpc_reply() had the packed representation field set to 0x0100 0000
	instead of 0x1000 0000, which had the interesting result of turning all
	uint32 and uint16 field byte ordering the other way round!
(This used to be commit eafd6e9e79)
1997-10-14 18:37:55 +00:00
Luke Leighton
6084046eed credentials, query info reply.
(This used to be commit 9b095887df)
1997-10-14 17:01:43 +00:00
Luke Leighton
2225fe1376 debug info added
(This used to be commit a3f96555b4)
1997-10-13 13:35:37 +00:00
Luke Leighton
2259e56a94 byteorder.h :
debugging output wasn't (still isn't) perfect.

credentials.c lsaparse.c smbparse.c :

	added DEBUG strings.

pipes.c :

	lost some changes, to do with setup of RPC headers.  arg.
(This used to be commit 9fdd697d17)
1997-10-13 12:21:56 +00:00
Luke Leighton
db20ab9bbd getting somewhere.
ipc.c :

	removed srvsvc pipe reference: have to do that.

pipes.c lsaparse.c smbparse.c :

	more debugging info.  looks a bit like netmon output.
(This used to be commit e02aa88e25)
1997-10-12 19:02:55 +00:00
Luke Leighton
a26037ac7c added debugging macros (suitable eventually for use in tcpdump, hopefully)
(This used to be commit 946d73cf83)
1997-10-12 11:46:42 +00:00
Luke Leighton
7d82c240e2 moved the array macros outside of the CAREFUL_ALIGNMENT define.
(This used to be commit d9fcf11aa0)
1997-10-09 15:51:43 +00:00
Luke Leighton
a193401384 added some RW_XXXX wrapper macros with an extra i/o argument, to call XXXX
or SXXXX as appropriate.

added some for-loop pointer macros that will do a batch of data into a
(fixed length) buffer.  no length validation is done in the macro itself.

note: there are some CAREFUL_ALIGNMENT macros missing.  i think.
(This used to be commit b0ffd75acf)
1997-10-04 16:42:09 +00:00
Samba Release Account
0f1f0ceb95 'The mother of all checkins' :-). Jeremy Allison (jallison@whistle.com)
Wed May  7 1997: Update for 1.9.17alpha1 release - 'browsefix release'
designed to make browsing across subnets work.

byteorder.h:	Updated copyright to 1997.
charcnv.c:      Updated copyright to 1997.
charset.c 	Updated copyright to 1997.
charset.h	Updated copyright to 1997.
client.c	Updated copyright to 1997.
clientutil.c	Updated copyright to 1997.
dir.c		Updated copyright to 1997.
fault.c		Updated copyright to 1997.
includes.h	Updated copyright to 1997.
interface.c	Updated copyright to 1997.
ipc.c		Updated copyright to 1997.
kanji.c		Updated copyright to 1997.
kanji.h		Updated copyright to 1997.
loadparm.c	Updated copyright to 1997.
locking.c	Updated copyright to 1997.
mangle.c	Updated copyright to 1997.
message.c	Updated copyright to 1997.
nameannounce.c

	Made use of WINS subnet explicit.
Added reset_announce_timer() so announcement
can be made immediately when we become a master.
Expanded code to do sync with dmb.

namebrowse.c

	Removed redundent checks for AM_MASTER in
sync code. Made use of WINS subnet explicit.

namedbname.c	Made use of WINS subnet explicit.
namedbresp.c	Made use of WINS subnet explicit.
namedbserver.c	Made use of WINS subnet explicit.

namedbsubnet.c

	Explicitly add workgroup to WINS subnet
when we become a dmb. Made use of WINS subnet explicit.

namedbwork.c

	Made use of WINS subnet explicit. Removed
redundent check_work_servertype() function.

nameelect.c

	Explicitly add workgroup to WINS subnet
when we become a master browser. Made use of WINS subnet explicit.

namelogon.c	Updated copyright to 1997.
namepacket.c	Updated copyright to 1997.
namequery.c	Updated copyright to 1997.

nameresp.c

	Made use of WINS subnet explicit. Made nmbd fail if
configured as master browser and one exists already.

nameserv.c

	Made use of WINS subnet explicit. Remove redundent
logon server and domain master code.

nameserv.h	Add emumerate subnet macros.
nameservreply.c	Made use of WINS subnet explicit.
nameservresp.c	Updated copyright to 1997.

namework.c

	Made use of WINS subnet explicit. Updated code to
add sync browser entries to add subnet parameter.

nmbd.c

	Added sanity check for misconfigured nmbd.

nmblib.c	Updated copyright to 1997.
nmblookup.c	Updated copyright to 1997.
nmbsync.c

	Removed redundent AM_ANY_MASTER check.

params.c	Updated copyright to 1997.
password.c	Updated copyright to 1997.
pipes.c		Updated copyright to 1997.
predict.c	Updated copyright to 1997.
printing.c	Updated copyright to 1997.

proto.h

	Changed protos for new nmbd code.

quotas.c	Updated copyright to 1997.
replace.c	Updated copyright to 1997.
reply.c		Updated copyright to 1997.
server.c	Updated copyright to 1997.
shmem.c		Updated copyright to 1997.
smb.h		Updated copyright to 1997.
smbencrypt.c	Updated copyright to 1997.
smbpasswd.c	Updated copyright to 1997.
smbrun.c	Updated copyright to 1997.
status.c	Updated copyright to 1997.
system.c	Updated copyright to 1997.
testparm.c	Updated copyright to 1997.
testprns.c	Updated copyright to 1997.
time.c		Updated copyright to 1997.
trans2.c	Updated copyright to 1997.
trans2.h	Updated copyright to 1997.
uid.c		Updated copyright to 1997.
username.c	Updated copyright to 1997.
util.c		Updated copyright to 1997.
version.h

	Changed to 1.9.17alpha1.
(This used to be commit cf23a155a1)
1997-05-08 01:14:17 +00:00
Andrew Tridgell
4eba893b02 - added comments to byteorder.h explaining how it works.
- fixed problem with installscripts if srcdir is not set
- fixed ptr init bug in interface.c
- changed default lookup type in nmblookup to match nbtstat under NT
- new quotas fixes for sunos and solaris
(This used to be commit e775576f02)
1996-06-08 04:33:37 +00:00
Samba Release Account
0e8fd33987 Initial version imported to CVS
(This used to be commit 291551d807)
1996-05-04 07:50:46 +00:00