1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

155 Commits

Author SHA1 Message Date
Günther Deschner
0bd5698dab s3-spoolss: use rpccli_spoolss_ClosePrinter.
Guenther
2009-02-06 18:58:34 +01:00
Jelmer Vernooij
ddcab787c4 Rename dos_errstr() to win_errstr() for consistency with Samba 4. 2008-11-01 17:19:26 +01:00
Jelmer Vernooij
f0c4829e82 Remove silly safe_free() function which is a wrapper around SAFE_FREE().
Since it's a function it just sets the local pointer to NULL and basically
is an equivalent to free().

It also claims it's being used for callbacks but isn't used that way
anywhere.
2008-10-19 13:06:14 +02:00
Volker Lendecke
05cc3fda05 Refactoring: connect_dst_pipe uses ndr_syntax_id instead of pipe_idx
(This used to be commit 0f77746f36)
2008-07-21 14:36:28 +02:00
Kai Blin
16938883e6 net: Use true/false instead of True/False.
(This used to be commit a8b567aac3)
2008-05-20 14:27:08 +02:00
Kai Blin
4206d97544 net: more whitespace cleanup
(This used to be commit ef0184d580)
2008-05-10 09:22:31 +02:00
Kai Blin
f576910944 net: Remove globals
(This used to be commit 1e9319cf88)
2008-05-10 09:22:27 +02:00
Volker Lendecke
862d7e32b9 Move user/domain from rpc_pipe_client to cli_pipe_auth_data
(This used to be commit 42de50d2cd)
2008-04-25 11:12:50 +02:00
Volker Lendecke
cf2442bdcb Use rpc_pipe_client->user_name instead of rpc_pipe_client->cli->user_name
Also make sure that rpc_pipe_client->user_name is always talloced.
(This used to be commit 3f6c5b9966)
2008-04-20 00:14:40 +02:00
Volker Lendecke
2a2188591b Add "desthost" to rpc_pipe_client
This reduces the dependency on cli_state
(This used to be commit 783afab9c8)
2008-04-20 00:13:09 +02:00
Jeremy Allison
42cfffae80 Remove next_token - all uses must now be next_token_talloc.
No more temptations to use static length strings.
Jeremy.
(This used to be commit ec003f3936)
2007-12-07 17:32:32 -08:00
Jeremy Allison
3c219ce238 Remove pstrings.
Jeremy.
(This used to be commit e3c02796f8)
2007-12-04 15:45:20 -08:00
Jeremy Allison
d40e47db4b Remove more fstring/pstring bad useage. Go talloc !
Jeremy.
(This used to be commit 2a0173743d)
2007-11-08 17:25:45 -08:00
Jeremy Allison
f88b7a076b This is a large patch (sorry). Migrate from struct in_addr
to struct sockaddr_storage in most places that matter (ie.
not the nmbd and NetBIOS lookups). This passes make test
on an IPv4 box, but I'll have to do more work/testing on
IPv6 enabled boxes. This should now give us a framework
for testing and finishing the IPv6 migration. It's at
the state where someone with a working IPv6 setup should
(theorecically) be able to type :
smbclient //ipv6-address/share
and have it work.
Jeremy.
(This used to be commit 98e154c312)
2007-10-24 14:16:54 -07:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Günther Deschner
6824731cb0 r24783: Remove unused off_t type.
Guenther
(This used to be commit 85c816c27f)
2007-10-10 12:30:21 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Michael Adam
8b79106829 r22932: Use the same symbol in sizeof and cast for talloc.
(This used to be commit 550498e68d)
2007-10-10 12:22:10 -05:00
Jeremy Allison
79de0ad946 r22588: Make all uses of TALLOC_MEMDUP consistent.
Jeremy.
(This used to be commit 8ad13718af)
2007-10-10 12:19:48 -05:00
Volker Lendecke
ecf90c495e r19991: Sorry for this 2000-liner...
The main thing here is a rewrite of srv_winreg_nt.c. The core functionality
has moved to registry/reg_api.c which is then usable by the rest of Samba as
well.

On that way it fixes creating keys with more than one element in the
path. This did not work before.

Two things that sneaked in (sorry :-) is the change of some routines from
NTSTATUS to WERROR the removed "parent" argument to regkey_open_internal.

