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

718 Commits

Author SHA1 Message Date
Stefan Metzmacher
43fa1b6dbd r11740: add some EA error codes
metze
(This used to be commit b1afcced39)
2007-10-10 13:46:20 -05:00
Andrew Tridgell
b16543648e r11737: use _smb_setlen2() to allow for 24 bit lengths in SMB2 packets
(This used to be commit 54fda24379)
2007-10-10 13:46:19 -05:00
Stefan Metzmacher
7dd6e5fe92 r11724: - move checks packet size and protocol version,
before we create the request structure
- move code into one function

metze
(This used to be commit 96345b1c46)
2007-10-10 13:46:18 -05:00
Stefan Metzmacher
36639831c0 r11723: fix the build
metze
(This used to be commit 838aac5e20)
2007-10-10 13:46:18 -05:00
Volker Lendecke
61317df8aa r11721: Fix warnings
(This used to be commit d760583e38)
2007-10-10 13:46:17 -05:00
Andrew Tridgell
67a85b3f1b r11697: - added a generic SMB2 getinfo call
- added a SMB2-SCANGETINFO test for scanning for available info levels

- added names for the info levels I recognise to smb2.h
(This used to be commit fe5986067e)
2007-10-10 13:46:15 -05:00
Andrew Tridgell
1b2e8caad3 r11680: added smb2_close(). This also demonstrates that file handles are 16
bytes, not 20 bytes (metze, you were right!)
(This used to be commit d3bcc6628c)
2007-10-10 13:46:12 -05:00
Andrew Tridgell
2e753f8518 r11679: opening/creating files in SMB2 now works. Lots of unknown parameters
in the call tho.
(This used to be commit 548fbd86b3)
2007-10-10 13:46:12 -05:00
Stefan Metzmacher
7935df168f r11675: a more general way of getting rid of compiler warnings and errors
metze
(This used to be commit 653f5ccd61)
2007-10-10 13:46:11 -05:00
Andrew Tridgell
3e54c36fa4 r11674: SMB2 tree connect now works. We do 2 session setups and 2 tree
connects, giving the following output:

Running SMB2-CONNECT
Negprot reply:
current_time  = Fri Nov 11 20:10:42 2005 EST
boot_time     = Sat Nov 12 10:34:33 2005 EST
Session setup gave UID 0x40000000071
Session setup gave UID 0x140000000075
Tree connect gave tid = 0x7500000001
Tree connect gave tid = 0x7500000005
SMB2-CONNECT took 0.049024 secs
(This used to be commit a24a4c3110)
2007-10-10 13:46:11 -05:00
Andrew Tridgell
86c1370cb0 r11666: filled in the basic session setup. Vista happily accepts the first
stage of the session setup, and waits for more.
(This used to be commit 804c229c3b)
2007-10-10 13:46:09 -05:00
Andrew Tridgell
555b45e12c r11665: started to put some meat on the structure used for the SMB2 library
the call definitions will be in smb2_calls.h, which will play a
similar role that smb_interfaces.h plays for the old SMB protocol
(This used to be commit 4ef3902a8a)
2007-10-10 13:46:09 -05:00
Andrew Tridgell
3d38b3dc06 r11664: forgot to commit the structs.h change
(This used to be commit 1f97dccd52)
2007-10-10 13:46:09 -05:00
Andrew Bartlett
f7183342c8 r11545: Remove old #define.
Andrew Bartlett
(This used to be commit 5adaf00e44)
2007-10-10 13:45:52 -05:00
Andrew Bartlett
b1d3d75c68 r11404: Another torture test and a new WERR.
Andrew Bartlett
(This used to be commit de83b8cd18)
2007-10-10 13:45:32 -05:00
Volker Lendecke
134b2488c8 r11369: Implement socket_connect_multi: Connect to multiple ipv4 tcp ports in
sequence, with a 2-millisecond timeout between firing the syn packets. Build
smbcli_sock_connect_send upon that.

Volker
(This used to be commit 5718df44d9)
2007-10-10 13:45:27 -05:00
Andrew Bartlett
db4b95827e r11270: Move the core CrackNames code from rpc_server/drsuapi to dsdb/samdb.
I'm sure this will not be the final resting place, but it will do for
now.

Use the cracknames code in auth/ for creating a server_info given a
principal name only (should avoid assumtions about spliting a
user@realm principal).

Andrew Bartlett
(This used to be commit c9d5d8e45d)
2007-10-10 13:45:11 -05:00
Andrew Bartlett
ba02c449e4 r11207: Correct principal search define
(This used to be commit 90cf4f8e1a)
2007-10-10 13:45:02 -05:00
Andrew Bartlett
0efa46e652 r11202: Add more structs to structs.h
(This used to be commit b0f11d8521)
2007-10-10 13:45:01 -05:00
Andrew Bartlett
24993869f0 r11201: New filters for searching in secrets.ldb
Andrew Bartlett
(This used to be commit b48c6df60c)
2007-10-10 13:45:01 -05:00
Volker Lendecke
1e60499880 r11193: Implement wbinfo -m
(This used to be commit 12a800bc85)
2007-10-10 13:44:59 -05:00
Volker Lendecke
42ececdfae r11093: Implement wb_queue_domain_send: If the domain is not yet initialized, do that
first. And if a request is being processed, queue it. This correctly survived
3 endless loops with wbinfo's doing different things while starting up smbd.

The number of indirections starts to become a bit scary, but what can you do
without a decent programming language that provides closures :-)

One thing that we might consider is to auto-generate async rpc requests that
return composite_context structs instead of rpc_requests. Otherwise I'd have
to write a lot of wrappers like composite_netr_LogonSamLogon_send.

The alternative would be to write two versions of wb_queue_domain_send which I
would like to avoid. This is cluttered enough already.

Volker
(This used to be commit 66c1b674f9)
2007-10-10 13:44:48 -05:00
Stefan Metzmacher
cffd522b5c r11052: bring samba4 uptodate with the samba4-winsrepl branch,
before the bad merge

metze
(This used to be commit 471c0ca4ab)
2007-10-10 13:44:43 -05:00
Stefan Metzmacher
d1e6c22869 r11051: fix the build,
sorry for the latest spam!

