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

719 Commits

Author SHA1 Message Date
Stefan Metzmacher
ce694e7051 r2328: add the start of a new system and protocol
independent socket library.

this is not used, but compiled currently

there're maybe some api changes later...

metze
(This used to be commit de4447d7a5)
2007-10-10 12:58:44 -05:00
Stefan Metzmacher
a560d554bd r2321: add complately untested LDAP server start
based on volker's patch

this is compiled by default but not started by default

metze
(This used to be commit 5387bc423d)
2007-10-10 12:58:43 -05:00
Andrew Tridgell
3ddde3b74c r2242: some older versions of gcc don't properly handle the
PRINTF_ATTRIBUTE() format checking magic, so only enable it for gcc
versions >= 3.0
(This used to be commit 9c7100e3c7)
2007-10-10 12:58:34 -05:00
Andrew Tridgell
31c1c7846f r2159: converted samba4 over to UTF-16.
I had previously thought this was unnecessary, as windows doesn't use
standards compliant UTF-16, and for filesystem operations treats bytes
as UCS-2, but Bjoern Jacke has pointed out to me that this means we
don't correctly store extended UTF-16 characters as UTF-8 on
disk. This can be seen with (for example) the gothic characters with
codepoints above 64k.

This commit also adds a LOCAL-ICONV torture test that tests the first
1 million codepoints against the system iconv library, and tests 5
million random UTF-16LE buffers for identical error handling to the
system iconv library.

the lib/iconv.c changes need backporting to samba3
(This used to be commit 756f28ac95)
2007-10-10 12:58:27 -05:00
Andrew Tridgell
600144050c r2039: got rid of the free() ptr in DATA_BLOB
I plan on replacing the concept by adding a generic destructor in all talloc ptrs, so you can do:

  talloc_set_destructor(ptr, my_destructor);

to setup a function that will be called on free.
(This used to be commit 957b260621)
2007-10-10 12:58:19 -05:00
Stefan Metzmacher
45a69c44e7 r2005: fix compiler warnings
metze
(This used to be commit 71992c90cc)
2007-10-10 12:58:17 -05:00
Andrew Tridgell
b7e1ea20dc r1985: take advantage of the new talloc in a few more places
(This used to be commit 6ffdfd7799)
2007-10-10 12:58:14 -05:00
Andrew Tridgell
b45f4ebbb8 r1984: this change is what you should read to understand the new talloc()
It simplifies our structure handling a lot, making the code shorter
and easier to understand. Look at the diff carefully and see if you
can understand it. If you're still confused then please ask.
(This used to be commit 03c341aca7)
2007-10-10 12:58:14 -05:00
Andrew Tridgell
b83ba93eae r1983: a completely new implementation of talloc
This version does the following:

  1) talloc_free(), talloc_realloc() and talloc_steal() lose their
     (redundent) first arguments

  2) you can use _any_ talloc pointer as a talloc context to allocate
     more memory. This allows you to create complex data structures
     where the top level structure is the logical parent of the next
     level down, and those are the parents of the level below
     that. Then destroy either the lot with a single talloc_free() or
     destroy any sub-part with a talloc_free() of that part

  3) you can name any pointer. Use talloc_named() which is just like
     talloc() but takes the printf style name argument as well as the
     parent context and the size.

The whole thing ends up being a very simple piece of code, although
some of the pointer walking gets hairy.

So far, I'm just using the new talloc() like the old one. The next
step is to actually take advantage of the new interface
properly. Expect some new commits soon that simplify some common
coding styles in samba4 by using the new talloc().
(This used to be commit e35bb094c5)
2007-10-10 12:58:14 -05:00
Stefan Metzmacher
d139dc808a r1912: move popt_common.h
metze
(This used to be commit ecf6be894f)
2007-10-10 12:58:10 -05:00
Stefan Metzmacher
bca24a19eb r1911: merge a few popt parameters from 3.0 move some to better places
and deal with users DOMAIN and lp_workgroup() of the local workstation

metze
(This used to be commit 1fc0100e44)
2007-10-10 12:58:10 -05:00
Stefan Metzmacher
a154ed7291 r1903: hmm a better solution is to include popt.h where it is needed
metze
(This used to be commit 64d61ef4a5)
2007-10-10 12:58:10 -05:00
Stefan Metzmacher
045bdb356f r1902: we need to include popt.h before popt_common.h
metze
(This used to be commit edde7497e9)
2007-10-10 12:58:09 -05:00
Andrew Tridgell
70f630d375 r1895: added a note about OPEN_BY_FILE_ID to the ntcreatex interface definition
(This used to be commit e50fc00671)
2007-10-10 12:58:09 -05:00
Volker Lendecke
664f50e81c r1894: Convert // to /* */
(This used to be commit 5dc793b2b4)
2007-10-10 12:58:09 -05:00
Stefan Metzmacher
f7c842707a r1877: since make proto catches all functions
the inlcude has to move to includes.h

metze
(This used to be commit 97fe38183b)
2007-10-10 12:58:06 -05:00
Stefan Metzmacher
d3e7a22630 r1836: - as abartlet said to me, we need to contact the users domain pdcfor doing a
password change
- add start of libnet_SetPassword
- use KRB5 and LDAP instead of ADS as ADS isn't a protocol
- add start of lib_rpc_connect()

metze
(This used to be commit 05c40dca8a)
2007-10-10 12:58:00 -05:00
Andrew Bartlett
7b088a8f65 r1796: Enable server-side SPNEGO, now that I have fixed the server-side SMB
signing code to be able to cope.

Andrew Bartlett
(This used to be commit cb74d52b56)
2007-10-10 12:57:57 -05:00
Simo Sorce
28ea8b8785 r1785: remove unneeded dependencies on openldap client libraries
(This used to be commit 44083e3178)
2007-10-10 12:57:56 -05:00
Simo Sorce
76abf79a5f r1760: name the struct
(This used to be commit 512c410860)
2007-10-10 12:57:54 -05:00
Stefan Metzmacher
fa8d37adae r1756: merge volkers ldap client lib to samba4 for simo to start with the
ldap server code

it's not compiled in yet...

metze
(This used to be commit 48939adca1)
2007-10-10 12:57:54 -05:00
Andrew Bartlett
ffcfb97fb3 r1745: More work on cleaning up SMB signing.
This removes the function pointer mess from the SMB signing code.

