1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

413 Commits

Author SHA1 Message Date
Stefan Metzmacher
ab4d635b92 r10504: - seperate implementation specific stuff, from the generic composite
stuff.
- don't use SMBCLI_REQUEST_* state's in the genreic composite stuff
- move monitor_fn to libnet.

NOTE: I have maybe found some bugs, in code that is dirrectly in DONE or ERROR
      state in the _send() function. I haven't fixed this bugs in this
      commit! We may need some composite_trigger_*() functions or so.
      And maybe some other generic helper functions...

metze
(This used to be commit 4527815a0a9b96e460f301cb1f0c0b3964c166fc)
2007-10-10 13:38:57 -05:00
Jelmer Vernooij
4be0ae794e r10456: More SCons fixes:
- Add framework for fallback generating code
 - Move pread / pwrite replacement functions to libreplace
 - Support pidl builds correctly
 - Support asn1 builds correctly
 - Move OS-specific checks to lib/replace/SConscript
(This used to be commit fbbfad0a1f7dedbf48e835a864f8285f283d72f3)
2007-10-10 13:38:48 -05:00
Jelmer Vernooij
6812c73534 r10348: Add scons scripts for remaining subsystems. Most subsystems build now,
but final linking still fails (as does generating files asn1, et, idl and proto
files)
(This used to be commit 4f0d7f75b99c7f4388d8acb0838577d86baf68b5)
2007-10-10 13:38:30 -05:00
Andrew Bartlett
00d69bdf23 r10148: Use samdb_base_dn() to find the local domain.
Andrew Bartlett
(This used to be commit 4969f86ac29aa1c4371a5cd01551f45c7fdb4cb2)
2007-10-10 13:38:03 -05:00
Jeremy Allison
5fd875ae74 r10138: Fix the mapping table (as tested in smbtorture). EXEC_ACCESS
should map to SEC_RIGHTS_FILE_READ, not READ|WRITE.
Jeremy.
(This used to be commit 26f63973e6207e3b5c3123f1326027ceac38966f)
2007-10-10 13:38:02 -05:00
Andrew Tridgell
89e550ba34 r9794: r11627@blu: tridge | 2005-08-30 22:55:27 +1000
fill in correct error code for zero length and too large IPC reads
(This used to be commit bf6558b8971ccda080d463753ddae977967e7093)
2007-10-10 13:35:02 -05:00
Jelmer Vernooij
b674411eb4 r9792: Rename StrCaseCmp -> strcasecmp_m. All these years I was thinking
StrCaseCmp was sys_strcasecmp, while it is in fact strcasecmp_m!
(This used to be commit 200a8f6652cb2de7a8037a7a4c2a204b50aee2b1)
2007-10-10 13:35:01 -05:00
Stefan Metzmacher
e987658582 r9517: fix compiler warning: status.v initialized variable used in line 375
tridge: what should be the correct error code?
        see rev 3239!

metze
(This used to be commit 27ec849718b97df2d6f30e2fbacaa0423e918862)
2007-10-10 13:34:25 -05:00
Alexander Bokovoy
20f7f49d7f r9478: Fix NTVFS POSIX module to work with EA and blkid after build system changes
(This used to be commit 4b89d7c7296dd7abd2d8bcd3f7b702de7314d9ff)
2007-10-10 13:34:20 -05:00
Andrew Tridgell
5d899b8a35 r9369: an attempt to fix the build on HPUX. This is based on work by Don
McCall, but takes a slightly different approach that I hope will be
more generic
(This used to be commit e8260a81cf99be2ccae64135ca0572c8a6ae62ad)
2007-10-10 13:33:28 -05:00
Alexander Bokovoy
ad9022e304 r9320: Fix premature dereference bug found by Coverty and also get rid of non-used memory context
(This used to be commit 127e06492a545940443c93e9aec66eebefa26dc2)
2007-10-10 13:33:24 -05:00
Stefan Metzmacher
3be75a4c6d r9240: - move struct security_token to the idl file, with this we can
the ndr_pull/push/print functions for it in the ntacl-lsm module

- fix compiler warnings in the ldap_encode_ndr_* code

