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

2398 Commits

Author SHA1 Message Date
Andreas Schneider
15f64af8e3 s3-rpc: Create a file with all functions for a internal named pipe.
This makes it possible to use the samr rpc server in winbind without
linking in smbd.

Reviewed-by: Simo Sorce <idra@samba.org>
2010-06-04 12:12:50 -04:00
Günther Deschner
84a8f0451d s3-build: only include generated spoolss headers (not ndr headers).
Guenther
2010-06-03 11:00:27 +02:00
Günther Deschner
bcd4077be6 s3: remove unused librpc/ndr/sid.c.
Guenther
2010-06-03 01:07:17 +02:00
Matthieu Patou
57ab910b6f s3: Allow previous password to be stored and use it to check tickets
This patch is to fix bug 7099. It stores the current password in the
 previous password key when the password is changed. It also check the
 user ticket against previous password.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-06-02 14:32:23 +02:00
Michael Adam
f702578f76 s3: remove unused prototype for lp_idmap_domains(). 2010-06-01 15:31:48 +02:00
Andrew Bartlett
a6e07c22a3 s3:auth Rename wksta_name -> workstation_name in auth_usersupplied_info 2010-06-01 17:11:25 +10:00
Andrew Bartlett
dfb206f47e s3:param Put 'server_role' functions in another file.
Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-06-01 17:11:24 +10:00
Andrew Bartlett
6d2e796f35 s3:param Add helper function to get at Gobals.iDomainMaster
This is needed for a future split out of the server_role code.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-06-01 17:11:24 +10:00
Simo Sorce
471ed70c49 s3:smbd map_username() doesn't need sconn anymore
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-05-31 18:21:29 +02:00
Simo Sorce
94bf9ce48a s3:smbd user_in_list() doesn't need sconn anymore
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-05-31 18:21:29 +02:00
Simo Sorce
7747dd82f7 s3:smbd user_in_network() doesn't need sconn anymore
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-05-31 18:21:29 +02:00
Andrew Bartlett
62708fbd1b s3:ntlmssp Move ntlmssp_sign.c from source3 to common code.
This needs a small re-arrangement of the supporting code.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-31 15:11:36 +02:00
Andrew Bartlett
d6fa371b92 s3:ntlmssp Use a TALLOC_CTX for ntlmssp_sign_packet() and ntlmssp_seal_packet()
This ensures the results can't be easily left to leak.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-31 15:11:27 +02:00
Andrew Bartlett
723ea68d3b s3:auth Remove AUTH_NTLMSSP_STATE typedef.
typedefs are no longer preferred Samba style.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-31 15:10:44 +02:00
Andrew Bartlett
3b706865f6 s3:auth Make AUTH_NTLMSSP_STATE a private structure.
This makes it a little easier for it to writen in terms of GENSEC in future.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-31 15:10:33 +02:00
Volker Lendecke
2e4c41431e s3: Don't announce readraw and writeraw with the async echo responder 2010-05-31 12:04:28 +02:00
Günther Deschner
fbb7814f91 s3: only use netlogon/nbt header when needed.
Guenther
2010-05-31 11:32:37 +02:00
Michael Adam
7426cf4306 s3: remove prototype of non-existsing function idmap_tdb_tdb_close(). 2010-05-31 10:30:15 +02:00
Andrew Bartlett
d266f8fdf1 s3:lib s3:lib move get_global_sam_name to util_names.c
This doesn't really belong in util_sid.c, and has much more in common
with the other functions in util_names.c

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-05-28 18:08:28 +02:00
Andrew Bartlett
539ef13bfe s3:lib split out global workgroup and netbios name functions.
Having these in their own file allows easier selective inclusion.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-05-28 18:08:27 +02:00
Andreas Schneider
93ac516e15 s3-auth: Added a function to get the server_info from the system user.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-28 14:31:39 +02:00
Günther Deschner
38d69ca547 s3-build: remove duplicate ndr_krb5pac.h inclusion.
Guenther
2010-05-28 02:49:37 +02:00
Günther Deschner
30eeb1e3d9 s3-rpc_client: move protos to init_netlogon.h
Guenther
2010-05-28 02:49:36 +02:00
Simo Sorce
2a6a696e32 s3:auth add function to convert wbcAuthUserInfo to netr_SamInfo3
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-28 01:20:09 +02:00
Simo Sorce
6713f3d945 s3:auth add function to copy a netr_SamInfo3 structure
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-28 00:55:27 +02:00
Simo Sorce
605cfef56c s3:auth: add function to convert samu to netr_SamInfo3
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-28 00:55:17 +02:00
Stefan Metzmacher
9a6636a56e s3:rpc_server: pass down local and remote tsocket_address to np_open()
metze
2010-05-27 07:13:56 +02:00
Stefan Metzmacher
9a77cb247d s3:rpc_server: add np_read_in_progress() function
metze
2010-05-27 07:13:53 +02:00
Günther Deschner
2807ab358e s3-samr: move chgpasswd.c out of smbd and into the samr server.
Guenther
2010-05-26 22:17:02 +02:00
Günther Deschner
14b03d132b s3-smbd: remove unused change/check_lanman_password.
Guenther
2010-05-26 22:16:43 +02:00
Simo Sorce
8aa96566a9 s3-rpc_server: Created a per connection spoolss pipe.
This way all code can reuse the same connection to spoolss
and not have to deal with the creation of a new pipe all over the
code every time we need to ask a service off spoolss.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-26 15:07:57 +02:00
Andrew Bartlett
cba7f8b827 s3:dom_sid Global replace of DOM_SID with struct dom_sid
This matches the structure that new code is being written to,
and removes one more of the old-style named structures, and
the need to know that is is just an alias for struct dom_sid.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21 10:39:59 +02:00
Andrew Bartlett
a92b653af9 s3:passdb Remove use of uint8 uint16 and uint32 in favour of C99 types
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21 10:24:55 +02:00
Jeremy Allison
a8a4fe0605 Fix bug #7410 - samba sends "raw" inode number as uniqueid with unix extensions.
Move to a consistent get_FileIndex() function for all inode returns,
that checks if st_dev on the file is identical to the top directory
dev_t of the exported share, and if so uses the raw 64-bit inode
number. If it isn't (we've traversed a mount point) - return what
we used to do for Windows which is the concatination of the bottom
32-bits of the inode with the 32-bit device number. We can get more
creative with this over time (hashing?) if we want as now all inode returns go
through this single function.

