1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00
Commit Graph

429 Commits

Author SHA1 Message Date
Jim McDonough
532fab74c1 New files for support of initshutdown pipe. Win2k doesn't respond properly
to all requests on the winreg pipe, so we need to handle this new pipe.

First part of fix for bug #534
0001-01-01 00:00:00 +00:00
Volker Lendecke
198b01fc54 Merge from 3_0:
In cli_lsa_lookup_sids don't leave the domain field uninitialized if
some sid could not be mapped. Otherwise this call is unnecessarily
complicated to call.

Volker
0001-01-01 00:00:00 +00:00
Jeremy Allison
aa7fb71357 Merge Volker's fix.
It's a perfectly valid condition to have zero alias members.

Jeremy.
0001-01-01 00:00:00 +00:00
Jim McDonough
3ca8240aff Add client side code to do endpoint map queries. Currently does one
fixed query.  Updates to come soon.
0001-01-01 00:00:00 +00:00
Simo Sorce
66074d3b09 split some security related functions in their own files.
(no need to include all of smbd files to use some basic sec functions)

also minor compile fixes
0001-01-01 00:00:00 +00:00
Gerald Carter
9d2e585e5e commit sign only patch from Andrew; bug 167; tested using 2k & XP clientspreviously joined to the Samba domain 0001-01-01 00:00:00 +00:00
Tim Potter
e2ab9e54cd Merge from 3.0:
>Fix for #480. Change the interface for init_unistr2 to not take a length
>but a flags field. We were assuming that 2*strlen(mb_string) == length of ucs2-le string.
>This is not the case. Count it after conversion.
>Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
585764305a fix some warnings found by the Sun C compiler 0001-01-01 00:00:00 +00:00
Gerald Carter
c17a7dc9a1 sync 3.0 into HEAD for the last time 0001-01-01 00:00:00 +00:00
Simo Sorce
3101c236b8 port latest changes from SAMBA_3_0 tree 0001-01-01 00:00:00 +00:00
Gerald Carter
e66541d0e1 fix the build. Ifdef out some code 0001-01-01 00:00:00 +00:00
Gerald Carter
adb98e7b7c trying to get HEAD building again. If you want the code
prior to this merge, checkout HEAD_PRE_3_0_0_BETA_3_MERGE
0001-01-01 00:00:00 +00:00
Tim Potter
dd063a298f Merge: clarify secure channel connection comment. 0001-01-01 00:00:00 +00:00
Jeremy Allison
30512b7d3e Fixes from Ronan Waide <waider@waider.ie> for large RPC writes.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
cb94b2b2d1 Minor cleanup of enum domain groups/aliases:
- return NT_STATUS_NO_MEMORY instead of NT_STATUS_UNSUCESSFUL if a
    talloc fails

  - don't try and tallocate memory when the number of entries returned was
    zero

  - rename some cut&pasted variable names in enum domain aliases function
0001-01-01 00:00:00 +00:00
Andrew Bartlett
6da9fd157b Always initialise this, to assist callers doing loops over this call.
Andrew Bartlett
0001-01-01 00:00:00 +00:00
Jeremy Allison
ec82e8e9f4 Fixes to make SCHANNEL work against a W2K DC. Still need to fix
multi-PDU encode/decode with SCHANNEL. Also need to test against WNT DC.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
6e6b7b79ed Store the type of 'sec channel' that we establish to the DC. If we are a
workstation, we have to use the workstation type, if we have a BDC account,
we must use the BDC type - even if we are pretending to be a workstation
at the moment.

Also actually store and retreive the last change time, so we can do
periodic password changes again (for RPC at least).

And finally, a couple of minor fixes to 'net'.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Tim Potter
27a608d6a3 Removed unused variables. 0001-01-01 00:00:00 +00:00
Tim Potter
a4704754d9 Fixed incorrect argument to debug. 0001-01-01 00:00:00 +00:00
Tim Potter
4ccd34ef83 A new RPC pipe! The \pipe\echo named pipe is for testing large RPC
requests and responses and is only compiled in when --enable-developer
is passed to configure.  It includes server and client side code for
generating and responding to functions on this pipe.  The functions are:

 - AddOne: add one to the uint32 argument and return ig
 - EchoData: echo back a variable sized char array to the caller
 - SourceData: request a variable sized char array
 - SinkData: send a variable sized char array and throw it away

