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

1438 Commits

Author SHA1 Message Date
Andrew Bartlett
dc9f55dbec r1294: A nice, large, commit...
This implements gensec for Samba's server side, and brings gensec up
to the standards of a full subsystem.

This means that use of the subsystem is by gensec_* functions, not
function pointers in structures (this is internal).  This causes
changes in all the existing gensec users.

Our RPC server no longer contains it's own generalised security
scheme, and now calls gensec directly.

Gensec has also taken over the role of auth/auth_ntlmssp.c

An important part of gensec, is the output of the 'session_info'
struct.  This is now reference counted, so that we can correctly free
it when a pipe is closed, no matter if it was inherited, or created by
per-pipe authentication.

The schannel code is reworked, to be in the same file for client and
server.

ntlm_auth is reworked to use gensec.

The major problem with this code is the way it relies on subsystem
auto-initialisation.  The primary reason for this commit now.is to
allow these problems to be looked at, and fixed.

There are problems with the new code:
- I've tested it with smbtorture, but currently don't have VMware and
  valgrind working (this I'll fix soon).
- The SPNEGO code is client-only at this point.
- We still do not do kerberos.

Andrew Bartlett
(This used to be commit 07fd885fd4)
2007-10-10 12:56:49 -05:00
Andrew Bartlett
a440e8f3b5 r1293: Indent
Andrew Bartlett
(This used to be commit 9002584c02)
2007-10-10 12:56:49 -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
118f3edd27 r1291: rename struct smbsrv_context to smbsrv_connection
because this is the connection state per transport layer (tcp)
connection

I also moved the substructs directly into smbsrv_connection,
because they don't need a struct name and we should allway pass the complete
smbsrv_connection struct into functions

metze
(This used to be commit 60f823f201)
2007-10-10 12:56:49 -05:00
Stefan Metzmacher
b87fa55bdc r1286: rename struct tcon_context to smbsrv_tcon
metze
(This used to be commit a6c0ca9de5)
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
Tim Potter
f18fa1dfdb r1276: Return data for enumprinters level 2 and 5.
(This used to be commit cf4e9080d5)
2007-10-10 12:56:48 -05:00
Tim Potter
7e23efedd7 r1275: Make spoolss_PrinterInfo2 and spoolss_PrinterInfo5 public so we can
use them in the enumprinters server code.
(This used to be commit 5fcba0aa20)
2007-10-10 12:56:48 -05:00
Stefan Metzmacher
25bf685da5 r1274: revert -r 1239 as discussed with abartlet
metze
(This used to be commit 52e2d03825)
2007-10-10 12:56:48 -05:00
Vance Lankhaar
4cc054b4f9 r1273: An initial doc about what I'd like to see in the swat for samba4. Please
add to it, delete from it, etc. I really want have some discussion about it
before we go ahead and start implementing it.

Vance
(This used to be commit 822d7a4a48)
2007-10-10 12:56:48 -05:00
Tim Potter
674414c5b8 r1271: Return spoolss enumprinters info level1 from spoolss.ldb - woot!
(This used to be commit 60e48790dc)
2007-10-10 12:56:47 -05:00
Tim Potter
d2ac885df0 r1270: Start to break samdb into general bits so we can share code with other
similar dbs.
(This used to be commit 1162e2fcff)
2007-10-10 12:56:47 -05:00
Tim Potter
638d332495 r1269: Add a 'base' field to the ndr_ofs_list structure which is the base to
which the offset applies to.  In an array of structures containing
relative members, the offset applies to the start of the array element
being marshalled.  Previously, there was no way to access the relevant
structure start as by the time we have hit buffers, the head of the
offset list will be the last structure being marshalled.

Interestingly enough, this makes relstrs go away.  I think we thought
they were a special case in samba 3 but it turns out they are just
regular relative elements in the idl.  This makes spoolss a lot simpler
than I thought it would be.

I've run the samr and lsa tests and this doesn't seem to break anything.
It looks like security descriptors are the only structures that contain
relative members.

Oh yeah, this will probably require a 'make clean && make' otherwise you
will get bizzare errors.
(This used to be commit d379dcdfd5)
2007-10-10 12:56:47 -05:00
Tim Potter
37fcf22364 r1268: varient -> variant
(This used to be commit de5984c956)
2007-10-10 12:56:46 -05:00
Tim Potter
27f245a219 r1266: Start to split out EnumPrinters into a separate fn for each info level.
(This used to be commit 6b24ee3864)
2007-10-10 12:56:46 -05:00
Tim Potter
cbf6caa716 r1264: Make sure to initialize ofs_list when creating new ndr_{push,pull}
structures.
(This used to be commit 6a39b17f6d)
2007-10-10 12:56:46 -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
Stefan Metzmacher
81db9ef442 r1239: move the old msrpc_<gen|parse>() functions to ndr_<push|pull>_format_blob()
simular to ndr_<push|pull>_struct_blob()

metze
(This used to be commit b25dd341e0)
2007-10-10 12:56:46 -05:00
Stefan Metzmacher
db8c78c497 r1235: as the pidl code init all output data.
we should do it manualy too.

metze
(This used to be commit d3b80fd40a)
2007-10-10 12:56:46 -05:00
Stefan Metzmacher
cf5fdae640 r1234: valgrind found this uninitialised var...
But I don't know how to fix this correct,
so maybe this needs to be fixed

(tridge: can you please look at this)

metze
(This used to be commit b8b4d0d5bf)
2007-10-10 12:56:46 -05:00
Stefan Metzmacher
f89a67e345 r1233: -move smb related code to smb_server/*
-move process_model code to smbd/process_model.c
-remove some used code

metze
(This used to be commit 10dd848729)
2007-10-10 12:56:46 -05:00
Stefan Metzmacher
68e8c18e33 r1229: the name of the protocol should be in first place of a function name
rename <read|write|free>_spnego_data() into
spnego_<read|write|free>_data

metze
(This used to be commit 3f57c8f596)
2007-10-10 12:56:46 -05:00
Stefan Metzmacher
121e074232 r1228: use int64_t instead of long long
(jra: please use: void, char int, uint_t, [u]int<8|16|32|64>_t types in new code)

metze
(This used to be commit 626bb153c4)
2007-10-10 12:56:45 -05:00
Stefan Metzmacher
1f1a511a27 r1227: use uint64_t instead of unsigned long long
metze
(This used to be commit 238acc5acf)
2007-10-10 12:56:45 -05:00
Tim Potter
a38429269e r1226: Return dummy information for two printers. Note that ndr_push_array()
can be used here - neat!
(This used to be commit 5d0013438e)
2007-10-10 12:56:45 -05:00
Tim Potter
c400f86707 r1211: Some output from rpcclient -c enumprinters to remind me what a relative
string looks like.  I'm not sure relstrs can be shoehorned into the ndr
code as easily as adding a LIBNDR_STR flag.
(This used to be commit e216c6a707)
2007-10-10 12:56:45 -05:00
Tim Potter
fea69453bd r1210: A skeleton spoolssdb, based on samdb.
(This used to be commit 487211f1ae)
2007-10-10 12:56:45 -05:00
Tim Potter
77c5719864 r1208: Return some dummy printer information for the EnumPrinters RPC.
rpcclient enumprinters prints this information OK.

Some minor cut&paste cleanups.
(This used to be commit 1c749a3a34)
2007-10-10 12:56:45 -05:00
Tim Potter
7936b76e6a r1207: Add spoolss to the list of endpoint servers.
(This used to be commit 2b9f364ed0)
2007-10-10 12:56:45 -05:00
Tim Potter
5c72db907e r1206: Give the spoolss pipe an endpoint.
Make PrinterInfo1 struct public so we can call the push function in
spoolss_EnumPrinters().
(This used to be commit f4309f3ced)
2007-10-10 12:56:45 -05:00
Tim Potter
766d7dd202 r1205: Whoops - this should fix the build.
(This used to be commit e21f324937)
2007-10-10 12:56:45 -05:00
Tim Potter
62aabf5630 r1204: decrpc -> dcerpc
(This used to be commit a5e3a26fc9)
2007-10-10 12:56:45 -05:00
Tim Potter
f1eef54ba8 r1201: Skeleton versions of OpenPrinterEx() and ClosePrinter() to get the hang
of things.
(This used to be commit 3e79a6219e)
2007-10-10 12:56:44 -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
8cb41badd4 r1199: Make talloc_asprintf_append() work on a NULL source string as if it were
just a alloc_asprintf().

(makes it easier to use in a loop)

Andrew Bartlett
(This used to be commit 5816d09c47)
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
Andrew Bartlett
bc2fd488f1 r1197: Fix my build breakage, variables at the top of a block only...
Andrew Bartlett
(This used to be commit 57ca89eab3)
2007-10-10 12:56:44 -05:00
Andrew Bartlett
aba5a2df32 r1196: Remove unused pstring/fstring functions.
Andrew Bartlett
(This used to be commit 4f06bf4ab8)
2007-10-10 12:56:44 -05:00
Andrew Bartlett
d46b9aa96f r1189: Now that we use a common 'base' return structure for the SamLogon
call, avoid code duplication in the torture suite.

Andrew Bartlett
(This used to be commit b6128c2a9d)
2007-10-10 12:56:44 -05:00
Tim Potter
4e4c3d4bea r1188: Use generated pidl template for this file and return DCESRV_FAULT instead
of a bogus WERROR.
(This used to be commit 261531ce0a)
2007-10-10 12:56:44 -05:00
Andrew Bartlett
3e152fcd5b r1187: * Remove testing hack (actually check signatures on NTLM2).
* Remove unreached counter increment

* Print the correct NTLMSSP key.
(This used to be commit b967006954)
2007-10-10 12:56:44 -05:00
Andrew Bartlett
5c3afaf856 r1186: Clarify why this is a 'bogus' negitive test. If we pass it, we may
still be broken.

Andrew Bartlett
(This used to be commit da5f311732)
2007-10-10 12:56:43 -05:00
Tim Potter
84a52084c2 r1185: Hey look an endpoint for the spoolss pipe!
Doesn't do much at the moment except compile.
(This used to be commit ed9c4d7d70)
2007-10-10 12:56:43 -05:00
Tim Potter
1d93403a91 r1174: Remove $var_prefix parameter for all functions. We don't need it for
ethereal.
(This used to be commit bf8e255d2e)
2007-10-10 12:56:43 -05:00
Andrew Bartlett
1f31eccdad r1173: A quick little test to show that we cannot bind twice to a single endpoint.
Andrew Bartlett
(This used to be commit e12ad47c69)
2007-10-10 12:56:43 -05:00
Andrew Bartlett
dd711fee21 r1170: Remove bogus part of previous commit - session keys, even in NTLMSSP
are variable length.

Remove extra casts

Andrew Bartlett
(This used to be commit 84f86b83f8)
2007-10-10 12:56:43 -05:00