1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-21 03:17:08 +03:00

131 Commits

Author SHA1 Message Date
Derrell Lipman
203b4911c1 r14664: r13868@cabra: derrell | 2006-03-22 17:04:30 -0500
Implement enhancement request 3505.  Two additional features are added here.
 There is now a method of saving an opaque user data handle in the smbc_
 context, and there is now a way to request that the context be passed to the
 authentication function.  See examples/libsmbclient/testbrowse.c for an example
 of using these features.
2007-10-10 11:15:42 -05:00
Jeremy Allison
6de5e9ae46 r14418: Try and fix Coverity #39 and #40 by making the
implicit function contract explicit.
Jeremy.
2007-10-10 11:15:29 -05:00
Jim McDonough
1043e0d90c r14279: Fix coverity #86, 87, 88, 89:
Free grp_sid and owner_sid before returning.  Also, only allow one group
or owner.
2007-10-10 11:15:23 -05:00
Volker Lendecke
97789ec8fc r14241: Fix Coverity bug # 146 2007-10-10 11:15:19 -05:00
Volker Lendecke
019dff53f9 r14236: Fix Coverity bug # 90 2007-10-10 11:15:19 -05:00
Volker Lendecke
26d471c02c r14235: Fix Coverity bug # 91 2007-10-10 11:15:19 -05:00
Volker Lendecke
8a8d9057d9 r14234: Fix Coverity bug # 93 2007-10-10 11:15:19 -05:00
Alexander Bokovoy
6b52423033 r14158: Fix coverity CID #147 -- do not dereference pointers before checking their existence 2007-10-10 11:15:14 -05:00
Gerald Carter
b65be8874a r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()
macro which sets the freed pointer to NULL.
2007-10-10 11:10:14 -05:00
Günther Deschner
c0d91f9d19 r13495: Derell, I'm removing that double setup_logging(), just a typo.
Guenther
2007-10-10 11:10:06 -05:00
Gerald Carter
17e63ac4ed r13316: Let the carnage begin....
Sync with trunk as off r13315
2007-10-10 11:06:23 -05:00
Derrell Lipman
aa25dc1248 r13216: r12422@cabra: derrell | 2006-01-28 23:57:35 -0500
Fix cli_setpathinfo() to actually do what it's supposed to.

 Also, get rid of some apparently drug-induced code to deal with create time
 which isn't being manipulated anyway.
2007-10-10 11:06:18 -05:00
Derrell Lipman
5fbc2fbb46 r13214: r12420@cabra: derrell | 2006-01-28 19:10:58 -0500
This should fix bug #3446.

 - The authentication domain provided an an SMB URL was being ignored.  This
   patch fixes that.

 - There were a number of places where string copies were not being confirmed to
   be properly null-terminated.  Now, all string copies in libsmbclient.c are
   properly null-terminated.
2007-10-10 11:06:18 -05:00
Derrell Lipman
f2a24de769 r13212: r12414@cabra: derrell | 2006-01-28 17:52:17 -0500
lp_load() could not be called multiple times to modify parameter settings based
 on reading from multiple configuration settings.  Each time, it initialized all
 of the settings back to their defaults before reading the specified
 configuration file.

 This patch adds a parameter to lp_load() specifying whether the settings should
 be initialized.  It does, however, still force the settings to be initialized
 the first time, even if the request was to not initialize them.  (Not doing so
 could wreak havoc due to uninitialized values.)
2007-10-10 11:06:18 -05:00
Derrell Lipman
64c8e32b63 r12579: r12122@cabra: derrell | 2005-12-29 12:03:00 -0500
allow for arbitrary option value types
2007-10-10 11:06:00 -05:00
Derrell Lipman
4182eb99af r12576: r12115@cabra: derrell | 2005-12-29 11:16:03 -0500
bug (enhancement) #2651: add option to log debug messages to stderr instead of stdout
2007-10-10 11:05:59 -05:00
Derrell Lipman
0070d816ab r12570: r12084@cabra: derrell | 2005-12-29 10:05:16 -0500
do not open connection when only looking for cached connection; also, fix crash caused by missing initialization following recent locale changes
2007-10-10 11:05:59 -05:00
Derrell Lipman
3d45023368 r12569: r12083@cabra: derrell | 2005-12-29 09:39:45 -0500
fix line length and make formatting/indentation more consistent
2007-10-10 11:05:59 -05:00
Derrell Lipman
85e4cab1d9 r12485: r12044@cabra: derrell | 2005-12-25 16:46:47 -0500
When enumerating what could be a server name or a workgroup name, first
 check for an existing server structure.  If none exists, then go through
 the previous determination of whether it's a serrver or a workgroup.  This
 should avoid doing a NetBIOS name query each time, if we've already
 connected to the specified server.  (While we're at it, clean up indenting
 and line length in this area of code.)