Andrew Bartlett
(This used to be commit 8830603e4b)
2007-10-10 12:57:52 -05:00
Andrew Bartlett
ca72bdfecb r1735: Clean up SMB signing - we don't have more than one 'real' way to sign
a packet, so don't pretend we do...

Andrew Bartlett
(This used to be commit 68a6d5aeb3)
2007-10-10 12:57:51 -05:00
Andrew Bartlett
d9ff454a87 r1729: Make the SMB signing code more generic (to share more between client and servers).
Andrew Bartlett
(This used to be commit b90b04e84b)
2007-10-10 12:57:50 -05:00
Andrew Bartlett
6ffaf57fe7 r1686: Don't use a void* for the context inside the SMB signing code.
Andrew Bartlett
(This used to be commit 64fcd8eceb)
2007-10-10 12:57:48 -05:00
Stefan Metzmacher
c5fbb6f23c r1654: rename cli_ -> smbcli_
rename CLI_ -> SMBCLI_

metze
(This used to be commit 8441750fd9)
2007-10-10 12:57:47 -05:00
Andrew Tridgell
53781e9d37 r1633: fixed a couple of async oplock handling errors
(This used to be commit d7e2f39b90)
2007-10-10 12:57:45 -05:00
Andrew Tridgell
2d9adf1ea5 r1629: server_zone needs to be "int" not "int16_t" as it can hold values
larger than 35536 (the max value is actually 12*3600 == 43200)
(This used to be commit 78dcaddbb7)
2007-10-10 12:57:45 -05:00
Jim McDonough
112c2c831b r1596: Fix up copyrights.
(This used to be commit d2553aac0a)
2007-10-10 12:57:43 -05:00
Andrew Tridgell
5ddf678e01 r1578: the first stage of the async client rewrite.
Up to now the client code has had an async API, and operated
asynchronously at the packet level, but was not truly async in that it
assumed that it could always write to the socket and when a partial
packet came in that it could block waiting for the rest of the packet.

This change makes the SMB client library full async, by adding a
separate outgoing packet queue, using non-blocking socket IO and
having a input buffer that can fill asynchonously until the full
packet has arrived.

The main complexity was in dealing with the events structure when
using the CIFS proxy backend. In that case the same events structure
needs to be used in both the client library and the main smbd server,
so that when the client library is waiting for a reply that the main
server keeps processing packets. This required some changes in the
events library code.

Next step is to make the generated rpc client code use these new
capabilities.
(This used to be commit 96bf4da3ed)
2007-10-10 12:57:42 -05:00
Stefan Metzmacher
d093b7e777 r1547: rename 'enum <bla>_level' -> 'enum smb_<bla>_level'
e.g. we now have 'union smb_mkdir' and 'enum smb_mkdir_level' in sync

we may should also rename 'RAW_MKDIR_*' -> 'SMB_MKDIR_*'

metze
(This used to be commit 0bb50dcf1c)
2007-10-10 12:57:41 -05:00
Andrew Tridgell
bacee255dd r1523: declaring variables "in" and "out" in every C module is a bad idea!
I actually don't like this idea of sharing the request buffer
structure between client and server, and I'll see if I can convince
abartlet to revert it. It ties the two pieces of code far more
intimately than is justified, and will certainly lead to ugliness as
the client and server take different paths of development. I would far
prefer we just pass 2 arguments (pointer and length) to the signing
calls instead of 1 (the request).
(This used to be commit 70838a9211)
2007-10-10 12:57:39 -05:00
Andrew Bartlett
afb48b55ae r1522: Oops - I forgot this file in the prvevious commit.
This breaks the request structure out into a common part between the
client and server, which the signing code now uses.

Andrew Bartlett
(This used to be commit 33de58455a)
2007-10-10 12:57:39 -05:00
Andrew Bartlett
b3c46674a6 r1521: Updates to our SMB signing code.
- This causes our client and server code to use the same core code,
  with the same debugs etc.
- In turn, this will allow the 'mandetory/fallback' signing algorithms
  to be shared, and only written once.

Updates to the SPNEGO code
- Don't wrap an empty token to the server, if we are actually already finished.

Andrew Bartlett
(This used to be commit 35b83eb329)
2007-10-10 12:57:39 -05:00
Stefan Metzmacher
5779a7da9a r1499: combine struct user_struct and struct smbsrv_user
to a struct smbsrv_session that the same as cli_session for the client

we need a gensec_security pointer there
(spnego support will follow)

prefix some related functions with smbsrv_

metze
(This used to be commit f276378157)
2007-10-10 12:57:36 -05:00
Stefan Metzmacher
45a85bdd35 r1486: commit the start of the generic server infastructure
the idea is to have services as modules (smb, dcerpc, swat, ...)

the process_model don't know about the service it self anymore.

TODO:
- the smbsrv should use the smbsrv_send function
- the service subsystem init should be done like for other modules
- we need to have a generic socket subsystem, which handle stream, datagram,
  and virtuell other sockets( e.g. for the ntvfs_ipc module to connect to the dcerpc server
  , or for smb or dcerpc or whatever to connect to a server wide auth service)
- and other fixes...

NOTE: process model pthread seems to be broken( but also before this patch!)

metze
(This used to be commit bbe5e00715)
2007-10-10 12:57:35 -05:00
Andrew Bartlett
ed03516c91 r1475: More kerberos work
- We can now connect to hosts that follow the SPNEGO RFC, and *do not*
give us their principal name in the mechListMIC.
 - The client code now remembers the hostname it connects to

- We now kinit for a user, if there is not valid ticket already

- Re-introduce clock skew compensation

TODO:
 - See if the username in the ccache matches the username specified
 - Use a private ccache, rather then the global one, for a 'new' kinit
 - Determine 'default' usernames.
  - The default for Krb5 is the one in the ccache, then $USER
  - For NTLMSSP, it's just $USER

Andrew Bartlett
(This used to be commit de5da66939)
2007-10-10 12:57:34 -05:00
Volker Lendecke
3a6f761eb0 r1470: Get the smb_trans2 structure out of the rap_cli_call struct.
Initial attempt at RAP server infrastructure. Look at rap_server.c for the
dummy functions that are supposed to implement the core functionality.

