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

3673 Commits

Author SHA1 Message Date
Günther Deschner
8be11b2477 s3-waf: fix pam dependencies of the RPC_SAMR server.
Guenther
2010-12-07 11:49:57 +01:00
Günther Deschner
133a2ffd00 s3-waf: avoid module name uppercasing.
This finally allows mixed case module names like the classic build
(./configure --shared_modules=charset_CP850)

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Dec  1 18:39:14 CET 2010 on sn-devel-104
2010-12-01 18:39:14 +01:00
Günther Deschner
2b0905aeae s3-waf: convert RPC_LSARPC into a subsystem.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Dec  1 00:13:58 CET 2010 on sn-devel-104
2010-12-01 00:13:58 +01:00
Günther Deschner
c291195251 s3-waf: convert RPC_SAMR into a subsystem.
Guenther
2010-11-30 23:27:15 +01:00
Günther Deschner
5855194894 s3-spoolss: fix typo in debug message.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Nov 19 12:05:10 CET 2010 on sn-devel-104
2010-11-19 12:05:10 +01:00
Günther Deschner
98612fe793 s3-spoolss: make sure members of "BUILTIN\Print Operators" can open printers
with admin privileges.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Nov 17 15:05:02 UTC 2010 on sn-devel-104
2010-11-17 15:05:01 +00:00
Günther Deschner
ee8c035c41 s3-spoolss: add debug statement for access denied cases in OpenPrinterEx path.
Guenther
2010-11-17 15:20:15 +01:00
David Disseldorp
1c579318ae s3-spoolss: fix spoolss GetPrinterData behaviour
Windows sends spoolss GetPrinterData requests with an offered buffer
size of zero, Model and TrayFormTable data is commonly requested in
this way.

Samba's GetPrinterData response for the above case includes the correct
error code (WERR_MORE_DATA), however the type field is set to REG_NONE.
This causes Windows (seen on XP and 2k3) to give up on the request.

If the type field is retained (not set to REG_NONE) when responding with
WERR_MORE_DATA, Windows reissues the GetPrinterData request with an
increased offered buffer size.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-11-10 15:23:22 +01:00
Jeremy Allison
f0dcc90f72 Fix bug 7781 - Samba transforms ShareName to lowercase (sharename) when adding new share via MMC
Change the find_service() interface to not depend on fstring, and
create a useable talloc-based interface.

Jeremy.
2010-11-10 01:14:17 +00:00
Jeremy Allison
9997ee813b Remove fstring from map_username. Create a more sane interface than the called-parameter-is-modified.
Jeremy.
2010-11-10 01:14:17 +00:00
Andrew Tridgell
986a00dcef s3-waf: fixed paths in s3 waf build for rpc_server
paths in waf rules are relative

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-25 11:12:03 +11:00
Jeremy Allison
272feb7bd1 Revert "Wrap security_token_has_privilege() with a check for lp_enable_privileges(). Needed"
Not needed - privileges code prevents "enable privileges = no" from adding privileges
anyway.

This reverts commit a8b95686a7.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 22 23:41:36 UTC 2010 on sn-devel-104
2010-10-22 23:41:36 +00:00
Jeremy Allison
a8b95686a7 Wrap security_token_has_privilege() with a check for lp_enable_privileges(). Needed
to maintain compatibility with smb.conf manpage.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 22 18:15:48 UTC 2010 on sn-devel-104
2010-10-22 18:15:48 +00:00
Günther Deschner
fa2a2d562f s3-waf: convert rpc into a subsystem.
Guenther
2010-10-19 18:26:59 +02:00
Andreas Schneider
a8f26f60ec s3-rpc_server: Normalize rpc_pipe_open_interface pipe name.
Autobuild-User: Andreas Schneider <asn@samba.org>
Autobuild-Date: Fri Oct 15 12:15:45 UTC 2010 on sn-devel-104
2010-10-15 12:15:45 +00:00
Andreas Schneider
f22e6cf3b7 s3-rpc_server: Make auth_serversupplied_info const. 2010-10-15 11:34:03 +00:00
Andrew Bartlett
170b345e0c s3-auth Use security_token_debug() from common code
This prints the security token including the privileges as strings
instead of just a bitmap.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-10-14 02:35:04 +00:00
Andrew Bartlett
deb7c02436 s3 Replace is_sid_in_token() with security_token_has_sid() from common code
The two routines are identical, so there is no need to keep both.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-10-14 02:35:04 +00:00
Andrew Bartlett
f768b32e37 libcli/security Provide a common, top level libcli/security/security.h
This will reduce the noise from merges of the rest of the
libcli/security code, without this commit changing what code
is actually used.

