1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00
Commit Graph

63533 Commits

Author SHA1 Message Date
Simo Sorce
5e576a53ab s3:lib make server contexts generic
Pair-programmed-with: Andreas Schneider <asn@samba.org>
2010-06-10 17:30:45 -04:00
Jeremy Allison
aeb25ad0b8 Fix the build in the non WITH_AIO case (sorry). 2010-06-10 14:28:55 -07:00
Björn Jacke
a8c051b2f9 s3: readd h_errno struct member but rename it
as pointed out by metze this is a structure of fixed size, which should not be
changed.
2010-06-10 23:22:49 +02:00
Rusty Russell
b53f8c187d Since idtree assigns sequentially, it rarely reaches high numbers.
But such numbers can be forced with idr_get_new_above(), and that
reveals two bugs:

1) Crash in sub_remove() caused by pa array being too short.
2) Shift by more than 32 in _idr_find(), which is undefined, causing
   the "outside the current tree" optimization to misfire and return NULL.
2010-06-10 13:27:51 -07:00
Jeremy Allison
321d7a6303 Implement AIO in SMB2. Doesn't allow cancel calls yet (to be added).
Jeremy.
2010-06-10 13:20:37 -07:00
Jeremy Allison
edd8940e18 Ensure we correctly setup req->subreq before testing for async. Stops crashes when
XX_send functions set async to stop interim replies being sent.

Jeremy.
2010-06-10 13:19:25 -07:00
Jeremy Allison
b5638a0560 Don't use the autofree context for the globals. This causes child smbd's forked
by modules to crash due to destructors being called (found when using the vfs_aio_fork
module with smb2).

Jeremy.
2010-06-10 13:17:35 -07:00
Simo Sorce
405a0c558c s3:cleaunp reformatting for readability 2010-06-10 14:57:06 -04:00
Simo Sorce
446deb0082 s3:cleanup remove trailing spaces 2010-06-10 14:56:59 -04:00
Björn Jacke
ec94efb79d s3: fix build on HP-UX
this struct member h_errno is not used in the HP-UX code paths, it was just
there because Solaris has it, too. As h_errno is a function call macro on HP-UX
when thread support is enabled we run into trouble here. Just commenting it out
should be okay as we don't use it anyway.
2010-06-10 17:24:18 +02:00
Matthias Dieter Wallnöfer
bdd83c0639 s4:ldap.py - add testcase which demonstrates the reset of the "primaryGroupID" 2010-06-10 16:22:09 +02:00
Matthias Dieter Wallnöfer
d604d49939 s4:samldb LDB module - fix up the case when the old and new "primaryGroupID" are the same 2010-06-10 16:22:09 +02:00
Matthias Dieter Wallnöfer
13ca999b3b s4:samldb LDB module - don't create multiple "ac" module contexts on modify operations
Since we do now run sequentially through all checks we don't need multiple "ac"
contexts anymore.
2010-06-10 16:22:08 +02:00
Matthias Dieter Wallnöfer
9f95298864 s4:dcesrv_samr_Add/DeleteAliasMember - provide better NTSTATUS return codes when something didn't work 2010-06-10 16:22:08 +02:00
Matthias Dieter Wallnöfer
7374cd0358 s4:dcesrv_samr_GetAliasMembership - fix type of counter variables 2010-06-10 16:22:07 +02:00
Matthias Dieter Wallnöfer
34b43a8642 s4:dcesrv_samr_DeleteAliasMember - add more braces to fit better the coding styles 2010-06-10 16:22:07 +02:00
Matthias Dieter Wallnöfer
305f2c7043 s4:dcesrv_samr_AddAliasMembership - Merge the two error blocks into one 2010-06-10 16:22:07 +02:00
Matthias Dieter Wallnöfer
13b1f7a2b3 s4:dcesrv_samr_Add/DelGroupMember - remove the account type check
MS-SAMR 3.1.5.8 speaks from accounts which are not necessarely only users.
2010-06-10 16:22:06 +02:00
Matthias Dieter Wallnöfer
f95634dbe0 s4:dcesrv_samr_AddGroupMember - also the error code "LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS" is allowed
This is returned when the group is the primary group of the specified entry.
2010-06-10 16:22:06 +02:00
Matthias Dieter Wallnöfer
1305c91598 s4:samba_dsdb LDB module - move the "objectclass_attrs" module back
I think it should be lower in order to control also the "instanceType" module.
2010-06-10 16:22:06 +02:00
Matthias Dieter Wallnöfer
c1b4ccb23b s4:ldap.py - add a test to demonstrate the 'instanceType' behaviour 2010-06-10 16:22:05 +02:00
Matthias Dieter Wallnöfer
0a41b7e95b s4:instancetype LDB module - prevent all types of "instanceType" manipulation
Also on Windows Server you aren't able to change it.
2010-06-10 16:22:05 +02:00
Volker Lendecke
f66cc82709 s3: Fix EnumDomainAliases when no aliases are in LDAP
We used to return NT_STATUS_ACCESS_DENIED, now we just return 0 entries, just
like W2k8 does.

