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
Jelmer Vernooij
dfc517b053 r13658: More moving around of files:
- Collect the generic utility functions into a lib/util/ (a la GLib is
		for the GNOME folks)
 - Remove even more files from include/
(This used to be commit ba62880f5b)
2007-10-10 13:52:05 -05:00
Jelmer Vernooij
d3bcaf66a8 r13654: Move some more stuff out of include/
(This used to be commit 2ec7bba03a)
2007-10-10 13:52:05 -05:00
Jelmer Vernooij
10d88a02d7 r13652: Move some more stuff out off include/
(This used to be commit 26bf2a393b)
2007-10-10 13:52:04 -05:00
James Peach
4c54a04969 r13248: Revert revision 13071. It turns out that sys/param.h can be implicitly
included from other headers. In this case, undeffing MIN and MAX is a
really bad idea because the subsequent include of sys/param.h will do
nothing because of its include guards.
(This used to be commit 8aa8be93b0)
2007-10-10 13:51:38 -05:00
Andrew Bartlett
b70009649a r13244: Allow control of the location of the Samba3-compatible winbindd pipe
in Samba4.  This allows us to start winbindd by default, including in
'make test'.

This is via a new 'winbindd socket directory' parameter for utilities
linked against loadparm, as well as a --with-winbindd-socket-dir
option to configure (setting the default and the value for simple
clients).

I hope to add basic winbindd tests, to ensure continued correct
operation, but at least now I don't have to manually change my 'server
services' line.

The other problem with the hard-coded /tmp/.winbind is that RedHat has
moved this in Fedora (to /var/run I think).  For this reason, this
functionality should probably be ported to Samba3 as well.

The default for Samba4 is PREFIX/var/run/winbind_pipe.

I have also re-added the paranoia checks from Samba3 for correct
permissions on the socket directory.

Andrew Bartlett
(This used to be commit 8866aa06ff)
2007-10-10 13:51:37 -05:00
James Peach
b98a5bf922 r13243: Bring __FUNCTION__ checks across from Samba 3.
(This used to be commit 92eec04962)
2007-10-10 13:51:36 -05:00
Jelmer Vernooij
713b296441 r13210: Revert my named pipes patch until it passes not just 'make quicktest' but
also 'make test'
(This used to be commit e3d0676aee)
2007-10-10 13:51:35 -05:00
Jelmer Vernooij
ad6303f82f r13208: Clearly separate named pipes from the IPC$ NTVFS type.
This allows the easy addition of additional named pipes and removes the
circular dependencies between the CIFS, RPC and RAP servers.

Simple tests for a custom named pipe included.
(This used to be commit 898d15acbd)
2007-10-10 13:51:34 -05:00
Jelmer Vernooij
8adec6d363 r13158: Fix setup and ejs paths
(This used to be commit c3bc39bd71)
2007-10-10 13:51:30 -05:00
James Peach
81a39f964e r13071: Work around a really annoying compiler warning where header file
ordering causes MIN and MAX to be redefined.
(This used to be commit 0eda8a3197)
2007-10-10 13:51:21 -05:00
Andrew Bartlett
aecd9827c6 r13019: Again protect us against format string mismatches, with the new split
out proto headers.

The reason this is done in this way is that the attribute must be on
the prototype, not the actual function defintion.  Hence the macros
which expand to nothing in the C file, but expand to an __attribute__
in the prototype header.

Andrew Bartlett
(This used to be commit a88933668f)
2007-10-10 13:51:17 -05:00
Stefan Metzmacher
b3f2db5e01 r12844: don't include system headers directly
metze
(This used to be commit 75a98047d6)
2007-10-10 13:50:05 -05:00
Stefan Metzmacher
720041d078 r12832: make it possible to pass -D_PUBLIC_... to the compiler
metze
(This used to be commit 5540509f10)
2007-10-10 13:50:04 -05:00
Andrew Bartlett
f55ea8bb3d r12804: This patch reworks the Samba4 sockets layer to use a socket_address
structure that is more generic than just 'IP/port'.

It now passes make test, and has been reviewed and updated by
metze. (Thankyou *very* much).

This passes 'make test' as well as kerberos use (not currently in the
testsuite).

The original purpose of this patch was to have Samba able to pass a
socket address stucture from the BSD layer into the kerberos routines
and back again.   It also removes nbt_peer_addr, which was being used
for a similar purpose.

It is a large change, but worthwhile I feel.