This includes (along with other security headers) dom_sid.h and
security_token.h

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-10-12 05:54:10 +00:00
Günther Deschner
33c6a4eb8a s3-spoolss: add more userlevel info validation to _spoolss_OpenPrinterEx.
Guenther
2010-10-11 14:31:06 +00:00
Günther Deschner
025290e9bf s3-spoolss: let set_printer_hnd_name return WERROR.
Guenther
2010-10-11 14:31:06 +00:00
Günther Deschner
c8a295ab7f s3-spoolss: convert open_printer_hnd to return WERROR.
Guenther
2010-10-11 14:31:06 +00:00
Günther Deschner
fe724c70d2 s3-spoolss: fix set_printer_hnd_name() to match torture test.
Guenther
2010-10-11 14:31:06 +00:00
Volker Lendecke
5e482aeebf s3: Implement echo_TestSleep 2010-10-08 21:11:45 +02:00
Günther Deschner
d8c86a7f77 s3-spoolss: make it possible to have and announce a [prnproc$] share on the printserver.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Oct  7 16:09:14 UTC 2010 on sn-devel-104
2010-10-07 16:09:14 +00:00
Günther Deschner
b7683a2c9d samr: for correctness, rename samr_RidTypeArray to samr_RidAttrArray.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Oct  7 12:04:32 UTC 2010 on sn-devel-104
2010-10-07 12:04:32 +00:00
Günther Deschner
71ab8f326b s3-samr: fix _samr_QueryGroupMember().
that array contains attributes, not sid types.

Guenther
2010-10-07 13:24:22 +02:00
Jeremy Allison
4618e25c95 Fix bug 7704 - Possible error in fix to rpc_server/srv_spoolss_nt.c.
From pjb1008@cam.ac.uk - Service numbers start from 0.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Oct  5 17:32:34 UTC 2010 on sn-devel-104
2010-10-05 17:32:34 +00:00
Günther Deschner
279e0c9610 spoolss: fill in spoolss_SetPort IDL.
Guenther
2010-10-04 09:29:47 +02:00
Volker Lendecke
da0ef65e04 s3: Remove talloc_autofree_context() from srv_samr_nt.c
The dispinfo structs need to survive within a process across pipe opens,
but they don't have a special destructor
2010-10-03 10:45:57 +02:00
Günther Deschner
d17a6f0493 s3-spoolss: Strip off ", DrvConvert" and ",LocalOnly" in OpenPrinterEx as seen from Win7 clients.
These suffixes and their meaning are not documented (yet).

Guenther
2010-10-02 00:42:52 +02:00
Andreas Schneider
455bbd5e1e s3-spoolss: Fixed print job access. 2010-10-02 00:04:45 +02:00
Andreas Schneider
b3fd5e11e5 s3-spoolss: Fixed print_access_check server_info. 2010-10-02 00:04:45 +02:00
Günther Deschner
a88a7c76de s3-dcerpc: no point for printing NDR twice for internal pipes in log level 10.
Guenther
2010-10-01 22:30:22 +02:00
Günther Deschner
3975203a02 s3-spoolss: fix do_drv_upgrade_printer() which must have been broken since the
days we moved away from fstrings.

Guenther
2010-10-01 08:33:47 +02:00
Günther Deschner
5cb5e0aa98 s3-spoolss: make sure we dont crash on NULL setprinter level2 elements as seen from win7.
Guenther
2010-10-01 08:33:46 +02:00
Günther Deschner
48fca54a29 s3-spoolss: dont overwrite location change notify.
Guenther
2010-10-01 08:33:46 +02:00
Günther Deschner
c82d6c0b96 s3-spoolss: make sure to exit early and with the appropriate error code in
_spoolss_GetPrinterDriver2.