metze
(This used to be commit 83d65d0d7ed9c240ad44aa2c881c1f07212bfda4)
2007-10-10 13:31:37 -05:00
Andrew Tridgell
94efb6f70e r9074: cope with a null ntvfs context in disconnect, so the destructor that
runs on a failed ntvfs init works
(This used to be commit dac0be64c7cef18f6740053b3e6fe9a25df40c88)
2007-10-10 13:31:14 -05:00
Andrew Tridgell
ba205b3143 r9054: removed incorrect paranoia check on opening streams (this caused RAW-STREAMS to fail)
(This used to be commit c164ee5b19f6880b7b5df8d8fb96704350432862)
2007-10-10 13:31:12 -05:00
Stefan Metzmacher
8e26f09433 r9031: don't use the global $LIBS variables for posix specific stuff
metze
(This used to be commit 51ab751c619bfa05a736853723f1aeda901a0b33)
2007-10-10 13:31:10 -05:00
Andrew Tridgell
6eb9567c3f r9009: directory not empty is not an error on failure to delete directory in delete on close
(This used to be commit dada509f5e374872cded9035611c9d4fd9f4c4c7)
2007-10-10 13:31:06 -05:00
Andrew Tridgell
5ef83290bc r9007: fixed error code for setting delete on close on a non-empty directory
(This used to be commit 320ab3c93b05a79b77dbbb85e9b038bb07848ba5)
2007-10-10 13:31:06 -05:00
Andrew Tridgell
8a94055deb r8753: fixed directory handling on systems that do not return . and .. as the
first two entries in a directory. This is what caused the FC3 system
shelob in the build farm to fail the RAW-UNLINK and RAW-SEARCH tests.
(This used to be commit f48abaaaca301c025ebd381f62345b3869809917)
2007-10-10 13:30:02 -05:00
Andrew Tridgell
b37e82567d r8535: no longer rely on seekdir working after a closedir. Instead, keep
directories open, but close search states based on an inactivity
timer, with a default of a 5 minute timeout
(This used to be commit 2e8d154e7dfb9b320a1344e957a39e96e1eefadd)
2007-10-10 13:29:36 -05:00
Love Hörnquist Åstrand
61edb97bdf r8394: Make sure the argument to ctype is*(3) macros are unsigned char as
required by ISO C99.
(This used to be commit 56fd21c806e816cf4c3d23881f26474f858b45e2)
2007-10-10 13:20:14 -05:00
Volker Lendecke
bb83629865 r8258: Release the opendb lock in pvfs_change_create_options.
Volker
(This used to be commit 2c4fd3ff99a4ade613030b3eb47d0ed527a95be3)
2007-10-10 13:19:26 -05:00
Andrew Tridgell
a703329908 r8122: more fixes from testing dos error code handling against w2k3
(This used to be commit b71fbcf5e2c627d918aef555b8cc8dd4591d8fe7)
2007-10-10 13:19:11 -05:00
Andrew Tridgell
afe376bfc7 r8120: added in the newly found DOS locking error codes into the pvfs backend
(This used to be commit d77b3820d16f60fb9119ac6eb70007363990b20d)
2007-10-10 13:19:11 -05:00
Andrew Tridgell
74942e1a11 r8107: now that we properly separate DOS and NT status codes all the places
that relied on the mapping need to be fixed. The first thing is to get
all the torture tests working against w2k3 again with nt status codes
enabled. The 2nd step will be to make them pass with nt status
disabled.

This starts on the first task, fixing the assumption that
NT_STATUS_INVALID_LOCK_SEQUENCE is a valid substitute for
ERRDOS:ERRbadaccess
(This used to be commit 87cdd117081193d215c5a9e3603438e058ad777b)
2007-10-10 13:19:08 -05:00
Andrew Tridgell
95a9d9aabf r8059: fixed handling of delete on close fir directories
(This used to be commit 14f51a99bccffac0ca284d1315ab6d4b10f3711f)
2007-10-10 13:19:04 -05:00
Stefan Metzmacher
8ab3f59a10 r8036: revert rev 8023/8024 as they have a bugs.
metze
(This used to be commit 66d6b1d5783cba98f2f8e1c8eed1bdc26a5bad4f)
2007-10-10 13:19:01 -05:00
Stefan Metzmacher
4e2ac8b458 r8024: avoid one memcpy in the ipc_trans dcesrv_output() callback
we now can reference the DATA_BLOB that is used inside the dcesrv subsystem

