1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-25 00:23:52 +03:00
Commit Graph

738 Commits

Author SHA1 Message Date
Andrew Bartlett
77473d2ef9 r18779: Not simo's fault, this is actually a bug I introduced a week ago, when I fixed the previous bug in this code.
We need to remove fragments from the incoming fragment list, or else
we leak (actually, we walk free()'ed data as we add/remove elements).

Andrew Bartlett
2007-10-10 14:19:11 -05:00
Andrew Bartlett
9ce88a8917 r18775: Performing an ldb op of 'do nothing' is pointless, and breaks against
OpenLDAP.

Andrew Bartlett
2007-10-10 14:19:10 -05:00
Simo Sorce
be2f4a2c44 r18740: Some more work around srvsvc 2007-10-10 14:19:06 -05:00
Simo Sorce
2c035787d4 r18590: Some more work on the srvsvc pipe 2007-10-10 14:18:53 -05:00
Andrew Tridgell
1c0a3de398 r18584: found one of the fd leaks. The registry backend was using a
talloc(NULL, xxx) to allocate the registry context. That had two
consequences

1) it was a massive memory leak, as all winreg operations leaked their
   entire context (including an open ldb database) every time

2) event_context_find() never found the exsting event context, so we
   used a new event context each time, which called epoll_create()
   each time, which caused a fd to be allocated
2007-10-10 14:18:52 -05:00
Andrew Tridgell
555aed43ba r18566: fixed the winreg pipe and winreg tests
Jerry, there is a big difference on the wire between these two:

  [out] uint32 x;
and
  [out] uint32 *x;

if you change from

  [out] uint32 x;

then you need to change to:

  [out,ref] uint32 *x;

otherwise it changes the format on the wire, which means we are no
longer compatible with MS servers.

but be aware that even if you change to a ref ptr, you also need to
change all the client code to set all the return variables in the out
part of the structure. That's why I don't like the MIDL restriction of
forcing the use of ref pointers for output variables - it makes life
much harder when writing client code, and makes the code much more
error prone (just look at all the extra code needed to make this work
again).

I know we could auto-allocate these variables in the generated client
side NDR code, but if we did that then we would have no way of doing a
_real_ ref out pointer, which we really wanted to set to some already
allocated variable.

So please hold off on changing our idl to use the MIDL convention for
output variables until Jelmer and I have had a good "chat" about this :-)
2007-10-10 14:18:47 -05:00
Jelmer Vernooij
ab0a798c57 r18565: Fix echo.idl to be Samba3-, MIDL and midlc compatible 2007-10-10 14:18:47 -05:00
Gerald Carter
694677dafe r18561: Fix [out] pointers in winreg IDL 2007-10-10 14:18:46 -05:00
Simo Sorce
4daf5f7764 r18558: Fix ShareCheck which was assuming all paths are "C:\"
Also cope with the fact that we define the FSTYPE as NTFS by default.
We never use this anywhere else, so we may just change it, but just
detect the fact and return DISK in share_classic for now.
2007-10-10 14:18:46 -05:00
Stefan Metzmacher
d9137edbdb r18555: use C:\ as default not C:
metze
2007-10-10 14:18:45 -05:00
Simo Sorce
60076fa87d r18550: Return a path not just a disk drive 2007-10-10 14:18:45 -05:00
Simo Sorce
ae2f6d4a5a r18542: Some late nite work.
Now we can add and remove a share from the "Computer Management"
console (not yet modify!) usinf share backend = ldb
2007-10-10 14:18:44 -05:00
Andrew Bartlett
5525baf521 r18416: We need to look for both builtinDomain and domain, in the OpenDomain call.
Andrew Bartlett
2007-10-10 14:18:25 -05:00
Simo Sorce
906429834a r18412: Implement NetiNameValidate but just for share name right now (type 9)
Simo.
2007-10-10 14:18:25 -05:00
Andrew Bartlett
6419ef09b1 r18409: Make sure to print a DEBUG message if this LDB search fails.
Andrew Bartlett
2007-10-10 14:18:24 -05:00
Andrew Bartlett
27259f3632 r18365: When adding a new structure member, always remember to fragment it.
Andrew Bartlett
2007-10-10 14:18:19 -05:00
Andrew Bartlett
4380bcaaee r18364: Get us closer to schema compliance. The corrent names for "secret"
and "priorSecret" are "currentValue" and "priorValue".

With this, we pass RPC-LSA against OpenLDAP.