Guenther
2010-09-30 02:59:36 +02:00
Günther Deschner
3797d48b76 s3-spoolss: Fix servername/printername handling which turns out to be very important to get right.
Guenther
2010-09-30 02:59:35 +02:00
Günther Deschner
77d4c28032 s3-spoolss: Fix _spoolss_EnumPrintProcDataTypes error handling 2010-09-28 01:17:16 +02:00
Günther Deschner
2921888a08 s3-spoolss: Fix _spoolss_EnumPrintProcessors error handling 2010-09-28 01:17:12 +02:00
Volker Lendecke
6ee0d866c2 s3: Lift talloc_autofree_context() from make_auth_context_fixed() 2010-09-26 01:12:37 +02:00
Volker Lendecke
242e329610 s3: Lift talloc_autofree_context() from make_auth_context_subsystem() 2010-09-26 01:12:37 +02:00
Jeremy Allison
d8814b1a48 Fix bug 7694 - Crash bug with invalid SPNEGO token.
Found by the CodeNomicon test suites at the SNIA plugfest.

http://www.codenomicon.com/

If an invalid SPNEGO packet contains no OIDs we crash in the SMB1/SMB2 server
as we indirect the first returned value OIDs[0], which is returned as NULL.

Jeremy.
2010-09-23 21:44:24 -07:00
Simo Sorce
76f249fb44 s3-dcerps: check auth_type
make sure the auth type used throught the auth operation is consistent.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:25 -07:00
Simo Sorce
b11fff1f48 s3-dcerpc: remove auth_data_free_func
Everything is using a talloc pointer now, no need to have an
accessor function to free data anymore.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:24 -07:00
Simo Sorce
3453bc7b11 s3-dcerpc: make auth context opaque
This way we always double check in advance that the context
is of the right type with talloc_get_type_abort instead of
potentially accessing random memory by addressing the wrong
structure in the union.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:24 -07:00
Simo Sorce
0ec3720573 srv_pipe: reorganize code so that related functions are close to each other
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:23 -07:00
Simo Sorce
d10e192b83 s3-dcerpc: finally remove the legaqcy spnego_type variable from pipe_auth_data
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:23 -07:00
Simo Sorce
b475cfd0b2 s3-dcerpc: use new spnego server code
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:23 -07:00
Simo Sorce
4cdee9b0ed s3-dcerpc: add spnego server helpers
squashed: add michlistMIC signature checks

Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:23 -07:00
Simo Sorce
62d7226b78 s3-dcesrv: use gssapi helper in srv_pipe.c
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:22 -07:00
Simo Sorce
28c22d04fb s3-dcerpc: add server helpers for gssapi auth
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:54:19 -07:00
Simo Sorce
8efd31ccad s3-dcesrv: use ntlmssp helper in srv_pipe.c
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:53:46 -07:00
Simo Sorce
bbf535764b s3-dcerpc: add server helpers for ntlmssp auth
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:53:42 -07:00
Simo Sorce
4194383cfe gssapi: remove unused function argument
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:36:54 -07:00
Simo Sorce
412ebad02b gssapi: avoid explicit dependency on dcerpc specific structures
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:36:54 -07:00
Simo Sorce
0e5eb82a6f s3-dcerpc: move crypto stuff in /librpc/crypto
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-23 10:36:54 -07:00
Günther Deschner
a233c0c0d2 s3-lsa: Fix sid in DEBUG in_lsa_EnumAccountRights.
Andrew, you removed the sid_copy buit forgot the sid, please check.

