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

40985 Commits

Author SHA1 Message Date
Rusty Russell
1acf548eb7 dbwrap: remove get_flags().
The flags returned were TDB-specific: this was only used for detecting
the endianness of obsolete databases (the conversion code was put in in
2003, with reference to Samba 2.3).

It's easier to remove it than to translate the NTDB flags to TDB flags,
and it's a really weird thing to ask for anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
fc9b298761 util_tdb: move timeout chainlock variants from source3/lib/util/util_tdb.c
We're about to use them for dbwrap.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Jeremy Allison
dd763d6d8e Fix bug #8974 - Kernel oplocks are broken when uid(file) != uid(process).
Based on a fix from "Etienne Dechamps " <e-t172@akegroup.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jun 21 21:53:58 CEST 2012 on sn-devel-104
2012-06-21 21:53:58 +02:00
Stefan Metzmacher
3c74117e2e s3:idmap_cache: also store negative entries for unknown sids
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jun 21 18:04:05 CEST 2012 on sn-devel-104
2012-06-21 18:04:05 +02:00
Stefan Metzmacher
a65173ae68 s3:winbindd: do not expose negative cache idmap entries as valid mappings (bug #9002)
metze
2012-06-21 16:07:15 +02:00
Stefan Metzmacher
2481158a16 s3:winbindd: discard the expired gid cache if we're online (bug #9002)
This matches the uid case...

metze
2012-06-21 16:07:14 +02:00
Volker Lendecke
a7f4c2b664 s3: Remove an unnecessary ()
Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Jun 21 16:05:30 CEST 2012 on sn-devel-104
2012-06-21 16:05:30 +02:00
Volker Lendecke
7a2daf34f2 s3: Use string_term_tdb_data where appropriate
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-21 14:08:38 +02:00
Volker Lendecke
c6aa36c6c4 s3: Fix const warnings
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-21 14:08:38 +02:00
Andrew Bartlett
33ff033204 s4-provision: Give better clues on what Samba needs for s3fs ACL support
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Jun 21 14:07:55 CEST 2012 on sn-devel-104
2012-06-21 14:07:55 +02:00
Alexander Bokovoy
9e116e8a5e s3-rpcclient: support all known netr_LogonControl2 variants properly
logonctrl2 function in rpcclient did not allow to specify arguments
to most of netr_LogonControl2 function code points.

In addition, make descriptive help to show what is expected at each
function code point.

Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Thu Jun 21 12:11:19 CEST 2012 on sn-devel-104
2012-06-21 12:11:19 +02:00
Michael Adam
b240406651 s3:move serverid_equal() to serverid.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-21 08:27:32 +02:00
Michael Adam
73b200064f s3:util: rename procid_equal() to serverid_equal()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-21 08:27:32 +02:00
Michael Adam
0159344d4c s3:util: remove (now) unused cluster_id_equal()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-21 08:27:31 +02:00
Michael Adam
1eacf3a66f s3:smbstatus: use procid_equal() instead of equivalent cluster_id_equal()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-21 08:27:31 +02:00
Volker Lendecke
53cfde7204 s3: Remove a user of procid_is_me
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-21 08:27:30 +02:00
Volker Lendecke
ca9a734e19 s3: Remove a user of procid_is_me
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-21 08:27:30 +02:00
Michael Adam
6289fcffd7 s3:util: reformat procid_equal() to adhere to coding guidelines
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-21 08:27:29 +02:00
Michael Adam
3bdad95e3b s3:util: also compare the unique_id in procid_equal().
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-21 08:27:29 +02:00
Andrew Bartlett
bc9e12183f s4-torture: Expand whoami test to confirm the user token.
This uses the tokenGroups attribute on LDAP and the posix whoami call
to confirm that user token matches between LDAP and CIFS.

I have a seperate patch for the anonymous case, because this isn't
consistent at this stage, and we need to study and fix that.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jun 20 18:43:43 CEST 2012 on sn-devel-104
2012-06-20 18:43:43 +02:00
Stefan Metzmacher
cd260391fa s3:smbd: fix the build with the --with-profiling-data option
metze
2012-06-20 12:58:58 +02:00
Stefan Metzmacher
0d1f3c1363 s3:include: add START/END_PROFILE_STAMP()
This is needed when the profiling spans multiple functions.

metze
2012-06-20 12:58:58 +02:00
Volker Lendecke
db9180c3d9 idmap-hash: Attempt to fix Coverity ID 709116 Overflowed array index write
Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Jun 20 12:53:59 CEST 2012 on sn-devel-104
2012-06-20 12:53:59 +02:00
Volker Lendecke
963666a3fe idmap-hash: Fix Coverity ID 709117 Dereference before null check
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-20 10:51:14 +02:00
Volker Lendecke
cb614cd2d6 idmap-hash: Fix Coverity 709118 Dereference before null check
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-20 10:51:14 +02:00
Volker Lendecke
0f65745277 idmap-hash: Adapt mapfile_read_line to README.Coding
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-20 10:51:14 +02:00
Volker Lendecke
7c0f12573f idmap-hash: Fix Coverity ID 709119 Unused pointer value
"p" is overwritten further down again before it's first use

Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-20 10:51:14 +02:00
Jeremy Allison
671f61018d Fix unused variable warnings.
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jun 19 21:17:51 CEST 2012 on sn-devel-104
2012-06-19 21:17:51 +02:00
Jeremy Allison
028a7d9b28 Fix unused variable warnings. 2012-06-19 10:27:24 -07:00
Jeremy Allison
53cc8f8011 Remove unused variables. 2012-06-19 10:27:24 -07:00
Jeremy Allison
06cf0a95cd Remove unused variables and code. 2012-06-19 10:27:24 -07:00
Jeremy Allison
76e2f29389 Fix more "set but not used" warnings. 2012-06-19 10:27:24 -07:00
Jeremy Allison
0dfd15c2b3 Fix a bunch of "set but not used" warnings. 2012-06-19 10:27:24 -07:00
Volker Lendecke
acc9302931 s3: We can depend on pthreadpool now
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-06-19 10:27:24 -07:00
Volker Lendecke
8b35a4de38 s3: Add a dummy implementation for the pthreadpool API
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-06-19 10:27:24 -07:00
Jeremy Allison
818fd7e917 Remove unused code now we set the correct command codes. 2012-06-19 10:27:24 -07:00
Jeremy Allison
737acc7807 Fix warning: variable ‘status’ set but not used. 2012-06-19 10:27:23 -07:00
Jeremy Allison
d1bcbd785f Fix warnings using %lu to print a 64-bit value (should by %llu). 2012-06-19 10:27:23 -07:00
Jeremy Allison
6cef2a613c Fix warning: variable ‘in_start_time’ set but not used. 2012-06-19 10:27:23 -07:00
Stefan Metzmacher
e89150597a Revert "s3-lib Remove unused sys_fcntl_long()"
This reverts commit 846a697e20.

This is still used in source3/smbd/oplock_irix.c

metze
2012-06-19 17:04:29 +02:00
Stefan Metzmacher
13cfe2504e s3:rpc_server/lsasd: remove dependency to libgen.h and basename()
metze
2012-06-19 17:04:29 +02:00
Andrew Bartlett
4f15b47324 s3-auth: make_new_system_info_session() now does not query nss
This is important in some situations where these queries might be
costly LDAP queries and is just not required for the system token.
This is because the system token should be just the NT
AUTHORITY\SYSTEM user and just enough unix info to allow the token to
be used.

Andrew Bartlett

Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Jun 19 13:34:28 CEST 2012 on sn-devel-104
2012-06-19 13:34:27 +02:00
Andrew Bartlett
5c67599650 s3-auth: make_new_system_info_session() not query passdb
This is important in some situations where these queries might be
costly LDAP queries and is just not required for the system token.
This is because the system token should be just the NT
AUTHORITY\SYSTEM user and just enough unix info to allow the token to
be used.

We query only NSS to get the name of sec_initial_uid()

Signed-off-by: Andreas Schneider <asn@samba.org>
2012-06-19 10:38:14 +02:00
Andrew Bartlett
8ecee11790 s3-auth: inline make_session_info functions into only callers
With the split up to handle system specially, there is no need for these
static helper functions any more.

Andrew Bartlett

Signed-off-by: Andreas Schneider <asn@samba.org>
2012-06-19 10:38:14 +02:00
Andrew Bartlett
e49656e2ee auth: Use only security_token_is_system to determine that a user is SYSTEM
This removes the duplication on how to detect that a user is system in Samba
now that the smbd system account is also only SID_NT_SYSTEM we can use the same
check everywhere.

Andrew Bartlett

Signed-off-by: Andreas Schneider <asn@samba.org>
2012-06-19 10:38:13 +02:00
Andrew Bartlett
873ec60f54 s3-auth: Fix system token as just being SID_NT_SYSTEM
This removes the SID matching the sec_initial_uid().

Andrew Bartlett

Signed-off-by: Andreas Schneider <asn@samba.org>
2012-06-19 10:38:13 +02:00
Andreas Schneider
faf24ed6ce s3-spoolss: delete_drivers should be called as the connecting user.
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-06-19 10:38:13 +02:00
Rusty Russell
7e80b89d48 ntdb: add autoconf support.
This is copied from tdb; we build the utilities, but as nothing else
links against it, we shouldn't be adding anything to the normal samba
binary sizes.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date(master): Tue Jun 19 07:31:06 CEST 2012 on sn-devel-104
2012-06-19 07:31:06 +02:00
Rusty Russell
316e5e376c lib/tdb_wrap: use tdb directly, not tdb_compat.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-19 05:38:07 +02:00
Rusty Russell
6244f668a3 TDB2: make SAMBA use tdb1 again for the moment.
Otherwise the following surgery will break the SAMBA build and testsuite.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-19 05:38:05 +02:00