Volker
(This used to be commit fea52801de)
2007-10-10 12:16:18 -05:00
Volker Lendecke
202f63e476 r19811: Decode REG_MULTI_SZ and REG_BINARY
(This used to be commit 6793301751)
2007-10-10 12:15:57 -05:00
Volker Lendecke
e23781b3b3 r17316: More C++ warnings -- 456 left
(This used to be commit 1e4ee728df)
2007-10-10 11:38:25 -05:00
Jeremy Allison
fbdcf2663b 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.
(This used to be commit 9dafb7f48c)
2007-10-10 11:19:14 -05:00
Jeremy Allison
fa57a318b4 r14416: Remove deadcode. Coverity #198.
Jeremy.
(This used to be commit 7fc61f5a63)
2007-10-10 11:15:29 -05:00
Günther Deschner
9f2e29799e r13864: Some cleanup and the samr set security object function client-side.
Guenther
(This used to be commit 0ae3fddf95)
2007-10-10 11:10:57 -05:00
Lars Müller
c42be9fd38 r12986: Use d_fprintf(stderr, ...) for any error message in net.
All 'usage' messages are still printed to stdout.

Fix some compiler warnings for system() calls where we didn't used the
return code.  Add appropriate error messages and return with the error
code we got from system() or NT_STATUS_UNSUCCESSFUL.
(This used to be commit f650e3bdaf)
2007-10-10 11:06:09 -05:00
Gerald Carter
54abd2aa66 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
(This used to be commit 939c3cb5d7)
2007-10-10 11:04:48 -05:00
Gerald Carter
44707ad2e0 r9739: conver the reg_objects (REGSUBKEY_CTR & REGVAL_CTR) to use
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 ef721333ab)
2007-10-10 11:03:25 -05:00
Günther Deschner
8ea8a78abc r9076: fix two other issues invented along the
cli_spoolss_enumprinterkey-changes.

Guenther
(This used to be commit db8fce2e05)
2007-10-10 11:00:24 -05:00
Günther Deschner
fefbaf2bca r8911: cosmetic fixes.
Guenther
(This used to be commit bf67a86114)
2007-10-10 11:00:19 -05:00
Gerald Carter
ecafd3754f r8654: merging cli_spoolss_XX() updates from trunk
(This used to be commit cd961e50a3)
2007-10-10 11:00:14 -05:00
Tim Potter
44b93eec71 r8592: I'm pretty sure this should be != instead of =!. Bugzilla #2893.
(This used to be commit 26539ddd72)
2007-10-10 11:00:12 -05:00
Lars Müller
7cbd740c62 r7609: Move top level dir handling in from of the loop. This makes the code
much straither.

copy_top_level_perms() is jra's work.

I modified the copy_top_level_perms() function to use the copy_clistate.

And I don't forget trunk.

Lars
(This used to be commit 2c68568e52)
2007-10-10 10:57:16 -05:00
Günther Deschner
95ce7e65eb r7607: Some minor fixes (typos, const)
Guenther
(This used to be commit 1150468186)
2007-10-10 10:57:15 -05:00
Lars Müller
ebb42167c9 r7512: Fix net share migrate files to also migrate the ACLs of the top level
dir of a share.  Till now we excluded '.' and '..' in general.  For the
fix the information about top or lower level dir is stored in the
copy_clistate.  src and dst share are now also part of this struct and
we only pass a pointer to the struct to the functions.

This bug was found by Bill Calero of Novell.  Thanks Bill!

With this checkin no new functionality was added.  But the copy_clistate
already knows about a mode. Later beside the migrate an additional
report mode will be added.

This changes are coordinated with Günther <gd>.

Lars
(This used to be commit 506aaefa37)
2007-10-10 10:57:10 -05:00
Volker Lendecke
ce8dee5c3c r6488: net rpc printer migrate should not try to set stuff that's not there. This
fixes two segfaults. Thanks to Karolin Segger <ks@sernet.de> to find the bug
and test the patch.

Volker
(This used to be commit 5fa5454218)
2007-10-10 10:56:42 -05:00
Günther Deschner
bf42736251 r5971: Check for the correct cli-struct when copying files.
Good catch from Lars Mueller <lmuelle@suse.de>.