Guenther
2010-09-21 21:00:32 -07:00
Michael Adam
4696cd6cbe s3:registry: move reg_api_regf prototypes to their own header file.
These two calls are currently only used in the WINREG rpc server.
And this reqires linking in the regfio code.
2010-09-21 08:52:06 +02:00
Michael Adam
b11cc30508 s3:registry: move the reg_api prototypes to their own header. 2010-09-21 08:52:06 +02:00
Michael Adam
e869af9e0e s3:rpc_server:ntsvcs: registry is not directly used an more. 2010-09-21 06:53:32 +02:00
Michael Adam
d760e543a1 s3:rpc_server:ntsvcs: use svcctl_lookup_dispname instead of legacy svcctl in _PNP_GetDeviceRegProp 2010-09-21 06:53:32 +02:00
Michael Adam
4cee4bbd02 s3:rpc_server: registry is not direclty used in the svcctl server any more 2010-09-21 06:53:31 +02:00
Michael Adam
3cab109754 s3:srv_ntsvcs_nt: make fill_svc_config() use svcctl_get_string_value()
instead of using legacy svcctl_fetch_regvalues()
2010-09-21 06:53:31 +02:00
Michael Adam
9bfd587358 s3:services_db: remove the TALLOC_CTX argument from svcctl_set_secdesc 2010-09-21 06:53:30 +02:00
Günther Deschner
102a70e809 s3-util: use shared dom_sid_dup.
Guenther
2010-09-20 14:05:07 -07:00
Günther Deschner
4dbd743e46 s3-util_sid: use shared dom_sid_compare_auth and dom_sid_equal_X functions.
Guenther
2010-09-20 14:04:37 -07:00
Michael Adam
0f7e503d21 s3:registry: move higher level function reg_open_path to new module reg_api_util
The reg_api.c code should just export functions that direclty relate to winreg
api calls.
2010-09-20 19:58:01 +02:00
Andrew Tridgell
dc59de5627 s4-netlogon: added IDL for netr_DsrUpdateReadOnlyServerDnsRecords
this is used by a RODC to do DNS updates, as TSIG updates are not
allowed by RODCs

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-16 21:09:17 +10:00
Günther Deschner
33d05a85e5 s3-rpc_server: fix some uninitalized variables and c++ build warnings.
Guenther
2010-09-15 13:24:44 +02:00
Andreas Schneider
e580c6d88f s3-rpc_server: Use talloc_stackframe. 2010-09-15 12:53:43 +02:00
Simo Sorce
8ec7aaef48 s3-rpc_server: Moved ncacn_np declarations in common header file.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-15 12:53:42 +02:00
Simo Sorce
390642a9e6 s3-rpc_server: Moved "external" pipe functions to rpc_ncacn_np.c.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-15 12:53:42 +02:00
Andreas Schneider
34225c93af s3-rpc_server: Added new parametric option 'rpc_server'
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-15 12:53:42 +02:00
Simo Sorce
738c843e99 s3-rpc_server: Renamed rpc_ncacn_np_internal.c.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-15 12:53:42 +02:00
Simo Sorce
5685914344 s3-rpc_server: Convert rpc_connect_spoolss_pipe into a generic interface.
This way we have one common way to open internal pipes whether they
are shortcircuited or piped to an external process.
2010-09-15 12:53:42 +02:00
Simo Sorce
344260d03e s3-rpc_server: Added support for internal connections to external daemons.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-15 12:53:42 +02:00
Simo Sorce
e7c4555b7c s3-rpc_server: Accept connections and process requests.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15 12:53:42 +02:00
Simo Sorce
f7f9916dc7 s3-rpc_server: Added helper functions to read data from a ncacn socket.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15 12:53:42 +02:00
Simo Sorce
a1f1da7226 s3-rpc_server: Addded function to create custom pipes_struct.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15 12:53:41 +02:00
Simo Sorce
b1fdc5a704 s3-rpc_server: Add generic listener callback.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15 12:53:41 +02:00
Simo Sorce
3c26e95840 s3-rpc_server: Added initial generic RPC server infrastructure.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15 12:53:41 +02:00
Simo Sorce
11721874c3 s3-rpc_server: Added debug to see how much data has been read out.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15 12:53:41 +02:00
Simo Sorce
5ccd7a56fa s3-rpc_server: Make process_incoming_data() public.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15 12:53:41 +02:00
Simo Sorce
2ef693e3c8 s3-rpc_server: Make pipe destructor public.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
2010-09-15 12:53:41 +02:00
Simo Sorce
3f04b54197 s3-rpc_server: Fixed unhandled error condition.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-15 12:53:40 +02:00
Andrew Bartlett
b733d9dee0 s3-samr Explian better the use of two privileges in this call
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:13 +10:00
Andrew Bartlett
aefe60da8c s3-util_sid Tidy up global struct security_token
This no longer needs to be global, and should be const.  We now also
init it with the C99 style initialisers.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:12 +10:00
Andrew Bartlett
9883993b66 s3-privs Overhaul PRIVILEGE_SET handling, avoid dealing with the bitmap
This avoids us dealing with the privilege bitmap in the LSA server, and
overhauls much of the rest of the handling to be currnet with the modern
world of talloc.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:11 +10:00
Andrew Bartlett
ad5ec58a71 s3-privs Hide the bitmap-based grant_privilege and revoke_privilege
The new wrappers avoid anything but the core privileges code
dealing with the bitmap values directly.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:11 +10:00
Andrew Bartlett
4080ff7af5 s3-privs Make privilege_enum_sids() take an LUID, not a bitmap
This moves one more privileges call away from direct bitmap manipuation.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:11 +10:00
Andrew Bartlett
6d78e11e17 libcli/security make sec_privilege_id() return SEC_PRIV_INVALID on failure.
Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:10 +10:00
Andrew Bartlett
62e5900cd1 s3-privs Rework access_check_object() to take two privileges
This allows the privileges bitmap to be used only when setting
privileges, and uses an the LUID constant for all 'does this user
have this privilege' operations.