Jeremy.
2010-05-20 11:36:47 -07:00
Günther Deschner
e4bdb7e00e s3-libads: add ads_set_sasl_wrap_flags().
Guenther
2010-05-20 18:45:59 +02:00
Günther Deschner
764cde5190 s3-build: add missing prototype for regtype_by_string().
Guenther
2010-05-20 13:54:08 +02:00
Jeremy Allison
572e5dec1b Implement missing info level SMB_FILE_LINK_INFORMATION.
Fix bug #7435 - SMB2 hardlink fails (invalid level).
Found at the Microsoft plugsharing plugfest.

Jeremy.
2010-05-18 18:34:54 -07:00
Günther Deschner
f6f3bb1813 s3-passdb: move get_logon_hours_from_pdb() into samr server.
Guenther
2010-05-18 21:43:05 +02:00
Günther Deschner
8478770c35 s3-rpc_client: move protos to init_samr.h
Guenther
2010-05-18 21:42:57 +02:00
Günther Deschner
5a6f3a0666 s3-rpc_client: move protos to init_spoolss.h
Guenther
2010-05-18 21:42:48 +02:00
Günther Deschner
cc06133b0a s3-rpc_client: move protos to cli_spoolss.h
Guenther
2010-05-18 21:42:45 +02:00
Günther Deschner
230b880d14 s3-rpc_client: move protos to cli_lsarpc.h
Guenther
2010-05-18 21:42:41 +02:00
Günther Deschner
5ed3654112 s3-rpc_client: move protos to cli_netlogon.h
Guenther
2010-05-18 21:42:37 +02:00
Günther Deschner
3f2719c202 s3-rpc_client: move protos to cli_samr.h
Guenther
2010-05-18 21:42:32 +02:00
Andrew Bartlett
7a8e34fe86 s3:split secrets.c to put machine account secrets in a new file
This helps the s3compat effort by allowing these functions to be
replaced by functions that query the cli_credentials and secrets.ldb
APIs.

Also, this changes a couple of DOM_SID to struct dom_sid along the
way.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18 21:39:42 +02:00
Simo Sorce
d6a73ad85b s3-spoolss: Removed the Phantom DeviceMode.
This was a hack that required a special client from HP.
The client code has never been released and was discontinued,
so this code was just dead weight.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18 15:52:28 +02:00
Andreas Schneider
7d363b8922 s3-spoolss: Create a spoolss_map_to_os2_driver function.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18 15:17:23 +02:00
Günther Deschner
7f6bb48bdf s3-secdesc: remove "typedef struct security_descriptor SEC_DESC".
Guenther
2010-05-18 12:30:12 +02:00
Günther Deschner
8951c8301a s3-secdesc: remove "typedef struct security_acl SEC_ACL".
Guenther
2010-05-18 12:30:12 +02:00
Günther Deschner
a8b01d1f3b s3-secdesc: remove "typedef struct security_ace SEC_ACE".
Guenther
2010-05-18 12:30:11 +02:00
Günther Deschner
8bc9c343c4 s3-secdesc: remove "typedef struct sec_desc_buf SEC_DESC_BUF".
Guenther
2010-05-18 12:30:11 +02:00
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
Jeremy Allison
285b628327 Plumb in krb5 to the SMB2 sessionsetup code. First cut of this code.
Jeremy.
2010-05-17 18:22:19 -07:00
Günther Deschner
fe31b67d5e s3-registry: only include registry headers when really needed.
Guenther
2010-05-18 01:15:38 +02:00
Günther Deschner
26c844902c s3-samr: move samr helper prototypes outside of proto.h
Guenther
2010-05-18 00:44:27 +02:00
Günther Deschner
3d5972c43f s3-libgpo: move group policy protos to where they belong.
Guenther
2010-05-17 21:07:17 +02:00
Günther Deschner
e3bdff3d67 s3-kerberos: pass down kdc_name to create_local_private_krb5_conf_for_domain().
Guenther
2010-05-17 12:47:50 +02:00
Simo Sorce
348b4b9bab Make pcap headers private
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-14 14:15:08 +02:00
Simo Sorce
f36396f90f Move standard printcap parsing to print_standard.c
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-14 14:14:55 +02:00
Andrew Bartlett
454b0b3f20 s3:kerberos Return PAC_LOGON_INFO rather than the full PAC_DATA
All the callers just want the PAC_LOGON_INFO, so search for that in
ads_verify_ticket(), and don't bother the callers with the rest of the
PAC.

This change makes sense on it's own (removing boilerplate wrappers
that just confuse the code), but it also makes it much easier to
implement a matching ads_verify_ticket() function in Samba4 for the
s3compat proposal.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-11 22:52:37 +02:00
Günther Deschner
8a2a8217f8 s3-proto: add missing protoype for dcerpc_fault_to_nt_status().
Guenther
2010-05-09 23:47:56 +02:00
Simo Sorce
3c1e9a8c33 s3-spoolss: Make spoolss_Time_to_time_t public.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-09 23:33:40 +02:00
Günther Deschner
b83ab96b16 s3-passdb: moving account_pol.c into passdb.
Guenther
2010-05-08 01:45:27 +02:00
Jeremy Allison
adf4833792 This patch looks bigger than it is. It does 2 things. 1). Renames smbpid -> smblctx in our locking code. 2). Widens smblctx to 64-bits internally. Preparing to use the SMB2 handle as the locking context.
Jeremy.
2010-05-07 06:20:50 -07:00
Jeremy Allison
4ad1943d29 Make us pass all SMB2 lock tests except MULTIPLE-UNLOCK and CONTEXT. Them next :-).
Jeremy.
2010-05-07 01:20:26 -07:00
Günther Deschner
049416c285 s3-spoolss: make several notify functions static.
Guenther
2010-05-06 13:41:51 +02:00
Günther Deschner
d2d7174394 s3-eventlog: move all eventlog headers to lib/eventlog and only include where required.
Guenther
2010-05-06 13:41:51 +02:00
Günther Deschner
c6ebab846d s3: only include gen_ndr headers where needed.
This shrinks include/includes.h.gch by the size of 7 MB and reduces build time
as follows:

ccache build w/o patch
real    4m21.529s
ccache build with patch
real    3m6.402s

pch build w/o patch
real    4m26.318s
pch build with patch
real    3m6.932s

