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

1140 Commits

Author SHA1 Message Date
Jelmer Vernooij
c7ace9b8ea r10839: Add some [ref] (required for ethereal and Samba3 parser generators)
(This used to be commit 5556deee30)
2007-10-10 13:39:34 -05:00
Andrew Tridgell
3a7e251f27 r10705: fixed a crash bug in the getdcname irpc server for winbind. The
problem was that the return string was declared as:

	[out] astring dcname

which means "this is a non-NULL string". The server code sometimes
returned NULL however (on getdc lookup failure), which caused the NDR
marshalling code to crash. When you declare a non-pointer return value
you are promising that the value can never be NULL.

The trivial fix is to use:

	[out] astring *dcname

which leaves the API alone, but includes a pointer in the wire format,
which in turn means it is valid to send a NULL string as a response.
(This used to be commit e39bac6196)
2007-10-10 13:39:22 -05:00
Andrew Tridgell
a872005c1c r10699: fixed the dcerpc code so that you can shutdown the pipe safely from
within a callback on the pipe. This should fix a problem volker
encountered with winbind. The fix invoolves making the recv_data
handler free the memory for a packet, instead of having the transport
layer free it after calling recv_data. When the transport layer freed
it, it had no way of knowing if the callback had shutdown the pipe, so
it had no way of knowing if it could safely use the pointer.

Also changed the pipe shutdown hook for the smb transport to use an
async SMB close. This ensures that when you shutdown the pipe, you
don't block waiting for the server to ack the close of the pipe fnum.
(This used to be commit c87d7f580e)
2007-10-10 13:39:21 -05:00
Volker Lendecke
e5c6a3e361 r10683: Samba3's wbinfo -t should give the correct answer now.
Tridge, if you have time, you might want to look at the segfault I was still
seeing. Now I store the handle to the netlogon pipe in the global winbind
state and free it on the next entry into check_machacc. The problem seems to
be that talloc_free()ing a pipe struct from within a callback function on that
pipe is not possible. I think I can live with that, but it has been not really
obvious. To reproduce the segfault you might want to look at putting a
talloc_free(state->getcreds->out.netlogon) into
wbsrv_samba3_check_machacc_receive_creds. This is called from a dcerpc
callback function.

In particular if the check failed it would be nice if I could delete the pipe
directly and not post a different event to some winbind queue.

I tried to delete the pipe from a timed event triggered immediately, but this
also fails because the inner loop seems to hit the same event again, calling
it twice.

Volker
(This used to be commit 5436d77648)
2007-10-10 13:39:18 -05:00
Volker Lendecke
aea73c168b r10681: Convert dcerpc_open_smb to a composite function.
Volker
(This used to be commit 42ff218ac9)
2007-10-10 13:39:18 -05:00
Stefan Metzmacher
7368af9e74 r10653: give unknown levels a name basicly the *2 levels mean
that the update or inform should be propagaded to all servers

metze
(This used to be commit 33c7c101c0)
2007-10-10 13:39:15 -05:00
Stefan Metzmacher
f1c5227078 r10637: use the correct memory context in the ndr_pull_* function
to build the talloc hierachie correct

metze
(This used to be commit afd9dda577)
2007-10-10 13:39:14 -05:00
Stefan Metzmacher
c2d7914428 r10627: - use a wrepl specific enum for the node type
- the unknown flag 0x10 seems to mean that this name was localy registered on this
  currently asked server, that flag is not present in replica records

metze
(This used to be commit ba3685c41d)
2007-10-10 13:39:13 -05:00
Stefan Metzmacher
c91fa5c504 r10610: forgot one file in the last commit:
make wrepl_nbt_name a scalar type that is another
wire representation of struct nbt_name

give wrepl_name->flags a meaning

metze
(This used to be commit 5fa13d6c2b)
2007-10-10 13:39:12 -05:00
Jelmer Vernooij
5058f4b9e8 r10586: Add MergedObject() builder. Default to Library() rather
then StaticLibrary()
(This used to be commit b53313dc51)
2007-10-10 13:39:08 -05:00
Volker Lendecke
9593101ec1 r10491: First step towards wbinfo -t: This issues a name request for the primary
domain and gets the DC's name via a mailslot call.