Andrew Bartlett
(This used to be commit 88198c4881)
2007-10-10 13:49:57 -05:00
Jelmer Vernooij
5c8447773f r12801: Some more include/ cleanups (remove unused macros + move files
to specific dirs)
(This used to be commit 243cf760b0)
2007-10-10 13:49:57 -05:00
Stefan Metzmacher
8d15aee017 r12799: print out function and location too
metze
(This used to be commit a5ef3eef9c)
2007-10-10 13:49:57 -05:00
Stefan Metzmacher
3c13509c06 r12798: print timestamps into the log file, this is not nice code,
but it works for now

metze
(This used to be commit ec7dbb5a98)
2007-10-10 13:49:56 -05:00
Stefan Metzmacher
db04cffbbf r12725: some minor updates
metze
(This used to be commit f2e97983f2)
2007-10-10 13:49:45 -05:00
Jelmer Vernooij
c975df527c r12711: Update copyrights
(This used to be commit a02b0c5568)
2007-10-10 13:49:44 -05:00
Jelmer Vernooij
769eb7d3fe r12698: Declare model_ops (required for NetBSD)
(This used to be commit 5e6df39363)
2007-10-10 13:49:40 -05:00
Jelmer Vernooij
63d718e243 r12696: Reduce the size of include/structs.h
(This used to be commit 6391761601)
2007-10-10 13:49:40 -05:00
Jelmer Vernooij
78c50015bb r12694: Move some headers to the directory of the subsystem they belong to.
(This used to be commit c722f665c9)
2007-10-10 13:49:39 -05:00
Jelmer Vernooij
25bb00fbcd r12693: Move core data structures out of smb.h into core.h
torture prototypes in seperate header
(This used to be commit 73610639b2)
2007-10-10 13:49:39 -05:00
Andrew Bartlett
a326d6dba9 r12601: Syncronise both copies of dlinklist.h.
Should we somehow link these, or just use the version in ldb?

Andrew Bartlett
(This used to be commit e98d14668e)
2007-10-10 13:49:01 -05:00
Jelmer Vernooij
2cd5ca7d25 r12542: Move some more prototypes out to seperate headers
(This used to be commit 0aca5fd513)
2007-10-10 13:47:55 -05:00
Jelmer Vernooij
0a3c167f6b r12528: Add seperate proto headers for ntvfs, tdr, smb_server and nbt_server.
(This used to be commit 87f665a1d5)
2007-10-10 13:47:51 -05:00
Jelmer Vernooij
7285e102f0 r12523: Convert the registry subsystem to use a seperate prototype header
(note that this doesn't use the distinction between private
 and public prototypes yet)
(This used to be commit 60e11f5758)
2007-10-10 13:47:51 -05:00
Jelmer Vernooij
6aafed9600 r12499: Move smb_build.h out of includes.h
(This used to be commit c92ace494f)
2007-10-10 13:47:45 -05:00
Jelmer Vernooij
448483199f r12494: Support loading modules from .so files for most subsystems.
We now use a different system for initializing the modules for a subsystem.
Most subsystems now have an init function that looks something like this:

	init_module_fn static_init[] = STATIC_AUTH_MODULES;
	init_module_fn *shared_init = load_samba_modules(NULL, "auth");

	run_init_functions(static_init);
	run_init_functions(shared_init);

	talloc_free(shared_init);

I hope to eliminate the other init functions later on (the
init_programname_subsystems; defines).
(This used to be commit b6d2ad4ce0)
2007-10-10 13:47:45 -05:00
Jelmer Vernooij
788f7cc59a r12489: Forward declare nbtd_iface_name
(This used to be commit cfaa52cdba)
2007-10-10 13:47:44 -05:00
Jelmer Vernooij
07b52f5cd9 r12454: Forward declare struct nbt_iface_name
(This used to be commit d54fea5d0e)
2007-10-10 13:47:41 -05:00
Jelmer Vernooij
81eb29da2a r12451: Add 'struct libnet_context;' - apparently the order of the prototypes
in proto.h previously already did this somehow, probably because it
was used as a return value before it was used as a parameter.
(This used to be commit 30861b0f0e)
2007-10-10 13:47:41 -05:00
Jelmer Vernooij
52728b7d41 r12446: Merge mkproto.sh's functionality into mkproto.pl
Allow specifying the _PUBLIC_ keyword on functions to indicate a function
is public.

Public prototypes can now be written to a seperate header, although this
functionality is not used yet.
(This used to be commit e3466df6df)
2007-10-10 13:47:40 -05:00
Andrew Bartlett
221c1512a8 r12411: Add 'net samdump keytab <keytab>'.
This extracts a remote windows domain into a keytab, suitable for use
in ethereal for kerberos decryption.