metze
(This used to be commit 078f42bc3f74c66b69c7f76005812b221d691f7a)
2007-10-10 13:19:00 -05:00
Stefan Metzmacher
8a300c9248 r8021: we only need to return STATUS_BUFFER_OVERFLOW for the ipc_trans replies
and not for the ipc_read() replies as here the client explicit says how much data it wants

the write_fn() in dcesrv_output() now returns NTSTATUS

and the ipc specific implementations are moved to the ntvfs_ipc module

metze
(This used to be commit fe483dcd874b7243d61e9623840c672b4ea06b2c)
2007-10-10 13:19:00 -05:00
Andrew Tridgell
173909efd5 r7931: fixed a bug in the cifs backend found with the new test code
(This used to be commit 447d5fcc1bdbdeaf2d96dbcace36b480b5a18c73)
2007-10-10 13:18:52 -05:00
Andrew Tridgell
bdee131f30 r7860: switch our ldb storage format to use a NDR encoded objectSid. This is
quite a large change as we had lots of code that assumed that
objectSid was a string in S- format.

metze and simo tried to convince me to use NDR format months ago, but
I didn't listen, so its fair that I have the pain of fixing all the
code now :-)

This builds on the ldb_register_samba_handlers() and ldif handlers
code I did earlier this week. There are still three parts of this
conversion I have not finished:

 - the ltdb index records need to use the string form of the objectSid
   (to keep the DNs sane). Until that it done I have disabled indexing on
   objectSid, which is a big performance hit, but allows us to pass
   all our tests while I rejig the indexing system to use a externally
   supplied conversion function

 - I haven't yet put in place the code that allows client to use the
   "S-xxx-yyy" form for objectSid in ldap search expressions. w2k3
   supports this, presumably by looking for the "S-" prefix to
   determine what type of objectSid form is being used by the client. I
   have been working on ways to handle this, but am not happy with
   them yet so they aren't part of this patch

 - I need to change pidl to generate push functions that take a
   "const void *" instead of a "void*" for the data pointer. That will
   fix the couple of new warnings this code generates.

Luckily it many places the conversion to NDR formatted records
actually simplified the code, as it means we no longer need as many
calls to dom_sid_parse_talloc(). In some places it got more complex,
but not many.
(This used to be commit d40bc2fa8ddd43560315688eebdbe98bdd02756c)
2007-10-10 13:18:44 -05:00
Jelmer Vernooij
66a52992ff r7850: Support mkdir() with just one parameter. Patch from
Steven Edwards <steven_ed4153@yahoo.com>.

I've moved the Win32-specific tests to win32.m4 so it does not
make any of the POSIX configure stuff more complicated.
(This used to be commit bf85fdd01552f75b745fdf3159a7a87cd6521ed2)
2007-10-10 13:18:42 -05:00
Andrew Tridgell
5e40d0187b r7795: use a share specific allocation rounding
(This used to be commit 9adacb0d1620d4cfadd515239b853977cf03a719)
2007-10-10 13:18:37 -05:00
Andrew Tridgell
51b1451cba r7792: make the allocation size rounding in pvfs configurable
(This used to be commit 1f35642bed1129d0834906b3e94e8868992d6eb9)
2007-10-10 13:18:36 -05:00
Volker Lendecke
9105bf4054 r7621: Trivial reformatting while trying to understand share modes. Still survives
smbtorture *DENY* .

Volker
(This used to be commit da78ed1a4d1f7966d8013278436a710d258879e1)
2007-10-10 13:18:14 -05:00
Andrew Tridgell
f29b9278bb r7557: trigger a probe at tconx time to see if xattrs are really supported by
the filesystem
(This used to be commit 71e281ae2fe2ce169aeb09f72376a60d28845808)
2007-10-10 13:18:08 -05:00
Stefan Metzmacher
bda75f7e90 r7488: update the mode in the struct too,
that fixes the RAW-RENAME test

