summaryrefslogtreecommitdiffstats
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug #7154 - mangling method = hash can crash storing a name not ↵Jeremy Allison2010-02-221-3/+5
| | | | | | | | | | | containing a '.' Fix use of uninitialized variable. This can lead to crashes if mangling = hash processes names with no '.'. Jeremy. (cherry picked from commit df13b1303a751962d8f7d5298b39e4a7500fef15) (cherry picked from commit 7eaeb891c8aee880fb06733f998b2feb95ef9c36)
* Fix bug #7155 - valgrind Conditional jump or move depends on uninitialised ↵Jeremy Allison2010-02-221-0/+1
| | | | | | | | | | | | value(s) error when "mangling method = hash" The charset array allocated in init_chartest() is allocated by MALLOC, but only some elements of it being set after allocation. Fix is to memset to zero after allocation. Jeremy. (cherry picked from commit a4e8210ba7d6d471cb9f17754244393b9c1e5930) (cherry picked from commit fcca63d5fd0b900bc4bdcfbfb21b14f655abbbf7)
* Fix bug #6557 - Do not work VFS full_auditJeremy Allison2010-02-221-18/+16
| | | | | | | | | | | | Re-arrange the operations order so SMB_VFS_CONNECT is done first as root (to allow modules to correctly initialize themselves). Reviewed modules to check if they needed CONNECT invoked as a user (which we previously did) and it turns out any of them that cared needed root permissions anyway. Jeremy. (cherry picked from commit 2eb33851a753cbd5594d44243802388cff5ae152)
* cifs.upcall: allocate a talloc context for smb_krb5_unparse_nameJeff Layton2010-02-171-1/+4
| | | | | | | | | | | | | | | | | | | | cifs.upcall calls smb_krb5_unparse_name with a NULL talloc context. Older versions of this function though will conditionally use SMB_REALLOC instead of TALLOC_REALLOC when a NULL context is passed in. To make it more consistent, just spawn a talloc context that we can pass into this function. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=565446 https://bugzilla.samba.org/show_bug.cgi?id=6868 Reported-by: Ludek Finstrle <luf@seznam.cz> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Günther Deschner <gd@samba.org> (cherry picked from commit a8cc2fa09ed43a167f62711bef363a5ac335dc78) Fix bug #6868 (make bin/cifs.upcall fails). (cherry picked from commit fa8d57323c0ff4f92f0aca57b41d237340121720)
* spoolss: disable GetPrinterDriver level 101 (as called by XP).Günther Deschner2010-02-151-5/+7
| | | | | | | | | | We still dont get the marshalling right, disable and XP will just fall back to level 6. Guenther Fix bug #7136 (spoolss getprinterdriver2 level 101 marshalling bad). (cherry picked from commit 4a55047465029f302c92c7490aeebc1daa7b4e85)
* Fixes issue with preexec scripts creating a share directory, and problems if ↵Jeremy Allison2010-02-153-29/+68
| | | | | | | | | | | | | | | | | | a smb.conf reload turns wide links back on after a connection is establised. Includes git refs : cd18695fc2e4d09ab75e9eab2f0c43dcc15adf0b 94865e4dbd3d721c9855aada8c55e02be8b3881e 5d92d969dda450cc3564dd2265d2b042d832c542 02a5078f1fe6285e4a0b6ad95a3aea1c5bb3e8cf a6f402ad87ff0ae14d57d97278d67d0ceaaa1d82 from master. Jeremy. Fix bug #7104 ("wide links" and "unix extensions" are incompatible.) (cherry picked from commit 16e73d88944ce644cccfa19a99338f5903c061f0)
* s3: Fix typo found by jhell <jhell@DataIX.net>Volker Lendecke2010-02-151-2/+2
| | | | | | (cherry picked from commit 271a4c60dbec0d001dc55df58de8e54274137853) (cherry picked from commit eb390b8f917f52eb28f46f39a19abdc717051f3d) (cherry picked from commit f8dbb021393edf9d8394b5b7adf03c3432257ce7)
* s3-spoolss: implement spoolss_EnumJobs level 3.Günther Deschner2010-02-151-0/+76
| | | | | | | | | | | | | | Level 3 has been added with NT 4.0 and Windows 7 (at least 64bit version) makes use of it in order to display queued jobs. Windows 7 will *not* fall back to level 2 if we just return WERR_UNKNOWN_LEVEL, instead there will be no printjobs displayed at all. Guenther (cherry picked from commit 25001bbd1b0b32073073dab7cf5b78a2b902163f) (cherry picked from commit eacb3b7be16884bb6bfcc3b4db97708566d66c40) Fix bug #7130 (enumjobs level 3 is required by win7). (cherry picked from commit 7132ca8d41ce936287e5f64e3596c5d1d1b67769)
* s3:passdb: only use gid_to_sid() result if the result is a group of our ↵Stefan Metzmacher2010-02-151-4/+16
| | | | | | | | | | | | | | | local sam Otherwise retry with pdb_gid_to_sid(). metze (cherry picked from commit 4dc2be2264926fe415e4e40e212f94793c9831d1) Last seven patches address bug #7116 (pdb_ldap performance fixes). (cherry picked from commit 8946a47fcebe57f459c59ee2cb163e15901ff996) Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 5b5df3d1223d15d4fde9a2a2db83c60aaa266ca4)
* s3:pdb_ldap: don't search for the users primary group, if we already know itStefan Metzmacher2010-02-151-31/+35
| | | | | | | | | metze (cherry picked from commit 6753fb1cf6a834b12b2a9dce3b1a9555390c17be) (cherry picked from commit da7cb9feacc7cb84499c73ef463d187a7b2754e8) Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 0b2dd730a52ae9dbd622c50fb70492398f6503d9)
* s3:pdb_ldap: optimize ldapsam_alias_memberships() and cache ldap searches.Stefan Metzmacher2010-02-152-7/+34
| | | | | | | | | | | | | | ldapsam_alias_memberships() does the same LDAP search twice, triggered via add_aliases() from create_local_nt_token(). This happens when no domain aliases are used. metze (cherry picked from commit 49ace81e19de231825216cbf07c7422687131bb6) (cherry picked from commit cb31c1df92b195b3fb80b6e21bfba83b8cd867fd) Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 8f1c7c117b3bca058024daa34f777efa5ece88f8)
* s3:pdb_ldap: try to build the full unix_pw structure with ldapsam:trusted ↵Stefan Metzmacher2010-02-151-5/+85
| | | | | | | | | | | | | support And also store the gid_to_sid mappings in the idmap_cache. metze (cherry picked from commit 25038fa85ff69962ca0975f31802218a897aa1ec) (cherry picked from commit 66a48d2226d245c373b744c7edea60b3daa57f0f) Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit a2ff5f0dd08c40fdbea8cb11e1b18d996a4d8c39)
* s3:passdb: speed up pdb_get_group_sid()Stefan Metzmacher2010-02-151-5/+28
| | | | | | | | | | | | | | | Use the cached version gid_to_sid() instead of pdb_gid_to_sid(). And also avoid the expensive lookup_sid() call for wellkown domain groups. metze (cherry picked from commit e10d0869567436902c8b8cfb50f8c64148d554cb) (cherry picked from commit b0c8ff971934ef8aa21abece8693807e0a2ca722) Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 5d97d5703dcf62f2c610316b2ba47483652368b3)
* s3: Make pdb_copy_sam_account also copy the group sidVolker Lendecke2010-02-151-0/+4
| | | | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit b99046fed1bf4a908ed856afb17c3c934c6d305d) (cherry picked from commit a1862c23346959cd0aa77653bf488e0686d14376) Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 66b472fdd6e55550abe4db04b0666d56ec700a0e)
* s3: shortcut gid_to_sid when "ldapsam:trusted = yes"Stefan Metzmacher2010-02-151-0/+72
| | | | | | | | | | | | | | | | The normal gid_to_sid behaviour is to call sys_getgrgid() to get the name for the given gid and then call the getsamgrnam passdb method for the resulting name. In the ldapsam:trusted case we can reduce the gid_to_sid operation to one simple search for the gidNumber attribute and only get the sambaSID attribute from the correspoinding LDAP object. This reduces the number of ldap roundtrips for this operation. metze (similar to commit 0fb99386d41241f62312d4bb535976344e5d6492) (cherry picked from commit 479087716f50e8a1961163750b1d651dcd23dfc2)
* s3:is_trusted_domain: shortcut if domain name == global_sam_nameMichael Adam2010-02-151-0/+4
| | | | | | | | | | | A domain can't have a trust with itself. This saves some roundtrips to the ldap server for ldapsam. Michael (cherry picked from commit dc3a90cf21813526854c12db126d08ebf32f8ae5) Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit c48405ed0ab0e3c3a0c1472e3bf874a4a64c0261)
* s3:is_trusted_domain: shortcut if domain name is NULL or emptyMichael Adam2010-02-151-0/+4
| | | | | | | | | | This saves some roundtrips to LDAP in an ldapsm setup. Michael (cherry picked from commit 0aa5a60d3033fddd652eb4ea89abdf97db912df3) Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 85d8565e8c5a290698d0f0599f851dc0bee50245)
* s3: shortcut uid_to_sid when "ldapsam:trusted = yes"Michael Adam2010-02-151-0/+75
| | | | | | | | | | | | | | | | | | The normal uid_to_sid behaviour is to call sys_getpwuid() to get the name for the given uid and then call the getsampwnam passdb method for the resulting name. In the ldapsam:trusted case we can reduce the uid_to_sid operation to one simple search for the uidNumber attribute and only get the sambaSID attribute from the correspoinding LDAP object. This reduces the number of ldap roundtrips for this operation. Michael (cherry picked from commit 37dcc8a400ea41fb0a0559c9922cc41ac28ad045) Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 91e40dfde99b08158b809590c44c22b503403157)
* s3:smbd: also fill the memcache with sid<->id mappings in ldapsam_sid_to_id()Michael Adam2010-02-151-0/+2
| | | | | | | | | | not only the persistent idmap cache. Michael (cherry picked from commit ee2565bd461ccfb916c5290c883e5ced3af72141) Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 05f23a8dd6824bb6af3f60304096e621e534f4d4)
* s3:smbd: make idmap cache persistent for "ldapsam:trusted".Michael Adam2010-02-151-0/+4
| | | | | | | | | | | | | | This stores the mappings found in the idmap cache (which lives inside gencache). This cache is already read in sid_to_Xid() and Xid_to_sid() for ldapsam:trusted, this fills the opposite direction, massively reducing the number of ldap roundtrips across smbd restarts. Michael (cherry picked from commit d5537cbbf931f0bca519371bfd084fb0051acd57) Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit c7220ff3a8281867ffc1a3bcaa992ca9eafba6ed)
* Fix large paged searchVolker Lendecke2010-02-151-0/+1
| | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> (cherry picked from commit afb06a8af3c4e86ef9960c8beb19a22f5fd0f3c2) Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit cc529f47e10a87ef6688b14ec399edcd2e4e884d)
* =?utf-8?q?=D1=953:ldap:=20search=20for=20account=20policies=20in=20objectcla ↵Björn Jacke2010-02-151-1/+6
| | | | | | | | | | | | ss=20sambaDomain,=20not=20* =20(cherry=20picked=20from=20commit=20e5f41591504769b5c7beb5a35bb0f95b33d27a8b)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 4e66860d89872d2ba808761e0d58ed18e7ed428e)
* s3:ldap: don't search when no values where found (cherry picked from commit ↵Björn Jacke2010-02-151-1/+1
| | | | | | | 70063522065ab3e5a21fb11db0097b808aa11100) Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 0b7d7e7c3d6a5abe94a0864f1ccaf9d1c00b8b7d)
* Fix bug #7122 - Reading a large browselist fails (server returns invalid ↵Jeremy Allison2010-02-152-3/+6
| | | | | | | | | | | | | | | | | | values in subsequent SMBtrans replies) There are two problems: 1). The server is off-by-one in the end of buffer space test. 2). The server returns 0 in the totaldata (smb_vwv1) and totalparams (smb_vwv0) fields in the second and subsequent SMBtrans replies. This patch fixes both. Jeremy. (cherry picked from commit 8ddc977c1421a47bedba8d5494f7ae67692b772a) Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 8ac6085a2c7382e544888e632ff62c30f7e7a884)
* Fix off-by-one error in working out the limit of the NetServerEnum comment.Jeremy Allison2010-02-151-1/+1
| | | | | | | | Jeremy. (cherry picked from commit 9ad6f432f3f5844b4b419e7cbaf3c3e70b052d29) Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 026f05839b6dbdeb5be3953930a28f7650c1e1da)
* s3:smbd: use StrCaseCmp() instead of strcasecmpStefan Metzmacher2010-02-151-4/+3
| | | | | | metze (cherry picked from commit bc8242a08e1bb9489cc8171b1ec02bd2518b1857) (cherry picked from commit 8142883b40819b5cb92ea671bb6c89bff68d3680)
* s3:smbd: Fix really ugly bool vs. int bug!!!Stefan Metzmacher2010-02-151-2/+2
| | | | | | | | | | A comparison function for qsort needs to return an 'int'! Otherwise you'll get random results depending on the compiler and the architecture... metze (cherry picked from commit 1686a5e7e7eb1b411b003cbbde5c0d28741c6d02) (cherry picked from commit 4e419df9154c329b3376ab00d6bb55093fbfe71a)
* s3:libsmb: fix NetServerEnum3 rap calls.Stefan Metzmacher2010-02-151-5/+19
| | | | | | metze (cherry picked from commit 9b5198dd443a00fdad4faa1f9cdabedd81012d93) (cherry picked from commit 86eae5b4862735309313e1800be44dab2641b393)
* s3:smbd: implement api_RNetServerEnum3Stefan Metzmacher2010-02-151-1/+212
| | | | | | | | This is needed to support large browse lists. metze (cherry picked from commit 30eec0656c926d3d85a438dc28f17649b53318f8) (cherry picked from commit f37f187070934e1046ce05d298d92ede7e6f7030)
* s3:smbd: add/improve some DEBUG messages in api_RNetServerEnum2()Stefan Metzmacher2010-02-151-4/+6
| | | | | | metze (cherry picked from commit 495ac4616654c9e62e14031b7439aff21e42ec91) (cherry picked from commit f8f6beff57fd58b69648633f5b1c15289015f96b)
* s3:smbd: rename api_RNetServerEnum => api_RNetServerEnum2Stefan Metzmacher2010-02-151-3/+3
| | | | | | metze (cherry picked from commit dc58672c6588a1715698721153b35ed2d594bc67) (cherry picked from commit 0b6d850a553c0a558d579ab5e46f49794a015e34)
* Missed one check on the memcpy for bug #7063.Jeremy Allison2010-02-151-1/+1
| | | | | Jeremy. (cherry picked from commit 832fed700589ba0a49381fac71ff99edb5e8f167)
* Second part of fix for bug 7063 - Samba 3.4.5 on ubuntu 8.04 64 bit - Core ↵Jeremy Allison2010-02-151-1/+4
| | | | | | | | | | | dumps. Ensure we have no naked memcpy calls. This isn't a crash bug (it's already checked in the data_blob_talloc_zero() above, but I want to get into the pattern of having all memcpy's covered by safety checks. Jeremy. (cherry picked from commit 974bc68d7884ab77210a237e4ca8020ee88ae059)
* Fix bug 7104 - "wide links" and "unix extensions" are incompatible.Jeremy Allison2010-02-154-39/+10
| | | | | | | | | | | | | | | | Change parameter "wide links" to default to "no". Ensure "wide links = no" if "unix extensions = yes" on a share. Fix man pages to refect this. Remove "within share" checks for a UNIX symlink set - even if widelinks = no. The server will not follow that link anyway. Correct DEBUG message in check_reduced_name() to add missing "\n" so it's really clear when a path is being denied as it's outside the enclosing share path. Jeremy. (cherry picked from commit 9e64c33b7757dd4528a9c8d31d0c0c159a33daf8)
* Fix bug 7063 - Samba 3.4.5 on ubuntu 8.04 64 bit - Core dumps.Jeremy Allison2010-02-151-2/+9
| | | | | | | | | Reported and found by Martin Hochreiter <linuxbox@wavenet.at>. Ensure we copy the right amount of registry data into the outgoing buffer. Jeremy. (cherry picked from commit 4dd841cf3f71b33a18db70bbbb968a647aaa8efc)
* s3: Fix an uninitialized variable referenceVolker Lendecke2010-02-151-1/+2
| | | | | Fix bug #5885 (swat prints a bogus ip-address in smb.conf). (cherry picked from commit 2db64331ae27c8bf6ce341f6cab8f02e706a3f7a)
* s3: normalize "Changing password for" msg IDs and STRsLars Müller2010-02-1518-30/+30
| | | | | | | | | | An additional space at the end of the "Changing password for" msgid lead to untranslated pam_winnind messages. (cherry picked from commit f9f1db18834648da73b7b1f6d9472523941e8277) Fix bug #7102 (normalize "Changing password for" msg IDs and STRs). (cherry picked from commit f6322442f54d49b8bacec2d8fc7960d0b87d674b) (cherry picked from commit 1bbbc152b4222554b2738108f3e267e147411166)
* s3:libsmb: don't reuse the callers stype variable in cli_NetServerEnum()Stefan Metzmacher2010-02-151-2/+3
| | | | | | | | | | | | | When we need to do more than one network operation to get the browse list we need to use the same 'stype' value each time. metze Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit c2e4746fa9d68e7601e8e90cc0144d2e65a695b6) Fix bug #7098 (smbclient -L gives wrong results with a large browse list). (cherry picked from commit 49ed8e5ef079edf42bbe5325a46547ecfdff8a7d)
* Add cross option to samba_cv_linux_getgrouplist_okLars Müller2010-02-151-1/+3
| | | | | | | | | | | "cross" as an option got removed accidentl with commit e5a95132 while moving in direction of 3.2. Patch proposed by Richard Sharpe <realrichardsharpe@gmail.com>. (cherry picked from commit 30ea9932f5ea8a73c84dbab3ae3e997c2ae34e79) Fix bug #7047. (cherry picked from commit 050f86f83b8d6642e1b88c37f4ad294f5e206b87)
* s3/smbd: Fix string buffer overflow causing heap corruptionSteven Danneman2010-02-151-1/+2
| | | | | | | | | | | | | | | | | | The destname malloc size was not taking into account the 1 extra byte needed if a string without a leading '/' was passed in and that slash was added. This would cause the '\0' byte to be written past the end of the malloced destname string and corrupt whatever heap memory was there. This problem would be hit if a share name was given in smb.conf without a leading '/' and if it was the exact size of the allocated STRDUP memory which in some implementations of malloc is a power of 2. (cherry picked from commit f42971c520360e69c4cdd64bebb02a5f5ba49b94) Fix bug #7096. (cherry picked from commit db5ccb70b6ac51ea263889cc9cdd523673ae8ecd) (cherry picked from commit 3916710b9414d679774399e6d0cff61e4b67a2e3)
* s3: Simplify the code a bit: Catch (len==0) earlyVolker Lendecke2010-02-151-7/+4
| | | | | Part of a fix for bug #7081. (cherry picked from commit ecec9fb2d283f17aee8eceb39ab61d8204cff0f3)
* Fix bug 7081 - vfs_expand_msdfs doesn't work correctly (with fix identified)Jeremy Allison2010-02-151-3/+16
| | | | | | | | Fix inspired by idea from Eric Horst <erich@cac.washington.edu>. Jeremy. (cherry picked from commit de24209f0a745ada4220a1751c4ed88ae6eea575) (cherry picked from commit fd630147319b9a21426ba2a34b726c35c03396b6)
* Fix bug #7072 - Accounts can't be unlocked from ldap.Jeremy Allison2010-02-151-8/+17
| | | | | | | | | | | | | | | | Fix suggested by Andy Hanton <andyhanton@gmail.com>. The LOGIN_CACHE struct contains two time_t entries, but was being written to and read from via tdb_pack/tdb_unpack functions using explicit 32-bit int specifiers. This would break on machines with a 64-bit time_t. Use correct int sizes for tdb_pack/tdb_unpack. We have to fix this properly before 2037 :-). Contains fixes from master 627fb85092f728065b6d772c41aeb75018154e86 and 69fd8461b8792f4fee1b61db03953044565492c6. Jeremy. (cherry picked from commit 3a341c54ba6b8b63419662207f1d42767a00eb16)
* Fix bug #7067 - Linux asynchronous IO (aio) can cause smbd to fail to ↵Jeremy Allison2010-02-153-5/+71
| | | | | | | | | | | respond to a read or write. Only works on Linux kernels 2.6.26 and above. Grants CAP_KILL capability to allow Linux threads under different euids to send signals to each other. Jeremy. (cherry picked from commit 899bd0005f56dcc1e95c3988d41ab3f628bb15db) (cherry picked from commit 246eba3b807e5ce50ee838c51823a9eb44f6b690)
* Do not segfault in pdb_search_destructor if no real search was startedVolker Lendecke2010-02-151-1/+2
| | | | | | | (cherry picked from commit d07464b21fe652e205f5eb2c74d12495bab100ce) Fix bug #7068 (pdb_search api may crash as non-root user). (cherry picked from commit 135b67a627fd1e98b4211fe3ac738ae2fec10145)
* s3:pdb_ldap: restore Samba 3.0.x behavior and use the first "uid" value.Stefan Metzmacher2010-02-151-1/+1
| | | | | | | | | | | See bug #6157 for more details. metze Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 25806f43ddee7e2653e907eea2c6fcc075960fa1) (cherry picked from commit ac224452b94865db346ed68dc517f84d40e6303c) (cherry picked from commit 20a405288fb1b33c43b31b170f1acc9c82732208)
* s3:smbldap: add smbldap_talloc_first_attribute()Stefan Metzmacher2010-02-152-0/+37
| | | | | | | | | metze Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit c992127f8a96c37940a6d298c7c6859c47f83d9b) (cherry picked from commit 915b7552b71904baf6a452bdc1649e76d8286a14) (cherry picked from commit 6402321d5bbbb28b335787856b16c3d8556e8e0a)
* VERSION: Raise version number up to 3.4.6.Karolin Seeger2010-02-151-1/+1
| | | | | Karolin (cherry picked from commit febac98cadd14ece58f3df99ce7670d41c046e3d)
* s3: Fix a crash in libsmbclient used against the OpenSolaris CIFS serverVolker Lendecke2010-01-181-1/+1
| | | | | | | | | A user has sent me a sniff where the OpenSolaris CIFS server returns "32" in totalentries, but the array in ctr only contains 15 entries. Look at the right delimiter for walking the array. Fix bug #7046 (libsmbclient crash against OpenSolaris CIFS server). (cherry picked from commit 734446bb3a8984ec805c73e06e553312b46e4094)
* Fix bug 7045 - Bad (non memory copying) interfaces in smbc_setXXXX calls.Jeremy Allison2010-01-182-10/+31
| | | | | | | | | | | | | | | In smbc_free_context libsmbclient just called free() on the string options so it assumes the callers have malloced them before setting them via smbc_set calls. Change to correctly malloc/free string options to the library. Protect against SMB_STRDUP of null. Contains 2d41b1ab78639abe4ae030ff482573f464564dd7 and f85b6ee90b88c7f7b2a92c8a5f3e2ebe59c1087b from master. Jeremy (cherry picked from commit 1d9dc38aec417c8ccc9fa34d32015ee57d877ba9)