1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

1169 Commits

Author SHA1 Message Date
Andrew Bartlett
fa9d3060ff Patch from Hasch@t-online.de (Juergen Hasch) to add UTF-8 as an explict
character set for conversion.  To be used in Winbind and the 'net ads'
commands.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Tridgell
eb196070e6 serialise all domain auth requests
this is needed because W2K will send a TCP reset to any open
connections that have not done a negprot when a second connection is
made. This meant that under heavy netlogon load a Samba domain member
would fail authentications.

Jeremy, you may wish to port this to 2.2.x
0001-01-01 00:00:00 +00:00
Andrew Tridgell
569505b771 reverted tims patch that broke configure
why does anything but smbd care about sec_init() anyway??
0001-01-01 00:00:00 +00:00
Tim Potter
e7abb79fb3 Whoops, typo. 0001-01-01 00:00:00 +00:00
Tim Potter
1b941e2c63 Do a smb_panic() if sec_initial_[ug]id() or non_root_mode() is called
without before sec_init().  This should avoid the formation of another
magic function club.  (-:
0001-01-01 00:00:00 +00:00
Tim Potter
5efe39af0c int -> uint32 0001-01-01 00:00:00 +00:00
Martin Pool
b6d5d02aa1 Back out 1.16.2.3:
receive_smb: You might think that we ought to set smb_read_error here,
but apparently that breaks the recursive main loop in oplock.c.
Global variables suck. :-/
0001-01-01 00:00:00 +00:00
Andrew Bartlett
542e0e3745 Try to get this finally working. (Note to self: *always* check build farm...)
:-)

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
59afc3d6da See if we can get slightly valid C for the non-PAM case here.
Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
dc1a72f896 Drastic impromvents to pam_winbind.
This adds code to do generic PAM -> NTSTATUS and NTSTATUS -> PAM error
conversions, and uses them to make the error handling in pam_winbind sane.

In particular, pam_winbind now uses PAM error codes, not silly '-1, -2 ...'
stuff, and logs the NTSTATUS error that winbind now sends over the pipe.

Added code to wbinfo to display these - makes a big difference in debugging
winbindd.

The main change here is the code to allow pam_winbind password changing to
correctly stack - This code ripped from pam_unix, and the copyright attached.
(Same as for all pam modules, including pam_winbind)

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Jeremy Allison
d1e911afd0 Fix stupid typo !
Jeremy.
0001-01-01 00:00:00 +00:00
Simo Sorce
e3bb686745 better debug messages! 0001-01-01 00:00:00 +00:00
Jeremy Allison
3af16ade17 Fix from Michael Steffens <michael_steffens@hp.com> to make signal
processing work correctly in winbindd. This is a really good patch
that gives full select semantics to the Samba modified select.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
9930cf9733 this fixes the problem of not being able to add a SD to a file on a
non-domain Samba server from a NT4 client.

Note that this exactly reverses a change by Jeremy on the 18th of
December 2001, reverting the code back to what JF originally wrote. I
have looked carefully with a sniffer and JFs original NULL sid is
correct (ie. it matches what NT4 does) and also fixes the problem.