Guenther
(This used to be commit 90e2383bc5)
2007-10-10 10:56:13 -05:00
Günther Deschner
4ef6976c58 r5547: Fix compile warning.
Guenther
(This used to be commit a5e215650e)
2007-10-10 10:55:47 -05:00
Günther Deschner
4b03bd3b18 r5546: Fix some comments in "net rpc printer migrate settings"
Guenther
(This used to be commit 67552103ee)
2007-10-10 10:55:46 -05:00
Günther Deschner
c3a5d90db4 r5541: Fix crash bug in the client-spoolss enumdataex-call.
With Windows2003 it's perfectly legal to receive no data when querying a
value-less subkey. Found while migrating printer settings.

Guenther
(This used to be commit 3e04def033)
2007-10-10 10:55:46 -05:00
Jeremy Allison
acf9d61421 r4088: Get medieval on our ass about malloc.... :-). Take control of all our 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 620f2e608f)
2007-10-10 10:53:32 -05:00
Jeremy Allison
9b8bedf2fe r3880: Tidy up some unused/shadowed variable usage.
Jeremy.
(This used to be commit 1fd1a98782)
2007-10-10 10:53:23 -05:00
Günther Deschner
3eff1f48d5 r2942: Add client-side support of triggering ads printer publishing over msrpc
setprinter calls inside the net-tool.

This is usefull to mimic the same queries a windows-client does. At
least win2k returns WERR_IO_PENDING when printer is published via
setprinter, samba returns WERR_OK but this does not hurt.

Guenther
(This used to be commit 69b745fb98)
2007-10-10 10:52:57 -05:00
Günther Deschner
d15e6af706 r2852: Oh. Allow to migrate win2k3/xp-drivers as well.
Thanks to Bjoern Jacke for his moral support :)

Guenther
(This used to be commit ab875d3ecf)
2007-10-10 10:52:55 -05:00
Günther Deschner
e81aa8c59e r2837: Fix printer-migration w.r.t. to new naming-convention for
policy-handles. Also remove some unused vars.

Guenther
(This used to be commit 5181c1b219)
2007-10-10 10:52:55 -05:00
Tim Potter
b4cf9e9505 r2835: Since we always have -I. and -I$(srcdir) in CFLAGS, we can get rid of
'..' from all #include preprocessor commands.   This fixes bugzilla #1880
where OpenVMS gets confused about the '.' characters.
(This used to be commit 7f161702fa)
2007-10-10 10:52:55 -05:00
Günther Deschner
2d016a67b8 r2821: Adding "Windows x64" as architecture string and driverdir "x64" for the
64bit AMD platform.

(This used to be "Windows AMD64" and "AMD64" in one of the release
candidates of SP2 for Windows XP. AMD64 is obviously still supported but
not documented.)

Guenther
(This used to be commit cc5892f041)
2007-10-10 10:52:53 -05:00
Günther Deschner
d25aba1d14 r2476: now that PRINTER_ATTRIBUTE_PUBLISHED does not get reset anymore, migrate
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 224920738f)
2007-10-10 10:52:45 -05:00
Günther Deschner
e4c4d91896 r2080: Remove last traces of static migration to localhost. Needed to allow a
local netbios-alias bound to non-loopback interface as a migration target.

It's now possible to migrate printers|shares|files from Server A to
Server B while running the net-command on client C.

Guenther
(This used to be commit 0cfd2866df)
2007-10-10 10:52:30 -05:00
Günther Deschner
f5a2dd73da r2079: Clear the publish-bit from the attributes-mask when migrating
printer-settings. publishing-info is not handled yet.

Guenther
(This used to be commit 1d76adb93c)
2007-10-10 10:52:30 -05:00
Günther Deschner
c542a2c179 r2022: Add net_copy_fileattr as a separate function to copy just ACLs, attrs
and timestamps. This makes net_copy_file less complex.

Guenther
(This used to be commit 43af9e67dd)
2007-10-10 10:52:28 -05:00
Günther Deschner
19e949a91b r1966: further work on and cleanup of the net-migration-tool.
It's now possible to migrate files preserving dos-attributes and correct
timestamps. Also added some small docu- and syntax-fixes.

Guenther
(This used to be commit 0e990582a0)
2007-10-10 10:52:25 -05:00
Günther Deschner
61b9639ac7 r1698: fix build.
guenther
(This used to be commit 925e28d0cb)
2007-10-10 10:52:19 -05:00
Günther Deschner
60727acc3b r1692: first commit :)
* 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 8f1716a29b)
2007-10-10 10:52:19 -05:00