1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-27 08:23:49 +03:00
Commit Graph

623 Commits

Author SHA1 Message Date
Volker Lendecke
0baa3fcfa6 r18402: Comment and (hopefully) fix remote command completion for smbclient.
Fix Bug ID 4084.

Volker
2007-10-10 11:51:22 -05:00
Volker Lendecke
86f4ca84f2 r18047: More C++ stuff 2007-10-10 11:43:24 -05:00
Volker Lendecke
ac7087a651 r17850: Another dummy checkin for the build farm to retry 2007-10-10 11:38:53 -05:00
Jeremy Allison
425280a1d2 r17800: Start using struct timespec internally for file times
on the wire. This allows us to go to nsec resolution
for systems that support it. It should also now be
easy to add a correct "create time" (birth time)
for systems that support it (*BSD). I'll be watching
the build farm closely after this one for breakage :-).
Jeremy.
2007-10-10 11:38:48 -05:00
Volker Lendecke
05268d7a73 r17605: Some C++ warnings 2007-10-10 11:38:42 -05:00
Volker Lendecke
acf237b3cd r17572: Fix the build 2007-10-10 11:38:40 -05:00
Volker Lendecke
94817a8ef5 r17571: Change the return code of cli_session_setup from BOOL to NTSTATUS
Volker
2007-10-10 11:38:39 -05:00
Jeremy Allison
596497ccc2 r16971: Ensure we use the correct separator for pathnames
in POSIX mode (clitar needs fixing too). Add test
posix lock/unlock commands.
Jeremy.
2007-10-10 11:19:16 -05:00
Jeremy Allison
2d8d4bd77b r16962: Add a few utility fns into client. Allow POSIX capabilities
to be selected.
Jeremy.
2007-10-10 11:19:16 -05:00
Jeremy Allison
9dafb7f48c r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
2007-10-10 11:19:14 -05:00
Jeremy Allison
7d7a98208b r16608: Klocwork #2035. Null deref (bit of a stretch... :-).
Jeremy.
2007-10-10 11:19:03 -05:00
Jeremy Allison
16b0617cb0 r16587: Fix Klocwork #1987. Memleak on reusing x_dbf.
Jeremy.
2007-10-10 11:19:01 -05:00
Volker Lendecke
3df0bf7d60 r16360: Fix Klocwork ID 136 520 521 522 523 542 574 575 576 607
in net_rpc.c: 715 716 732 734 735 736 737 738 739 749

in net_rpc_audit.c: 754 755 756

in net_rpc_join.c: 757

in net_rpc_registry: 766 767

in net_rpc_samsync.c: 771 773

in net_sam.c: 797 798

Volker
2007-10-10 11:18:48 -05:00
Volker Lendecke
ded2952e00 r16338: Fix Klocwork ID 150 2007-10-10 11:17:36 -05:00
James Peach
848ac756f6 r16274: Fix the smbclient prompting behaviour for both systems that have
libreadline and those that don't. We always use the built-in readline
replacement for non-interactive mode. Interactive prompts are always
emitted to stdout and non-interactive mode never prompts at all.

Introduce x_fdup to avoid spuriously closing stdout when a logfile is
specified on the command line and setup_logging is called a second time.
2007-10-10 11:17:30 -05:00
Volker Lendecke
4974c598c0 r16251: for i in seq 1 1000
do
	echo "I will always compile before commit :-)"
done

Also fix Klokwork ID 806.

Volker
2007-10-10 11:17:28 -05:00
Volker Lendecke
d7a75ee94d r16250: Fix Klokwork IDs 148, 151, 152, 154.
Volker
2007-10-10 11:17:28 -05:00
Jeremy Allison
6c61dc8ed6 r16230: Fix Klocwork #861 and others. localtime and asctime
can return NULL. Ensure we check all returns correctly.
Jeremy.
2007-10-10 11:17:26 -05:00
Günther Deschner
ff93fc7c1e r15552: Fix segfault...
Guenther
2007-10-10 11:16:58 -05:00
Günther Deschner
a0548914c2 r15519: Fix segfault.
Guenther
2007-10-10 11:16:55 -05:00
James Peach
a19d4f2bb4 r15448: New autoconf macro to test for sysconf variables. 2007-10-10 11:16:46 -05:00
Jeremy Allison
1b73e699e1 r15141: Fix for #3592 inspired by Justin Best <justinb@pdxmission.org>.
Ignore a file in a tar output if the first read fails. Also
cope with <2GB read fail.
Jeremy.
2007-10-10 11:16:26 -05:00
Volker Lendecke
d3d388180d r15098: Make smbclient -L use RPC to list shares, fall back to RAP. This should list
long share names.

Volker
2007-10-10 11:16:23 -05:00
Jeremy Allison
a3b8bee3ff r14359: Try and fix Coverity #176 by making the pointer
aliasing clearer. This isn't a bug but a code
clarification.
Jeremy.
2007-10-10 11:15:26 -05:00
Jeremy Allison
d793e1550c r14351: Ensure we use the minimum of PATH_MAX and sizeof(pstring).
Fix Coverity #59.
Jeremy.
2007-10-10 11:15:26 -05:00
Volker Lendecke
811ae2b21f r14248: Fix Coverity bug # 84 2007-10-10 11:15:20 -05:00
Volker Lendecke
ebc21336d8 r14246: Fix Coverity bug # 85 2007-10-10 11:15:20 -05:00
Volker Lendecke
9f645e9962 r14242: Fix Coverity bug # 82 2007-10-10 11:15:19 -05:00
Jeremy Allison
e5d6069cf8 r14176: Fix coverity bug #30. Ensure no possible null deref.
Jeremy.
2007-10-10 11:15:15 -05:00
Jeremy Allison
2ec461ae58 r14166: Fix const warning.
Jeremy.
2007-10-10 11:15:14 -05:00
Günther Deschner
7ec2b31a87 r14148: Removing the not very well tested krb5 ticket refresh handling activated
over --with-kcm. No time to look after it for the moment.