metze
(This used to be commit e27c1ab89b21726d3c9e7f8f7af22d1ff38f2413)
2007-10-10 13:17:59 -05:00
Andrew Tridgell
70656780ad r7459: fixed pvfs for the RAW-MUX test
when you cancel a lock, w2k3 gives NT_STATUS_FILE_LOCK_CONFLICT not
NT_STATUS_CANCELLED. Strange.
(This used to be commit a4f17fcd9218f16b6cc166b2f797e8889d6f63f4)
2007-10-10 13:17:55 -05:00
Stefan Metzmacher
0f8d452ca0 r7458: don't look at components[-1] :-)
we now survive the RAW-UNLINK test without crashing

metze
(This used to be commit c2149963911bf95892e732b744f244fd76ff88c8)
2007-10-10 13:17:55 -05:00
Andrew Tridgell
6a70164fe0 r7361: fixed the 'file becomes a directory' bug that marc kapland found.
Thanks Marc!
(This used to be commit d1c5eb3693b77b3eb7527dc2758a6ea75a100376)
2007-10-10 13:17:46 -05:00
Andrew Tridgell
bf1ffa283c r7294: implemented the irpc messaging system. This is the core of the
management system I proposed on samba-technical a couple of days
ago. Essentially it is a very lightweight way for any code in Samba to
make IDL based rpc calls to anywhere else in the code, without the
client or server having to go to the trouble of setting up a full rpc
service.

It can be used with any of our existing IDL, but I expect it will
mostly be used for a new set of Samba specific management calls.

The LOCAL-IRPC torture test demonstrates how it can be used by calling
the echo_AddOne() call over this transport.
(This used to be commit 3d589a09954eb8b318f567e1150b0c27412fb942)
2007-10-10 13:17:37 -05:00
Alexander Bokovoy
46727924a0 r6599: Fix formating using 'linux' C style
Fix memory handling for blkid caches which need to be cleared when session is
done.
(This used to be commit c623cc60541f747f0a801eb77d97bb0a3bb6956f)
2007-10-10 13:16:29 -05:00
Alexander Bokovoy
1199f5f561 r6597: Make use of libblkid (part of e2fsprogs) for reporting volume GUID, if possible.
Implement smbclient's 'fsinfo' comand family which allows you to query file
system information in all known levels.
(This used to be commit 660d6e3915d0539dd78c77df6707ea84edb4d509)
2007-10-10 13:16:29 -05:00
Andrew Tridgell
289bc557eb r6580: fixed the bug that caused the truncation of the main file on a stream
open with openx and the 'truncate if exists' flag
(This used to be commit aa82b105d5871b3ca693a0757bb48cc589d88824)
2007-10-10 13:16:27 -05:00
Andrew Tridgell
3716deee4c r6579: improved the handling of lock timeouts and cancels in the pvfs locking
code. On lock cancel don't retry the lock.
(This used to be commit dffeb3c3d44d1b837a6036c47eb809ce1bd53b22)
2007-10-10 13:16:27 -05:00
Andrew Tridgell
d9c15b0f28 r6342: fixed a bad union assumption that caused ACLs to fail on 64 bit machines
Thanks to lars and agruen for finding this
(This used to be commit 2acc06918574b1178eecf3d61026f84f85bb40e1)
2007-10-10 13:11:33 -05:00
Richard Sharpe
c46c6e23ba r6229: Back out these changes ...
(This used to be commit 321fbae51267153102e47845736f2c3a5abfe0be)
2007-10-10 13:11:28 -05:00
Richard Sharpe
66a3750b14 r6219: This change allows us to fall back to authenticating without
DCERPC_SCHANNEL_128 if we fail. Thus, it allows us to work with Windows
NT DCs ...
(This used to be commit 3034b226705c4736d57c9bf4e9470c4d44c72e8e)
2007-10-10 13:11:27 -05:00
Andrew Bartlett
2eb3d68062 r6028: A MAJOR update to intergrate the new credentails system fully with
GENSEC, and to pull SCHANNEL into GENSEC, by making it less 'special'.

GENSEC now no longer has it's own handling of 'set username' etc,
instead it uses cli_credentials calls.