I was testing svk push (wasn't such a good idea...)

metze
(This used to be commit fd5e746d8f)
2007-10-10 13:44:43 -05:00
Stefan Metzmacher
94a8893bf4 r11048: r10539@SERNOX: metze | 2005-09-27 14:59:47 +0200
fix the build for changes from SAMBA_4_0 branch

 metze
 r10541@SERNOX:  metze | 2005-09-27 15:05:33 +0200
 use a transaction when we allocate a new version

 metze
 r10549@SERNOX:  metze | 2005-09-27 18:58:37 +0200
 - add first start of wins pull replication
 - we not yet apply records to our database but we fetch them correct form our partners
   (we need conflict handling for this)
 - we also need to filter out our own records!

 metze
 r10568@SERNOX:  metze | 2005-09-28 11:33:04 +0200
 move composite helpers to a seperate file, create a a seperate file for the conflict resolving logic

 metze
 r10571@SERNOX:  metze | 2005-09-28 12:00:17 +0200
 add forward declarations...to fix the build

 metze
 r10612@SERNOX:  metze | 2005-09-29 16:11:06 +0200
 we have a nbt_name now, and don't need to parse it

 metze
 r10614@SERNOX:  metze | 2005-09-29 16:38:35 +0200
 filter out our own records

 metze
 r10620@SERNOX:  metze | 2005-09-29 18:07:08 +0200
 - handle mutliple addresses in WREPL_REPL_SEND_REPLY
 - make strings always valid talloc pointers

 metze
 r10621@SERNOX:  metze | 2005-09-29 18:09:41 +0200
 use debug level 2

 metze
 r10622@SERNOX:  metze | 2005-09-29 18:48:05 +0200
 - add one more debug message when we reply no record
 - fix min max logic

 metze
 r10623@SERNOX:  metze | 2005-09-29 20:49:06 +0200
 build fixes...

 metze
 r10629@SERNOX:  metze | 2005-09-30 00:11:41 +0200
 - use seperate attributes for type, state, nodetype, is_static

 ... the winserver.c code needs some more updates to correctly,
 create special group and multihomed registrations...

 metze
 r10640@SERNOX:  metze | 2005-09-30 04:07:34 +0200
 - add some short path for the composite helper functions
   they will be used in the next commit

 metze
 r10642@SERNOX:  metze | 2005-09-30 06:29:06 +0200
 fix the build

 metze
 r10655@SERNOX:  metze | 2005-09-30 17:36:49 +0200
 - implement the WREPL_REPL_UPDATE* and WREPL_REPL_INFORM*
   this includes the connection fliping into a client connection
   for WREPL_REPL_UPDATE*

 NOTE: I not yet found out how to get the w2k server to use INFORM against samba4
       it uses inform against w2k and w2k3 but UPDATE against nt4 and samba4

 what's left now is to be able to initiate INFORM and UPDATE requests to notify
 our pull partners

 metze
 r10727@SERNOX:  metze | 2005-10-05 14:11:05 +0200
 fix the build

 metze
 r10770@SERNOX:  metze | 2005-10-06 16:56:01 +0200
 - move the table filling to a seperate function, will be reused later
 - fix the build, wrepl_nbt_name fixes
 - remove state -> update_state

 metze
 r10771@SERNOX:  metze | 2005-10-06 17:04:48 +0200
 add a function to create a wreplsrv_in_connection from a client connection

 metze
 r10772@SERNOX:  metze | 2005-10-06 17:13:51 +0200
 - make the connection code more generic to handle the pull cached connection,
   push cached connection or given connections
 - when we don't use a cached connection, disconnection when a pull_cycle is done
 - fix the build and use the configured source ip

 metze
 r10773@SERNOX:  metze | 2005-10-06 17:18:49 +0200
 - add composite functions for push notification

 metze
 r10774@SERNOX:  metze | 2005-10-06 17:23:46 +0200
 - use periodic push notifycation, this is just for now
   as it needs to be configurable and and be triggered when the local database
   has changes since the last notify
 - I also need to work out how to decide if the partner supports
   persistent connections and WREPL_REPL_INFORM* messages

 metze
 r10923@SERNOX:  metze | 2005-10-12 16:52:34 +0200
 fix the build becuse of conflicts with main SAMBA_4_0 tree

 metze
(This used to be commit 6d97dd6e50)
2007-10-10 13:44:42 -05:00
Stefan Metzmacher
8755cd4a9c r11039: r10352@SERNOX: metze | 2005-09-20 16:50:04 +0200
move stuff the belong to incoming connections only
 into a seperate file wrepl_in_connection.c

 metze
(This used to be commit c2b2b58220)
2007-10-10 13:42:34 -05:00
Stefan Metzmacher
681ba379e4 r11035: r10347@SERNOX: metze | 2005-09-20 13:40:24 +0200
make wreplsrv_find_owner public

 metze
(This used to be commit 6fa37c0a2b)
2007-10-10 13:42:33 -05:00
Stefan Metzmacher
e148b33f4b r11034: r10344@SERNOX: metze | 2005-09-20 11:35:54 +0200
create winsdb_record() and winsdb_message() as public functions
 so that they can be used in the wrepl_server/

 metze
(This used to be commit b8b48c8aa5)
2007-10-10 13:42:33 -05:00
Stefan Metzmacher
e5c518bebd r11032: r10342@SERNOX: metze | 2005-09-20 11:00:26 +0200
- load our wins partners at start time:
 # this is a sample partner record:
 dn: name=SERNOX4-1,CN=PARTNERS
 objectClass: wreplPartner
 name: SERNOX4-9
 address: 172.31.1.1
 ourAddress: 172.31.9.1
 type: 0x3
 pullInterval: 3600

 - go through all winsdb records in the database and create the wins_owner table,
   but don't add ourself to it as out nbt task will update the db too, we refetch
   the local max_versiion, each time we need it, (that typicaly onces per replication cycle)

 metze
(This used to be commit 4490a2864e)
2007-10-10 13:42:32 -05:00
Stefan Metzmacher
b2da403af9 r11007: r10109@SERNOX: metze | 2005-09-09 12:29:12 +0200
- move structs to a seperate header file
 - move the code for the wreplsrv_in_call handling to a seperate file

 metze
(This used to be commit c9a8544446)
2007-10-10 13:41:25 -05:00
Stefan Metzmacher
fccbbf3546 r10997: r11980@SERNOX (orig r10037): metze | 2005-09-05 14:21:40 +0200
add struct nbt_peer_socket and use it instead of passing const char *addr, uint16 port everyhwere

 (tridge: can you review this please, (make test works)

 metze
(This used to be commit a599d7a4ae)
2007-10-10 13:39:52 -05:00
Andrew Bartlett
2c6ecae4e6 r10982: Move credentials.h into auth/credentials, and add flags needed by
previous patch.

Andrew Bartlett
(This used to be commit 2c537d47ba)
2007-10-10 13:39:50 -05:00
Volker Lendecke
0a82914049 r10941: Hmmm. Making that fn static is more correct.
(This used to be commit eaf347bdea)
2007-10-10 13:39:44 -05:00
Volker Lendecke
0406bbf024 r10940: add struct definition
(This used to be commit 295271a329)
2007-10-10 13:39:44 -05:00
Volker Lendecke
67580434cf r10936: Commit work in progress: wb_pam_auth_crap made async. This does not work yet,
but the version before did not either, so we're not worse than before.

One thing this does better is to call the domain init code if it's not there
yet.

Volker
(This used to be commit 35bcfb185b)
2007-10-10 13:39:44 -05:00
Andrew Tridgell
a599edf04c r10913: This patch isn't as big as it looks ...
most of the changes are fixes to make all the ldb code compile without
warnings on gcc4. Unfortunately That required a lot of casts :-(

I have also added the start of an 'operational' module, which will
replace the timestamp module, plus add support for some other
operational attributes

In ldb_msg_*() I added some new utility functions to make the
operational module sane, and remove the 'ldb' argument from the
ldb_msg_add_*() functions. That argument was only needed back in the
early days of ldb when we didn't use the hierarchical talloc and thus
needed a place to get the allocation function from. Now its just a
pain to pass around everywhere.

Also added a ldb_debug_set() function that calls ldb_debug() plus sets
the result using ldb_set_errstring(). That saves on some awkward
coding in a few places.
(This used to be commit f6818daecc)
2007-10-10 13:39:41 -05:00
Stefan Metzmacher
b0e342e389 r10867: add WERR_UNKNOWN_REVISION errorcode
metze
(This used to be commit b436206c49)
2007-10-10 13:39:37 -05:00
Volker Lendecke
9e5d44d567 r10852: Continuation-based programming can become a bit spaghetti...
Initialize a domain structure properly. Excerpt from wb_init_domain.c:

/*
 * Initialize a domain:
 *
 * - With schannel credentials, try to open the SMB connection with the machine
 *   creds. Fall back to anonymous.
 *
 * - If we have schannel creds, do the auth2 and open the schannel'ed netlogon
 *   pipe.
 *
 * - Open LSA. If we have machine creds, try to open with ntlmssp. Fall back
 *   to schannel and then to anon bind.
 *
 * - With queryinfopolicy, verify that we're talking to the right domain
 *
 * A bit complex, but with all the combinations I think it's the best we can
 * get. NT4, W2k3SP1 and W2k all have different combinations, but in the end we
 * have a signed&sealed lsa connection on all of them.
 *
 * Is this overkill? In particular the authenticated SMB connection seems a
 * bit overkill, given that we do schannel for netlogon and ntlmssp for
 * lsa later on w2k3, the others don't do this anyway.
 */

Thanks to Jeremy for his detective work, and to the Samba4 team for providing
such a great infrastructure.

Next step is to connect to SAM. Do it via LDAP if we can, fall back to samr
with all we have.

Volker
(This used to be commit 3e69fdc07c)
2007-10-10 13:39:36 -05:00
Volker Lendecke
b468ba1386 r10846: Create a "wbsrv_domain", change wb_finddcs to the style of the rest of the
async helpers.

Volker
(This used to be commit 10585ba4e8)
2007-10-10 13:39:35 -05:00
Volker Lendecke
e0c11738ae r10834: Work in progress on winbind. With some helper routines the composite functions
start to look sane.

Question: What about providing all winbind commands as irpc interfaces that
are called from the samba3 compatibility layer? This way it would be easy for
other samba components to access its functionality. Does that make sense?

Volker
(This used to be commit 2a6b805385)
2007-10-10 13:39:33 -05:00
Volker Lendecke
b1b6eb7b67 r10825: Complete wbinfo -n
(This used to be commit 1afa893506)
2007-10-10 13:39:32 -05:00
Andrew Bartlett
5158636aff r10809: Add struct decl
(This used to be commit aa30c16de0)
2007-10-10 13:39:31 -05:00
Stefan Metzmacher
6799fde75d r10766: - make it possible to mark a wrepl_request as send only,
used for WREPL_REPL_INFORM* messsages
- make it possible to close the connection after a request was send
  used for WREPL_ASSOCIATION_STOP
- fix the torture test that tests the assoc context handling
  between connections, you can issue a request and get the reply
  on another connection, I think we should not implement that in our server
  code, as I think it's a security hole, you can cause a windows server
  to send the replies to someone another client, that doesn't wait for data,
  and as there're no massage_id in the protocol the client would be confused
  by a replies that doesn't belong to a query

metze
(This used to be commit dfc95de8fa)
2007-10-10 13:39:28 -05:00
Volker Lendecke
012893cb42 r10691: This gets half-way to wbinfo -n. It acquires an lsa pipe, and does a
queryinfopolicy. Idea is to get a consistency check between that and our
notion of the domain name and sid, and take the lsa pipe as the holder of the
central smbcli_tree that netlogon and samr use as well.

Volker
(This used to be commit 126c80aefc)
2007-10-10 13:39:19 -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
Rafal Szczesniak
0b9d6306d5 r10680: Fix a warning.
rafal
(This used to be commit b3b4059efe)
2007-10-10 13:39:17 -05:00
Volker Lendecke
68c70ef396 r10677: Add smb_composite_connectmulti: Send out multiple SYN packets at once, use the
first one that replies correctly.

Add a talloc context to smb_composite_connect()

Volker
(This used to be commit 6b88de182e)
2007-10-10 13:39:17 -05:00
Jelmer Vernooij
ecbf28630e r10664: Include limits.h in replace.h for HOST_NAME_MAX
(This used to be commit dc3dc79674)
2007-10-10 13:39:15 -05:00
Stefan Metzmacher
bb77c2aa1e r10638: - add wrepl_socket_merge() function that creates a wrepl_socket on top
of an existing socket, that is needed to handle WREPL_REPL_UPDATE
  in the server, because we need to flig the connection and act as client on it

metze
(This used to be commit 131e5dfe69)
2007-10-10 13:39:14 -05:00
Jelmer Vernooij
5e7a0fb534 r10604: Put in the new registry "patchfile" code (similar to ldif
for LDB); not finished yet.
(This used to be commit b405b27ba4)
2007-10-10 13:39:11 -05:00
Jelmer Vernooij
4abb479761 r10588: Remove more unused files, macros
(This used to be commit d2f80c0457)
2007-10-10 13:39:08 -05:00
Jelmer Vernooij
dc67354579 r10587: Remove unused constants
(This used to be commit b65c9dc607)
2007-10-10 13:39:08 -05:00
Jelmer Vernooij
42b81d7c3e r10528: Add credentials.h back into includes.h as some compilers don't
seem to be able to handle incomplete enum types.
(This used to be commit 540155fad3)
2007-10-10 13:39:02 -05:00
Andrew Tridgell
675f81eed3 r10525: change from AC_CHECK_TYPES() to AC_CHECK_TYPE() for intptr_t, so the
type is always available, which means we need less #ifdefs
(This used to be commit d4af4b11ae)
2007-10-10 13:39:01 -05:00
Jelmer Vernooij
49839f356f r10513: Reduce some use of pstring. The main reason some parts of the code still
use pstring is next_token() now.
(This used to be commit a5b88bcd42)
2007-10-10 13:38:58 -05:00
Jelmer Vernooij
f801ad3592 r10510: Decrease the amount of data included by includes.h a bit
(This used to be commit 03647e1321)
2007-10-10 13:38:58 -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
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
Stefan Metzmacher
bcf0615be5 r10426: - restructure the winbind server code a bit
- remove the echo test stuff
- abstract out the used protocol
- we have a seperate handler for the samba3 protocol now
- the backend can easy do async replies
  by setting WBSRV_CALL_FLAGS_REPLY_ASYNC in wbsrv_call
  and then call wbsrv_queue_reply() later

metze
(This used to be commit 32f3e68a56)
2007-10-10 13:38:44 -05:00
Jelmer Vernooij
349294d358 r10315: Remove use of fstring and pstring in dynconfig.c
Remove unused includes of dynconfig.h
(This used to be commit 59083b7ba6)
2007-10-10 13:38:17 -05:00
Stefan Metzmacher
a8ec371a61 r10078: - add a 'struct data_blob_list_item'
- use this for the send_queue's of the different stream_servers
  to not redefine the same struct so often, and it maybe will be used
  in other places too

metze
(This used to be commit b6694f067a)
2007-10-10 13:37:51 -05:00
Andrew Bartlett
9b8b2bb094 r10044: Microsoft has defined this bit:
support.microsoft.com/?kbid=832572

(It inhbits the generation of a PAC).

Andrew Bartlett
(This used to be commit 330f351085)
2007-10-10 13:36:32 -05:00
Jelmer Vernooij
ff7342a4ad r10026: Move registry header file to lib/registry
Add support for showing security descriptor in regshell
Add support for saving files in NT4 registry backend
(This used to be commit 47cecd4726)
2007-10-10 13:36:30 -05:00
Jelmer Vernooij
40cbd4625a r10015: Change the NT4 registry backend to use the IDL-generate parse functions.
(This used to be commit 0ad46ef804)
2007-10-10 13:36:29 -05:00
Jelmer Vernooij
02b3abec25 r10007: Merge data_blk and data_len member of registry_value into a DATA_BLOB.
Fix handling of REG_DWORD in the LDB backend.
Fix a couple of warnings
(This used to be commit 709fdc7ebf)
2007-10-10 13:36:28 -05:00
Jelmer Vernooij
a3a7881d39 r9798: Add generic functions for handling smb.conf files (the parameters don't to be pre-declared). Also doesn't use any globals, so multiple files can be loaded at once.
Currently uses the prefix "param" for all functions and structures; suggestions for better ones are welcome...

Remove old smb.conf-parsing code from libsamba3.
(This used to be commit 414e5f7f6d)
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
Jelmer Vernooij
95ed275dbb r9698: Fix a bit of memory management
More minor bugfixes
Support mapping objectclasses and do mapping on 'dn' field as well (not just msg->dn)
(This used to be commit b7b079167d)
2007-10-10 13:34:42 -05:00
Jelmer Vernooij
02779b745f r9672: Fix build for compilers that don't like undefined-length arrays at the end of structs...
(This used to be commit c2211df586)
2007-10-10 13:34:39 -05:00
Stefan Metzmacher
81021aaa95 r9638: add error code that you get when you call DsGetNCChanges() with a tmp_highest_usn which is
higher than the real highest of the source dsa

metze
(This used to be commit e4424d2a6d)
2007-10-10 13:34:36 -05:00
Jelmer Vernooij
dcd27d550f r9602: Add support for reading share_info.tdb and smb.conf.
Add userdata argument to function pointers for pm_process()
(This used to be commit 84b2fb3467)
2007-10-10 13:34:33 -05:00
Jelmer Vernooij
98b303e2eb r9595: Add ldb map module
(This used to be commit e0a0d3f092)
2007-10-10 13:34:33 -05:00
Jelmer Vernooij
cdf218e270 r9589: Support reading secrets tdb
(This used to be commit dd15131b52)
2007-10-10 13:34:32 -05:00
Jelmer Vernooij
ca71549d5a r9581: Registry db
(This used to be commit b264e9f56a)
2007-10-10 13:34:31 -05:00
Jelmer Vernooij
479ef0a387 r9557: Some more updates. Use combined function for parsing a set of
samba3 databases
(This used to be commit b91a695bd8)
2007-10-10 13:34:28 -05:00
Jelmer Vernooij
6622d3be09 r9556: Define a few libsamba structs
(This used to be commit 46c5cdb673)
2007-10-10 13:34:28 -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
36dcb8425d r9514: add some new error codes I was getting with DsGetNCChanges() and DsAddEntry()
metze
(This used to be commit 2cbbb8ace2)
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 Tridgell
a92e61c452 r9503: removed duplicate REG_* defines from registry.h now that they are
generated in winreg.h
(This used to be commit fc15e1b003)
2007-10-10 13:34:23 -05:00
Jelmer Vernooij
7fca0f1b98 r9453: Add samba3_samaccount (fix the build)
(This used to be commit 65ddea09b9)
2007-10-10 13:34:17 -05:00
Simo Sorce
3e4c4cff21 r9391: Convert all the code to use struct ldb_dn to ohandle ldap like distinguished names
Provide more functions to handle DNs in this form
(This used to be commit 692e35b779)
2007-10-10 13:33:32 -05:00
Stefan Metzmacher
810dffecc2 r9371: add the usefull trick hack for NT_STATUS_NO_MEMORY too
metze
(This used to be commit 9b9635833f)
2007-10-10 13:33:29 -05:00
Andrew Bartlett
dcf88f58b4 r9085: Missing structs.h entry.
Andrew Bartlett
(This used to be commit 379bcf7061)
2007-10-10 13:31:15 -05:00
Andrew Tridgell
223262c11e r9048: added a new DOS error code (thanks to EMC)
(This used to be commit 1936c20939)
2007-10-10 13:31:11 -05:00
Jelmer Vernooij
f30eba5222 r8940: Add TDR (Trivial Data Representation). The aim is to use this later for
NBT/WINS/etc rather then having to depend on NDR.
(This used to be commit 5ee7af26dd)
2007-10-10 13:30:59 -05:00
Jelmer Vernooij
5e1a9fe62b r8933: Fix missing prototype warnings
(This used to be commit 39b2220a84)
2007-10-10 13:30:58 -05:00
Andrew Bartlett
6cec8025b0 r8847: Rework the Samba4 'net join' code. I'm trying to get this closer to
what WinXP does when joining an AD domain, but in the meantime this
removes the excess unions, and uses the LSA pipe in same way XP does.

Andrew Bartlett
(This used to be commit d2789c4260)
2007-10-10 13:30:11 -05:00
Jelmer Vernooij
5b94a9583f r8806: Move data representation-independent data into seperate header
(This used to be commit 26e1fdf630)
2007-10-10 13:30:06 -05:00
Andrew Bartlett
6d26a7114f r8752: With all the infrustructure done, details like a SamSync migration
into LDB are actually quite easy.

This brings us the users, and sets basic domain information.

You are expected to have provisioned with the settings for the target
domain, and have joined the domain as a BDC.  Then simply 'net
samsync'.

Now we just need to flesh out the delta types.

Andrew Bartlett
(This used to be commit 1e0f7792bb)
2007-10-10 13:30:02 -05:00
Andrew Bartlett
82f96542fa r8744: Split 'net samdump' out into a separate file
Work on the talloc memory tree, as I think talloc_reference and other
things were biting me.

Crush unions in the name of code reform. ;-)

Andrew Bartlett
(This used to be commit 2eadcf4669)
2007-10-10 13:30:01 -05:00
Tim Potter
a33c02612a r8713: Experiment to try and fix warnings on 64-bit machines without breaking
32-bit ones.  Yes, this weird looking macros are part of C99.
(This used to be commit 7b316f119b)
2007-10-10 13:29:57 -05:00
Rafal Szczesniak
6868795a39 r8692: Starting parts of code to provide user modify functionality.
It's more like a placeholder now, than a working code. Just don't
want to hang it around my laptop only.

rafal
(This used to be commit bee1c9ec2d)
2007-10-10 13:29:54 -05:00
Jelmer Vernooij
c84512f0e1 r8690: Code cleanups, improvements necessary for dependencies (not added yet)
(This used to be commit 7384b3c4a1)
2007-10-10 13:29:54 -05:00
Andrew Tridgell
c77f4a68c6 r8460: removed the unused function krb5_locate_kdc(). It causes a build failure on irix.
Andrew, if you planned on using this in the future then we can put it
back and work out how to make it portable
(This used to be commit eaa74913fe)
2007-10-10 13:23:05 -05:00
Andrew Tridgell
c4173f6725 r8458: next target is irix - this gets the socket wrapper code building
(This used to be commit 3d4a2221c3)
2007-10-10 13:23:05 -05:00
Jelmer Vernooij
2483f979d1 r8438: - More win32 portability fixes. Now fails on socketwrapper (because
unix domain sockets are not available on win32)
- Update howto
(This used to be commit c88ee6b61b)
2007-10-10 13:23:02 -05:00
Jelmer Vernooij
84db066207 r8434: Win32 portability updates from Steven Edwards <steven_ed4153@yahoo.com>:
- undefine anything in the win32 api or PSDK headers that Samba already defines
 - map BSD error codes to Winsock Error codes
(This used to be commit d2ea619125)
2007-10-10 13:23:02 -05:00
Andrew Tridgell
2ea372afd9 r8420: slowly getting my way through some more heimdal portability fixes
(This used to be commit 59c3de6ca8)
2007-10-10 13:23:01 -05:00
Andrew Tridgell
54ffd4fdbf r8313: moved PRINTF_ATTRIBUTE to replace.h to try to get irix building with heimdal
(This used to be commit 7d4e309f02)
2007-10-10 13:20:05 -05:00
Andrew Tridgell
76478d7eb1 r8306: some more heimdal configure checks
(This used to be commit 575413fc86)
2007-10-10 13:20:04 -05:00
Tim Potter
4109f7d069 r8288: The SMB_ASSERT_ARRAY macro isn't used anymore.
(This used to be commit aab24385ab)
2007-10-10 13:19:32 -05:00
Jeremy Allison
3de3d6a02d r8174: Check DOS error codes in torture chkpath test.
Jeremy.
(This used to be commit ff58ecad04)
2007-10-10 13:19:17 -05:00
Stefan Metzmacher
f1031746e5 r8164: - match the ordering w2k3 uses for the PAC_BUFFER:
LOGON_INFO
   LOGON_NAME
   SRV_CHECKSUM
   KDC_CHECKSUM

- w2k3 also don't use the groupmembership array with rids
  it uses the othersids array

metze
(This used to be commit 2286fad27d)
2007-10-10 13:19:16 -05:00
Andrew Bartlett
42bb490709 r8161: Update Samba4 for the new Heimdal update.
Andrew Bartlett
(This used to be commit 6a9b637327)
2007-10-10 13:19:16 -05:00
Stefan Metzmacher
148235a009 r8148: - make the PAC generation code a bit more readable and add some outof memory checks
- move to handmodified pull/push code for PAC_BUFFER
  to get the _ndr_size field and the subcontext size right

- after looking closely to the sample w2k3 PAC in our torture test (and some more in my archive)
  I found out that the first uint32 before the netr_SamInfo3 was also a pointer,
  (and we passed a NULL pointer there before, so I think that was the reason why the windows clients doesn't want our PAC)

  w2k3 uses this for unique pointers:

  ptr = ndr->ptr_count * 4;
  ptr |= 0x00020000;
  ndr->ptr_count;

- do one more pull/push round with the sample PAC

metze
(This used to be commit 0eee179415)
2007-10-10 13:19:13 -05:00
Rafal Szczesniak
242fe4d8b9 r8128: Janitor work...
rafal
(This used to be commit 9f0dfafcde)
2007-10-10 13:19:12 -05:00
Andrew Tridgell
54fba5b1b8 r8116: demonstrate a little trick that can be used to track down where an
error is coming from. In this case I needed to know where a
NT_STATUS_ACCESS_DENIED was being returned, which is a very common
error, but I needed to know which place in the code was giving it
(This used to be commit 692bb1c8a1)
2007-10-10 13:19:10 -05:00
Andrew Tridgell
934831686c r8115: added support for 2 more dos error codes found during testing
(This used to be commit 97cb705713)
2007-10-10 13:19:10 -05:00
Andrew Tridgell
67a777a0e5 r8113: this should fix the build on systems without heimdal
(This used to be commit 980c09cfca)
2007-10-10 13:19:09 -05:00
Andrew Tridgell
950f662484 r8111: fixed the client library to work against w2k3 with nt status codes
disabled. The main change is to turn off spnego, which cannot work at
all without nt status codes (w2k3 gives a ERRHRD:ERRgeneral error when
you try)

I also modified NT_STATUS_EQUAL() to allow for nt->dos code equality,
but only when nt status codes are disabled in smb.conf. That keeps all
the existing torture code working, while still allowing us to
correctly catch the cases where forced dos error codes are needed

The dos->ntstatus mapping table has been removed completely, as it
doesn't really make sense, is impossible to get right, and with the
new dos status handling isn't needed. When matching a nt status code
to a dos status code it makes far more sense to map from the nt code
to the dos code and compare, rather than the reverse, as the nt->dos
mapping is what windows has to do internally, so there really is a
valid mapping table.
(This used to be commit f21274e07b)
2007-10-10 13:19:09 -05:00
Andrew Tridgell
b3383236a2 r8106: the use of a static string for dos error codes was causing problems in
the torture code. To fix this, get rid of dos_errstr() and instead
move the strings into the nt_errstr() table, using cpp to generate the
strings
(This used to be commit 3136ad9634)
2007-10-10 13:19:08 -05:00
Rafal Szczesniak
90046a1de2 r8078: rpc connect function uses structure now.
rafal
(This used to be commit 34592b6a92)
2007-10-10 13:19:06 -05:00
Stefan Metzmacher
88df3c81ee r8050: - make use of more [value()] properties
- the out subcontext's need to have a fixed size of r->in.offered,
  to make windows clients happy

metze
(This used to be commit 054e1ca434)
2007-10-10 13:19:02 -05:00
Rafal Szczesniak
396074a7fc r7999: Fix lacking structure definition.
rafal
(This used to be commit 6886aefe4c)
2007-10-10 13:18:57 -05:00
Andrew Bartlett
f62a70fe54 r7988: Store the KVNO for the machine account, and set it up in the provision.
Andrew Bartlett
(This used to be commit 90e94a4630)
2007-10-10 13:18:56 -05:00
Andrew Bartlett
2d95bf6da6 r7971: structs.h update
(This used to be commit 31e7df1392)
2007-10-10 13:18:55 -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 bf85fdd015)
2007-10-10 13:18:42 -05:00
Rafal Szczesniak
52f072865d r7733: New io structure for name lookup function.
rafal
(This used to be commit 12b468417d)
2007-10-10 13:18:27 -05:00
Andrew Bartlett
5b19286df0 r7690: Move the NT hash generation into the credentials system, rather than
in all the callers.  This also allows us to be more flexible in the
type of password we store.

Andrew Bartlett
(This used to be commit 00b8588c68)
2007-10-10 13:18:23 -05:00
Andrew Bartlett
8a6b60e1e4 r7688: Fix the internal heimdal build - push one #define back to
heimdal_build/config.h

Andrew Bartlett
(This used to be commit 337cb20ac4)
2007-10-10 13:18:22 -05:00
Andrew Bartlett
dd39c8cedf r7683: The other file from the last commit. And it's include/system/kerberos.h that I'm putting the #defines in...
Andrew Bartlett
(This used to be commit 31f7ec38e6)
2007-10-10 13:18:22 -05:00
Andrew Bartlett
d2c2e0d3b7 r7681: This #define is unused.
Andrew Bartlett
(This used to be commit 2a22f413c9)
2007-10-10 13:18:21 -05:00
Andrew Tridgell
44a04d74cd r7668: - setup HAVE_ILDAP to enable the ildap backend in ldb
- fixed a bug in socket_connect_ev()
(This used to be commit 3f77b879a0)
2007-10-10 13:18:20 -05:00
Stefan Metzmacher
8f85427d6d r7643: This patch adds a new NTPTR subsystem:
- this is an abstraction layer for print services,
  like out NTVFS subsystem for file services

- all protocol specific details are still in rpc_server/spoolss/
  - like the stupid in and out Buffer handling
  - checking of the r->in.server_name
  - ...

- this subsystem can have multiple implementation
  selected by the "ntptr providor" global-section parameter

- I currently added a "simple_ldb" backend,
  that stores Printers, Forms, Ports, Monitors, ...
  in the spoolss.db, and does no real printing
  this backend is basicly for testing, how the spoolss protocol
  works

- the interface is just a prototype and will be changed a bit
  the next days or weeks, till the simple_ldb backend can
  handle all calls that are used by normal w2k3/xp clients

- I'll also make the api async, as the ntvfs api
  this will make things like the RemoteFindFirstPrinterChangeNotifyEx(),
  that opens a connection back to the client, easier to implement,
  as we should not block the whole smbd for that

- the idea is to later implement a "unix" backend
  that works like the current samba3 code

- and maybe some embedded print server vendors can write there own
  backend that can directly talk to a printer without having cups or something like this

- the default settings are (it currently makes no sense to change them :-):

ntptr providor = simple_ldb
spoolss database = $private_dir/spoolss.db

metze
(This used to be commit 455b5536d4)
2007-10-10 13:18:16 -05:00
Andrew Tridgell
bab977dad7 r7626: a new ldap client library. Main features are:
- hooked into events system, so requests can be truly async and won't
   interfere with other processing happening at the same time

 - uses NTSTATUS codes for errors (previously errors were mostly
   ignored). In a similar fashion to the DOS error handling, I have
   reserved a range of the NTSTATUS code 32 bit space for LDAP error
   codes, so a function can return a LDAP error code in a NTSTATUS

 - much cleaner packet handling
(This used to be commit 2e3c660b2f)
2007-10-10 13:18:14 -05:00
Andrew Tridgell
3e92471d4c r7596: next step in ldap cleanup. I'm aiming to get rid of the cut&pasted
ldif parsing code in libcli/ldap/ldap_ldif.c, and instead use the ldb
ldif code. To do that I have changed the ldap code to use 'struct
ldb_message_element' instead of 'struct ldap_attribute'. They are
essentially the same structure anyway, so by making them really the
same it will be much easier to use the ldb code in libcli/ldap/

I have also made 'struct ldb_val' the same as a DATA_BLOB, which will
simplify data handling in quite a few places (I haven't yet removed
all the code that maps between these two, that will come later)
(This used to be commit 87fc307339)
2007-10-10 13:18:12 -05:00
Andrew Tridgell
4b0e5bd753 r7527: - added a ldb_search_bytree() interface, which takes a ldb_parse_tree
instead of a search expression. This allows our ldap server to pass
  its ASN.1 parsed search expressions straight to ldb, instead of going
  via strings.

- updated all the ldb modules code to handle the new interface

- got rid of the separate ldb_parse.h now that the ldb_parse
  structures are exposed externally

- moved to C99 structure initialisation in ldb

- switched ldap server to using ldb_search_bytree()
(This used to be commit 96620ab2ee)
2007-10-10 13:18:06 -05:00
Andrew Bartlett
2b4791ae73 r7525: Unify lp_load(), load_interfaces and logging setup into popt().
There is now a new --debug-stderr option to enable debug to STDERR.

popt isn't perfect, but the callbacks are used in all the main Samba
binaries, and should be used in the rest.  This avoids duplicated
code, and ensures every binary is setup correctly.

This also ensures the setup happens early enough to have -s function,
and have a correct impact on the credentials code.  (Fixing a bug that
frustrated tridge earlier today).

The only 'subtle' aspect of all this is that I'm pretty sure that the
SAMBA_COMMON popt code must be above the CREDENTIALS code, in the
popt tables.

Andrew Bartlett
(This used to be commit 50f3c2b3a2)
2007-10-10 13:18:06 -05:00
Rafal Szczesniak
c29896d0ae r7490: Rename functions and prefices s/rpc_composite/libnet_rpc/
This makes more clear where the functions belong to. Also
the rule will be that lowercased function names are not
part of "official" libnet API (though it doesn't mean one
absolutely cannot use them).

rafal
(This used to be commit f6ef7b882a)
2007-10-10 13:17:59 -05:00
Rafal Szczesniak
ae6907c5c8 r7379: Simplify CreateUser function and io structure. Also, implementing
it based on composite functions. Moving to fully async CreateUser
on the way...

rafal
(This used to be commit 240409bc3c)
2007-10-10 13:17:48 -05:00
Andrew Tridgell
bce8cda061 r7352: the internal heimdal build change. This changes quite a few things:
- if you want kerberos now, you need to unpack a lorikeet heimdal
   tree in source/heimdal/. If source/heimdal/ does not exist at
   configure time then all kerberos features are disabled. You cannot
   use an external kerberos library for now. That may change later.

 - moved lib/replace/ config stuff to lib/replace/ and create a
   lib/replace/replace.h. That allows the heimdal build to use our
   portability layer, and prevenets duplicate definitions of functions
   like strlcat()

 - if you do enable heimdal, then you will need to do 'make
   HEIMDAL_EXTERNAL' before you build Samba. That should be fixed once
   I explain the problem to jelmer (the problem is the inability to
   set a depend without also dragging in the object list of the
   dependency. We need this for building the heimdal asn1 compiler and
   et compiler.

 - disabled all of the m4 checks for external kerberos libraries. I
   left them in place in auth/kerberos/, but disabled it in
   configure.in

some of the heimdal_build/ code is still very rough, for example I
don't correctly detect the correct awk, flex, bison replacements for
heimdal_build/build_external.sh. I expect to fix that stuff up over
the next few days.
(This used to be commit d4648249b2)
2007-10-10 13:17:45 -05:00
Stefan Metzmacher
9a831a3963 r7328: fix GetPrinterData and SetPrinterData, with zero length subcontexts
metze
(This used to be commit 73d597bacf)
2007-10-10 13:17:42 -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 3d589a0995)
2007-10-10 13:17:37 -05:00
Derrell Lipman
a1ba224107 r7276: - moved static tdb function ltdb_dn_fold() into common/ so that it can be
called from multiple backends.  (ldb_sqlite3 needs it too.)  Added parameter
  for a callback function that determines whether an attribute needs case
  folding.
- begin to prepare for sqlite3 in build process
- work-in-progress updates, on ldb_sqlite3
(This used to be commit a80bced0b9)
2007-10-10 13:17:35 -05:00
Tim Potter
6bf9b5cd9a r7253: Fix build.
(This used to be commit 54ff16b9a1)
2007-10-10 13:17:32 -05:00
Rafal Szczesniak
af61fb8771 r7251: Initial work on composite domain open call.
rafal
(This used to be commit be3b283b20)
2007-10-10 13:17:31 -05:00
Jelmer Vernooij
77c3d463c8 r7248: Remove enum that is causing trouble on AIX
(This used to be commit 512536c916)
2007-10-10 13:17:31 -05:00
Andrew Bartlett
51fc684227 r7221: Add the start of a KDC service (to be built on a 'libkdc' from a to be
included Heimdal) to Samba4.

Andrew Bartlett
(This used to be commit 51ba3ea60c)
2007-10-10 13:17:27 -05:00
Stefan Metzmacher
6dd757005a r7183: add some forward declarations ...
metze
(This used to be commit e9f30ad698)
2007-10-10 13:17:24 -05:00
Andrew Tridgell
1511cde44c r7002: added support for getting at loadparm config parameters via lpGet() in esp scripts
lpGet takes 4 forms
    v = lpGet("type:parm");             gets a parametric variable
    v = lpGet("share", "type:parm");    gets a parametric variable on a share
    v = lpGet("parm");                  gets a global variable
    v = lpGet("share", "parm");         gets a share variable

in all cases a ejs object of the appropriate type for the variable is returned.

This commit also adds the function typeof() which returns the type of an object
(This used to be commit 5537a0d38d)
2007-10-10 13:17:04 -05:00
Andrew Tridgell
7e58231952 r6982: install the swat pages with 'make installswat'
(This used to be commit 31543e1eae)
2007-10-10 13:17:02 -05:00
Andrew Tridgell
d70912a26a r6981: first version of the builtin web server for Samba4
This includes an embedded server side scripting system called 'esp'
(see http://www.appwebserver.org/products/esp/esp.html) and javascript
based scripting language called 'esj' (see
http://www.appwebserver.org/products/ejs/ejs.html)

The justification for including this scripting language is that it
should make it much easier to write a high quality web interface for
Samba4. The scripting language can call into any Samba4 library code
(so for example it will be able to make ldb and loadparm calls), plus
it provides easy support for forms, cookies, sessions etc.

There is still quite a bit more work to do on the web server, but
there is enough here now for people to look at and comment. I will be
committing some sample web pages that test esp functionality shortly.
(This used to be commit 26f0ba92c0)
2007-10-10 13:17:01 -05:00
Rafal Szczesniak
d516fa53aa r6963: Further definitions for share manipulation code. Untested.
Original patch provided by Gregory Leocadie <gleocadie@idealx.com>

rafal
(This used to be commit eb83a8210a)
2007-10-10 13:17:00 -05:00
Andrew Bartlett
2a01014f8f r6879: Another attempt at including the 'right' kerberos headers on
dual-install systems.

Andrew Bartlett
(This used to be commit efc24f1a45)
2007-10-10 13:16:53 -05:00
Andrew Bartlett
fc748e650f r6811: Another attempt at better kerberos/gssapi headers.
Andrew Bartlett
(This used to be commit f4b7484516)
2007-10-10 13:16:46 -05:00
Andrew Bartlett
3a9c42c033 r6806: Try again to fix the build on various kerberos libs.
Andrew Bartlett
(This used to be commit 5749b63f17)
2007-10-10 13:16:46 -05:00
Andrew Bartlett
1d0e2b9569 r6803: Try to bring in the correct GSSAPI headers for the krb5 mech. This
should allow us to ditch the local static storage for OIDs, as well as
fix the build on non-heimdal platforms.

Andrew Bartlett
(This used to be commit a7e2ecfac9)
2007-10-10 13:16:45 -05:00
Andrew Bartlett
5c6dd5e800 r6800: A big GENSEC update:
Finally remove the distinction between 'krb5' and 'ms_krb5'.  We now
don't do kerberos stuff twice on failure.  The solution to this is
slightly more general than perhaps was really required (as this is a
special case), but it works, and I'm happy with the cleanup I achived
in the process.  All modules have been updated to supply a
NULL-terminated list of OIDs.

In that process, SPNEGO code has been generalised, as I realised that
two of the functions should have been identical in behaviour.

Over in the actual modules, I have worked to remove the 'kinit' code
from gensec_krb5, and placed it in kerberos/kerberos_util.c.

The GSSAPI module has been extended to use this, so no longer requires
a manual kinit at the command line.  It will soon loose the
requirement for a on-disk keytab too.

The general kerberos code has also been updated to move from
error_message() to our routine which gets the Heimdal error string
(which may be much more useful) when available.

Andrew Bartlett
(This used to be commit 0101728d8e)
2007-10-10 13:16:45 -05:00
Jelmer Vernooij
15a8f0ff0a r6752: Patch by Steven Edwards to improve portability to mingw32
(This used to be commit 8d63cd33a2)
2007-10-10 13:16:41 -05:00
Andrew Tridgell
2279d1ebfb r6747: first working version of cldapd server. It is missing 'sites' support, and
filling in some of the returned parameters is quite rough, but it seems to work OK
(This used to be commit e564e3e596)
2007-10-10 13:16:41 -05:00
Andrew Tridgell
7b18fcd847 r6725: the beginnings of a cldap server
(This used to be commit e51e0dffa8)
2007-10-10 13:16:38 -05:00
Rafal Szczesniak
44f981ad0b r6615: As usual, I forgot to commit new structure in this file...
rafal
(This used to be commit 3389cfb135)
2007-10-10 13:16:31 -05:00
Andrew Bartlett
8bf57cf8f5 r6573: Start on my project to implement an NT4 compatible BDC in Samba4.
This brings in a compatability layer for Samba3 in Samba4 - where we
will start to define file formats and similar details.

The 'net samdump' command uses 'password server = ' for now, and
performs a similar task to Samba3's 'net rpc samsync'.

Andrew Bartlett
(This used to be commit 550f17f992)
2007-10-10 13:16:27 -05:00
Andrew Bartlett
85e9412c47 r6565: Cludge, cludge, cludge...
We need to pass the 'secure channel type' to the NETLOGON layer, which
must match the account type.

(Yes, jelmer objects to this inclusion of the kitchen sink ;-)

Andrew Bartlett
(This used to be commit 8ee208a926)
2007-10-10 13:16:26 -05:00
Andrew Bartlett
4e29d24b4c r6467: keep the compiler quiet with another entry in structs.h
Andrew Bartlett
(This used to be commit 106047032f)
2007-10-10 13:11:40 -05:00
Andrew Bartlett
0501a440be r6462: Move the arcfour sbox state into it's own structure, and allocate it
with talloc() for the NTLMSSP system.

Andrew Bartlett
(This used to be commit 7a93ac49c2)
2007-10-10 13:11:39 -05:00
Rafal Szczesniak
dea0c8729f r6414: Added composite user del function. Slightly broken still, but I don't
want it to hang around not commited.

rafal
(This used to be commit 98d98b9bc7)
2007-10-10 13:11:35 -05:00
Rafal Szczesniak
30cb6046cb r6382: New structure for useradd call.
rafal
(This used to be commit 3752122550)
2007-10-10 13:11:34 -05:00
Alexander Bokovoy
9779e6d670 r6352: Two new composite calls:
- qfsinfo (query file system information)
- appendacl (append an ACL to existing file's security descriptor and get new
full ACL)

The second one also includes an improvement to security descriptor handling
which allows to copy security descriptor. Written by Peter Novodvorsky
<peter.novodvorsky@ru.ibm.com>

Both functions have corresponding torture tests added. Tested under valgrind and
work against Samba 4 and Windows XP.

ToDo: document composite call creation process in prog_guide.txt
(This used to be commit 441cff62ac)
2007-10-10 13:11:34 -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 2acc069185)
2007-10-10 13:11:33 -05:00
Andrew Bartlett
6d1ae6d35a r6271: Don't zero the cli_credentials structure - instead allow valgrind to
track the use of un-initialised values.

This change will require a recompile from clean, as the enum
describing the status of each element now has a default of
CRED_UNINITIALISED.

Andrew Bartlett
(This used to be commit 83c2eb806d)
2007-10-10 13:11:29 -05:00
Andrew Tridgell
b0ca8ed455 r6247: added the server side code for receiving mailslot requests, and
parsing incoming netlogon requests. No replies are sent yet.
(This used to be commit 3b34df6a67)
2007-10-10 13:11:28 -05:00
Andrew Tridgell
6db5d09dba r6185: added LIBCLI_DGRAM to the list of libs to be built as part of LIBCLI
(This used to be commit 47e1452da0)
2007-10-10 13:11:24 -05:00
Stefan Metzmacher
3abce73193 r6179: - add new spoolss tests for all spoolss_Enum*() calls which didn't need
a handle as parameter,

  EnumPorts
  EnumPrinterDrivers
  EnumMonitors
  EnumPrintProcessors
  EnumPrinters

  we now do cross checks between the different info levels
  and sore the results in a global context,
  so that we later can add cross checks between the different object types

- add idl for EnumMonitors and EnumPrintProcessors

metze
(This used to be commit 92a3721bc7)
2007-10-10 13:11:23 -05:00
Jelmer Vernooij
848329b9a0 r6140: - Add configure option for enabling the socket-wrapper library, so it
can be enabled on the buildfarm without requiring --enable-developer
- Support tcp and udp being used on the same port
- FIx some portability issues (should fix the build on
							   some hosts on the buildfarm)
- Ignore setting TCP_NODELAY on (semi-)TCP sockets rather then complain about
  it not being supported (saves us from a couple of error messages for each
						  connection that is opened)
(This used to be commit 443fb7853b)
2007-10-10 13:11:21 -05:00
Jelmer Vernooij
44d7f4f238 r6139: Move socket_wrapper to a seperate directory
(This used to be commit a2ef9225f1)
2007-10-10 13:11:21 -05:00
Stefan Metzmacher
d2f2d5c798 r6134: add a new type dom_sid28 which is a 28 byte fixed buffer with a dom_sid in it
metze
(This used to be commit 460d1b089e)
2007-10-10 13:11:21 -05:00
Jelmer Vernooij
e91fb065fa r6088: Add the socket_wrapper library. This is a very simple library that
redirects traffic (currently just IP traffic) over unix domain sockets
if the SOCKET_WRAPPER_DIR environment variable has been set.
Aim is to use this for the Samba4 torture suite on the buildfarm.

The socket_wrapper library can only be used if Samba was compiled with
--enable-developer.

test_rpc.sh passes against a local smbd with SOCKET_WRAPPER_DIR set.
(and ethereal showed no traffic whatsoever)

Stuff that still needs to be fixed in socketwrapper:
 - Give ENETUNREACH if target is not localhost
 - A given port number can only be used for UDP /or/ TCP, not both.
 - Perhaps allow some calls to circumvent socketwrapper (do we need DNS?)
(This used to be commit f8a63a843c)
2007-10-10 13:11:18 -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 2301a4b38a)
2007-10-10 13:11:15 -05:00
Andrew Bartlett
038c4c4c6a r6024: Some of the ordering constraints on the popt callbacks were getting
painful, so don't call lp_*() functions until the post stage (rather
than in the cli_credentails_init(), which is called in the pre stage),
and don't open the secrets.ldb looking for the machine account details
until we actually need them (well after popt is done, and we know we have the other things right).

Set the domain and realm, as well as the account and password for -P
(fetch machine password) operation.

Allow NETLOGON credentials to be stored in this structure - will allow
SCHANNEL to be made more generic.

Clarify why we don't do special checks for NULL pointers, particularly
in the anonymous check (it indicates a programmer error, not a
run-time condition).

Also make lib/credentials.c a little more consistant.

Andrew Bartlett
(This used to be commit 730e6056b7)
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 e13c671619)
2007-10-10 13:11:12 -05:00
Jelmer Vernooij
13b0776f60 r5929: Use cli_credentials for the SMB functions as well.
Fix a couple of bugs in the new cli_credentials code
(This used to be commit 4ad481cfe5)
2007-10-10 13:11:09 -05:00
Jelmer Vernooij
05bc2d7b2c r5928: Use cli_credentials in:
- gtk+ (returned by GtkHostBindingDialog as well now)
 - torture/
 - librpc/
 - lib/com/dcom/
(This used to be commit ccefd78233)
2007-10-10 13:11:08 -05:00
Jelmer Vernooij
02075be0bb r5917: First step in using the new cli_credentials structure. This patch
puts support for it into popt_common, adds a few utility functions
(in lib/credentials.c) and the callback functions for the command-line
(lib/cmdline/credentials.c). Comments are welcome :-)
(This used to be commit 1d49b57c50)
2007-10-10 13:11:08 -05:00
Jelmer Vernooij
ef213b0248 r5866: Add InitShutdown IDL and torture test.
Implement push side of NDR_LEN4|NDR_NOTERM strings (pull side was already present)
(This used to be commit ea61ec1122)
2007-10-10 13:11:05 -05:00
Stefan Metzmacher
d7b5a565ef r5828: add some idl for DsAddEntry()
metze
(This used to be commit 3e6ec81128)
2007-10-10 13:11:04 -05:00
Stefan Metzmacher
55546176c6 r5800: fix recursiv printing in ndr_print_DsGetNCChangesInfo1()
metze
(This used to be commit 1084ad4bfc)
2007-10-10 13:11:04 -05:00
Stefan Metzmacher
736797ef7f r5737: add some error codes
metze
(This used to be commit f543eb4ede)
2007-10-10 13:11:01 -05:00
Steve French
020817e152 r5716: Add new Unix extensions defines for infolevels
(This used to be commit 7f6ea98e0f)
2007-10-10 13:11:00 -05:00
Jelmer Vernooij
77ec3f684d r5674: - Re-enable DCOM support.
- Always put IID in vtables (useful for asserts)
- Add table to keep track of DCOM proxy classes
- Bunch of smaller bug fixes
(This used to be commit 26d5a0b92c)
2007-10-10 13:10:59 -05:00
Simo Sorce
b1b14817ea r5585: LDB interfaces change:
changes:
- ldb_wrap disappears from code and become a private structure of db_wrap.c
  thanks to our move to talloc in ldb code, we do not need to expose it anymore