For the moment, like net samdump and net samsync, the 'password
server' smb.conf option must be set to the binding string for the
server. eg:

password server = ncacn_np:mypdc

Andrew Bartlett
(This used to be commit 272013438f)
2007-10-10 13:47:35 -05:00
Jelmer Vernooij
efe67458c1 r12216: Couple of small fixes: reduce include/includes.h a bit, simplify headers
in build/smb_build/, remove unused pstring macros
(This used to be commit 4322962074)
2007-10-10 13:47:19 -05:00
Stefan Metzmacher
36acd6e79c r12200: - move the the winsreplication client and server code to the packet_context
system
- this needs to be in one big patch, because of the merging code,
  that changes client in server connections and the other way around
- use socket_connect_send/_recv() in the client code

metze
(This used to be commit f0105b7fcd)
2007-10-10 13:47:17 -05:00
Stefan Metzmacher
35cb1931ed r12122: add forward declaration for packet_context
metze
(This used to be commit 2ea8e61f23)
2007-10-10 13:47:11 -05:00
Stefan Metzmacher
7416dd1889 r12022: add NBTD IRPC proxy calls for wins challenge and wins release demand,
used for replication conflicts

metze
(This used to be commit d7d14cb2bd)
2007-10-10 13:47:00 -05:00
Andrew Tridgell
6615907b94 r11980: ronnie worked out that opcode 0xb in SMB2 is in fact ioctl, and that
it only appeared to be like a SMBtrans request as it was being called
with function 0x11c017 which is "named pipe read write"

I wonder if this means we could do DCE/RPC over SMB using ntioctl
calls as well?
(This used to be commit f2b8857797)
2007-10-10 13:46:53 -05:00
Andrew Tridgell
1e3583475f r11905: added SMB2_FLUSH as opcode 7. Thanks to metze and volker for help
brainstorming this one.
(This used to be commit a969ad592a)
2007-10-10 13:46:47 -05:00
Andrew Tridgell
c5f0eccaa1 r11892: forgot to commit these changes
(This used to be commit 07ee8ba126)
2007-10-10 13:46:42 -05:00
Andrew Tridgell
2f74901802 r11891: - added pipe_flags field in smb2_trans
- while running dcerpc over SMB2, the server will occasionally send us
  a oh-so-useful STATUS_PENDING result meaning "I don't have a result
  for you yet, but I'm working on it". These can be discarded :-)
(This used to be commit 24588a9c49)
2007-10-10 13:46:42 -05:00
Andrew Tridgell
310fa87509 r11888: - added SMB2 trans support
- added session key to SMB2

- renamed 'unknown2' in create to 'impersonation'
(This used to be commit aef915f312)
2007-10-10 13:46:41 -05:00
Volker Lendecke
8383a3459a r11885: Add forgotten files
(This used to be commit 470cc59529)
2007-10-10 13:46:41 -05:00
Andrew Tridgell
fc04e3e795 r11801: - added basic SMB2 find support
- added SMB2-SCANFIND test

- cleaned up continue flags in EAs and find requests
(This used to be commit 8792bc07d9)
2007-10-10 13:46:29 -05:00
Andrew Tridgell
7d6f36682e r11800: - filled in unknown fields in SMB2 all_info level
- allow setting of the ALL_EAS flags bits in SMB2 getinfo
(This used to be commit 8c7c54a46d)
2007-10-10 13:46:29 -05:00
Stefan Metzmacher
910d61bcd1 r11789: - add the start of a SMB2 server
- it does Negprot and SessionSetup yet
  the rest returns NT_STATUS_NOT_IMPLEMENTED
- it's off by default, enable with:
  smbsrv:enable smb2 = yes
- negotition in the SMB Negprot isn't supported yet
- it's only tested with smbtorture SMB2-CONNECT
  not with vista as client

metze
(This used to be commit 08b31d5f61)
2007-10-10 13:46:28 -05:00
Andrew Tridgell
76bfa03815 r11772: - setfileinfo needs a smb2_handle for SMB2 support
- added smb2_setinfo to structs.h
(This used to be commit 5be1d33476)
2007-10-10 13:46:24 -05:00
Andrew Tridgell
eedb92ce72 r11758: unified the parse code for the SMB and SMB2 qfsinfo and qfileinfo calls
(This used to be commit ba897e537b)
2007-10-10 13:46:23 -05:00
Andrew Tridgell
c3cd4a0087 r11756: split out the parsers for the pass-through levels of QFSINFO and
QFILEINFO levels in trans2, so they can be shared with SMB2
(This used to be commit 5ca2d609e6)
2007-10-10 13:46:23 -05:00
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