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

6466 Commits

Author SHA1 Message Date
Günther Deschner
21a78b88cc s3-includes: only include system/capability.h when needed.
Guenther
2011-03-30 01:13:06 +02:00
Günther Deschner
739ca0e7db s3-includes: only include system/glob.h when needed.
Guenther
2011-03-30 01:13:06 +02:00
Günther Deschner
310d268527 s3-includes: only include system/iconv.h when needed.
Guenther
2011-03-30 01:13:06 +02:00
Günther Deschner
89ca4875cd s3-includes: only include system/syslog.h when needed.
Guenther
2011-03-30 01:13:06 +02:00
Günther Deschner
99f4a64543 s3-trans2: only include trans2.h where needed.
Guenther
2011-03-30 01:13:06 +02:00
Günther Deschner
d85f140826 s3-winbind: remove global inclusion of libwbclient.
Guenther
2011-03-30 01:13:06 +02:00
Günther Deschner
96487959e9 lib/util/util_pw: share more code between lib/util/util_pw.c and source3/lib/username.c
Guenther
2011-03-30 01:13:06 +02:00
Günther Deschner
64421129b6 lib/util/util_pw: share sys_get{pw,gr} group of calls.
Guenther
2011-03-30 01:13:06 +02:00
Simo Sorce
1d33474dad s3:printing Make print_queue_receive public
Signed-off-by: Günther Deschner <gd@samba.org>
2011-03-29 16:03:49 +02:00
Volker Lendecke
ffef3aa809 s3: Replace cli_negprot_sendsync() by cli_negprot_send() 2011-03-27 19:04:11 +02:00
Volker Lendecke
5d9075c049 s3: Remove a use of cli_send_smb 2011-03-27 19:04:10 +02:00
Volker Lendecke
273e7cbb99 Revert "s3-includes: fixed CONST_DISCARD() to actually discard const"
This reverts commit 37261928be.

In source3 this creates a warning of the form

passdb/pdb_ldap.c:4565: warning: passing argument 2 of ‘pull_utf8_talloc’ from incompatible pointer type
include/proto.h:444: note: expected ‘char **’ but argument is of type ‘char ***’

for every use of CONST_DISCARD.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Mar 25 13:16:35 CET 2011 on sn-devel-104
2011-03-25 13:16:35 +01:00
Andrew Tridgell
f08ec2296e s3-charcnv: removed unused function
lp_failed_convert_char() is not needed any more
2011-03-25 04:37:06 +01:00
Andrew Bartlett
64258a300f s3-charcnv Add convert_string_error()
This function returns errors rather than printing them.

Andrew Bartlett
2011-03-25 04:37:06 +01:00
Andrew Tridgell
37261928be s3-includes: fixed CONST_DISCARD() to actually discard const
a cast is not enough

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-03-25 04:37:06 +01:00
Andrew Tridgell
5a20325c86 libcli: created smb_constants.h
this starts the (long!) process of moving some of the SMB constants
into common files. This just moves the FLAGS2_ defines, which are
needed for common string routines (for FLAGS2_UNICODE_STRINGS)
2011-03-25 04:37:06 +01:00
Andrew Tridgell
3ceb353939 s3-lib: make pull_ucs2_base_talloc static
it is local to charcnv.c
2011-03-25 04:37:06 +01:00
Andrew Tridgell
980064b76d lib: remove unused pieces of string_wrappers.h 2011-03-25 04:37:06 +01:00
Andrew Tridgell
8cd4a38d72 lib: move the string wrappers from source3/include to common lib/util
this will allow the common charcnv library to use the string wrappers

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-03-25 04:37:06 +01:00
Andrew Tridgell
15e84a9a09 charcnv: removed the allow_badcharcnv and allow_bad_conv options to convert_string*()
we shouldn't accept bad multi-byte strings, it just hides problems

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
2011-03-24 01:47:26 +01:00
Günther Deschner
2639f0b3ab s3-prototypes: remove protos of some dead functions.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Mar 24 00:52:01 CET 2011 on sn-devel-104
2011-03-24 00:52:01 +01:00
Günther Deschner
d53aac5baa s3-proto: remove some duplicate prototypes.
Guenther
2011-03-23 19:24:35 +01:00
Günther Deschner
8fe4a68da7 s3-includes: remove unused cmdline_lp_ctx.
Guenther
2011-03-23 19:24:35 +01:00
Andreas Schneider
0d97741b9b s3-epmapper: Added function to delete endpoint entries. 2011-03-23 17:19:22 +01:00
Andreas Schneider
3766f3ec0e s3-rpc_server: Rename system_user to ncalrpc_as_system. 2011-03-23 17:19:22 +01:00
Andrew Bartlett
d73db405f7 s3-safe_string: Add checked_strlcpy()
This is strlcpy, just with an extra check of the parameters with
sizeof(), use only where that works.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Mar 23 03:39:35 CET 2011 on sn-devel-104
2011-03-23 03:39:35 +01:00
Andrew Bartlett
1d22c3919d s3-safe_str: Futher simplify the macros by removing indirection
Now that we don't need to pass in the function name and string,
another level of indirection can be safely removed, and the operation
of these macros made much clearer.