Andrew Bartlett
2007-10-10 14:18:19 -05:00
Andrew Bartlett
a0162e0ace r18363: Found a rather nasty bug in our fragment handling.
We were adding packet fragments onto the *reply* queue, not the
recieve queue.  This worked, as long as we got a whole packet before
we did any reply work, but failed once the backend called a remote
LDAP server (and I presume something invoked the event loop).

Andrew Bartlett
2007-10-10 14:18:19 -05:00
Andrew Bartlett
35b69bc5f4 r18362: Make LookupSids map onto LookupSids2, as they both take a policy
handle.  Avoids a lookup for the basic domain information for every
request.

Andrew Bartlett
2007-10-10 14:18:18 -05:00
Andrew Bartlett
5fa9e96bd0 r18361: Invert the way we handle LookupSids2/LookupSids3 and LookupNames3/LookupNames4
The latter calls don't supply a policy handle

The latter calls now acquire a policy handle, then call the earlier
calls.  This means we still share the codepaths, but don't need to
fetch policy state when it is already provided.

Andrew Bartlett
2007-10-10 14:18:18 -05:00
Andrew Tridgell
cc86719f53 r18330: don't mix pointer types in RPC replies 2007-10-10 14:18:10 -05:00
Simo Sorce
1347c971ac r18318: Implement DiskEnum
Fix spelling and consistencies issues in idl
2007-10-10 14:18:08 -05:00
Simo Sorce
1962fb92d7 r18315: Implement netSrvGetInfo level 102
fix names to be consistent between level 101 and 102 and typo in idl
2007-10-10 14:18:07 -05:00
Andrew Tridgell
4860d02565 r18280: more portability tidyups, ensuring we use libreplace everywhere 2007-10-10 14:18:00 -05:00
Andrew Bartlett
8cddcdb7c7 r18252: Make sure to NULL terminate these lists of attributes.
Andrew Bartlett
2007-10-10 14:17:56 -05:00
Andrew Bartlett
e09dd33379 r17991: Implement a few more calls (with not implemented :-).
Remove references to dnsDomain, replace with references to dnsRoot

Andrew Bartlett
2007-10-10 14:17:02 -05:00
Andrew Bartlett
ce36069765 r17983: Use the UTF8-correct strcasecmp_m call for sorting these entries,
which has been recently fixed to cope with NULL pointers (fix segfault
on Solaris).

Andrew Bartlett
2007-10-10 14:17:01 -05:00
Andrew Bartlett
6a54711564 r17968: Consolidate the DSSETUP and LSA pipes into a single file, as DSSETUP
is just one call.

This simplifies the one remaining DSSETUP call, and removes another
user of the dnsDomain attribute.

Andrew Bartlett
2007-10-10 14:16:59 -05:00
Andrew Bartlett
3f3fa7f466 r17956: LSA Cleanup!
This commit cleans up a number of aspects of the LSA interface.

Firstly, we do 2 simple searches on opening the LSA policy, to obtain
the basic information we need.  This also avoids us searching for
dnsDomain (an invented attribute).

While I was at it, I added and tested new LSA calls, including the
enumTrustedDomainsEx call.  I have also merged the identical structures
lsa_DomainInformation and lsa_DomainList.

Also in this commit: Fix netlogon use of uninitialised variables.