The advantage is that we now only need one API to determine if a
token has a privilege, and much less code needs to know what type
is used for the underlying bitmap.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:10 +10:00
Andrew Bartlett
2bb7b827d6 libcli/security Remove luid_to_se_priv() and luid_to_privilege_name()
These functions duplicate other functions in the merged code.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:10 +10:00
Andrew Bartlett
3bb77516b8 s3-privs Convert from user_has_privileges() -> security_token_has_privilege()
This new call is available in the merged privileges code, and
takes an enum as the parameter, rather than a bitmask.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:09 +10:00
Andrew Bartlett
b057867de3 s3-privs Remove a pointer from grant_privilege()
Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:09 +10:00
Andrew Bartlett
0e2142a927 s3-privs Remove pointer indirection from se_priv_to_privilege_set()
Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:09 +10:00
Andrew Bartlett
a02ae674dd s3-privs Remove a pointer indirection from revoke_privilege()
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:08 +10:00
Andrew Bartlett
cbd72ab93b libcli/security Don't export privs[] as a global variable
Instead, provide access functions for the LSA and net sam callers
for the information they need.

They still only enumerate the first 8 privileges that have traditionally
been exposed.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:08 +10:00
Andrew Bartlett
33ce8633d6 s3-lsa Use sec_privilege_id() to lookup name to LUID
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:08 +10:00
Andrew Bartlett
d2e41105e2 libcli/security Return number of entries in the old source3 list
This ensures there isn't a behaviour change when the source3 list is combined
with the longer source4 list.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:08 +10:00
Andrew Bartlett
eb8e3155de libcli/privileges Simplify get_privilege_luid() to return just the enum
As Samba only deals with the lower 32 bits of the LUID, just return those
and let the LSA layer deal with the upper 0 bits.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:08 +10:00
Andrew Bartlett
b29b6c13a3 s3-privs Inline dump_se_priv into callers now that it's just a uint64_t
The previous 128 bit structure needed this helper function.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:07 +10:00
Andrew Bartlett
cae7babb1f s3-privs Rename structure elements for greater clarity
It is important to make clear which is the LUID and which
is the Samba-only bitmap mask.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:06 +10:00
Andrew Bartlett
d1bb21b0d5 s3:auth Remove NT_USER_TOKEN
The all UPPER case typedef is no longer the preferred Samba style
and this makes it easier to see that this is the IDL-derivied structure

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:06 +10:00
Andrew Bartlett
4bfc8d3b1a s3-auth Change struct nt_user_token -> struct security_token
This common structure is defined in security.idl

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:05 +10:00
Andrew Bartlett
fcaa86f402 s3-privs Further changes to remove SE_PRIV
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:04 +10:00
Günther Deschner
bf7ca3f5e7 s3-spoolss: Fix _spoolss_GetPrinter().
In the error case, we need to TALLOC_FREE(r->out.info), don't ask :-)

Guenther
2010-09-10 17:11:12 +02:00
Andreas Schneider
fc1a5dbffb s3-spoolss: Don't leak memory on the session counter list.
Thanks Günther, please check.
2010-09-10 16:10:46 +02:00
Simo Sorce
ed2c06f9da s3-spoolss: Allow multiple client backchannels.
When we run spoolssd we need to support multiple clients connecting.

Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-10 15:49:04 +02:00
Simo Sorce
a736385b97 s3-spoolss: Split function to send notification.
More digestible this way.

Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-10 15:49:04 +02:00
Simo Sorce
9db2be245e s3-spoolss: Use a single structure for all the back channel data.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-10 15:49:03 +02:00
Simo Sorce
433ac757dc s3-spoolss: Rename Printer_entry to struct printer_handle.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-10 15:49:03 +02:00
Simo Sorce
4a8d042afa s3-spoolss: Move Printer_entry to srv_spoolss_nt.c
It is used only there, and it is a good idea to make this one private and
opaque to the rest of the code.

Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-10 15:49:03 +02:00
Simo Sorce
e257e68b4b s3-spoolss: Allocate printer entries on the pipe struct.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-10 15:49:03 +02:00
Simo Sorce
0e5b1a67d2 s3-spoolss: Rename session counter structure and use talloc.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-10 15:49:03 +02:00
Günther Deschner
26ea51c7ab s3-spoolss: allow a short printername w/o servername.
Verified with RPC-SPOOLSS-PRINTSERVER-enumprinters_old test.