Andrew Bartlett
2011-03-23 12:49:39 +11:00
Andrew Bartlett
1923b78209 s3-lib Remove the clobber_region() code.
This code wrote to the full buffer in fstrcpy(), pstrcpy() and other
fixed-length string manipulation functions.

The hope of this code was to find out at run time if we were mixing up
pstring and fstring etc, and to record where this came from.  It has a
runtime performance impact (particularly if compiled with
--enable-developer).

It is being removed because of the complexity it adds, and the
distinct lack of bugs that this complexity has been credited in
finding.

The macro-based compile-time checking of string sizes remains.

Andrew Bartlett
2011-03-23 12:49:39 +11:00
Andrew Tridgell
6e8b6358ec fault: fixed smb_panic() prototypes
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Mar 23 01:51:44 CET 2011 on sn-devel-104
2011-03-23 01:51:44 +01:00
Andrew Tridgell
580997ede0 fault: get fault.c ready for use by s4
this moves the s3 specific dumpcore code into source3/lib/dumpcore.c,
and uses a function pointer to setup which smb_panic call to use
2011-03-23 11:03:57 +11:00
Michael Adam
474f6a0f75 s3:loadparm: remove unused parameter "idmap read only".
This has not been released yet and is now useless since we
use the "idmap config * : read only = ..." syntax.
2011-03-22 22:49:57 +01:00
Michael Adam
82853a613b s3:idmap: remove the params argument from the init function 2011-03-22 22:49:56 +01:00
Andrew Tridgell
c8297073db s3-fault: removed the cont_fn from fault_setup()
cont_fn() was supposed to be a way to continue after a seg fault. It
could never be called however, as smb_panic() from fault_report()
could never return, as dump_core() never returns at the end of
smb_panic()

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Mar 22 05:07:58 CET 2011 on sn-devel-104
2011-03-22 05:07:58 +01:00
Volker Lendecke
4b347a1b17 s3: Add "print notify backchannel" parameter to prevent us doing the reverse print notify connection.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Mar 18 21:34:30 CET 2011 on sn-devel-104
2011-03-18 21:34:30 +01:00
Günther Deschner
3aa9d3005a s3-build: only include asn1 headers where actually needed.
Guenther
2011-03-16 23:46:18 +01:00
Günther Deschner
9f9e195124 s3-packet: only include packet.h where needed.
Guenther
2011-03-16 16:56:47 +01:00
Günther Deschner
1f6aecb5cf s3-interfaces: only include interfaces.h where needed.
Guenther
2011-03-16 16:56:46 +01:00
Günther Deschner
1ce4d2d83a s3-msdfs: avoid global inclusion of msdfs.h.
Guenther
2011-03-16 16:56:46 +01:00
Günther Deschner
fad0112373 s3-build: stop including ldap and lber headers everywhere in the code.
Instead use new header smb_ldap.h where all LDAP API related things are handled,
while smbldap.h only deals with our smbldap_X() API.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Mar 16 10:54:51 CET 2011 on sn-devel-104
2011-03-16 10:54:50 +01:00
Günther Deschner
d19ea55e9e s3-includes: avoid global include of gssapi headers.
Guenther
2011-03-16 10:11:16 +01:00
Günther Deschner
6c8d802391 s3-libsmb: move smb encryption structs into own header.
Guenther
2011-03-16 10:11:16 +01:00
Günther Deschner
e1f84330ba libcli/security: move display_sec headers to own header file and add to
security.h grouping header.

Guenther
2011-03-16 10:11:08 +01:00
Günther Deschner
7a91282c9f s3-libsmb: only include rap client when needed.
Guenther
2011-03-15 21:16:35 +01:00
Volker Lendecke
b0667f7fda s3: Remove some unused code 2011-03-15 09:15:36 +01:00
Volker Lendecke
8dfa224c13 s3: Change tldap_entry_attributes to the "array,count" convention
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Mar 14 22:02:35 CET 2011 on sn-devel-104
2011-03-14 22:02:35 +01:00
Volker Lendecke
dec9d03e25 libsmbclient: Fix a typo
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Mar  9 11:19:36 CET 2011 on sn-devel-104
2011-03-09 11:19:35 +01:00
Andreas Schneider
4b8dd08a38 s3-rpc_server: Add server support for NCALRPC system user pipe.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-03-08 11:41:30 +01:00
Andreas Schneider
cc5b88545d s3-rpc_server: Introduce transport in pipe_struct.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-03-08 11:41:30 +01:00
Andreas Schneider
254c02041c s3-rpc_server: Added server address to pipes struct.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-03-08 11:41:29 +01:00
Volker Lendecke
233c8bca3b s3: Remove close_fn from idmap_methods
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar  6 13:37:13 CET 2011 on sn-devel-104
2011-03-06 13:37:13 +01:00
Volker Lendecke
fff6fa7576 s3: Remove unused args from nss_get_info 2011-03-06 12:51:01 +01:00
Volker Lendecke
99d98e31bc s3: Remove unused args from get_nss_info 2011-03-06 12:51:01 +01:00
Volker Lendecke
f6f8ec8d8b s3: Move EXOP definitions to smbldap.h
This attempts to fix the build on Solaris

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar  6 10:45:16 CET 2011 on sn-devel-104
2011-03-06 10:45:16 +01:00
David Disseldorp
61bf4699f0 s3-printing: follow force user/group for driver IO
Configuring force user/group settings for the print$ share currently has
unexpected results, this is explained by how the driver upload/add
process takes place. Consider the following example:

