summaryrefslogtreecommitdiff
path: root/source3/lib
AgeCommit message (Collapse)AuthorFilesLines
2004-03-17Change check_path_syntax() to use the new next_mb_char_size() functionJeremy Allison1-20/+4
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. (This used to be commit ca344a784da870965684e41c93ef8bfc5e86d28f)
2004-03-16Add function next_mb_char_size() that returns a size_t of the number ofJeremy Allison1-0/+24
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. (This used to be commit 5a804dbe0f3ddbd6f3fbdd6b2c5510e143607541)
2004-03-16Fix check_path_syntax() for multibyte encodings which have no '\' as second ↵Alexander Bokovoy1-0/+20
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. (This used to be commit c8c66337494c63173a6aba4286a843875302da63)
2004-03-15sync small fixes from 3.0 and fix compiler warning in priv codeGerald Carter2-4/+4
(This used to be commit c640594c9362dca625a8fa51b453dafe1f3e980d)
2004-03-13Rest of my winbindd_passdb alias supportVolker Lendecke1-0/+18
(This used to be commit d1f38cd73ed5d71ec32e52bee8a60d206fea38ae)
2004-03-13Ensure we don't truncate strcmps to nstring anymore...Jeremy Allison1-0/+2
Jeremy. (This used to be commit b3aff7f214da97925690a5d0a887ea1b336d107a)
2004-03-13Modified fix for bugid #784. Based on a patch from moriyama@miraclelinux.com ↵Jeremy Allison2-4/+6
(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. (This used to be commit 128dec9ae68fd357550de2649d54056ca4fc65cf)
2004-03-13First part of patch from moriyama@miraclelinux.com (MORIYAMA Masayuki) toJeremy Allison1-1/+29
fix up netbios names with mb strings. Includes reformat of libsmb/nmblib.c so it's readable. Jeremy. (This used to be commit beca3829d1140bf7c2e394993a02dff1f2cf7bbd)
2004-03-11Restore the contract on all convert_stringXX() interfaces. Add a ↵Jeremy Allison4-43/+67
"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. (This used to be commit 3b4fca7b7f410cb0f11322e22c8f26a662eff941)
2004-03-11Merge from 3.0. Fix munged dial in pdb_ldapJim McDonough1-4/+13
(This used to be commit 46544e957f00f71e3a49e3d90cd88b4cf1b33408)
2004-03-09Commit to HEAD the updates to smb signing code that I was propsing for 3.0.Andrew Bartlett1-1/+1
This code implements 'opportunistic signing' in our client (when the server supports it, we will use it), and correct downgrading on both the client and server for the 'enabled' (rather than required) signing level. This means that we can actually set 'server signing = yes' and not have the world fall apart. We had a number of bugs in that code, and it certainly looks like most of the testing was with the 'requried' setting. While the changes are reasonable, I'm putting this into HEAD rather than 3.0 for the timebeing. SMB signing, like NTLMSSP, tends to have gotchas in it :-) (I also need to give it a workout with more than smbclient before I move it across). Andrew Bartlett (This used to be commit 6bad895462cf076a7e917c909e2a461d1b360bf1)
2004-03-09Merge fixes and tests for jra's broken strstr_m() function from 3.0Andrew Bartlett1-7/+19
STF rules! (Pity we don't use it for more stuff) Andrew Bartlett (This used to be commit a9363b45b0ef652a5fd621915fafb97ada0c7d5e)
2004-03-09Added strstr_m() function. Use in all places where we might run into mbJeremy Allison2-6/+76
(should fix the mb service name problem, can't remember the bugid). Jeremy. (This used to be commit 93c2d50f1adbf257c0c0185b420a1d73d56be2f9)
2004-03-08Do some checks about data passed to this functionSimo Sorce1-0/+3
(This used to be commit 77142a1ca6853fcae3b806830d077f6f84bebd6d)
2004-03-082 fixes to enhance readability of source code and debug messagesSimo Sorce1-1/+1
1 fix for a memleak (This used to be commit 9f3b0295fe7bd6c0c3a6061e5d00e7b88f702b21)
2004-03-07Fix typo.Tim Potter1-1/+1
(This used to be commit 7798a52d82c46759635e90a7e48ddad4ce48b763)
2004-03-01Ok here it is my latest work on privilegesSimo Sorce1-4/+75
This patch add privilege support for samba Currently it is implemented only for tdbsam backend but estending it to other sam backends is straightforward. I must make a big thank to JFM for his teachings on the matter and the functions at the base of this work. At thye moment only samr_create_user honours SeAddUsersPrivilege and SeMachineAccountPrivilege to permit any user to add machines and/or users to the server. The command "net priv" has been provided to manipulate the privileges database. There are still many things to do (like support in "net rpc vampire") but the working core is here. Feel free to comment/extend on this work. Of course I will deny that any bug may affect this code :-) Simo. This patch adds also my patch about add share command enhancements. (This used to be commit 7a78c3605e203bd8e0d7ae244605f076a5d0b0bc)
2004-02-23Add bad password count/time attributesJim McDonough1-0/+2
(This used to be commit 2fa56111d37a09702b31e1769a687b630aff1c1b)
2004-02-20AIX has already has a function called msleep(). Bugzilla #1098.Tim Potter3-4/+4
(This used to be commit 90ae3667448be9b3445f401bcd9d7e3eba374215)
2004-02-20Make default lockout duration andJim McDonough1-2/+2
reset count time 30 minutes, to match windows, and also be valid (0 was invalid) (This used to be commit 69924079b2f7098254c2053781121d4324626dee)
2004-02-13Typo (missed SAFE_FREE).,Jeremy Allison1-1/+2
Jeremy. (This used to be commit dd014ab358e861f3828cb34c09c5800606c8da59)
2004-02-13Added Andrew Bartlett's patch to use an allocated buffer for count_chars.Jeremy Allison1-2/+8
Jeremy. (This used to be commit 4ec9e330787cbc01849a91573f760f639b28be7e)
2004-02-12tdbsam & smb_panic merge from 3.0 (initial tests are ok but I'll setup a ↵Gerald Carter2-1/+42
HEAD PDC tomorrow) (This used to be commit c57b24ee49aee0f0687742da7f8d741c62f6effe)
2004-02-11Applied James Peach's stack backtrace patch for IRIX.Tim Potter1-0/+40
(This used to be commit 056bf382d748ca06a1937ee19b0193430199f63b)
2004-02-10merge fixes from 3.0Gerald Carter1-23/+27
(This used to be commit ea75f34eef90e410045fe4d32052cbea483a27da)
2004-02-09bug 1046 (patch from Bostjan Golob <golob@gimb.org>); fix 20 month old bug ↵Gerald Carter1-3/+3
where getpwent_list() was overoverwriting the username for entries. However the code path to the bug was introduced only on January 25 (This used to be commit fbde889fd8442bae7444ffdb2736c9c5e8d59204)
2004-02-08Actually remove this (now empty) file from the repository.Andrew Bartlett1-0/+0
Andrew Bartlett (This used to be commit 19da2b936a716dc26d361db82280e73e81d683da)
2004-02-08(merge from 3.0)Andrew Bartlett1-1/+1
More 'static' work. Andrew Bartlett (This used to be commit 620f909eed3d994d01ca53068a33856d25917144)
2004-02-08(merge from 3.0)Andrew Bartlett2-201/+1
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). This also includes some >14 character password changes, and the start of a move away from using 'admin user' to determine if the user is root (as root can login without setting 'admin user'). Andrew Bartlett (This used to be commit be0704abb919152c359a735023283acbf9be3076)
2004-02-08(merge from 3.0)Andrew Bartlett1-1/+1
Another static function. Andrew Bartlett (This used to be commit 58adb41db19ce528b9267a5ea7f119b9c6893ade)
2004-02-04Fix final valgrind errors with #830. Catch mb conversion error that may notJeremy Allison1-2/+16
terminate correctly. Jeremy. (This used to be commit a1f7cea9f278ef15206bf48663328c28d295bd6d)
2004-02-04Fixup the allocate version of the function to do "crap" conversions too.Jeremy Allison1-20/+83
Embarrassing number of goto's in this :-(. Fixes #830 I think. Jeremy. (This used to be commit e8c7d1c5dca63720b7de6360cb0cff4bed0be546)
2004-02-04Working on #830. Cope with bad conversions better - don't just memcpy butJeremy Allison2-11/+82
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. (This used to be commit 98e2c6f4f854065c56a73ebc9e0a50e0ba018dde)
2004-01-30Fix up name canonicalization (needed for krb5 keytab support later).Jeremy Allison1-46/+28
Remove source_env handler (no longer used in any codepath). Jeremy. (This used to be commit be60768e64ae2061f220faa3943dcb0588393dbc)
2004-01-27(merge from 3.0)Andrew Bartlett1-2/+10
Clarify comment on set_effective_uid() Andrew Bartlett (This used to be commit 0a9afefb55e9071fd21ea280095555f423571853)
2004-01-25(merge from 3.0)Andrew Bartlett1-16/+16
Fix removal of attributes in LDAP - we would not actually remove the old value in the previous code. Andrew Bartlett (This used to be commit 971dd33244918cde6bf49a2f9c650da856d31cd6)
2004-01-23Fix decoding of base64. We got the length wrong when the result was notVolker Lendecke1-0/+2
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 (This used to be commit 3fda2a0432a1dc7a0d28d83e35f6329bc30378e0)
2004-01-22merge:Stefan Metzmacher1-3/+6
* Add SIGABRT to fault handling so we now got a backtrace, if we crash in libldap with SIGABRT metze (This used to be commit 7f7b86e4b3815b112fe6881af6c261381f35286f)
2004-01-15* BUG 446Gerald Carter1-0/+4
- 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 (This used to be commit f452585073fbeeae3e3a0db644e381f94cb918f3)
2004-01-15merge:Stefan Metzmacher1-0/+2
* Fix sys_chown() when no chown() is presend metze (This used to be commit ecf5b78248e551f3586967046d8b1da9bbe11e7b)
2004-01-15merge:Stefan Metzmacher5-34/+181
* 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 (This used to be commit 33c6ca3b4bc0898893b5d95ea2485b7694b9d198)
2004-01-14merge:Stefan Metzmacher1-2/+2
fix XFS quotas the macro changed from HAVE_XFS_QUOTA -> HAVE_XFS_QUOTAS metze (This used to be commit ae20cf0810b9bef3d460994d5bf5e820c01296f0)
2004-01-13sync HEAD with recent changes in 3.0Gerald Carter8-539/+1118
(This used to be commit c98399e3c9d74e19b7c9d806ca8028b48866931e)
2004-01-07Fix for bug #922. Fast path not called for strlower_m() and strupper_m().Jeremy Allison1-2/+2
From ab@samba.org (Alexander Bokovoy). Jeremy. (This used to be commit 88c51454327533f8bc06ce1cd479370aabefdf81)
2004-01-06isolate ldap debug messages to the common smbldap_XXX() functionsGerald Carter1-4/+9
(This used to be commit 4c877ccc16bcb69490c4d34d2ef5f727bf98438e)
2004-01-06Patch based on work from James Peach <jpeach@sgi.com> to convert over toJeremy Allison1-0/+41
using pread/pwrite. Modified a little to ensure fsp->pos is correct. Fix for #889. Jeremy. (This used to be commit 3a24dc868d95c9bcc2ac3a0dbd50e6e226ac0841)
2004-01-06(merge from 3.0)Andrew Bartlett1-0/+6
Always call the auto-init funciton - this avoids tdb segfaulting under us if we failed to open it earlier. Andrew Bartlett (This used to be commit 34f16eaeaa81a0cc6ae564f4be8a02752ee5624d)
2004-01-05(merge from 3.0)Andrew Bartlett2-3/+3
auth/auth_util.c: - Fill in the 'backup' idea of a domain, if the DC didn't supply one. This doesn't seem to occour in reality, hence why we missed the typo. lib/charcnv.c: lib/smbldap.c: libads/ldap.c: libsmb/libsmbclient.c: printing/nt_printing.c: - all the callers to pull_utf8_allocate() pass a char ** as the first parammeter, so don't make them all cast it to a void ** nsswitch/winbind_util.c: - Allow for a more 'correct' view of when usernames should be qualified in winbindd. If we are a PDC, or have 'winbind trusted domains only', then for the authentication returns stip the domain portion. - Fix valgrind warning about use of free()ed name when looking up our local domain. lp_workgroup() is maniplated inside a procedure that uses it's former value. Instead, use the fact that our local domain is always the first in the list. -- Jerry rightly complained that we can't assume that the first domain is our primary domain - new domains are added to the front of the list. :-( Use a much more reliable 'flag test' instead. (note: changes winbind structures, make clean). -- Forgot to commit this for the 'get our primary domain' change. Andrew Bartlett (This used to be commit acacd27ba25f7ebfec40bfa66d34ece543569e23)
2004-01-05(merge from 3.0)Andrew Bartlett1-14/+15
Based on patch by Petri Asikainen <paca@sci.fi> fix bug #387 and #330. This patch will change order how attributes are modified from: add, delete to: delete, add This is needed to update single valued attributes in Novell NDS and should not harm anyone else. (This used to be commit e925cae0f3846ea95633d38afd652e0f3d8acfb9)
2004-01-05Fix from James Flemer <jflemer@uvm.edu> to make HAVE_ATTR_LIST linked toJeremy Allison1-3/+3
HAVE_SYS_ATTRIBUTES_H to fix AIX compile. Jeremy. (This used to be commit 1d90cc2034c023755981a07a49c3d9958b60fb74)