Andrew Bartlett
2007-10-10 14:16:57 -05:00
Jelmer Vernooij
f7afa1cb77 r17930: Merge noinclude branch:
* Move dlinklist.h, smb.h to subsystem-specific directories
 * Clean up ads.h and move what is left of it to dsdb/
   (only place where it's used)
2007-10-10 14:16:54 -05:00
Andrew Tridgell
09007b0907 r17824: add a wrapper for the common partitions_basedn calculation 2007-10-10 14:16:45 -05:00
Andrew Tridgell
a5ea749f0a r17823: get rid of most of the samdb_base_dn() calls, as they are no longer
needed in searches
2007-10-10 14:16:45 -05:00
Stefan Metzmacher
00fcc4f16a r17788: fix compiler warnings
metze
2007-10-10 14:16:42 -05:00
Stefan Metzmacher
f20e251bfd r17586: merge lib/netif into lib/socket and use -lnsl -lsocket on the
configure check for the interfaces.

should fix the build on some old sun boxes

metze
2007-10-10 14:15:39 -05:00
Andrew Bartlett
9c1cd9c2c6 r17529: Simo doesn't like the use of the internal ldb_errstring in functions
not used purely as ldb module helper functions.  This now passes these
strings back as explicit parameters.

Andrew Bartlett
2007-10-10 14:15:33 -05:00
Simo Sorce
ad75cf8695 r17516: Change helper function names to make more clear what they are meant to do 2007-10-10 14:15:31 -05:00
Stefan Metzmacher
679ac74e71 r17341: pass a messaging context to auth_context_create()
and gensec_server_start().

calling them with NULL for event context or messaging context
is no longer allowed!

metze
2007-10-10 14:15:17 -05:00
Stefan Metzmacher
0d7f16d7be r17340: initialize elements od dcesrc_call_state in one central place
and pass the messaging context to the call

metze
2007-10-10 14:15:16 -05:00
Stefan Metzmacher
e4c28001d3 r17265: some reformatting
metze
2007-10-10 14:10:25 -05:00
Simo Sorce
a89cc346b9 r17206: Add a modular API for share configuration.
Commit the classic backwards compatible module which is the default one
2007-10-10 14:10:18 -05:00
Stefan Metzmacher
04f0d3d031 r16950: remove the smb mid from the ntvfs layer and keep a list of pending
requests on the smbsrv_connection, to be able to match then on
ntcancel

metze
2007-10-10 14:10:02 -05:00
Andrew Bartlett
10eeea6da4 r16827: Factor out some code into common samdb functions:
- creation of ForeignSecurityPrincipals
 - template duplication code

Rework much of the LSA server to pass the RPC-LSA test.  Much of the
server code was untested.  In implementing the LSA Accounts feature, I
have opted to have it only create entires when privilages are applied,
and not to delete entries, but to delete the privilages.

We skip some parts of the test, but it is much better than not testing
it at all.

Andrew Bartlett
2007-10-10 14:09:48 -05:00
Günther Deschner
ca5e133e8c r16796: Fill in dsr_GetMemberships() / dsr_GetMemberships2().
This intersting call is apparently used to construct the user token,
collect memberships from other DSAs and to retrieve (nested) memberships
of a given group.

Torture test to follow (once I cleaned it up).

Guenther
2007-10-10 14:09:46 -05:00
Andrew Bartlett
01d25c9d6c r16794: Make Samba4 pass it's own RPC-SAMR test, at least in part. There are
still a couple of unimplemented functions, but this is far better than
not testing this at all.  In particular, this exercises the
password_hash module.

Specific changes:
 - Add support for SetDomainInfo
 - Add many more info levels to QueryDomainInfo
 - Set a domain comment in RPC-SAMR, and verify it is kept
 - Refactor QueryUserInfo not to always serach for all attributes
 - Add QueryDiplayInfo3 and QueryDomainInfo2 as aliased calls
 - Make OemChangePassword2 search under the samdb_base_dn(), so it
   finds the user when partitions are active.
 - Skip SetSecurity, DisplayIndex, MemberAttributesOfGroup and
  'Multiple' alias operations in RPC-SAMR for Samba4
 - Add RPC-SAMR as a 'slow' RPC test (it is quite slow)

Andrew Bartlett
2007-10-10 14:09:46 -05:00
Andrew Bartlett
c50095efab r16773: Fix one more RPC-SAMR test (an alias level), and make it clear that
the unknown value in the samr_GroupInfo structures are the group
attributes.

Andrew Bartlett
2007-10-10 14:09:45 -05:00
Andrew Bartlett
fee0716143 r16772: Clarify comment.
Andrew Bartlett
2007-10-10 14:09:45 -05:00
Stefan Metzmacher
9a685c5bef r16523: pass spoolss_XcvData calls to the ntptr backends...
I wrote this code last year and found it in a working tree...

metze
2007-10-10 14:09:32 -05:00
Andrew Bartlett
abf104a0d7 r16262: Another basedn fix.
Andrew Bartlett
2007-10-10 14:09:08 -05:00
Andrew Bartlett
c4ab9e8a75 r16236: Add a proper baseDN to a large number of queries. Searching the NULL
baseDN won't work once the partitions module is loaded.

Andrew Bartlett
2007-10-10 14:09:07 -05:00
Andrew Bartlett
81f3cd1c45 r16166: Remove hexidecimal constants from the Samba4 provision files.
This change is required for compatibility with the OSX client, in
particular, but returning 0x80000002 rather than -2147483646 violates
what LDAP clients expect in general.

Andrew Bartlett
2007-10-10 14:09:03 -05:00