[print$]
        path = /print-drv
        write list = $DRIVER_UPLOAD_USER
        force group = ntadmin

- the client connects to the [print$] share and uploads all driver
  files to the /print-drv/W32X86 directory.

- This is permitted, as /print-drv/W32X86 is owned by group ntadmin, and
  the "force group = ntadmin" takes effect for the [print$] session.

- Once all files are uploaded, the client connects to the [ipc$]
  share and issues an AddPrinterDriverEx spoolss request.

- In handling this request move_driver_to_download_area() is called,
  which attempts to create the directory /print-drv/W32X86/3

- The create directory fails, as it is done as the user connected to
  the [ipc$] share which does not have permission to write to the driver
  directory. The [print$] "force group = ntadmin" has no effect.

This is a regression from previous behaviour prior to the commit:
783ab04 Convert move_driver_to_download_area to use create_conn_struct.

https://bugzilla.samba.org/show_bug.cgi?id=7921
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-03-04 15:46:14 +01:00
Günther Deschner
9167d70e77 libreplace: move "struct timespec" checks into libreplace (where timespec is already used).
Bjoern, Metze, please check.

Guenther
2011-03-04 00:28:27 +01:00
Volker Lendecke
01da00abfd s3: Fix some nonempty blank lines 2011-03-03 22:08:49 +01:00
Günther Deschner
ba7727487e s3-includes: remove global include of system/readline.h.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Mar  2 23:06:17 CET 2011 on sn-devel-104
2011-03-02 23:06:17 +01:00
Günther Deschner
a460fe8151 s3-proto: fix some inline comments.
Guenther
2011-03-02 22:17:52 +01:00
Günther Deschner
93db9489fd s3-libds: use already existing ../libds/common/flag_mapping.h header.
Guenther
2011-03-02 22:17:17 +01:00
Volker Lendecke
cf7dac6fbc s3: Pass smb_filename through the set_offline vfs op 2011-03-02 18:39:21 +01:00
Volker Lendecke
c9d1e16c2c s3: Pass smb_filename through the is_offline vfs op 2011-03-02 18:39:21 +01:00
Günther Deschner
ea29261186 s3-sessionid: avoid global include of sessionid.h
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Mar  2 12:58:12 CET 2011 on sn-devel-104
2011-03-02 12:58:12 +01:00
Günther Deschner
8643683dd8 s3-server_id: only include server_id where needed.
Guenther
2011-03-02 12:12:31 +01:00
David Disseldorp
14446b5280 s3-printing: fix move_driver_to_download_area() error paths
WERR_ACCESS_DENIED errors are mapped to WERR_UNKNOWN_PRINTER_DRIVER,
resulting in incorrect error messages on Windows clients.

move_driver_to_download_area() returns the same error status values
to the caller via the *perr argument as well as the return value.

The create_directory() call is not checked for error.
2011-03-02 00:31:22 +01:00
Andrew Bartlett
04f5ef83b9 s3-auth struct security_unix_token replaces UNIX_USER_TOKEN 2011-03-01 06:29:04 +01:00
Andrew Bartlett
5f5ca913b7 lib/util: new merged debug system
This is the s3 debug system, with a number of changes to tidy it up
for common use.  The debug class system is simplified by the removal of the
ISSET table, the system no longer attempts to cope with assignment of
DEBUGLEVEL, and the full class table is always available (rather than
just DEBUGLEVEL_CLASS[DBCG_ALL]) from startup.  It is also no longer
confusingly described as a hack, but as the initial table.

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Mar  1 04:32:12 CET 2011 on sn-devel-104
2011-03-01 04:32:12 +01:00
Andrew Bartlett
243abcb0af s3-build __FUNCTION__ is always available, always use it
This avoids duplication between FUNCTION_NAME and __FUNCTION__
2011-03-01 02:13:22 +01:00
Andreas Schneider
bf18403c81 s3-rpc_client: Move client pipe functions to own header. 2011-02-28 18:15:04 +01:00
Stefan Metzmacher
7eedf69bc9 s3: Remove unused receive_packet 2011-02-28 16:40:19 +01:00
Volker Lendecke
884984ae0a s3: Add poll_intr_one_fd 2011-02-28 16:40:19 +01:00
Volker Lendecke
2b0057c2cb s3: Eliminate select from packet_fd_read_sync 2011-02-28 16:40:19 +01:00
Volker Lendecke
deb58b2e94 s3: Add poll_one_fd() 2011-02-28 16:40:19 +01:00
Volker Lendecke
cf7d331511 s3: Remove select-based s3 event backend 2011-02-28 16:40:19 +01:00
Volker Lendecke
ea5e1c5ecb s3: Use poll for the event loop 2011-02-28 16:40:19 +01:00
Volker Lendecke
5e93e3e88f s3: Add timeval_to_msec 2011-02-28 16:40:19 +01:00
Gregor Beck
58081884f7 s3: smbcontrol to notify smbd about idmap changes
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Feb 28 14:07:23 CET 2011 on sn-devel-104
2011-02-28 14:07:23 +01:00
Gregor Beck
6710561c27 s3: add functions to remove entries from idmap memcache 2011-02-28 12:58:43 +01:00
Gregor Beck
01e7611050 s3: add functions to flush the idmap memcache 2011-02-28 12:58:37 +01:00
Volker Lendecke
fec0baacb6 s3: Make is_zero_addr take a sockaddr_storage
All callers had to cast this anyway

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Feb 27 11:02:53 CET 2011 on sn-devel-104
2011-02-27 11:02:53 +01:00
Justin Maggard
6141b6a49f Detect Mac OS X as a separate client type. 2011-02-25 01:57:04 +01:00
Günther Deschner
313db81ad3 s3-errormap: move (unused) map_nt_error_from_wbcErr out of errormap.
Guenther
2011-02-25 01:08:41 +01:00
Günther Deschner
de8b373329 s3-printing: move more printing defines out of includes.h
Guenther
2011-02-25 01:08:26 +01:00
Jeremy Allison
916e82823b Fix bug 7950 - Samba 3.5.x fails BASE-CREATEX_SHAREMODES_DIR smbtorture4 test
We need to revalidate the pathname once re-constructed from a root fsp.

