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

59552 Commits

Author SHA1 Message Date
Stefan Metzmacher
e03591111a librpc/ndr_krb5pac: use ndr_push_relative_ptr2_start()/_end()
metze
2010-02-18 13:44:01 +01:00
Stefan Metzmacher
b423bd2115 librpc/ndr_drsblobs: use ndr_push_relative_ptr2_start()/_end()
metze
2010-02-18 13:44:00 +01:00
Günther Deschner
bfd6edb3e9 spoolss: fix relative pointers in ndr_push_spoolss_DriverInfo101.
Guenther
2010-02-18 13:44:00 +01:00
Günther Deschner
c869328b16 s3: re-run make full_idl.
Guenther
2010-02-18 13:44:00 +01:00
Günther Deschner
a049d75193 pidl: use ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end.
Guenther
2010-02-18 13:43:59 +01:00
Günther Deschner
bc20d3446a libndr: add ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end.
Guenther
2010-02-18 13:43:59 +01:00
Karolin Seeger
494819773d s3-docs: Remove trailing whitespaces and fix a typo.
Karolin
2010-02-18 13:10:21 +01:00
Björn Jacke
37115f91ae s3:docs: add some advice for usage of strict allocate 2010-02-18 13:01:28 +01:00
Günther Deschner
b3c2b2260a s3-spoolss: Fix _spoolss_EnumPrinters servername handling.
Guenther
2010-02-18 12:40:36 +01:00
Günther Deschner
b6f58e25b5 s3-selftest: fix return code for modprinter.pl -a.
Background is: the SetPrinter level 2 calls "addprinter command" an fails if a
share already existed (and the addprinter command returned a non-0 return code).
Removing the non-0 return code is fine, as in AddPrinter{Ex}, we have checks to
see if a share already exists before calling out the addprinter command.

Maybe one day, we need to have a "changeprinter command"...

Guenther
2010-02-18 11:23:59 +01:00
Stefan Metzmacher
c42d9c4ec4 tsocket/bsd: fix comment in tdgram_bsd_recvfrom_handler()
metze
2010-02-18 09:38:00 +01:00
Jeremy Allison
9abce9f7c9 Revert "Got back to 16-byte padding on auth RPC. S3 clients and servers now cope with this. Jeremy"
This reverts commit 38c50c7027.

As tridge requested, we need this to work with older S3
servers, not just for smbtorture4.

Jeremy.
2010-02-17 19:42:49 -08:00
Günther Deschner
867daf6e0a s3-selftest: finally enable RPC-SPOOLSS-PRINTER against Samba 3.
Guenther
2010-02-18 02:27:08 +01:00
Günther Deschner
34ad5da5cd s3-selftest: include addprinter/deleteprinter command.
Guenther
2010-02-18 02:27:04 +01:00
Günther Deschner
43e3d8f51d s3-spoolss: fix return code of spoolss_DeletePrinter.
When the printer has been removed by the "deleteprinter command", we need to
check if it is still there and then fail, not fail if we successfully removed
it (found by RPC-SPOOLSS-PRINTER).

Guenther
2010-02-18 02:19:59 +01:00
Günther Deschner
8ce66fba03 s3-spoolss: in spoolss_EnumPrinters r->in.server is a *unique* pointer!
Guenther
2010-02-18 02:19:50 +01:00
Günther Deschner
2d2db2a822 s3-spoolss: more AddPrinter{Ex} checks.
Windows will allow to add a non-shared printer that is returned by EnumPrinters.
Samba has no notion of non-shared local printers yet, so just make sure to
behave like we do elsewhere: a printer autoloaded by samba or added to samba is
shared.

Guenther
2010-02-18 02:19:42 +01:00
Günther Deschner
5cff7e1692 s3-spoolss: add some printer info validation for AddPrinter calls.
Guenther
2010-02-18 02:19:33 +01:00
Günther Deschner
9ff2c1ea64 testprogs: print SDDL string of printer security descriptors 2010-02-18 02:18:59 +01:00
Günther Deschner
6cf10cc102 s3-modules: fix get_acl_blob in the acl_tdb VFS module.
Shuttle-reviewed by jra :)

Guenther
2010-02-18 02:17:50 +01:00
Günther Deschner
998a7b4e3f s4-smbtorture: skip printer info cross tests against samba 3 for now.
Not even w2k8r2 passes them atm.

