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

719 Commits

Author SHA1 Message Date
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
09065795d6 Remove unused constants from local.h. 2008-10-23 18:13:25 +02:00
Jelmer Vernooij
c0e14d5021 Repel pstring to nsswitch/. 2008-10-22 05:14:14 +02:00
Jelmer Vernooij
6d9b24de78 Remove pstring usages. 2008-10-22 04:25:00 +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
Andrew Bartlett
a72869d77b r25619: As perhaps could have been expected, the CFLAGS hack broke all non-gcc
compilers.

Instead, as jelmer suggests, remove the depricated marker on fstring,
for as long as it is used in the samba3 winbind protocol.

Andrew Bartlett
(This used to be commit b15df834ae)
2007-12-21 05:42:55 +01: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
09c188e735 r24812: Fix headers for external users.
(This used to be commit ff6684adfd)
2007-10-10 15:03:13 -05:00
Jelmer Vernooij
0b91f39164 r24780: More work allowing libutil to be used by external users.
(This used to be commit 31993cf67b)
2007-10-10 15:03:10 -05:00
Jelmer Vernooij
f93a18eeb7 r24715: Mark fstring and pstring as deprecated.
(This used to be commit c8118f1561)
2007-10-10 15:02:54 -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
97416e6b01 r21297: Remove the GTK+ tools and library from the main repository. They are now maintained separately in bzr at http://people.samba.org/bzr/jelmer/samba-gtk
This also adds some more headers to the list that is installed and a couple of extra #include lines so these
headers can be used externally without problems.
(This used to be commit 07652f65ce)
2007-10-10 14:48:04 -05:00
Andrew Tridgell
1c211a2e43 r20650: revert a bunch of code I didn't mean to commit yet
(This used to be commit b3e2d49087)
2007-10-10 14:37:26 -05:00
Andrew Tridgell
f6274959ba r20647: add cluster code
(This used to be commit 5870830b99)
2007-10-10 14:37:24 -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
Andrew Bartlett
d471e52d23 r20149: Remove the smb.conf distinction between PDC and BDC. Now the correct
way to setup a Samba4 DC is to set 'server role = domain controller'.

We use the fSMORoleOwner attribute in the base DN to determine the PDC.

This patch is quite large, as I have corrected a number of places that
assumed taht we are always the PDC, or that used the smb.conf
lp_server_role() to determine that.

Also included is a warning fix in the SAMR code, where the IDL has
seperated a couple of types for group display enumeration.

We also now use the ldb database to determine if we should run the
global catalog service.

In the near future, I will complete the DRSUAPI
DsGetDomainControllerInfo server-side on the same basis.

Andrew Bartlett
(This used to be commit 67d8365e83)
2007-10-10 14:29:15 -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