ipc_rap.c contains all the data shuffling. _rap_shareenum and _rap_serverenum2
in ipc_rap.c are (I think) regular enough to be auto-generated.

I did not test all the corner cases yet, but nevertheless I would like some
comments on the general style.

Volker

P.S: samba-3 smbclient now doesn't freak out anymore, although the results are
not entirely correct :-)
(This used to be commit 08140cc1a8)
2007-10-10 12:57:33 -05:00
Andrew Bartlett
88002b851b r1462: GENSEC Kerberos and SPENGO work:
- Spelling - it's SPNEGO, not SPENGO
 - SMB signing - Krb5 logins are now correctly signed
 - SPNEGO - Changes to always tell GENSEC about incoming packets, empty or not.

Andrew Bartlett
(This used to be commit cea578d6f3)
2007-10-10 12:57:32 -05:00
Jelmer Vernooij
805ebe1084 r1455: More Gtk+ updates:
- Start working on 'gwsam'
 - Add GtkSelectDomainDialog and GtkSelectHostDialog
(This used to be commit bea47671aa)
2007-10-10 12:56:58 -05:00
Volker Lendecke
ec3a86254b r1454: Today is the day of broken builds, now I get my share ... :-)
Add a missing file.

Volker
(This used to be commit 2bc6147c11)
2007-10-10 12:56:58 -05:00
Jelmer Vernooij
e3fd2d0492 r1432: - Move the various Gtk-specific parts from the registry code into a directory gtk/
- Move common "Samba-Gtk" code into gtk/common/ ("Connect to RPC pipe"-dialog, etc)
- Add a new utility 'gwcrontab' that can currently list, delete and add 'atsvc' jobs. It still displays times and dates as integers though, will fix that later.

Some screenshots available at:
 http://samba.org/~jelmer/gwcrontab/
(This used to be commit d321cf20f1)
2007-10-10 12:56:55 -05:00
Stefan Metzmacher
4f0e5e0690 r1345: add extended security spnego support to the smb client
code

set lp_use_spnego = False, because I can't get it working yet
but I commit it so others can help me

metze
(This used to be commit 2445cceba9)
2007-10-10 12:56:51 -05:00
Stefan Metzmacher
854665fb1b r1343: formating
metze
(This used to be commit 442905394b)
2007-10-10 12:56:51 -05:00
Andrew Bartlett
fe0706d5d5 r1292: Add const to the subsystem/module registration code.
Add some 'multi init' code, until we get a better set of infrustructure.

Andrew Bartlett
(This used to be commit 982422b2d2)
2007-10-10 12:56:49 -05:00
Stefan Metzmacher
d62cb6c005 r1281: move include/context.h to smb_server/smb_server.h
metze
(This used to be commit 7b4ad993ad)
2007-10-10 12:56:49 -05:00
Stefan Metzmacher
8bf537d119 r1280: rename struct request_context to smbsrv_request
metze
(This used to be commit a85d2db582)
2007-10-10 12:56:48 -05:00
Stefan Metzmacher
4ddb2d347d r1279: rename struct tcon_context to smbsrv_tcon
metze
(This used to be commit 99473fab4b)
2007-10-10 12:56:48 -05:00
Stefan Metzmacher
0aba9a2e3f r1278: rename struct user_context to smbsrv_user
metze
(This used to be commit a9ba29e00f)
2007-10-10 12:56:48 -05:00
Stefan Metzmacher
d4ae6ae74d r1277: rename struct server_context to smbsrv_ontext
because I need server_context fot the generic server infastructure

metze
(This used to be commit 0712f9f307)
2007-10-10 12:56:48 -05:00
Andrew Bartlett
f7d05d579b r1250: We no longer use these #defines
Andrew Bartlett
(This used to be commit e031953359)
2007-10-10 12:56:46 -05:00
Tim Potter
62aabf5630 r1204: decrpc -> dcerpc
(This used to be commit a5e3a26fc9)
2007-10-10 12:56:45 -05:00
Andrew Bartlett
be081037e0 r1200: Add 'gensec', our generic security layer.
This layer is used for DCERPC security, as well as ntlm_auth at this
time.  It expect things like SASL and the CIFS layer to use it as
well.

The particular purpose of this layer is to introduce SPENGO, which
needs generic access to the actual implementation mechanisms.

Schannel, due to it's 'interesting' setup properties is in GENSEC, but
is only in the RPC code.

Andrew Bartlett
(This used to be commit 902af49006)
2007-10-10 12:56:44 -05:00
Andrew Bartlett
bf598954f7 r1198: Merge the Samba 3.0 ntlm_auth, including the kerberos and SPENGO parts.
I have moved the SPNEGO and Kerberos code into libcli/auth, and intend
to refactor them into the same format as NTLMSSP.

Andrew Bartlett
(This used to be commit 58da78a746)
2007-10-10 12:56:44 -05:00
Stefan Metzmacher
2b7cd77ee2 r1065: some header file cleanups
smb.h should end with only smb protocol specific stuff in it

metze
(This used to be commit fda8e59f3d)
2007-10-10 12:56:36 -05:00
Andrew Bartlett
c8252aeb0e r1064: Remove the unused userdom_struct from the user_context struct
Andrew Bartlett
(This used to be commit e975f63a2d)
2007-10-10 12:56:36 -05:00
Andrew Bartlett
0d9e31cf16 r1063: userdom_struct dies!
(Cleanup unused header definitions)

Andrew Bartlett
(This used to be commit 5941873f55)
2007-10-10 12:56:36 -05:00
Andrew Bartlett
0d466258be r1019: Push the auth subsystem away from using typedef, and over to the 'all
goodness and light' struct ;-)

Break apart the auth subsystem's return strucutres, into the parts
that a netlogon call cares about, and the parts that are for a local
session.  This is the 'struct session_info' and it will almost
completly replace the current information stored on a vuid, but be
generic to all login methods (RPC over TCP, for example).