There's a win32 implementation of the client and server in the
junkcode CVS repository in the rpcecho-win32 subdirectory.
0001-01-01 00:00:00 +00:00
Volker Lendecke
ecd0ee4d24 This is the netlogon schannel client code. Try a
rpcclient -S pdc -U% -c "samlogon user password"

and it should work with the schannel. Needs testing platforms
different from NT4SP6.

Volker
0001-01-01 00:00:00 +00:00
Volker Lendecke
6ac6b0f4c0 Auth2, not also Auth3 sends us flags back, although all the callers
ignore it.

Volker
0001-01-01 00:00:00 +00:00
Tim Potter
67bc6bccc2 SAMR lookupdomain rpc client patches from amber palekar <amber@nu3.net> 0001-01-01 00:00:00 +00:00
Andrew Bartlett
dcdc75ebd8 NTLM Authentication:
- Add a 'privileged' mode to Winbindd.  This is achieved by means of a directory
  under lockdir, that the admin can change the group access for.

- This mode is now required to access with 'CRAP' authentication feature.
- This *will* break the current SQUID helper, so I've fixed up our ntlm_auth
  replacement:
 - Update our NTLMSSP code to cope with 'datagram' mode, where we don't get a
   challenge.
 - Use this to make our ntlm_auth utility suitable for use in current Squid 2.5
   servers.
 - Tested - works for Win2k clients, but not Win9X at present.  NTLMSSP updates
   are needed.
 - Now uses fgets(), not x_fgets() to cope with Squid environment (I think
   somthing to do with non-blocking stdin).

- Add much more robust connection code to wb_common.c - it will not connect to
  a server of a different protocol version, and it will automatically try and
  reconnect to the 'privileged' pipe if possible.
  - This could help with 'privileged' idmap operations etc in future.

- Add a generic HEX encode routine to util_str.c,
- fix a small line of dodgy C in StrnCpy_fn()

- Correctly pull our 'session key' out of the info3 from th the DC.  This is
  used in both the auth code, and in for export over the winbind pipe to
  ntlm_auth.

- Given the user's challenge/response and access to the privileged pipe,
  allow external access to the 'session key'.  To be used for MSCHAPv2
  integration.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Martin Pool
8d64419625 Ignore .po and .po32 files. 0001-01-01 00:00:00 +00:00
Tim Potter
018733eedd More const fixes and flow on fixes from yesterday's const-fest. 0001-01-01 00:00:00 +00:00
Tim Potter
655c1e0351 Merge:
> Exit path cleanup for cli_samr_enum_dom_users()
0001-01-01 00:00:00 +00:00
Tim Potter
0bc1dfc68b Exit path cleanup for cli_samr_enum_dom_users() 0001-01-01 00:00:00 +00:00
Tim Potter
619af61644 Return a WERROR instead of a NTSTATUS like the rest of the srvsvc
rpc calls.
0001-01-01 00:00:00 +00:00
Jeremy Allison
4c3ee228fc Ensure that only parse_prs.c access internal members of the prs_struct.
Needed to move to disk based i/o later.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
f4f1f84a6b initial server side privileges implementation, using a tdb. This needs to be hooked into pdb, and we need some access control on changing privileges. That's next 0001-01-01 00:00:00 +00:00
Andrew Tridgell
3ddb5fb0dd added the 'lsaenumacctwithright' command to rpcclient. This allows you
to lookup what SIDs have a particular privilege (that is how
privileges are stored).
0001-01-01 00:00:00 +00:00
Andrew Bartlett
013fa87473 One more signed/unsigned fix 0001-01-01 00:00:00 +00:00
Tim Potter
2eea2813d9 Pass down max_size parameter to cli_samr_query_dispinfo() instead of
using a hardcoded value later on.