In order to link the credentails code right though Samba, a lot of
interfaces have changed to remove 'username, domain, password'
arguments, and these have been replaced with a single 'struct
cli_credentials'.

In the session setup code, a new parameter 'workgroup' contains the
client/server current workgroup, which seems unrelated to the
authentication exchange (it was being filled in from the auth info).

This allows in particular kerberos to only call back for passwords
when it actually needs to perform the kinit.

The kerberos code has been modified not to use the SPNEGO provided
'principal name' (in the mechListMIC), but to instead use the name the
host was connected to as.  This better matches Microsoft behaviour,
is more secure and allows better use of standard kerberos functions.

To achieve this, I made changes to our socket code so that the
hostname (before name resolution) is now recorded on the socket.

In schannel, most of the code from librpc/rpc/dcerpc_schannel.c is now
in libcli/auth/schannel.c, and it looks much more like a standard
GENSEC module.  The actual sign/seal code moved to
libcli/auth/schannel_sign.c in a previous commit.

The schannel credentails structure is now merged with the rest of the
credentails, as many of the values (username, workstation, domain)
where already present there.  This makes handling this in a generic
manner much easier, as there is no longer a custom entry-point.

The auth_domain module continues to be developed, but is now just as
functional as auth_winbind.  The changes here are consequential to the
schannel changes.

The only removed function at this point is the RPC-LOGIN test
(simulating the load of a WinXP login), which needs much more work to
clean it up (it contains copies of too much code from all over the
torture suite, and I havn't been able to penetrate its 'structure').

Andrew Bartlett
(This used to be commit 2301a4b38a21aa60917973451687063d83d18d66)
2007-10-10 13:11:15 -05:00
Andrew Bartlett
79f6bcd5ae r5988: Fix the -P option (use machine account credentials) to use the Samba4
secrets system, and not the old system from Samba3.

This allowed the code from auth_domain to be shared - we now only
lookup the secrets.ldb in lib/credentials.c.

In order to link the resultant binary, samdb_search() has been moved
from deep inside rpc_server into lib/gendb.c, along with the existing
gendb_search_v().  The vast majority of this patch is the simple
rename that followed,

(Depending on the whole SAMDB for just this function seemed pointless,
and brought in futher dependencies, such as smbencrypt.c).

Andrew Bartlett
(This used to be commit e13c671619bd290a8b3cae8555cb281a9a185ee0)
2007-10-10 13:11:12 -05:00
Andrew Bartlett
df64302213 r5902: A rather large change...
I wanted to add a simple 'workstation' argument to the DCERPC
authenticated binding calls, but this patch kind of grew from there.

With SCHANNEL, the 'workstation' name (the netbios name of the client)
matters, as this is what ties the session between the NETLOGON ops and
the SCHANNEL bind.  This changes a lot of files, and these will again
be changed when jelmer does the credentials work.

I also correct some schannel IDL to distinguish between workstation
names and account names.  The distinction matters for domain trust
accounts.

Issues in handling this (issues with lifetime of talloc pointers)
caused me to change the 'creds_CredentialsState' and 'struct
dcerpc_binding' pointers to always be talloc()ed pointers.

In the schannel DB, we now store both the domain and computername, and
query on both.  This should ensure we fault correctly when the domain
is specified incorrectly in the SCHANNEL bind.

In the RPC-SCHANNEL test, I finally fixed a bug that vl pointed out,
where the comment claimed we re-used a connection, but in fact we made
a new connection.

This was achived by breaking apart some of the
dcerpc_secondary_connection() logic.

The addition of workstation handling was also propogated to NTLMSSP
and GENSEC, for completeness.

The RPC-SAMSYNC test has been cleaned up a little, using a loop over
usernames/passwords rather than manually expanded tests.  This will be
expanded further (the code in #if 0 in this patch) to use a newly
created user account for testing.

In making this test pass test_rpc.sh, I found a bug in the RPC-ECHO
server, caused by the removal of [ref] and the assoicated pointer from
the IDL.  This has been re-added, until the underlying pidl issues are
solved.
(This used to be commit 824289dcc20908ddec957a4a892a103eec2da9b9)
2007-10-10 13:11:07 -05:00