usrmgr.exe was pretty unhappy with the NT_STATUS_ACCESS_DENIED
2010-06-10 15:28:26 +02:00
Michael Adam
ba809ecb8a s3:pdb_ldap: fix bug 7505 - init_sam_from_ldap stores group in sid2uid cache 2010-06-10 12:02:05 +02:00
Volker Lendecke
1819beb088 s3: Add a dummy test to prove the maxfd calculation
To be run in a debugger, there's no way to inspect the internal tevent_select.c
maxfd calculation
2010-06-10 11:24:00 +02:00
Volker Lendecke
7f29f817fa tevent: Fix maxfd calculation in tevent_select
When doing

        fd1 = tevent_add_fd(ev, ev, 2, 0, NULL, NULL);
        fd2 = tevent_add_fd(ev, ev, 3, 0, NULL, NULL);
        TALLOC_FREE(fd2);
        fd2 = tevent_add_fd(ev, ev, 1, 0, NULL, NULL);

we end up with select_ev->maxfd==1. This is wrong.

An alternative fix might be to make select_ev->maxfd an unsigned int and make
EVENT_INVALID_MAXFD==UINT_MAX. But in theory we might end up with an fd of
UINT_MAX.

std_event_add_fd() contains exactly the same piece of code, so I'm directly
pushing it.

Volker
2010-06-10 11:24:00 +02:00
Karolin Seeger
9fdb69ebcd s3-smbd: Fix typo in comment.
Karolin
2010-06-10 10:35:56 +02:00
Karolin Seeger
8ca88e2f81 s3-passdb: Fix typo in comment.
Karolin
2010-06-10 10:34:58 +02:00
Jeremy Allison
d28fa8faab Rename "allow_smb2" -> "using_smb2" and make the usage clearer. 2010-06-09 19:12:02 -07:00
Jeremy Allison
3c0eead9fd Split out the "finished write processing" code into a function so it can be called
by both sync and async code.

Jeremy.
2010-06-09 17:09:11 -07:00
Jeremy Allison
efd0c35a7e Ensure we don't send SMB1 keepalives on an SMB2 connection.
Jeremy.
2010-06-09 17:08:41 -07:00
Jeremy Allison
09e74b675f Split out the "finished read processing" code into a function so it can be called
by both sync and async code.

Jeremy.
2010-06-09 10:48:12 -07:00
Andreas Schneider
95047bc717 s3-winbind: Fixed setting default sequence number. 2010-06-09 16:17:46 +02:00
Björn Jacke
6a6bb768c6 s3: fix calculation of st_blocks in streams_xattr
Thanks to Joachim Schmitz for finding that miscalculation.
2010-06-09 15:27:38 +02:00
Björn Jacke
687c42ee65 s3: fix calculation of st_blocks in init_stat_ex_from_stat
this is just relevant for the very rare systems that don't have the st_blocks
struct member. This is a fixup of the fix for bug 7474.