Guenther
2010-05-06 00:22:59 +02:00
Andreas Schneider
66f7699511 s3-spoolss: Added a generic spoolss_create_default_secdesc function.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-05 18:16:23 +02:00
Andreas Schneider
b2ea8fbcce s3-spoolss: Added a function to create a default spoolss_DeviceMode.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-05 18:08:56 +02:00
Andreas Schneider
6683b0d4b6 s3-lib: Create a sec_desc_merge and sec_desc_merge_buf function.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-04 19:37:39 +02:00
Jeremy Allison
f4092ecec7 Plumb the SMB2 front end into the blocking lock backend.
Metze, you'll probably be happier with this work as it
doesn't abuse tevent in the way you dislike. This is a
first cut at the code, which will need lots of testing
but I'm hoping this will give people an idea of where I'm
going with this.

Jeremy.
2010-04-30 21:03:20 -07:00
Jeremy Allison
e90444319c Carefully label SMB1-specific locking calls.
Jeremy.
2010-04-29 17:08:12 -07:00
Jeremy Allison
ac09506d36 Connect set security descriptor into SMB2 code.
Jeremy.
2010-04-28 14:13:22 -07:00
Günther Deschner
1691eb73da s3-spoolss: add support for SetJobInfo level 1 (for jobfile rename).
Guenther
2010-04-28 00:10:40 +02:00
Günther Deschner
2b7002f385 s3-lanman: remove unsupported print_job_set_place().
Guenther
2010-04-28 00:10:40 +02:00
Günther Deschner
6864828d9d s3: use shared registry functions.
Guenther
2010-04-27 16:42:15 +02:00
Jeremy Allison
a94a4b788c Plumb in get_nt_acl into SMB2.
Jeremy.
2010-04-26 20:11:59 -07:00
Günther Deschner
7259762909 s3: use generated rap header.
Guenther
2010-04-26 22:52:59 +02:00
Jeremy Allison
2bbb8c917e Allow smb2 create requests to be cancelled.
Jeremy.
2010-04-23 13:10:15 -07:00
Simo Sorce
8f56cdfaee s3-spoolss: Move info_ctr conversion to a public helper.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-04-23 16:23:49 +02:00
Andreas Schneider
d65485b3c5 s3-spoolss: Use const values for notify functions.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-04-23 16:06:51 +02:00
Andreas Schneider
3f1cc29814 s3-time: Added a function to get the startup time of the server.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-04-23 16:06:42 +02:00
Jeremy Allison
8f67f873ac Make deferred opens (NT_STATUS_SHARING_VIOLATION) work over SMB2.
Makes SMB2Create call re-entrant internally.
Now this infrastructure is in place, oplocks will follow shortly.
Tested with Win7 client and with W2K8R2.

Jeremy.
2010-04-22 23:52:19 -07:00
Volker Lendecke
5fc2801c09 s3: Cache the username map in gencache
This is for uses with a heavy-weight username map script
2010-04-13 09:30:06 +02:00
Jeremy Allison
7984243768 Move to using 64-bit mid values in our internal open file database.
This will allow us to share logic much easier between SMB1 and SMB2
servers.

Jeremy
2010-04-12 21:40:28 -07:00
Volker Lendecke
b1a27e81d7 s3: Apply some const 2010-04-12 21:42:54 +02:00
Volker Lendecke
b8829e74fd s3: Move [make|free]_user_info to auth/user_info.c 2010-04-11 22:59:47 +02:00
Volker Lendecke
2b1a50c2e5 s3: Move sanitize_username to lib/util_str.c 2010-04-11 22:59:47 +02:00
Volker Lendecke
80708b75f8 s3: Move make_server_info to auth/server_info.c 2010-04-11 22:59:46 +02:00
Volker Lendecke
04f9e33de1 s3: Make check_sam_security public 2010-04-11 22:59:46 +02:00
Jeremy Allison
e15939b456 Plumb SMB2 stubs into all the places we defer SMB1 operations.
Rename functions to be internally consistent. Next step is
to cope queueing single (non-compounded) SMB2 requests to
put some code inside the stubs.

Jeremy.
2010-04-09 19:26:34 -07:00
Günther Deschner
63b111bd32 s3: add iconv_convenience handle to pull/push sz helpers.
Guenther
2010-04-09 18:33:45 +02:00
Jeremy Allison
3587815595 Fix bug #7339 - MSDFS is non-functional in 3.5.x
In the refactoring around filename_convert, the split between the functions
resolve_dfspath() and resolve_dfspath_wcard() was lost, leaving us only with
resolve_dfspath_wcard().

Internally resolve_dfspath_wcard() calls dfs_redirect() only with a
"allow_wcards" flag of true, wheras the old resolve_dfspath() would call with a
value of false. The loss of this case causes dfs_redirect to always masquerade
DFS links as directories, even when they are being queried directly by a trans2
QPATHINFO call. We should only masquerade DFS links as directories when called
from a SMBsearch or trans2 findfirst/findnext - which was the intent of the
"allow_wcards" flag.

This patch adds back an allow_wcards bool parameter to
resolve_dfspath_wcard(). This bool is set from the state of the ucf_flags when
filename_convert() is called.

I will follow this up with a new smbclient-based torture test that will prevent
us from ever regressing our DFS support again.

Jeremy.
2010-04-08 20:32:36 -07:00
Jeremy Allison
9c410118cb Parameterize "smb2 max read", "smb2 max write", "smb2 max trans".
Set to 64k by default.

Jeremy.
2010-04-06 15:43:35 -07:00
Jeremy Allison
c75184b8a1 Fix issue with aio where r/w lock wasn't kept across aio read operations.
Change schedule_aio_read_and_X/schedule_aio_write_and_X to
return NTSTATUS. Move the grant and release of the lock into
the aio code.

Jeremy
2010-04-05 14:16:21 -07:00
Jeremy Allison
bf90969892 Move initialize_async_io_handler() inside of smbd/aio.c.
Call from actual aio read or write. No reason to call this globally on startup.

Jeremy.
2010-04-01 16:47:59 -07:00
Jeremy Allison
32c8feab5d Fix for bug #7233 - print fails with jobs >4GB from Win7 clients.
Contains for by Sebastian Kloska <oncaphillis@snafu.de>. Submitter
confirms this fixes the problem.

Jeremy.
2010-03-30 15:27:26 -07:00
Stefan Metzmacher
cac9981b1a s3:rpc_client: remove more unused code
metze
2010-03-29 18:11:20 +02:00
Stefan Metzmacher
4f41b53487 s3:rpc_client: add rpccli_is_connected()
metze
2010-03-29 18:11:16 +02:00
Stefan Metzmacher
d7bf30ef92 s3:libsmb: add cli_state_is_connected() function
metze
2010-03-29 18:11:15 +02:00
Volker Lendecke
cae4105c92 s3: Remove unused bitmap_[allocate|free] 2010-03-28 15:25:17 +02:00
Jeremy Allison
fac8ca52ad Fix bug #7240 - Net usershare is not case sensitive.
Updates usershare files in a backwards compatible way.
I don't intend to back port this fix to 3.5.x as it
depends on a version upgrade in the share_info.tdb share security database.

