1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-11 17:58:16 +03:00

7514 Commits

Author SHA1 Message Date
Andrew Bartlett
e20d69d518 Re-indent these two functions to make it actually possible to understand their
contents...

Andrew Bartlett
-
Andrew Tridgell
d09616da68 don't try to allocate zero bytes -
Andrew Bartlett
e6a3a01f79 I'm doing some things towards the NamedPipes game with lckl and he has asked me
to move this from being a static to matching its mate in lib/util_sock.c.

In any case, this should discorage anybody from using the 'wrong' version of
this function.  (ie the one from TNG, which needs a bit more error checking
depending on use).

Andrew Bartlett
-
Andrew Bartlett
80c2aefbe7 Many thanks to Alexander Bokovoy <a.bokovoy@sam-solutions.net>.
This work was sponsored by Optifacio Software Services, Inc.

Andrew Bartlett

(various e-mails announcements merged into some form of commit message below:)

This patch which adds basics of universal groups support
into Samba 3. Currently, only Winbind with RPC calls supports this, ADS
support requires additional (possibly huge) work on KRB5 PAC. However,
basic infrastructure is here.

This patch adds:

1. Storing of universal groups for particular user logged into Samba
software (smbd/ two winbind-pam methods) into netlogon_unigrp.tdb as array
of uint32 supplemental group rids keyed as DOMAIN_SID/USER_RID in tdb.

2. Fetching of unversal groups for given user rid and domain sid from
netlogon_unigrp.tdb.

Since this is used in both smbd and winbindd, main code is in
source/lib/netlogon_uingrp.c. Dependencies are added to AUTH_OBJ as
UNIGRP_OBJ and WINBINDD_OBJ as UNIGRP_OBJ.

This patch has had a few versions, the final version in particular:

Many thanks to Andrew Bartlett for critics and comments, and partly
rewritten code.

New:
- updated fetching code to changed byte order macros
- moved functions to proper namespace
- optimized memory usage by reusing caller's memory context
- enhanced code to more follow Samba coding rules

Todo:
- proper universal group expiration after timeout
-
Simo Sorce
398b4ff0d4 updates from 2.2 -
Jeremy Allison
b63b762978 Added PRINTER_INFO_4/PRINTER_INFO_5, we're seeing level 5 requested on the wire... so.
Jeremy.
-
Andrew Bartlett
6ce467a65f Thanks to vance for spotting the missing Makefile.in commit.
This should make things a little happier...

Andrew Bartlett
-
Andrew Bartlett
28d5ab269c Move all the pdb_get...() and pdb_set...() functions to a new file.
This brings passdb.c down to a much more manageable ~1100 lines and makes it a
little easier to comprehend whats going on here.

Andrew Bartlett
-
Jeremy Allison
4f1f5f28b5 Added the O_NOFOLLOW flag if follow symlinks is set off.
Jeremy.
-
Jeremy Allison
2603ab3c68 Round and round we go....
Jeremy.
-
Jeremy Allison
24ee18c77e Latest attempt at changeid.
Jeremy.
-
Jeremy Allison
01ff6ce496 Same fix as went into 2.2 (I'm waiting for jerry to finish some code).
Jeremy.
-
Andrew Tridgell
0b0b937b58 fixed a crash bug in domain auth caused by an uninitialised nt_status -
Andrew Tridgell
1c5e19a418 fixed a crash in merge_aces()
when we free curr_ace_outer we need to not try to use it again :)
-
Andrew Tridgell
116c0a0e3b force the time difference in cache comparisons to be unsigned to cope
with the local machine time changing
-
Andrew Tridgell
ec73d26c7f make the winbind sequence number code more robust
when switching from rpc to ADS this now should make sense
-
Andrew Tridgell
73a59170e6 cope with direct IP addresses in resolve_name() -
Samba Release Account
4f4f898348 preparing for release of 3.0-alpha13 -
Andrew Bartlett
490d3aaf20 Make this error match Win2k. -
Andrew Bartlett
d7fca1806a The DC is meant to be sent the *unmapped* username...
Andrew Bartlett
-
Tim Potter
37216c649a Always query the PDC for the list of trusted domains rather than interating
the list received at startup or we get an out of date list.  I thought
there might be some sequence number that is incremented when a trusted
domain is added or removed - perhaps there is but I just haven't found it
yet.

 - Renamed get_domain_info() to init_domain_list()

 - Made an accessor function to return the list of trusted domains rather
   than using a global so we don't have to remember to put a magic init
   function

 - The getent state can not keep a pointer to a winbind_domain structure as
   it may be freed if init_domain_list() is called again so we keep the
   domain name instead
-
Andrew Bartlett
7f7a42c3e4 Back out the crazy notion that the NTLMSSP flags actually mean anything...
Replace this with some flags that *we* define.  We can do a mapping later
if we actually get some more reliable info about what passwords are actually
valid.

Andrew Bartlett
-
Tim Potter
78814664ef Correct4ed comment. -
Andrew Bartlett
ab8ff85f03 Fix up 'net ads join' to delete and rejoin if the account already exists.
This fixes up a problem where a machine would join (or downgrade by trust
password change) to NT4 membership and not be able to regain full ADS
membership until a 'net ads leave'.