Thanks to Joachim Schmitz for spotting this!
2010-06-09 15:27:38 +02:00
Nadezhda Ivanova
8823bdc7e2 Added guids for the validated writes. 2010-06-09 12:03:32 +03:00
Volker Lendecke
1fd15dcb7c s3: Fix bug 7253
acct_ctrl is 32 bit in LOGIN_CACHE, but "w" as a format specifier for
tdb_unpack only writes 16 bits. Okay on x86, not okay on Solaris.

Thanks to Vladimir.Marek@Sun.COM!

Volker
2010-06-09 10:27:17 +02:00
Jeremy Allison
34a8324409 Fix a valgrind error found by SMB2-COMPOUND test.
If a file is closed we must also NULL out all chained_fsp
pointers when the fsp is freed to prevent invalid pointer
access.

Jeremy.
2010-06-08 21:20:07 -07:00
Jeremy Allison
0c5d0e1c37 Second part of fix for 7501 - SMB2: CREATE request replies getting mangled.
Based on code from Ira Cooper <samba@ira.wakeful.net>, and also
advice on refactoring the patch into a function call. outbuf vectors
can be reallocated by smb2 processing code, so when returning interim
responses we must not make assumptions about vector size.

Jeremy
2010-06-08 17:44:05 -07:00
Ira Cooper
fd9e02d5f3 Fix for bug 7501 - SMB2: CREATE request replies getting mangled.
Code for dup_smb2_req() was duplicating the wrong vector (i, instead
of i+2) when returning a non-minimal SMB2 response.
2010-06-08 11:20:23 -07:00
Günther Deschner
aeacb023b9 s3-selftest: disable domain creds smbclient_s3 tests for now.
Not sure they were ever working before.

With this patch, make selftest is down to 4 failures from 259 tests.

(two times LOCK9 from s3 smbtorture, one spoolss notify test and
samba3.posix_s3.unix.info2).

Guenther
2010-06-08 15:47:04 +02:00
Günther Deschner
575b1018c6 s3-netdomjoin-gui: Fix Bug #7500. Fix 'not a string literal' warning in netdomjoin-gui.
Patch from Buchan Milne <bgmilne@mandriva.org>.

Thanks!

Guenther
2010-06-08 12:27:29 +02:00
Volker Lendecke
7a7f28d96d Revert "s3:smbd Fix segfault if register_existing_vuid() fails"
This reverts commit 8f1cec5faf.
2010-06-08 11:38:08 +02:00
Volker Lendecke
3e502159c7 Revert "s3:smbd Give the kerberos session key a parent"
This reverts commit 4a7f45b7e1.
2010-06-08 11:38:08 +02:00
Volker Lendecke
34b29b1198 Revert "s3:auth Change auth_ntlmssp_server_info API to return NTSTATUS"
This reverts commit edba46ce94.

Conflicts:

	source3/auth/auth_ntlmssp.c
2010-06-08 11:38:08 +02:00
Günther Deschner
984fec252a s3-waf: fix the the waf build.
Guenther
2010-06-08 10:56:41 +02:00
Jeremy Allison
096a3d3eea Make aio_ex owned by a talloc context, not neccessarily on the null context. 2010-06-07 16:26:30 -07:00
Jeremy Allison
d70413fa0c Move "write_though" into aio_ex struct. 2010-06-07 16:25:18 -07:00
Simo Sorce
5da783f4a7 s3:smbd add utility function to check if there are open pipes 2010-06-07 17:25:48 -04:00
Simo Sorce
f9fc4df0c0 s3:rpc make num_pipe_handles get an actual pipe as argument
Let the function abstract out how handles are counted
2010-06-07 17:25:48 -04:00