Jeremy.
2010-03-26 17:09:58 -07:00
Günther Deschner
3da91b786e s3-printing: avoid mixing cups backend code with nt_printing code in cups_pull_comment_location.
Guenther
2010-03-26 14:36:46 +01:00
Jeremy Allison
c79ca41baf Fix bug #7288 - SMB job IDs in CUPS job names wrong.
Based on a patch from Michael Karcher <samba@mkarcher.dialup.fu-berlin.de>.

I think this is the correct fix. It causes cups_job_submit to use
print_parse_jobid(), which I've moved into printing/lpq_parse.c (to allow the
link to work).

It turns out the old print_parse_jobid() was *broken*, in that the pjob
filename was set as an absolute path - not relative to the sharename (due to it
not going through the VFS calls).

This meant that the original code doing a strncmp on the first part of the
filename would always fail - it starts with a "/", not the relative pathname of
PRINT_SPOOL_PREFIX ("smbprn.").

This fix could fix some other mysterious printing bugs - probably the ones
Guenther noticed where job control fails on non-cups backends.

Guenther PLEASE CHECK !

Jeremy.
2010-03-25 17:36:47 -07:00
Volker Lendecke
ed189459b9 s3: Make sure our CLEAR_IF_FIRST optimization works for the notify tdbs
The notify tdb files are opened at tconX time, which leads to one fcntl lock
for CLEAR_IF_FIRST detection per smbd. This opens the tdbs in the parent and
holds it, so that tdb_reopen_all correctly catches the CLEAR_IF_FIRST bit.
2010-03-25 16:40:44 +01:00
Stefan Metzmacher
3b33fa72d6 s3:ntlmssp: use c99 types
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:57 +01:00
Stefan Metzmacher
2dfc78a41a s3:ntlmssp: remove unused ntlmssp_set_workstation()
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:56 +01:00
Stefan Metzmacher
8804dc1328 s3:ntlmssp: add const for *sig in ntlmssp_unseal_packet()
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:56 +01:00
Stefan Metzmacher
9172b4a0b1 s3:ntlmssp: make whole_pdu const for ntlmssp_[un]seal_packet()
Only data needs to be non-const.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:56 +01:00
Stefan Metzmacher
7d977da925 s3:ntlmssp: pass names and use_ntlmv2 to ntlmssp_client_start() and store them
Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:55 +01:00
Stefan Metzmacher
eb17809812 s3:ntlmssp: pass names to ntlmssp_server_start() and store them in ntlmssp_state
Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:54 +01:00
Stefan Metzmacher
533830543f s3:ntlmssp: make use of C99 types in ntlmssp_sign.c
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:54 +01:00
Stefan Metzmacher
845f9c01ed s3:librpc/rpc: move prototypes to dcerpc.h
metze
2010-03-23 18:44:31 +01:00
Jeremy Allison
7509b56b5f share_info.tdb could use non-canonicalized sharenames.
Fix this by moving canonicalization into lib/sharesec.c. Update the
db version to 3. Ensures we always find share names with security
descriptors attached.

Jeremy.
2010-03-22 15:57:31 -07:00
Volker Lendecke
70f9338bf2 s3: Add the "ctdb locktime warn threshold" parameter
This is mainly a debugging aid for post-mortem analysis in case a cluster file
system is slow.
2010-03-22 17:32:18 +01:00
Stefan Metzmacher
752240ccdc s3:param: add "async smb echo handler" option
This will enable an extra forked process that will reply
to SMBecho requests, while the main process is blocked by another
request.

metze
2010-03-22 17:15:12 +01:00
Stefan Metzmacher
0b7da43da0 s3:smbd: add an option to skip signings checks srv_check_sign_mac for trusted channels
metze
2010-03-22 17:15:10 +01:00
Volker Lendecke
b2f45f20b0 s3: Add "log writeable files on exit" parameter
This boolean option controls whether at exit time the server dumps a list of
files with debug level 0 that were still open for write. This is an
administrative aid to find the files that were potentially corrupt if the
network connection died.
2010-03-22 12:03:44 +01:00
Volker Lendecke
8195832c6c s3: file_walk_table -> files_forall
This is more in line with the rest of the Samba code, like connections_forall
etc.
2010-03-22 09:30:51 +01:00
Stefan Metzmacher
b82f168c3c s3:librpc: remove unused stuff
metze
2010-03-19 17:05:46 +01:00
Volker Lendecke
2b4ce9a73f s3: Make login_cache_write take a pointer 2010-03-16 22:35:41 +01:00
Volker Lendecke
276b1aa189 s3: Make login_cache_read take a pointer, avoid a malloc 2010-03-16 22:35:41 +01:00
Volker Lendecke
13a278c1b9 s3: Remove a typedef 2010-03-16 22:35:41 +01:00
Jeremy Allison
6b2358e15e Pass "connection_struct *conn" into functions that currently use "current_user.XXX"
Will allow me to replace them with accessor functions.

Jeremy.
2010-03-15 14:49:11 -07:00
Jeremy Allison
5d6610a215 Add accessor functions for current uid, gid, unix token, NT token and vuid.
Jeremy.
2010-03-15 14:49:06 -07:00
Jeremy Allison
4b85a0ea7f Rever e80ceb1d73 "Remove more uses of "extern struct current_user current_user;"."
As requested by Volker, split this into smaller commits.

Jeremy.
2010-03-15 14:48:54 -07:00
Jeremy Allison
a2be29dfa3 Missed a couple more uses of conn->server_info->ptok that need to be get_current_nttok(conn)
Centralize the root check into smb1_file_se_access_check()
so this is used by modules/vfs_acl_common.c also.

Jeremy.
2010-03-12 14:31:47 -08:00
Jeremy Allison
e80ceb1d73 Remove more uses of "extern struct current_user current_user;".
Use accessor functions to get to this value. Tidies up much of
the user context code. Volker, please look at the changes in smbd/uid.c
to familiarize yourself with these changes as I think they make the
logic in there cleaner.

Cause smbd/posix_acls.c code to look at current user context, not
stored context on the conn struct - allows correct use of these
function calls under a become_root()/unbecome_root() pair.

