1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00
Commit Graph

3609 Commits

Author SHA1 Message Date
Jeremy Allison
7885b68bb5 r23512: Fix conflict in #define for SECDESC_PREFIX. Ensure all
reg #defines use "REG_" prefix. Michael - please check
gcc warnings on compiles.
Jeremy.
2007-10-10 12:23:23 -05:00
James Peach
171dc060e2 r23510: Tidy calls to smb_panic by removing trailing newlines. Print the
failed expression in SMB_ASSERT.
2007-10-10 12:23:23 -05:00
Michael Adam
24b0cbcb37 r23509: This activates the global options from the registry in loadparm.
The global options are stored as values in the subkey "global"
of the SMBCONF registry key.

The activation is accomplished in smb.conf though a new special
semantic of the "include" parameter: "include = registry" triggers
the processing of the registry global options exactly at the
position of the include statement. Options read from the registry
take the same precedence as parameters loaded from a file via
include. Need to reload the registry globals is detected by
watching the tdb sequence number.

Registry shares are automatically activated when the registry
globals are processed.

So a "registry only" configuration can be realized by an
smb.conf that looks as follows:

================================
[global]
include = registry
================================

The global options and registry shares can be conveniently
edited with the "net conf" utility.

Caveat:

A possible pitfall consists in using "include = registry"
together with the "lock directory" directive in the registry.
This problem will be addressed in the next time.

Note on the code:

Processing of the registry options is accomplished by a function
process_registry_globals() in loadparm.c The current version is
only an interim solution: It is handcoded instead of using the
infrastructure of reg_api.c. The reason for this is that using
reg_api still has too large linker dependencies, bloating virtually
all targets by PASSDB_OBJ, SMBLDAP_OBJ, GROUPDB_OBJ and LDB stuff.
A version of process_registry_globals that uses reg_api is
included but commented out. The goal is to eventually refactor
and restructure the registry code so that one can use the reg_api
to access only the registry tdb and not link all the dynamic
backends with all their linking implications.
2007-10-10 12:23:23 -05:00
Michael Adam
efd3e2bfb7 r23485: This checkin consists mostly of refactorings in preparation of the
activation of global registry options in loadparm.c, mainly to
extract functionality from net_conf.c to be made availabel elsewhere
and to minimize linker dependencies.

In detail:

* move functions registry_push/pull_value from lib/util_reg.c to new file
  lib/util_reg_api.c

* create a fake user token consisting of builtin administrators sid and
  se_disk_operators privilege by hand instead of using get_root_nt_token()
  to minimize linker deps for bin/net.

  + new function registry_create_admin_token() in new lib/util_reg_smbconf.c
  + move dup_nt_token from auth/token_util.c to new file lib/util_nttoken.c
  + adapt net_conf.c and Makefile.in accordingly.

* split lib/profiles.c into two parts: new file lib/profiles_basic.c
  takes all the low level mask manipulation and format conversion functions
  (se_priv, privset, luid). the privs array is completely hidden from
  profiles.c by adding some access-functions. some mask-functions are not
  static anymore.

  Generally, SID- and LUID-related stuff that has more dependencies
  is kept in lib/profiles.c

* Move initialization of regdb from net_conf.c into a function
  registry_init_regdb() in lib/util_reg_smbconf.c.

Michael
2007-10-10 12:23:21 -05:00
Volker Lendecke
15553d6327 r23410: Merge the core of the cluster code.
I'm 100% certain I've forgotten to merge something, but the main code
should be in. It's mainly in dbwrap_ctdb.c, ctdbd_conn.c and
messages_ctdbd.c.

There should be no changes to the non-cluster case, it does survive make
test on my laptop.

It survives some very basic tests with ctdbd enables, I did not do the
full test suite for clusters yet.

Phew...

Volker
2007-10-10 12:23:14 -05:00
Jeremy Allison
9300b92f7a r23400: Fix lsa crash bug #4683. The "names" enum struct
in a lookup_sidX reply isn't optional - like the
lookup_sidX query it needs to be defined in the
struct.
All this will go away with PIDL (thank goodness....).
Jerry - I think this is a showstopper to be merged
for 3.0.25b.
I'll be watching the build farm to see if anything broke.
Jeremy.
2007-10-10 12:23:13 -05:00
Günther Deschner
5e75ea7f2b r23380: netr_getdcname returns WERROR not NTSTATUS.
Guenther
2007-10-10 12:23:12 -05:00
Jeremy Allison
f2ac311ed4 r23341: pdb interfaces should be versioned. As SAMBA_3_0 and SAMBA_3_0_26
are now identical, use the same version number (16) for both.
Jeremy.
2007-10-10 12:23:07 -05:00
Stefan Metzmacher
bd1b28dd3e r23328: don't typedef ber_tag_t when it's already done by openldap
headers on HP-UX (lber_types.h defines _LBER_TYPES_H).

metze
2007-10-10 12:23:06 -05:00
Stefan Metzmacher
5e9b84326b r23307: move readahead stuff out of libreplace and make it samba3 specific
as we can't replace this function in libreplace and we do
the some stuff for other function in the same way.