2007-10-10 11:05:58 -05:00
Derrell Lipman
ded5fceef1 r12472: r12040@cabra: derrell | 2005-12-24 23:26:55 -0500
revert immediately previous change and fix problem correctly.  Interfaces were being loaded before all configuration files had been read.  *This* should fix byg 3336.
2007-10-10 11:05:57 -05:00
Derrell Lipman
6d7a9ce7a7 r12471: r12038@cabra: derrell | 2005-12-24 23:17:16 -0500
libsmbclient was not loading the global configuration file.  This should fix 3336.
2007-10-10 11:05:57 -05:00
Derrell Lipman
481abfbab4 r12466: r12028@cabra: derrell | 2005-12-24 20:25:38 -0500
parse dates correctly.  w_time and m_time were reversed.
2007-10-10 11:05:56 -05:00
Derrell Lipman
965025c057 r12235: r11738@cabra: derrell | 2005-12-14 13:15:14 -0500
Ensure that when libsmbclient copies a cli, it prevents the cli from later
 being freed, by turning off the 'allocated' flag.

 Change a DEBUG message in pipe_open code from level 0 to level 1 since
 libsmbclient is now regularly attempting to open a pipe for share enumeration,
 and falling back to RAP if RPC is unavailable (e.g. win98).  We don't want
 the debug message to display when the pipe open fails, under these normal
 circumstances.
2007-10-10 11:05:50 -05:00
Derrell Lipman
62a02b8f2a r12225: r11729@cabra: derrell | 2005-12-13 22:59:45 -0500
1. Fix a crash bug which should have reared its ugly head ages ago, but for
    some reason, remained dormant until recently.  The bug pertained to
    libsmbclient doing a structure assignment of a cli after having opened a
    pipe.  The pipe open code makes a copy of the cli pointer that was passed
    to it.  If the cli is later copied (and that cli pointer that was saved
    is no longer valid), the pipe code will cause a crash during shutdown or
    when the copied cli is closed.

 2. The 'type' field in enumerated shares was not being set correctly with
    the new RPC-based mechanism for enumerating shares.
2007-10-10 11:05:50 -05:00
Derrell Lipman
86ab4cf42b r12119: r10812@cabra: derrell | 2005-12-07 22:44:26 -0500
sync to repository didn't work correctly...???
2007-10-10 11:05:45 -05:00
Derrell Lipman
99fbe44ac5 r12118: r10805@cabra: derrell | 2005-12-07 22:34:55 -0500
first go at supporting long file names.  seeems to work; requires more testing
2007-10-10 11:05:45 -05:00
Derrell Lipman
8a86d7bddc r12098: r10797@cabra: derrell | 2005-12-06 12:09:00 -0500
fixed another memory leak and reverted an (incorrect) fix from yesterday
2007-10-10 11:05:44 -05:00
Derrell Lipman
376445c90b r12081: r10674@cabra: derrell | 2005-12-05 13:31:28 -0500
get rid of temporary #if 0 blocks
2007-10-10 11:05:44 -05:00
Derrell Lipman
c5781c9cf5 r12080: r10673@cabra: derrell | 2005-12-05 13:22:34 -0500
Correct some memory and file descriptor leaks.

 This should fix bugs 3257, 3267 and 3273.
