| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Guenther
|
|
|
|
|
| |
but make the intent clearer.
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
| |
Jeremy.
|
|
|
|
|
| |
C- "must try harder" :-).
Jeremy.
|
|
|
|
|
| |
Not a bug, but better to remove false positives.
Jeremy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
"rename user script" to do the rename of the posix machine account (this
might be changed later). Fixes #2331.
Guenther
|
|
|
|
|
|
| |
code relied upon file permissions alone. Now we check that
the user is a printer administrator and that the share has not been
marked read only for that user.
|
|
|
|
| |
Guenther
|
|
|
|
| |
Sync with trunk as off r13315
|
|
|
|
|
|
|
|
| |
by saving the UNIX token used to set a delete on close flag,
and using it when doing the delete. libsmbsharemodes.so still
needs updating to cope with this change.
Samba4 torture tests to follow.
Jeremy.
|
|
|
|
| |
accessing a previously freed pointer
|
|
|
|
| |
on HP-UX
|
|
|
|
|
|
|
|
| |
only tell at parse time from the wire if an incoming name
has wildcards or not. If it's a mangled name and we demangle
the demangled name may contain wildcard characters. Ensure
these are ignored.
Jeremy.
|
|
|
|
|
|
|
| |
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
|
| |
|
|
|
|
|
| |
* BUG 3087: allow smbspool to establisha geust connection
using a username with no password
|
|
|
|
| |
Jeremy.
|
|
|
|
| |
Guenther
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the new talloc() features:
Note that the REGSUB_CTR and REGVAL_CTR objects *must* be talloc()'d
since the methods use the object pointer as the talloc context for
internal private data.
There is no longer a regXXX_ctr_intit() and regXXX_ctr_destroy()
pair of functions. Simply TALLOC_ZERO_P() and TALLOC_FREE() the
object.
Also had to convert the printer_info_2->NT_PRINTER_DATA field
to be talloc()'d as well. This is just a stop on the road to
cleaning up the printer memory management.
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
|
| |
the wire
* fix dup_a_regval() when size is 0
* ensure we pass a pstring to unlink_internals (fixes delete_driver
code)
|
|
|
|
|
|
|
|
|
|
|
| |
not on the server.
We now preserve this windows variable (important for vampired setups)
and correctly substitute only the "%L"s in strings like:
"%LOGONSERVER% %L %lOgOnSeRvEr% %L".
Guenther
|
|
|
|
| |
but make sure to write the new version to the ntdrivers.tdb.
|
|
|
|
| |
when substituting for the lpq command.
|
|
|
|
|
|
|
|
|
|
| |
for NT4 clients enumerating printer data on slow CPUs)
* fix pinter and secdesc record upgrade to normalize the key
(rev'd printer tdb version)
* fixed problem that was normalizing the printername name field
in general, this should fix the issues upgrading print servers
from 3.0.14a to 3.0.20
|
|
|
|
|
|
|
|
|
| |
tests on this as it's very late NY time (just wanted to get this work
into the tree). I'll test this over the weekend....
Jerry - in looking at the difference between the two trees there
seem to be some printing/ntprinting.c and registry changes we might
want to examine to try keep in sync.
Jeremy.
|
| |
|
|
|
|
|
|
|
|
| |
when packing values. It is a compatible change though and will
not require a tdb version upgrade
* Can successfully create new printer subkeys via winreg that
are immediately available via spoolss calls. Still cannot delete
keys yet though. That comes next.
|
|
|
|
|
|
|
|
|
|
| |
nver normalized the string used for printer and
sec_desc key lookups ?????
normalized sharename to lower case before storing/fetching
from tdb.
Need to look at drivers and forms tdb as well (perhaps).
|
| |
|
|
|
|
|
|
| |
safe for using our headers and linking with C++ modules. Stops us
from using C++ reserved keywords in our code.
Jeremy
|
|
|
|
| |
print queues
|
| |
|
|
|
|
|
|
|
|
|
| |
* start adding write support to the Samba registry
Flesh out the server implementations of
RegCreateKey(), RegSetValue(), RegDeleteKey() and RegDeleteValue()
I can create a new key using regedit.exe now but the 'New Key #1'
key cannot be deleted yet.
|
|
|
|
|
|
|
|
|
|
| |
(not move) to the W32X86/{2,3}/ directory. Printmig.exe
copies the driver files for all drivers to print$/W32X86
and the calls AddPrinterDriver() for each driver. If we
move the file, then adding a driver which shares a file with
a previous driver will fail.
I can now restore drivers in bulk to a Samba 3 server.
|
|
|
|
| |
provide better error messages to clients when a AddPrinterDriver[Ex]() call fails
|
| |
|
|
|
|
| |
Jeremy.
|
| |
|
|
|
|
|
|
|
| |
some issues in the printer security descriptors.
Ensure that each printer sd has an oaner and group SID
(BUILTIN\Administrators) and that we utilize more than
the generic bits assigned in <= 3.0.14a.
|
|
|
|
|
|
| |
where large print jobs can have out-of-order offsets. Bug found
by Arcady Chernyak <Arcady.Chernyak@efi.com>
Jeremy.
|
|
|
|
|
|
| |
from Ingo Kilian <ikilian@web.de>.
You must do a make clean after updating this.
Jeremy.
|
|
|
|
|
| |
Volker to commit. Woo Hoo !
Jeremy.
|
|
|
|
| |
ordering bug when storing 16-bit RAP print job ids
|
|
|
|
|
|
|
|
| |
initializable
statically.
Volker
|
| |
|
| |
|