1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-23 09:57:40 +03:00

7014 Commits

Author SHA1 Message Date
Jeremy Allison
4bf4ee3f14 Use print_queue_length() by preference if we don't need a queue
as it doesn't do a traversal.
Jeremy.
-
Andrew Bartlett
d00f461f43 Follow herb's suggestion and don't strdup a string to itself -
Andrew Bartlett
ea76a687fc Follow herb's suggestion and don't strdup a string to itself. -
Herb Lewis
692c23fe86 merge from 2.2 branch -
Jeremy Allison
425bb0f405 Improved efficiency of enumerating print queue's under a particular
extreme condition...
Jeremy.
-
Andrew Bartlett
1197689bc5 Add a mechinism to allow for sane porting of rpcclient components into the new
'net' command.

This also gets us 'net rpc user add'.

Andrew Bartlett
-
Andrew Bartlett
e1b940c91b Ditto on the const religion. -
Andrew Bartlett
64bf8f81c4 Const religion for some of the RPC code. -
Herb Lewis
8aafec95cb Merge from 2.2
If you do not have one more expect than issue when talking to the passwd
program you will not send the last issue.
-
Jean-François Micouleau
f057d62aae move proto.h and build_env.h from $(srcdir)/include to $(builddir)/include
tridge, martin, if you think it's wrong , you can revert it.

	J.F.
-
Jean-François Micouleau
6c87e96149 added a boolean to the group mapping functions to specify if we need or
not the privileges. Usually we don't need them, so the memory is free
early.

lib/util_sid.c: added some helper functions to check an SID.

passdb/passdb.c: renamed local_lookup_rid() to local_lookup_sid() and pass
an RID all the way. If the group doesn't exist on the domain SID,
don't return a faked one as it can collide with a builtin one. Some rpc
structures have been badly designed, they return only rids and force the
client to do subsequent lsa_lookup_sid() on the domain sid and the builtin
sid !

rpc_server/srv_util.c: wrote a new version of get_domain_user_groups().
Only the samr code uses it atm. It uses the group mapping code instead of
a bloody hard coded crap. The netlogon code will use it too, but I have to
do some test first.

	J.F.
-
Jeremy Allison
9b7182a9da Correct message on wbinfo fail to open config file.
Jeremy.
-
Jeremy Allison
837f2b961b Tidup.
Jeremy.
-
Martin Pool
3dbb5dfcfb Put back changes to set errno, which seem to do no harm. -
Martin Pool
58cfea3c2a Fix headers. This I know is correct. -
Martin Pool
0c22a10d73 Fix headers. This I know is correct. -
Andrew Tridgell
43edeaca9f added lookup_groups() to the ads backend
winbindd/ADS can now do initgroups()
-
Andrew Tridgell
bc83d55f44 added ads_search_dn() and ads_pull_sids() -
Martin Pool
fc176f15f2 undo -
Martin Pool
391a65395e Implement suggestion from tridge to leave the old tdb_open interface
as it was, and add tdb_open_ex() which takes a log callback.  I guess
this makes more sense since it's a public interface.
-
Martin Pool
0aa800618e Better error handling:
- tdb_open api changed so that you now pass an error handling
   callback when opening the file, so that errors detected during
   opening have somewhere to go.  (All calls from the body of Samba to
   this function go through a wrapper in tdbutil, which has been
   updated.)

 - Clean up logic for deciding how to open tdb.  Emit log messages if
   something goes wrong (e.g. bad magic.)

 - tdbtool now logs errors to stderr.
-
Andrew Tridgell
cee58f1097 allow for passwords other than "samba2"
:)
-
Andrew Tridgell
689f45d207 moved lookup_usergroups() into the backend structure -
Andrew Tridgell
e908f304a2 moved init_account_policy() to the right place -
Andrew Tridgell
088f4cc5be added a query_user backend
fixed a winbindd crash when the group membership can't be looked up
-
Andrew Tridgell
660238adca typo fix -
Andrew Tridgell
ea5d285721 const religion in talloc calls -
Andrew Bartlett
3f3bb62ba6 smbpasswd is *ugly*!
However this looks like the best spot to init the account policy db...