Andrew Bartlett
(This used to be commit d199697014)
2007-10-10 12:56:28 -05:00
Stefan Metzmacher
770e3307ce r962: convert 'unsigned' and 'unsigned int' to uint_t
metze
(This used to be commit 57151e80eb)
2007-10-10 12:56:23 -05:00
Stefan Metzmacher
98d291423f r961: convert 'uchar' to 'uint8_t'
metze
(This used to be commit 9f914e4af9)
2007-10-10 12:56:23 -05:00
Stefan Metzmacher
fa2e9ec311 r960: convert 'unsigned int' to uint_t in the most places
metze
(This used to be commit 18062d2ed9)
2007-10-10 12:56:23 -05:00
Stefan Metzmacher
45e93c19ef r943: change samba4 to use 'uint8_t' instead of 'unsigned char'
metze
(This used to be commit b5378803fd)
2007-10-10 12:56:21 -05:00
Andrew Tridgell
d9538e7412 r937: - added a simple QuerySecurity implementation in samr server
- moved some sec desc defines into misc.idl

 - fixed pw_len field in UserInfo26

 - made some pipes available on TCP

 - added netr_DsrEnumerateDomainTrusts() to netlogon

 - added templates for remaining netlogon IDL calls (from ethereal)

 - added a unistr_noterm vs unistr error detector in ndr basic decoder

 - added torture test for netr_DsrEnumerateDomainTrusts()
(This used to be commit ae5a5113fb)
2007-10-10 12:56:20 -05:00
Andrew Tridgell
db3c011977 r917: - added the start of a LSA server to samba4.
- added start of QueryDomainInfo in samr server

"net rpc info" from samba3 now works against a samba4 server. I
suspect join will work fairly soon.
(This used to be commit 0a2c6a1062)
2007-10-10 12:56:19 -05:00
Andrew Tridgell
39a236883e r904: - fixed account expiry testing in auth_sam
- added printf style format attribute checking to samdb varargs fns

- fix nt_time_to_unix() for zero and -1 times
(This used to be commit 41f9b144f9)
2007-10-10 12:56:19 -05:00
Andrew Tridgell
8b3f08cefc r898: - remove some unused macros
- remove unused lib/smbpasswd.c

- don't set the pkt size twice when doing SMB signing
(This used to be commit 69a2942f79)
2007-10-10 12:56:18 -05:00
Andrew Tridgell
47864891ff r893: a few more _t conversions
(This used to be commit 66eb46dbb1)
2007-10-10 12:56:18 -05:00
Stefan Metzmacher
fcd718c7d8 r890: convert samba4 to use [u]int8_t instead of [u]int8
metze
(This used to be commit 2986c5f08c)
2007-10-10 12:56:16 -05:00
Stefan Metzmacher
f88bf54c7f r889: convert samba4 to use [u]int16_t instead of [u]int16
metze
(This used to be commit af6f1f8a01)
2007-10-10 12:56:16 -05:00
Stefan Metzmacher
f9d8f8843d r884: convert samba4 to use [u]int32_t instead of [u]int32
metze
(This used to be commit 0e5517d937)
2007-10-10 12:56:15 -05:00
Andrew Tridgell
579c13da43 r873: converted samba4 to use real 64 bit integers instead of
structures. This was suggested by metze recently.

I checked on the build farm and all the machines we have support 64
bit ints, and support the LL suffix for 64 bit constants. I suspect
some won't support strtoll() and related functions, so we will
probably need replacements for those.
(This used to be commit 9a9244a1c6)
2007-10-10 12:56:14 -05:00
Andrew Tridgell
e6594ed130 r867: removed a couple of unused structures
(This used to be commit a70eb86a3f)
2007-10-10 12:56:13 -05:00
Stefan Metzmacher
b744493be5 r862: remove acl and sendfile stuff
it will be readded inside the ntvfs_posix module

metze
(This used to be commit ec624aefa8)
2007-10-10 12:56:13 -05:00
Stefan Metzmacher
1f033febfe r861: remove the next round of unused stuff
metze
(This used to be commit 8f59daba0d)
2007-10-10 12:56:13 -05:00
Stefan Metzmacher
7fb1be7373 r853: remove a real big bunch of unused code
I really think that this is needed to get a better overview of what is currently used
Also this stuff is really out of date

so if we really ever need some of this stuff back,
a 'svn copy' from the SAMBA_3_0 branch should be no big problem...

metze
(This used to be commit 972598d511)
2007-10-10 12:56:12 -05:00
Stefan Metzmacher
a3d61e0485 r848: convert lib/tdb into the same layout as lib/ldb
metze
(This used to be commit bacab322ce)
2007-10-10 12:56:02 -05:00
Andrew Tridgell
b63cd185b9 r838: got rid of rpc_misc.h
(This used to be commit f61d333b2a)
2007-10-10 12:53:54 -05:00
Andrew Tridgell
d62e63304d r837: get rid of some more old rpc headers, and the genparser headers
(This used to be commit 3068b766ed)
2007-10-10 12:53:54 -05:00
Andrew Tridgell
fa62ea0853 r836: get rid of SEC_DESC and related structure definitions
(This used to be commit d75fcbf068)
2007-10-10 12:53:54 -05:00
Andrew Tridgell
f11cc69df3 r826: removed a pile of old code, in preparation for a new ACL handling system. I'd like to get rid of DOM_SID completely soon
(This used to be commit e306e27cf3)
2007-10-10 12:53:53 -05:00
Andrew Tridgell
c5e11daa8b r818: added server side SMB signing to Samba4
(This used to be commit 8e5ddf5e8e)
2007-10-10 12:53:52 -05:00
Andrew Bartlett
031f5ee0cb r707: Chainsaw work - SAM_ACCOUNT can die, along with passdb
Andrew Bartlett
(This used to be commit bd0e6c9983)
2007-10-10 12:53:44 -05:00
Andrew Bartlett
d12e825042 r685: The SAM is dead! Long live the new SAM! ;-)
This commit kills passdb, which was only hosting the auth subsystem.

With the work tridge has done on Samba4's SAM backend, this can (and
now is) all hosted on ldb.  The auth_sam.c file now references this
backend.

You will need to assign your users passwords in ldb - adding a new line:

unicodePwd: myPass

to a record, using ldbedit, should be sufficient.  Naturally, this
assumes you have had your personal SAMR provisioning tutorial from
tridge.  Everybody else can still use the anonymous logins.

Andrew Bartlett
(This used to be commit 2aa0b55fb8)
2007-10-10 12:53:42 -05:00
Andrew Bartlett
03631a6d1f r683: Remove the trailing ; from this macro, so it can be used in an 'if' expression.
(This used to be commit 3813517a8b)
2007-10-10 12:53:42 -05:00
Stefan Metzmacher
f236700ef6 r665: merge over the new build system from my tmp branch
to the main SAMBA_4_0 tree.