- removal of ldb_close() function form the code
  thanks to our move to talloc in ldb code, we do not need it anymore
  use talloc_free() to close and free an ldb database

- some minor updates to ldb modules code to cope with the change and fix some
  bugs I found out during the process
(This used to be commit d58be9e74b)
2007-10-10 13:10:55 -05:00
Alexander Bokovoy
95bb95715c r5538: Fix typo in comment -- non-existant constant name mentioned
(This used to be commit 1d033d9dba)
2007-10-10 13:10:53 -05:00
Rafal Szczesniak
1bee0173ec r5499: Commit forgotten change what tridge immediately pointed out
in his comments to new rpc composite code.

rafal
(This used to be commit 1294db747e)
2007-10-10 13:10:51 -05:00
Jelmer Vernooij
80d3047333 r5490: The big (D)COM commit! :-) Contains most of the changes described in the
DCOM paper in lorikeet. This is the result of 1.5 months work (mainly
figuring out how things *really* work) at the end of 2004.

In general:
- Clearer distinction between COM and DCOM. DCOM is now merely
  the glue between DCE/RPC+ORPC and COM. COM can also work without
  DCOM now. This makes the code a lot clearer.
- Clearer distinction between NDR and DCOM. Before, NDR had a couple of
  "if"s to cope with DCOM, which are now gone.