Jeremy.
2010-03-12 13:56:51 -08:00
Andrew Bartlett
4ab3e220c4 Move prototype to header of common code for set_sockaddr_port 2010-03-11 11:27:47 +11:00
Volker Lendecke
89c785c47a s3: Fix a long-standing problem with recycled PIDs
When a samba server process dies hard, it has no chance to clean up its entries
in locking.tdb, brlock.tdb, connections.tdb and sessionid.tdb.

For locking.tdb and brlock.tdb Samba is robust by checking every time we read
an entry from the database if the corresponding process still exists. If it
does not exist anymore, the entry is deleted. This is not 100% failsafe though:
On systems with a limited PID space there is a non-zero chance that between the
smbd's death and the fresh access, the PID is recycled by another long-running
process. This renders all files that had been locked by the killed smbd
potentially unusable until the new process also dies.

This patch is supposed to fix the problem the following way: Every process ID
in every database is augmented by a random 64-bit number that is stored in a
serverid.tdb. Whenever we need to check if a process still exists we know its
PID and the 64-bit number. We look up the PID in serverid.tdb and compare the
64-bit number. If it's the same, the process still is a valid smbd holding the
lock. If it is different, a new smbd has taken over.

I believe this is safe against an smbd that has died hard and the PID has been
taken over by a non-samba process. This process would not have registered
itself with a fresh 64-bit number in serverid.tdb, so the old one still exists
in serverid.tdb. We protect against this case by the parent smbd taking care of
deregistering PIDs from serverid.tdb and the fact that serverid.tdb is
CLEAR_IF_FIRST.

CLEAR_IF_FIRST does not work in a cluster, so the automatic cleanup does not
work when all smbds are restarted. For this, "net serverid wipe" has to be run
before smbd starts up. As a convenience, "net serverid wipedbs" also cleans up
sessionid.tdb and connections.tdb.

While there, this also cleans up overloading connections.tdb with all the
process entries just for messaging_send_all().

Volker
2010-03-10 16:07:10 +01:00
Jeremy Allison
c61c9c3a4c Fix for bug #7189 - Open txt files with notepad on samba shares creates problem.
Ensure we don't use any of the create_options for Samba private
use. Add a new parameter to the VFS_CREATE call (private_flags)
which is only used internally. Renumber NTCREATEX_OPTIONS_PRIVATE_DENY_DOS
and NTCREATEX_OPTIONS_PRIVATE_DENY_FCB to match the S4 code).
Rev. the VFS interface to version 28.

Jeremy.
2010-03-05 15:13:37 -08:00
Günther Deschner
7643afa70e s3-rpcclient: fix rpcclient after spoolss_GetPrinterData{Ex} IDL change.
Guenther
2010-03-05 15:18:00 +01:00
Volker Lendecke
d6a6872506 s3: Abstract access to sessionid.tdb, similar to conn_tdb.c 2010-03-01 17:53:22 +01:00
Volker Lendecke
8bebb380e8 s3: Add connections_forall_read()
In a cluster, this makes a large difference: For r/w traverse, we have to do a
fetch_locked on every record which for most users of connections_forall is just
overkill.
2010-03-01 14:51:34 +01:00
Volker Lendecke
5c40aa59d7 s3: Remove unused count_all_current_connections() 2010-02-28 20:45:21 +01:00
Volker Lendecke
d980268680 s3: Make connections_fetch_record() static 2010-02-24 16:11:03 +01:00
Simo Sorce
3b12c38ac0 s3:schannel streamline interface
Make calling schannel much easier by removing the need to explicitly open the
database. Let the abstraction do it instead.
2010-02-23 12:46:50 -05:00
Simo Sorce
61b7a24f16 s3 move the sitename cache in its own file 2010-02-23 12:46:26 -05:00
Volker Lendecke
752bffc53f s3: Consolidate server_id_self into the equivalent procid_self() 2010-02-23 15:30:00 +01:00
Volker Lendecke
8930a9c520 s3: Convert cli_qpathinfo_basic to use cli_trans() 2010-02-20 18:59:30 +01:00
Volker Lendecke
89e6a5263e s3: Add cli_smb()
This is a sync wrapper around cli_smb_send/cli_smb_recv. This is a hack to
speed up converting libsmb/ away from cli_send_smb/cli_receive_smb. Some
routines in libsmb/ are only called in one place in smbtorture for example,
where making it async right now is not worth it. With cli_smb_send/cli_smb_recv
in place, pushing the asynchronosity out one level is "just" boilerplate code
that is easy to do should it become necessary.
2010-02-20 18:59:29 +01:00
Jeremy Allison
a6f402ad87 Remove lp_safe_widelinks() -> convert to just lp_widelinks. Suggestion from Volker.
Create widelinks_warning(int snum) to cover the message needed in make_connection.

Jeremy.
2010-02-11 15:16:23 -08:00
Simo Sorce
5d92d969dd Introduce lp_safe_widelinks()
This way we avoid any chance that a configuration reload may turn
back on wide links when unix extensions are enabled.
2010-02-11 16:27:17 -05:00
Stefan Metzmacher
0140bc389d s3:nmbd: change "nmbd:bind explicit broadcast" into "nmbd bind explicit broadcast"
metze
2010-02-08 18:35:11 +01:00
Volker Lendecke
6e510b49c0 s3: Make cli_get_fs_volume_info() use cli_trans() 2010-02-07 12:29:25 +01:00
Volker Lendecke
c73ffb7280 s3: Remove some unused code 2010-02-07 12:29:25 +01:00
Volker Lendecke
dcc850e3b3 s3: Make guest_user_info() static 2010-02-05 21:11:17 +01:00
Matt Kraai
a47b6ebb30 Change uint_t to unsigned int in source3
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:18 +01:00
Jeremy Allison
687e4eba3c Fix bug #7079 - cliconnect gets realm wrong with trusted domains.
Passing NULL as dest_realm for cli_session_setup_spnego() was
always using our own realm (as for a NetBIOS name). Change this
to look for the mapped realm using krb5_get_host_realm() if
the destination machine name is a DNS name (contains a '.').
Could get fancier with DNS name detection (length, etc.) but
this will do for now.

