1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-04 05:18:06 +03:00
Commit Graph

2353 Commits

Author SHA1 Message Date
Jeremy Allison
b84d06dae7 r14764: Fix possible null pointer deref. Coverity #253.
Jeremy.
(This used to be commit 7a18f38947)
2007-10-10 11:15:47 -05:00
Jeremy Allison
80afbe5cf5 r14751: Use the noreturn attribute to try and tell coverity that
smb_panic can't return.
Jeremy.
(This used to be commit ba9c98983e)
2007-10-10 11:15:45 -05:00
Jeremy Allison
1d3fd5201c r14746: Add the Samba4 replacements for opendir/readdir etc. to
Samba3 - with some 64-bit macro madness. Attempt to fix
the broken directory handling in the *BSD-of-the-month
club.
Jeremy.
(This used to be commit fd98427f64)
2007-10-10 11:15:45 -05:00
Jeremy Allison
7f57dc61cb r14703: Clarify the return codes for the POSIX locking case. This
was confusing.
Jeremy.
(This used to be commit bc1a605a39)
2007-10-10 11:15:44 -05:00
James Peach
40d0707827 r14668: Set the FILE_STATUS_OFFLINE bit by observing the events a DMAPI-based
HSM is interested in. Tested on both IRIX and SLES9.
(This used to be commit 514a767c57)
2007-10-10 11:15:42 -05:00
Stefan Metzmacher
250c02554e r14618: add --no-process-group to all server programms
to make the following possible:

timelimit 20000 bin/nmbd -F -S --no-process-group
timelimit 20000 bin/smbd -F -S --no-process-group

this is needed to 'make test' working without losing child processes