- Use "real" arguments rather then structures for function arguments in
  COM, mainly because most of these calls are local so packing/unpacking
  data for every call is too much overhead (both speed- and code-wise)
- Support several mechanisms to load class objects:
  - from memory (e.g. part of the current executable, registered at start-up)
  - from shared object files
  - remotely
- Most things are now also named COM rather then DCOM because that's what it
  really is. After an object is created, it no longer matters whether it
  was created locally or remotely.

There is a very simple example class that contains
both a class factory and a class that implements the IStream interface.
It can be tested (locally only, remotely is broken at the moment)
by running the COM-SIMPLE smbtorture test.

Still to-do:
 - Autogenerate parts of the class implementation code (using the coclass definitions in IDL)
 - Test server-side
 - Implement some of the common classes, add definitions for common interfaces.
(This used to be commit 71fd3e5c3a)
2007-10-10 13:10:50 -05:00
Stefan Metzmacher
6b4cac2c00 r5489: hide handwritten pull/push/print code from the caller
for the spoolss_Enum* functions

metze
(This used to be commit bfcc86e706)
2007-10-10 13:10:50 -05:00
Andrew Tridgell
42d6a4c4f0 r5451: - added separate wrepl_associate(), wrepl_pull_table() and wrepl_pull_names() functions, with reasonable
parameters, so callers don't need to deal directly with wins replication packet structures