Jeremy.
2010-01-30 19:24:28 -08:00
Volker Lendecke
21ec6a6cbd s3: Add -C (--use-ccache) to popt_common_credentials 2010-01-24 20:32:17 +01:00
Volker Lendecke
dbf9017a80 s3: Remove string_sid_talloc
All but one call were pointless, so I think this API should go
2010-01-23 14:35:37 +01:00
Volker Lendecke
33e397f9fd s3: Make "init_smb_request" static to process.c 2010-01-21 14:08:27 +01:00
Volker Lendecke
24d4433bd7 s3: Move "yesno" to the only place where it is used: client.c 2010-01-21 12:58:11 +01:00
Volker Lendecke
50b7a3233f s3: Remove unused samr_make_sam_obj_sd 2010-01-10 20:56:16 +01:00
Volker Lendecke
081573091b s3: Remove the typedef for "auth_serversupplied_info" 2010-01-10 20:56:16 +01:00
Volker Lendecke
9bb4766bba s3: Remove the typedef for "auth_usersupplied_info" 2010-01-10 20:56:16 +01:00
Volker Lendecke
53a1ed9b6c s3: Factor password_in_history() out of check_passwd_history() 2010-01-07 11:07:55 +01:00
Björn Jacke
c5f24c3eac s3:lib/time: remoce null_mtime() - use null_time() 2010-01-07 00:49:57 +01:00
Björn Jacke
c1c7b6cecb s3:lib/time: remove unused nt_time_equals
we have nt_time_equal doing the same in lib/util/
2010-01-07 00:49:49 +01:00
Bo Yang
36493bf2f6 s3: Fix infinite loop in NCACN_IP_TCP asa there is no timeout. Assume lsa_pipe_tcp is ok but network is down, then send request is ok, but select() on writeable fds loops forever since there is no response.
Signed-off-by: Bo Yang <boyang@samba.org>
2010-01-06 19:19:35 +08:00
Volker Lendecke
37ac16a88f s3: Convert cli_ulogoff to the async API 2010-01-03 21:14:57 +01:00
Volker Lendecke
99f292479f s3: Convert cli_tdis to the async API 2010-01-03 21:14:57 +01:00
Stefan Metzmacher
05f7a86a99 s3:ntlmssp: remove unused ntlmssp_stored_response()
metze
2009-12-29 08:46:12 +01:00
Volker Lendecke
96207912cb s3: Remove unused delete_negative_conn_cache() 2009-12-24 15:24:35 +01:00
Volker Lendecke
ffab1a2318 s3: Remove unused flush_negative_conn_cache() 2009-12-24 15:24:35 +01:00
Jeremy Allison
3d85b1ebe5 The posix acl version of set_nt_acl() could set the stat_ex
struct in the fsp->fsp_name pointer incorrectly for a directory.

Fix this. Make map_canon_ace_perms() public.

Jeremy.
2009-12-23 17:17:48 -08:00
Andrew Bartlett
5b37cd23bf s3:ntlmssp: remove the typedef NTLMSSP_STATE
Andrew Bartlett
2009-12-22 21:07:53 +01:00
Jeremy Allison
74deee3cc9 Rename reply_doserror() -> reply_force_doserror().
Rewrite all calls to reply_nterror(NT_STATUS_DOS()) to
reply_force_doserror() and update the comment in smbd/error.c

Jeremy.
2009-12-21 11:16:38 -08:00
Jeremy Allison
69d26d25f7 reply_force_nterror() is not used anywhere. Remove it.
Jeremy.
2009-12-18 14:25:07 -08:00
Björn Jacke
f3205d31d6 s3: add prototype to fix the build 2009-12-10 23:21:01 +01:00
Günther Deschner
35c50dcce3 s3-spoolss: use driver level info8 everywhere in spoolss server internally.
Guenther
2009-12-08 11:05:21 +01:00
Jeremy Allison
91e0bdd86c Refactor reply_rmdir to use handle based code. All
calls are now handle based. Put rmdir into close.c
and make it private.
Jeremy.
2009-12-03 13:01:10 -08:00
Jeremy Allison
dfcc4115dd Remove unneeded argument from can_set_delete_on_close(). Ensure
can_set_delete_on_close() is correctly called before any setting
of the disposition bit (clean up the do_unlink() call).
Jeremy.
2009-12-02 18:06:40 -08:00
Jeremy Allison
365c6b4ce0 Restructure the ACL code some more, get the internal semantics
right. The previous bugs were due to the fact that get_nt_acl_internal()
could return an NTSTATUS error if there was no stored ACL blob, but
otherwise would return the underlying ACL from the filysystem. Fix
this so it always returns a valid acl if it can, and if it does not
its an error to be reported back to the client. This then changes
the inherit acl code. Previously we were trying to match Windows
by setting a minimal ACL on a new file that didn't inherit anything
from a parent directory. This is silly - the returned ACL wouldn't
match the underlying UNIX permissions. The current code will correctly
inherit from a parent if a parent has any inheritable ACE entries
that apply to the new object, but will return a mapping from the
underlying UNIX permissions if the parent has no inheritable entries.
This makes much more sense for new files/directories.
Jeremy.
2009-12-02 15:02:28 -08:00
Björn Jacke
95c1862610 s3: prefer posix_fallocate for doing "strict allocate"
posix_fallocate is more efficient than manual zero'ing the file. When
preallocation in kernel space is supported it's extremely fast. Support for
preallocation at fs layer via posix_fallocate and fallocate at kernel site
can be found in Linux kernel 2.6.23/glibc 2.10 with ext4, XFS and OCFS2. Other
systems that I know of which support fast preallocation in kernel space are
AIX 6.1 with JFS2 and recent Solaris versions with ZFS maybe UFS2, too.

People who have a system with preallocation in kernel space might want to set
"strict allocate = yes". This reduces file fragentation and it's also safer for
setups with quota being turned on.

