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

1340 Commits

Author SHA1 Message Date
Günther Deschner
e194ded26e netlogon: move password change code out to rpccli_netlogon_set_trust_password.
Guenther
2008-09-21 22:30:39 +02:00
Günther Deschner
1f9624175a netlogon: add init_netr_CryptPassword.
Guenther
2008-09-21 22:30:10 +02:00
Volker Lendecke
c81b5fd440 Add async trans/trans2/nttrans calls to libsmb
Logic stolen from Samba4, naturally the specific implementation differs a bit.
(This used to be commit 4b8bc5b03d)
2008-09-09 17:37:34 +02:00
Volker Lendecke
6344b8ec27 make smb_bytes_push_str public
(This used to be commit d611f599b4)
2008-09-09 17:37:34 +02:00
Volker Lendecke
ce47a2b2e3 Add a utility function to append a DATA_BLOB to a talloc object
(This used to be commit d8259cbe66)
2008-09-09 17:37:34 +02:00
Jeremy Allison
405b072431 Write times code update.
Ok, here's the fix for the write times breakage
with the new tests in S4 smbtorture.

The key is keeping in the share mode struct
the "old_file_time" as the real write time,
set by all the write and allocation calls,
and the "changed_write_time" as the "sticky"
write time - set by the SET_FILE_TIME calls.