2007-10-10 11:05:44 -05:00
Jeremy Allison
f46d847065 r11256: Remove use of long long and strtoll in libsmbclient (we
can't assume long long is always there). Removed unused
var in new a/c rename code.
long long still used in eventlog code but Jerry has promised
to fix that.
Jeremy.
2007-10-10 11:05:09 -05:00
Gerald Carter
d3a52900ec r11124: Commit Chris' fixes for libmsrpc after the rpc_client
rewrite.  His comments:

        I've gotten the libmsrpc code to work with TRUNK.
        I've put the patch at:
        www.uoguelph.ca/~cnicholl/libmsrpc_trunk_v1.patch.gz

        It is from revision 11093.

        I also fixed a minor bug in the svcctl code, the timeout
        parameter for all the control functions was working
        in milliseconds instead of seconds.

Also fixed bug in Makefile when building libmsrpc.a
2007-10-10 11:05:01 -05:00
Jeremy Allison
e2639ac9ff r10970: Fix bug #3166 - null pointer dereference if $HOME not
defined. Also clarified confusing error messages.
Jeremy.
2007-10-10 11:04:58 -05:00
Gerald Carter
939c3cb5d7 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
2007-10-10 11:04:48 -05:00
Gerald Carter
79fcc3bb7b r10176: adding smbctool from Kalim's SoC project; requires make bin/smbctool 2007-10-10 11:03:35 -05:00
Gerald Carter
e813de1e52 r10001: adding in libmsrpc from Chris Nicholls (SoC project). not built by default per conversation with Jeremy until the rpc changes from trunk are merged back 2007-10-10 11:03:30 -05:00
Volker Lendecke
25cbcfba30 r8093: Next round. Now it compiles with --enable-socket-wrapper.
Volker
2007-10-10 10:58:11 -05:00
Jeremy Allison
9506b8e145 r7882: Looks like a large patch - but what it actually does is make Samba
safe for using our headers and linking with C++ modules. Stops us
from using C++ reserved keywords in our code.
Jeremy
2007-10-10 10:58:00 -05:00
Derrell Lipman
513ea79b2e r7817: Eliminate use of ctime_r() in libsmbclient DEBUG statement. It seems that
ctime_r() takes different parameters on Solaris than it does on Linux, and
it's easier to just eliminate the use of it than to write a configure test.
2007-10-10 10:57:21 -05:00
Derrell Lipman
bf33902c05 r7245: bug fixes in libsmbclient, setting time attributes 2007-10-10 10:57:05 -05:00
Derrell Lipman
6f951c863e r7175: fix incorrect comment 2007-10-10 10:57:04 -05:00
Derrell Lipman
6c05812bd9 r7172: This is the proper fix for setting file times from libsmbclient. We now
try setpathinfo, and if that doesn't work (e.g. on win98), revert to the
previous slower method.
2007-10-10 10:57:04 -05:00
Derrell Lipman
bab0bf7f4f r7168: Updating file times from libsmbclient was not working for win98. Although
the function that was being used to set attributes is a core protocol
function (SMBsetatr = 0x09), it does not appear to work on win98.  As a
temporary measure, when file times are to be set, this version opens the
file and uses SMBsetattrE = 0x22 instead.  (The other advantage of this
function over the original one is that it supports setting access time as
well as modification time.)

The next step, the proper solution if it can be made to work, is to write
functions that use TRANS2_SET_PATH_INFO instead.
2007-10-10 10:57:04 -05:00
Jeremy Allison
316df944a4 r6595: This is Volkers new-talloc patch. Just got the go-ahead from
Volker to commit. Woo Hoo !
Jeremy.
2007-10-10 10:56:46 -05:00
Derrell Lipman
615a62b21f r6392: - Fixes bug 2564: when smbc_opendir() was called with a file rather than
a directory, the errno returned could end up as ENOENT rather than ENOTDIR.

- Fixes some compiler warnings which showed up on IRIX, as reported by
  James Peach.
2007-10-10 10:56:40 -05:00
Derrell Lipman
cf2dcc1108 r6156: Fixes bug #2543. Properly cache anonmous username when reverting to anonymous login, in libsmbclient. 2007-10-10 10:56:25 -05:00
Derrell Lipman
2c5a6305bd r6155: Fixes bug #1133
Added provision for overloading some global configuration options via the new,
per-user file ~/.smb/smb.conf.append which is read after the global config
file is read (and only if the global config file was read).  This leave the
original, BC behavior of ~/.smb/smb.conf which, if found, is read but causes
the global config file to not be read.

Also fixed a potential seg fault in to lp_dump_one().
2007-10-10 10:56:25 -05:00
Derrell Lipman
994694f7f2 r6149: Fixes bugs #2498 and 2484.
1. using smbc_getxattr() et al, one may now request all access control
   entities in the ACL without getting all other NT attributes.
2. added the ability to exclude specified attributes from the result set
   provided by smbc_getxattr() et al, when requesting all attributes,
   all NT attributes, or all DOS attributes.
3. eliminated all compiler warnings, including when --enable-developer
   compiler flags are in use.  removed -Wcast-qual flag from list, as that
   is specifically to force warnings in the case of casting away qualifiers.

Note: In the process of eliminating compiler warnings, a few nasties were
      discovered.  In the file libads/sasl.c, PRIVATE kerberos interfaces
      are being used; and in libsmb/clikrb5.c, both PRIAVE and DEPRECATED
      kerberos interfaces are being used.  Someone who knows kerberos
      should look at these and determine if there is an alternate method
      of accomplishing the task.
2007-10-10 10:56:24 -05:00
Derrell Lipman
542922cb2e r6102: add support for opening a file for write with O_APPEND in libsmbclient 2007-10-10 10:56:21 -05:00
Gerald Carter
85be4c5df3 r5968: derrell's large file fix for libsmbclient (BUG 2505) 2007-10-10 10:56:13 -05:00
Gerald Carter
7dfafa712d r5953: more compiler cleanups; moved SID_LIST from smb.h to privileges.c to cleanup the name space 2007-10-10 10:56:11 -05:00