metze
2007-10-10 12:23:05 -05:00
James Peach
7aa40efd28 r23300: AFAICT these are not needed. Jerry, can you please review and revert
if this is not correct.
2007-10-10 12:23:04 -05:00
Gerald Carter
ebcae48ec1 r23274: merge CloseEventlog() pidl conversion from 3.0.26 && fix a few init call renames for svcctl in the previous commit 2007-10-10 12:23:02 -05:00
Gerald Carter
0b1bc3521f r23271: merge service control pidl change for CloseServiceHandle() from SAMBA_3_0_26 2007-10-10 12:23:01 -05:00
Gerald Carter
22a3ea40ac r23251: whoops! Fix compile error 2007-10-10 12:22:59 -05:00
Gerald Carter
bcc8a3290a r23244: Fix loop with nscd and NSS recusive calls.
> Here's the problem I hit:
>
> getgrnam("foo") -> nscd -> NSS -> winbindd ->
>   winbindd_passdb.c:nam_to_sid() -> lookup_global_sam_name() ->
>   getgrnam("foo") -> nscd -> ....
>
> This is in the SAMBA_3_0 specifically but in theory could happen
> SAMBA_3_0_25 (or 26) for an unknown group.
>
> The attached patch passes down enough state for the
> name_to_sid() call to be able to determine the originating
> winbindd cmd that came into the parent.  So we can avoid
> making more NSS calls if the original call came in trough NSS
> so we don't deadlock ?  But you should still service
> lookupname() calls which are needed for example when
> doing the token access checks for a "valid groups" from
> smb.conf.
>
> I've got this in testing now.  The problem has shown up with the
> DsProvider on OS X and with nscd on SOlaris and Linux.
2007-10-10 12:22:58 -05:00
Volker Lendecke
b38dc5ffdf r23220: Add traverse_read to dbwrap 2007-10-10 12:22:55 -05:00
Günther Deschner
def6464c87 r23210: Very funny, we thought to use netr_GetDcName (e.g. in winbind) but were using
netr_GetDcAnyName all the time (which is the correct thing to do).

Fix the naming and opcode mixup in all branches.

Guenther
2007-10-10 12:22:54 -05:00
Volker Lendecke
7e39d77c1f r23204: Add MSG_SMB_BRL_VALIDATE. Tridge, this is a bit different from your bzr
branch, please check if it fulfils your needs.

Two changes: The validation is not done inside the brlock.c traverse_fn,
it's done as a separate routine.

Secondly, this patch does not call the checker routines in smbcontrol
directly but depends on a running smbd.
2007-10-10 12:22:53 -05:00
Volker Lendecke
c91b2bdc16 r23195: Add void *private_data to brl_forall 2007-10-10 12:22:53 -05:00
Volker Lendecke
9b10dbbd5d r23183: Check in a change made by Tridge:
This replaces the internal explicit dev/ino file id representation by a
"struct file_id". This is necessary as cluster file systems and NFS
don't necessarily assign the same device number to the shared file
system. With this structure in place we can now easily add different
schemes to map a file to a unique 64-bit device node.

Jeremy, you might note that I did not change the external interface of
smb_share_modes.c.

Volker
2007-10-10 12:22:52 -05:00
Volker Lendecke
84f9885cf8 r23165: Convert brlock.tdb to dbwrap 2007-10-10 12:22:50 -05:00
Volker Lendecke
afe90224bf r23163: Convert locking.tdb to dbwrap 2007-10-10 12:22:50 -05:00
Günther Deschner
52fdbbda53 r23128: Fix typo.
Guenther
2007-10-10 12:22:48 -05:00
Günther Deschner
37ae7f4197 r23127: Fill in some more netlogon dsgetdcname flavours (netr_DsRGetDCNameEx,
netr_DsRGetDCNameEx2) and add new ds request and reply flags, also add some
more WERROR codes.

Guenther
2007-10-10 12:22:48 -05:00
Volker Lendecke
a925e0991f r23117: Factor out local messaging.
This removes message_block / message_unblock. I've talked to Jeremy and
Günther, giving them my reasons why I believe they have no effect.
Neither could come up with a counter-argument, so they go :-)
2007-10-10 12:22:47 -05:00
Volker Lendecke
3f5eb8a960 r23112: Trim down the message.c API slightly: The messages_pending_for_pid is now
replaced by MSG_FLAG_LOWPRIORITY or'ed into the msg_type. To enable this,
changed the msg_type definitions to hexadecimal.

This way we could theoretically add the MSG_FLAG_NODUPLICATES again, but I
would rather not do this, because that one is racy and can't be guaranteed at
all.
2007-10-10 12:22:47 -05:00
Jeremy Allison
932523cbb5 r23105: Add lchown to the vfs layer. We need this in the POSIX code.
Jeremy.
2007-10-10 12:22:46 -05:00
Jeremy Allison
a301467d5f r23100: Implement the delete on close semantics I've just tested for
in Samba4 smbtorture. Fix rename on an open file handle.
Needed for 3.0.25a.
Jeremy.
2007-10-10 12:22:46 -05:00
Volker Lendecke
eaefd00563 r23055: Rewrite messages.c to use auto-generated marshalling in the tdb. I'm
doing this because for the clustering the marshalling is needed in more
than one place, so I wanted a decent routine to marshall a message_rec
struct which was not there before.

Tridge, this seems about the same speed as it used to be before, the
librpc/ndr overhead in my tests was under the noise.