We can set them independently (although I
kept the optimization of not setting the
"old_file_time" is a "changed_write_time"
was already set, as we'll never see it.

This allows us to update the write time
immediately on the SMBwrite truncate case,
SET_END_OF_FILE and SET_ALLOCATION_SIZE calls,
whilst still have the 2 second delay on the
"normal" SMBwrite, SMBwriteX calls.

I think in a subsequent patch I'd like to
change the name of these from "old_file_time"
to "write_time" and "changed_write_time" to
"sticky_write_time" to make this clearer.

I think I also fixed a bug in Metze's original
code in that once a write timestamp had been
set from a "normal" SMBwriteX call the fsp->update_write_time_triggered
variable was set and then never reset - thus
meaning the write timestamp would never get
updated again on subsequent SMBwriteX's.

The new code checks the update_write_time_event
event instead, and doesn't update is there's
an event already scheduled.

Metze especially, please check this over for
your understanding.

Jeremy.
(This used to be commit 6f20585419)
2008-09-05 19:00:48 -07:00
Simo Sorce
3fa16da8c7 Revert "Split lookup_name() and create a new functiong called"
This reverts commit 8594edf666.
(This used to be commit ad462e2e2d)
2008-09-03 14:36:43 -04:00
Simo Sorce
c5894e1477 Merge branch 'v3-devel' of ssh://git.samba.org/data/git/samba into v3-devel
(This used to be commit 8e4dca3b94)
2008-09-03 11:52:54 -04:00
Volker Lendecke
84fca380f2 factor prs_append_some_data out of prs_append_some_prs_data
(This used to be commit 32cb45c962)
2008-09-03 14:47:48 +02:00
Volker Lendecke
228a12681b Add async smbecho client support
(This used to be commit c1d645fbe3)
2008-08-28 18:16:00 +02:00
Volker Lendecke
2650207d4a Remove cli->event_ctx, pass it explicitly
Storing the event_context as permanent state in struct cli_state creates more
complex code than necessary IMO.
(This used to be commit debb37f703)
2008-08-28 17:53:37 +02:00
Volker Lendecke
de9fcfc795 Add async open&x
(This used to be commit faf353edd6)
2008-08-28 17:53:36 +02:00
Volker Lendecke
8f408a676e Add async cli_close
(This used to be commit f84a2b5dbf)
2008-08-28 17:53:36 +02:00
Volker Lendecke
58aa97c0d9 Refactoring: Add the routine cli_request_send()
cli_request_send() is supposed to bundle all generic SMB-header handling. This
makes cli_request_new static to async_smb.c.
(This used to be commit 7e73dd4e76)
2008-08-28 17:53:36 +02:00
Jeremy Allison
29af730964 Fix the wcache_invalidate_samlogon calls.
Jeremy.
(This used to be commit 7c820899ed)
2008-08-27 17:29:10 -07:00
Jeremy Allison
1cae2ac905 Add st_birthtime and friends for accurate create times on systems that support it (*BSD and MacOSX).
Should have done this ages ago, sorry.
Jeremy.
(This used to be commit 4c3a955890)
2008-08-27 15:06:14 -07:00
Simo Sorce
a1de4e988d Merge branch 'v3-devel' of ssh://git.samba.org/data/git/samba into v3-devel
(This used to be commit e038f1cf9f)
2008-08-26 18:56:49 -04:00
Jeremy Allison
79150da70b Here is a re-working of the winbindd
reconnect code to cope with rebooting a DC. This
replaces the code I asked Volker to revert.
The logic is pretty simple. It adds a new parameter,
"winbind reconnect delay", set to 30 seconds by
default, which determines how long to wait between
connection attempts.
To avoid overwhelming the box with DC-probe
forked children, the code now keeps track of
the DC probe child per winbindd_domain struct
and only starts a new one if the existing one
has died.
I also added a little logic to make sure the
dc probe child always sends a message whatever
the reason for exit so we will always reschedule
another connect attempt.
Also added documentation.
Jeremy.
(This used to be commit 8027197635)
2008-08-20 16:24:22 -07:00
Jeremy Allison
f23a6b7c93 Fix bug 5697 nmbd spins in reload_interfaces when only loopback has an IPv4 address
reported by Ted Percival <ted@midg3t.net>.
Jeremy.
(This used to be commit ab06efccf3)
2008-08-19 17:30:30 -07:00
Simo Sorce
5e7655fa27 Split lookup_name() and create a new functiong called
lookup_domain_name(). This new function accept separated
strings for domain and name.
(This used to be commit 8594edf666)
2008-08-17 19:54:41 -04:00
Michael Adam
25f31194e5 Add modules_path() to construct paths to files in MODULESDIR.
Michael
(This used to be commit 5ef9da6f4f)
2008-08-15 23:19:57 +02:00
Michael Adam
f2d7c593b5 proto.h: remove prototypes from dynconfig.c
These are also in dynconfig.h and were originally added
by "make proto" by accident.

Michael
(This used to be commit 4fb69fe1ee)
2008-08-15 23:19:55 +02:00
Michael Adam
7871fa0b69 Put prototypes of modules/vfs_posixacl.c into new modules/vfs_posixacl.h.
Michael
(This used to be commit 876f679343)
2008-08-14 11:22:48 +02:00
Michael Adam
805bd92973 smbd/conn: fix prototype change of conn_close_all() in proto.h.
(Cleaning "ensure we exit with non-zero status on EOF on socket"
 after rebasing to v3-3-test which has no "make proto" anymore.)

Michael
(This used to be commit a958c6bf1e)
2008-08-13 11:54:12 +02:00
Volker Lendecke
8d25729705 Fix prototypes
(This used to be commit 8b9d127146)
2008-08-12 11:28:29 +02:00
Michael Adam
33e3e94e0c nmbd_packets: make queue_packet() public.
Michael
(This used to be commit 363eb90ce8)
2008-08-09 01:15:58 +02:00
Michael Adam
bf291c95bc loadparm: add two parameters "init logon delay hosts" and "init logon delay"
"init logon delays hosts" takes a list of hosts names or addresses
or networks for which the initial SAMLOGON reply should be delayed
(so other DCs get preferred by XP workstations if there are any).
This option takes the same type of list as "hosts allow" does.

"init logon delay" allows one to configure the delay for the hosts
configured for delayed initial samlogon with "init logon delayed hosts".
The value is interpreted as milliseconds. The default value is 100.

This commit only introduces the parameters.
They will be activated in a subsequent commit.

Michael
(This used to be commit f7c1f85438)
2008-08-09 01:15:58 +02:00
Michael Adam
e0fa472a3b lib/access: make list_match() public.
Michael
(This used to be commit 742bedce41)
2008-08-09 01:15:58 +02:00
Michael Adam
f07cfe3b68 lib/access: make client_match() public.
Michael
(This used to be commit 1b2dec93b6)
2008-08-09 01:15:57 +02:00
Tim Prouty
097b27dbcc Enabled domain groups to be added to builtin groups at domain join time
Previously this was done at token creation time if the Administrators and Users
builtins hadn't been created yet.  A major drawback to this approach is that if
a customer is joined to a domain and decides they want to join a different
domain, the domain groups from this new domain will not be added to the
builtins.

It would be ideal if these groups could be added exclusively at domain join
time, but we can't rely solely on that because there are cases where winbindd
must be running to allocate new gids for the builtins.  In the future if there
is a way to allocate gids for builtins without running winbindd, this code
can be removed from create_local_nt_token.

- Made create_builtin_users and create_builtin_administrators non-static so
they can be called from libnet
- Added a new function to libnet_join that will make a best effort to add
domain administrators and domain users to BUILTIN\Administrators and
BUILTIN\Users, respectively.  If the builtins don't exist yet, winbindd must be
running to allocate new gids, but if the builtins already exist, the domain
groups will be added even if winbindd is not running.  In the case of a
failure the error will be logged, but the join will not be failed.
- Plumbed libnet_join_add_dom_rids_to_builtins into the join post processing.
(This used to be commit e92faf5996)
2008-07-30 14:06:36 -07:00
Günther Deschner
21a8177ed2 rpc_client: add init_samr_CryptPasswordEx and init_samr_CryptPassword.
Guenther
(This used to be commit 87b6aac135)
2008-07-30 16:42:23 +02:00
Volker Lendecke
49403ee82f Make create_conn_struct() public
(This used to be commit e115e25822)
2008-07-27 17:56:48 +02:00
Volker Lendecke
33cbe2f88c make read/write to internal pipes available externally
(This used to be commit e11b5cb1e0)
2008-07-26 13:20:10 +02:00
Volker Lendecke
1ee37bc9c3 Refactor make_internal_rpc_pipe_p: connection_struct is not needed
(This used to be commit defcf0eecf)
2008-07-26 13:20:10 +02:00
Volker Lendecke
042600cbac Make api_rpcTNP static to srv_pipe.c
(This used to be commit 256c93a8b3)
2008-07-26 11:25:24 +02:00
Volker Lendecke
da6e4248ee Make idl: cli_do_rpc_ndr does not use pipe_idx anymore
(This used to be commit ffd2ff5325)
2008-07-21 14:36:31 +02:00
Volker Lendecke
a20c498310 Remove unused function rpccli_is_pipe_idx
(This used to be commit 287ffc17a0)
2008-07-21 14:36:31 +02:00
Volker Lendecke
303f98af2f Remove now unused cli_get_pipe_name
(This used to be commit ed4a447103)
2008-07-21 14:36:30 +02:00
Volker Lendecke
346a8d1bdc Remove now unused cli_get_pipe_idx
(This used to be commit e02a550527)
2008-07-21 14:36:29 +02:00
Volker Lendecke
9664f24ecf Remove now unused cli_get_iface
(This used to be commit 2e60701e8d)
2008-07-21 14:36:28 +02:00
Volker Lendecke
798b56edae Refactoring: libnetapi_open_pipe takes an interface instead of pipe_idx
(This used to be commit 726e56c72f)
2008-07-21 14:36:27 +02:00
Volker Lendecke
55f84c05bd Refactoring: Change calling conventions for cli_rpc_pipe_open_krb5
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS
(This used to be commit f2656e5c2e)
2008-07-20 17:37:14 +02:00
Volker Lendecke
99526d391d Refactoring: Change calling conventions for cli_rpc_pipe_open_schannel
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS
(This used to be commit 1fcfca007f)
2008-07-20 17:37:14 +02:00
Volker Lendecke
52ff49600e Refactoring: Change calling conventions for cli_rpc_pipe_open_ntlmssp_auth_schannel
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS
(This used to be commit ff87127baf)
2008-07-20 17:37:13 +02:00
Volker Lendecke
ba2cb35ca5 Refactoring: Change calling conventions for cli_rpc_pipe_open_schannel_with_key
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS
(This used to be commit 78e9c937ff)
2008-07-20 17:37:13 +02:00
Volker Lendecke
b8fc15be95 Refactoring: Make get_schannel_session_key return NTSTATUS
(This used to be commit a0793cc853)
2008-07-20 17:37:12 +02:00
Volker Lendecke
e0be03d8d5 Refactoring: Change calling conventions for cli_rpc_pipe_open_ntlmssp
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS
(This used to be commit a13f059955)
2008-07-20 17:37:11 +02:00
Volker Lendecke
1335da2a7c Refactoring: Change calling conventions for cli_rpc_pipe_open_noauth
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS
(This used to be commit 9abc9dc4dc)
2008-07-20 17:37:11 +02:00
Volker Lendecke
2e7cb1a5cc Introduce is_known_pipename
This scans the list of pipes registered via rpc_pipe_register_commands instead
of using static tables.
(This used to be commit 283e603998)
2008-07-19 20:27:56 +02:00
Volker Lendecke
8e02cb17fe Ooops, GUID_equal was already around :-)
(This used to be commit 9a0bc277f2)
2008-07-19 19:50:36 +02:00
Günther Deschner
24f0f552de libads: add prototype for ads_connect_gc().
Guenther
(This used to be commit 0122e4941d)
2008-07-18 16:42:47 +02:00
Volker Lendecke
bcb652451b Simplify the RPC servers: remove get_pipe_fns
The per-server xxx_get_pipe_fns functions can go once all the RPC servers are
converted
(This used to be commit 6aa2391cbe)
2008-07-18 15:04:05 +02:00
Günther Deschner
6a3b742db7 util: add policy_hnd_equal().
Guenther
(This used to be commit 6aca163e89)
2008-07-17 10:32:03 +02:00
Volker Lendecke
e0f3ea2cbe In api_pipe_bind_req(), check for the iface id, not the pipe name
This requires to store the rpc_interface in "struct rpc_table"
(This used to be commit 654f8de849)
2008-07-16 23:19:48 +02:00
Volker Lendecke
e65ea7471e Add ndr_syntax_id_equal()
(This used to be commit 5fc90908de)
2008-07-16 23:19:48 +02:00
Jeremy Allison
24eec914c0 Fix swat. Bug #5613.
Jeremy
(This used to be commit 15920f8388)
2008-07-15 14:37:48 -07:00
Simo Sorce
02e592486f Make again idmap_init static
(This used to be commit e113b7c13f)
2008-07-12 21:40:28 -04:00
Volker Lendecke
622d36aa41 Revert "Make idmap_init() static"
This reverts commit c8d1bbfddc.
(This used to be commit 5cded3da00)
2008-07-11 17:53:26 +02:00
Volker Lendecke
d670d0a09b Revert "Remove gencache_[un]lock_entry"
This reverts commit 7a5a575ffe.
(This used to be commit 62e444dd50)
2008-07-11 17:53:25 +02:00
Volker Lendecke
b6dcc24987 Revert "Convert idmap_cache to gencache"
This reverts commit 0bf0434f22.
(This used to be commit cc53667773)
2008-07-11 17:53:24 +02:00
Volker Lendecke
ebb2d70a60 Revert "Make use of ADD_TO_ARRAY"
This reverts commit 81f334bd6d.
(This used to be commit d4d106776a)
2008-07-11 17:53:24 +02:00
Derrell Lipman
31262a59bc [BUG 5580] Allow access to DFS shares via libsmbclient
Brian Sheehan provided a nice patch intended for the 3.0 code base.  This
commit applies a similar patch for the 3.3 code base.  It adds a new public
function to libsmbclient -- smbc_set_credentials() -- that may be called from
the authentication callback when DFS referrals are in use.