Jeremy.
2011-02-23 18:24:41 -08:00
Günther Deschner
ab64634a20 s3-proto: remove some prototypes of non-existing functions.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Feb 23 15:42:35 CET 2011 on sn-devel-104
2011-02-23 15:42:35 +01:00
Günther Deschner
28b4b05938 s3-includes: move some chgpasswd related defines to the locations where they are used.
Guenther
2011-02-22 21:52:19 +01:00
Günther Deschner
823f8b9030 s3-printing: move more printing structs to printing.h
Guenther
2011-02-22 21:52:18 +01:00
Günther Deschner
8225c0ad6c s3-printing: only include printing where really needed.
Guenther
2011-02-22 21:52:18 +01:00
Günther Deschner
5a0cf0c77e s3-printing: fix pcacp prototypes and includes.
Guenther
2011-02-22 21:52:18 +01:00
Günther Deschner
66e040ee0a s3-printing: isolate print notification prototypes better.
Guenther
2011-02-22 21:52:18 +01:00
Stefan Metzmacher
d7fa349052 s3:auth: change num_groups to from size_t to uint32_t
This will help with the change from UNIX_USER_TOKEN to security_unix_token

metze
2011-02-22 16:20:11 +11:00
Andrew Bartlett
2e69e89456 s3-auth Rename auth_serversupplied_info varaiables: server_info -> session_info
These variables, of type struct auth_serversupplied_info were poorly
named when added into 2001, and in good consistant practice, this has
extended all over the codebase in the years since.

The structure is also not ideal for it's current purpose.  Originally
intended to convey the results of the authentication modules, it
really describes all the essential attributes of a session.  This
rename will reduce the volume of a future patch to replaced these with
a struct auth_session_info, with auth_serversupplied_info confined to
the lower levels of the auth subsystem, and then eliminated.

(The new structure will be the output of create_local_token(), and the
change in struct definition will ensure that this is always run, populating
local groups and privileges).

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-02-22 16:20:10 +11:00
Volker Lendecke
51b84a9ed7 s3: Convert init_system_info to NTSTATUS 2011-02-20 10:23:29 +01:00
Volker Lendecke
943aac2e36 s3: Add "len" to pdb_set_hours 2011-02-19 11:32:49 +01:00
Andrew Bartlett
5155a5f5c1 s3-charcnv Don't genreate valid_table on the fly, rely on valid.dat
This file is always installed, and is only even required for the old,
depricated mangle hash method.

Andrew Bartlett
2011-02-18 18:41:01 +11:00
Andrew Bartlett
8afc271e2a lib/util/charset Use top level iconv.c in source3
The two files were very similar already, the only change required was
to adopt the s3 module registration fucntion name.

(NTSTATUS wasn't used as the charset code does not otherwise use that
type).

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-02-18 18:41:00 +11:00
Andrew Bartlett
92faeaeea8 charset Remove use of {isupper,islower,toupper,tolower}_w functions
These now call the common _m functions that consider UTF16 code points.

This removes the code which will make up a 'lame' table in memory, as
this can just as correctly be handled by running the algorithm at runtime (which is to call toupper() and tolower() on characters < 128).

When used, a top level waf build will always locate the correct table
- in the build tree or outside - due to relinking the installed
binary.

Andrew Bartlett
2011-02-18 17:00:34 +11:00
Andrew Tridgell
b74ac941f9 s3-includes: force _SAMBA_BUILD_=3 in source3 includes.h
this allows a common set of cflags for a top level combined build

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-18 15:09:46 +11:00
Günther Deschner
0ed46df56a s3-passdb: add PDB_CAP_TRUSTED_DOMAINS_EX.
Guenther
2011-02-17 16:02:20 +01:00
Andrew Bartlett
a0c77c2eda s3-cluster remove more CLUSTER_SUPPORT #ifdef stuff 2011-02-17 16:02:19 +01:00
Günther Deschner
6840549123 s3: add server_id.idl and use only autogenerated code.
Volker, Tridge and other clustering gurus, please check.

It is ok to get rid of ifdef CLUSTER_SUPPORT here, right ?
Why was unique_id not marshalled at all ?

