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

233 Commits

Author SHA1 Message Date
Volker Lendecke
6bf8243cc7 lib: Remove smb_threads from includes.h
Only used in libsmb_context.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-04-26 21:41:29 +00:00
Volker Lendecke
df9e7c7ae5 lib: Remove global xfile.h includes
This makes it more obvious where this legacy code is used

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Nov 20 06:23:19 CET 2016 on sn-devel-144
2016-11-20 06:23:19 +01:00
Lukas Slebodnik
9643a4b1ef lib/util: Include DEBUG macro in internal header files before samba_util.h
It's best practice to include external header files before internal
header files. In this case internal DEBUG macro cannot be defined and
therefore samba version of debug macro will be included
in header file "util/fault.h".

In file included from example.c:27:0:
src/util/util.h:127:0: error: "DEBUG" redefined [-Werror]
 #define DEBUG(level, format, ...) do { \
 ^
In file included from /usr/include/samba-4.0/util/fault.h:29:0,
                 from /usr/include/samba-4.0/samba_util.h:62,
                 from /usr/include/samba-4.0/ndr.h:30,
                 from example.c:24:
/usr/include/samba-4.0/util/debug.h:182:0: note: this is the location of the previous definition
 #define DEBUG( level, body ) \
 ^
  CC       src/providers/ad/libsss_ad_common_la-ad_domain_info.lo
cc1: all warnings being treated as errors

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11033

Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Mar 11 18:47:22 CET 2015 on sn-devel-104
2015-03-11 18:47:22 +01:00
Jeremy Allison
821bd95156 Replace all uses of setXX[ug]id() and setgroups with samba_setXX[ug]id() calls.
Will allow thread-specific credentials to be added by modifying
the central definitions. Deliberately left the setXX[ug]id()
call in popt as this is not used in Samba.
2012-06-28 17:15:16 -07:00
Andrew Bartlett
d40fe50a67 build: avoid util.h as a public header name due to conflict with MacOS 2011-09-23 09:24:03 +02: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
4acef317a0 lib/util move debug.[ch] out of the way
This will allow a modified version of the s3 debug system to be the
new common debug system.

Andrew Bartlett
2011-03-01 03:46:18 +01:00
Andrew Tridgell
9432eabb2f developer: only do the C++ reserved name checking on Linux
this prevents us breaking the solaris build, but will still mean we
prevent C++ vars in our code
2010-11-17 23:55:39 +11:00
Matthias Dieter Wallnöfer
16aa0744c6 s4:UID wrapper - Fix includes
The includes of the UID wrapper headers werent't really efficient according
to metze's post on the technical mailing list (http://lists.samba.org/archive/samba-technical/2010-February/069165.html).
To achieve this move the "uid_wrapper.h" includes into "lib/util/unix_privs.c",
 "lib/util/util.c", "ntvfs/posix/pvfs_acl.c" and "ntvfs/unixuid/vfs_unixuid.c".
2010-02-05 19:47:26 +01:00
Matthias Dieter Wallnöfer
d89427ad27 Revert "s4:include/includes.h - Need to include "system/network.h""
This reverts commit 97fd03a15a.

This obviously broke the build. Revert it for now.
2010-01-29 21:36:23 +01:00
Matthias Dieter Wallnöfer
97fd03a15a s4:include/includes.h - Need to include "system/network.h"
Otherwise I don't get the definition of "struct in_addr" for "lib/util/util.h" on CentOS 4.
2010-01-29 20:13:38 +01:00
Kai Blin
b35dcd7a18 s4 includes: Include system/locale.h to get access to <ctype.h> 2010-01-25 14:31:33 +01:00
Stefan Metzmacher
251b03eee6 s4:cmdline: setup talloc log and abort functions
metze
2009-08-24 16:29:59 +10:00
Andrew Tridgell
58e5e1ea8d make the UID_WRAPPER skip checks at runtime
This fixes two issues pointed out by Andrew. It adds a runtime
uwrap_enabled() call that wraps the skips needed for uid emulation. It
also makes the skip in the directory_create_or_exist() function only
change the uid checking code, not the permissions code
2009-08-05 11:21:06 +10:00
Andrew Tridgell
fd43e0ee09 added a uid_wrapper library
This library intercepts seteuid and related calls, and simulates them
in a manner similar to the nss_wrapper and socket_wrapper
libraries. This allows us to enable the vfs_unixuid NTVFS module in
the build farm, which means we are more likely to catch errors in the
token manipulation.