As of today most systems still don't have preallocation in kernel space, and
that's why "strict allocate = no" will stay the default for now.
2009-12-02 21:21:43 +01:00
Volker Lendecke
69a68208bd s3: Restore "fake directory create times" as a share parameter 2009-11-29 11:22:05 +01:00
Volker Lendecke
36e8d8ed45 s3: Move directory_exist_stat to testparm.c, it only looks at the mode 2009-11-29 11:22:04 +01:00
Volker Lendecke
33601b8632 s3: Pass fake_dir_create_times down to file_exist_stat, none of the callers look at the mtime 2009-11-29 11:22:04 +01:00
Volker Lendecke
44ce5603dd s3: Pass the "fake dir create times" parameter to sys_*stat
Step 0 to restore it as a per-share paramter
2009-11-29 11:22:01 +01:00
Günther Deschner
3d679a3b5f s3-rpc: Avoid including every pipe's client and server stubs everywhere in samba.
Guenther
2009-11-26 20:03:17 +01:00
Günther Deschner
d4e06596d5 s3-registry: remove reg_pull_multi_sz().
Guenther
2009-11-24 15:47:59 +01:00
Jeremy Allison
4b8859840b Remove unused code.
Jeremy.
2009-11-23 18:00:36 -08:00
Michael Adam
63a801e5c9 s3:torture: move the torture-specific headers to new torture/torture.h
Michael
2009-11-23 23:51:07 +01:00
Volker Lendecke
a1a81ef785 Revert "s3: Make the implicit reference to Protocol in mask_match() explicit"
This reverts commit e23d8a3d1f.
2009-11-23 16:35:00 +01:00
Volker Lendecke
d6e55d8ec0 Revert "s3: Make the implicit reference to Protocol in mask_match_list() explicit"
This reverts commit 1e22899d26.
2009-11-23 16:35:00 +01:00
Volker Lendecke
5c4885a26b Revert "s3: Make the implicit reference to Protocol in is_in_path() explicit"
This reverts commit f7b4151a64.
2009-11-23 16:35:00 +01:00
Volker Lendecke
7930206f5c Revert "s3: Make the implicit reference to get_Protocol in lp_use_sendfile() explicit"
This reverts commit 6a14902297.
2009-11-23 16:34:59 +01:00
Volker Lendecke
0f8e2a6ebb Revert "s3: Move the global variable Protocol to struct smbd_server_connection"
This reverts commit c85a4c9ba4.
2009-11-23 16:34:59 +01:00
Günther Deschner
ec56895bde s3-printing: use spoolss types and structs while getting and deleting drivers.
Guenther
2009-11-23 12:19:11 +01:00
Günther Deschner
68cc1166d9 s3-printing: use spoolss types and structs while adding drivers.
Guenther
2009-11-23 12:19:04 +01:00
Volker Lendecke
384f303c2c s3: Remove a struct typedef 2009-11-21 23:19:50 +01:00
Volker Lendecke
cf2febf3d1 s3: Make alloc_sub_basic() static 2009-11-21 20:54:10 +01:00
Volker Lendecke
c85a4c9ba4 s3: Move the global variable Protocol to struct smbd_server_connection 2009-11-21 20:49:17 +01:00
Volker Lendecke
6a14902297 s3: Make the implicit reference to get_Protocol in lp_use_sendfile() explicit 2009-11-21 20:49:17 +01:00
Volker Lendecke
f7b4151a64 s3: Make the implicit reference to Protocol in is_in_path() explicit 2009-11-21 20:49:17 +01:00
Volker Lendecke
1e22899d26 s3: Make the implicit reference to Protocol in mask_match_list() explicit 2009-11-21 20:49:17 +01:00
Volker Lendecke
e23d8a3d1f s3: Make the implicit reference to Protocol in mask_match() explicit 2009-11-21 20:49:16 +01:00
Volker Lendecke
37e4e387db s3: Convert cli_get_fs_attr_info to the async API 2009-11-21 14:01:56 +01:00
Volker Lendecke
f0a933d140 s3: Cache brlock.tdb entries for the fast read&write strict locking code path
For a netbench run this gains around 2% user-space CPU, fetching a 100MB file
takes around 4% less.
2009-11-21 11:40:13 +01:00
Volker Lendecke
d3d37acb99 s3: Factor timeval_string out of current_timestring() 2009-11-19 19:04:38 +01:00
Volker Lendecke
f6650f5d19 s3: Do not talloc in readdir
This is a hot codepath (called from the stat cache)
2009-11-18 23:16:13 +01:00
Jeremy Allison
a770caed0f Remove "store create time" code, cause create time to be stored
in the "user.DOSATTRIB" EA. From the docs:
In Samba 3.5.0 and above the "user.DOSATTRIB" extended attribute has been extended to store
the create time for a file as well as the DOS attributes. This is done in a backwards compatible
way so files created by Samba 3.5.0 and above can still have the DOS attribute read from this
extended attribute by earlier versions of Samba, but they will not be able to read the create
time stored there. Storing the create time separately from the normal filesystem meta-data
allows Samba to faithfully reproduce NTFS semantics on top of a POSIX filesystem.
Passes make test but will need more testing.
Jeremy.
2009-11-17 14:55:02 -08:00
Jeremy Allison
a2a8dc515c Don't overwrite a dynamic pointer with the address of a stack
variable.
Jeremy.
2009-11-16 14:55:21 -08:00
Volker Lendecke
f4cf1c56a2 s3: Add min_setup, min_param and min_data to cli_trans_recv
Every caller that expects to receive something needs to check if enough was
sent. Make this check mandatory for everyone.

Yes, this makes the parameter list for cli_trans a bit silly, but that's just
the way it is: A silly protocol request :-)

