summaryrefslogtreecommitdiff
path: root/source3/include
AgeCommit message (Collapse)AuthorFilesLines
2009-05-27s3: Allow child processes to exit gracefully if we are out of fdsMarc VanHeyningen1-1/+1
When we run out of file descriptors for some reason, every new connection forks a child that immediately panics causing smbd to coredump. This seems unnecessarily harsh; with this code change we now catch that error and merely log a message about it and exit without the core dump. Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-05-27Gna, how long do I program in C now??? :-)Volker Lendecke1-2/+2
2009-05-26Attempt to fix the build on HP/UXVolker Lendecke1-0/+10
2009-05-26Attempt to fix the build on NetBSDVolker Lendecke1-0/+3
2009-05-26Revert "s3: fix build on systems with struct stat member st_flags"Björn Jacke1-3/+0
for a cleaner and more complete patch that Volker has in the queue :-)
2009-05-26s3: fix build on systems with struct stat member st_flagsBjörn Jacke1-0/+3
2009-05-26Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STATVolker Lendecke3-19/+31
This patch introduces struct stat_ex { dev_t st_ex_dev; ino_t st_ex_ino; mode_t st_ex_mode; nlink_t st_ex_nlink; uid_t st_ex_uid; gid_t st_ex_gid; dev_t st_ex_rdev; off_t st_ex_size; struct timespec st_ex_atime; struct timespec st_ex_mtime; struct timespec st_ex_ctime; struct timespec st_ex_btime; /* birthtime */ blksize_t st_ex_blksize; blkcnt_t st_ex_blocks; }; typedef struct stat_ex SMB_STRUCT_STAT; It is really large because due to the friendly libc headers playing macro tricks with fields like st_ino, so I renamed them to st_ex_xxx. Why this change? To support birthtime, we already have quite a few #ifdef's at places where it does not really belong. With a stat struct that we control, we can consolidate the nanosecond timestamps and the birthtime deep in the VFS stat calls. At this moment it is triggered by a request to support the birthtime field for GPFS. GPFS does not extend the system level struct stat, but instead has a separate call that gets us the additional information beyond posix. Without being able to do that within the VFS stat calls, that support would have to be scattered around the main smbd code. It will very likely break all the onefs modules, but I think the changes will be reasonably easy to do.
2009-05-20Make cli_posix_open() and cli_posix_mkdir() async.Jeremy Allison1-3/+17
Jeremy.
2009-05-20s3: Change unix_convert (and its callers) to use struct smb_filenameTim Prouty2-6/+22
This is the first of a series of patches that change path based operations to operate on a struct smb_filename instead of a char *. This same concept already exists in source4. My goals for this series of patches are to eventually: 1) Solve the stream vs. posix filename that contains a colon ambiguity that currently exists. 2) Make unix_convert the only function that parses the stream name. 3) Clean up the unix_convert API. 4) Change all path based vfs operation to take a struct smb_filename. 5) Make is_ntfs_stream_name() a constant operation that can simply check the state of struct smb_filename rather than re-parse the filename. 6) Eliminate the need for split_ntfs_stream_name() to exist. My strategy is to start from the inside at unix_convert() and work my way out through the vfs layer, call by call. This first patch does just that, by changing unix_convert and all of its callers to operate on struct smb_filename. Since this is such a large change, I plan on pushing the patches in phases, where each phase keeps full compatibility and passes make test. The API of unix_convert has been simplified from: NTSTATUS unix_convert(TALLOC_CTX *ctx, connection_struct *conn, const char *orig_path, bool allow_wcard_last_component, char **pp_conv_path, char **pp_saved_last_component, SMB_STRUCT_STAT *pst) to: NTSTATUS unix_convert(TALLOC_CTX *ctx, connection_struct *conn, const char *orig_path, struct smb_filename *smb_fname, uint32_t ucf_flags) Currently the smb_filename struct looks like: struct smb_filename { char *base_name; char *stream_name; char *original_lcomp; SMB_STRUCT_STAT st; }; One key point here is the decision to break up the base_name and stream_name. I have introduced a helper function called get_full_smb_filename() that takes an smb_filename struct and allocates the full_name. I changed the callers of unix_convert() to subsequently call get_full_smb_filename() for the time being, but I plan to eventually eliminate get_full_smb_filename().
2009-05-20s3:param: add PROTOCOL_SMB2Stefan Metzmacher1-1/+9
metze
2009-05-18s3: Always allocate memory in dptr_ReadDirNameAravind Srinivasan1-1/+1
This is a follow up to 69d61453df6019caef4e7960fa78c6a3c51f3d2a to adjust the API to allow the lower layers allocate memory. Now the memory can explicitly be freed rather than relying on talloc_tos(). Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-05-18Change access_check_samr_object -> access_check_object.Jeremy Allison1-0/+7
Make map_max_allowed_access global. Change lsa_get_generic_sd to add Everyone:LSA_POLICY_READ|LSA_POLICY_EXECUTE, not just LSA_POLICY_EXECUTE. Jeremy.
2009-05-18Fix bug 5681: Do not limit the number of network interfacesVolker Lendecke1-3/+1
Jeremy as far as I can see there is no real technical reason to limit the number of interfaces. If you like this patch, can you please merge it to 3.4? If you don't please tell me :-) Thanks, Volker
2009-05-18Add "file_walk_table" to do stuff with all open filesVolker Lendecke1-0/+4
2009-05-16Move smb_create_user() in samsyncSimo Sorce1-5/+0
It is not used anywhere else, so make it also static and remove it from proto.h
2009-05-16s3-privileges: add privilege_delete_account().Günther Deschner1-0/+1
Guenther
2009-05-15s3:param: prevent includes from being dumped in dump_*() functions.Michael Adam1-0/+1
This fixes bug #4271: testparm should not print includes. Michael
2009-05-13s3:libsmb: move read_smb_send/recv() static in async_smb.cStefan Metzmacher1-5/+0
metze
2009-05-13s3:libsmb: let cli_smb_chain_send() also return NTSTATUSStefan Metzmacher1-1/+1
metze
2009-05-13s3-printing: no need to define struct table_node 4 times.Günther Deschner1-0/+6
Guenther
2009-05-13Remove an unused struct definitionVolker Lendecke1-6/+0
2009-05-13s3: return proper error code in cli_smb_req_sendBo Yang1-1/+1
Signed-off-by: Bo Yang <boyang@samba.org>
2009-05-12Fix bug 6157Volker Lendecke1-0/+3
This patch picks the alphabetically smallest one of the multi-value attribute "uid". This fixes a regression against 3.0 and also becomes deterministic.
2009-05-12s3:proto.h: remove old param/params.c prototypeMichael Adam1-7/+0
Michael
2009-05-11Correct typos; semicolons instead of commasDerrell Lipman1-7/+7
2009-05-10Provide a libsmbclient interface for programs requiring threadsDerrell Lipman1-0/+109
- This adds two functions: smbc_thread_posix() which provides access to the internal threading implementation using pthread; and smbc_thread_impl() where the user provides each of the functions required by Samba, to give access to the thread implementation's native capabilities. Derrell
2009-05-09Add wb_simple_trans_send/recvVolker Lendecke1-0/+7
2009-05-08s3-samr: let set_user_info_16 and 20 follow the same pattern as all other ↵Günther Deschner1-0/+2
levels. Guenther
2009-05-08s3-samr: support some more info levels in samr_SetUserInfo calls.Günther Deschner1-0/+20
Guenther
2009-05-07Convert lib/wb_reqtrans.c to unix calling conventionsVolker Lendecke1-6/+6
2009-05-07s3-auth: use full 16byte session key in make_user_info_netlogon_interactive().Günther Deschner1-1/+1
Patch from Jeremy. With this patch, I was able to join Windows 7 RC to a Samba3 DC, and login into a Samba 3 Domain. There are still two registry settings required: HKLM\System\CCS\Services\LanmanWorkstation\Parameters DWORD DomainCompatibilityMode = 1 DWORD DNSNameResolutionRequired = 0 Do *not* modify the other netlogon registry parameters that were passed around, they weaken security. Guenther (cherry picked from commit b5097d54cb74ca0ea328f9e029562f65f4a01134)
2009-05-07Make cli_tcon_andx chainableVolker Lendecke1-0/+6
2009-05-07Make cli_session_setup_guest chainableVolker Lendecke1-0/+4
2009-05-06Make cli_setatr async.Jeremy Allison1-1/+11
Jeremy.
2009-05-06Make cli_setattrE async.Jeremy Allison1-4/+13
Jeremy.
2009-05-06s3-printing: simplify print_queue helper functions and return WERROR.Günther Deschner1-6/+3
Guenther
2009-05-05Make cli_getatr() async.Jeremy Allison1-2/+14
Jeremy.
2009-05-05Make cli_getattrE async.Jeremy Allison1-5/+18
Jeremy.
2009-05-01Add getaddrinfo_send/recvVolker Lendecke1-0/+7
2009-05-01Add fncall_send/recvVolker Lendecke2-0/+9
2009-05-01Add thread poolVolker Lendecke1-0/+42
Included if pthreads are found, can be disabled with --enable-pthreadpool=no Tim, Steven, I haven't yet seen comments from you. You have been asking for such a thing at SambaXP. Do you like this? :-)
2009-04-30Cause cli_close to return an NTSTATUS.Jeremy Allison1-1/+1
Jeremy.
2009-04-30Get medieval on our ass about SMB1 file descriptors being 16 bits, not an int.Jeremy Allison2-40/+34
Convert all uses of cli_open(), cli_nt_createXXX to NTSTATUS versions. This is smaller than it looks, it just fixes a lot of old code. Next up, ensure all cli_XX functions return NTSTATUS. Jeremy.
2009-04-30s3-lsa: use LSA_POLICY_MODE flags in _lsa_GetSystemAccessAccount().Günther Deschner1-6/+0
Guenther
2009-04-29Make cli_unlink async.Jeremy Allison1-2/+7
Jeremy.
2009-04-29More async calls in libsmb/clifile.cJeremy Allison1-2/+17
Jeremy.
2009-04-29s3:smbd/service: switch load_registry_service/shares to use loadparm routinesMichael Adam1-0/+1
instead of reading the registry directly with tdb and activating the configure options by hand. This eliminates the need for repeating checks done in loadparm. For instance it disables registry shares without path in the server as is the case with text based shares. Michael
2009-04-29s3:loadparm: refactor process_registry_service out or process_registry_globalsMichael Adam1-0/+1
Michael
2009-04-28Convert cli_rename to async.Jeremy Allison1-1/+7
Jeremy.
2009-04-28Convert cli_posix_unlink() and cli_posix_rmdir()Jeremy Allison1-2/+14
to async. First trans calls I've done. Jeremy.