Age | Commit message (Collapse) | Author | Files | Lines |
|
but for a level3 it makes no sense for
ptr_sec_desc to be NULL. JRA. Based on
a Vista sniff from Martin Zielinski <mz@seh.de>.
Jerry - part of the Vista patchset.
Jeremy.
(This used to be commit 60e26a9039fbe0fd632e306bf545331195fb1ce6)
|
|
Jeremy
(This used to be commit b35fa5168eafd536976fae29d61ac97a3752ab54)
|
|
snum in the
getprinter calls. Survives the RPC-SAMBA3-SPOOLSS test which I will activate
when the Samba4 build farm has picked it up.
Volker
(This used to be commit d7248b6cfa4d6e639d92afdd092136d900d90e19)
|
|
descriptor
buffers.
Make security access masks simply a uint32 rather than a structure
with a uint32 in it.
(This used to be commit b41c52b9db5fc4a553b20a7a5a051a4afced9366)
|
|
(This used to be commit 1115745caed3093c25d6be01ffee21819fb0a675)
|
|
to do the upper layer directories but this is what
everyone is waiting for....
Jeremy.
(This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
|
|
dependentfiles pointer.
Jeremy.
(This used to be commit 05c50d99a4b1d2bc11a83e07902082227d7c074a)
|
|
Jeremy.
(This used to be commit 72709a8465caf5b7d95911250234f203b0ff4675)
|
|
Jeremy.
(This used to be commit 0a1ccfefcf27c5970b82bf8a451bcdaa4fee1bd0)
|
|
(This used to be commit b9fb3fc0e3708b4721aaa1dcb7756d3774fb8db8)
|
|
(This used to be commit 932d769a32748695cfff4c761422feb2ef15acbb)
|
|
(This used to be commit 680bd1b004f26b5a0449114911c85ca587038147)
|
|
Jeremy.
(This used to be commit fc8e1e5c02dd950ed1f8656a5d7ab47fa7ec1ea7)
|
|
Jeremy.
(This used to be commit 617c5805e59dd601b8841251032e3db4d6a64621)
|
|
be zero before deref.
Jeremy.
(This used to be commit fbf9db6624d9584a26ae302df3c76555bbd2bb1e)
|
|
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 1d710d06a214f3f1740e80e0bffd6aab44aac2b0)
|
|
(This used to be commit c803e1b2afdfc5bd983f046c976c01adebcfa1ad)
|
|
Jerry, this just fixes the warning. This routine does not seem to cope well
with !UNMARSHALLING. You might want to look...
Volker
(This used to be commit 2c0c40dfb5da9e901e099295f43032a745e71253)
|
|
* 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
(This used to be commit 6d74de7a676b71e83a3c3714743e6380c04e4425)
|
|
with the "MonitorUI" call
* Fix some parsing errors
This gets us to the Add Port Wizard dialog.
(This used to be commit a444aa7f0088fb71ff89df8c280209188b33ec3d)
|
|
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.
(This used to be commit 123e478ce5b5f63a61d00197332b847e83722468)
|
|
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.
(This used to be commit ef721333ab9639cb5346067497e99fbd0d4425dd)
|
|
the wire
* fix dup_a_regval() when size is 0
* ensure we pass a pstring to unlink_internals (fixes delete_driver
code)
(This used to be commit 353e63ff421c564a1b7c7cfe95982f31c871a227)
|
|
SetPrinter() level
(This used to be commit f617ca33f45fbc779356c52664c1e689114accdd)
|
|
printer"-functions.
Thanks to Thomas Di Naro (Novell) for the detailed debug-logs.
Guenther
(This used to be commit b532553b064f1e9893b39dda903d458055c11f86)
|
|
safe for using our headers and linking with C++ modules. Stops us
from using C++ reserved keywords in our code.
Jeremy
(This used to be commit 9506b8e145982b1160a2f0aee5c9b7a54980940a)
|
|
fairly safe at this point
(This used to be commit 6eaefa1a9a47421e20e346c652c31fd524db8878)
|
|
for user1* in make_spoolss_q_open_printer_ex()
(This used to be commit f04232cce7f940814828caf80a2ecb8761146b14)
|
|
pulling back all recent rpc changes from trunk into
3.0. I've tested a compile and so don't think I've missed
any files. But if so, just mail me and I'll clean backup
in a couple of hours.
Changes include \winreg, \eventlog, \svcctl, and
general parse_misc.c updates.
I am planning on bracketing the event code with an
#ifdef ENABLE_EVENTLOG until I finish merging Marcin's
changes (very soon).
(This used to be commit 4e0ac63c36527cd8c52ef720cae17e84f67e7221)
|
|
all versions of a driver
(This used to be commit 1f0060278609a194b76872367530d2f7bcea7fa7)
|
|
segvs
(This used to be commit 25121547caaaed0d60f4db7458570c14e7d21b2a)
|
|
allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
(This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
|
|
architecture and a specific version.
Guenther
(This used to be commit a24df09386f177e625fb99c975896cbe7a594b4b)
|
|
function to rpcclient
(This used to be commit cfd51c02447f7b42cffcaf4cc6179237d58c8229)
|
|
the publishing-state for migrated printers as well.
Therefor added client-side-support for setprinter level 7.
Next will be a "net rpc printer publish"-command (just for completeness).
Guenther
(This used to be commit 224920738fdc65ef170152062177421cfed85bbf)
|
|
* add IA64 to the architecture table of printer-drivers
* add new "net"-subcommands:
net rpc printer migrate {drivers|printers|forms|security|settings|all}
[printer]
net rpc share migrate {shares|files|all} [share]
this is the first part of the migration suite. this will will (once
feature-complete) allow to do 1:1 server-cloning in the best possible way by
making heavy use of samba's rpc_client-functions. all migration-steps
are implemented as rpc/smb-client-calls; net communicates via rpc/smb
with two servers at the same time (a remote, source server and a
destination server that currently defaults to the local smbd). this
allows e. g. printer-driver migration including driverfiles, recursive
mirroring of file-shares including file-acls, etc. almost any migration
step can be called with a migrate-subcommand to provide more flexibility
during a migration process (at the cost of quite some redundancy :) ).
"net rpc printer migrate settings" is still in a bad condition (many
open questions that hopefully can be adressed soon).
"net rpc share migrate security" as an isolated call to just migrate
share-ACLs will be added later.
Before playing with it, make sure to use a test-server. Migration is a
serious business and this tool-set can perfectly overwrite your
existing file/print-shares.
* along with the migration functions had to make I the following
changes:
- implement setprinter level 3 client-side
- implement net_add_share level 502 client-side
- allow security descriptor to be set in setprinterdata level 2
serverside
guenther
(This used to be commit 8f1716a29b7e85baf738bc14df7dabf03762f723)
|
|
* force the PRINTER_ATTRIBUTE_LOCAL (nor PRINTER_ATTRIBUTE_NETWORK)
* ensure that we return the sec_desc in smb_io_printer_info_2
(allows prnui.dll to restore security descriptors from a data file).
(This used to be commit c335cb80d2e4c687279b7a6038a97518770ccae9)
|
|
jobs) by only enforce the 'max reported print jobs' parameter
when it is non-zero.
* Fixed bug 338 by making sure that data values are written
out when we are marshalling an EnumPrinterDataEx() reply.
This probably fixes other bugs reported against point-n-print
feature in 3.0.0
(This used to be commit fd98af75d655449a677360f6991da5caabc88b4d)
|
|
but a flags field. We were assuming that 2*strlen(mb_string) == length of ucs2-le string.
This is not the case. Count it after conversion.
Jeremy.
(This used to be commit f82c273a42f930c7152cfab84394781744815e0e)
|
|
(This used to be commit a6a39c61e8228c8b3b7552ab3c61ec3a6a639143)
|
|
Fixes remote printer publishing of shared printers from a Samba server.
(This used to be commit 7f363fa32d3b660567fc87d5d0b1e1d4dd58461a)
|
|
(This used to be commit 944480b89a829f159cabff100d83a72400aa6b6c)
|
|
(This used to be commit 7fd7af121ee8ba4f9540394f64fe3c78e2e96cd2)
|
|
a pstrcpy/fstrcpy or at most a safe_strcpy().
These have the advantage of being compiler-verifiable.
Get these out of the way, along with a rewrite of 'get_short_archi' in the
spoolss client and server. (This pushes around const string pointers, rather
than copied strings).
Andrew Bartlett
(This used to be commit 32fb801ddc035e8971e9911ed4b6e51892e9d1cc)
|
|
(This used to be commit 52ef84b53495db1eac6ecfb0b926ef8df7ea5cc5)
|
|
that changed that the client is monitoring.
* couple of comments abnout how we need to validate driver names
on SetPrinter() and AddPrinter()
* up the debug level on some overly verbose dev mode parsing messages
(This used to be commit e8939165b77c9e2ea8b3cef2e85885b9812c7184)
|
|
(This used to be commit a20aba09996e470425a151271237f2d48a8302af)
|
|
cache the printer_info_2 with the open printer handle.
cache is invalidated on a mod_a_printer() call **on that smbd**.
Yes, this means that the window for admins to step on each other
from different clients just got larger, but since handles a generally
short lived this is probably ok.
(This used to be commit 31272d3b6bb9ec62fd666301c7adfa0c1720a99b)
|
|
* performance optimization in enumprinterdataex() when keyname is empty
* fix a few typos in comments
* reload services after addprinter_command()
dump registry data in ascii when the key is REG_SZ or REG_MULTI_SZ
(This used to be commit 3fc90ea1d9b11186f26484516a4dd8502b6d7323)
|
|
warnings. (Adds a lot of const).
Andrew Bartlett
(This used to be commit 3a7458f9472432ef12c43008414925fd1ce8ea0c)
|