The simulation is not complete, but it is enough for Samba4 for
now. The major areas of incompleteness are:

 - no emulation of setreuid, setresuid or saved uids. These would be
   needed for use in Samba3

 - no emulation of ruid changing. That would also be needed for Samba3

 - no attempt to emulate file ownership changing, so code that (for
   example) tests whether st.st_uid matches geteuid() needs special
   handling
2009-08-05 10:51:00 +10:00
Jeremy Allison
0f1b402848 Try and fix the S4 build - include thread includes.
Jeremy.
2009-04-14 13:02:29 -07:00
Jelmer Vernooij
75783473d1 Remove unused CONST_DISCARD macro. 2009-03-15 03:05:46 +01:00
Jeremy Allison
7d73130125 Fix the build. When you do "make distclean; ./autogen; ./configure; make" and it still doesn't build you know it's messed up.
Jeremy.
2009-02-13 10:36:11 -08:00
Stefan Metzmacher
bab6294269 s4:includes: copy #error DONT_USE_CPLUSPLUS_RESERVED_NAMES from source3
We should not use c++ reserved names in source4 too.

metze
2009-02-02 13:09:21 +01:00
Stefan Metzmacher
23bec6c670 s4:includes.h: stdlib.h and stdbool.h are already included by replace.h
metze
2009-02-02 13:08:39 +01:00
Jelmer Vernooij
9de80e7abc Samba3: Include util.h header file rather than having custom prototypes. 2008-11-01 03:14:43 +01:00
Jelmer Vernooij
0218669d62 Remove include/local.h and move defines to more appropriate places. 2008-10-24 17:53:38 +02:00
Jelmer Vernooij
23302413b3 Remove unused include param/param.h. 2008-10-24 16:37:56 +02:00
Jelmer Vernooij
2911b792ca Fix include, clean up .o files in ../lib and ../libcli
Conflicts:

	source4/Makefile
2008-10-11 21:33:55 +02:00
Jelmer Vernooij
caa4e42860 Move lib/util from source4 to top-level libutil.
Conflicts:

	source4/Makefile
2008-10-11 21:05:38 +02:00
Jelmer Vernooij
0888ffa2b7 Make Samba 3 and Samba 4 both use the same single copy of libreplace. 2008-09-16 16:30:14 +02:00
Andrew Tridgell
310875e637 Change our module code to not use the special symbol name init_module()
Current glibc libraries include a function called init_module(). If we
use the same name, then a dlsym() can find the glibc function if the
module doesn't have an initialisation function.

