1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-07 01:58:28 +03:00

475 Commits

Author SHA1 Message Date
Stefan Metzmacher
509be8d902 r11781: rename tree to tcons to match the sessions substructure of smbsrv_connection
metze
(This used to be commit acd3e644e030a3544ddc6cdcd4e0ec9617732cba)
2007-10-10 13:46:26 -05:00
Stefan Metzmacher
4f10246cac r11778: - remove unused memory contexts as req is already the temporary context for the current request
- just use '0', I'll remove the UID_FIELD_INVALID macro completly later
- why search for the session we have just create
- add TODO notices, I need to dicuss them with abartlet...

metze
(This used to be commit 4bceb94749fba3138c492bed2733fad006affcc5)
2007-10-10 13:46:25 -05:00
Stefan Metzmacher
799724aae7 r11774: - move SMB specific initialisation of the smbsrv_connection out of smb_server.c
- add a generic incoming packet handler, which handles the first incoming packet
  and passes to the protocol specifc packet handler

metze
(This used to be commit f89deac1cb8a7e5651116d96b9a94d5cc8293076)
2007-10-10 13:46:25 -05:00
Stefan Metzmacher
58bf4b160e r11759: fix up the SEC_SHARE handling, when we want to support that later
we need to fake a smbsrv_session for each smbsrv_tcon...

metze
(This used to be commit 5b5fb1772034fbfebbb7174df235c8c11d4819fe)
2007-10-10 13:46:24 -05:00
Stefan Metzmacher
ace255a54b r11757: make smb_server.c independent from the protocol
metze
(This used to be commit b606d5664dde64412dc29c1499322c5de4c262d5)
2007-10-10 13:46:23 -05:00
Stefan Metzmacher
27b9d5652e r11746: revert my last commits, I now understand how we decide between
finished and non-finished sessions

metze
(This used to be commit 7cf6b307bc820b87663e4b9d1aeb5e730729b24e)
2007-10-10 13:46:21 -05:00
Stefan Metzmacher
5c35b41b87 r11745: one more check for a valid session
metze
(This used to be commit 92aae176fbde22bcc6fe58aa651d3d4a421fdf60)
2007-10-10 13:46:21 -05:00
Stefan Metzmacher
dae30e5b50 r11744: make sure the session is completed authenticated!!!
metze
(This used to be commit 0383218a00a8e744b70a3fa5056467a43fbe3a42)
2007-10-10 13:46:20 -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 96345b1c465c6cdf480f6e49d3c437cfe4d93c2c)
2007-10-10 13:46:18 -05:00
Andrew Tridgell
614950aed3 r11713: separate out the setting of the fde in the packet context from the
enabling of packet serialisation
(This used to be commit 6a47cd65a8b588f9ddd375c57caaba08281e7cbb)
2007-10-10 13:46:17 -05:00
Stefan Metzmacher
92b9b83b70 r11650: - as every call that goes down to the ntvfs layer need a valid tcon and session
ntcancel also needs to have AS_USER
- move the SIGNING_NO_REPLY logic as global option, because this needs to be set
  for the error replies too.
- as we currently don't know how to generate signatures for ntcancel replies
  we just skip the sending of the reply
- w2k3 first checks the VUID and then the TID, so we do now
- ntcreateX also uses ERRbaduid when getting a wrong VUID