Metze, I renamed wbsrv_queue_reply to wbsrv_send_reply in accordance with
irpc_send_reply. Having _queue_ here and _send_ there is a bit confusing. And
as everything is async anyway, the semantics should not be too much of a
problem.

Volker
(This used to be commit 4637964b19)
2007-10-10 13:38:54 -05:00
Jelmer Vernooij
3d4ea18d4d r10478: More work on proto headers; we now generate a couple of smaller ones
that are then included by include/proto.h
(This used to be commit 703ffbaaac)
2007-10-10 13:38:52 -05:00
Jelmer Vernooij
b85f7857dc r10452: Couple of small scons updates - ignore .sconsign files
(This used to be commit b2d2b4f233)
2007-10-10 13:38:47 -05:00
Tim Potter
88b74af1d8 r10446: Add ndr_base and rpc_base sources to proto.h
Generate NDR mashalling code for all idl files (why isn't this automatically by the scanner when it finds librpc/gen_ndr/{misc,dcerpc,orpc}.h in includes.h?)
(This used to be commit 01eb22b9da)
2007-10-10 13:38:46 -05:00
Tim Potter
c715f7256a r10442: Build librpc/libndr_misc.a from librpc/idl/misc.idl. Doesn't quite work
yet as scons somehow thinks it needs to put a directory called ndr_idl
in the command line.
(This used to be commit e4a54a4c49)
2007-10-10 13:38:46 -05:00
Jelmer Vernooij
f3b412fbd6 r10438: Move portability functions to lib/replace/; replace now simply ensures
that a given set of (working) POSIX functions are available (without
prefixes to their names, etc). See lib/replace/README for a list.

Functions that behave different from their POSIX specification
(such as sys_select, sys_read, etc) have kept the sys_ prefix.
(This used to be commit 29919a7105)
2007-10-10 13:38:45 -05:00
Andrew Bartlett
51cbc188df r10402: Make the RPC-SAMLOGON test pass against Win2k3 SP0 again.
I still have issues with Win2k3 SP1, and Samba4 doesn't pass it's own
test for the moment, but I'm working on these issues :-)

This required a change to the credentials API, so that the special
case for NTLM logins using a principal was indeed handled as a
special, not general case.

Also don't set the realm from a ccache, as then it overrides --option=realm=.

Andrew Bartlett
(This used to be commit 194e8f07c0)
2007-10-10 13:38:39 -05:00
Tim Potter
d191c7d993 r10377: Save configuration stuff to sconf.cache so it isn't annoyingly run
at every single build.  Run 'scons configure=1' or delete sconf.cache
to force checks to be re-run.

Jelmer, I think this stuff is cached in the .sconf_cache directory but
the message is still displayed and it looks like it caches the compiled
test object file not the actual result of the test.
(This used to be commit 9d001dc083)
2007-10-10 13:38:33 -05:00
Andrew Tridgell
b963050769 r10368: when building the epm tower, don't put host names in the ip address
field, instead put a zero address. Note that zero is correct (ie. we
shouldn't do the lookup) as in the client we want to send a zero for
the server to fill in. When we make this call from the server we fill
in a real IP.
(This used to be commit e54c8b5658)
2007-10-10 13:38:32 -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 4f0d7f75b9)
2007-10-10 13:38:30 -05:00
Stefan Metzmacher
b7545608ad r10346: here are only real ip-addresses valid, prevent dns lookups,
when the input is invalid

metze
(This used to be commit 1083204c1f)
2007-10-10 13:38:30 -05:00
Stefan Metzmacher
efa30b073f r10339: fix ndr_push_udlongr
metze
(This used to be commit a34d0771ce)
2007-10-10 13:38:29 -05:00
Jelmer Vernooij
5b02ee9b9d r10336: Add sconscript for a couple more subsystems.
(This used to be commit 59d4450453)
2007-10-10 13:38:29 -05:00
Tim Potter
a9e08ba474 r10238: Add a entry for sec_info to treat it as a uint32 for now.
(This used to be commit 8a0a8d259d)
2007-10-10 13:38:10 -05:00
Tim Potter
74eea860ba r10184: Fix a stack of unhandled enumeration warnings.
(This used to be commit aeb42a446b)
2007-10-10 13:38:06 -05:00
Jelmer Vernooij
e841621c0b r10181: Fix the build
(This used to be commit 231d01a3e7)
2007-10-10 13:38:06 -05:00
Andrew Bartlett
ce7166752c r10171: This seems to work for encoding/decoding a PAC at the buffers only
level (required for signature verification).

Andrew Bartlett
(This used to be commit 76c224f288)
2007-10-10 13:38:05 -05:00
Andrew Bartlett
5edbeca141 r10153: This patch adds a new parameter to gensec_sig_size(), the size of the
data to be signed/sealed.  We can use this to split the data from the
signature portion of the resultant wrapped packet.

This required merging the gsskrb5_wrap_size patch from
lorikeet-heimdal, and fixes AES encrption issues on DCE/RPC (we no
longer use a static 45 byte value).

This fixes one of the krb5 issues in my list.

Andrew Bartlett
(This used to be commit e4f2afc343)
2007-10-10 13:38:04 -05:00
Andrew Bartlett
1757f8355c r10145: Allow a variable length signature, so we can support signing with
other than arcfour-hmac-md5.  Currently we still fail to verify other
signatures however.

Andrew Bartlett
(This used to be commit 2e5884fc24)
2007-10-10 13:38:03 -05:00
Stefan Metzmacher
0559bae277 r10141: if some of the LIBNDR_ALIGN_* flags and LIBNDR_FLAG_REMAINING are set,
ndr_pull_data_blob() doesn't work correct. so make them exclute each other.

jelmer, tridge: does that look correct? it fixes a problem, abartlet had
with krb5pac.idl, where the align flags are inherited from the parent, and we want to get the
[flag(NDR_REMAINING)] DATA_BLOB signature;

metze
(This used to be commit b9ea3e8f9f)
2007-10-10 13:38:02 -05:00
Stefan Metzmacher
9cd63ddb5d r10129: fix sinple ip's in wins replication, packets
metze
(This used to be commit 7492afa48d)
2007-10-10 13:38:01 -05:00
Stefan Metzmacher
9ad5c988a4 r10126: WREPL_REPL_UPDATE also takes a wrepl_table
metze
(This used to be commit b897ad39bb)
2007-10-10 13:38:01 -05:00
Stefan Metzmacher
eaa64265f9 r10085: decode level 5 and 9 too
(this is taken from the ethereal dissector)

metze
(This used to be commit c50f5fe33b)
2007-10-10 13:37:51 -05:00
Tim Potter
622b75f4dc r10048: Dissect a security_secinfo as a uint32 just to get the winreg
dissector compiling and linking.  It's really an enum defined in
security.idl.
(This used to be commit b62811afcb)
2007-10-10 13:36:33 -05:00
Tim Potter
10a160ac2d r10046: Don't generate any ethereal dissectors for security.idl
(This used to be commit 5b8b956887)
2007-10-10 13:36:33 -05:00
Günther Deschner
ad44611170 r9888: add IDL for lsa_QueryDomainInformationPolicy to query Kerberos Settings.
Guenther
(This used to be commit d717e878bd)
2007-10-10 13:36:20 -05:00
Stefan Metzmacher
f3c121eb74 r9797: - let us parse replication packets with linked attributes fine,
- also resolve the 0x1f ('member') attid for nicer debugging

metze
(This used to be commit f6cf38d608)
2007-10-10 13:35:02 -05:00
Stefan Metzmacher
172089214e r9795: fix the ndr_pull_string code to handle, some special cases,
where the idl was something like this:

uint32 size;
[size_is(size+1)] wchar_t *string;

we always need a pair of NDR_PULL_NEEDED_BYTES() and ndr_pull_advance(),
with the same size passed in.

metze
(This used to be commit 8eb75bd5ac)
2007-10-10 13:35:02 -05:00
Andrew Bartlett
24186a80eb r9728: A *major* update to the credentials system, to incorporate the
Kerberos CCACHE into the system.

This again allows the use of the system ccache when no username is
specified, and brings more code in common between gensec_krb5 and
gensec_gssapi.

It also has a side-effect that may (or may not) be expected: If there
is a ccache, even if it is not used (perhaps the remote server didn't
want kerberos), it will change the default username.

Andrew Bartlett
(This used to be commit 6202267f6e)
2007-10-10 13:34:54 -05:00
Tim Potter
43fbeed881 r9577: Fix some indentation.
(This used to be commit 2759c91b81)
2007-10-10 13:34:31 -05:00
Jelmer Vernooij
b42f358d51 r9576: Couple of small fixes. Generate notice indicating
that the parsers were autogenerated.
(This used to be commit a37e2134e6)
2007-10-10 13:34:30 -05:00
Andrew Tridgell
3eb52c6cd6 r9574: - made the sec_info fields in lsa and samr use a IDL bitmap
- fixed winreg_GetKeySecurity() to use a sec_info field correctly

- simplied the winreg torture code, removing the separate opens for
  each hive

- added torture cleanup code in winreg test

- added 'create with security descriptor' in the winreg torture test
(This used to be commit f20695decd)
2007-10-10 13:34:30 -05:00
Andrew Tridgell
649882d8d5 r9567: fixed the winreg IDL for CreateKey, including a security
descriptor. To keep it simple I just use normal IDL buffers for now,
avoiding the complex methods metze used in spoolss. We might change
that later

Also added decoding of the security_descriptor in
winreg_GetKeySecurity() in smbtorture
(This used to be commit 439f34a962)
2007-10-10 13:34:29 -05:00
Tim Potter
2867f7869d r9550: Adjust some indentation.
(This used to be commit 781df1691c)
2007-10-10 13:34:27 -05:00
Stefan Metzmacher
8569e18c95 r9527: add the magic Bind GUID's, that are needed to fetch the whole
tree with DsGeNCChanges(), this is possible as administrator
without having a DC account joined to the domain

metze
(This used to be commit e6f92444d2)
2007-10-10 13:34:26 -05:00
Jelmer Vernooij
ae88822b8c r9519: Use the value() value of an element when that element is used in
limited expressions (size_is,length_is,subcontext_size,etc)
(This used to be commit 886780c298)
2007-10-10 13:34:26 -05:00
Stefan Metzmacher
8385973935 r9518: - remove the subcontext_size() hack from rev 9509
as it isn't needed
- parse some more DsAddEntry() errors
- add some more attid constands so that all attribute that are needed
  for a DsAddEntry in the DC Domain Join are mapped
- add value() for __ndr_size, to more attribute container, so that the caller
  doesn't need to fill them in, that was the reason for getting an NDR_FAULT

metze
(This used to be commit a9a1a6f861)
2007-10-10 13:34:26 -05:00
Stefan Metzmacher
51c10eba0d r9513: - let us parse some more replies of DsAddEntry
- give some stuff a meening

metze
(This used to be commit 6d9b8d3008)
2007-10-10 13:34:25 -05:00
Stefan Metzmacher
54a703d433 r9509: start to fix the pushing of drsuapi_DsAttributeValueDNString structs,
this uses a trick with talloc_get_type() to workaround using [value()] vars
in [subcontext_size()]

metze
(This used to be commit 93065f2d34)
2007-10-10 13:34:24 -05:00
Andrew Bartlett
ba90b652d9 r9505: Work on GENSEC and the code that calls it, for tighter interface
requirements, and for better error reporting.

In particular, the composite session setup (extended security/SPNEGO)
code now returns errors, rather than NT_STATUS_NO_MEMORY.  This is
seen particularly when GENSEC fails to start.

The tighter interface rules apply to NTLMSSP, which must be called
exactly the right number of times.  This is to match some of our other
less-tested modules, where adding flexablity is harder.  (and this is
security code, so let's just get it right).  As such, the DCE/RPC and
LDAP clients have been updated.

Andrew Bartlett
(This used to be commit 134550cf75)
2007-10-10 13:34:24 -05:00