Andrew Bartlett
-
Tim Potter
da4db0373b Some memory leak fixes. -
Gerald Carter
a10cdbfbed commit some changes for ab, and keep working on the smbgroupedit
manpage.
-
Andrew Tridgell
12021a8de6 make sure resolve_name() only returns valid IP addresses
this is actually a workaround for old broken nmbd daemons, especially
from Samba 2.0
-
Tim Potter
a4af65b9b9 Since AB has been changing the winbind interface it's time to add the "mock
swedish" test to client calls.  This is putting a length field at the
start of a request so we can disconnect clients talking with an out of date
libnss_winbind.so rather than deadlock them.

Misc cleanups:

 - made some int values uint32
 - moved WINBIND_INTERFACE_VERSION to start of cmd list
-
Herb Lewis
c5e14d73df added structure members referred to by recent changes in vfs-wrap.c -
Herb Lewis
09e3276fb7 merge tpots name changes into IRIX part of code. When you change the name
of a define you need to grep for the old name and change ALL places.
-
Andrew Bartlett
88b0e67042 Take a stab at keeping the doco current :-) -
Andrew Bartlett
2bd2a092ee Return the winbind separator over the socket, so programs don't have to parse
smb.conf to get it right.

While wb_client needs its lp_load() for samba dependency reasons, it now uses
the new method both to example and test the new code.

Also add an interface version function, and return the winbind's samba version
string.

In preperation for default domains, its now up to winbindd to reject plaintext
auths that don't have a seperator, but NTLM (CRAP) auths now have two feilds,
hence need parsing.

Andrew Bartlett
-
Andrew Bartlett
6df29bfe33 This changes the winbind protcol a bit:
It adds a 'ping' request, just to check winbind is in fact alive

It also changes winbindd_pam_auth_crap to take usernames and domain seperatly.

(backward incompatible change, needs merge to 2.2, but this is not yet released
code, so no workarounds)

Finally, it adds some debugs and fixes a few memory leaks (uses talloc to do
it).

Andrew Bartlett
-
Martin Pool
63ea2bb0ad Quieten warning about uninitialized variable. -
Tim Potter
eeb8af9c1a A big tidyup while thinking about getting trusted domains being re-read
when they are added or removed on the PDC.

 - renamed GETPWNAM_FROM_{UID,USER} constants and functions to GETPW{NAM,UID}

 - renamed GETGRNAM_FROM_{GID,GROUP} constants and functions to GETGR{NAM,GID}

 - use SIGUSR2 in winbindd for debugging/logging instead of SIGUSR1 in
   preparation for moving to smbcontrol type messages (not sure whether to
   ditch this altogether or not)

 - tidy debugging messages in top level winbind user and group routines

 - convert talloc_init() to talloc_init_named()

 - make enumerations of the domain list use the same local variable names
-
Tim Potter
85d3ffb270 Spelling fix. -
Martin Pool
934aacdb39 browse_fn: FIXME: If the remote machine returns non-ascii characters
in any of these fields, they can corrupt the output.  We
	   should remove them.
-
Jeremy Allison
02b18f2cca First part of UNIX extensions (#ifdefed out) more to follow.
Jeremy.
-
Jeremy Allison
4289fe3499 Oh joy - the original code didn't do mapping of the perms onto the wire.
Make it up as we go along... :-).
Jeremy.
-
Jeremy Allison
2591361fa8 Ensure this is committed last.
Jeremy.
-
Jeremy Allison
ee8c8add7f We need to test for major/minor macros.
Jeremy.
-
Tim Potter
ee0a6f8d26 Although configure.in and configure were checked in at the same time
I think configure.in just beat it to the repository so the timestamp of
configure.in is newer than configure.  )-:
-
Jeremy Allison
6210d4aa19 Getting ready to add UNIX extensions in HEAD also.
Jeremy
-
Jeremy Allison
38cfffea5f Added tests for st_blocks in struct stat, and added a (hateful) constant
the specifies the units that st_blocks is in. The reason for this is
that HPUX uses 8k, AIX uses a #defined constant and everyone else (tm)
uses 512 byte units.
Needed for the CIFS UNIX extensions - coming to a Samba server near
you soon.... :-).
Jeremy.
-
Jeremy Allison
a99e0cec1e Fixed typo.
Jeremy.
-
Jeremy Allison
4f703b84cd Move SAFE_FREE into tdb.c to stop exporting it into tdb.h namespace.
Jeremy.
-
Martin Pool
bcb443c5c4 Add two more memory-debug smbcontrol messages: these ones should
prompt dmalloc to log information about what happening, so you can see
in flight why smbd is getting bloated.
-
Martin Pool
5f6feb55d7 FIXME: At the moment, if the user should happen to give the options
ahead of the service name (in standard Unix fashion) then smbclient
just spits out the usage message with no explanation of what in
particular was wrong.  Is there any reason we can't just parse out the
service name and password after running getopt??
-
Martin Pool
391cbb6901 Better explanation message for dmalloc.
Also more insertion of parenthesis to handle struct members called
'free'.

You can now get useful dmalloc output, as long as it is compatible
with your C library.  On RH7.1 it looks like you have to rebuild
dmalloc to allow free(0) by default, because something in libcrypt
does that. (sigh)
-
Martin Pool
fb8ab69b6f With --enable-dmalloc, also use dmalloc's wrappers around routines
like strcat
-