NOTE: that it's not completely ready, but it's functional:-)

metze
(This used to be commit c78a2ddb28)
2007-10-10 12:53:36 -05:00
Andrew Bartlett
c041077856 r614: Clean out the POSIX assumptions from the Samba4 auth subsystem.
This removes the code that tried to lookup posix groups, as well as
the code that was tied to the SAM_ACCOUNT.

This should make auth_ldb much easier to write :-)

Andrew Bartlett
(This used to be commit e096ee2112)
2007-10-10 12:51:51 -05:00
Andrew Bartlett
dce84ffd37 r610: - Merge the Samba3 'ntlm_auth --diagnostics' testsuite to Samba4.
- This required using NETLOGON_NEG_AUTH2_FLAGS for the
    SetupCredentials2 negotiation flags, which is what Samba3 does,
    because otherwise the server uses different crypto.
  - This tests the returned session keys, which we decrypt.

 - Update the Samba4 notion of a 'session key' to be a DATA_BLOB in
   most places.

 - Fix session key code to return NT_STATUS_NO_SESSION_KEY if none is
   available.

 - Remove a useless argument to SMBsesskeygen_ntv1

 - move netr_CredentialState from the .idl to the new credentials.h

Andrew Bartlett
(This used to be commit 44f8b5b53e)
2007-10-10 12:51:51 -05:00
Andrew Tridgell
54a695f7ed r601: added the server code for all the samr_SetUserInfo and samr_QueryUserInfo levels except for the password
set levels.

This means that a large part of the RPC-SAMR torture test now runs correctly against Samba4
(This used to be commit ec0a51898f)
2007-10-10 12:51:50 -05:00
Andrew Tridgell
2fdf5d332d r575: moved the SID_NAME_USE enum into samr.idl
(This used to be commit 2cb06b39d9)
2007-10-10 12:51:47 -05:00
Andrew Tridgell
7e921fb96d r549: added support for DOS error codes in NTSTATUS returns. This uses a
range of NTSTATUS codes that are normally invalid to prevent conflicts
with real error codes.

use the new DOS facility to fix the ERRbaduid return that volker found
(This used to be commit 10fdfb5239)
2007-10-10 12:51:47 -05:00
Andrew Tridgell
722e301591 r503: we don't need to include ldb_parse.h any more
(This used to be commit 85e57684b4)
2007-10-10 12:51:45 -05:00
Andrew Bartlett
9f084101dd r443: Update Samba4 to the auth and NTLMSSP code from Samba3.
Not all the auth code is merged - only those parts that are actually
being used in Samba4.

There is a lot more work to do in the NTLMSSP area, and I hope to
develop that work here.  There is a start on this here - splitting
NTLMSSP into two parts that my operate in an async fashion (before and
after the actual authentication)

Andrew Bartlett
(This used to be commit 5876c78806)
2007-10-10 12:51:42 -05:00
Andrew Tridgell
31d44e3682 r359: moved the share type definitions to srvsvc.idl
I'd like to see more protocol defininitions in the IDL files and less
in smb.h where possible.
(This used to be commit 854b875bbe)
2007-10-10 12:51:34 -05:00
Jeremy Allison
763c4bc9ac r204: Turns out that the string in the SEARCH unix_info level is that
rare thing, a non-length string (ie. not a WIRE_STRING) but a null
terminated char string. There wasn't a good interface to pull that
out of a blob (all the string interfaces assumed WIRE_STRINGS). Added
a new one, only used for this call. Sucks, I know - but the alternatives
suck more. Added tests for some of the unix info returned.
Jeremy.
(This used to be commit 4d0ed04c54)
2007-10-10 12:51:16 -05:00
Jeremy Allison
00cedc0c04 r189: Added UNIX search into tests - added client library parse code.
Jeremy.
(This used to be commit a25ae9addb)
2007-10-10 12:51:15 -05:00
Jeremy Allison
b560bf5361 r184: Fix UNIX Search info level. This still needs to be added to the raw
client library before this test can work.
Jeremy.
(This used to be commit 7b2a266543)
2007-10-10 12:51:15 -05:00
Andrew Tridgell
ac193579e7 r152: a quick airport commit ....
added ldbedit, a _really_ useful command

added ldbadd, ldbdel, ldbsearch and ldbmodify to build

solved lots of timezone issues, we now pass the torture tests with
client and server in different zones

fixed several build issues

I know this breaks the no-LDAP build. Wait till I arrive in San Jose for that
fix.
(This used to be commit af34710d4d)
2007-10-10 12:51:11 -05:00
Richard Sharpe
177777b055 r141: A number of changes to get things working on FreeBSD and reduce the breakage
caused by someone recently ...

1. Add configure check HAVE_COMPARISON_FN_T to see if this is defined. I
have not checked this on Linux yet, but will do so soon.

2. Add the definitions of malloc_p, realloc_p etc.

3. Check for LDAP and don't build stuff that depends on LDAP if we don't\
have it.

It currently builds on FreeBSD but there is one warning printed out at the end.
(This used to be commit 7b34fbe0f2)
2007-10-10 12:51:11 -05:00
Andrew Tridgell
42889e5e1e r134: - added ldb to the build of smbd
- fixed build of the ldb registry backend
(This used to be commit 0b66590330)
2007-10-10 12:51:10 -05:00
Jelmer Vernooij
aebfb3b9f4 r128: Another registry update. Changes:
- Start with the LDB backend
- The API is now more windows-like, which should make it easier to use
  in rpc_server
- Added a GTK+ front-end
- Added some more IDL

More updates will follow, especially in the RPC field..
(This used to be commit 3adffa0217)
2007-10-10 12:51:09 -05:00
Andrew Tridgell
a8a42e7f53 r100: remember the user session key during session setup so it can be used in various crypto
routines
(This used to be commit f6cf9020c8)
2007-10-10 12:51:06 -05:00
Gerald Carter
381a903d00 r42: importing .cvsignore files
(This used to be commit 11717ae912)
2007-10-10 12:50:40 -05:00
Jelmer Vernooij
c424c2b857 r20: Add the registry library. Still needs a lot of work,
see source/lib/registry/TODO for details.
(This used to be commit 7cab3a00d7)
2007-10-10 12:50:33 -05:00
Andrew Tridgell
9403f3dc7e switch from SIG_ATOMIC_T to sig_atomic_t
(This used to be commit b881b72cb9)
2004-03-28 01:57:28 +00:00
Stefan Metzmacher
64cdbddbc1 don't inlcude rpc/rpc.h and rpcsvc/*.h anymore
and remove NET_GROUP stuff, this needs to be implemented
in a better way if we ever readd this