Volker
2007-10-10 12:22:17 -05:00
Jeremy Allison
a53268fb20 r22920: Add in the UNIX capability for 24-bit readX, as discussed
with the Apple guys and Linux kernel guys. Still looking
at how to do writeX as there's no recvfile().
Jeremy.
2007-10-10 12:22:08 -05:00
Gerald Carter
f65214be68 r22852: merge fixes for CVE-2007-2446 and CVE-2007-2447 to all branches 2007-10-10 12:22:02 -05:00
Volker Lendecke
3d3d61687e r22844: Introduce const DATA_BLOB data_blob_null = { NULL, 0, NULL }; and
replace all data_blob(NULL, 0) calls.
2007-10-10 12:22:01 -05:00
Lars Müller
1351207626 r22841: Add comment to endif statement. 2007-10-10 12:22:01 -05:00
Lars Müller
e522fb9bb7 r22839: Fix endif comment. 2007-10-10 12:22:01 -05:00
Günther Deschner
e4e8f84060 r22800: Add GPO_SID_TOKEN and an LDAP function to get tokensids from the tokenGroup attribute.
Guenther
2007-10-10 12:21:59 -05:00
Günther Deschner
e138cbc876 r22798: Add the "apply group policy" access bit (as seen in type 0x05 ALLOWED OBJECT
ACEs).

Guenther
2007-10-10 12:21:58 -05:00
Günther Deschner
648df57e53 r22797: We are only interested in the DACL of the security descriptor, so search with
the SD_FLAGS control.

Guenther
2007-10-10 12:21:57 -05:00
Günther Deschner
b376a39fbf r22796: Add security descriptor to GROUP_POLICY_OBJECT structure (in preparation of
adding GPO security filtering for libgpo).

Guenther
2007-10-10 12:21:57 -05:00
Volker Lendecke
590d2164b3 r22786: Some cleanup by Karolin Seeger: Remove unused pdb_find_alias, and change
return values of some alias-releated pdb functions from BOOL to NTSTATUS

Thanks :-)
2007-10-10 12:21:57 -05:00
Volker Lendecke
e9d7484ca2 r22775: For the cluster code I've developed a wrapper around tdb to put different
database backends in place dynamically.

The main abstractions are db_context and db_record, it should be mainly
self-describing, see include/dbwrap.h.  You open the db just as you would open
a tdb, this time with db_open(). If you want to fetch a record, just do the
db->fetch() call, if you want to do operations on it, you need to get it with
fetch_locked().

I added dbwrap_file.c (not heavily tested lately) as an example for what can
be done with that abstraction, uses a file per key. So if anybody is willing
to shape that up, we might have a chance on reiserfs again.... :-)

This abstraction works fine for brlock.tdb, locking.tdb, connections.tdb and
sessionid.tdb. It should work fine for the others as well, I just did not yet
get around to convert them.

If nobody loudly screams NO, then I will import the code that uses this soon.

Volker
2007-10-10 12:21:56 -05:00
Volker Lendecke
be7bac55c3 r22751: Next step for the cluster merge: sessionid.tdb should contain a 'struct
server_id' instead of a 'uint32 pid'
2007-10-10 12:21:54 -05:00
Michael Adam
7cae0d6117 r22739: Make prototypes in include/util_tdb.h of some functions from
lib/util_tdb.c exactly match the definitions. (There were
some [u]int_32_t instead of [u]int32, which made a gcc 2.95
on an old AIX without system [u]int32[_t] types complain...)
2007-10-10 12:21:53 -05:00
Volker Lendecke
0ad4b1226c r22736: Start to merge the low-hanging fruit from the now 7000-line cluster patch.
This changes "struct process_id" to "struct server_id", keeping both is
just too much hassle. No functional change (I hope ;-))