Guenther
2010-02-18 01:49:02 +01:00
Günther Deschner
97d36377d3 s4-smbtorture: try more combinations to find printers in test_EnumPrinters_findname().
Also take a note of servers returning full UNC printer paths although we did not
set the servername.

Guenther
2010-02-18 01:48:52 +01:00
Günther Deschner
a1ba72f84c s4-smbtorture: simplify test_PrinterInfo_DevMode a bit.
Guenther
2010-02-18 01:48:45 +01:00
Günther Deschner
57847c2fee s4-smbtorture: avoid potential loop while adding a new printer in RPC-SPOOLSS-PRINTER.
Guenther
2010-02-18 01:48:36 +01:00
Günther Deschner
d5e30dec8b s3-rpcclient: fix uninitialized variable in wkssvc_enumerateusers.
Guenther
2010-02-18 01:47:57 +01:00
Jeremy Allison
38c50c7027 Got back to 16-byte padding on auth RPC. S3 clients and servers now cope with this. Jeremy 2010-02-17 16:43:11 -08:00
Andrew Bartlett
7202dcdcc0 s4:param Modify secrets_get_domain_sid to give more useful errors
This also moves the calls to secrets_get_domain_sid back into
winbind_task_init(), so that we can terminate with a much more
detailed error message.  (The previous message was simply
NT_STATUS_CANT_ACCESS_DOMAIN_INFO).

Andrew Bartlett
2010-02-18 10:58:24 +11:00
Jeremy Allison
7b4387f765 Fix bug #7146 - Samba miss-parses authenticated RPC packets.
Parts of the Samba RPC client and server code misinterpret authenticated
packets.

DCE authenticated packets actually look like this :

+--------------------------+
|header                    |
| ... frag_len (packet len)|
| ... auth_len             |
+--------------------------+
|                          |
| Data payload             |
...                     ....
|                          |
+--------------------------+
|                          |
| auth_pad_len bytes       |
+--------------------------+
|                          |
| Auth footer              |
| auth_pad_len value       |
+--------------------------+
|                          |
| Auth payload             |
| (auth_len bytes long)    |
+--------------------------+

That's right. The pad bytes come *before* the footer specifying how many pad
bytes there are. In order to read this you must seek to the end of the packet
and subtract the auth_len (in the packet header) and the auth footer length (a
known value).

The client and server code gets this right (mostly) in 3.0.x -> 3.4.x so long
as the pad alignment is on an 8 byte boundary (there are some special cases in
the code for this).

Tridge discovered there are some (DRS replication) cases where on 64-bit
machines where the pad alignment is on a 16-byte boundary. This breaks the
existing S3 hand-optimized rpc code.

This patch removes all the special cases in client and server code, and allows
the pad alignment for generated packets to be specified by changing a constant
in include/local.h (this doesn't affect received packets, the new code always
handles them correctly whatever pad alignment is used).

This patch also works correctly with rpcclient using sign+seal from
the 3.4.x and 3.3.x builds (testing with 3.0.x and 3.2.x to follow)
so even as a server it should still work with older libsmbclient and
winbindd code.

Jeremy
2010-02-17 15:27:59 -08:00
Jeremy Allison
5564e7147f Fix bug #6557 - Do not work VFS full_audit
Re-arrange the operations order so SMB_VFS_CONNECT is done
first as root (to allow modules to correctly initialize themselves).

Reviewed modules to check if they needed CONNECT invoked as
a user (which we previously did) and it turns out any of them
that cared needed root permissions anyway.

Jeremy.
2010-02-17 11:13:35 -08:00
Lars Müller
94074eb2e6 s3: go straight to winbindd_dual_pam_auth() in case of !NT_STATUS_OK
At the formerly used process_result statement we have alone one
NT_STATUS_IS_OK() which never could be hit in our case as we only go here
if NT_STATUS_EQUAL is not ok.
2010-02-17 19:00:01 +01:00
Lars Müller
bc0b152889 s3: let the pam_winbind po files reference the correct location 2010-02-17 18:46:35 +01:00
Jeremy Allison
936828de71 Fix commit d07cd37b99
Which was:

    tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD

Metze, this has to have been wrong - you are throwing away the talloc_realloc
pointer returned. Also no error checking. Please review.

Thank goodness for gcc warnings :-).

