1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-22 05:57:43 +03:00

6134 Commits

Author SHA1 Message Date
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
-
Andrew Tridgell
88241cab98 added a basic ADS backend to winbind. More work needed, but at
least basic operations work
-
Andrew Bartlett
8739d426ca This is another major rework of the 'net' command.
This time, all the existing functionality has been moved into
'net rap', ready for new commands in the 'net ads' and 'net rpc' categories.

In particular, we hope to have the abilty to autoselect the appropriate
backend to use based on smb.conf or other paramaters.

This will allow 'net user' to work no matter what the remote server.

The new 'net rpc' command will soon gain a 'net rpc join' and a
'net rpc user' based on the existing samba code.

Also in this commit, the connection establishment code has been almost entirly
reworked, and now has some minor sense of sainity to it.
In particular, we can now connect to hosts *other* than localhost!

We also have the ability to state on a per-command basis whether the 'localhost'
is a sane default value.  (A net join, for example, would not be sane against
localhost).

Unfortunetly we have had to make the basic paramaters global variables, but
the 'cli' is not opened and closed on a per-command basis.

Andrew Bartlett
-
Tim Potter
a1cf70ab65 Don't display any data if tdb_fetch() failed in the tdbtool "fetch"
command.
-
Andrew Tridgell
2ce7f38fe9 added nsstest target
fixed winbindd_rpc.o typo
-
Andrew Tridgell
adc9268216 fixed default location of libnss_winbind.so -
Andrew Tridgell
aee19090d3 fixed the nsswitch initgroups code
added a nsstest test program that directly tests all the nss
interfaces using dlopen()
-
Martin Pool
142d3dad0a Writing decimal constants as "02" has been shown to cause cancer in
rats.
-
Andrew Tridgell
e4ccc602ba split winbindd_enum_dom_groups into the new backend structure
also created winbindd_rpc.c which contains the functions that
have been converted to the new structure. There will soon be
a winbindd_ads.c for the ldap backend
-
Tim Potter
303b3a3595 Updated definition of fstring.
print_asc(): Don't try to print a trailing NULL character
print_key(), print_rec(): Display key in ASCII
-
Andrew Tridgell
21a366afbe re-enabled insure backtrace, calling /usr/bin/backtrace -
Andrew Tridgell
d2bcdfd995 init group db before use
this fixes the smbpasswd segvs
-
Jean-François Micouleau
06cb20a46d added queryuseraliases to rpcclient
and some comments to the samr server code, to explain what we should
return here.

	J.F.
-
Jean-François Micouleau
114eba496f there was a bug in samr_lookup_names (my fault)
and added comments and some debugs.

	J.F.
-
Jean-François Micouleau
6533339887 added mapping of primary gid to rid thru the group mapping code.
and cleanup and comments in passdb/passdb.c


	J.F.
-
Jean-François Micouleau
d9d1486165 added samr_query_sec_obj. and put back some code to display a security
descriptor.

added to samr_lookup_name the choice to select the either the builtin
(s-1-5-32) domain or our current domain (s-1-5-21-x-y-z)

	J.F.
-
Jean-François Micouleau
d8809c5861 added samr_query_sec_obj for rpcclient
J.F.
-
Jean-François Micouleau
192978e3fc groups in the Builtin domain S-5-32 are alias and not well-known groups
J.F.
-
Jean-François Micouleau
2285e98f20 removed the #ifdef USING_GROUPNAME_MAP/#endif blocks
that GROUPNAME_MAP has never been used.

I'll delete the smbd/groupname.c file too

	J.F.
-