metze
(This used to be commit c3a9f30e2a)
2007-10-10 11:15:39 -05:00
James Peach
97ee5b1afa r14600: Refactor capability interface from being IRIX-specific to using only
the POSIX interface. Note that this removes support for inherited
capabilities. This wasn't used, and probably should not be.
(This used to be commit 763f4c0148)
2007-10-10 11:15:39 -05:00
Stefan Metzmacher
264fb295fa r14522: sync socket_wrapper code with samba4
metze
(This used to be commit 7cf4ad8899)
2007-10-10 11:15:36 -05:00
Jeremy Allison
65fa8a1a45 r14462: Fix warning. ber_tag_t is an unsigned int for
printing purposes.
Jeremy.
(This used to be commit 3c33eda430)
2007-10-10 11:15:31 -05:00
Jeremy Allison
c17e40be33 r14454: Janitor for tridge - same code exists in Samba3 and 4.
Jeremy.
-----------------------------
fixed an hmac-md5 error for keys longer than 64 (using deallocated
stack variable)
(This used to be commit f3879dd6bb)
2007-10-10 11:15:31 -05:00
Gerald Carter
f39c02e945 r14432: Give in and grant BUILT\Administrators all privileges
(This used to be commit b617091060)
2007-10-10 11:15:30 -05:00
Jeremy Allison
85d3b74844 r14397: Fix deadcode in coverity error #1.
Jeremy.
(This used to be commit 4a4953c4d2)
2007-10-10 11:15:28 -05:00
Jeremy Allison
a1c56e451f r14393: Fix a couple of AIX warnings.
Jeremy.
(This used to be commit 8444c997bd)
2007-10-10 11:15:28 -05:00
Jeremy Allison
e6676a9a69 r14387: Try and fix the coverity issues (#53, #54) with negative
sink by ensuring all uses of rpcstr_push are consistent
with a size_t dest size arg.
Jeremy.
(This used to be commit f65d7afe19)
2007-10-10 11:15:27 -05:00
Jeremy Allison
f6071a90c7 r14345: Fix Coverity #71. We don't currently propagate *any*
alloc error back up the stack from smbldap_set_mod()
so ensure we abort correctly.
Jeremy.
(This used to be commit 9a1e35079a)
2007-10-10 11:15:26 -05:00
Jeremy Allison
ca9be7c92b r14342: Fix coverity #68, resource leak on error path.
Jeremy.
(This used to be commit 7520a8d2a1)
2007-10-10 11:15:26 -05:00
Jeremy Allison
432490a4b8 r14292: Janitor for tridge (samba3 talloc is almost identical
to Samba4 talloc).
Jeremy

 - make the snprintf call in talloc portable to older solaris boxes

 - fixed an error found sing the beam analyser
(This used to be commit 1e1bae7afd)
2007-10-10 11:15:23 -05:00
Jim McDonough
2167ec9dd5 r14280: Fix Coverity #129 and 130: check before dereferencing a pointer. This
was especially silly as we checked immediately _after_ dereferencing it
:-/
(This used to be commit 7ebfe2cb26)
2007-10-10 11:15:23 -05:00
Volker Lendecke
f04579aaf8 r14249: We've dereferenced the_acl before, no point in checking.
Fix Coverity bug # 128.

Volker
(This used to be commit 84e9e73f3c)
2007-10-10 11:15:20 -05:00
Volker Lendecke
645826673a r14131: Fix Coverity bug # 127
(This used to be commit c105bfae26)
2007-10-10 11:11:14 -05:00
Gerald Carter
9f18298bee r14075: * add support for long variable names in smb.conf in the form of %(....)
* add support for %(DomainSID)
* replace standard_sub_XXX() functions with wrappers around their
  alloc_sub_XXX() counterparts
* add support for using SIDs in read list, et. al. (anything that
  is checked by nt_token_contains_name_in_list())
(This used to be commit 71d960250d)
2007-10-10 11:11:09 -05:00
Günther Deschner
1b0211ca13 r14060: Only set the last rebind timestamp when we did rebind after a non-read
LDAP operation. That way we avoid the replication sleep after a simple
redirected search operation

Guenther
(This used to be commit d236caac21)
2007-10-10 11:11:09 -05:00
Jeremy Allison
43ad653211 r14020: Coverity bug CID #66. Missing free on error exit.
Jeremy.
(This used to be commit b9980bddf5)
2007-10-10 11:11:05 -05:00
Jeremy Allison
dbbc06db65 r14002: Quick fix for Coverity CID #12.
Jeremy
(This used to be commit 7c6e274cd5)
2007-10-10 11:11:04 -05:00
Jeremy Allison
1eea156f57 r13999: Quick fix for Coverity bug #11.
Jeremy.
(This used to be commit b9de6c9269)
2007-10-10 11:11:04 -05:00
Jeremy Allison
71272fc441 r13975: Re-fix Coverity #156 - I had left the hidden arg. inconsistent
between Realloc and realloc_array.
Jeremy.
(This used to be commit 841c9b1847)
2007-10-10 11:11:02 -05:00
Jeremy Allison
a31c931804 r13971: Fix Coverity bugs #209 - #213 - it detected mistakes
in the pointer aliasing once realloc could change
a pointer. This was in the bugzilla.samba.org database
as #687 but we never figured out what it was !
Jeremy.
(This used to be commit 8d18344140)
2007-10-10 11:11:02 -05:00
Jim McDonough
a0b0ac5b6a r13948: Fix the build. Remove rpcclient.h include.
(This used to be commit 6bf879bee3)
2007-10-10 11:11:01 -05:00
Günther Deschner
7aa07a4832 r13945: Move display_sec.c to lib/ (as suggested by Volker).
Guenther
(This used to be commit 7e80d5358e)
2007-10-10 11:11:00 -05:00
Jeremy Allison
894358a8f3 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.
(This used to be commit 1d710d06a2)
2007-10-10 11:10:59 -05:00
Volker Lendecke
9fffb6ab5b r13693: More Solaris/LDAP fixes from Bjoern <bjoern@j3e.de>
(This used to be commit 7c098ca0ae)
2007-10-10 11:10:24 -05:00
Jeremy Allison
984fe8c9af r13682: Actually give a developer a prayer of finding out where
random error messages are coming from. Yes I'm pissed as
I'm working on a live issue right now...
Jeremy.
(This used to be commit 07d1037e17)
2007-10-10 11:10:23 -05:00
Günther Deschner
cab298856a r13622: Allow to rename machine accounts in a Samba Domain. This still uses the
"rename user script" to do the rename of the posix machine account (this
might be changed later). Fixes #2331.

Guenther
(This used to be commit b2eac2e6eb)
2007-10-10 11:10:19 -05:00
Gerald Carter
6622ba566e r13601: * Remove unused code from pdb_ldap.c
* Add a 'struct passwd *' to the struct samu for later reference
  (I know this may be controversial but its easily reverted which is
  is why I'm checking this is as a seaparate patch before I get
  too deep).
* Remove unix_homedir from struct samu {} and update the pdb wrapper
  functions associated with it.
(This used to be commit 92c251fdf0)
2007-10-10 11:10:18 -05:00
Gerald Carter
67c7693ebb r13591: I really have no idea how this code ever worked. And I have
no idea why no one (including myself) caught this with a compiler
warning....Make sure new_chunk() actually returns a pointer
to the allocated memory.

SAMBA_3_0 now works again on Solaris.
(This used to be commit cf9140ad26)
2007-10-10 11:10:16 -05:00
Gerald Carter
69b2669b55 r13574: fix build; talloctort.c should not use the TALLOC_FREE() macro
(This used to be commit af57e4a4cc)
2007-10-10 11:10:15 -05:00
Gerald Carter
fb5362c069 r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()
macro which sets the freed pointer to NULL.
(This used to be commit b65be8874a)
2007-10-10 11:10:14 -05:00
Günther Deschner
2cf38b62c5 r13566: Fix EA support for AIX.
Patch from Bjoern Jacke <bjacke-at-sernet-dot-de>.

Guenther
(This used to be commit 69fb189a6b)
2007-10-10 11:10:14 -05:00
Jeremy Allison
39a572e010 r13539: Add 128 bit creds processing client and server. Thanks to Andrew Bartlett's
Samba4 code.
Jeremy.
(This used to be commit a2fb436fc5)
2007-10-10 11:10:11 -05:00
Jeremy Allison
8d5ef34aa3 r13521: Implement LOOKUPNAME3 and 4.
Jeremy.
(This used to be commit 6ec0e9124a)
2007-10-10 11:10:09 -05:00
Volker Lendecke
301d51e13a r13494: Merge the stuff I've done in head the last days.
Volker
(This used to be commit bb40e544de)
2007-10-10 11:10:06 -05:00
Gerald Carter
75ef18fa75 r13460: by popular demand....
* remove pdb_context data structure
* set default group for DOMAIN_RID_GUEST user as RID 513 (just
  like Windows)
* Allow RID 513 to resolve to always resolve to a name
* Remove auto mapping of guest account primary group given the
  previous 2 changes
(This used to be commit 7a2da5f0cc)
2007-10-10 11:10:04 -05:00
Jeremy Allison
e5ec28ae55 r13427: Fix ctime -> st_ctime.
Jeremy.
(This used to be commit 95793d7e64)
2007-10-10 11:10:01 -05:00
Jeremy Allison
687e5be25e r13423: Write wrapper functions (and configure tests) so we can
always assume we can get a struct timespec out of a stat
struct. This will allow us to portably move to nsec timestamps
on files and directories in the file server code in future.
Jeremy.
(This used to be commit 07132d8796)
2007-10-10 11:10:01 -05:00
Günther Deschner
2d743ac8f1 r13409: No functional changes, just some DEBUG cleanup.
Guenther
(This used to be commit 286f6fc233)
2007-10-10 11:09:59 -05:00
Gerald Carter
ef3f2c9675 r13393: Do not initialize the lp_svcctl_list() value since it is handled
internally in services_db.c now.  This prevents internal services from
being listed twice (one internal and one external) when no
'svcctl list' parameter is explcitly set in smb.conf
(This used to be commit 6c4ede6cee)
2007-10-10 11:09:58 -05:00
Simo Sorce
0b09d4b2f6 r13374: new revision of the snprintf replace code
still missing a configure test to make us
substitute our snprintf to system one when
the system one does not have positional parameters support
(This used to be commit e9bcc24b13)
2007-10-10 11:06:27 -05:00
Volker Lendecke
da979c9e7e r13350: Implement rpccli_samr_set_domain_info. Weird that it was not around :-)
Implement 'net rpc shell account' -- An editor for account policies

nt_time_to_unix_abs changed its argument which to me seems wrong, and I could
not find a caller that depends on this. So I changed it. Applied some more
const in time.c.

Volker
(This used to be commit fc73690a70)
2007-10-10 11:06:26 -05:00
Gerald Carter
0af1500fc0 r13316: Let the carnage begin....
Sync with trunk as off r13315
(This used to be commit 17e63ac4ed)
2007-10-10 11:06:23 -05:00
Gerald Carter
855e02f164 r13310: first round of server affinity patches for winbindd & net ads join
(This used to be commit 6c3480f9ae)
2007-10-10 11:06:23 -05:00