- converted the NBT-WINSREPLICATION torture test to use the new APIs
(This used to be commit cec1672662)
2007-10-10 13:10:47 -05:00
Andrew Tridgell
a6878f6c6e r5414: - added libcli/wins/, a basic client library for WINS replication
- added a new IDL type "udlongr", which is like udlong, but with the
  two uint32 halves reversed

- modified the winsrepl.idl to cope with a wider range of packets
(This used to be commit bc8d60c918)
2007-10-10 13:10:43 -05:00
Andrew Tridgell
40d117a893 r5372: fixed the build
(This used to be commit 2899d28945)
2007-10-10 13:09:48 -05:00
Andrew Tridgell
e199f4cef2 r5358: - added initial WINS server code. It passes most of the NBT-WINS test, but doesn't yet
do secure server WACK responses

- added a ldap_string_to_time() function, for converting a LDAP
  formatted time to a time_t
(This used to be commit 9aa3313b3f)
2007-10-10 13:09:45 -05:00
Andrew Bartlett
6f01a68faa r5334: Bah, it's all to hard...
Andrew Bartlett
(This used to be commit a28ca320dc)
2007-10-10 13:09:43 -05:00
Andrew Bartlett
c8ca613e93 r5330: Remove #include <sys/time.h> from includes.h.
Add #include "system/time.h" back (it was removed in some of these
places because the definitions were provided by <sys/time.h> on tridge's
platform.)