Guenther
2011-02-17 16:02:19 +01:00
Günther Deschner
c66dfe4df5 s3-build: move priv2ld proto to smbldap.h (in order to fix non-ldap builds).
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Feb 16 15:20:14 CET 2011 on sn-devel-104
2011-02-16 15:20:14 +01:00
Sumit Bose
d638f4a3b8 s3-lsa: Implement lsaRSetForestTrustInformation
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:06 +01:00
Sumit Bose
cc3b67fa1f s3-ipasam: add IPA specific attributes
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:06 +01:00
Sumit Bose
72de982289 s3-ipasam: add ipasam_get_trusted_domain_by_sid()
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:04 +01:00
Sumit Bose
8ddbb48869 s3-ipasam: implement {get,set,del}_trusted_domain
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:34:45 +01:00
Sumit Bose
c96fd895b9 s3-passdb: make priv2ld() public
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:34:45 +01:00
Sumit Bose
b4dd65d3f9 s3-passdb: add {get,set,del,enum}_trusted_domain calls
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:34:44 +01:00
Sumit Bose
4fa210d76a s3-passdb: Add minimal stub for IPA passdb backend
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:34:31 +01:00
Volker Lendecke
ead7ffa1a7 s3: Add "code_page" to struct samu 2011-02-15 21:12:22 +01:00
Volker Lendecke
d9d0fef862 s3: Add "country_code" to struct samu 2011-02-15 21:12:22 +01:00
Günther Deschner
ca574482b8 s3: no need to globally include intl.h.
Guenther
2011-02-15 12:09:22 +01:00
Günther Deschner
b3ea56ae16 s3-librpc: no need to globally include endpointmapper headers.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Feb 14 12:31:56 CET 2011 on sn-devel-104
2011-02-14 12:31:56 +01:00
Günther Deschner
80b4e1e985 s3: move some defines to a better place.
Guenther
2011-02-14 11:47:19 +01:00
Günther Deschner
f10cba1a01 s3-proto: remove prototype for non-existing functions.
Guenther
2011-02-14 11:47:19 +01:00
Günther Deschner
9d9659896b s3-librpc: remove duplicate prototypes.
Guenther
2011-02-14 11:47:19 +01:00
Volker Lendecke
fe551d6815 s3: Convert tldap_entry_values args to "array, count" 2011-02-13 12:11:53 +01:00
Volker Lendecke
84abb428f6 s3: Add an explicit counter to tldap_add_mod_[blobs|str] 2011-02-13 12:11:53 +01:00
Volker Lendecke
158c1e315b s3: Convert tldap_make_mod_fmt args to "array, count" 2011-02-13 12:11:52 +01:00
Volker Lendecke
6375e6993e s3: Convert tldap_make_mod_blob args to "array, count" 2011-02-13 12:11:52 +01:00
Volker Lendecke
6b492a1741 s3: Convert tldap_add_mod_blobs args to "array, count" 2011-02-13 12:11:52 +01:00
Volker Lendecke
efa460e291 s3: Align the args in tldap_modify
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Feb 10 23:20:05 CET 2011 on sn-devel-104
2011-02-10 23:20:05 +01:00
Volker Lendecke
b524e58f9a s3: Align tldap_add and tldap_add_send 2011-02-10 22:34:01 +01:00
Günther Deschner
fdd4d56405 s3: give ../librpc/ndr/util.c its own header.
Guenther
2011-02-10 12:58:06 +01:00
Andrew Bartlett
cc77ea720b s3-auth Remove unused pam_handle
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-02-10 06:51:07 +01:00
Andrew Bartlett
2b05ba77b4 s3-auth Rename cryptic 'ptok' to security_token
This will allow the auth_serversupplied_info struct to be migrated
to auth_session_info easier.

Adnrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-02-10 06:51:06 +01:00
Jeremy Allison
0122a4f417 Put OpenDir() back the way it was - don't overload with an fsp arg. Create OpenDir_fsp for new usage.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Feb 10 02:43:31 CET 2011 on sn-devel-104
2011-02-10 02:43:31 +01:00
Jeremy Allison
1607ebfe86 Allow SMB2_FIND to actually use the open fd handle if we support fdopendir. Fallback to pathname opendir if not. 2011-02-09 15:13:40 -08:00
Jeremy Allison
61c1f312d2 Correctly plumb in VFS_FDOPENDIR. 2011-02-09 15:13:37 -08:00
Günther Deschner
65bb6b3524 s3: move some stuff out of smb.h to better locations.
Guenther
2011-02-09 22:51:23 +01:00
Günther Deschner
4303d34da9 s3: remove unused struct uuid_flat.
Guenther
2011-02-09 22:51:16 +01:00
Michael Adam
015b47fa14 s3:popt: add POPT_COMMON_OPTION to provide only the "--option" feature 2011-02-09 14:00:34 +01:00
Stefan Metzmacher
f915dd5dd4 s3:rpc_client: make rpccli_bh_create() non-static for now
metze
2011-02-09 11:46:20 +01:00
Jeremy Allison
a674a56a97 Add fdopendir to the VFS. We will use this to reuse a directory fd already open by NtCreateX.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Feb  9 00:55:22 CET 2011 on sn-devel-104
2011-02-09 00:55:22 +01:00
Jeremy Allison
224fc03cb5 Pass fsp to dptr_CloseDir(). Cope with setting the fd if we're closing an fd that opendir knows about. 2011-02-08 15:06:00 -08:00
Jeremy Allison
1911d483e5 Add fdopendir(). 2011-02-08 15:05:59 -08:00
Volker Lendecke
5a0ee95b95 s3: Fix some nonempty blank lines and some typos
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Feb  9 00:01:45 CET 2011 on sn-devel-104
2011-02-09 00:01:45 +01:00
Günther Deschner
34722c72f6 pam: share pam errors in a common location.
Guenther
2011-02-08 14:05:36 +01:00
Günther Deschner
be5edba117 libndr: share some uuid helpers.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Feb  8 09:52:56 CET 2011 on sn-devel-104
2011-02-08 09:52:56 +01:00
Günther Deschner
84dbc2a82d ndr: merge ndr_map_error2string and ndr_errstr.
Guenther
2011-02-08 08:58:31 +01:00
Günther Deschner
8b55ae1785 ndr: move null_ndr_syntax_id to the common libndr location.
Guenther
2011-02-08 08:58:21 +01:00
Andreas Schneider
09dafc4a25 s3-rpc_server: Added a svcctl shutdown function.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:01 +01:00
Andreas Schneider
96565db5f6 s3-services: Migrated svcctl registry functions to winreg.
This is a bigger commit. It moves the relevant function to
svc_winreg_glue. We need to use them in the same commit else we have
problems with prototypes in proto.h.

Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:01 +01:00
Volker Lendecke
d515c6cd5c s3: Fix auth_netlogond to cope with netlogon_creds_CredentialState
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Feb  6 17:30:48 CET 2011 on sn-devel-104
2011-02-06 17:30:48 +01:00
Jeremy Allison
df34e804fc Fix try_chown code. Use new vfs_chown_fsp() which always trys fd first.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Feb  5 03:33:59 CET 2011 on sn-devel-104
2011-02-05 03:33:58 +01:00
Stefan Metzmacher
19d3779274 Revert "s3:events: Call all ready fd event handlers on each iteration of the main loop"
This reverts commit 455fccf86b.

I'll add a more generic fix for this problem.

metze
2011-01-31 16:16:09 +01:00
Jeremy Allison
44732734cc Fix bug #7863 - Unlink may unlink wrong file when hardlinks are involved.
Do this by keeping a linked list of delete on close tokens, one for
each filename that identifies a path to the dev/inode. Use the
jenkins hash of the pathname to identify the correct token.
2011-01-25 14:23:19 -08:00
Jeremy Allison
a65bce4e38 Add uint32_t name_hash argument (currently unused) to get_file_infos().
Will be used when we store more than one delete on close token.
2011-01-25 14:02:18 -08:00
Jeremy Allison
b97f1ce68a Add name_hash into the share mode entry struct (as yet only use for renames to identify a specific path). 2011-01-25 14:01:52 -08:00
Jeremy Allison
76418e23bc Add name_hash to files_struct. Set within fsp_set_smb_fname(). 2011-01-25 13:49:01 -08:00
Günther Deschner
c9f4fad75c idl: add file_id idl.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Jan 25 12:27:00 CET 2011 on sn-devel-104
2011-01-25 12:27:00 +01:00
Günther Deschner
7eac3100ea libndr: move ndr_print_bool to ndr_basic.c
Guenther
2011-01-25 11:42:46 +01:00
Volker Lendecke
9c2fcb689b s3:winbind: Fork multiple children per domain
This makes us scale better with many simultaneous winbind requests,
some of which might be slow.

This implementation breaks offline logons, as the cached credentials are
maintained in a child (this needs fixing). So, if the offline logons are
active, only allow one DC connection.

