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

6291 Commits

Author SHA1 Message Date
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