Volker
2007-10-10 12:21:52 -05:00
Derrell Lipman
cc0cd3a12f r22732: - Testing of libsmbclient against Vista revealed what is likely a bug in
Vista.  Vista provides a plethora of kludges to simulate older versions of
  Windows.  The kludges are in the form of shortcuts (or more likely symbolic
  links, but I don't know enough about Vista to determine that definitively)
  and in most cases, attempts to access them get back an "access denied"
  error.  On one particular folder, however, "<share>/Users/All Users", it
  returns an unknown (to ethereal and the Samba3 code) NT status code:
  0x8000002d.  Although this code does not have a high byte of 0xc0 indicating
  that it is an error, it appears to be an alternate form of "access denied".

  Without this patch, libsmbclient times out on an attempt to enumerate that
  folder rather than returning an error to the caller.  This patch corrects
  that problem.
2007-10-10 12:21:52 -05:00
Gerald Carter
24616f7d6b r22712: Inform the user when logging in via pam_winbind
and the krb5 tkt cache could not be created due to clock skew.
2007-10-10 12:21:49 -05:00
Gerald Carter
9cf6068f1e r22704: Implement three step method for enumerating domain trusts.
(a) Query our primary domain for trusts
(b) Query all tree roots in our forest
(c) Query all forest roots in trusted forests.

This will give us a complete trust topology including
domains via transitive Krb5 trusts.  We also store the
trust type, flags, and attributes so we can determine
one-way trusted domains (outgoing only trust path).
Patch for one-way trusts coming in a later check-in.

"wbinfo -m" now lists all domains in the domain_list() as held
by the main winbindd process.
2007-10-10 12:21:47 -05:00
Volker Lendecke
8e0e278961 r22688: Change lock_data in struct byte_range_lock from void * to struct lock_struct * 2007-10-10 12:21:46 -05:00
Günther Deschner
dcd902f24a r22664: When we have krb5_get_init_creds_opt_get_error() then try to get the NTSTATUS
codes directly out of the krb5_error edata.

Guenther
2007-10-10 12:19:53 -05:00
Jeremy Allison
da78488b86 r22564: Move the _strict -> _zeronull functions into lib/util.c
and out of talloc at tridge's request.
Jeremy.
2007-10-10 12:19:45 -05:00
Jeremy Allison
efb43432b0 r22543: Fix bad call to talloc_strict (too few args).
Should fix build farm breakage.
Jeremy.
2007-10-10 12:19:44 -05:00
Jeremy Allison
f6fa3080fe r22542: Move over to using the _strict varients of the talloc
calls. No functional changes. Looks bigger than it is :-).
Jeremy.
2007-10-10 12:19:44 -05:00
Jeremy Allison
d3df922038 r22492: Add objectid code.
Jeremy.
2007-10-10 12:19:39 -05:00
Günther Deschner
9ec76c5427 r22479: Add "net ads keytab list".
Guenther
2007-10-10 12:19:37 -05:00
Günther Deschner
664db1cff6 r22468: Fixing implicit declaration of krb5_set_default_tgs_ktypes (which is hidden by
KRB5_PRIVATE in MIT and doesn't exist on Heimdal).

Guenther
2007-10-10 12:19:37 -05:00
Günther Deschner
f6ade770bd r22465: Last attempt to fix the build before dinner.
Guenther
2007-10-10 12:19:36 -05:00
Günther Deschner
4984af2c66 r22463: Add prototype.
Guenther
2007-10-10 12:19:35 -05:00
James Peach
fc8589a337 r22418: Support running under launchd. We abstract the method of obtaining
sockets to listen on a little, because in the launchd case these
are provided for us. We also add an idle timeout so that a daemon
can exit after a period of inactivity.
2007-10-10 12:19:33 -05:00
James Peach
19c929c633 r22417: Refactor the various daemon run-mode options to make the semantics
of the various flags explicit.
2007-10-10 12:19:33 -05:00
Jeremy Allison
2d80a96120 r22391: Looks bigger than it is. Make "inbuf" available
to all callers of smb_setlen (via set_message()
calls). This will allow the server to reflect back
the correct encryption context.
Jeremy.
2007-10-10 12:19:30 -05:00
Gerald Carter
3b24dae9e7 r22390: Patchset sent to samba-technical to address the winbind
loop when allocating a new id for a SID:

auth_util.patch		Revert create_local_token() to
			the 3.0.24 codebase

idmap_type.patch	Have the caller fillin the
			id_map.xid.type field when
			resolving a SID so that if we allocate
			a new id, we know what type to use

winbindd_api.patch	Remove the WINBINDD_SIDS_TO_XIDS calls
			from the public winbindd interface
			for the 3.0.25 release

idmap_rid.patch		Cleanup the idmap_rid backend to not
			call back into winbindd to resolve
			the SID in order to verify it's type.
2007-10-10 12:19:30 -05:00
Simo Sorce
ee40cead09 r22343: Commit to 3_0 as well after adapting the patch.
(tdb_delete_bystring instead of tdb_delete is used here)
2007-10-10 12:19:27 -05:00
Stefan Metzmacher
1ca12b1c9e r22315: move tdbback.c content into tdbbackup.c
and make the functions static.

also use libreplace headers in tdbbackup.c

metze
2007-10-10 12:19:26 -05:00
Stefan Metzmacher
8a7d2e633b r22298: move ZERO_*, ARRAY_SIZE and PTR_DIFF macros into libreplace
metze
2007-10-10 12:19:24 -05:00
Stefan Metzmacher
9b45075a26 r22277: __location__ is defined in libreplace now
metze
2007-10-10 12:19:24 -05:00
Jeremy Allison
e59b5276b5 r22266: Fix bug #4512 - we were returning a volume label greater than
32 unicode chars. Windows XP doesn't like that :-).
Jeremy
2007-10-10 12:19:23 -05:00
Alexander Bokovoy
f36bc61d17 r22172: FSCTL_RECALL_FILE is 0x90117 according to my traces. Record it here. 2007-10-10 12:19:18 -05:00
Jeremy Allison
512542c90a r22154: Make struct smbdb_ctx an opaque pointer so users of the API
don't need to have tdb.h.
Jeremy.
2007-10-10 12:19:17 -05:00
Jeremy Allison
be742f2481 r22123: Try and fix the csc (#4404) bug by supporting the extended
response to NTCreateX - need to fix this also for
pipe open and NTTransCreate as well so this isn't
finished.
Jeremy.
2007-10-10 12:19:14 -05:00
Jeremy Allison
137953226a r22122: Start to fix csc issue with Vista. Make smbd support
the extended 7 word response for tconX rather than the
3 word one we supported previously.
Jeremy.
2007-10-10 12:19:14 -05:00
Jeremy Allison
4de297112b r22108: Fix from <don.mccall@hp.com> to try and fix the HPUX builds.
Jeremy.
2007-10-10 12:19:13 -05:00
Gerald Carter
eab9ca7e7d r22104: BUG 4439: Fix the object picket on x64 WIndopws XP/2003.
Enable the DsRoleGetPrimaryDomainInfo() server code.
Tested by Win2000/XP/2003/Vista (x86) and WinXP (x64)
2007-10-10 12:19:12 -05:00
Jeremy Allison
0c8949ff5d r22062: Fix the parsing of info level 3. Flags is not a flags
field, but an offset. Fixed 64-bit display of ACLs on
printers.
Jeremy.
2007-10-10 12:19:07 -05:00
Jelmer Vernooij
ad98126187 r22055: Port the endpoint mapper (and functions it requires) to Samba 3. 2007-10-10 12:19:06 -05:00
Jeremy Allison
b70af25e85 r22049: HPUX build fixes from <don.mccall@hp.com>.
Jeremy.
2007-10-10 12:19:05 -05:00
Andrew Bartlett
e3e0ec25e6 r22020: Make it more clear that both the vuser struct and it's contents are
talloc_free()'ed at the end of a session.

Rework the passwd cache code to use talloc_unlink and
talloc_reference, to more carefully manage the cache.

Andrew Bartlett
2007-10-10 12:19:03 -05:00
Stefan Metzmacher
3a28443079 r22009: change TDB_DATA from char * to unsigned char *
and fix all compiler warnings in the users

metze
2007-10-10 12:19:00 -05:00
Jeremy Allison
7d30737c8d r22003: Fix from Jiri.Sasek@Sun.COM to wrap our krb5_locate_kdc
call as smb_krb5_locate_kdc to prevent incorrect linking
and crashes on Solaris.
Jeremy.
2007-10-10 12:18:59 -05:00
Jeremy Allison
ae8f3649f7 r21991: I hate Steve French :-). Add support for encryption
contexts....
Jeremy.
2007-10-10 12:18:58 -05:00
Jeremy Allison
fbc569b530 r21969: Start working on the gss-side of the server negotiation.
Jeremy.
2007-10-10 12:18:54 -05:00
Jeremy Allison
662344d1ec r21926: Fix missing enum specifier pointed out by Don McCall @ HP.
Thanks Don !
Jeremy.
2007-10-10 12:18:49 -05:00
Jeremy Allison
a226645353 r21917: Start to do the gss versions of sign+seal.
Jeremy.
2007-10-10 12:18:48 -05:00
Jeremy Allison
638b03242d r21883: Try and fix the build by removing the prototypes for
functions that take a gss context handle in includes.h
Jeremy.
2007-10-10 12:18:43 -05:00
Jeremy Allison
d3f3ced6c8 r21880: Make client and server calls into encryption code symetrical,
depending on encryption context pointer.
Jeremy.
2007-10-10 12:18:43 -05:00
Jeremy Allison
530ac29abf r21876: Start adding in the seal implementation - prototype code
for the server side enc. (doesn't break anything).
I'll keep updating this until I've got NTLM seal working
on both client and server, then add in the gss level
seal.
Jeremy.
2007-10-10 12:18:42 -05:00
Gerald Carter
328807ec7b r21875: BUG 3275: Patch from Andy Polyakov <appro@fy.chalmers.se>
Relax check for i386 header checks in the PE header of printer
driver files.  Thus allowing uploading of x64 print drivers
from 64bit Windows clients.
2007-10-10 12:18:42 -05:00
Volker Lendecke
6226b30f38 r21870: Move sending auth_server keepalives out of the main loop into an idle event.
Volker
2007-10-10 12:18:41 -05:00
Jeremy Allison
5bfe638f21 r21865: Add in the stubs for SMB transport encryption. Will flesh
these out as I implement. Don't add to SAMBA_3_0_25, this
is experimental code.
NFSv4 you're now officially on notice... :-).
Jeremy.
2007-10-10 12:18:40 -05:00
Jeremy Allison
c426340fc7 r21845: Refactor the sessionsetupX code a little to allow us
to return a NT_STATUS_TIME_DIFFERENCE_AT_DC error to
a client when there's clock skew. Will help people
debug this. Prepare us for being able to return the
correct sessionsetupX "NT_STATUS_MORE_PROCESSING_REQUIRED"
error with associated krb5 clock skew error to allow
clients to re-sync time with us when we're eventually
able to be a KDC.
Jeremy.
2007-10-10 12:18:37 -05:00
Volker Lendecke
fd0ee6722d r21831: Back out r21823 for a while, this is going into a bzr tree first.
Volker
2007-10-10 12:18:37 -05:00
Volker Lendecke
f94e5af72e r21823: Let secrets_store_machine_password() also store the account name. Not used
yet, the next step will be a secrets_fetch_machine_account() function that
also pulls the account name to be used in the appropriate places.

Volker
2007-10-10 12:18:36 -05:00
Jeremy Allison
7a7862c01d r21800: Check-in the DFS rewrite. I am still testing this but it
works from smbclient and Windows, and I am promising to
support and fix both client and server code moving forward.
Still need to test the RPC admin support but I haven't
changed that code.
Jeremy.
2007-10-10 12:18:34 -05:00
Volker Lendecke
af3308ce5a r21784: Replace smb_register_idle_event() with event_add_timed(). This fixes winbind
who did not run the idle events to drop ldap connections.

Volker
2007-10-10 12:18:33 -05:00
Jeremy Allison
d88bc59cb4 r21783: Add in the "create info" field to the reply
from POSIX_OPEN and POSIX_MKDIR as specified
by Stevef in the wikki (extra 4 byte field).

Also fix horrible bug in James's code (James
you should review this for your Apple patch
tree) where he failed to allocate the correct
return memory size when returning a INFO2
struct. Added #define for the size of the
INFO2 struct and made sure we allocate the
correct size for return.

Jeremy.
2007-10-10 12:18:33 -05:00
James Peach
c29c69d2df r21778: Wrap calls to krb5_get_init_creds_opt_free to handle the different
calling convention in the latest MIT changes.  Apparantly Heimdal
is also changing to this calling convention.
2007-10-10 12:18:32 -05:00
Jeremy Allison
2f1c95ac77 r21777: As Stevef requested and the Apple guys agreed, make
mode_t in posix_open/posix_mkdir -> 8 bytes to match
the SET_UNIX_INFO_BASIC call. Steve is updating the
Wikki.
Jeremy.
2007-10-10 12:18:32 -05:00
Jeremy Allison
1c9e10569c r21768: Fix the client dfs code such that smbclient can
process deep dfs links (ie. links that go to non root
parts of a share). Make the directory handling conanonical
in POSIX and Windows pathname processing.
dfs should not be fully working in client tools. Please
bug me if not.
Jeremy.
2007-10-10 12:18:30 -05:00
James Peach
262e4e1fd8 r21763: Add support for the UNIX_INFO2 infolevel. 2007-10-10 12:18:29 -05:00
James Peach
16cb22d6b8 r21757: Add SMB_VFS_CHFLAGS operation. 2007-10-10 12:18:28 -05:00
Jeremy Allison
cdf0fdb104 r21754: Volker is completely correct. There's no need for
the RESOLVE_DFSPATH macros and their varients
any more. Fix reporting profile bug with all
error returns.
Jeremy.
2007-10-10 12:18:28 -05:00
Jeremy Allison
1b063496f9 r21724: Optimization pointed out by Volker. If we don't
have any outstanding locks or blocking locks then
we don't need to read the lock db. on close.
Jeremy.
2007-10-10 12:18:26 -05:00
James Peach
32c7281f90 r21717: Support the SMB_QUERY_POSIX_WHOAMI info level on QueryFsInfo. 2007-10-10 12:18:25 -05:00
Jeremy Allison
8f3d530c5a r21714: Change the VFS interface to use struct timespec
for utimes - change the call to ntimes. This preserves
nsec timestamps we get from stat (if the system supports
it) and only maps back down to usec or sec resolution
on time set. Looks bigger than it is as I had to move
lots of internal code from using time_t and struct utimebuf
to struct timespec.
Jeremy.
2007-10-10 12:18:24 -05:00
Herb Lewis
06c777529f r21705: add modify rights defines 2007-10-10 12:18:24 -05:00
Jeremy Allison
f0c8488d38 r21638: Change POSIX_UNLINK to allow clients to differentiate
between unlink/rmdir calls.
Jeremy.
2007-10-10 12:18:19 -05:00
Jeremy Allison
df07a662e3 r21609: Fix memory leaks in error code paths (and one in winbindd_group.c).
Patch from Zack Kirsch <zack.kirsch@isilon.com>.
Jeremy.
2007-10-10 12:18:16 -05:00
Volker Lendecke
5ef0286b56 r21581: Add an error code I just got 2007-10-10 12:18:15 -05:00
Gerald Carter
0d2b80c6c4 r21525: Go ahead and checkin the mlock() & memalign() fixes so
others don't get stuck with the winbindd hang.
Still waiting on additional confirmation from Guenther
that this fixes thes issues he was observing as well.
But it's been running in my local tree for a day without
problems.
2007-10-10 12:18:10 -05:00
Jeremy Allison
aa69f2481a r21460: Fix for server-side processing of SPNEGO auth
fragmented into "max xmit" size security blob
chunks. Bug #4400. Needs limits adding, and also
a client-side version.
Jeremy.
2007-10-10 12:18:06 -05:00
Jim McDonough
9463211bf3 r21324: Add linux setlease to the vfs layer. Next round, as Volker points out,
it should be abstracted a little higher up so other os'es can have an
entry, but it will take a bit more work.  Thanks to Chetan Shringarpure
and Mathias Dietz.

I didn't increment the vfs number again because the kernel change notify
stuff hasn't been released yet anyway.
2007-10-10 12:17:56 -05:00
Volker Lendecke
58bfd168b0 r21279: Get rid of 'aio write behind', this is broken.
It should probably better be integrated with our write cache.

Volker
2007-10-10 12:17:53 -05:00
Gerald Carter
d781eeb0e4 r21250: Partial fix for BUG 4093: Make %a expand to "Vista"
based on the flags2 values in the negprot request.

This also includes some code for testing the dialect
strings for "SMB 2.001" but this is unreliable as Vista
only sends that in the 1st negprot and caches the fact
that we don't support it.  Restartnig the WOrkstation
service on the client clears the cache.
2007-10-10 12:17:51 -05:00
Günther Deschner
7e1a84b722 r21240: Fix longstanding Bug #4009.
For the winbind cached ADS LDAP connection handling
(ads_cached_connection()) we were (incorrectly) assuming that the
service ticket lifetime equaled the tgt lifetime. For setups where the
service ticket just lives 10 minutes, we were leaving hundreds of LDAP
connections in CLOSE_WAIT state, until we fail to service entirely with
"Too many open files".

Also sequence_number() in winbindd_ads.c needs to delete the cached LDAP
connection after the ads_do_search_retry() has failed to submit the
search request (although the bind succeeded (returning an expired
service ticket that we cannot delete from the memory cred cache - this
will get fixed later)).

Guenther
2007-10-10 12:17:50 -05:00
Jeremy Allison
7645044fcf r21227: Quick fix for Stevef - ensure the returned data on open
is 8 byte aligned.
Jeremy.
2007-10-10 12:17:49 -05:00
Steve French
739a608ead r21204: Add define for new QFS Info for "who am i" 2007-10-10 12:17:47 -05:00
Jeremy Allison
83dbbdff34 r21191: Add in the POSIX open/mkdir/unlink calls.
Move more error code returns to NTSTATUS.
Client test code to follow... See if this
passes the build-farm before I add it into
3.0.25.
Jeremy.
2007-10-10 12:17:47 -05:00
Gerald Carter
b10f4cdfc0 r21188: bumping passdb version number to make sure this is different than the 3.0.25 branch 2007-10-10 12:17:46 -05:00
Derrell Lipman
2f9be59c10 r21132: - Fixes bug 4366. Documentation for smbc_utimes() was incorrect.
- Should fix bug 4115 (but needs confirmation from OP).  If the kerberos use
  flag is set in the context, then also pass it to smbc_attr_server for use by
  cli_full_connection()

- Should fix bug 4309 (but needs confirmation from OP).  We no longer send a
  keepalive packet unconditionally.  Instead, we assume (yes, possibly
  incorrectly, but it's the best guess we can make) that if the connection is
  on port 139, it's netbios and otherwise, it isn't.  If netbios is in use, we
  send a keepalive packet.  Otherwise, we check that the connection is alive
  using getpeername().
2007-10-10 12:17:42 -05:00
Volker Lendecke
d663b729c0 r21123: Make notify_fsp() static to notify.c.
Volker
2007-10-10 12:17:41 -05:00
Volker Lendecke
3da52b500d r21113: Increment vfs version, thanks to metze for pointing it out 2007-10-10 12:17:39 -05:00
Günther Deschner
ea38e1f836 r21110: Fix kinit with Heimdal (Bug #4226).
Guenther
2007-10-10 12:17:38 -05:00
Volker Lendecke
603a967613 r21108: Send sys_notify_watch through the VFS, FAM is next 2007-10-10 12:17:38 -05:00
Volker Lendecke
01c9fb1728 r21093: Remove the hash and dnotify backends. Disabling FAM for this checkin, I'm
working on that right now.

Volker
2007-10-10 12:17:36 -05:00
Volker Lendecke
9e7443fa14 r21092: Ok, that's the one that activates the Samba4 notify backend.
Now to clean up / fix lots of stuff.

Volker
2007-10-10 12:17:36 -05:00
Volker Lendecke
1f463f7cb5 r21088: Apply some const 2007-10-10 12:17:35 -05:00
Volker Lendecke
c24854433a r21084: Make the Samba4 files compile in Samba3, not activated yet.
Volker
2007-10-10 12:17:34 -05:00
Volker Lendecke
a3c1069b0c r21079: Minimizing diff: Adopt the Samba4 style ChangeNotify flags.
Volker
2007-10-10 12:17:33 -05:00
Volker Lendecke
c01f164dca r21076: Two pieces of infrastructure from Samba4: An API-compatible messaging wrapper
and tdb_wrap_open.

Volker
2007-10-10 12:17:33 -05:00
Volker Lendecke
a2ea54c234 r21074: Preparation for the import of samba4 notify: Add the file notify.idl and the
resulting marshalling/unmarshalling routines in gen_ndr/

Volker
2007-10-10 12:17:33 -05:00
Jeremy Allison
1f3c2b2abc r21062: Should fix the build plus make all refactored
functions return NTSTATUS.
Jeremy.
2007-10-10 12:17:31 -05:00
Herb Lewis
9d23cf0cc4 r21002: Get rid of unused macros - merge change from 3_0_24 2007-10-10 12:17:25 -05:00
Gerald Carter
2ba353848b r21001: * Use a simple '#define LDAPMessage void' to fix the build
problems in the nss_info interface when HAVE_LDAP is undefined.
* Revert previous ifdef HAVE_ADS brakets
* Remove an unused init function wrapper.
2007-10-10 12:17:25 -05:00
Andrew Bartlett
91fdbd4cf5 r20996: Build fix from Kai Blin 2007-10-10 12:17:24 -05:00
Gerald Carter
7011a1b5ab r20992: another attempt at fixing the build breakage 2007-10-10 12:17:24 -05:00
Gerald Carter
4982be3121 r20987: fix build farm breakage when ADS support is not present (caused by nss_info_methods API) 2007-10-10 12:17:24 -05:00
Gerald Carter
aaec0115e2 r20986: Commit the prototype of the nss_info plugin interface.
This allows a provider to supply the homedirectory, etc...
attributes for a user without requiring support in core
winbindd code.  The idmap_ad.c module has been modified
to provide the idmap 'ad' library as well as the rfc2307 and sfu
"winbind nss info" support.

The SID/id mapping is working in idmap_ad but the nss_info
still has a few quirks that I'm in the process of resolving.
2007-10-10 12:17:23 -05:00
Gerald Carter
e6c300829f r20951: Remove the DOM_SID field in the struct idmap_domain and bounce
domain SID lookups through the struct winbindd_domain *domain_list
by searching by name.

Refactor the order lookup when searching for the correct idmap_domain
to a single function and remove the requirement that the default
domain be listed first in the config file.

I would still like to make the idmap_domain array a linked list and
remove the existing code which makes use of indexes into the list.

Basic testing with tdb pans out ok.
2007-10-10 12:17:21 -05:00
Volker Lendecke
9cd6a8a827 r20931: This changes the notify infrastructure from a polling-based to an event-driven
based approach. The only remaining hook into the backend is now

	void *(*notify_add)(TALLOC_CTX *mem_ctx,
			    struct event_context *event_ctx,
			    files_struct *fsp, uint32 *filter);

(Should we put this through the VFS, so that others can more easily plug in?)

The trick here is that the backend can pick filter bits that the main smbd
should not handle anymore. Thanks to tridge for this idea.

The backend can notify the main smbd process via

void notify_fsp(files_struct *fsp, uint32 action, char *name);

The core patch is not big, what makes this more than 1800 lines are the
individual backends that are considerably changed but can be reviewed
one by one.

Based on this I'll continue with inotify now.

Volker
2007-10-10 12:17:21 -05:00
Jeremy Allison
7f817067a7 r20916: Add in the delete on close final fix - but only enabled
with -DDEVELOPER.
Jeremy.
2007-10-10 12:17:19 -05:00
Jeremy Allison
f2df77a149 r20883: W00t! I now understand how "delete on close" really
works - even with the strange "initial delete on close"
semantics. The "initial delete on close" flag isn't
committed to the share mode db until the handle is
closed, and is discarded if any real "delete on close"
was set. This allows me to remove the "initial_delete_on_close"
flag from the share db, and move it into a BOOL in files_struct.
Warning ! You must do a make clean after this. Cope with
the wrinkle in directory delete on close which is done
differently from files. We now pass all Samba4 smbtortute
BASE-DELETE tests except for the one checking that files
can't be created in a directory which has the delete on
close set (possibly expensive to fix).
Jeremy.
2007-10-10 12:17:18 -05:00
Jeremy Allison
97e248f89a r20857: Silence gives assent :-). Checking in the fix for
site support in a network where many DC's are down.
I heard via Volker there is still a bug w.r.t the
wrong site being chosen with trusted domains but
we'll have to layer that fix on top of this.
Gd - complain if this doesn't work for you.
Jeremy.
2007-10-10 12:17:14 -05:00
Volker Lendecke
beecef0c70 r20856: Make "struct notify_mid_map" private to notify.c 2007-10-10 12:17:14 -05:00
Volker Lendecke
5533cdeec1 r20854: Ok, now I think we're at a point where looking at notify starts to make sense
again :-)

Volker
2007-10-10 12:17:13 -05:00
Volker Lendecke
cd07f93a8a r20846: Before this gets out of control...
This add a struct event_context and infrastructure for fd events to smbd. This
is step zero to import lib/events.

Jeremy, I rely on you to watch the change in receive_message_or_smb()
closely. For the normal code path this should be the only relevant change. The
rest is either not yet used or is cosmetic.

Volker
2007-10-10 12:17:13 -05:00
Volker Lendecke
f5babdce9b r20827: Increment the interface version.
Wilco: Existing modules should continue to work, they just must be recompiled.

Volker
2007-10-10 12:17:10 -05:00
Volker Lendecke
3c879745cf r20824: Send access to the trusted domain passwords through the pdb backend, so that
in the next step we can store them in LDAP to be replicated across DCs.

Thanks to Michael Adam <ma@sernet.de>

Volker
2007-10-10 12:17:10 -05:00
Simo Sorce
9e8715e4e1 r20774: I thought I committed this before Xmas holidays ...
This change is needed to make it possible to not expire
caches in disconnected mode.

Jerry, please can you look at this and confirm it is ok?

Simo.
2007-10-10 12:17:08 -05:00
Jeremy Allison
3d52268095 r20742: Rename chkpth -> checkpath for sanity's sake :-).
Start removing unneeded "BOOL ok" from this reply.c
(this logic is old, old, old..... :-).
Jeremy.
2007-10-10 12:17:07 -05:00
Volker Lendecke
a174b49173 r20636: Remove notify leftover 2007-10-10 12:17:00 -05:00
Volker Lendecke
f146a85e74 r20634: A *LOT* more work is necessary before touching notify remotely starts to make
sense. Until then, remove it from the tree to keep the diff between 3_0_24 and
3_0 small.

Volker
2007-10-10 12:17:00 -05:00
Günther Deschner
36bd5cb21b r20512: Fix typo.
Guenther
2007-10-10 12:16:54 -05:00