1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-31 01:48:16 +03:00

7364 Commits

Author SHA1 Message Date
Gerald Carter
501f3f3a8f ooops./ forgot one -
Gerald Carter
999a2f5c84 fixing compile error -
Jeremy Allison
676eea502a We should be SHLD not LINK when creating shared libraries.
Tidyup in passdb.c
Jeremy.
-
Andrew Bartlett
673ece2841 We go to a lot of effort to avoid strcpy() in Samba, but its not much use if
people start doing using strlen(src) in strncpy() :-)

This occured when the talloc based passdb was reverted in favor of a pstring
based one.  In the talloc version this was fine, becouse the buffer was
strlen(src) bytes long.  This no longer applies...

This doesn't seem to have broken anything, but I'm chasing up an oddity with NT
password changing from the last merge.

Test & MERGE for 2.2.3

Andrew Bartlett
-
Martin Pool
92a3ab274e Add prs_dump_before to dump everything from the start of the prs
buffer up to the current position, and use this to dump pipe buffers
just before parsing.
-
Andrew Bartlett
d3dd28f6c4 Actually enforce the passdb API.
Thou shalt not reference SAM_ACCOUNT members directly - always use
pdb_get/pdb_set.

This is achived by making the whole of SAM_ACCOUNT have a .private member,
where the real members live.  This caught a pile of examples, and these have
beeen fixed.

The pdb_get..() functions are 'const' (have been for some time) and this
required a few small changes to constify other functions.

I've also added some debugs to the pdb get and set, they can be removed if
requested.

I've rewritten the copy_id2x_to_sam_pass() functions to use the new passdb
interface, but I need the flags info to do it properly.

The pdb_free_sam() funciton now blanks out the LM and NT hashes, and as such
I have removed many extra 'samr_clear_sam_passwd(smbpass)' calls as a result.

Finally, any and all testing is always appriciated - but the basics seem to
work.

