1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-28 17:47:29 +03:00

2003 Commits

Author SHA1 Message Date
Andrew Bartlett
1e91cd0cf8 Based on the detective work of Jianliang Lu <j.lu@tiesse.com>, allow yet
another NTLMv2 combination.

We should allow the NTLMv2 response to be calculated with either the domain
as supplied, or the domain in UPPER case (as we always did in the past).

As a client, we always UPPER case it (as per the spec), but we also
make sure to UPPER case the domain, when we send it.  This should give
us maximum compatability.

Andrew Bartlett
-
Andrew Bartlett
e27b5cbe75 Merge from HEAD the SMB signing patch that I developed a couple of weeks
ago.

This patch re-adds support for 'optional' SMB signing.  It also ensures that
we are much more careful about when we enable signing, particularly with
on-the-fly smb.conf reloads.

The client code will now attempt to use smb signing by default, and disable
it if the server doesn't correctly support it.

Andrew Bartlett
-
Gerald Carter
ab48af6993 source code fix for bug 1095 -- honor the '-l' option -
Andrew Bartlett
d0b820562b Given how often a panic has to do with malloc() problems, don't tempt
things more by calling SAFE_FREE() just before we exit our panic handler.

Andrew Bartlett
-
Gerald Carter
a90c3bd281 BUG 417: fix %UuGg variables expansion in include lines setging the current_user_info struct in register_vuid() -- shouldn't be any more broken than we were -
Gerald Carter
5fbfaa687a updating release notes & merging Derrel Lipman's libsmbclient patch from HEAD -
Simo Sorce
e05eb14370 backport from head -
Jeremy Allison
0272fac8ca Merge from HEAD for Amanda group.
Apply Craig Barratt's fixes to allow multiple exlusion files and patterns.
Jeremy.
-
Jim McDonough
2a679cbc87 Password lockout for LDAP backend. Caches autolock flag, bad count, and
bad time locally, updating the directory only for hitting the policy limit
or resetting.

This needed to be done at the passdb level rather than auth, because some
of the functions need to be supported from tools such as pdbedit.  It was
done at the LDAP backend level instead of generically after discussion,
because of the complexity of inserting it at a higher level.

The login cache read/write/delete is outside of the ldap backend, so it could
easily be called by other backends.  tdbsam won't call it for obvious
reasons, and authors of other backends need to decide if they want to
implement it.
-
Jeremy Allison
e8b68ef965 Correctness patch from fumiya@miraclelinux.com to count characters correctly,
doesn't affect what got put on the wire.
Jeremy.
-
Jeremy Allison
6339c4690a Remove excess logging when probing for the length of the next mb char.
Jeremy.
-
Jeremy Allison
5a9324525a Change check_path_syntax() to use the new next_mb_char_size() function
to make it generic. Remove the mb-codepage "blacklist". Alexander, please
check this fix as it reverts your blacklist changes, but I'm hoping it
fixes the problem in a more generic way for all charsets. I'm not trying
to trample on your (excellent!) work here, just make things more generic
without special cases.
Jeremy.
-
Jeremy Allison
d2b2a39fd2 Add function next_mb_char_size() that returns a size_t of the number of
bytes in the mb character at a pointer. Will be useful in fixing check_path_syntax()
to not use a "blacklist". Also re-added my (C) to reply.c. I mean, really - I've
been adding code to the file for over 10 years and I recognise many of the
fuctions as mine ! :-).
Jeremy.
-
Alexander Bokovoy
2c404f6ba9 Fix check_path_syntax() for multibyte encodings which have no '\' as second byte.
This is intermediate fix as discussed with Jeremy until we move check_path_syntax() to UCS2 internally where all
ambiguity is resolved. Please add other encodings into charcnv.c with such property.'
'
-
Jeremy Allison
d7cf64b1e4 Ensure we don't truncate strcmps to nstring anymore...
Jeremy.
-
Jeremy Allison
b4ea493599 Modified fix for bugid #784. Based on a patch from moriyama@miraclelinux.com (MORIYAMA Masayuki).
Don't use nstrings to hold workgroup and netbios names. The problem with them is that MB netbios
and workgroup names in unix charset (particularly utf8) may be up to 3x bigger than the name
when represented in dos charset (ie. cp932). So go back to using fstrings for these but
translate into nstrings (ie. 16 byte length values) for transport on the wire.
Jeremy.
-
Jeremy Allison
966e49a48c First part of patch from moriyama@miraclelinux.com (MORIYAMA Masayuki) to
fix up netbios names with mb strings. Includes reformat of libsmb/nmblib.c
so it's readable.
Jeremy.
-
Jeremy Allison
7b96765c23 Restore the contract on all convert_stringXX() interfaces. Add a "allow_bad_conv"
boolean parameter that allows broken iconv conversions to work. Gets rid of the
nasty errno checks in mangle_hash2 and check_path_syntax and allows correct
return code checking.
Jeremy.
-
Jim McDonough
d275c0e384 Get MungedDial actually working with full TS strings in it for pdb_ldap.
I know this isn't pretty, but neither was our assumption that all strings
from the directory fit inside a pstring.  There was no way this worked
before will all versions of usrmgr (for example, the only version of
mine that has the TS Confic button).
-
Andrew Bartlett
a893a324f3 Given how core this code is, I figure it should have it's own testsuite.
Big thanks to tpot and mbp for showing how easy it can be to write a simple
unit test, and for providing the STF.