Sending a blank sid (which is what jeremy's patch did) causes NT4 to
give a classic "parameter is incorrect error" and prevents the
addition of new ACLs.
0001-01-01 00:00:00 +00:00
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
0001-01-01 00:00:00 +00:00
Simo Sorce
a034bfb9ef minor fix and checks 0001-01-01 00:00:00 +00:00
Andrew Bartlett
f1d8d50976 Some more 'winbind default domain' support patches from Alexander Bokovoy
<a.bokovoy@sam-solutions.net>.

This patch is designed to remove the 'special cases' required for this support.

In particular this now kills off winbind_initgroups, as it appears no longer to
be required.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
151dd7bc6c Bring this code into line with new winbind_lookup_name() interface. I think
this might need a bit more work - or at least documentation.

This is certainly a worthwile little hack, as it avoids the need to invert the
group database.  I don't think we should allow unqualified domains here - as
that allows us to distinguish between (at least some) usernames and these
'special' groups.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
a41fe2f6c8 Remove the 'direct to winbind' hacks, as they should (if I understand
correctly) be no longer needed.  This is in aid of the 'winbind default domain'
code - which works much better when smbd always goes via the standard unix
interfaces.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
873dba59cf picky about realloc
J.F.
0001-01-01 00:00:00 +00:00
Simo Sorce
04f492980b minor fixes 0001-01-01 00:00:00 +00:00
Andrew Bartlett
f556ad67e8 getpwnam -> getpwnam_alloc.
idra has promised not to revert these this time :-)
0001-01-01 00:00:00 +00:00
Martin Pool
7f7d22880d We have to do some initialization before the string conversion
routines can work.  The code was copied into both convert_string and
convert_string_allocate -- I split it into a little static function,
and removed an apparently duplicate call to init_valid_table().
0001-01-01 00:00:00 +00:00
Tim Potter
e05c9b34f0 Added comment about running lp_load() before calling pidfile_create(). 0001-01-01 00:00:00 +00:00
Tim Potter
025a0ea8ba Having a const parameter for set_socket_options() causes too much confusion. 0001-01-01 00:00:00 +00:00
Jeremy Allison
61b4ce7aef Removed freebsd hack. Not correct.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
6380f9ff7a Spelling fix. 0001-01-01 00:00:00 +00:00
Andrew Bartlett
8ef13cabdd This is the current patch from Luke Leighton <lckl@samba-tng.org> to add a
degree of seperation betwen reading/writing the raw NamedPipe SMB packets
and the matching operations inside smbd's RPC components.

This patch is designed for no change in behaviour, and my tests hold that to be
true.  This patch does however allow for the future loadable modules interface
to specify function pointers in replacement of the fixed state.

The pipes_struct has been split into two peices, with smb_np_struct taking the
information that should be generic to where the data ends up.

Some other minor changes are made: we get another small helper function in
util_sock.c and some of the original code has better failure debugs and
variable use. (As per on-list comments).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
e870f0e727 This patch makes the 'winbind use default domain' code interact better with
smbd, and also makes it much cleaner inside winbindd.

It is mostly my code, with a few changes and testing performed by Alexander
Bokovoy <a.bokovoy@sam-solutions.net>.  ab has tested it in security=domain and
security=ads, but more testing is always appricatiated.

The idea is that we no longer cart around a 'domain\user' string, we keep them
seperate until the last moment - when we push that string into a pwent on onto
the socket.

This removes the need to be constantly parsing that string - the domain prefix
is almost always already provided, (only a couple of functions actually changed
arguments in all this).

Some consequential changes to the RPC client code, to stop it concatonating the
two strings (it now passes them both back as params).

I havn't changed the cache code, however the usernames will no longer have a
double domain prefix in the key string.  The actual structures are unchanged
 - but the meaning of 'username' in the 'rid' will have changed.  (The cache is
invalidated at startup, so on-disk formats are not an issue here).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Jeremy Allison
997d6687fc Readline has problems on non tty fd's. Use readline replacement to in cases
where stdin is !isatty to allow stripts to work.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
80df5ab07e Added #ifdef for FreeBSD TCP bug.
Jeremy.
0001-01-01 00:00:00 +00:00
Simo Sorce
6b123adda9 fixes (asprintf) from 2.2 0001-01-01 00:00:00 +00:00
Jeremy Allison
478696e924 If 127.0.0.1 matches both allow & deny then allow. Patch from Steve Langasek vorlon@netexpress.net
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
07a21fcd23 This is the 'winbind default domain' patch from Alexander Bokovoy
<a.bokovoy@sam-solutions.net>.

The idea is the domain\username is rather harsh for unix systems - people don't
expect to have to FTP, SSH and (in particular) e-mail with a username like
that.

This 'corrects' that - but is not without its own problems.

As you can see from the changes to files like username.c and wb_client.c (smbd's
winbind client code) a lot of assumptions are made in a lot of places about
lp_winbind_seperator determining a users's status as a domain or local user.

