| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Guenther
|
|
|
|
|
|
|
|
| |
still
lurking...
Volker
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
I think this is actually a false warning, but as I've seen it with high gcc
warning levels, lets fix it :-)
Volker
|
|
|
|
|
|
|
|
|
|
| |
WBFLAG_PAM_CONTACT_TRUSTDOM. This
can not work for NTLM auth, where we only have a workstation account for our
own domain. For the PAM Kerberos login we need to find a better way to do
this, probably using Dsr_GetDCName and some winbind-crafted krb5.conf.
Volker
|
|
|
|
|
| |
think is a direct bug, but some code that needs clarification :-).
Jeremy.
|
|
|
|
|
| |
if rrec can be null make sure we *never* deref it.
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
|
| |
exit path.
Jeremy.
|
|
|
|
| |
Jeremy.
|
| |
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
| |
part of the changes I made but something that's been there
a while.... Coverity bugid #41.
Jeremy.
|
|
|
|
| |
Guenther
|
|
|
|
|
|
| |
affinity cache.
Guenther
|
| |
|
| |
|
|
|
|
|
|
|
| |
Jerry, this just fixes the warning. This routine does not seem to cope well
with !UNMARSHALLING. You might want to look...
Volker
|
|
|
|
|
|
|
|
|
|
| |
* Finish prototype of the "add port command" implementation
Format is "addportcommand portname deviceURI"
* DeviceURI is either
- socket://hostname:port/
- lpr://hostname/queue
depending on what the client sent in the request
|
|
|
|
|
|
|
| |
with the "MonitorUI" call
* Fix some parsing errors
This gets us to the Add Port Wizard dialog.
|
| |
|
|
|
|
| |
* Add support for the "Local Port" monitor as well through this API
|
|
|
|
| |
variable.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> for the svn log:
>
> - Solaris' /bin/sh doesn't know "test -e" - let's use "test -f" instead
>
> Some volunteer wanna check this in? :)
>
> Cheers
> Bjoern
Volker
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Began the poet, his face as pale as death.
"I will go first, and you will follow me."
---
Adding XcvDataPort() to the spoolss code for remotely
add ports. The design is to allow an intuitive means
of creating a new CUPS print queue from the Windows 2000/XP
APW without hacks like specifying the deviceURI in the
location field of the printer properties dialog.
Also set 'default devmode = yes' as the new default
since it causes no harm and only is executed when you
have a NULL devmode anyways.
|
|
|
|
|
|
| |
Fix incorrect size understanding of sid name type (yes it's
already correct in the Samba4 IDL :-).
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
|
| |
* disable winbind enum {users,groups} by default after
further conversations with Volker.
|
|
|
|
| |
Jeremy.
|
|
|
|
| |
Volker
|
|
|
|
|
| |
that counts.
Jeremy.
|
| |
|
|
|
|
|
|
| |
* winbind nested groups = yes
* host msdfs = ye
* msdfs root = yes
|
|
|
|
| |
list rather than bailing out
|
|
|
|
|
| |
* Fix parsing error in eventlogadm caused by log entries
with no DAT: line.
|
|
|
|
| |
a user since we no longer pay any attention to the value.
|
|
|
|
| |
Add the missing comment about needing to save the new share name.
|
|
|
|
|
|
| |
When only allowing one connection per server, the cache needs to track which
share is currently connected, or we never know whether a tdis()/tcon() for the
new share is required.
|
|
|
|
|
|
| |
a new empty acl in remove_posix_acl if you don't bother
to set it on the file in question :-).
Jeremy.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Thanks to tridge's changes to the directory delete on close tests
for catching this.
Jeremy.
|
|
|
|
|
|
|
|
|
| |
upgrade it calls tdbsam_convert() which calls tdbsam_open()
deep inside the init_sam_from_buffer_vX call.
If the ref count hasn't been set yet then we will close
the tdbsam reference in tdbsam_getsampwsid().
smbpasswd -a was core-dumping again :-).
Jeremy
|
|
|
|
| |
up typing and tighten error checking a little.
|
| |
|
| |
|