Guenther
2007-10-10 11:15:13 -05:00
Günther Deschner
977079a058 r14145: Add missing WITH_KCM hunks from my local tree.
Guenther
2007-10-10 11:15:13 -05:00
Steve French
33a1e26114 r14128: Remove warning generated by coverity scan tool (missing SAFE_FREE in error path) 2007-10-10 11:11:14 -05:00
Steve French
2ec51635ae r14127: Remove coverity warning on mount.cifs.c 2007-10-10 11:11:13 -05:00
Steve French
32c7243b80 r14126: resolve two warnings from the coverity scan 2007-10-10 11:11:13 -05:00
Jeremy Allison
af0ade470f r14009: Remove last const warning (have to use CONST_DISCARD).
Jeremy.
2007-10-10 11:11:05 -05:00
Jeremy Allison
ead13ca522 r14006: Fix a couple of irritating warnings.
Jeremy.
2007-10-10 11:11:04 -05:00
Jeremy Allison
1d710d06a2 r13915: Fixed a very interesting class of realloc() bugs found by Coverity.
realloc can return NULL in one of two cases - (1) the realloc failed,
(2) realloc succeeded but the new size requested was zero, in which
case this is identical to a free() call.

The error paths dealing with these two cases should be different,
but mostly weren't. Secondly the standard idiom for dealing with
realloc when you know the new size is non-zero is the following :

 tmp = realloc(p, size);
 if (!tmp) {
    SAFE_FREE(p);
    return error;
 } else {
    p = tmp;
 }

However, there were *many* *many* places in Samba where we were
using the old (broken) idiom of :

 p = realloc(p, size)
 if (!p) {
    return error;
 }

which will leak the memory pointed to by p on realloc fail.

This commit (hopefully) fixes all these cases by moving to
a standard idiom of :

 p = SMB_REALLOC(p, size)
 if (!p) {
    return error;
 }

Where if the realloc returns null due to the realloc failing
or size == 0 we *guarentee* that the storage pointed to by p
has been freed. This allows me to remove a lot of code that
was dealing with the standard (more verbose) method that required
a tmp pointer. This is almost always what you want. When a
realloc fails you never usually want the old memory, you
want to free it and get into your error processing asap.

For the 11 remaining cases where we really do need to keep the
old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR,
which can be used as follows :

 tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size);
 if (!tmp) {
    SAFE_FREE(p);
    return error;
 } else {
    p = tmp;
 }

SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the
pointer p, even on size == 0 or realloc fail. All this is
done by a hidden extra argument to Realloc(), BOOL free_old_on_error
which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR
macros (and their array counterparts).

It remains to be seen what this will do to our Coverity bug count :-).

Jeremy.
2007-10-10 11:10:59 -05:00
Lars Müller
3c277c7a3c r13714: Set MOUNT_CIFS_VENDOR_SUFFIX if _SAMBA_BUILD_ is set to
"-"SAMBA_VERSION_OFFICIAL_STRING"-"SAMBA_VERSION_VENDOR_SUFFIX if
SAMBA_VERSION_VENDOR_SUFFIX is set or "-"SAMBA_VERSION_OFFICIAL_STRING
only if MOUNT_CIFS_VENDOR_SUFFIX is undefined.

This results in: mount.cifs -V
mount.cifs version: 1.10-3.1.2pre1-SVN-build-13706-foovendor
or
mount.cifs version: 1.10-3.1.2pre1-SVN-build-13706

Steve: If this is to long or you do not like it, we might add something
lile -VV to report the added part.
2007-10-10 11:10:50 -05:00
Steve French
d294b28f1c r13697: Remove unneeded header (header not present on all Linux either) for umount.cifs.c 2007-10-10 11:10:24 -05:00
Tim Potter
1d23067e68 r13612: #define NO_SYSLOG is dead as a doornail. 2007-10-10 11:10:19 -05:00
Jeremy Allison
fe63a6ee06 r13535: Fix #2353 based on a patch by William Jojo.
Jeremy.
2007-10-10 11:10:11 -05:00
Volker Lendecke
62b02a6843 r13486: Two more -- fix bug 3503 2007-10-10 11:10:05 -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
Gerald Carter
68399ce04c r12912: patch from Tony Mountifield <tony@softins.co.uk> for BUG 3327 (fix bad access to gencache.tdb after fork() in smbmount 2007-10-10 11:06:06 -05:00
Jeremy Allison
c970d7d0a5 r12555: Fix more load_case_table swegfaults. Arggg.
What I'd give for a global constructor...
Jeremy.
2007-10-10 11:05:59 -05:00
Jeremy Allison
c2752347eb r12522: Try and fix bug #2926 by removing setlocale(LC_ALL, "C")
and replace calls to isupper/islower/toupper/tolower with
ASCII equivalents (mapping into _w variants).
Jeremy.
2007-10-10 11:05:58 -05:00
Jeremy Allison
cd192ed79a r12045: More warning fixes... Just a few more to go.
Jeremy.
2007-10-10 11:05:42 -05:00
Günther Deschner
1136862e6d r12015: When smbspool tries to connect to a printer shared on a standalone
Windows XP box, smbspool has to mimic smbclient behaviour and also send
a password-less NTLMSSP session setup.

Guenther
2007-10-10 11:05:41 -05:00
Jeremy Allison
9b8602e055 r11978: Volker's fix for #3292 (smbclient spins if server terminates
connection).
Jeremy.
2007-10-10 11:05:41 -05:00