Derrell
(This used to be commit 888f922bd0)
2008-07-08 20:44:39 -04:00
Volker Lendecke
ca34287063 Make use of ADD_TO_ARRAY
(This used to be commit 81f334bd6d)
2008-07-05 12:19:13 +02:00
Volker Lendecke
0234276af8 Convert idmap_cache to gencache
(This used to be commit 0bf0434f22)
2008-07-05 12:19:13 +02:00
Volker Lendecke
352b5c1857 Remove gencache_[un]lock_entry
Günther agreed that it might be unnecessary in dsgetdcname_cache_store() :-)
(This used to be commit 7a5a575ffe)
2008-07-03 16:40:46 +02:00
Volker Lendecke
1999791b7c Make idmap_init() static
This is called only from idmap_alloc_init, which feels kindof weird.

Digging deeper in the code...
(This used to be commit c8d1bbfddc)
2008-07-02 13:34:09 +02:00
Darshan Purandare
065760ede0 MSG_DEBUG now forwarded to all the winbindd children by parent.
smbcontrol winbindd debug level would only set the debug level of the
parent winbindd process and not the child processes. This patch adds
the functionality of broadcasting the debug message to all winbindd
children. Now the debug level message is propagated to all the winbindd
processes that includes parent and children.
(This used to be commit cfbcfc3ffe)
2008-07-01 17:52:24 -07:00
Volker Lendecke
cf9665016f Let send_trans_reply work on only the inbuf
It does not really need the whole smb_request
(This used to be commit d3facf4cbd)
2008-06-28 10:38:51 +02:00
Volker Lendecke
5cd8a42720 Factor out create_outbuf, creating an outbuf just given an inbuf
(This used to be commit 50427cbf63)
2008-06-28 10:38:51 +02:00
Gerald W. Carter
9ff1ffcbee libads: Add API call to connect to a global catalog server.
Extends ads_connect() to a new call ads_connect_gc() which connects on port
3268 rather than port 389.  Also makes ads_try_connect() static and
only used internally to ldap.c
(This used to be commit f4c37dbe2c)
2008-06-27 10:26:11 -04:00
Volker Lendecke
c885ae01eb Remove current_user reference from printfsp.c
(This used to be commit 510f45d01a)
2008-06-26 13:13:23 +02:00
Volker Lendecke
a3c0be6325 Change print_access_check to take auth_serversupplied_info instead of current_user
Reason: This is the main user of p->current_user which I would like to remove
(This used to be commit fd43059b3d)
2008-06-26 13:13:23 +02:00
Volker Lendecke
d331624fdf Add server_info to pipes_struct
(This used to be commit d621867bb8)
2008-06-26 13:13:22 +02:00
Günther Deschner
402733b518 rpc_client: add rpccli_samr_chgpasswd_user() call.
Guenther
(This used to be commit 10fd2baa83)
2008-06-25 23:58:50 +02:00
Günther Deschner
14d500c0e7 rename rpccli_samr_chgpasswd3 to rpccli_samr_chgpasswd_user3.
Guenther
(This used to be commit b1209a039b)
2008-06-25 23:58:50 +02:00
Günther Deschner
059293cbf4 rename rpccli_samr_chgpasswd_user to rpccli_samr_chgpasswd_user2.
Guenther
(This used to be commit 5b4650d56c)
2008-06-25 23:58:50 +02:00
Günther Deschner
92bd665aea rpc_client: let cli_get_session_key() return talloced session key.
Thanks, Volker, for pointing this out.