metze
(This used to be commit d677ebf43d0d7e679ff11862683c993d887d9441)
2007-10-10 13:46:08 -05:00
Stefan Metzmacher
ca403dd4c6 r11646: fix typos
metze
(This used to be commit 0c520e19a0676c688341523add8a176c3aba8578)
2007-10-10 13:46:07 -05:00
Stefan Metzmacher
0b6370ea27 r11643: fix compiler warnings
metze
(This used to be commit 913d5356eb04d0fd02c36052b5cb6a2a5646473a)
2007-10-10 13:46:07 -05:00
Stefan Metzmacher
bd7525e1b4 r11641: remove unused parameter vuid
metze
(This used to be commit 9399e4d260011ce59229086e39585e1e56bd79a5)
2007-10-10 13:46:05 -05:00
Stefan Metzmacher
389f9dff29 r11640: just a nicer format, and make adding more special cases easier
metze
(This used to be commit 5fb5d1a864d9df0ac82fca145b51fdb27406bc97)
2007-10-10 13:46:05 -05:00
Stefan Metzmacher
a2d2128b8a r11637: we need a session and a tcon for ntioctl() and ntrename()
metze
(This used to be commit 3389544c2b14a044aed4a6d0ff966c0a2d92a61a)
2007-10-10 13:46:03 -05:00
Andrew Tridgell
b8f4d22ab5 r11621: some minor fixes from comments by metze
(This used to be commit 6ab808223475ba7c52dbe4d639af9a8e7f64b202)
2007-10-10 13:45:59 -05:00
Andrew Tridgell
5c620048e3 r11607: switched the smb server to use the generic packet send code
(This used to be commit 9eee7bafa12553a894536db8ce5cc2d268e09ae6)
2007-10-10 13:45:58 -05:00
Andrew Tridgell
7e963eb6e7 r11603: converted the smb server to use the new generic packet code
(This used to be commit 0fc496bb6f520ddf6d85cc2f3df80f93b871cfe9)
2007-10-10 13:45:57 -05:00
Andrew Bartlett
3dc75cc84f r11367: Ensure to intialise the new logon_parameters (0 for session setups).
Andrew Bartlett
(This used to be commit abff53b6339b7924ff705c7e3685135e85d8ed7a)
2007-10-10 13:45:26 -05:00
Jelmer Vernooij
4c5a4a7e02 r11244: Relative path names in .mk files
(This used to be commit 24e10300906c380919d2d631bfb3b8fd6b3f54ba)
2007-10-10 13:45:06 -05:00
Jelmer Vernooij
f4d590662e r11214: Remove scons files (see http://lists.samba.org/archive/samba-technical/2005-October/043443.html)
(This used to be commit 7fffc5c9178158249be632ac0ca179c13bd1f98f)
2007-10-10 13:45:03 -05:00
Andrew Bartlett
372ca26b20 r11200: Reposition the creation of the kerberos keytab for GSSAPI and Krb5
authentication.  This pulls the creating of the keytab back to the
credentials code, and removes the special case of 'use keberos keytab
= yes' for now.

This allows (and requires) the callers to specify the credentials for
the server credentails to GENSEC.  This allows kpasswdd (soon to be
added) to use a different set of kerberos credentials.

The 'use kerberos keytab' code will be moved into the credentials
layer, as the layers below now expect a keytab.

We also now allow for the old secret to be stored into the
credentials, allowing service password changes.

Andrew Bartlett
(This used to be commit 205f77c579ac8680c85f713a76de5767189c627b)
2007-10-10 13:45:00 -05:00
Volker Lendecke
929de6af34 r11120: calling_name is used later in sesssetup_nt1, so hang the names to the right
talloc context.

Volker
(This used to be commit 256cf928d786b2533953505aea20ec80a25c6929)
2007-10-10 13:44:53 -05:00
Andrew Bartlett
18bb363537 r10946: Use the right name for the remote workstation, and always initialise it.
Should fix a valgrind error volker is seeing.

Andrew Bartlett
(This used to be commit 11957c5f37fe0a0be465a9ce9d6d256724c5951c)
2007-10-10 13:39:44 -05:00
Jelmer Vernooij
4abb479761 r10588: Remove more unused files, macros
(This used to be commit d2f80c0457f7404b2cac9df59a400130e9ad025f)
2007-10-10 13:39:08 -05:00
Jelmer Vernooij
5058f4b9e8 r10586: Add MergedObject() builder. Default to Library() rather
then StaticLibrary()
(This used to be commit b53313dc517986c69a4e4cb8fe3885b696f8faa1)
2007-10-10 13:39:08 -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 a5b88bcd420eb7ae42283293541519e142be36e3)
2007-10-10 13:38:58 -05:00
Jelmer Vernooij
6812c73534 r10348: Add scons scripts for remaining subsystems. Most subsystems build now,
but final linking still fails (as does generating files asn1, et, idl and proto
files)
(This used to be commit 4f0d7f75b99c7f4388d8acb0838577d86baf68b5)
2007-10-10 13:38:30 -05:00
Tim Potter
2082695e2e r10256: Fix some unhandled enumeration warnings. There's one still left,
RAW_SEARCH_UNIX_INFO find_fill_info(), which I think is a bug.
(This used to be commit 5f1cd6382cd90b1b33f645b1b2a469f4de4f42b9)
2007-10-10 13:38:12 -05:00
Alexander Bokovoy
1e59a8a24f r9321: Fix potential bug found by Coverity. src_len has to be int but later we do pass it as size_t. In case src_len is negative, we need to register a failure and return to the caller
(This used to be commit 95d96c79a538814bb524d7905e1e8f64df6341ca)
2007-10-10 13:33:24 -05:00
Andrew Tridgell
1f467c50d9 r8893: fixed the valgrind error on stream termination due to prototol errors
(This used to be commit cf1a7bbe96e8e40ac4df3eaa3e5922a944b45579)
2007-10-10 13:30:15 -05:00
Jelmer Vernooij
6553dd0c60 r8811: Fix the build..
(This used to be commit fac77f5fa267da57a55e88cad8993897e80741a0)
2007-10-10 13:30:07 -05:00
Andrew Bartlett
42287c6f97 r8706: My previous patch oversimplied the previous change to session setup -
we didn't cope with the 'anonymous NTLM under SPNEGO' login.