This also changes the strstr_m() code to use strstr_w() (avoiding
duplication) and fixes it so that it passes the STF.

(We now always restart before doing the unicode run, until sombody can
show me why the testsuite is wrong).

Andrew Bartlett
-
Andrew Bartlett
44d304f84c JRA's recent strstr_m work really badly broke our string_sub code.
For example:

strstr_m("%v foo bar", "%v") would fail...

only strstr_m("foo %v", "%v") could work.

I wonder what else this broke...

Fix is to move to using strncmp() inside the strstr_m function.

Tested on ASCII only.

Andrew Bartlett
-
Jeremy Allison
94a272b9a8 Added strstr_m() function. Use in all places where we might run into mb
(should fix the mb service name problem, can't remember the bugid).
Jeremy.
-
Tim Potter
e6e8b59f53 Fix typo. -
Andrew Tridgell
d2d653a1a6 fixed compilation with --enable-dmalloc
the macro redefinition of free() means we cannot have a structure
element called "free"
-
Jim McDonough
4319df7fdc Janitor for tpot...bugzilla #1098, msleep already exists on aix -
Jim McDonough
003318939f Add bad password count/time attributes -
Jim McDonough
7ff42fffb2 Make default lockout duration and reset count time 30 minutes, to match windows, and also be valid (0 was invalid) -
Jeremy Allison
ac1d03c05b Missed SAFE_FREE (typo).
Jeremy.
-
Jeremy Allison
cdbeb7d2eb Added Andrew Bartlett's patch to use an allocated buffer for count_chars.
Jeremy.
-
Gerald Carter
6e22c5da92 merge from old APP_HEAD
* remove corrupt tdb and shutdown (only for printing tdbs, connections,
  sessionid & locking)
* decrement smbd counter in connections.tdb in smb_panic()
* various Makefile hack to get things to link

'max smbd processes' looks like it might be broken.  The counter KEY is not
being set.  Will look into that tomorrow.
-
Jeremy Allison
5379ad9824 Added James Peach's fix for #1038.
Jeremy.
-
Gerald Carter
7a61c2ae45 more fixes from the static changes; please move static functions to the top of files to prevent this from happening -
Gerald Carter
ec346adf34 bug 1046 (patch from Bostjan Golob <golob@gimb.org>); fix 20 month old bug where getpwent_list() was overoverwriting the username for entries. However the code path to the bug was introduced only on January 25 -
Andrew Bartlett
25a09004e8 More 'static' work.
Andrew Bartlett
-
Andrew Bartlett
fcdc5efb1e Make more functions static, and remove duplication in the use of functions
in lib/smbpasswd.c that were exact duplicates of functions in passdb/passdb.c

(These should perhaps be pulled back out to smbpasswd.c, but that can occour
later).

Andrew Bartlett
-
Andrew Bartlett
128c328ddb Another static function.
Andrew Bartlett
-
Jeremy Allison
49142c6352 Fix final valgrind errors with #830. Catch mb conversion error that may not
terminate correctly.
Jeremy.
-
Jeremy Allison
4c182d3220 Fixup the allocate version of the function to do "crap" conversions too.
Embarrassing number of goto's in this :-(. Fixes #830 I think.
Jeremy.
-
Jeremy Allison
6a7919f254 Working on #830. Cope with bad conversions better - don't just memcpy but
try a crap conversion instead. Next this needs to be done to the convert_alloc
function.
Actually fixes some valgrind warnings as well - cool !
Jeremy.
-
Andrew Tridgell
655ec16828 there are places in the samba3 code that don't check properly for
packet-termination of strings. This change ensures that when we go
past the end of a packet we hit 2 null bytes, thus terminating. We are
relying on the SAFETY_MARGIN packet allocation stuff here.
-
Andrew Tridgell
8b8f0c5279 the conversion from int to size_t in charcnv did not take into account
one place where we checked "if (src_len > 0)".

I actually would greatly prefer to switch back to int for src_len. The
type *can* be negative, which means an unsigned type is
inappropriate. There is absolutely no reason why "int" should not be
used for a parameter like this.

I didn't change back to int as we are close to a release and I wanted
a mininal change, but please don't go changing types like this in
future without very careful testing and a damn good reason.

this bug broke pull_ucs2(), I would not be surprised if it caused all
sorts of nastiness. Thanks to vl for noticing the symptoms!
-
Jeremy Allison
3a3e336030 Fix up name canonicalization (needed for krb5 keytab support later).
Remove source_env handler (no longer used in any codepath).
Jeremy.
-
Andrew Bartlett
ca24ae50ea Clarify comment on set_effective_uid()
Andrew Bartlett
-
Andrew Bartlett
7495cafd42 Add a few more NTSTATUS <=> PAM error mappings.
Andrew Bartlett
-
Andrew Bartlett
c97d3eb162 Fix removal of attributes in LDAP - we would not actually remove the old
value in the previous code.

Andrew Bartlett
-
Volker Lendecke
6d22f0d8c3 Fix decoding of base64. We got the length wrong when the result was not
an exact multiple of 3.

I also wrote a torture test and it survived some minutes of random stuff
coded/decoded up to 16 MB data. But that would be a bit too embarassing to
commit... :-)

Volker
-
Stefan Metzmacher
b5e814294e * Add SIGABRT to fault handling
so we now got a backtrace, if we crash
  in libldap with SIGABRT

metze
-
Gerald Carter
79fe75dcdf * BUG 446
- setup_logging() in smbclient to be interactive (remove the timestamps)
  - Fix bad return value in pull_ucs2( needs more testing to make sure this
    didn't break something else) that caused clistr_pull() to always read
    the same string from the buffer (pull_usc2() could return -1 if the original
    source length was given as -1)
  - increment some debugging messages to avoid printing them out so often
-
Stefan Metzmacher
b0c0d73691 * Fix sys_chown() when no chown() is presend
metze
-
Stefan Metzmacher
e9e5e2036f * Fix XFS quotas: XFS_USER_QUOTA -> USRQUOTA
XFS_GROUP_QUOTA -> GRPQUOTA
* Fix disk_free calculation with group quotas.
* Add debug class 'quota' and a lot of DEBUG()'s
  to the quota code.

metze
-