Guenther
(This used to be commit b47899195e)
2008-06-25 09:51:31 +02:00
Günther Deschner
07f06eec21 rpc_client: add cli_get_session_key().
Guenther
(This used to be commit 93b56755f7)
2008-06-24 23:47:58 +02:00
Günther Deschner
9a5fc5b5d3 crypto: add decrypt_drsuapi_blob from samba4.
Guenther
(This used to be commit 3b6352a60e)
2008-06-24 23:44:20 +02:00
Günther Deschner
7b1f015675 libads: add ads_connect_user_creds() that won't overwrite given user creds.
Guenther
(This used to be commit 026018c9f1)
2008-06-24 23:37:49 +02:00
Günther Deschner
33000d77e4 time: move uint64s_nt_time_to_unix_abs() to lib/time.c
Guenther
(This used to be commit 58f54f180f)
2008-06-23 23:38:52 +02:00
Volker Lendecke
13ebf889b3 Remove the "exists" parameter from create_msdfs_link
Jeremy, setting "exists" to True in _dfs_Add prevented the initial creation of
a new symlink for me, because the SMB_VFS_UNLINK failed. This also exists in
3.2. I only check it into 3.3 as I would like you to look at it first.

Thanks,

Volker
(This used to be commit f58b098a41)
2008-06-22 20:45:53 +02:00
Volker Lendecke
52664f62ba Remove current_user references from trans2.c
This involved replacing the CHECK_NTQUOTA_HANDLE_OK macro by a function.
(This used to be commit 5595cdf837)
2008-06-19 18:51:38 +02:00
Volker Lendecke
e40b6e296a Remove the "current_user" arg from fsp_belongs_conn
fsp_belongs_conn only used the vuid struct member anyway, and this is available
in the smb_request structure as well.
(This used to be commit 64e9372ab9)
2008-06-19 18:51:37 +02:00
Volker Lendecke
49ca8efa91 Remove the "current_user" arg from check_fsp
check_fsp only used the vuid struct member anyway, and this is available in the
smb_request structure as well.
(This used to be commit 8d364c4c33)
2008-06-19 18:51:37 +02:00
Michael Adam
b172eb1d47 file_access: remove unneeded stat buf parameter from can_access_file_acl().
This is a security descriptor level function only.