The main change I will shortly be making is to investigate and kill off
winbind_initgroups() - as far as I know it was a workaround for an old bug in
winbind itself (and a bug in RH 5.2) and should no longer be relevent.

I am also going to move to using the 'winbind uid' and 'winbind gid' paramaters
to determine a user/groups's 'local' status, rather than the presence of the
seperator.

As such, this functionality is recommended for servers providing unix services,
but is currently less than optimal for windows clients.

(TODO: remove all references to lp_winbind_seperator() and
lp_winbind_use_default_domain() from smbd)

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
1d86c7f942 A nice *big* change to the fundemental way we do things.
Samba (ab)uses the returns from getpwnam() a lot - in particular it keeps
them around for a long time - often past the next call...

This adds a getpwnam_alloc and a getpwuid_alloc to the collection.

These function as expected, returning a malloced structure that can be
free()ed with passwd_free(&passwd).

This patch also cuts down on the number of calls to getpwnam - mostly by
taking advantage of the fact that the passdb interface is already
case-insensiteve.

With this patch most of the recursive cases have been removed (that I know
of) and the problems are reduced further by not using the sys_ interface
in the new code.  This means that pointers to the cache won't be affected.
(This is a tempoary HACK, I intend to kill the password cache entirly).

The only change I'm a little worried about is the change to
rpc_server/srv_samr_nt.c for private groups.  In this case we are getting
groups from the new group mapping DB.  Do we still need to check for private
groups?  I've toned down the check to a case sensitve match with the new code,
but we might be able to kill it entirly.

I've also added a make_modifyable_passwd() function, that copies a passwd
struct into the form that the old sys_getpw* code provided.  As far as I can
tell this is only actually used in the pass_check.c crazies, where I moved
the final 'special case' for shadow passwords (out of _Get_Pwnam()).

The matching case for getpwent() is dealt with already, in lib/util_getent.c

Also included in here is a small change to register the [homes] share at vuid
creation rather than just in one varient of the session setup.  (This picks
up the SPNEGO cases).  The home directory is now stored on the vuid, and I
am hoping this might provide a saner way to do %H substitions.

TODO:  Kill off remaining Get_Pwnam_Modify calls (they are not needed), change
the remaining sys_getpwnam() callers to use getpwnam_alloc() and move
Get_Pwnam to return an allocated struct.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Jeremy Allison
c1b97226db Separate out get_user_home_dir() from get_user_home_service_dir().
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
0fcca6c627 Merged in %S fixes and XX_NOT_CHANGED fixes from 2.2.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
16fcbf3c1c Fixup error mapping so we have only one table containing errno -> dos error -> NT STATUS
maps. Fixes problem with disk full returning incorrect error.
Jeremy.
0001-01-01 00:00:00 +00:00
Martin Pool
cee0ec7274 Roll back PSTRING_SANCTIFY patch; just leave non-controversial type
and constness changes.
0001-01-01 00:00:00 +00:00
Martin Pool
bf513668cb #ifdef variable that's not used without dmalloc 0001-01-01 00:00:00 +00:00
Martin Pool
8d106dc1f4 Add constness to filenames passed to functions. 0001-01-01 00:00:00 +00:00
Martin Pool
682e7cd394 FIXME We should turn the global list off when using Insure++,
otherwise all the memory will be seen as still reachable.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
7417d6f931 A couple of coding syle updates to follow the re-indent. 0001-01-01 00:00:00 +00:00
Andrew Bartlett
e20d69d518 Re-indent these two functions to make it actually possible to understand their
contents...

Andrew Bartlett
0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
Jeremy Allison
2603ab3c68 Round and round we go....
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
24ee18c77e Latest attempt at changeid.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
01ff6ce496 Same fix as went into 2.2 (I'm waiting for jerry to finish some code).
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
85d3ffb270 Spelling fix. 0001-01-01 00:00:00 +00:00
Jeremy Allison
6210d4aa19 Getting ready to add UNIX extensions in HEAD also.
Jeremy
0001-01-01 00:00:00 +00:00