Guenther
2010-09-10 00:31:27 +02:00
Andreas Schneider
59c14282eb s3-spoolss: Use systerm server_info for winreg connection.
This will ensure that we have the rights we need to access the regsitry.
2010-09-09 16:00:08 +02:00
Andreas Schneider
1c42bc3ad4 s3-spoolss: Make auth_serversupplied_info const. 2010-09-09 16:00:08 +02:00
Andreas Schneider
0d9fa9e96f s3-rpcint: Make auth_serversupplied_info const. 2010-09-09 16:00:08 +02:00
Andreas Schneider
cd2b9db04b s3-spoolss: Fixed some build warnings. 2010-09-09 16:00:07 +02:00
Andreas Schneider
32e95772f9 s3-spoolss: Move spoolss winreg to new dcerpc client funtions. 2010-09-08 18:43:54 +02:00
Andreas Schneider
80eba81438 s3-spoolss: Fixed a possible crash bug. 2010-09-08 17:38:29 +02:00
Volker Lendecke
7612760c22 s3: Prune the printername cache when a printer is deleted
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-07 09:40:26 +02:00
Stefan Metzmacher
1df9fe81f5 s3:rpc_server: implement rpcint_bh_set_timeout() as dummy
metze
2010-09-04 09:01:18 +02:00
Stefan Metzmacher
2907310803 s3:rpc_server: make it possible to use rpcint_binding_handle() directly
metze
2010-09-04 09:01:10 +02:00
Günther Deschner
cf728f890f s3-spoolss: fix some debug statements.
Guenther
2010-09-03 12:19:26 +02:00
Simo Sorce
2a2557075e s3-dcerpc: Implement DCERPC_AUTH_TYPE_KRB5 server side
Signed-off-by: Günther Deschner <gd@samba.org>
2010-08-30 14:35:02 +02:00
Volker Lendecke
5a6be0b314 s3: Remove smbd_server_fd() from srv_netlog_nt
This is not actually used. If it was to be activated, we'd have to pass in a
pipes_struct.
2010-08-29 21:55:25 +02:00
Volker Lendecke
8d256b8f30 s3: Remove some uses of smbd_server_fd()
The change in behaviour is that we don't detect "socket option" changes anymore
when printers are added or removed.
2010-08-29 21:55:23 +02:00
Volker Lendecke
e8cfc2f1de s3: Cache results of finding printer names
With hundreds of printers or on a slow machine, this can become expensive.

Problem reported and patch sponsored by DESY, Hamburg (www.desy.de)
2010-08-27 16:47:07 +02:00
Volker Lendecke
8e1d3b5f8f s3: Pass rhost through to smb_pam_passchange 2010-08-27 12:53:17 +02:00
Günther Deschner
3aab0c701c s3-build: only include rpc_misc.h where needed.
Guenther
2010-08-26 00:26:01 +02:00
Günther Deschner
7a05ca2c9c s3-build: use dbwrap.h only where needed.
Guenther
2010-08-26 00:25:55 +02:00
Günther Deschner
7b6fc9f414 s3-dcerpc: only include rpc_dce.h where needed.
Guenther
2010-08-26 00:20:29 +02:00
Günther Deschner
b5bdcdd65e s3-build: only include "fake_file.h" where needed.
Guenther
2010-08-26 00:20:28 +02:00
Günther Deschner
e978a3d3f4 s3-lsa: separate out init_lsa headers.
Guenther
2010-08-25 22:50:39 +02:00
Volker Lendecke
70c5bed4b2 s3: Replace calls to check_access by allow_access
We already have both the name and address of the client stored now
2010-08-22 14:28:34 +02:00
Volker Lendecke
a847f13d7b s3: Use pipe_struct->client_id->name for pjob.clientmachine 2010-08-18 11:18:24 +02:00
Volker Lendecke
4b5e252354 s3: Add "client_id" to pipes_struct 2010-08-18 11:18:23 +02:00
Volker Lendecke
ac7b63384d s3: Lift smbd_server_fd from reload_services() 2010-08-18 11:18:21 +02:00
Volker Lendecke
9671547d17 s3: Lift smbd_server_fd() from read_fd_with_timeout() 2010-08-17 22:44:03 +02:00
Volker Lendecke
3aba8e9b7e s3: Remove unused "pos" arg from print_job_write 2010-08-17 15:31:49 +02:00
Andreas Schneider
feb22e0897 s3-samr: Correctly fix the transition from enum to uint32_t.
What type an enum is depends on the implementation, the compiler and
probably the compiler options. sizeof(enum) is normally not sizeof(int)!
2010-08-17 13:48:05 +02:00
Simo Sorce
9b8c7d47f9 s3-dcerpc: Remove unused function 2010-08-17 06:33:13 -04:00
Simo Sorce
7b12513d12 s3-dcerpc: make a few local functions as static 2010-08-17 06:33:13 -04:00
Andreas Schneider
1791d05335 s3-samr: Fixed some build warnings. 2010-08-17 11:44:49 +02:00
Stefan Metzmacher
12379097ab s3:rpc_server: remove unused rpc_pipe_internal_dispatch()
metze
2010-08-16 14:30:18 +02:00
Volker Lendecke
96ae457023 s3: Remove get_client_fd() 2010-08-16 13:13:10 +02:00
Jeremy Allison
15d3541c67 Eliminate any chance of a class of "uninitialized auto variable" errors.
Jeremy.
2010-08-13 10:49:18 -07:00
Jeremy Allison
84fd910c34 Fix bug #7617 - smbd coredump due to uninitialized variables in the performance counter code.
In the file rpc_server.c, function _winreg_QueryValue()