In ldb, none of our modules have an init_module(), so we end up calling the libc
functions with bogus arguments.
(This used to be commit 1b06210689)
2008-06-17 13:11:29 +10:00
Jelmer Vernooij
da6d24c459 r25555: Remove support for BOOL, True and False.
(This used to be commit 18a2bcfa9e)
2007-10-10 15:07:55 -05:00
Jelmer Vernooij
9b009c9009 r25301: Merge my includes.h cleanups.
(This used to be commit 37425495f3)
2007-10-10 15:07:09 -05:00
Jelmer Vernooij
f415ba5bcf r25267: Move PRINTF_ATTRIBUTE to lib/util as well.
(This used to be commit 72b9d6c036)
2007-10-10 15:07:03 -05:00
Jelmer Vernooij
6a167124cd r25265: Move attribute definitions to lib/util.
(This used to be commit 5bb9f041f4)
2007-10-10 15:07:02 -05:00
Jelmer Vernooij
ffeee68e4b r25026: Move param/param.h out of includes.h
(This used to be commit abe8349f9b)
2007-10-10 15:05:38 -05:00
Jelmer Vernooij
8d182d881d r24816: Move the rest of the contents of core.h to more appropriate places.
include/ now only contains build system related headers, all other headers are
now near the source code they're related to.
(This used to be commit 6890a01dbf)
2007-10-10 15:03:15 -05:00
Jelmer Vernooij
82037a75ea r24814: Fix headers, trim core.h even more.
(This used to be commit 9647f860bd)
2007-10-10 15:03:14 -05:00
Jelmer Vernooij
61ffa08f4c r24712: No longer expose the 'BOOL' data type in any interfaces.
(This used to be commit 1ce32673d9)
2007-10-10 15:02:54 -05:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Jelmer Vernooij
c2781df0d5 r23289: Provide support for GCC attributes _PURE_, _NONNULL_, _DEPRECATED_, _NORETURN_ and _WARN_UNUSED_RESULT_.
(This used to be commit 44248f662f)
2007-10-10 14:53:08 -05:00
Jelmer Vernooij
253c1bec46 r20298: Fix pidl tests (missing symlink..).
(This used to be commit ab3d573946)
2007-10-10 14:29:34 -05:00
Stefan Metzmacher
b6582987fe r19242: merge from samba3:
handle NO_CONFIG_H in libreplace

metze
(This used to be commit 909d736a4b)
2007-10-10 14:20:56 -05:00
Stefan Metzmacher
c447b8a199 r18448: this gives nicer output...
metze
(This used to be commit 6bdb329da5)
2007-10-10 14:18:31 -05:00
Stefan Metzmacher
a57133c56e r18447: make sure we bail out if the config.h is not generated
by samba's configure.

this could happen when you have done a standalone build in
lib/replace/, lib/talloc, ...

metze
(This used to be commit d8e8838674)
2007-10-10 14:18:31 -05:00
Andrew Tridgell
f64b2474be r18278: move more header checks and _GNU_SOURCE into libreplace
(This used to be commit 77c442cd46)
2007-10-10 14:18:00 -05:00
Jelmer Vernooij
a59706f721 r18121: Simplify m4 code, hopefully fix Samba4 build problems.
(This used to be commit 1adf65b4d7)
2007-10-10 14:17:35 -05:00
Andrew Tridgell
3953c21202 r18118: its the job of libreplace to handle things like this
(This used to be commit fa47301c0e)
2007-10-10 14:17:34 -05:00
Andrew Tridgell
b7477fb388 r18117: first steps in making samba4 use libreplace
(This used to be commit c079cedb08)
2007-10-10 14:17:34 -05:00
Jelmer Vernooij
847e80dee9 r15224: Check whether -MT is actually supported by the compiler before using
automatic dependencies
(This used to be commit 6598efc6b3)
2007-10-10 14:04:20 -05:00
Jelmer Vernooij
4a61e4901e r14999: Remove more unused autoconf code
Simplify va_copy() replacement code a bit
(This used to be commit a5c87360a7)
2007-10-10 14:04:00 -05:00
Jelmer Vernooij
c50125f6ef r14844: Support a stdbool.h replacement in lib/replace/
(This used to be commit bccfddcafa)
2007-10-10 13:59:41 -05:00
Jelmer Vernooij
935af3eb19 r14724: Rearrange some source files, install more headers.
(This used to be commit 7146c1600f)
2007-10-10 13:59:14 -05:00
Jelmer Vernooij
35349a58df r14542: Remove librpc, libndr and libnbt from includes.h
(This used to be commit 51b4270513)
2007-10-10 13:58:42 -05:00