metze
(This used to be commit da5f22976f)
2004-02-18 15:31:25 +00:00
Stefan Metzmacher
932026724f remove unused NISPLUS/AUTOMOUNT stuff
metze
(This used to be commit cbfa29549e)
2004-02-18 13:55:15 +00:00
Stefan Metzmacher
9a8cd1aa27 move the tdb lib code to lib/tdb/*
metze
(This used to be commit 5ebd6fb761)
2004-02-12 15:59:16 +00:00
Andrew Tridgell
078cced5ec - modified the dcerpc client security code to be generic, so ntlmssp
and schannel are both instances of possible security modules

- added schannel sign and sign/seal support to the dcerpc client
  code. You select it with binding options of "schannel,sign" or
  "schannel,seal".
(This used to be commit 05db0b9d94)
2004-02-10 10:22:12 +00:00
Stefan Metzmacher
009fa83b13 move include/ntvfs.h to ntvfs/ntvfs.h
metze
(This used to be commit 041dc8c83d)
2004-02-03 11:18:54 +00:00
Stefan Metzmacher
1c798aba40 - port AUTH and PASSDB subsystems to new
SMB_SUBSYSTEM() scheme

- some const fixes in ntvfs

metze
(This used to be commit af89a78123)
2004-02-03 11:10:56 +00:00
Stefan Metzmacher
a8152b68a0 do some merging from 3.0
metze
(This used to be commit 47a240d7b8)
2004-02-03 06:37:28 +00:00
Stefan Metzmacher
b2f097ad38 remove some unused stuff
metze
(This used to be commit d634a78fae)
2004-02-02 14:48:40 +00:00
Stefan Metzmacher
c61089219b - we now specify the object files in the subsystems config.m4 file
I plan to convert all objectfile group to use SMB_SUBSYSTEM
  later I'll add a SMB_BINARY() and SMB_LIBRARY(), then there will be no more need
  to touch Makefile.in, because all make rules will be autogenerated by configure

- convert the PROCESS_MODEL subsystem to this new scheme
  and move the pthread test to smbd/process_model.m4

- convert the CHARSET subsystem to this new scheme
  and move the iconv test to lib/iconv.m4
(This used to be commit 2e57ee884e)
2004-02-02 13:43:03 +00:00
Stefan Metzmacher
670ccc7d64 merge:
ldap and krb5 configure tests
libads/*.c and libcli/raw/clikrb5.c from 3.0

metze
(This used to be commit 64b5bfcd73)
2004-02-01 11:26:25 +00:00
Stefan Metzmacher
a5ece462ab remove a lot of unused stuff from the header files
and exclude some files from Makefile.in

metze
(This used to be commit f77990cf24)
2004-01-28 18:54:36 +00:00
Stefan Metzmacher
d70b4a07bf remove autogenerated version.h from CVS
metze
(This used to be commit e7694095d3)
2004-01-28 12:49:32 +00:00
Stefan Metzmacher
e06687eb17 merge the version.h autogeneration stuff from 3.0
metze
(This used to be commit 24dc237e10)
2004-01-28 12:47:52 +00:00
Stefan Metzmacher
8a102d1aae remove all unused stuff from Makefile.in
and some stuff from configure.in and dynconfig.[ch]

make all

makes
bin/gentest   bin/masktest   bin/smbd
bin/locktest  bin/smbclient  bin/smbtorture
bin/ndrdump

now

metze
(This used to be commit e0043693a6)
2004-01-19 14:22:32 +00:00
Andrew Tridgell
7779b1e000 added support for big-endian ucs2 strings (as used by big-endian
msrpc).

this was easier than I expected!
(This used to be commit a0a51af6b7)
2003-12-16 09:20:34 +00:00
Andrew Tridgell
24c22aef90 a fairly large commit!
This adds support for bigendian rpc in the client. I have installed
SUN pcnetlink locally and am using it to test the samba4 rpc
code. This allows us to easily find places where we have stuffed up
the types (such as 2 uint16 versus a uint32), as testing both
big-endian and little-endian easily shows which is correct. I have now
used this to fix several bugs like that in the samba4 IDL.

In order to make this work I also had to redefine a GUID as a true
structure, not a blob. From the pcnetlink wire it is clear that it is
indeed defined as a structure (the byte order changes). This required
changing lots of Samba code to use a GUID as a structure.

I also had to fix the if_version code in dcerpc syntax IDs, as it
turns out they are a single uint32 not two uint16s.

The big-endian support is a bit ugly at the moment, and breaks the
layering in some places. More work is needed, especially on the server
side.
(This used to be commit bb1af644a5)
2003-12-16 09:02:58 +00:00
Andrew Tridgell
1abd0be41e more mutex portability.
(This used to be commit 42dd8d888a)
2003-12-16 03:45:04 +00:00
Andrew Tridgell
2c6b585f2d more portability fixes. We now almost compile on solaris
(This used to be commit f4abd20b84)
2003-12-16 03:34:23 +00:00
Andrew Tridgell
ff6478bb4a use smb_rwlock_t instead of rwlock_t to avoid conflicts with system
types on some platforms (eg. solaris)
(This used to be commit ac8a23af8c)
2003-12-16 03:27:36 +00:00
Andrew Tridgell
727c3bfdeb make sure we have a value for DEFAULT_PRINTING on all platforms
(This used to be commit d0bef33ffa)
2003-12-16 02:59:30 +00:00
Andrew Tridgell
d009dc61f9 ntlmssp over rpc over tcp now fully works
I needed to hack the ntlmssp code a little, as the auth code in samba4
is out of date relative to the samba3 auth code. I need to do a merge :)
(This used to be commit 6ee0935afe)
2003-12-14 10:45:50 +00:00
Andrew Tridgell
d262b8c3c7 completed the linkage between the endpoint mapper and the dcerpc
server endpoints. We can now successfully setup listening endpoints on
high ports, then use our endpoint mapper redirect incoming clients to
the right port.

also greatly cleanup the rpc over tcp session handling.
(This used to be commit 593bc29bbe)
2003-12-13 23:25:15 +00:00
Andrew Tridgell
d4705378ce dcerpc over tcp in the samba4 server now works to some extent. It
needs quite a bit more work to get it finished. The biggest missing
feature is the lack of NTLMSSP which is needed for basic
authentication over tcp
(This used to be commit 9fb0f03693)
2003-12-13 10:58:48 +00:00
Andrew Tridgell
340d9b71f9 added a basic dcerpc endpoint mapper to Samba4. Currently only
implements the epm_Lookup() call, I'll add the other important calls
soon. I was rather pleased to find that epm_Lookup() worked first
time, which is particularly surprising given its complexity.

This required quite a bit of new infrastructure:

  * a generic way of handling dcerpc policy handles in the rpc server

  * added type checked varients of talloc. These are much less error
    prone. I'd like to move to using these for nearly all uses of
    talloc.

  * added more dcerpc fault handling code, and translation from
    NTSTATUS to a dcerpc fault code

  * added data_blob_talloc_zero() for allocating an initially zero
    blob

  * added a endpoint enumeration hook in the dcerpc endpoint server
    operations
(This used to be commit 3f85f9b782)
2003-12-13 02:20:40 +00:00
Andrew Tridgell
16309de71d * the RPC-ECHO pipe now works in smbd, as long as the data sizes
don't cause fragmented pdus (I'll add fragments shortly)

 * change data_blob_talloc() to not zero memory when the 2nd argument
   is NULL. The zeroing just masks bugs, and can't even allow a DOS
   attack

 * modified pidl to ensure that [ref] arguments to the out side of
   functions are allocated when parsing the in side. This allows rpc
   backends to assume that [ref] variables are all setup. Doesn't work
   correctly for [ref] arrays yet

 * changed DLIST_ADD_END() to take the type instead of a tmp
   variable. This means you don't need to declare a silly tmp variable in
   the caller
(This used to be commit 46e0a35819)
2003-12-12 03:59:09 +00:00
Andrew Tridgell
fcc4efd1ea the next step in the dcerpc server code. Added the link between the
IPC IO routines and the dcerpc endpoint servers.
(This used to be commit 4929c53bc8)
2003-12-11 09:07:45 +00:00
Andrew Tridgell
2bde98c0ee the rest of the initial rpc server side infrastructure
(This used to be commit 5fb01b0ec0)
2003-12-10 22:24:33 +00:00
Andrew Tridgell
3c76426f2e * removed some unused code
* updated tdb to latest version from Samba3

 * removed some extraneous ';' in tdbutil.c (Thanks to Erlend Aasland
   for pointing this out)
(This used to be commit f3eaf270e5)
2003-12-10 03:02:12 +00:00
Andrew Tridgell
2e5ae6f065 * added a debug thread id hook from jim myers
* change to select() from sys_select() in events.c, as sys_select() is
  not thread safe. We need a new unified signal handling scheme for
  Samba4, but for now just use select()
(This used to be commit 126fcd4a76)
2003-12-04 09:52:14 +00:00
Andrew Tridgell
926240428c * patch based on work by Jim Myers to unify the ioctl handling to be
more like the other major SMB functions

* added SMBntrename code
(This used to be commit f2d3dc9893)
2003-12-04 02:03:06 +00:00
Andrew Tridgell
eaa02c7e0d some OSes already have a uint_t
(This used to be commit d7b6aa1e2e)
2003-12-04 01:17:59 +00:00
Andrew Tridgell
c290906b3f make sure we can expand the critical versions structure without
causing crashes in old modules. Thanks to metze for pointing this out!
(This used to be commit 2ee5540629)
2003-12-02 09:16:53 +00:00
Andrew Tridgell
f9419900d3 initial netlogon database sync partly works - needs some IDL tweaks
(This used to be commit 75ea276c14)
2003-12-02 04:05:05 +00:00
Andrew Tridgell
cfd41af814 removed more old code
(This used to be commit fbccf58539)
2003-12-01 00:38:30 +00:00
Andrew Tridgell
8d92b0a392 got rid of more group mapping code
(This used to be commit 2955ce55ee)
2003-12-01 00:29:13 +00:00
Andrew Tridgell
7602aa50fd * got rid of UNISTR2 and everything that depends on it
* removed a bunch of code that needs to be rewritten using the new
    interfaces
(This used to be commit 9b02b486ef)
2003-12-01 00:17:30 +00:00
Andrew Tridgell
c95ae2d890 more unused headers
(This used to be commit 39b726d068)
2003-11-30 11:45:08 +00:00
Andrew Tridgell
e01b018359 got rid of a bunch of unused header files (now replaced with IDL
generated headers)
(This used to be commit 7f2ac326f9)
2003-11-30 11:39:03 +00:00
Andrew Tridgell
e0ac659917 signed DCERPC over TCP now works !
* moved ntlmssp code into libcli/auth/, and updated to latest ntlmssp
   code from samba3 (thanks Andrew! the new interface is great)

 * added signing/ntlmssp support in the dcerpc code

 * added a dcerpc_auth.c module for the various dcerpc auth mechanisms
(This used to be commit c18c9b5585)
2003-11-26 01:16:41 +00:00
Jelmer Vernooij
a846e59205 CVS: ----------------------------------------------------------------------
CVS: Enter Log.  Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS: 	Makefile.in configure.in include/includes.h include/ntvfs.h
CVS: 	include/smb.h lib/iconv.c lib/module.c ntvfs/ntvfs_base.c
CVS: 	ntvfs/cifs/vfs_cifs.c ntvfs/ipc/vfs_ipc.c
CVS: 	ntvfs/posix/vfs_posix.c ntvfs/print/vfs_print.c
CVS: 	ntvfs/reference/vfs_ref.c ntvfs/simple/vfs_simple.c
CVS: 	passdb/pdb_interface.c
CVS: Added Files:
CVS: 	include/module.h
CVS: ----------------------------------------------------------------------
Update to the modules system. Fixed:
 - get rid of smb_probe_module
 - merge older updates from 3.0
 - introduced register_subsystem() and register_backend() functions
 - adapt ntvfs and charset to use new register functions
 - made smb_load_modules() work recursively (e.g. 'preload modules = /usr/lib/samba')
 - got rid of some old remains

Things that still need work:
 - Did I break tankFS? I don't think so, but I can't test it here :-(
 - Add 'postload modules = ' (for modules that need to be loaded after fork() in smbd, if applicable)
 - Convert RPC, auth, passdb, etc to use new register_{subsystem,backend}() functions
 - Accept wildcards in 'preload modules' option, instead of loading recursively
(This used to be commit 7512b9ab1a)
2003-11-25 03:15:26 +00:00
Andrew Tridgell
231ae2430e get rid of some more unused headers
(This used to be commit 48276c768b)
2003-11-23 03:10:50 +00:00
Andrew Tridgell
d47d14f2ff reduced the number of magic types we need in mkproto.pl
In general I prefer "struct foo" to just "foo" for most
structures. There are exceptions.
(This used to be commit 04eb12b56c)
2003-11-23 01:53:54 +00:00
Andrew Tridgell
d285c6f14f * add another WERR err code
* use the top-level function argument printing to show more detail in
   RPC-* tests
(This used to be commit 33bb878562)
2003-11-17 11:55:56 +00:00
Andrew Tridgell
bf48b6e69a added OpenPrinter and a test function. Note that the Samba3 structure
for OpenPrinter was wrong.
(This used to be commit 186ddbbf87)
2003-11-17 03:38:13 +00:00
Andrew Tridgell
8830a20bce added 9 more info levels to lsa_QueryInfoPolicy
(This used to be commit b2ced24fc0)
2003-11-11 07:57:08 +00:00
Andrew Tridgell
4fa0f615f2 another major bit of restructuring of rpc in Samba4. Mostly moving
files around, but also added the first bits of auto-generated code for
the lsa pipe.

I haven't updated the Makefile to call pidl yet, so for now the code
was cut-and-pasted into librpc/ndr/ndr_lsa.c manually
(This used to be commit 6b222d3b65)
2003-11-06 12:34:04 +00:00
Andrew Tridgell
dc2ffe07a8 started adding RPC-ECHO torture cases
(This used to be commit 8cff335dab)
2003-11-03 07:26:30 +00:00
Andrew Tridgell
c5cf474439 a major revamp of the low level dcerpc code in samba4, We can now do a
successful LSA OpenPolicy using smbtorture
(This used to be commit e925c315f5)
2003-11-03 06:22:45 +00:00
Andrew Tridgell
7fd381376f - a few portability fixes from Jim Myers
- added SMBD_LISTEN_BACKLOG in local.h

- added the beginnings of a ndr/rpc parsing framework for Samba4. It
  currently correctly parses security descriptors for the nttrans
  QUERY_SECDESC call, but I hope it will become a reasonable framework
  that an idl based generator can work to
(This used to be commit 9bf904fc34)
2003-10-30 08:32:26 +00:00
Tim Potter
06d58f8086 Add data structures for initial dcerpc support.
(This used to be commit 35ee9fdeab)
2003-10-28 10:21:36 +00:00
Tim Potter
931dc55390 Implement raw SMBtrans by backending the SMBtrans2 send code. Receive is
the same for trans and trans2.
(This used to be commit 7d21af3fdf)
2003-10-28 10:17:05 +00:00
Jelmer Vernooij
7699f3834f Remove obsolete file
(This used to be commit ac05e976f2)
2003-09-29 21:59:18 +00:00
Andrew Tridgell
0becf4d683 thanks to ntfsd and some google searches I worked out what the unknown
fields in level 261 and level 262 of directory search are, plus the
names of the levels

the unknown fields are a 64bit unique file id, and match the 64 bit
number from the internal_information qfileinfo level
(This used to be commit b69f54eb02)
2003-09-02 04:37:33 +00:00
Andrew Tridgell
11c5869a45 I think I've finally got the ascii/unicode issues right in trans2 find
first

Also expanded the rename test a little
(This used to be commit 723af7f097)
2003-08-31 03:16:52 +00:00
Andrew Tridgell
1c849248d4 fixed an enumerated type error found on irix
(This used to be commit 19acf60fce)
2003-08-15 17:34:49 +00:00
Herb Lewis
dcc8fcf9c0 IRIX already defines uint_t
(This used to be commit a019e54a46)
2003-08-15 17:19:26 +00:00
Herb Lewis
3ae6d32e5e signed bitfields cannot be 1 bit long
(This used to be commit 5fce80e757)
2003-08-15 17:15:05 +00:00
Herb Lewis
f24c298f43 rename mutex_t to smb_mutex_t to prevent name collision
(This used to be commit d32f149592)
2003-08-15 17:13:41 +00:00
Herb Lewis
2efe201fa4 client/client.c - cannot initialize struct with non-const values
include/byteorder.h - fix for IRIX compiler - cannot cast an LVALUE
include/smb_interfaces.h - remove empty structure
source/lib/debug.c - void functions cannot return value
libcli/clifile.c - cannot assign *struct to struct
(This used to be commit 9a72476201)
2003-08-14 21:56:26 +00:00
Andrew Tridgell
89f55d36f3 added the ancient SMBcreate operation to the testsuite and client lib
(This used to be commit 3eef35e581)
2003-08-14 01:31:31 +00:00
Andrew Tridgell
4b3d329ca2 - added a raw smb scanner
- its not a root_fid in ntrename
(This used to be commit 74be55efdc)
2003-08-13 22:23:18 +00:00
Andrew Tridgell
786d9dfe55 process_model.h is not used at all - hangover from earlier design
(This used to be commit 6b49bc41d4)
2003-08-13 18:09:36 +00:00
Andrew Tridgell
75c0125fb7 - added SMBntrename test suite
- allow username of form DOMAIN\username or DOMAIN/username

- added ntrename to gentest
(This used to be commit 2b464472c1)
2003-08-13 16:04:21 +00:00
Andrew Tridgell
b05a2aad54 add support for 32 bit pid using the PIDHIGH field. This allows the
test suite to see if it is supported. w2k3 doesn't seem to support it.
(This used to be commit c946be06a4)
2003-08-13 02:02:17 +00:00
Andrew Tridgell
ef2e26c91b first public release of samba4 code
(This used to be commit b0510b5428)
2003-08-13 01:53:07 +00:00