uint8_t *outbuf

Should be :

uint8_t *outbuf = NULL;

As it is later freed by

      if (free_buf) SAFE_FREE(outbuf);

in some cases, this frees the unintialized outbuf, which causes a coredump.
2010-08-12 15:16:42 -07:00
Stefan Metzmacher
262dcfcd87 s3:rpc_server: add rpc_pipe_open_internal dcerpc_binding_handle backend
metze
2010-08-12 14:31:22 +02:00
Volker Lendecke
f0896759ce s3: Lift the server_messaging_context from spoolss_setjob_1 2010-08-08 18:09:39 +02:00
Volker Lendecke
18ff84b089 s3: Lift the server_messaging_context from construct_printer_info6 2010-08-08 18:09:39 +02:00
Volker Lendecke
35c39b07cc s3: Lift the server_messaging_context from construct_printer_info2 2010-08-08 18:09:39 +02:00
Volker Lendecke
73a5c2d02d s3: Lift the server_messaging_context from construct_notify_jobs_info 2010-08-08 18:09:38 +02:00
Volker Lendecke
788498d2ff s3: Lift the server_messaging_context from construct_notify_printer_info 2010-08-08 18:09:38 +02:00
Volker Lendecke
02c008613f s3: Pass messaging_context through s_notify_info_data_table 2010-08-08 18:09:38 +02:00
Volker Lendecke
1b60ead64a s3: Lift the server_messaging_context from update_monitored_printq_cache 2010-08-08 18:09:38 +02:00
Volker Lendecke
ef208c5571 s3: Lift the server_messaging_context from print_job_endpage 2010-08-08 18:09:38 +02:00
Volker Lendecke
d1f3a2efb7 s3: Lift the server_messaging_context from print_job_write 2010-08-08 18:09:37 +02:00
Volker Lendecke
de10824872 s3: Lift the server_messaging_context from print_job_set_name 2010-08-08 18:09:37 +02:00
Volker Lendecke
d62c73b799 s3: Lift the server_messaging_context from notify_printer_location 2010-08-08 18:09:36 +02:00
Volker Lendecke
83c4c04121 s3: Lift the server_messaging_context from notify_printer_port 2010-08-08 18:09:36 +02:00
Volker Lendecke
f3313c5307 s3: Lift the server_messaging_context from notify_printer_printername 2010-08-08 18:09:36 +02:00
Volker Lendecke
c427423aee s3: Lift the server_messaging_context from notify_printer_sharename 2010-08-08 18:09:36 +02:00
Volker Lendecke
7285e0d5dd s3: Lift the server_messaging_context from notify_printer_comment 2010-08-08 18:09:36 +02:00
Volker Lendecke
4e4bf13e70 s3: Lift the server_messaging_context from notify_printer_driver 2010-08-08 18:09:35 +02:00
Volker Lendecke
c6e6aee0a0 s3: Lift the server_messaging_context from print_queue_status 2010-08-08 18:09:34 +02:00
Volker Lendecke
c50c973036 s3: Lift the server_messaging_context from print_job_end 2010-08-08 18:09:34 +02:00
Volker Lendecke
a4c27786ff s3: Lift the server_messaging_context from print_queue_length 2010-08-08 18:09:33 +02:00
Volker Lendecke
39da717fe1 s3: Lift the smbd_messaging_context from reload_services 2010-08-08 18:09:33 +02:00
Volker Lendecke
cc280f0cd1 s3: Lift the smbd_messaging_context from print_queue_purge 2010-08-08 16:03:27 +02:00
Volker Lendecke
9723f33ef5 s3: Lift the smbd_messaging_context from print_queue_resume 2010-08-08 16:03:27 +02:00
Volker Lendecke
5f9165a7ea s3: Lift the smbd_messaging_context from print_queue_pause 2010-08-08 16:03:26 +02:00
Volker Lendecke
9441e8c52c s3: Lift the smbd_messaging_context from print_job_start 2010-08-08 16:03:26 +02:00
Volker Lendecke
7df0e672f2 s3: Lift the smbd_messaging_context from print_job_resume 2010-08-08 16:03:26 +02:00
Volker Lendecke
2811c258f6 s3: Lift the smbd_messaging_context from print_job_pause 2010-08-08 16:03:26 +02:00
Volker Lendecke
8dcbeecd6d s3: Lift the smbd_messaging_context from print_job_delete 2010-08-08 16:03:26 +02:00
Volker Lendecke
4a514d2261 s3: Lift the smbd_messaging_context from construct_printer_info7 2010-08-08 16:03:26 +02:00
Volker Lendecke
99b2da4504 s3: Lift the smbd_messaging_context from is_printer_published 2010-08-08 16:03:26 +02:00
Volker Lendecke
7d08c25f98 s3: Lift the smbd_messaging_context from nt_printer_publish 2010-08-08 16:03:25 +02:00
Volker Lendecke
be7fd4ae50 s3: Lift the smbd_messaging_context from print_access_check 2010-08-08 16:03:25 +02:00
Volker Lendecke
d79895e826 s3: Lift the smbd_messaging_context from printer_driver_files_in_use 2010-08-08 16:03:24 +02:00
Volker Lendecke
862e888f71 s3: Lift the smbd_messaging_context from printer_driver_in_use 2010-08-08 16:03:24 +02:00
Volker Lendecke
51c47a3302 s3: Lift the smbd_messaging_context from netr_set_machine_account_password 2010-08-08 16:03:24 +02:00
Volker Lendecke
ae8619f703 s3: Lift the smbd_messaging_context from get_md4pw 2010-08-08 16:03:24 +02:00
Volker Lendecke
7850496fe7 s3: Lift the smbd_messaging_context from enumprinterdrivers_level 2010-08-08 16:03:24 +02:00
Volker Lendecke
ab196c7bfb s3: Lift the smbd_messaging_context from enumprinterdrivers_level_by_architecture 2010-08-08 16:03:23 +02:00
Volker Lendecke
e1af63fdee s3: Lift the smbd_messaging_context from update_dsspooler 2010-08-08 16:03:23 +02:00
Volker Lendecke
8ee2a0a269 s3: Lift the smbd_messaging_context from construct_printer_driver_info_level 2010-08-08 16:03:23 +02:00
Volker Lendecke
9daa6a2501 s3: Lift the smbd_messaging_context from enumprinters_level5 2010-08-08 16:03:22 +02:00
Volker Lendecke
d7803ea49c s3: Lift the smbd_messaging_context from enumprinters_level4 2010-08-08 16:03:22 +02:00
Volker Lendecke
89d8998d7c s3: Lift the smbd_messaging_context from enumprinters_level2 2010-08-08 16:03:21 +02:00
Volker Lendecke
e35ac20ca3 s3: Lift the smbd_messaging_context from enumprinters_level1 2010-08-08 16:03:21 +02:00
Volker Lendecke
bf10fa67ef s3: Lift the smbd_messaging_context from enum_all_printers_info_2 2010-08-08 16:03:21 +02:00
Volker Lendecke
ada007d971 s3: Lift the smbd_messaging_context from enum_all_printers_info_1_network 2010-08-08 16:03:21 +02:00
Volker Lendecke
2c0e63067b s3: Lift the smbd_messaging_context from enum_all_printers_info_1_name 2010-08-08 16:03:21 +02:00
Volker Lendecke
6dc35f8f70 s3: Lift the smbd_messaging_context from enum_all_printers_info_1_local 2010-08-08 16:03:21 +02:00