(fix segfaults on all local smbpasswd ops)

Andrew Bartlett
-
Jeremy Allison
5215bcca15 winbindd friendly user_in_list code. Tested on a 65k user domain.
Jeremy.
-
Andrew Bartlett
c0b7ee6ee5 Add 'net rpc join' to match the ADS equiv.
This kills off the offending code in smbpasswd -j -Uab%c

In the process we have changed from unsing compelatly random passwords
to random, 15 char ascii strings.  While this does produce a decrese in
entropy, it is still vastly greater than we need, considering the application.

In the meantime this allows us to actually *type* the machine account
password duruign debugging.

This code also adds a 'check' step to the join, confirming that the
stored password does indeed do somthing of value :-)

Andrew Bartlett
-
Andrew Bartlett
16d302c5cc Some changes to the name resolution code in 'net' to allow us to find a
PDC, as well as changes for correctness as per tridge.

Andrew Bartlett
-
Andrew Bartlett
0692d792f2 Fix up funtion name, as this finds local, not domain master browsers.
(as per tridge's instructions)
-
Andrew Bartlett
153c4a56b0 This comment no longer applies. -
Martin Pool
e9085129dd Magic file for TDB databases. -
Jeremy Allison
b926660e73 Stop using getgrgid() - a very expensive call with winbindd, to look up
a group name.
Jeremy.
-
Jeremy Allison
708c0a8d16 Moved name_is_local to the correct place. Ooops.
Jeremy.
-
Martin Pool
5630a988be Set errno in tdb_open in cases where we detect an error in opening the
database, but no underlying system call sets errno.

The particular case I had was a mangled .tdb, but there are others.
For this one, set EIO.  It's a shame Unix messages aren't more
detailed -- "bad data format" would be better.
-
Jeremy Allison
8d41dfd149 Tidyup of lib/username. Add name_is_local fn to determine if name is
winbindd. Getting ready for efficiency fix in group lookups.
Jeremy.
-
Tim Potter
9f5d7e8a04 Added error message for ERRdiskfull. -
Andrew Tridgell
c7665706cd when using non-encrypted password ignore the ntpass variable to
session setup
-
Jeremy Allison
2a7bd621b4 Added prototypes for new fns. Thanks Elrond.
Jeremy.
-
Jean-François Micouleau
bc28a8eebd added a tdb to store the account policy informations.
You can change them with either usermanager->policies->account
or from a command prompt on NT/W2K: net accounts /domain

we can add a rpc accounts to the net command. As the net_rpc.c is still
empty, I did not start. How should I add command to it ? Should I take the
rpcclient/cmd_xxx functions and call them from there ?

alse changed the SAM_UNK_INFO_3 parser, it's an NTTIME. This one is more
for jeremy ;-)

        J.F.
-
Andrew Tridgell
80010d80f9 changed query_dispinfo to query_user_list -
Andrew Tridgell
789833b44e put sid_to_name behind the winbindd backend interface
I spent quite a while trying to work out how to make this call
via ldap and failed. I then found that MS servers seem use rpc
for sid_to_name, and it works even when in native mode, I ended
up just implementing it via rpc
-
Andrew Tridgell
816e40a51a added name_to_sid to the backend -
Andrew Tridgell
359ca8f246 const religion -
Andrew Tridgell
514bc61daa added another ATYPE_ -
Andrew Tridgell
c8339ce5c8 make proto should build winbindd_proto.h as well -
Andrew Bartlett
eee925861a This change reworkes the connection code for both rpcclient and net new
'net' untility.

This should make it easier to port rpcclient code across to net.

It also allows SPNEGO (the NTLMSSP subsystem in particular) to work, becouse
it kills off the early destruction of the clear-text password.

Andrew Bartlett
-
Andrew Bartlett
8dbd9702d8 Forgot this one with the last commit...
Andrew Bartlett
-