Michael
(This used to be commit 5931540fa1)
2008-06-17 23:58:49 +02:00
Günther Deschner
0447e6a0a7 libads: add ads_get_machine_kvno() to make ads_get_kvno() a bit more generic.
Guenther
(This used to be commit cb7ace209c)
2008-06-17 19:54:09 +02:00
Volker Lendecke
9c1f5894a5 Add forgotten protoypes
(This used to be commit dee60935d4)
2008-06-15 18:46:10 +02:00
Volker Lendecke
d49de28f11 Remove the current_user reference from fake_file.c
The current vuid is not only available there, it is also in the current
smb_request structure.
(This used to be commit c8fd5eef32)
2008-06-15 13:37:53 +02:00
Volker Lendecke
e252b0504a Add prototype for delete_negative_conn_cache
(This used to be commit 097446c3c8)
2008-06-07 08:16:23 +02:00
Günther Deschner
d4c5a1d504 util_str: add talloc_asprintf_strlower_m().
Guenther
(This used to be commit 7f8b0b4d15)
2008-06-04 01:35:43 +02:00
Günther Deschner
4f6ea219d6 build: fix the build (missing protoype for lp_ldap_connection_timeout()).
Guenther
(This used to be commit 06b597213a)
2008-06-03 20:41:29 +02:00
Jeremy Allison
d36434f312 Security fix for CVE-2008-1105: Boundary failure when parsing SMB responses
can result in a buffer overrun.
Jeremy.
(This used to be commit 23b825e9d2)
2008-05-28 09:31:42 -07:00
Michael Adam
af6e91e0b3 fix build: add missing prototype of msg_close_file()
Michael
(This used to be commit 1a6f91755c)
2008-05-28 01:10:54 +02:00
Michael Adam
22174515e1 fix the build after prototype change.
Michael
(This used to be commit d96634d037)
2008-05-28 01:10:54 +02:00
Günther Deschner
95d873ac1f build: Fix the build after prototype change.
Guenther
(This used to be commit 68327e577d)
2008-05-28 00:53:04 +02:00
Michael Adam
6cebad5b67 Remove unused function is_trusted_domain_situation().
This combined check has been replaced by is_dc_trusted_domain_situation()
which does not check for lp_allow_trusted_domains().