Jeremy.
2010-02-17 09:24:34 -08:00
Anatoliy Atanasov
968bd16b49 s4/rodc: change the libnet_become_dc code to do RODC join 2010-02-17 18:03:32 +02:00
Anatoliy Atanasov
55f7c74cea s4/drs: add DRSUAPI_ATTRIBUTE_options attribute 2010-02-17 18:03:31 +02:00
Anatoliy Atanasov
0e8fe821c9 s4/drs:kccdrs_replica_get_info_obj_metadata implementation
Fix the names of the drsuapi_DsReplicaInfoType enum and rebuild the .idl
The get_info_obj_metadata implementation is ported from implementation
i developed and tested at the samba io lab 2009
2010-02-17 18:03:31 +02:00
Kamen Mazdrashki
8078614814 s4/ldap: Refactor the fix for ldap nested searches
Current implementation synchronizes processing for
all types of LDAP request, not only LDAP_Search ones.

Synchronization for ldap replies processing is done
locally in ldb_ildap module as this concerns only
ildb_callback() function.

Signed-off-by: Anatoliy Atanasov <anatoliy.atanasov@postpath.com>
2010-02-17 18:03:31 +02:00
Stefan Metzmacher
d07cd37b99 tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD
metze
2010-02-17 14:46:39 +01:00
Stefan Metzmacher
1ffcb991a9 tsocket/bsd: set IPV6_V6ONLY on AF_INET6 sockets
Some system already have this as default. It's easier
to behave the same way on all systems and handle ipv6
and ipv4 sockets separate.

metze
2010-02-17 14:46:39 +01:00
Stefan Metzmacher
8a0949dfc8 tsocket/bsd: fix bug #7140 autodetect ipv4 and ipv6 based on the remote address if the local address is any
metze
2010-02-17 14:46:08 +01:00
Stefan Metzmacher
6637b2f4b0 tsocket/bsd: fix bug #7140 use calculated sa_socklen for bind() in tstream_bsd_connect_send()
This is needed because, we can't use sizeof(sockaddr_storage) for AF_UNIX
sockets. Also some platforms require exact values for AF_INET and AF_INET6.

metze
2010-02-17 14:45:34 +01:00
Stefan Metzmacher
135543b4c3 tsocket/bsd: fix do_bind logic for AF_INET
We want the explicit bind() when we don't use the any address.

metze
2010-02-17 14:13:57 +01:00
Stefan Metzmacher
0b3e950731 socket_wrapper: also ignore AF_INET6 in swrap_setsockopt()
metze
2010-02-17 14:13:55 +01:00
Jeff Layton
a8cc2fa09e cifs.upcall: allocate a talloc context for smb_krb5_unparse_name
cifs.upcall calls smb_krb5_unparse_name with a NULL talloc context.
Older versions of this function though will conditionally use
SMB_REALLOC instead of TALLOC_REALLOC when a NULL context is passed
in. To make it more consistent, just spawn a talloc context that
we can pass into this function.

Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=565446
https://bugzilla.samba.org/show_bug.cgi?id=6868

Reported-by: Ludek Finstrle <luf@seznam.cz>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Günther Deschner <gd@samba.org>
2010-02-17 12:15:50 +01:00
Volker Lendecke
8aef63d243 s3: Fix bug 7139
To provide the user with the same SID when doing Kerberos logins, attempt to do
a make_server_info_sam instead of a make_server_info_pw.
2010-02-17 11:32:30 +01:00
Günther Deschner
3a9dc490b4 s4-smbtorture: unify test list to run against single created printers in RPC-SPOOLSS-PRINTER.
This is to make sure we run the same tests for printers created via AddPrinter
and via AddPrinterEx.

Guenther
2010-02-17 11:29:37 +01:00
Günther Deschner
b32c1e2975 s4-smbtorture: also test level 2 sets for devicemodes and see if they persist.
Guenther
2010-02-17 11:29:37 +01:00
Günther Deschner
ff5bfb9708 s4-smbtorture: refactor setprinter devicemode calls in RPC-SPOOLSS-PRINTER.
Guenther
2010-02-17 11:29:36 +01:00
Andrew Tridgell
986627cd67 s4-provision: freeze the DNS zone before creating the zone file
This prevents bind from getting confused if it has a journal for the
zone.
2010-02-17 19:43:33 +11:00
Andrew Tridgell
fd2556317f s4-dnsupdate: use samba_runcmd() in the dns update task
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-02-17 19:43:32 +11:00
Andrew Tridgell
8633d8126b s4-param: added "rndc command" smb.conf option 2010-02-17 19:43:32 +11:00