Andrew Bartlett
(This used to be commit 34b1da7303)
2007-10-10 13:09:43 -05:00
Andrew Tridgell
a0e6f6c05b r5309: removed ads.h from includes.h
(This used to be commit 196c45b834)
2007-10-10 13:09:40 -05:00
Andrew Tridgell
75ddf59ea1 r5308: trimmed back a lot of the old macros from smb_macros.h
(This used to be commit bf43c9bdcf)
2007-10-10 13:09:40 -05:00
Andrew Tridgell
a5bd1ccada r5307: removed db_wrap.h from includes.h
(This used to be commit 826baec7b3)
2007-10-10 13:09:40 -05:00
Andrew Tridgell
6aa6dce3f7 r5306: removed all the unused mutex functions from mutex.c. When (if?) we
decide to reinstate the mutex code for the threads process model, I'd
like to do it a little differently. At least this gets it out of
includes.h for now.
(This used to be commit cfee0fb02e)
2007-10-10 13:09:40 -05:00
Andrew Tridgell
501379431c r5305: removed libcli/ldap/ldap.h from includes.h
(This used to be commit 0df3fdd817)
2007-10-10 13:09:39 -05:00
Andrew Tridgell
bed7c9ec32 r5304: removed lib/socket/socket.h from includes.h
(This used to be commit b902ea546d)
2007-10-10 13:09:39 -05:00
Andrew Tridgell
e82aad1ce3 r5298: - got rid of pstring.h from includes.h. This at least makes it a bit
less likely that anyone will use pstring for new code

 - got rid of winbind_client.h from includes.h. This one triggered a
   huge change, as winbind_client.h was including system/filesys.h and
   defining the old uint32 and uint16 types, as well as its own
   pstring and fstring.
(This used to be commit 9db6c79e90)
2007-10-10 13:09:38 -05:00
Andrew Tridgell
fedf0b0d91 r5296: - only include the tdb headers where they are needed
- removed the u32 hack in events.c as I think this was only needed as
  tdb.h defines u32. Metze, can you check that this hack is indeed no
  longer needed on your suse system?
(This used to be commit 6f79432fe6)
2007-10-10 13:09:38 -05:00