Added a helper function that returns the observed values for
max_entries and max_size for each cli_samr_query_dispinfo() call.
These values were obtained from watching the NT4 user manager
application with ethereal and are the only ones that can enumerate a
60k user domain reliably under Windows 2000.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
bf99440398 added LsaRemoveAccountRights
this now gives us complete remove privileges control in the client
libs, so we are in good shape for starting on the server side.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
2e5e659e09 cleaned up the lsa_enum_acct_rights function and added a
lsa_add_acct_rights function.

This allows us to add privileges remotely to accounts using rpcclient.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
e3d00fa47d reverted this patch till I sort out the craziness with UNIHDR 0001-01-01 00:00:00 +00:00
Andrew Tridgell
b9eff31b14 This removes the 3rd argument from init_unistr2(). There were 240
calls to init_unistr2() in the code and every one of them got the 3rd
argument incorrect, so I thought it best just to remove the argument.

The incorrect usage was caused by callers using strlen() to determine
the length of the string. The 3rd argument to init_unistr2() was
supposed to be the character length, not the byte length of the
string, so for non-english this could come out wrong.

I also removed the bogus 'always allocate at least 256 bytes'
hack. There may be some code that relies on this, but if there is then
the code is broken and needs fixing.
0001-01-01 00:00:00 +00:00
Tim Potter
a1c790b5ea Let's clean up client side ntlmssp!
Removed a dead function.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
65bac11d71 added cli_lsa_enum_account_rights() call. Note that this is in
principal similar to the existing cli_lsa_enum_privsaccount() call,
except that cli_lsa_enum_account_rights() doesn't require a call to
open_account first. There is also the minor matter that
cli_lsa_enum_account_rights() works whereas
cli_lsa_enum_privsaccount() doesn't!

this call can be used to find what privileges an account or group
has. This is a first step towards proper privileges support in Samba.
0001-01-01 00:00:00 +00:00
Tim Potter
056bdfbce7 Added comment about a SMB_ASSERT() 0001-01-01 00:00:00 +00:00
Richard Sharpe
9a38e37811 Make sure that those cleanups actually went in. 0001-01-01 00:00:00 +00:00
Gerald Carter
142c5029c7 [merge] make sure to updatre print queue cache during timeout_processing() to send notify events; CR 1491 0001-01-01 00:00:00 +00:00
Andrew Bartlett
92a777d0ea BIG patch...
This patch makes Samba compile cleanly with -Wwrite-strings.
 - That is, all string literals are marked as 'const'.  These strings are
always read only, this just marks them as such for passing to other functions.

What is most supprising is that I didn't need to change more than a few lines of code (all
in 'net', which got a small cleanup of net.h and extern variables).  The rest
is just adding a lot of 'const'.

As far as I can tell, I have not added any new warnings - apart from making all
of tdbutil.c's function const (so they warn for adding that const string to
struct).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Simo Sorce
c5892b656d the shutdown call does not have a 16 bit flags, but 2 byte representing booleans
this commit change the structure and code to reflect this

some test revelead I'm right.

some other revelead currently the abort shutdown does not work against my test machine even if it returns successfully ... need investigation
0001-01-01 00:00:00 +00:00
Simo Sorce
8877ff2482 make querygroup in rpcclient working, same fix as per 2.2 tree 0001-01-01 00:00:00 +00:00
Gerald Carter
481a8a8aa9 fix cli_ds_getprimarydominfo(); merge from SAMBA_3_0 0001-01-01 00:00:00 +00:00
Tim Potter
e643003dd4 Merge from appliance:
>Fix memory leak in cli_ds_getprimarydominfo()
0001-01-01 00:00:00 +00:00
Tim Potter
fdce4be719 A cool idea from mbp: create a big shared library of all Samba objects
which we can use to link against Samba unit test programs.  Now we can
compile and link unit tests without having to create 4MB executables
for each program

It's called libbigballofmud.so both to discourage casual usage and
also to reflect what the dependencies within Samba have become.
0001-01-01 00:00:00 +00:00