Andrew Bartlett
(This used to be commit c3cc14542e426b23e468a11803c1bab0f6fe290f)
2007-10-10 13:29:56 -05:00
Andrew Bartlett
b16362fab6 r8700: Propmted by tridge's need to do plaintext auth in ejs, rework the
user_info strcture in auth/

This moves it to a pattern much like that found in ntvfs, with
functions to migrate between PAIN, HASH and RESPONSE passwords.

Instead of make_user_info*() functions, we simply fill in the control
block in the callers, per recent dicussions on the lists.  This
removed a lot of data copies as well as error paths, as we can grab
much of it with talloc.

Andrew Bartlett
(This used to be commit ecbd2235a3e2be937440fa1dc0aecc5a047eda88)
2007-10-10 13:29:55 -05:00
Andrew Tridgell
4327a3f1ba r8658: move use of lp_security() and lp_nt_status_support() into the connection structure.
This massively reduces the number of lp_*() calls made
(This used to be commit b1d577f48d31c0c17ad0b6abd78120087408e58d)
2007-10-10 13:29:50 -05:00
Andrew Tridgell
174da76293 r8627: fixed a big memory leak in the spnego gensec code in session
setup. Andrew, please check over this.

What happens is this:

 - run the BASE-SECLEAK test
 - with each failed session setup using spnego a gensec ctx is leaked into the smb_conn structure
 - after the client disconnects these are finally cleaned up as they
   are all children of the connection structure
 - the cleanup of the millions of memory objects takes long enough
   that the next operation in test_posix.sh sometimes fails with a timeout