Probably the offline logon and the scalable file server cases are
separate enough so that this patch is useful even with the restriction.
2011-01-21 13:51:27 +01:00
Volker Lendecke
c7a5933e4b s3: Remove some unused code 2011-01-17 08:03:43 +01:00
Volker Lendecke
b33f1147a6 s3: Remove unused cli_send_keepalive 2011-01-17 08:03:42 +01:00
Volker Lendecke
6e684c8460 s3: Remove unused cli_send/receive_trans 2011-01-17 08:03:42 +01:00
Volker Lendecke
cb412d22eb s3: Make cli_setpathinfo_basic use cli_setpathinfo 2011-01-17 08:03:42 +01:00
Volker Lendecke
21d5485e06 s3: Add cli_setpathinfo 2011-01-17 08:03:42 +01:00
Volker Lendecke
2068b96dce s3: Rename cli_setpathinfo->cli_setpathinfo_basic 2011-01-17 08:03:42 +01:00
Volker Lendecke
2d44a0583b s3: Remove unused cli_send/receive_nt_trans 2011-01-17 08:03:42 +01:00
Volker Lendecke
5dee39b5bf s3: Move dump_ntquota* to smbcquotas.c 2011-01-17 08:03:41 +01:00
Volker Lendecke
a1f541723d s3: Convert cli_set_fs_quota_info to cli_trans 2011-01-17 08:03:41 +01:00
Volker Lendecke
797c027cc8 s3: Convert cli_get_fs_quota_info to cli_trans 2011-01-17 08:03:41 +01:00
Volker Lendecke
483e0447f5 s3: Convert cli_list_user_quota to cli_trans 2011-01-17 08:03:41 +01:00
Volker Lendecke
eb7db50f60 s3: Convert cli_set_user_quota to cli_trans 2011-01-17 08:03:41 +01:00
Volker Lendecke
e2a96711d7 s3: Convert cli_get_user_quota to cli_trans 2011-01-17 08:03:41 +01:00
Volker Lendecke
50b3458261 s3: Convert cli_set_secdesc to cli_trans 2011-01-15 16:34:35 +01:00
David Disseldorp
0b188e7784 s3-printing: Initiate pcap reload from parent smbd
Since commit 7022554, smbds share a printcap cache (printer_list.tdb),
therefore ordering of events between smbd processes is important when
updating printcap cache information. Consider the following two process
example:
1) smbd1 receives HUP or printcap cache time expiry
2) smbd1 checks whether pcap needs refresh, it does
3) smbd1 marks pcap as refreshed
4) smbd1 forks child1 to obtain cups printer info
5) smbd2 receives HUP or printcap cache time expiry
6) smbd2 checks whether pcap needs refresh, it does not (due to step 3)
7) smbd2 reloads printer shares prior to child1 completion (stale pcap)
8) child1 completion, pcap cache (printer_list.tdb) is updated by smbd1
9) smbd1 reloads printer shares based on new pcap information

In this case both smbd1 and smbd2 are reliant on the pcap update
performed on child1 completion.
The prior commit "reload shares after pcap cache fill" ensures that
smbd1 only reloads printer shares following pcap update, however smbd2
continues to present shares based on stale pcap data.

This commit addresses the above problem by driving pcap cache and
printer share updates from the parent smbd process.
1) smbd0 (parent) receives a HUP or printcap cache time expiry
2) smbd0 forks child0 to obtain cups printer info
3) child0 completion, pcap cache (printer_list.tdb) is updated by smbd0
4) smbd0 reloads printer shares
5) smbd0 notifies child smbds of pcap update via message_send_all()
6) child smbds read fresh pcap data and reload printer shares

This architecture has the additional advantage that only a single
process (the parent smbd) requests printer information from the printcap
backend.

Use time_mono in housekeeping functions As suggested by Björn Jacke.
2011-01-07 15:37:39 -08:00
David Disseldorp
04248c2cfa s3-printing: reload shares after pcap cache fill
Since commit eada8f8a, updates to the cups pcap cache are performed
asynchronously - cups_cache_reload() forks a child process to request
cups printer information and notify the parent smbd on completion.

Currently printer shares are reloaded immediately following the call to
cups_cache_reload(), this occurs prior to smbd receiving new cups pcap
information from the child process. Such behaviour can result in stale
print shares as outlined in bug 7836.

This fix ensures print shares are only reloaded after new pcap data has
been received.

Pair-Programmed-With: Lars Müller <lars@samba.org>
2011-01-07 15:37:39 -08:00
Volker Lendecke
3e0915f271 s3: Make nmbd socket dir configurable
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Jan  7 14:14:19 CET 2011 on sn-devel-104
2011-01-07 14:14:19 +01:00
Volker Lendecke
2672101cc4 s3: Remove some unused code 2011-01-07 13:28:07 +01:00
Volker Lendecke
6ba4bddb61 s3: Make name_query use /tmp/.nmbd/unexpected 2011-01-07 13:28:05 +01:00
Volker Lendecke
a32f021d66 s3: Make node_status_query use /tmp/.nmbd/unexpected 2011-01-07 13:28:04 +01:00
Volker Lendecke
d801d4da2d s3: Add packet_trn_id() 2011-01-07 13:28:04 +01:00
Volker Lendecke
b2c62d639d s3: Basic infrastructure for /tmp/.nmbd/unexpected
This provides the framework to replace the unexpected.tdb file. Nmbd will
listen on /tmp/.nmbd/unexpected. A client interested in unexpected packets
connects there. It sends a nb_packet_query plus a potential mailslot name for
dgram packets. It waits for a single ack byte to avoid races. After that has
happened, nmbd will pass down all matching packets through that socket.