Michael
(This used to be commit 0a24c038b7)
2008-05-26 16:42:25 +02:00
Michael Adam
4de01a909a Add function is_dc_trusted_domain_situation().
This is like is_trusted_domain_situation() except that it does not
check for lp_allow_trusted_domains().

Michael
(This used to be commit a284c88435)
2008-05-26 16:42:24 +02:00
Volker Lendecke
5b237b8d30 Move ber_[read|write]_OID_String protypes to proto.h
(This used to be commit 2dbbd81677)
2008-05-25 13:53:43 +02:00
Volker Lendecke
320fadd8fc Remove the reference to current_user_info from share_access.c
This required to pass around the domain a bit
(This used to be commit 17b0db20d2)
2008-05-25 11:43:57 +02:00
Gerald W. Carter
4d2f71e53f Manually merge Steven Danneman's patch for SPNEGO auth to a trusted
Win2008 domain (merged from v3-0-test).

   commit 8dc4e97977
   Author: Steven Danneman <sdanneman@isilon.com>
   Date:   Wed May 7 13:34:26 2008 -0700

      spnego SPN fix when contacting trusted domains

      cli_session_setup_spnego() was not taking into consideration the situation
      where we're connecting to a trusted domain, specifically one (like W2K8)
      which doesn't return a SPN in the NegTokenInit.

      This caused two problems:

      1) When guessing the SPN using kerberos_get_default_realm_from_ccache() we
      were always using our default realm, not the realm of the domain we're
      connecting to.

      2) When falling back on NTLMSSP for authentication we were passing the name
      of the domain we're connecting to for use in our credentials when we should be
      passing our own workgroup name.

      The fix for both was to split the single "domain" parameter into
      "user_domain" and "dest_realm" parameters.  We use the "user_domain"
      parameter to pass into the NTLM call, and we used "dest_realm" to create an SPN
      if none was returned in the NegTokenInit2 packet.  If no "dest_realm" is
      provided we assume we're connecting to our own domain and use the credentials
      cache to build the SPN.

      Since we have a reasonable guess at the SPN, I removed the check that defaults
      us directly to NTLM when negHint is empty.
(This used to be commit b78b14c88e)
2008-05-23 16:01:45 -05:00
Michael Adam
a8045b1339 rpc_client: make rpc_pipe_open_tcp_port and rpc_pipe_get_tcp_port static.
Slim the interface...