Andrew, can you also look at the talloc_reference() on line 332 of
sesssetup.c ? I suspect it isn't needed (I don't think it does any
actual harm though)
(This used to be commit b40fb6a4569ccc1fa1750a1e534e18a020764b4c)
2007-10-10 13:29:45 -05:00
Andrew Tridgell
a32fe0f293 r8577: added management calls to list current tree connects
(This used to be commit 658befc1e4df44bee1f365a730951001f0f36640)
2007-10-10 13:29:40 -05:00
Andrew Tridgell
25428433e3 r8574: added server side irpc calls for listing the current sessions
(This used to be commit 391cfe3c9645a19f8f5ff5c11b1ac03ee0b10f8f)
2007-10-10 13:29:39 -05:00
Andrew Tridgell
5033ce466c r8527: found an uninitialised variable in 'make valgrindtest'
(This used to be commit 9eebd240d8ed9a634307ce31696d817f78f503b2)
2007-10-10 13:29:35 -05:00
Andrew Tridgell
2bb9fa2875 r8487: kfixed a typo
(This used to be commit adae47c829fd157afa0011d29e5969d883a0956e)
2007-10-10 13:23:08 -05:00
Andrew Tridgell
c6881d1e65 r8272: added the hooks for adding a name to a messaging context, so we will
be able to send a message to the "ldap_server" task without having to
know its task ID.
(This used to be commit 8f69867867857e0c9a9246c2dec9612ccc234724)
2007-10-10 13:19:29 -05:00
Andrew Tridgell
8086371dbf r8119: fixed two error code returns in the smb server now that we have
torture code that can tell the difference between dos and ntstatus
codes without mapping
(This used to be commit 5521060c089c2181a2f3c7aeabd2f3ba813c6e60)
2007-10-10 13:19:10 -05:00
Stefan Metzmacher
7134b64292 r8028: fix a crash bug in ulogoff, when the tree_connect failed before
metze
(This used to be commit a2e34475d723eb74fc58b9afa9f4a863b1277b0d)
2007-10-10 13:19:00 -05:00
Andrew Tridgell
f39440e060 r7857: improved the handling of end-of-file on sockets in the smb server
(This used to be commit 6ee98c5f6505824826955f9d60a7964471fa6c26)
2007-10-10 13:18:43 -05:00
Andrew Tridgell
3dd67b9746 r7782: fixed an ordering problem with smb requests. I found this when I had "sam database"
set to the internal ldap server over loopback. The following happened:

  - DCERPC_AUTH3 request
     - auth requests calls ldb
     - ldb calls ldap
     - ldap calls our internal ldap server, triggering events
  - samrConnect from client
     - connect refused
  - SMBclose from client
     - causes dcerpc_pipe to be destroyed
  - AUTH3 continues
     - dies on freed pipe

I chose this solution as it provides a guarantee that backends only have to think about
async issues when they mark a request async. When they don't, this code guarantees that
a second request won't happen on the same connection while processing the first one
(This used to be commit 45487e8a1402c64d1c314befe8bd9f65587fd0d6)
2007-10-10 13:18:36 -05:00
Andrew Bartlett
8047db6e4b r7676: Make VUID and TID choice random, as this gives us protection against
replay attacks under SMB signing, where the session key is a fixed
derivitive of the user's password.

This removes the VID offset, but I'm not worried about random client
bytes mattering here, given the space (and the fact that it applies to
very, very old clients).

Andrew Bartlett
(This used to be commit eb1d37c5a91a6bc4515469e1ae026d28c12d7149)
2007-10-10 13:18:21 -05:00
Andrew Bartlett
b523bde499 r7675: Use correct memory context for anonymous session setup auth context
(no need for it to hang around forever).

Add test for this behaviour.

Andrew Bartlett
(This used to be commit 36dc2491d778fbbff32c4abdf95faa9f83024e12)
2007-10-10 13:18:21 -05:00
Andrew Tridgell
af237084ec r7633: this patch started as an attempt to make the dcerpc code use a given
event_context for the socket_connect() call, so that when things that
use dcerpc are running alongside anything else it doesn't block the
whole process during a connect.

Then of course I needed to change any code that created a dcerpc
connection (such as the auth code) to also take an event context, and
anything that called that and so on .... thus the size of the patch.

There were 3 places where I punted:

  - abartlet wanted me to add a gensec_set_event_context() call
    instead of adding it to the gensec init calls. Andrew, my
    apologies for not doing this. I didn't do it as adding a new
    parameter allowed me to catch all the callers with the
    compiler. Now that its done, we could go back and use
    gensec_set_event_context()

  - the ejs code calls auth initialisation, which means it should pass
    in the event context from the web server. I punted on that. Needs fixing.

  - I used a NULL event context in dcom_get_pipe(). This is equivalent
    to what we did already, but should be fixed to use a callers event
    context. Jelmer, can you think of a clean way to do that?

I also cleaned up a couple of things:

 - libnet_context_destroy() makes no sense. I removed it.

 - removed some unused vars in various places
(This used to be commit 3a3025485bdb8f600ab528c0b4b4eef0c65e3fc9)
2007-10-10 13:18:15 -05:00
Stefan Metzmacher
3b9dfb0da3 r7631: - remove unused function, as the disgn of samba4 doesn't allow the old style
auto homedir share stuff
- add TODO: for checking the password on share mode security

metze
(This used to be commit d9a0c61801f19e55a41c573ea96565946314ecb3)
2007-10-10 13:18:15 -05:00