nb_packet_server_create and nb_packet_dispatch are the nmbd routines,
nb_packet_reader_send/recv and nb_packet_read_send/recv are the client ones.
2011-01-07 13:28:03 +01:00
Stefan Metzmacher
81a167b5df s3: Happy New Year 2011
metze
2011-01-02 17:55:05 +01:00
Volker Lendecke
86ff8cf227 s3: Allow more control over smbsock_[any_]connect
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Dec 29 23:30:44 CET 2010 on sn-devel-104
2010-12-29 23:30:44 +01:00
Jeremy Allison
9b31f6ab6c Fix bug #7892 - open_file_fchmod() leaves a stale lock.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Dec 29 02:15:23 CET 2010 on sn-devel-104
2010-12-29 02:15:23 +01:00
Volker Lendecke
4622812a41 s3: Make name_query return NTSTATUS
Also use talloc for the result

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Dec 28 18:21:05 CET 2010 on sn-devel-104
2010-12-28 18:21:05 +01:00
Volker Lendecke
5717114318 s3: Make node_status_query return NTSTATUS
Also make the result talloc'ed

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Dec 28 13:46:59 CET 2010 on sn-devel-104
2010-12-28 13:46:59 +01:00
Volker Lendecke
e1ab3c3470 s3: Remove an ancient typedef 2010-12-28 12:59:11 +01:00
Jeremy Allison
30d29e64cb All calls to event_add_to_select_args() call GetTimeOfDay() and
pass this in as the &now parameter. Push this call inside of
event_add_to_select_args() to the correct point so it doesn't
get called unless needed.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Dec 23 01:08:11 CET 2010 on sn-devel-104
2010-12-23 01:08:11 +01:00
Volker Lendecke
03b8b8e199 s3: Remove unused open_any_socket_out
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Dec 22 17:27:29 CET 2010 on sn-devel-104
2010-12-22 17:27:29 +01:00
Volker Lendecke
d8e3d0af9e s3: Add smbsock_any_connect 2010-12-22 16:39:15 +01:00
Volker Lendecke
49cd92b218 s3: Add an async smbsock_connect
This connects to 445 and after 5 milliseconds also to 139. It treats a netbios
session setup failure as equivalent as a TCP connect failure. So if 139 is
faster but fails the nb session setup, the 445 still has the chance to succeed.
2010-12-22 16:39:15 +01:00
Volker Lendecke
02a74fd36d s3: Add async cli_session_request
This does not do the redirects, but I think that might be obsolete anyway
2010-12-22 16:39:15 +01:00
Volker Lendecke
444dcc59c2 s3: Add some const to name_mangle() 2010-12-22 16:39:14 +01:00
Jeremy Allison
e8f7c60ec2 My algorithm for determining whan an incoming sequence number can be allowed is incorrect.
(I based it on the text in MS-SMB2, silly me :-). Fix it so incoming sequence numbers
can range over the entire allowable bitmap range. This fixes a repeatable
disconnect against Win7.

Jeremy.
2010-12-21 18:07:52 -08:00
Jeremy Allison
0a5f4f523f Keep track of the sparse status of an open file handle. Allows bypass of
strict allocation on sparse files. Files opened as POSIX opens are always
sparse.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Dec 21 04:12:22 CET 2010 on sn-devel-104
2010-12-21 04:12:22 +01:00
Jeremy Allison
8998f4b013 Added call out to a Linux-compatible fallocate() when we need to extend a file
allocation extent without changing end-of-file size.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Dec 21 02:41:24 CET 2010 on sn-devel-104
2010-12-21 02:41:23 +01:00
Jeremy Allison
e7707d5abd From metze's work on sparse attributes. FILE_ATTRIBUTE_SPARSE is valid on get but not on set.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Dec 20 20:11:22 CET 2010 on sn-devel-104
2010-12-20 20:11:22 +01:00
Volker Lendecke
bfc4fe4012 s3: Remove unused "retry" from cli_start_connection
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Dec 20 17:58:33 CET 2010 on sn-devel-104
2010-12-20 17:58:33 +01:00
Volker Lendecke
d096de56b1 s3: Remove unused "retry" from cli_full_connection 2010-12-20 17:10:58 +01:00
Volker Lendecke
e113b1c64f s3: netsamlogon_clear_cached_user only needs the SID 2010-12-19 23:25:06 +01:00
Volker Lendecke
d082701ea5 s3: Reply correctly to FSCTL_IS_VOLUME_DIRTY 2010-12-19 23:25:06 +01:00
Jeremy Allison
716ea734e4 Rename vfs operation posix_fallocate to just fallocate and add the vfs_fallocate_mode parameter.
It turns out we need the fallocate operations to be able to both
allocate and extend filesize, and to allocate and not extend
filesize, and posix_fallocate can only do the former. So by defining
the vfs op as posix_fallocate we lose the opportunity to use any
underlying syscalls (like Linux fallocate) that can do the latter
as well.

We don't currently use the non-extending filesize call, but now
I've changed the vfs op definition we can in the future. For the
moment simply map the fallocate op onto posix_fallocate for the
VFS_FALLOCATE_EXTEND_SIZE case and return ENOSYS for the
VFS_FALLOCATE_KEEP_SIZE case.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Dec 18 08:59:27 CET 2010 on sn-devel-104
2010-12-18 08:59:27 +01:00
Jeremy Allison
fe50632d54 file_set_sparse needs to be a handle based call. 2010-12-17 21:11:04 +01:00
Jeremy Allison
2c10c34968 Update our attribute flags. 2010-12-17 21:11:04 +01:00
Björn Jacke
5c27dd67c8 s3:smbd: add file_set_sparse() function
this is based on a patch for 3.3 from metze
2010-12-17 21:11:04 +01:00
Stefan Metzmacher
e55426fe79 s3:rpc_client: let rpc_transport_tstream_init() create read and write queue
metze
2010-12-15 15:26:05 +01:00
Jeremy Allison
a8eed184a0 Implement "use sendfile = yes" for SMB2. (cherry picked from commit 95cb7adcd03a1abbd0af395b6c96dd8e0eebd3d1)
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Dec 15 02:24:08 CET 2010 on sn-devel-104
2010-12-15 02:24:08 +01:00