Michael
(This used to be commit 9971118c23)
2008-05-22 11:30:04 +02:00
Michael Adam
b398a96b09 rpc_client: use endpoint mapper to get the port for rpc_pipe_open_tcp().
Michael
(This used to be commit f7db445c82)
2008-05-22 11:29:57 +02:00
Volker Lendecke
e8d25443c1 Add client support for NCACN_UNIX_STREAM
(This used to be commit 24ac40518f)
2008-05-21 23:35:25 +02:00
Volker Lendecke
78022953e7 rpccli_schannel_bind_data only needs the schannel key
(This used to be commit be5d54a363)
2008-05-21 23:35:25 +02:00
Tim Prouty
fb37f15600 Cleanup size_t return values in callers of convert_string_allocate
This patch is the second iteration of an inside-out conversion to cleanup
functions in charcnv.c returning size_t == -1 to indicate failure.
(This used to be commit 6b189dabc5)
2008-05-20 22:40:13 +02:00
Jeremy Allison
ce4145319e Remove conn_find_byname now it's no longer used in
the msdfs.c code.
Jeremy
(This used to be commit 54556df561)
2008-05-19 17:19:18 -07:00
Michael Adam
1ef69fcf21 build: freeze proto.h
Michael
(This used to be commit ff7f0cad2e)
2008-05-18 22:58:07 +02:00
Andrew Tridgell
15bf58b257 auto-build proto.h if its not there, but don't make it depend
on anything. Delete proto.h from CVS
(This used to be commit 8a37df73ec)
2001-06-22 02:33:27 +00:00
Jeremy Allison
3a6019b0eb Merging Gerry's spoolss changes.
Jeremy.
(This used to be commit 6b4a70cd82)
2001-06-21 17:46:14 +00:00
Andrew Tridgell
91b8a8d1d2 next_token() was supposed to be a reentrant replacement for strtok(),
but the code suffered from bitrot and is not now reentrant. That means
we can get bizarre behaviour
i've fixed this by making next_token() reentrant and creating a
next_token_nr() that is a small non-reentrant wrapper for those lumps
of code (mostly smbclient) that have come to rely on the non-reentrant
behaviour
(This used to be commit 674ee2f1d1)
2001-06-21 09:10:42 +00:00
Andrew Tridgell
4ff011d88e Added STR_NOALIGN flags to clistr and srvstr fns. Yes, NT actually does
send unaligned unicode strings sometimes!
Fixed our handling of the workgroup name tacked on the end of the
NT1 negprot response (a unaligned unicode)
fixed a couple of places where we should be using the message_end fns instead
of pre-calculated buffer lengths
(This used to be commit 86613493a9)
2001-06-21 05:38:28 +00:00
Simo Sorce
82970b833c initial support for paramter type P_LIST
it will avoid problems with lists being longer than 1024 bytes
just now only ip list parameters have been converted to the new type
(hosts allow, hosts deny, ssl hosts, ssl hosts resign)
(This used to be commit e1572f85d6)
2001-06-20 16:54:32 +00:00
Tim Potter
567612291e make proto
(This used to be commit d0b37d1a62)
2001-06-20 07:13:55 +00:00
Andrew Tridgell
fcda2645f0 added a close-share smbcontrol message that forcibly closes a share in smbd (to allow unmount)
(This used to be commit 15b17a80db)
2001-06-20 03:05:09 +00:00
Jeremy Allison
9203386063 INFO_24 sometimes has a 2 byte length, sometimes doesn't. Safer to not
depend on it...
Jeremy.
(This used to be commit 0fe11c329f)
2001-06-19 19:56:06 +00:00
Jeremy Allison
809c025878 Added patches to remove Linux specific XFS ACLs. These are now handled by the
generic Linux ACL code.
rpc_server/srv_samr_nt.c: Don't delete a policy handle before it's created.
Jeremy.
(This used to be commit db5b82e53a)
2001-06-18 20:27:35 +00:00
Andrew Tridgell
e324e21457 added a oplock break handler hook to the client code, this allows for more complete testing of oplocks from smbtorture and would also be essential if a client app ever really did want to use oplocks properly
(This used to be commit 3d4a3bfacd)
2001-06-18 08:26:15 +00:00
Tim Potter
7b01c627c6 Removed silly Get_Hostbyname() wrapper as DNS names are case-insensitive
and the use of this function only increased timeouts when Samba queries
a broken DNS server.
(This used to be commit 720fea5360)
2001-06-18 05:42:18 +00:00
Jeremy Allison
af604fe769 Modified version of Jim's 0x27 and 0x28 Win9x Secdesc patch.
Jeremy.
(This used to be commit 5690ec77c8)
2001-06-16 00:32:13 +00:00
Jeremy Allison
438e89b187 Jim McDonough's parse patches for Win9x get SD calls.
Jeremy.
(This used to be commit bc366f3153)
2001-06-15 20:08:12 +00:00
Tim Potter
2b49ec356a Prototype update.
(This used to be commit 402639926f)
2001-06-15 07:22:27 +00:00
Tim Potter
f81489d02d Oops - proto.h contained junk from another workarea.
(This used to be commit 2ad921d126)
2001-06-13 06:54:45 +00:00
Tim Potter
5eee0f1968 Added some msdfs client routines.
(This used to be commit 13df2304b3)
2001-06-13 06:37:02 +00:00
Jeremy Allison
8209eda774 Make message receive fn static.
Jeremy.
(This used to be commit d8807b1922)
2001-06-13 01:08:27 +00:00
Jeremy Allison
a80a96b745 Added sys_acl_delete_def_file() - needed as part of NT ACL editing fix.
Will add changes for other supported ACL systems shortly (Herb, I may
need help with the IRIX one).
Jeremy.
(This used to be commit a8532b193d)
2001-06-08 19:29:57 +00:00
Jeremy Allison
3414c71f6d Extra stuff for large readwrite support.
Jeremy.
(This used to be commit 4338ee78c3)
2001-06-08 03:02:34 +00:00
Tim Potter
1dfbc939d3 Prototypes update.
(This used to be commit 6dfe98f602)
2001-06-06 07:29:12 +00:00
Tim Potter
9ebe63bf79 Update prototype file.
(This used to be commit bdb76938e2)
2001-06-02 23:03:18 +00:00
Tim Potter
26bc8adcaa Oops.
(This used to be commit 9e1d9a3a44)
2001-06-01 12:11:33 +00:00
Andrew Tridgell
ff1dd1721d new proto.h
(This used to be commit 823ba34342)
2001-05-30 06:16:24 +00:00
Simo Sorce
bbf5ea221a 4 new functions to retrieve single linked list of group and passwd entries
+ a fix to an infinite loop in srv_samr_nt.c caused by misuse of
setgrent/getgrent/endgrent solved by these new functions
(This used to be commit 97dbb54a13)
2001-05-29 07:34:01 +00:00
Jeremy Allison
15e66ba37a Added tdb_change_int_atomic() to allow atomic updates of a tdb int value.
Jeremy.
(This used to be commit cf5015f159)
2001-05-25 00:48:28 +00:00
Tim Potter
3dfb0d3bd9 Added structures for LOGON_CTRL rpc.
Make proto.
(This used to be commit 0650f87000)
2001-05-24 08:21:53 +00:00
Jeremy Allison
faa0bef196 Defensive brlock and locking database cleaning code.
Jeremy.
(This used to be commit d7aa42e459)
2001-05-22 20:35:48 +00:00
Gerald Carter
a8f8d81d54 make proto
(This used to be commit 97a88ca86b)
2001-05-18 04:12:19 +00:00
Jeremy Allison
c912d04389 Fix the W2KSP2 joining a Samba domain problem.
Jeremy.
(This used to be commit 6bbcab5e48)
2001-05-18 01:30:21 +00:00
Andrew Tridgell
8d9aadc2bc ran make proto
(This used to be commit 2e605e1275)
2001-05-17 11:29:54 +00:00
Richard Sharpe
43680ebeae Ran a make proto to fix the problems ...
(This used to be commit 7b275b4588)
2001-05-17 11:20:45 +00:00
Tim Potter
e522cebeb9 make proto
(This used to be commit 607db8d57d)
2001-05-14 04:11:31 +00:00
Jeremy Allison
495aa4c28a string_hash() should be static. hash_clear() should be void.
Jeremy.
(This used to be commit e8ab89fbc0)
2001-05-12 20:15:39 +00:00
Tim Potter
7a906cd02b make proto
(This used to be commit dd0c7a8a02)
2001-05-10 05:20:12 +00:00
Jeremy Allison
f5243954fa Made "security XXX" masks apply to ACL set. By default they have no effect.
Removed "restrict acl with mask" - redundent.
Jeremy.
(This used to be commit 0db8a61d71)
2001-05-10 01:03:44 +00:00
Tim Potter
b4944528d8 make proto
(This used to be commit 6d218c3e94)
2001-05-08 04:02:59 +00:00
Gerald Carter
495f6e6787 merge from 2.2 removing the 'domain XXX' parameters.
(This used to be commit 9aefc86e35)
2001-05-07 22:10:38 +00:00
Gerald Carter
30c4c04c2f Patch from Simo:
o sed 's/pdb_clear_sam/pdb_free_sam/g'
  o add pdb_reset_sam()
  o password changing should be ok now as well.
(This used to be commit 96d0e7c330)
2001-05-07 14:04:46 +00:00
Andrew Tridgell
c2887d57b5 rebuild proto.h
(This used to be commit 2e20734474)
2001-05-07 04:10:40 +00:00
Jean-François Micouleau
f35157f392 Big cleanup of passdb and backends.
I did some basic tests but I have probably broken something. Notably the
password changing. So don't cry ;-)

	J.F.
(This used to be commit a4a4c02b12)
2001-05-04 15:44:27 +00:00
Gerald Carter
e62b35ac69 make proto
(This used to be commit 09b287e178)
2001-05-04 14:01:54 +00:00
Tim Potter
6fb863c3f8 make proto
(This used to be commit a56badc206)
2001-05-04 07:36:51 +00:00