While there, convert some _done functions to tevent_req_simple_finish_ntstatus.
2009-11-14 12:20:12 +01:00
Volker Lendecke
4a777ec4d7 Attempt to fix the s4 build -- we can not use map_nt_error_from_unix in lib/ 2009-11-14 11:32:38 +01:00
Volker Lendecke
f668e4104f s3: Convert cli_set_unix_extensions_capabilities_send to async 2009-11-14 11:03:28 +01:00
Michael Adam
30ab3a762e s3:passdb: remove the uid_to_rid method - we only need uid_to_sid
Michael
2009-11-14 01:28:50 +01:00
Volker Lendecke
f9ad5cd133 s3: Convert cli_unix_extensions_version to async 2009-11-13 09:30:30 +01:00
Jeremy Allison
5363d6e62c Ensure all callers to the rpc_client/cli_pipe functions correctly
initialize return variables.
Jeremy.
2009-11-12 13:56:33 -08:00
Jeremy Allison
a8769e6675 Second part of bugfix for 6865 - acl_xattr module: Has dependency that inherit acls = yes or xattrs are removed.
We also need dos filemode = true set as well.
Jeremy.
2009-11-11 18:35:18 -08:00
Volker Lendecke
2b75933960 s3: Convert libsmb/cli_message to the async API 2009-11-10 23:48:22 +01:00
Günther Deschner
46784b4d99 s3-chgpasswd: split out a check_password_complexity() function.
Guenther
2009-11-10 13:08:28 +01:00
Volker Lendecke
bb283af16f Revert "s3: Do not directly reference the ndr_table_* in rpcclient"
This reverts commit 70c698fd54.
2009-11-08 19:43:47 +01:00
Volker Lendecke
e181b88978 Revert "s3: Do not reference ndr_table_<pipe> in the cli_ routines directly"
This reverts commit daa964013b.
2009-11-08 19:43:47 +01:00
Volker Lendecke
27847e8386 Revert "s3: Consolidate getting the name out of a pipes_struct"
This reverts commit 9621306351.
2009-11-08 19:43:47 +01:00
Volker Lendecke
82c35e460e Revert "s3: Do not reference ndr_table when calling rpc_srv_register"
This reverts commit 494b2aff88.
2009-11-08 19:43:46 +01:00
Volker Lendecke
494b2aff88 s3: Do not reference ndr_table when calling rpc_srv_register 2009-11-08 13:12:15 +01:00
Volker Lendecke
9621306351 s3: Consolidate getting the name out of a pipes_struct 2009-11-08 13:12:14 +01:00
Volker Lendecke
daa964013b s3: Do not reference ndr_table_<pipe> in the cli_ routines directly 2009-11-08 13:12:13 +01:00
Volker Lendecke
70c698fd54 s3: Do not directly reference the ndr_table_* in rpcclient 2009-11-08 00:28:36 +01:00
Volker Lendecke
cd16e38e32 s3: Register the ndr_interfaces dynamically 2009-11-07 09:14:16 +01:00
Volker Lendecke
2aa0af9867 s3: get_pipe_name_from_iface -> get_pipe_name_from_syntax 2009-11-07 09:14:15 +01:00
Jeremy Allison
bd2ffb1c7a Fix bug 6865 - acl_xattr module: Has dependency that inherit acls = yes or xattrs are removed.
Jeremy.
2009-11-06 21:53:07 -08:00
Günther Deschner
5e26622510 s3-kerberos: add impersonate_principal for kerberos_return_pac_X calls.
Guenther
2009-11-06 12:44:15 +01:00
Günther Deschner
0729df3661 s3-kerberos: remove duplicate prototype.
Guenther
2009-11-06 12:43:03 +01:00
Jeremy Allison
c99dd5c23e Got the logic simplification worked out so we still pass
BASE-DELAYWRITE and also RAW-CLOSE.
Jeremy.
2009-11-05 22:58:12 -08:00
Jeremy Allison
977fa4e377 Revert commit "0551284dc08eb93ef7b2b2227a45e5ec21d482fb" - simplify
the logic. This was incorrect (I'll revisit this tomorrow).
Jeremy.
2009-11-05 21:27:25 -08:00
Jeremy Allison
0551284dc0 Simplify the logic - remove extraneous argument and calls to set_close_write_time().
We were treating a file time set on close as a sticky write time set, and I don't
think it is. I will add a torture test later to RAW-CLOSE to confirm this.
Jeremy.
2009-11-05 17:40:01 -08:00
Jeremy Allison
7f9fe127ba Get closer to an accurate model of Windows timestamp changes.
"Normal" non truncate writes always cause the timestamp to
be set on close. Once a close is done on a handle this can
reset the sticky write time to current time also.
Updated smbtorture4 confirms this.
Jeremy.
2009-11-05 16:20:11 -08:00
Volker Lendecke
d415d4d32f s3: Add parameter "ctdb timeout"
When something in the cluster blocks, it can happen that we wait indefinitely
long for ctdb, just adding to the blocking condition. In theory, nothing should
block, but as someone said "In practice the difference between theory and
practice is larger than in theory". This adds a timeout parameter in seconds,
after which we stop waiting for ctdb and panic.
2009-11-05 12:05:36 +01:00
Jeremy Allison
cbafe17bb3 Remove "Protocol" as an extern, and add accessor functions.
Jeremy.
2009-11-04 15:15:50 -08:00
Volker Lendecke
b067a5e4e8 s3: Remove debug_ctx()
smbd just crashed on me: In a debug message I called a routine preparing a
string that itself used debug_ctx. The outer routine also used it after the
inner routine had returned. It was still referencing the talloc context
that the outer debug_ctx() had given us, which the inner DEBUG had already
freed.
2009-11-03 11:30:00 +01:00
SATOH Fumiyasu
c27194a7e0 Fix bug 6572 - libsmbclient: unable to access 'msdfs proxy' share. 2009-10-28 12:48:36 -07:00
Günther Deschner
4df8426768 s3-passdb: move open_schannel_session_store() to passdb/secrets_schannel.c.
Guenther
2009-10-28 12:37:39 +01:00
Günther Deschner
bda047afbc s3-passdb: add secrets_delete_generic().
Guenther
2009-10-28 12:37:38 +01:00
Karolin Seeger
f381faa8d6 s3: Rename new parameter "ldap ref follow" to "ldap follow referral".
This parameter will be introduced with Samba 3.5.0.

Karolin
2009-10-26 12:11:59 +01:00
Matthias Dieter Wallnöfer
441f0326be s3: Try to fix the build on Solaris & AIX regarding the password change reject reason 2009-10-16 12:27:57 +02:00
Björn Jacke
dc586b933d s3: fix outdated proto.h causing build error on AIX
Matthias, please check!
2009-10-15 10:27:34 +02:00
Günther Deschner
075303560f s3-passdb: missed two prototypes while moving to enum netr_SchannelType.
Guenther
2009-10-14 15:26:14 +02:00
Volker Lendecke
1302526a74 s3:libsmb: Add cli_notify 2009-10-13 20:34:25 +02:00
Günther Deschner
ebe0e64ba9 s3: use enum netr_SchannelType all over the place.
Guenther
2009-10-13 10:21:46 +02:00
Günther Deschner
4a1b50afd5 s3-netlogon: pass down account name to remote password set functions.
Guenther
2009-10-13 00:07:45 +02:00
Karolin Seeger
8def289c8e s3/proto.h: Add lp_ldap_ref_follow prototype.
Fix build of smbldap.

Karolin
2009-10-12 12:52:29 +02:00
Matthias Dieter Wallnöfer
607ceff234 s3/s4 - Adapt the IDL changes on various locations 2009-10-08 09:50:19 +02:00
Abhidnya P Chirmule
ac774c4969 s3: Add access_mask to the flock VFS call 2009-10-06 18:52:06 +02:00
Volker Lendecke
872f9c4f91 Revert "s3: Attempt to fix machine password change"
This reverts commit 20a8ea91e1.

Ooops, this should not have been committed.
2009-10-05 22:14:06 +02:00
Volker Lendecke
20a8ea91e1 s3: Attempt to fix machine password change 2009-10-05 22:12:20 +02:00
Jeremy Allison
6f22cd10ad Remove lots of duplicate code and move it into one
function vfs_stat_fsp(). Stops code looking at fsp->posix_open
except for exceptional circumstances.
Jeremy.
2009-10-02 13:45:38 -07:00
Günther Deschner
e80891db41 s3-perfcount: more cleanup.
Guenther
2009-10-01 12:19:48 +02:00