summaryrefslogtreecommitdiff
path: root/source3/lib
AgeCommit message (Collapse)AuthorFilesLines
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 966e49a48c352563cdd7f75fe2768f2d6612ec7e)
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 7b96765c23637613f079d37566d95d5edd511f05)
2004-03-11Get MungedDial actually working with full TS strings in it for pdb_ldap.Jim McDonough1-4/+13
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). (This used to be commit d275c0e384db08c2a6efc28e52844f676ff71fb6)
2004-03-09Given how core this code is, I figure it should have it's own testsuite.Andrew Bartlett1-7/+11
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 (This used to be commit a893a324f37e6a171719db8ffffe66df31c2dbaa)
2004-03-09JRA's recent strstr_m work really badly broke our string_sub code.Andrew Bartlett1-2/+10
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 (This used to be commit 44d304f84c4ba5a832d5e3848ae0d04d5438ac15)
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 94a272b9a881ec0004c5da2a7242b0a818da5630)
2004-03-07Fix typo.Tim Potter1-1/+1
(This used to be commit e6e8b59f53d5ac618dcec13a46c356f0abe5950a)
2004-02-26fixed compilation with --enable-dmallocAndrew Tridgell1-3/+3
the macro redefinition of free() means we cannot have a structure element called "free" (This used to be commit d2d653a1a6db9d0407e99affb317a0045e56168a)
2004-02-23Janitor for tpot...bugzilla #1098, msleep already exists on aixJim McDonough3-4/+4
(This used to be commit 4319df7fdc2d878c509381923cc1db4d731620ba)
2004-02-23Add bad password count/time attributesJim McDonough1-0/+2
(This used to be commit 003318939f7e476f5f2a5f345e8a81a228fc89a7)
2004-02-20Make default lockout duration and reset count time 30 minutes, to match ↵Jim McDonough1-2/+2
windows, and also be valid (0 was invalid) (This used to be commit 7ff42fffb2b207aea1dba306c914c7e09994d608)
2004-02-13Missed SAFE_FREE (typo).Jeremy Allison1-1/+2
Jeremy. (This used to be commit ac1d03c05bf6247541fbd6f0c3bd5b2e5b6a5212)
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 cdbeb7d2ebcd4a298aabb3ed665560d219bb0d1c)
2004-02-12merge from old APP_HEADGerald Carter2-1/+42
* 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. (This used to be commit 6e22c5da929b6d9a4e32dc704c83112b2ad8fcfd)
2004-02-11Added James Peach's fix for #1038.Jeremy Allison1-0/+40
Jeremy. (This used to be commit 5379ad98241950c581d88acbee1e256187b13582)
2004-02-10more fixes from the static changes; please move static functions to the top ↵Gerald Carter1-23/+23
of files to prevent this from happening (This used to be commit 7a61c2ae450d3e41c45e6e3773ad00f6ab9beb16)
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 ec346adf34bd2bc1d514202e82b3713fb5b032ab)
2004-02-08More 'static' work.Andrew Bartlett1-1/+1
Andrew Bartlett (This used to be commit 25a09004e8a51eb3192adbb580239427bfee0ec9)
2004-02-08Make more functions static, and remove duplication in the use of functionsAndrew Bartlett2-201/+1
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 (This used to be commit fcdc5efb1e245c8fa95cd031f67ec56093b9056e)
2004-02-08Another static function.Andrew Bartlett1-1/+1
Andrew Bartlett (This used to be commit 128c328ddbc9f2283badde95ce743e696f94f6a4)
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 49142c6352eb3645437ef86bcedca1b1895aef60)
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 4c182d3220e87ea74d9c977b8ab1d740ef4cc30f)
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 6a7919f2544a689840fe46f3c58ed66f69aca65a)
2004-02-02there are places in the samba3 code that don't check properly forAndrew Tridgell1-0/+4
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. (This used to be commit 655ec168288159f5c0961ed8cbdd84c4e14eab26)
2004-02-02the conversion from int to size_t in charcnv did not take into accountAndrew Tridgell1-1/+1
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! (This used to be commit 8b8f0c527959c707f274b435fc59156e37232981)
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 3a3e33603084048e647af86a9badaaf49433c789)
2004-01-27Clarify comment on set_effective_uid()Andrew Bartlett1-2/+10
Andrew Bartlett (This used to be commit ca24ae50ea37942dde335e97019880b6ce518a6a)
2004-01-26Add a few more NTSTATUS <=> PAM error mappings.Andrew Bartlett1-1/+3
Andrew Bartlett (This used to be commit 7495cafd42617c0aa2ba9de69f87426ecacc1297)
2004-01-25Fix removal of attributes in LDAP - we would not actually remove the oldAndrew Bartlett1-16/+16
value in the previous code. Andrew Bartlett (This used to be commit c97d3eb1622ee25c24b0cd81b65ec7d4b854e604)
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 6d22f0d8c36bea618ad0adf4eefc2f5a37cb3fda)
2004-01-22* Add SIGABRT to fault handlingStefan Metzmacher1-3/+6
so we now got a backtrace, if we crash in libldap with SIGABRT metze (This used to be commit b5e814294eb3ce44131084d89014cb8a8840fe74)
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 79fe75dcdf6cc38e18ca1231e4357893db4d4a08)
2004-01-15* Fix sys_chown() when no chown() is presendStefan Metzmacher1-0/+2
metze (This used to be commit b0c0d736919079afc4f9bf5a406000048d26fe71)
2004-01-15* Fix XFS quotas: XFS_USER_QUOTA -> USRQUOTAStefan Metzmacher5-34/+181
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 e9e5e2036f13ff847aa3ef52e8be657bef7d5774)
2004-01-14fix XFS quotas the macro changed from HAVE_XFS_QUOTA -> HAVE_XFS_QUOTASStefan Metzmacher1-2/+2
metze (This used to be commit c73e845055163c1d814710fe4d9960c7f3587f12)
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 fac9e6d7125fb9edfade3c92a3cd9e1f2c60cefd)
2004-01-06isolate ldap debug messages to the common smbldap_XXX() functionsGerald Carter1-4/+9
(This used to be commit 7d7a262f45182e67daecdca49df85445c2b9700a)
2004-01-06XFS quota patch from Stefan Metzmacher <metze@metzemix.de>.Jeremy Allison3-37/+48
Jeremy. (This used to be commit cae5f158e583572436a2f4c20d919816d763f93d)
2004-01-06Patch by Stefan Metzmacher <metze@metzemix.de>:Andrew Bartlett1-0/+4
here's a small fix that fixes the new quota system on irix. I need to reanable XFS quotas on irix for the new quota system (Jerry do you want to wait for this for the release ?) But the old system works and is the default on irix! (This used to be commit 5d43e00a49afc4cf523a531ae6db1a3a8b86c650)
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 019aaaf0df091c3f67048f591e70d4353a02bb9b)
2004-01-05Added last missing file.Jeremy Allison1-0/+486
Jeremy. (This used to be commit ffaf9982dcf9e8d8aec1b3edb79ba7c93bfbb9ef)
2004-01-05Oops. Broke the build. Added missing files.Jeremy Allison2-0/+608
Jeremy. (This used to be commit 52eafc131e26ecc2c4ce8df856c380eb7fd8af69)
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 1b1c216122e4dcf40e4ccaea528a7775521fa618)
2004-01-05Patch from Stefan (metze) Metzmacher <metze at metzemix.de> to revert to ↵Jeremy Allison1-529/+0
2.2.x quota methods. :-). "here's a patch which ports the samba 2.2 samba_linux_quota.h stuff to 3_0. This is needed because of so many broken quota files outthere. Please, test this with old, new kernels (strucr dqblk, struct mem_dqblk, and struct if_dqblk) , quota.user, aquota.user formats what is when a user is over soft quota and over hard quotas..." Jeremy. (This used to be commit 4350aa6ce6cfdaf71cdcfd2aebcdc9560fa7efcf)
2004-01-05Always call the auto-init funciton - this avoids tdb segfaulting underAndrew Bartlett1-0/+6
us if we failed to open it earlier. Andrew Bartlett (This used to be commit 379368b0bec1f57cc5302b274362ce2f1df0fd9d)
2003-12-31auth/auth_util.c:Andrew Bartlett2-3/+3
- 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. Andrew Bartlett (This used to be commit 494781f628683d6e68e8ba21ae54f738727e8c21)
2003-12-30The AFS pts command always generates completely lower-case user names. As caseVolker Lendecke1-1/+4
is not significant in windows user names we should not lose information by lower-casing the name before handing it to AFS. Volker (This used to be commit 6d2285b6d1599648661be47abaaa888419700d22)
2003-12-26Based on patch by Petri Asikainen <paca@sci.fi> fix bug #387 and #330.Andrew Bartlett1-14/+15
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 fabf80169079483a1378aa0177d8d8335bd98bb3)
2003-12-25ldap rebind sleep -> ldap replication sleepAndrew Bartlett1-1/+1
While writing documentation for metze's patch, it became clear that this is a better name. Andrew Bartlett (This used to be commit 6f828ff3d3622c56ee732b976e7ab90b7897a8d3)
2003-12-25This is metze's LDAP rebind sleep patch:Volker Lendecke1-0/+28
When smb.conf tells us to write to a read-only LDAP replica and we are redirected by the LDAP server, the replication might take some seconds, especially over slow links. This patch delays the next read after a rebind for 'ldap rebind sleep' milliseconds. Metze, thanks for your patience. Volker (This used to be commit 63ffa770b67d700f138d19b4982da152f57674fc)