Andrew Bartlett
-
Jeremy Allison
f6592628eb Make user enumeration work for w2k and win9x.
This means different return sizes depending on client bugs. This sucks :-(.
Jeremy.
-
Andrew Bartlett
3d812aacff Another touch of 'const' -
Martin Pool
b354163834 Doc. -
Martin Pool
93fadcd111 Also capture received data -
Martin Pool
9973b22b34 struct cli_state remembers the pipe name that it's talking to, if any,
so that we can print it in later debug messages.

Call prs_dump to dump out requests sent by the client at sufficiently
high debug levels.
-
Martin Pool
37ae84f782 struct cli_state remembers the pipe name that it's talking to, if any,
so that we can print it in later debug messages.
-
Andrew Bartlett
95abb2473b Minor update to make the output 'real C'. (The output is intended to be a C
format table for inclusion back into Samba).

Andrew Bartlett
-
Tim Potter
001fe3481f Removed reference to rpc_client/cli_netlogon.o from dependencies for
samsync.  The libsmb version should do fine.
-
Simo Sorce
4aecb650e1 the pdbedit tool manpage -
Andrew Tridgell
8143052e69 try to handle broken const in headers on cray unicos -
Andrew Bartlett
024843a2ce This brings the NT->DOS error mapping into better line with what NT does.
I'll post the changes to the actual map to the list for comment, but this fixes
the 'unknown' case.

Andrew Bartlett
-
Andrew Bartlett
f0089b089b Add a function to convert 'NT_STATUS...' strings back into their actual error
code.

Andrew Bartlett
-
Andrew Bartlett
5cdc67d0bd Allow usernames in the form of 'NT_STATUS_....' to map to that as the error
when using the 'name_to_ntstatus' auth module.

This could be useful in testing.

Andrew Bartlett
-
Andrew Bartlett
6673fdda3c Now that winbind doesn't rely on this, we may as well remove it...
Andrew Bartlett
-
Andrew Bartlett
4609edcac3 Further rpc_client removal, this time from winbindd.
Also removed the dependency on auth_util.o, which makes things nicer.

Finally, this kills off the NECESSARY_BECAUSE_SAMBA_DEPENDENCIES_ARE_SO_BROKEN_OBJ
makefile variable - becouse Samba dependencies are starting to be sane again!

Andrew Bartlett
-
Andrew Tridgell
d0ba307032 renamed ans1.h to asn_1.h to prevent conflict caused by krb5 headers
on some platforms using "" instead of <> in include statements
-
Andrew Bartlett
d870edce76 A farily large commit:
- Move rpc_client/cli_trust.c to smbd/change_trust_pw.c
  - It hasn't been used by anything else since smbpasswd lost its -j

 - Add a TALLOC_CTX to the auth subsytem.  These are only valid for the length
   of the calls to the individual modules, if you want a longer context hide it
   in your private data.

   Similarly, all returns (like the server_info) should still be malloced.

 - Move the 'ntdomain' module (security=domain in oldspeak) over to use the new
   libsmb domain logon code.  Also rework much of the code to use some better
   helper functions for the connection - getting us much better error returns
   (the new code is NTSTATUS).

   The only remaining thing to do is to figure out if tpot's 0xdead 0xbeef for
   the LUID feilds is sufficient, or if we should do random LUIDs as per the old
   code.

   Similarly, I'll move winbind over to this when I get a chance.

This leaves the SPOOLSS code and some cli_pipe code as the only stuff still in
rpc_client, at least as far as smbd is concerned.

While I've given this a basic rundown, any testing is as always appriciated.

Andrew Bartlett
-
Andrew Bartlett
fe9d777915 Add a specialised version of tpot's libsmb samlogon code for use with
presupplied challange-response pairs, and only using the 'network' version.

This will be used to move the auth subsystem over to a libsmb (rather than
rpc_client) base.

Andrew Bartlett
-
Andrew Bartlett
a308abbab7 Fix up C99 comment.
// -> /* */
-
Andrew Bartlett
4d90cc1d99 Named constants are always much better than magic numbers...
(I defined the constants when I put in 'net rpc shutdown')

Andrew Bartlett
-
Jeremy Allison
efbec935fe last_enum not used.
Jeremy.
-
Jeremy Allison
0b7da4a50e Fixed enumeration of a large (<1500) users from a Samba PDC to a W2k
member server. Firstly, use the same max enumeration size (0x400) as W2K
uses, otherwise W2K won't ask for any more. Secondly, if a enumeration
request with a non-zero offset comes in on a handle that hasn't started
an enumeration, don't bitch about it (return NT_STATUS_UNSUCCESSFUL),
just load the db on that handle and return at that offset.
Jeremy.
-
Andrew Tridgell
3aeefbca4f added a simple test to see whether building shared libraries actually
works
-
Simo Sorce
29b3b5e929 ops, froget to set the values.
jerry, can you look at theis where we use standard_sub_advanced() fns?
I think this structure should be backported to 2.2 because we do not know if the SAM_ACCOUNT strings have enough space to contain the "substituted" string.
(Yes, just now we know they are pstrings, but we may change them into alloced one, I'm a strong suported of alloced strings as 1024 bytes are not always enough and are often too much)
-
Simo Sorce
c0904d9617 const religion -
Simo Sorce
f796f18a83 port mods from 2.2 -
Gerald Carter
466f515240 reverted to 1.24 and manually merged in changes from 2.2 -
Andrew Tridgell
c4d928e55f cope with systems that don't have full gssapi libs -
Andrew Tridgell
65e857b36e more irix -64 portability fixes -
Andrew Tridgell
48aa90c48c - portablitity fixes for cc -64 on irix
- fixed gid* bug in rpc_server
-
Andrew Bartlett
2d1612dd35 Ensure the output cli can't have spurious values if the connection fails... -
Andrew Bartlett
51c985be7f Add 'net rpc shutdown' and 'net rpc abortshutdown'.
These two little features are very useful, but the passing of options about
needs some serious work.  The popt stuff in the shutdown code is #ifdef'ed out
until the main popt loop can be convinced not to chew on the options :-(

Andrew Bartlett
-
Andrew Bartlett
45042bef7c Fix up the comment in the copyright header -
Andrew Bartlett
f0c301a12e Give the main loop talloc context a name (using mbp's new talloc naming
system).

Andrew Bartlett
-
Andrew Bartlett
20d7c5d9b9 Make --with-tdbsam compile again, given the new 'am I setting a default' flags.
Andrew Bartlett
-
Andrew Bartlett
f60e445001 Allow this to build without LDAP, as per the example below it.
Andrew Bartlett
-
Gerald Carter
c946c6bbc8 fix compile error -
Gerald Carter
a7dc0febe4 removed extern samlogon_user -
Gerald Carter
a5f4559b2a remove samlogon_user -
Gerald Carter
efcde5d9d8 some merges from 2.2. Still need to merge in changes from pdb_tdb.c
but it will take more time as I don't want to loose any fixes that
are only in HEAD.
-
Simo Sorce
ce7e89949a freeing the wrong pointer, sorry my mistake. -
Tim Potter
6b7e9d03cf Unicode byte ording fix from Benjamin Kuit <bj@it.uts.edu.au> -
Simo Sorce
49f5cb7a3d util_sid.c - respect a const variabile (addedd strdup)
cli_reg.c  - indentation
pdb_ldap.c - some checks on init fns parameters
pdb_tdb.c  - some checks on init fns parameters + make sure we close the db on failure
-
Andrew Bartlett
2efae7cc52 Add a pile of doxygen style comments to various parts of Samba. Many of these
probably will never actually be genearted, but I like the style in any case.

Also fix a segfault in 'net rpc' when the login failed and a small memory leak
on failure in the auth_info.c code.

Andrew Bartlett
-