Re: [Samba] USRMGR.EXE doesn't work anymore.
Samba is compiled by sernet, I will try to recompile without libaio. thanks. Il giorno sab, 03/09/2005 alle 01.24 +0200, Thomas Bork ha scritto: Umberto Zanatta wrote: | Sep 1 20:44:41 provtvlp smbd[7699]: Failed to setup RT_SIGNAL_LEASE | handler I have this message, if 3.0.20 was compiled with aio support - even if aio support in smb.conf is deactivated with aio read size = aio write size = This leads here to problems with oplocking. If compiling without aio support, the oplock problems and the message is gone. der tom -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] winbind/ windows ad issues
Hello, I want to do a single signon setup with samba/winbind and a windows2003 SBS. I have nearly everything up and running. wbinfo gives what I expected. When I try to sign on (su) with a windows account the follwoing happens: # su dkhan su: Authentication service cannot retrieve authentication info. (Ignored) So it recognizes me as windows account and pam somehow tries to authenticate the user but the something wents wrong. nsswitch: passwd: compat winbind shadow: compat winbind group: compat winbind Any hints would be really appreciated. greetings -- Daniel Khan -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Return AD User Info?
I have a SLES9 server with which I'm using Samba/winbind to authenticate users from a Win2K AD server. The wbinfo -u and -g commands return all the Users and Groups that Samba can see in the domain. How can I retreive specific group information for a given AD user? For example, if there's a user user01 belonging to the group science-dept-users, how can I retrieve that type of group info from the AD schema??? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Return AD User Info?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tony Kubinski wrote: I have a SLES9 server with which I'm using Samba/winbind to authenticate users from a Win2K AD server. The wbinfo -u and -g commands return all the Users and Groups that Samba can see in the domain. How can I retreive specific group information for a given AD user? For example, if there's a user user01 belonging to the group science-dept-users, how can I retrieve that type of group info from the AD schema??? If you use `net ads info user [username]' it should show the groups [username] is a part of. - -- Robert Vangel :: http://zilla.id.au * redflag networks, Network Operations Management * [EMAIL PROTECTED] * +61 419 961 52 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDGmiqV63eDkW7v4cRAsFXAJwOHtxUg2I0i3m/Yi+xNjG817y9VQCfY29Q j690zXv3rtrRuNGzwUThKKY= =gDIh -END PGP SIGNATURE- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
svn commit: samba r9985 - in branches/SAMBA_3_0/source/smbd: .
Author: jpeach Date: 2005-09-03 07:19:28 + (Sat, 03 Sep 2005) New Revision: 9985 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9985 Log: Move the all the strict sync logic into file_sync(). Modified: branches/SAMBA_3_0/source/smbd/aio.c branches/SAMBA_3_0/source/smbd/fileio.c branches/SAMBA_3_0/source/smbd/files.c branches/SAMBA_3_0/source/smbd/reply.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/aio.c === --- branches/SAMBA_3_0/source/smbd/aio.c2005-09-03 02:08:25 UTC (rev 9984) +++ branches/SAMBA_3_0/source/smbd/aio.c2005-09-03 07:19:28 UTC (rev 9985) @@ -475,9 +475,7 @@ } DEBUG(3,(handle_aio_write: fnum=%d num=%d wrote=%d\n, fsp-fnum, (int)numtowrite, (int)nwritten)); - if (lp_syncalways(SNUM(fsp-conn)) || write_through) { - sync_file(fsp-conn,fsp); - } + sync_file(fsp-conn,fsp, write_through); } show_msg(outbuf); Modified: branches/SAMBA_3_0/source/smbd/fileio.c === --- branches/SAMBA_3_0/source/smbd/fileio.c 2005-09-03 02:08:25 UTC (rev 9984) +++ branches/SAMBA_3_0/source/smbd/fileio.c 2005-09-03 07:19:28 UTC (rev 9985) @@ -834,15 +834,18 @@ sync a file / -void sync_file(connection_struct *conn, files_struct *fsp) +void sync_file(connection_struct *conn, files_struct *fsp, BOOL write_through) { - if(lp_strict_sync(SNUM(conn)) fsp-fh-fd != -1) { + if (fsp-fh-fd == -1) + return; + + if (lp_strict_sync(SNUM(conn)) + (lp_syncalways(SNUM(conn)) || write_through)) { flush_write_cache(fsp, SYNC_FLUSH); SMB_VFS_FSYNC(fsp,fsp-fh-fd); } } - / Perform a stat whether a valid fd or not. / Modified: branches/SAMBA_3_0/source/smbd/files.c === --- branches/SAMBA_3_0/source/smbd/files.c 2005-09-03 02:08:25 UTC (rev 9984) +++ branches/SAMBA_3_0/source/smbd/files.c 2005-09-03 07:19:28 UTC (rev 9985) @@ -427,7 +427,7 @@ for (fsp=Files;fsp;fsp=next) { next=fsp-next; if ((conn == fsp-conn) (fsp-fh-fd != -1)) { - sync_file(conn,fsp); + sync_file(conn, fsp, True /* write through */); } } } Modified: branches/SAMBA_3_0/source/smbd/reply.c === --- branches/SAMBA_3_0/source/smbd/reply.c 2005-09-03 02:08:25 UTC (rev 9984) +++ branches/SAMBA_3_0/source/smbd/reply.c 2005-09-03 07:19:28 UTC (rev 9985) @@ -2786,8 +2786,7 @@ SSVAL(outbuf,smb_vwv0,total_written); - if ((lp_syncalways(SNUM(conn)) || write_through) lp_strict_sync(SNUM(conn))) - sync_file(conn,fsp); + sync_file(conn, fsp, write_through); DEBUG(3,(writebraw2 fnum=%d start=%.0f num=%d wrote=%d\n, fsp-fnum, (double)startpos, (int)numtowrite,(int)total_written)); @@ -2852,8 +2851,7 @@ nwritten = write_file(fsp,data,startpos,numtowrite); } - if (lp_syncalways(SNUM(conn))) - sync_file(conn,fsp); + sync_file(conn, fsp, False /* write through */); if(((nwritten == 0) (numtowrite != 0))||(nwritten 0)) { END_PROFILE(SMBwriteunlock); @@ -2940,8 +2938,7 @@ } else nwritten = write_file(fsp,data,startpos,numtowrite); - if (lp_syncalways(SNUM(conn))) - sync_file(conn,fsp); + sync_file(conn, fsp, False); if(((nwritten == 0) (numtowrite != 0))||(nwritten 0)) { END_PROFILE(SMBwrite); @@ -3068,8 +3065,7 @@ DEBUG(3,(writeX fnum=%d num=%d wrote=%d\n, fsp-fnum, (int)numtowrite, (int)nwritten)); - if (lp_syncalways(SNUM(conn)) || write_through) - sync_file(conn,fsp); + sync_file(conn, fsp, write_through); END_PROFILE(SMBwriteX); return chain_reply(inbuf,outbuf,length,bufsize); @@ -3166,7 +3162,7 @@ if (!fsp) { file_sync_all(conn); } else { - sync_file(conn,fsp); + sync_file(conn,fsp, True); } DEBUG(3,(flush\n)); @@ -5433,8 +5429,7 @@ nwritten = write_file(fsp,data,startpos,numtowrite); - if(lp_syncalways(SNUM(conn)) || write_through) - sync_file(conn,fsp); + sync_file(conn, fsp,
svn commit: samba r9986 - in trunk/source/smbd: .
Author: jpeach Date: 2005-09-03 07:23:15 + (Sat, 03 Sep 2005) New Revision: 9986 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9986 Log: Merge 9984:9985 from samba/branches/SAMBA_3_0. Modified: trunk/source/smbd/aio.c trunk/source/smbd/fileio.c trunk/source/smbd/files.c trunk/source/smbd/reply.c Changeset: Modified: trunk/source/smbd/aio.c === --- trunk/source/smbd/aio.c 2005-09-03 07:19:28 UTC (rev 9985) +++ trunk/source/smbd/aio.c 2005-09-03 07:23:15 UTC (rev 9986) @@ -475,9 +475,7 @@ } DEBUG(3,(handle_aio_write: fnum=%d num=%d wrote=%d\n, fsp-fnum, (int)numtowrite, (int)nwritten)); - if (lp_syncalways(SNUM(fsp-conn)) || write_through) { - sync_file(fsp-conn,fsp); - } + sync_file(fsp-conn,fsp, write_through); } show_msg(outbuf); Modified: trunk/source/smbd/fileio.c === --- trunk/source/smbd/fileio.c 2005-09-03 07:19:28 UTC (rev 9985) +++ trunk/source/smbd/fileio.c 2005-09-03 07:23:15 UTC (rev 9986) @@ -834,15 +834,18 @@ sync a file / -void sync_file(connection_struct *conn, files_struct *fsp) +void sync_file(connection_struct *conn, files_struct *fsp, BOOL write_through) { - if(lp_strict_sync(SNUM(conn)) fsp-fh-fd != -1) { + if (fsp-fh-fd == -1) + return; + + if (lp_strict_sync(SNUM(conn)) + (lp_syncalways(SNUM(conn)) || write_through)) { flush_write_cache(fsp, SYNC_FLUSH); SMB_VFS_FSYNC(fsp,fsp-fh-fd); } } - / Perform a stat whether a valid fd or not. / Modified: trunk/source/smbd/files.c === --- trunk/source/smbd/files.c 2005-09-03 07:19:28 UTC (rev 9985) +++ trunk/source/smbd/files.c 2005-09-03 07:23:15 UTC (rev 9986) @@ -418,7 +418,7 @@ for (fsp=Files;fsp;fsp=next) { next=fsp-next; if ((conn == fsp-conn) (fsp-fh-fd != -1)) { - sync_file(conn,fsp); + sync_file(conn, fsp, True /* write through */); } } } Modified: trunk/source/smbd/reply.c === --- trunk/source/smbd/reply.c 2005-09-03 07:19:28 UTC (rev 9985) +++ trunk/source/smbd/reply.c 2005-09-03 07:23:15 UTC (rev 9986) @@ -2776,8 +2776,7 @@ SSVAL(outbuf,smb_vwv0,total_written); - if ((lp_syncalways(SNUM(conn)) || write_through) lp_strict_sync(SNUM(conn))) - sync_file(conn,fsp); + sync_file(conn, fsp, write_through); DEBUG(3,(writebraw2 fnum=%d start=%.0f num=%d wrote=%d\n, fsp-fnum, (double)startpos, (int)numtowrite,(int)total_written)); @@ -2842,8 +2841,7 @@ nwritten = write_file(fsp,data,startpos,numtowrite); } - if (lp_syncalways(SNUM(conn))) - sync_file(conn,fsp); + sync_file(conn, fsp, False /* write through */); if(((nwritten == 0) (numtowrite != 0))||(nwritten 0)) { END_PROFILE(SMBwriteunlock); @@ -2930,8 +2928,7 @@ } else nwritten = write_file(fsp,data,startpos,numtowrite); - if (lp_syncalways(SNUM(conn))) - sync_file(conn,fsp); + sync_file(conn, fsp, False); if(((nwritten == 0) (numtowrite != 0))||(nwritten 0)) { END_PROFILE(SMBwrite); @@ -3058,8 +3055,7 @@ DEBUG(3,(writeX fnum=%d num=%d wrote=%d\n, fsp-fnum, (int)numtowrite, (int)nwritten)); - if (lp_syncalways(SNUM(conn)) || write_through) - sync_file(conn,fsp); + sync_file(conn, fsp, write_through); END_PROFILE(SMBwriteX); return chain_reply(inbuf,outbuf,length,bufsize); @@ -3156,7 +3152,7 @@ if (!fsp) { file_sync_all(conn); } else { - sync_file(conn,fsp); + sync_file(conn,fsp, True); } DEBUG(3,(flush\n)); @@ -5454,8 +5450,7 @@ nwritten = write_file(fsp,data,startpos,numtowrite); - if(lp_syncalways(SNUM(conn)) || write_through) - sync_file(conn,fsp); + sync_file(conn, fsp, write_through); if(nwritten (ssize_t)numtowrite) { END_PROFILE(SMBwriteBmpx); @@ -5567,8 +5562,7 @@ nwritten = write_file(fsp,data,startpos,numtowrite); - if(lp_syncalways(SNUM(conn)) ||
svn commit: samba r9987 - in branches/tmp/vl-cluster/source: . include lib locking python registry rpc_server smbd utils web
Author: vlendec Date: 2005-09-03 08:23:45 + (Sat, 03 Sep 2005) New Revision: 9987 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9987 Log: Merge trunk up to r9986 Modified: branches/tmp/vl-cluster/source/Makefile.in branches/tmp/vl-cluster/source/include/privileges.h branches/tmp/vl-cluster/source/include/smb.h branches/tmp/vl-cluster/source/include/smb_macros.h branches/tmp/vl-cluster/source/lib/privileges.c branches/tmp/vl-cluster/source/locking/locking.c branches/tmp/vl-cluster/source/python/setup.py branches/tmp/vl-cluster/source/registry/reg_db.c branches/tmp/vl-cluster/source/registry/regfio.c branches/tmp/vl-cluster/source/rpc_server/srv_eventlog_nt.c branches/tmp/vl-cluster/source/rpc_server/srv_pipe.c branches/tmp/vl-cluster/source/rpc_server/srv_samr_nt.c branches/tmp/vl-cluster/source/rpc_server/srv_spoolss_nt.c branches/tmp/vl-cluster/source/rpc_server/srv_svcctl_nt.c branches/tmp/vl-cluster/source/smbd/aio.c branches/tmp/vl-cluster/source/smbd/close.c branches/tmp/vl-cluster/source/smbd/fileio.c branches/tmp/vl-cluster/source/smbd/files.c branches/tmp/vl-cluster/source/smbd/open.c branches/tmp/vl-cluster/source/smbd/oplock.c branches/tmp/vl-cluster/source/smbd/posix_acls.c branches/tmp/vl-cluster/source/smbd/reply.c branches/tmp/vl-cluster/source/utils/status.c branches/tmp/vl-cluster/source/web/statuspage.c Changeset: Sorry, the patch is too large (2064 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9987
svn commit: samba r9988 - in branches/SOC/SAMBA_4_0: . source source/auth/gensec source/build/m4 source/build/smb_build source/dsdb/samdb source/heimdal/lib/krb5 source/kdc source/lib source/lib/ldb/c
Author: metze Date: 2005-09-03 08:24:25 + (Sat, 03 Sep 2005) New Revision: 9988 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9988 Log: [EMAIL PROTECTED] (orig r9918): jelmer | 2005-09-01 23:32:43 +0200 Fix two copy-n-paste bugs that were preventing the modification of special DN's when the rdn_name or timestamps modules were in use. [EMAIL PROTECTED] (orig r9919): jelmer | 2005-09-01 23:34:05 +0200 Remove debug statement from samba3sam Add SOC STATUS doc [EMAIL PROTECTED] (orig r9925): jelmer | 2005-09-02 01:06:20 +0200 Fix swapped nt/lm password hashes - caught by Andrew Bartlett [EMAIL PROTECTED] (orig r9927): abartlet | 2005-09-02 01:23:22 +0200 Extend copyright for all the hard work I've done this year. Andrew Bartlett [EMAIL PROTECTED] (orig r9928): abartlet | 2005-09-02 01:24:16 +0200 ncName is a DN, and needs to use DN matching rules. Andrew Bartlett [EMAIL PROTECTED] (orig r9929): abartlet | 2005-09-02 01:24:47 +0200 Fix indentation Andrew Bartlett [EMAIL PROTECTED] (orig r9930): abartlet | 2005-09-02 01:26:50 +0200 Use a single samdb_base_dn() function rather than lots of silly searches all over the place. This can be extended to cover an NT4 (no ADS) mode in future as well. Andrew Bartlett [EMAIL PROTECTED] (orig r9931): abartlet | 2005-09-02 01:31:51 +0200 Make use of new 'norealm' parsing functions rather than strchr(p '@'). Merge these norealm functions from lorikeet-heimdal. Andrew Bartlett [EMAIL PROTECTED] (orig r9939): jpeach | 2005-09-02 05:10:42 +0200 Add configure check for yapp. [EMAIL PROTECTED] (orig r9940): abartlet | 2005-09-02 05:13:04 +0200 When guessing, don't make DEBUG(1,... errors. Andrew Bartlett [EMAIL PROTECTED] (orig r9941): abartlet | 2005-09-02 05:19:27 +0200 Update the CrackNames test, and provide a much improved server-side DRSUAPI CrackNames. We can't pass the full cracknames test until the initial provision is updated, the seperate DomainControllerInfo and canonical names support is added. Andrew Bartlett [EMAIL PROTECTED] (orig r9942): abartlet | 2005-09-02 05:27:13 +0200 CN=Configuration is always under the database-wide base dn, so don't try and pass it down as a parameter. Andrew Bartlett [EMAIL PROTECTED] (orig r9948): jelmer | 2005-09-02 13:33:35 +0200 Be a bit less verbose [EMAIL PROTECTED] (orig r9949): jelmer | 2005-09-02 13:35:58 +0200 Portability fixes for mingw32 [EMAIL PROTECTED] (orig r9951): jelmer | 2005-09-02 14:06:25 +0200 Add another value to the default HKLM. Convert Samba3 policy refuse machine pw change to registry value. [EMAIL PROTECTED] (orig r9954): metze | 2005-09-02 15:15:41 +0200 getntacl depends on EXT_LIB_XATTR (maybe we need to disable this binary when EXT_LIB_XATTR isn't enabled) metze [EMAIL PROTECTED] (orig r9957): jelmer | 2005-09-02 16:05:28 +0200 Switch to using DATA_BLOBs internally in TDR [EMAIL PROTECTED] (orig r9959): jelmer | 2005-09-02 16:45:40 +0200 Fix bug where data offset was incorrect after parsing element with [charset] [EMAIL PROTECTED] (orig r9980): tpot | 2005-09-03 02:52:34 +0200 Fix some warnings. [EMAIL PROTECTED] (orig r9982): tpot | 2005-09-03 03:50:56 +0200 Strip prefixes off the check for noemit in the conformance info so you can use the typedef names in the IDL rather than the autogenerated function names. This means you can say NOEMIT security_descriptor instead of NOEMIT dissect_security_descriptor_type or whatever. [EMAIL PROTECTED] (orig r9983): tpot | 2005-09-03 04:06:32 +0200 Make the NOEMIT conformance directive with no argument mean do not emit any dissectors for this IDL. [EMAIL PROTECTED] (orig r9984): tpot | 2005-09-03 04:08:25 +0200 Honour the NOEMIT conformance directive for entire IDL files. Added: branches/SOC/SAMBA_4_0/source/lib/samba3/STATUS Removed: branches/SOC/SAMBA_4_0/source/lib/samba3/PLAN Modified: branches/SOC/SAMBA_4_0/ branches/SOC/SAMBA_4_0/source/auth/gensec/spnego.c branches/SOC/SAMBA_4_0/source/build/m4/check_perl.m4 branches/SOC/SAMBA_4_0/source/build/smb_build/makefile.pm branches/SOC/SAMBA_4_0/source/dsdb/samdb/samdb.c branches/SOC/SAMBA_4_0/source/heimdal/lib/krb5/krb5-protos.h branches/SOC/SAMBA_4_0/source/heimdal/lib/krb5/principal.c branches/SOC/SAMBA_4_0/source/kdc/hdb-ldb.c branches/SOC/SAMBA_4_0/source/lib/credentials.c branches/SOC/SAMBA_4_0/source/lib/ldb/common/ldb_attributes.c branches/SOC/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c branches/SOC/SAMBA_4_0/source/lib/ldb/modules/ldb_map.c branches/SOC/SAMBA_4_0/source/lib/ldb/modules/rdn_name.c branches/SOC/SAMBA_4_0/source/lib/ldb/modules/timestamps.c branches/SOC/SAMBA_4_0/source/lib/replace/repdir/config.m4 branches/SOC/SAMBA_4_0/source/lib/replace/win32/replace.h branches/SOC/SAMBA_4_0/source/lib/tdr/tdr.c branches/SOC/SAMBA_4_0/source/lib/tdr/tdr.h
svn commit: samba r9989 - branches/tmp/vl-cluster/source/locking branches/tmp/vl-cluster/source/smbd trunk/source/locking trunk/source/smbd
Author: vlendec Date: 2005-09-03 09:28:55 + (Sat, 03 Sep 2005) New Revision: 9989 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9989 Log: Nobody looks at the share mode returned from del_share_mode, so delete that argument. Volker Modified: branches/tmp/vl-cluster/source/locking/locking.c branches/tmp/vl-cluster/source/smbd/close.c branches/tmp/vl-cluster/source/smbd/open.c trunk/source/locking/locking.c trunk/source/smbd/close.c trunk/source/smbd/open.c Changeset: Modified: branches/tmp/vl-cluster/source/locking/locking.c === --- branches/tmp/vl-cluster/source/locking/locking.c2005-09-03 08:24:25 UTC (rev 9988) +++ branches/tmp/vl-cluster/source/locking/locking.c2005-09-03 09:28:55 UTC (rev 9989) @@ -616,14 +616,12 @@ } /*** - Delete a specific share mode. Return the number - of entries left, and a memdup'ed copy of the entry deleted (if required). + Delete a specific share mode. Return the number of entries left. Ignore if no entry deleted. / static ssize_t del_share_entry(struct share_mode_lock *lck, struct share_mode_entry *entry, - struct share_mode_entry **ppse, BOOL *delete_on_close) { TDB_DATA dbuf; @@ -632,9 +630,6 @@ struct share_mode_entry *shares; ssize_t count = 0; - if (ppse) - *ppse = NULL; - /* read in the existing share modes */ dbuf = tdb_fetch(tdb, lck-tdbkey); if (!dbuf.dptr) @@ -657,9 +652,6 @@ if (share_modes_identical(shares[i], entry)) { DEBUG(10,(del_share_entry: deleted %s\n, share_mode_str(i, shares[i]) )); - if (ppse) - *ppse = talloc_memdup(lck, shares[i], - sizeof(*shares)); data-u.s.num_share_mode_entries--; if ((dbuf.dsize - (sizeof(*data) + (i+1)*sizeof(*shares))) 0) { memmove(shares[i], shares[i+1], @@ -697,12 +689,11 @@ } /*** - Del the share mode of a file for this process. Return the number - of entries left, and a memdup'ed copy of the entry deleted. + Del the share mode of a file for this process. Return the number of + entries left. / -ssize_t del_share_mode(struct share_mode_lock *lck, - files_struct *fsp, struct share_mode_entry **ppse, +ssize_t del_share_mode(struct share_mode_lock *lck, files_struct *fsp, BOOL *delete_on_close) { struct share_mode_entry entry; @@ -712,7 +703,7 @@ */ fill_share_mode((char *)entry, fsp, 0, 0); - return del_share_entry(lck, entry, ppse, delete_on_close); + return del_share_entry(lck, entry, delete_on_close); } /*** Modified: branches/tmp/vl-cluster/source/smbd/close.c === --- branches/tmp/vl-cluster/source/smbd/close.c 2005-09-03 08:24:25 UTC (rev 9988) +++ branches/tmp/vl-cluster/source/smbd/close.c 2005-09-03 09:28:55 UTC (rev 9989) @@ -144,7 +144,6 @@ static int close_normal_file(files_struct *fsp, BOOL normal_close) { - struct share_mode_entry *share_entry = NULL; size_t share_entry_count = 0; BOOL delete_file = False; connection_struct *conn = fsp-conn; @@ -198,8 +197,7 @@ return EINVAL; } - share_entry_count = del_share_mode(lck, fsp, share_entry, - delete_file); + share_entry_count = del_share_mode(lck, fsp, delete_file); DEBUG(10,(close_normal_file: share_entry_count = %lu for file %s\n, (unsigned long)share_entry_count, fsp-fsp_name )); Modified: branches/tmp/vl-cluster/source/smbd/open.c === --- branches/tmp/vl-cluster/source/smbd/open.c 2005-09-03 08:24:25 UTC (rev 9988) +++ branches/tmp/vl-cluster/source/smbd/open.c 2005-09-03 09:28:55 UTC (rev 9989) @@ -1680,7 +1680,7 @@ if (!NT_STATUS_IS_OK(result)) { BOOL dummy_del_on_close; /* Remember to delete the mode we just added. */ - del_share_mode(lck, fsp, NULL, dummy_del_on_close); + del_share_mode(lck, fsp, dummy_del_on_close); talloc_free(lck); fd_close(conn,fsp);
svn commit: samba r9990 - in branches/SAMBA_4_0/source/scripting/ejs: .
Author: tpot Date: 2005-09-03 11:50:33 + (Sat, 03 Sep 2005) New Revision: 9990 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9990 Log: Fix some 64-bit size_t warnings. Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_data.c Changeset: Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_data.c === --- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_data.c 2005-09-03 09:28:55 UTC (rev 9989) +++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_data.c 2005-09-03 11:50:33 UTC (rev 9990) @@ -191,7 +191,7 @@ case REG_DWORD: { if (blob-length != 4) { - ejsSetErrorMsg(eid, regToVar invalid REG_DWORD length %d, blob-length); + ejsSetErrorMsg(eid, regToVar invalid REG_DWORD length %ld, (long)blob-length); return -1; } v = mprCreateNumberVar(IVAL(blob-data, 0)); @@ -200,7 +200,7 @@ case REG_DWORD_BIG_ENDIAN: { if (blob-length != 4) { - ejsSetErrorMsg(eid, regToVar invalid REG_DWORD_BIG_ENDIAN length %d, blob-length); + ejsSetErrorMsg(eid, regToVar invalid REG_DWORD_BIG_ENDIAN length %ld, (long)blob-length); return -1; } v = mprCreateNumberVar(RIVAL(blob-data, 0)); @@ -209,7 +209,7 @@ case REG_QWORD: { if (blob-length != 8) { - ejsSetErrorMsg(eid, regToVar invalid REG_QWORD length %d, blob-length); + ejsSetErrorMsg(eid, regToVar invalid REG_QWORD length %ld, (long)blob-length); return -1; } v = mprCreateNumberVar(BVAL(blob-data, 0));
svn commit: samba r9992 - in branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules: .
Author: tpot Date: 2005-09-03 12:35:50 + (Sat, 03 Sep 2005) New Revision: 9992 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9992 Log: More fixes from the 64-bit warning police. Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samba3sam.c Changeset: Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samba3sam.c === --- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samba3sam.c 2005-09-03 11:52:42 UTC (rev 9991) +++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samba3sam.c 2005-09-03 12:35:50 UTC (rev 9992) @@ -157,7 +157,7 @@ return *talloc_zero(ctx, struct ldb_val); } - retval.data = (uint8_t *)talloc_asprintf(ctx, %d, pwd-pw_gid); + retval.data = (uint8_t *)talloc_asprintf(ctx, %ld, (unsigned long)pwd-pw_gid); retval.length = strlen((char *)retval.data); return retval; @@ -174,7 +174,7 @@ return *talloc_zero(ctx, struct ldb_val); } - retval.data = (uint8_t *)talloc_asprintf(ctx, %d, pwd-pw_uid); + retval.data = (uint8_t *)talloc_asprintf(ctx, %ld, (unsigned long)pwd-pw_uid); retval.length = strlen((char *)retval.data); return retval;
svn commit: samba r9993 - in branches/SAMBA_4_0/source/lib/cmdline: .
Author: tpot Date: 2005-09-03 12:37:44 + (Sat, 03 Sep 2005) New Revision: 9993 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9993 Log: Gcc is fussy about the lack of parentheses around assignment statements. Modified: branches/SAMBA_4_0/source/lib/cmdline/popt_common.c Changeset: Modified: branches/SAMBA_4_0/source/lib/cmdline/popt_common.c === --- branches/SAMBA_4_0/source/lib/cmdline/popt_common.c 2005-09-03 12:35:50 UTC (rev 9992) +++ branches/SAMBA_4_0/source/lib/cmdline/popt_common.c 2005-09-03 12:37:44 UTC (rev 9993) @@ -221,7 +221,7 @@ cli_credentials_parse_string(cmdline_credentials, arg, CRED_SPECIFIED); /* This breaks the abstraction, including the const above */ - if (lp=strchr_m(arg,'%')) { + if ((lp=strchr_m(arg,'%'))) { lp[0]='\0'; lp++; memset(lp,0,strlen(lp));
svn commit: samba r9994 - in branches/SAMBA_4_0/source/libnet: .
Author: tpot Date: 2005-09-03 12:45:37 + (Sat, 03 Sep 2005) New Revision: 9994 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9994 Log: Unused variable. Modified: branches/SAMBA_4_0/source/libnet/userman.c Changeset: Modified: branches/SAMBA_4_0/source/libnet/userman.c === --- branches/SAMBA_4_0/source/libnet/userman.c 2005-09-03 12:37:44 UTC (rev 9993) +++ branches/SAMBA_4_0/source/libnet/userman.c 2005-09-03 12:45:37 UTC (rev 9994) @@ -783,7 +783,6 @@ struct libnet_rpc_usermod *io) { NTSTATUS status; - struct usermod_state *s; status = composite_wait(c);
svn commit: samba r9995 - in branches/SAMBA_4_0/source/lib/registry: .
Author: jelmer Date: 2005-09-03 14:58:00 + (Sat, 03 Sep 2005) New Revision: 9995 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9995 Log: Add file describing the REGF file format in IDL. (used in reg_backend_nt4.c rewrite) Added: branches/SAMBA_4_0/source/lib/registry/regf.idl Changeset: Added: branches/SAMBA_4_0/source/lib/registry/regf.idl === --- branches/SAMBA_4_0/source/lib/registry/regf.idl 2005-09-03 12:45:37 UTC (rev 9994) +++ branches/SAMBA_4_0/source/lib/registry/regf.idl 2005-09-03 14:58:00 UTC (rev 9995) @@ -0,0 +1,154 @@ +/* + Definitions for the REGF registry file format as used by + Windows NT4 and above. + + Written by Jelmer Vernooij, 2005 + + Based on two files from Samba 3: + regedit.c by Richard Sharpe +regfio.c by Jerry Carter + + Thanks to Wilco Baan Hofman for some of the info on li and ri fields. +*/ + +interface regf +{ + typedef struct { + uint32 major; + uint32 minor; + uint32 release; + uint32 build; + } regf_version; + + /* 1.3.0.1 for WinNT 4 +* 1.5.0.1 for WinXP +*/ + + + /* + regf is obviously the abbreviation for Registry file. regf is the + signature of the header-block which is always 4kb in size, although only + the first 64 bytes seem to be used and a checksum is calculated over + the first 0x200 bytes only! +*/ + + typedef [public] struct { + [charset(DOS)] uint8 REGF_ID[4]; /* 'regf' */ + uint32 update_counter1; + uint32 update_counter2; + NTTIME modtime; + regf_version version; + uint32 data_offset; + uint32 last_block; + [value(1)] uint32 uk7; /* 1 */ + [charset(UTF16)] uint16 description[0x40]; + uint32 padding[83]; /* Padding */ + /* Checksum of first 0x200 bytes XOR-ed */ + uint32 chksum; + } regf_hdr; + + /* + hbin probably means hive-bin (what bin stands for I don't know) + This block is always a multiple + of 4kb in size. + */ + typedef [public] struct { + [charset(DOS)] uint8 HBIN_ID[4]; /* hbin */ + uint32 off_from_first; /* Offset from 1st hbin-Block */ + uint32 off_to_next;/* Offset to the next hbin-Block */ + uint32 unknown[2]; + NTTIME last_change; + uint32 block_size; /* Block size */ + uint8 data[block_size]; /* Filled with hbin_data blocks */ + } hbin_block; + + typedef struct { + uint32 length; + [charset(DOS)] uint8 header[2]; /* li, lh, ri, nk, vk, sk, lf or \0\0 */ + uint8 data[length-2]; + } hbin_data; + + typedef enum { + REG_ROOT_KEY = 0x20, + REG_SUB_KEY = 0x2C, + REG_SYM_LINK = 0x10 + } reg_key_type; + + /* + The nk-record can be treated as a combination of tree-record and + key-record of the win 95 registry. + */ + typedef struct { + reg_key_type type; + NTTIME last_change; + uint32 uk1; + uint32 parent_offset; + uint32 num_subkeys; + uint32 uk2; + uint32 subkeys_offset; + uint32 uk3; + uint32 num_values; + uint32 values_offset; + uint32 sk_offset; + uint32 clsnam_offset; + uint32 unk4[5]; + uint16 name_length; + uint16 clsname_length; + [charset(DOS)] uint8 key_name[name_length]; + } nk_block; + + /* sk (? Security Key ?) is the ACL of the registry. */ + typedef struct { + uint16 uk1; + uint32 prev_offset; + uint32 next_offset; + uint32 ref_cnt; + uint32 rec_size; + uint8 sec_desc[rec_size]; + } sk_block; + + typedef struct { + uint32 offset_nk; + uint32 base37; /* base37 of key name */ + } lh_hash; + + typedef struct { + uint16 key_count; + lh_hash hashes[key_count]; + } lh_block; + + typedef struct { + uint16 key_count; + uint32 offset_nk[key_count]; + } li_block; + + typedef struct { + uint16 key_count; + uint32 offset[key_count]; /* li/lh offset */ + } ri_block; + + /* The vk-record consists information to a single value (value key). */ + typedef struct { +
svn commit: samba r9996 - in branches/tmp/vl-cluster/source: include locking smbd
Author: vlendec Date: 2005-09-03 15:22:55 + (Sat, 03 Sep 2005) New Revision: 9996 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9996 Log: Except when deleting the deferred open entry for a mid we do one or two get_share_modes for a lock, so do it when acquiring the lock and make get_share_modes static. Volker Modified: branches/tmp/vl-cluster/source/include/smb.h branches/tmp/vl-cluster/source/locking/locking.c branches/tmp/vl-cluster/source/smbd/open.c branches/tmp/vl-cluster/source/smbd/oplock.c Changeset: Sorry, the patch is too large (453 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9996
svn commit: samba r9997 - in trunk/source: include locking smbd
Author: vlendec Date: 2005-09-03 16:08:56 + (Sat, 03 Sep 2005) New Revision: 9997 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9997 Log: merge from tmp/vl-cluster: Except when deleting the deferred open entry for a mid we do one or two get_share_modes for a lock, so do it when acquiring the lock and make get_share_modes static. Volker Modified: trunk/source/include/smb.h trunk/source/locking/locking.c trunk/source/smbd/open.c trunk/source/smbd/oplock.c Changeset: Sorry, the patch is too large (453 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9997
svn commit: samba r9999 - in trunk/source: include lib
Author: jerry Date: 2005-09-03 16:39:46 + (Sat, 03 Sep 2005) New Revision: WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev= Log: merge adt changes to trunk (accidentally committed to SAMBA_3_0 as part of the MAINTAINERS update) Modified: trunk/source/include/adt_tree.h trunk/source/lib/adt_tree.c Changeset: Modified: trunk/source/include/adt_tree.h === --- trunk/source/include/adt_tree.h 2005-09-03 16:38:51 UTC (rev 9998) +++ trunk/source/include/adt_tree.h 2005-09-03 16:39:46 UTC (rev ) @@ -1,7 +1,7 @@ /* * Unix SMB/CIFS implementation. * Generic Abstract Data Types - * Copyright (C) Gerald Carter 2002. + * Copyright (C) Gerald Carter 2002-2005. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,18 +39,19 @@ typedef struct _tree_root { TREE_NODE *root; + + /* not used currently (is it needed?) */ int (*compare)(void* x, void *y); - void(*free_func)(void *p); } SORTED_TREE; /* * API */ -/* initializer and desctrutor */ -SORTED_TREE* pathtree_init( void *data_p, int (cmp_fn)(void*, void*), void (free_fn)(void*) ); -void pathtree_destroy( SORTED_TREE *tree ); +/* create a new tree, talloc_free() to throw it away */ +SORTED_TREE* pathtree_init( void *data_p, int (cmp_fn)(void*, void*) ); + /* add a new path component */ BOOL pathtree_add( SORTED_TREE *tree, const char *path, void *data_p ); Modified: trunk/source/lib/adt_tree.c === --- trunk/source/lib/adt_tree.c 2005-09-03 16:38:51 UTC (rev 9998) +++ trunk/source/lib/adt_tree.c 2005-09-03 16:39:46 UTC (rev ) @@ -23,8 +23,6 @@ /** - Initialize the tree's root. The cmp_fn is a callback function used - for comparision of two children */ static BOOL trim_tree_keypath( char *path, char **base, char **new_path ) @@ -54,26 +52,20 @@ for comparision of two children */ - SORTED_TREE* pathtree_init( void *data_p, - int (cmp_fn)(void*, void*), - void (free_fn)(void*) ) + SORTED_TREE* pathtree_init( void *data_p, int (cmp_fn)(void*, void*) ) { SORTED_TREE *tree = NULL; - if ( !(tree = SMB_MALLOC_P(SORTED_TREE)) ) + if ( !(tree = TALLOC_ZERO_P(NULL, SORTED_TREE)) ) return NULL; - ZERO_STRUCTP( tree ); - tree-compare = cmp_fn; - tree-free_func= free_fn; - if ( !(tree-root = SMB_MALLOC_P(TREE_NODE)) ) { - SAFE_FREE( tree ); + if ( !(tree-root = TALLOC_ZERO_P(tree, TREE_NODE)) ) { + TALLOC_FREE( tree ); return NULL; } - ZERO_STRUCTP( tree-root ); tree-root-data_p = data_p; return tree; @@ -81,43 +73,6 @@ /** - Delete a tree and free all allocated memory - */ - -static void pathtree_destroy_children( TREE_NODE *root ) -{ - int i; - - if ( !root ) - return; - - for ( i=0; iroot-num_children; i++ ) - { - pathtree_destroy_children( root-children[i] ); - } - - SAFE_FREE( root-children ); - SAFE_FREE( root-key ); - - return; -} - -/** - Delete a tree and free all allocated memory - */ - - void pathtree_destroy( SORTED_TREE *tree ) -{ - if ( tree-root ) - pathtree_destroy_children( tree-root ); - - if ( tree-free_func ) - tree-free_func( tree-root ); - - SAFE_FREE( tree ); -} - -/** Find the next child given a key string */ @@ -127,15 +82,13 @@ TREE_NODE **siblings; int i; - if ( !(infant = SMB_MALLOC_P(TREE_NODE)) ) + if ( !(infant = TALLOC_ZERO_P( node, TREE_NODE)) ) return NULL; - ZERO_STRUCTP( infant ); - - infant-key = SMB_STRDUP( key ); + infant-key = talloc_strdup( infant, key ); infant-parent = node; - siblings =
svn commit: samba r10002 - in branches/tmp/RPCREWRITE/source: include locking smbd
Author: jra Date: 2005-09-03 16:55:33 + (Sat, 03 Sep 2005) New Revision: 10002 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10002 Log: Merge with head (I must have missed a commit or two somewhere). Jeremy. Modified: branches/tmp/RPCREWRITE/source/include/smb.h branches/tmp/RPCREWRITE/source/locking/locking.c branches/tmp/RPCREWRITE/source/smbd/aio.c branches/tmp/RPCREWRITE/source/smbd/close.c branches/tmp/RPCREWRITE/source/smbd/fileio.c branches/tmp/RPCREWRITE/source/smbd/files.c branches/tmp/RPCREWRITE/source/smbd/open.c branches/tmp/RPCREWRITE/source/smbd/oplock.c branches/tmp/RPCREWRITE/source/smbd/reply.c Changeset: Sorry, the patch is too large (670 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10002
svn commit: samba r10003 - in branches/SAMBA_3_0: examples examples/libmsrpc examples/libmsrpc/cacusermgr examples/libmsrpc/test examples/libmsrpc/test/lsa examples/libmsrpc/test/reg examples/libmsrpc
Author: jerry Date: 2005-09-03 16:55:45 + (Sat, 03 Sep 2005) New Revision: 10003 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10003 Log: in the rush for 10k, I forgot to run add the rest of Chris' libmsrpc files Added: branches/SAMBA_3_0/examples/libmsrpc/ branches/SAMBA_3_0/examples/libmsrpc/cacusermgr/ branches/SAMBA_3_0/examples/libmsrpc/cacusermgr/Makefile branches/SAMBA_3_0/examples/libmsrpc/cacusermgr/cacusermgr.c branches/SAMBA_3_0/examples/libmsrpc/cacusermgr/cacusermgr.h branches/SAMBA_3_0/examples/libmsrpc/cacusermgr/mgr_group.c branches/SAMBA_3_0/examples/libmsrpc/cacusermgr/mgr_user.c branches/SAMBA_3_0/examples/libmsrpc/cacusermgr/util.c branches/SAMBA_3_0/examples/libmsrpc/test/ branches/SAMBA_3_0/examples/libmsrpc/test/Makefile branches/SAMBA_3_0/examples/libmsrpc/test/README branches/SAMBA_3_0/examples/libmsrpc/test/lsa/ branches/SAMBA_3_0/examples/libmsrpc/test/lsa/ear.c branches/SAMBA_3_0/examples/libmsrpc/test/lsa/lsaenum.c branches/SAMBA_3_0/examples/libmsrpc/test/lsa/lsaenumprivs.c branches/SAMBA_3_0/examples/libmsrpc/test/lsa/lsapol.c branches/SAMBA_3_0/examples/libmsrpc/test/lsa/lsapriv.c branches/SAMBA_3_0/examples/libmsrpc/test/lsa/lsaq.c branches/SAMBA_3_0/examples/libmsrpc/test/lsa/lsatrust.c branches/SAMBA_3_0/examples/libmsrpc/test/reg/ branches/SAMBA_3_0/examples/libmsrpc/test/reg/regdelete.c branches/SAMBA_3_0/examples/libmsrpc/test/reg/regkey.c branches/SAMBA_3_0/examples/libmsrpc/test/reg/regkeycreate.c branches/SAMBA_3_0/examples/libmsrpc/test/reg/regkeyenum.c branches/SAMBA_3_0/examples/libmsrpc/test/reg/regopen.c branches/SAMBA_3_0/examples/libmsrpc/test/reg/regopenkey.c branches/SAMBA_3_0/examples/libmsrpc/test/reg/regqueryval.c branches/SAMBA_3_0/examples/libmsrpc/test/reg/regsetval.c branches/SAMBA_3_0/examples/libmsrpc/test/reg/regvalenum.c branches/SAMBA_3_0/examples/libmsrpc/test/reg/security.c branches/SAMBA_3_0/examples/libmsrpc/test/reg/shutdown.c branches/SAMBA_3_0/examples/libmsrpc/test/sam/ branches/SAMBA_3_0/examples/libmsrpc/test/sam/adduser.c branches/SAMBA_3_0/examples/libmsrpc/test/sam/disable.c branches/SAMBA_3_0/examples/libmsrpc/test/sam/dominfo.c branches/SAMBA_3_0/examples/libmsrpc/test/sam/enable.c branches/SAMBA_3_0/examples/libmsrpc/test/sam/samenum.c branches/SAMBA_3_0/examples/libmsrpc/test/sam/samgroup.c branches/SAMBA_3_0/examples/libmsrpc/test/sam/samlookup.c branches/SAMBA_3_0/examples/libmsrpc/test/sam/samuser.c branches/SAMBA_3_0/examples/libmsrpc/test/smbc_test/ branches/SAMBA_3_0/examples/libmsrpc/test/smbc_test/smbc.c branches/SAMBA_3_0/examples/libmsrpc/test/svcctl/ branches/SAMBA_3_0/examples/libmsrpc/test/svcctl/svc.c branches/SAMBA_3_0/examples/libmsrpc/test/test_util.c branches/SAMBA_3_0/examples/libmsrpc/test/test_util.h branches/SAMBA_3_0/source/include/libmsrpc.h branches/SAMBA_3_0/source/include/libmsrpc_internal.h branches/SAMBA_3_0/source/libmsrpc/ branches/SAMBA_3_0/source/libmsrpc/Doxyfile branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c branches/SAMBA_3_0/source/libmsrpc/cac_samr.c branches/SAMBA_3_0/source/libmsrpc/cac_svcctl.c branches/SAMBA_3_0/source/libmsrpc/cac_winreg.c branches/SAMBA_3_0/source/libmsrpc/libmsrpc.c branches/SAMBA_3_0/source/libmsrpc/libmsrpc.po branches/SAMBA_3_0/source/libmsrpc/libmsrpc_internal.c Changeset: Sorry, the patch is too large (15394 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10003
svn commit: samba r10004 - in branches/tmp/RPCREWRITE/source: include lib
Author: jra Date: 2005-09-03 16:57:07 + (Sat, 03 Sep 2005) New Revision: 10004 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10004 Log: Missed Jerry's change. Jeremy. Modified: branches/tmp/RPCREWRITE/source/include/adt_tree.h branches/tmp/RPCREWRITE/source/lib/adt_tree.c Changeset: Modified: branches/tmp/RPCREWRITE/source/include/adt_tree.h === --- branches/tmp/RPCREWRITE/source/include/adt_tree.h 2005-09-03 16:55:45 UTC (rev 10003) +++ branches/tmp/RPCREWRITE/source/include/adt_tree.h 2005-09-03 16:57:07 UTC (rev 10004) @@ -1,7 +1,7 @@ /* * Unix SMB/CIFS implementation. * Generic Abstract Data Types - * Copyright (C) Gerald Carter 2002. + * Copyright (C) Gerald Carter 2002-2005. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,18 +39,19 @@ typedef struct _tree_root { TREE_NODE *root; + + /* not used currently (is it needed?) */ int (*compare)(void* x, void *y); - void(*free_func)(void *p); } SORTED_TREE; /* * API */ -/* initializer and desctrutor */ -SORTED_TREE* pathtree_init( void *data_p, int (cmp_fn)(void*, void*), void (free_fn)(void*) ); -void pathtree_destroy( SORTED_TREE *tree ); +/* create a new tree, talloc_free() to throw it away */ +SORTED_TREE* pathtree_init( void *data_p, int (cmp_fn)(void*, void*) ); + /* add a new path component */ BOOL pathtree_add( SORTED_TREE *tree, const char *path, void *data_p ); Modified: branches/tmp/RPCREWRITE/source/lib/adt_tree.c === --- branches/tmp/RPCREWRITE/source/lib/adt_tree.c 2005-09-03 16:55:45 UTC (rev 10003) +++ branches/tmp/RPCREWRITE/source/lib/adt_tree.c 2005-09-03 16:57:07 UTC (rev 10004) @@ -23,8 +23,6 @@ /** - Initialize the tree's root. The cmp_fn is a callback function used - for comparision of two children */ static BOOL trim_tree_keypath( char *path, char **base, char **new_path ) @@ -54,26 +52,20 @@ for comparision of two children */ - SORTED_TREE* pathtree_init( void *data_p, - int (cmp_fn)(void*, void*), - void (free_fn)(void*) ) + SORTED_TREE* pathtree_init( void *data_p, int (cmp_fn)(void*, void*) ) { SORTED_TREE *tree = NULL; - if ( !(tree = SMB_MALLOC_P(SORTED_TREE)) ) + if ( !(tree = TALLOC_ZERO_P(NULL, SORTED_TREE)) ) return NULL; - ZERO_STRUCTP( tree ); - tree-compare = cmp_fn; - tree-free_func= free_fn; - if ( !(tree-root = SMB_MALLOC_P(TREE_NODE)) ) { - SAFE_FREE( tree ); + if ( !(tree-root = TALLOC_ZERO_P(tree, TREE_NODE)) ) { + TALLOC_FREE( tree ); return NULL; } - ZERO_STRUCTP( tree-root ); tree-root-data_p = data_p; return tree; @@ -81,43 +73,6 @@ /** - Delete a tree and free all allocated memory - */ - -static void pathtree_destroy_children( TREE_NODE *root ) -{ - int i; - - if ( !root ) - return; - - for ( i=0; iroot-num_children; i++ ) - { - pathtree_destroy_children( root-children[i] ); - } - - SAFE_FREE( root-children ); - SAFE_FREE( root-key ); - - return; -} - -/** - Delete a tree and free all allocated memory - */ - - void pathtree_destroy( SORTED_TREE *tree ) -{ - if ( tree-root ) - pathtree_destroy_children( tree-root ); - - if ( tree-free_func ) - tree-free_func( tree-root ); - - SAFE_FREE( tree ); -} - -/** Find the next child given a key string */ @@ -127,15 +82,13 @@ TREE_NODE **siblings; int i; - if ( !(infant = SMB_MALLOC_P(TREE_NODE)) ) + if ( !(infant = TALLOC_ZERO_P( node, TREE_NODE)) ) return NULL; - ZERO_STRUCTP( infant ); - - infant-key = SMB_STRDUP( key ); + infant-key =
svn commit: samba r10005 - in branches/SAMBA_3_0/source/libmsrpc: .
Author: jerry Date: 2005-09-03 16:58:44 + (Sat, 03 Sep 2005) New Revision: 10005 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10005 Log: forgot to remove one object file Removed: branches/SAMBA_3_0/source/libmsrpc/libmsrpc.po Changeset: Deleted: branches/SAMBA_3_0/source/libmsrpc/libmsrpc.po === (Binary files differ)
svn commit: samba r10006 - in branches/SAMBA_4_0/source/pidl: . lib/Parse/Pidl/Samba
Author: jelmer Date: 2005-09-03 17:16:18 + (Sat, 03 Sep 2005) New Revision: 10006 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10006 Log: Insert correct header file. Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba/TDR.pm branches/SAMBA_4_0/source/pidl/pidl Changeset: Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba/TDR.pm === --- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba/TDR.pm 2005-09-03 16:58:44 UTC (rev 10005) +++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba/TDR.pm 2005-09-03 17:16:18 UTC (rev 10006) @@ -60,7 +60,7 @@ if (has_property($e, charset)) { fatal($e,charset() on non-array element) unless (defined($e-{ARRAY_LEN}) and scalar(@{$e-{ARRAY_LEN}}) 0); - my $len = @{$e-{ARRAY_LEN}}[0]; + my $len = ParseExpr(@{$e-{ARRAY_LEN}}[0], $env); if ($len eq *) { $len = -1; } pidl TDR_CHECK(tdr_$t\_charset(tdr$name, v-$e-{NAME}, $len, sizeof($e-{TYPE}_t), CH_$e-{PROPERTIES}-{charset}));; return; @@ -112,6 +112,7 @@ } my %env = map { $_-{NAME} = v-$_-{NAME} } @{$e-{ELEMENTS}}; + $env{this} = v; ParserElement($_, $t, \%env) foreach (@{$e-{ELEMENTS}}); if ($t eq print) { @@ -215,6 +216,7 @@ pidl /* autogenerated by pidl */; pidl #include \includes.h\; pidl #include \$hdrname\; + pidl ; foreach (@$idl) { ParserInterface($_) if ($_-{TYPE} eq INTERFACE); } return $ret; } @@ -226,8 +228,6 @@ pidl #ifndef __TDR_$x-{NAME}_HEADER__; pidl #define __TDR_$x-{NAME}_HEADER__; - pidl #include \$outputdir/$x-{NAME}.h\; - foreach my $e (@{$x-{DATA}}) { next unless ($e-{TYPE} eq TYPEDEF); next unless has_property($e, public); @@ -251,11 +251,14 @@ pidl #endif /* __TDR_$x-{NAME}_HEADER__ */; } -sub Header($$) +sub Header($$$) { - my ($idl,$outputdir) = @_; + my ($idl,$outputdir,$basename) = @_; $ret = ; pidl /* Generated by pidl */; + + pidl #include \$outputdir/$basename.h\; + pidl ; foreach (@$idl) { HeaderInterface($_, $outputdir) if ($_-{TYPE} eq INTERFACE); Modified: branches/SAMBA_4_0/source/pidl/pidl === --- branches/SAMBA_4_0/source/pidl/pidl 2005-09-03 16:58:44 UTC (rev 10005) +++ branches/SAMBA_4_0/source/pidl/pidl 2005-09-03 17:16:18 UTC (rev 10006) @@ -339,7 +339,7 @@ if (defined($opt_tdr_header)) { require Parse::Pidl::Samba::TDR; - FileSave($tdr_header, Parse::Pidl::Samba::TDR::Header($pidl, $outputdir)); + FileSave($tdr_header, Parse::Pidl::Samba::TDR::Header($pidl, $outputdir,$basename)); } if ($opt_template) {
svn commit: samba r10007 - in branches/SAMBA_4_0/source: gtk/tools include lib/registry lib/registry/common lib/registry/tools rpc_server/winreg
Author: jelmer Date: 2005-09-03 17:17:30 + (Sat, 03 Sep 2005) New Revision: 10007 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10007 Log: Merge data_blk and data_len member of registry_value into a DATA_BLOB. Fix handling of REG_DWORD in the LDB backend. Fix a couple of warnings Modified: branches/SAMBA_4_0/source/gtk/tools/gregedit.c branches/SAMBA_4_0/source/include/registry.h branches/SAMBA_4_0/source/lib/registry/TODO branches/SAMBA_4_0/source/lib/registry/common/reg_interface.c branches/SAMBA_4_0/source/lib/registry/common/reg_util.c branches/SAMBA_4_0/source/lib/registry/reg_backend_ldb.c branches/SAMBA_4_0/source/lib/registry/reg_backend_nt4.c branches/SAMBA_4_0/source/lib/registry/reg_backend_rpc.c branches/SAMBA_4_0/source/lib/registry/reg_backend_w95.c branches/SAMBA_4_0/source/lib/registry/regf.idl branches/SAMBA_4_0/source/lib/registry/tools/regdiff.c branches/SAMBA_4_0/source/lib/registry/tools/regpatch.c branches/SAMBA_4_0/source/lib/registry/tools/regshell.c branches/SAMBA_4_0/source/rpc_server/winreg/rpc_winreg.c Changeset: Sorry, the patch is too large (665 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10007
svn commit: samba r10009 - in branches/SAMBA_4_0/source/lib/tdr: .
Author: jelmer Date: 2005-09-03 19:43:35 + (Sat, 03 Sep 2005) New Revision: 10009 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10009 Log: Fix bug in uint8 parsing functions Modified: branches/SAMBA_4_0/source/lib/tdr/tdr.c Changeset: Modified: branches/SAMBA_4_0/source/lib/tdr/tdr.c === --- branches/SAMBA_4_0/source/lib/tdr/tdr.c 2005-09-03 17:31:43 UTC (rev 10008) +++ branches/SAMBA_4_0/source/lib/tdr/tdr.c 2005-09-03 19:43:35 UTC (rev 10009) @@ -36,9 +36,11 @@ #define TDR_BE(tdr) ((tdr)-flags TDR_BIG_ENDIAN) +#define TDR_CVAL(tdr, ofs) CVAL(tdr-data.data,ofs) #define TDR_SVAL(tdr, ofs) (TDR_BE(tdr)?RSVAL(tdr-data.data,ofs):SVAL(tdr-data.data,ofs)) #define TDR_IVAL(tdr, ofs) (TDR_BE(tdr)?RIVAL(tdr-data.data,ofs):IVAL(tdr-data.data,ofs)) #define TDR_IVALS(tdr, ofs) (TDR_BE(tdr)?RIVALS(tdr-data.data,ofs):IVALS(tdr-data.data,ofs)) +#define TDR_SCVAL(tdr, ofs, v) SCVAL(tdr-data.data,ofs,v) #define TDR_SSVAL(tdr, ofs, v) do { if (TDR_BE(tdr)) { RSSVAL(tdr-data.data,ofs,v); } else SSVAL(tdr-data.data,ofs,v); } while (0) #define TDR_SIVAL(tdr, ofs, v) do { if (TDR_BE(tdr)) { RSIVAL(tdr-data.data,ofs,v); } else SIVAL(tdr-data.data,ofs,v); } while (0) #define TDR_SIVALS(tdr, ofs, v) do { if (TDR_BE(tdr)) { RSIVALS(tdr-data.data,ofs,v); } else SIVALS(tdr-data.data,ofs,v); } while (0) @@ -60,7 +62,7 @@ NTSTATUS tdr_pull_uint8(struct tdr_pull *tdr, uint8_t *v) { TDR_PULL_NEED_BYTES(tdr, 1); - SCVAL(tdr-data.data, tdr-offset, *v); + *v = TDR_CVAL(tdr, tdr-offset); tdr-offset += 1; return NT_STATUS_OK; } @@ -68,7 +70,7 @@ NTSTATUS tdr_push_uint8(struct tdr_push *tdr, const uint8_t *v) { TDR_PUSH_NEED_BYTES(tdr, 1); - SCVAL(tdr-data.data, tdr-offset, *v); + TDR_SCVAL(tdr, tdr-offset, *v); tdr-offset += 1; return NT_STATUS_OK; }
svn commit: samba r10010 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba: .
Author: jelmer Date: 2005-09-03 20:09:19 + (Sat, 03 Sep 2005) New Revision: 10010 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10010 Log: Support base_type() attribute Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba/TDR.pm Changeset: Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba/TDR.pm === --- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba/TDR.pm 2005-09-03 19:43:35 UTC (rev 10009) +++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba/TDR.pm 2005-09-03 20:09:19 UTC (rev 10010) @@ -167,7 +167,7 @@ sub ParserEnum() { my ($e,$n,$t,$p) = @_; - my $bt = Parse::Pidl::Typelist::enum_type_fn($e); + my $bt = ($e-{PROPERTIES}-{base_type} or uint8); pidl static($p).NTSTATUS tdr_$t\_$n (struct tdr_$t *tdr.printarg($t)., enum $n *v); pidl {; @@ -190,6 +190,8 @@ return if (has_property($e, no$t)); + $e-{DATA}-{PROPERTIES} = $e-{PROPERTIES}; + { STRUCT = \ParserStruct, UNION = \ParserUnion, ENUM = \ParserEnum, BITMAP = \ParserBitmap }-{$e-{DATA}-{TYPE}}($e-{DATA}, $e-{NAME}, $t, has_property($e, public));
svn commit: samba r10011 - in branches/tmp/vl-cluster/source: include locking smbd
Author: vlendec Date: 2005-09-03 21:23:02 + (Sat, 03 Sep 2005) New Revision: 10011 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10011 Log: This is a larger Saturday-night checkin. It compiles, but I did not run it once, this will follow tomorrow. So expect a stream of bugfix commits tomorrow. New habits would dictate that I send it to the list before applying it, but I see my temporary branch a bit as my playground. Sorry :-) This is a rewrite of locking.c. It gets rid of deferred_open.tdb, this time hopefully deadlock-free. It inserts the deferred open records into the normal share mode entry table. This adds a bit more load on that tdb, but as the load on that is way too high for a cluster anyway I need to find other ways to do it even with deferred_open.tdb around. It also adds the concept of unused share mode entries in the record. Why that? In a cluster, the sanity check of process_exists() is very difficult to realize. So my idea is to have a separate locking file per open file. Every process interested in an individual share mode entry sets a read lock on the entry. process_exists() in get_share_modes() then would see if it can get a write lock on the entry. If the table says that the entry is still in use, but the write lock can be acquired, then the process is obviously dead. That also implies that share mode entries may not be moved around in the file. Maybe for large tdb-mmap'ed share mode lists this might even be a speedup by removing memcpy operations. H. No. tdb_store moves stuff around anyway. We need a tdb_fetch_lock giving a direct handle on the mmap'ed region :-). I'll test this for use in a non-clustered Samba as well, maybe it's an alternative implementation for huge hosts with fast directory operations to reduce contention on locking.tdb. Volker Modified: branches/tmp/vl-cluster/source/include/smb.h branches/tmp/vl-cluster/source/locking/locking.c branches/tmp/vl-cluster/source/smbd/close.c branches/tmp/vl-cluster/source/smbd/open.c branches/tmp/vl-cluster/source/smbd/oplock.c branches/tmp/vl-cluster/source/smbd/trans2.c Changeset: Sorry, the patch is too large (1917 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10011
svn commit: samba r10012 - in branches/SAMBA_3_0/source/registry: .
Author: jerry Date: 2005-09-03 21:53:20 + (Sat, 03 Sep 2005) New Revision: 10012 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10012 Log: fix build breakage caused by forgotten commit in local tree Modified: branches/SAMBA_3_0/source/registry/reg_cachehook.c Changeset: Modified: branches/SAMBA_3_0/source/registry/reg_cachehook.c === --- branches/SAMBA_3_0/source/registry/reg_cachehook.c 2005-09-03 21:23:02 UTC (rev 10011) +++ branches/SAMBA_3_0/source/registry/reg_cachehook.c 2005-09-03 21:53:20 UTC (rev 10012) @@ -36,7 +36,7 @@ BOOL reghook_cache_init( void ) { - cache_tree = pathtree_init( default_hook, NULL, NULL ); + cache_tree = pathtree_init( default_hook, NULL ); return ( cache_tree == NULL ); }
svn commit: samba r10013 - in branches/SAMBA_4_0/source/lib/tdr: .
Author: jelmer Date: 2005-09-03 22:56:02 + (Sat, 03 Sep 2005) New Revision: 10013 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10013 Log: Support zero-sized strings. Modified: branches/SAMBA_4_0/source/lib/tdr/tdr.c Changeset: Modified: branches/SAMBA_4_0/source/lib/tdr/tdr.c === --- branches/SAMBA_4_0/source/lib/tdr/tdr.c 2005-09-03 21:53:20 UTC (rev 10012) +++ branches/SAMBA_4_0/source/lib/tdr/tdr.c 2005-09-03 22:56:02 UTC (rev 10013) @@ -143,6 +143,11 @@ } } + if (length == 0) { + *v = talloc_strdup(tdr, ); + return NT_STATUS_OK; + } + TDR_PULL_NEED_BYTES(tdr, el_size*length); ret = convert_string_talloc(tdr, chset, CH_UNIX, tdr-data.data+tdr-offset, el_size*length, discard_const_p(void *, v));
svn commit: samba r10014 - in branches/SAMBA_4_0/source/pidl: .
Author: jelmer Date: 2005-09-03 22:57:30 + (Sat, 03 Sep 2005) New Revision: 10014 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10014 Log: Support ?, : and = in attribute arguments. Modified: branches/SAMBA_4_0/source/pidl/idl.yp Changeset: Modified: branches/SAMBA_4_0/source/pidl/idl.yp === --- branches/SAMBA_4_0/source/pidl/idl.yp 2005-09-03 22:56:02 UTC (rev 10013) +++ branches/SAMBA_4_0/source/pidl/idl.yp 2005-09-03 22:57:30 UTC (rev 10014) @@ -286,6 +286,9 @@ | anytext '|' anytext { $_[1]$_[2]$_[3] } | anytext '' anytext { $_[1]$_[2]$_[3] } | anytext '/' anytext { $_[1]$_[2]$_[3] } +| anytext '?' anytext { $_[1]$_[2]$_[3] } +| anytext ':' anytext { $_[1]$_[2]$_[3] } +| anytext '=' anytext { $_[1]$_[2]$_[3] } | anytext '+' anytext { $_[1]$_[2]$_[3] } | anytext '~' anytext { $_[1]$_[2]$_[3] } | anytext '(' commalisttext ')' anytext { $_[1]$_[2]$_[3]$_[4]$_[5] }
svn commit: samba r10015 - in branches/SAMBA_4_0/source: include lib/registry pidl/lib/Parse/Pidl
Author: jelmer Date: 2005-09-03 22:58:04 + (Sat, 03 Sep 2005) New Revision: 10015 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10015 Log: Change the NT4 registry backend to use the IDL-generate parse functions. Modified: branches/SAMBA_4_0/source/include/registry.h branches/SAMBA_4_0/source/lib/registry/config.mk branches/SAMBA_4_0/source/lib/registry/reg_backend_nt4.c branches/SAMBA_4_0/source/lib/registry/regf.idl branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/IDL.pm Changeset: Sorry, the patch is too large (4586 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10015
svn commit: samba r10016 - in branches/SAMBA_4_0/source/lib/registry: . common tools
Author: jelmer Date: 2005-09-03 23:23:14 + (Sat, 03 Sep 2005) New Revision: 10016 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10016 Log: Support reading security descriptors on keys. Modified: branches/SAMBA_4_0/source/lib/registry/common/reg_interface.c branches/SAMBA_4_0/source/lib/registry/reg_backend_nt4.c branches/SAMBA_4_0/source/lib/registry/regf.idl branches/SAMBA_4_0/source/lib/registry/tools/regtree.c Changeset: Modified: branches/SAMBA_4_0/source/lib/registry/common/reg_interface.c === --- branches/SAMBA_4_0/source/lib/registry/common/reg_interface.c 2005-09-03 22:58:04 UTC (rev 10015) +++ branches/SAMBA_4_0/source/lib/registry/common/reg_interface.c 2005-09-03 23:23:14 UTC (rev 10016) @@ -427,7 +427,16 @@ } +WERROR reg_get_sec_desc(TALLOC_CTX *ctx, struct registry_key *key, struct security_descriptor **secdesc) +{ + /* A 'real' set function has preference */ + if (key-hive-functions-key_get_sec_desc) + return key-hive-functions-key_get_sec_desc(ctx, key, secdesc); + DEBUG(1, (Backend '%s' doesn't support method get_sec_desc\n, key-hive-functions-name)); + return WERR_NOT_SUPPORTED; +} + WERROR reg_del_value(struct registry_key *key, const char *valname) { WERROR ret = WERR_OK; Modified: branches/SAMBA_4_0/source/lib/registry/reg_backend_nt4.c === --- branches/SAMBA_4_0/source/lib/registry/reg_backend_nt4.c2005-09-03 22:58:04 UTC (rev 10015) +++ branches/SAMBA_4_0/source/lib/registry/reg_backend_nt4.c2005-09-03 23:23:14 UTC (rev 10016) @@ -21,6 +21,7 @@ #include registry.h #include system/filesys.h #include lib/registry/tdr_regf.h +#include librpc/gen_ndr/ndr_security.h /* * Read HBIN blocks into memory @@ -251,6 +252,51 @@ return WERR_OK; } +static WERROR regf_get_sec_desc(TALLOC_CTX *ctx, struct registry_key *key, struct security_descriptor **sd) +{ + struct nk_block *nk = key-backend_data; + struct tdr_pull *tdr; + struct sk_block sk; + DATA_BLOB data; + + data = regf_get_data(key-hive-backend_data, nk-sk_offset); + if (!data.data) { + DEBUG(0, (Unable to find security descriptor\n)); + return WERR_GENERAL_FAILURE; + } + + tdr = talloc_zero(ctx, struct tdr_pull); + if (!tdr) + return WERR_NOMEM; + + tdr-data = data; + + if (NT_STATUS_IS_ERR(tdr_pull_sk_block(tdr, sk))) { + DEBUG(0, (Error parsing SK block\n)); + return WERR_GENERAL_FAILURE; + } + + if (strcmp(sk.header, sk) != 0) { + DEBUG(0, (Expected 'sk', got '%s'\n, sk.header)); + return WERR_GENERAL_FAILURE; + } + + *sd = talloc(ctx, struct security_descriptor); + if (!*sd) + return WERR_NOMEM; + + data.data = sk.sec_desc; + data.length = sk.rec_size; + if (NT_STATUS_IS_ERR(ndr_pull_struct_blob(data, ctx, *sd, (ndr_pull_flags_fn_t)ndr_pull_security_descriptor))) { + DEBUG(0, (Error parsing security descriptor\n)); + return WERR_GENERAL_FAILURE; + } + + talloc_free(tdr); + + return WERR_OK; +} + static WERROR nt_open_hive (struct registry_hive *h, struct registry_key **key) { struct regf_data *regf; @@ -342,6 +388,7 @@ .num_values = regf_num_values, .get_subkey_by_index = regf_get_subkey, .get_value_by_index = regf_get_value, + .key_get_sec_desc = regf_get_sec_desc, }; NTSTATUS registry_nt4_init(void) Modified: branches/SAMBA_4_0/source/lib/registry/regf.idl === --- branches/SAMBA_4_0/source/lib/registry/regf.idl 2005-09-03 22:58:04 UTC (rev 10015) +++ branches/SAMBA_4_0/source/lib/registry/regf.idl 2005-09-03 23:23:14 UTC (rev 10016) @@ -100,9 +100,9 @@ } nk_block; /* sk (? Security Key ?) is the ACL of the registry. */ - typedef [noprint,nopush,nopull] struct { + typedef [noprint,public] struct { [charset(DOS)] uint8 header[2]; - uint16 uk1; + uint16 tag; uint32 prev_offset; uint32 next_offset; uint32 ref_cnt; Modified: branches/SAMBA_4_0/source/lib/registry/tools/regtree.c === --- branches/SAMBA_4_0/source/lib/registry/tools/regtree.c 2005-09-03 22:58:04 UTC (rev 10015) +++ branches/SAMBA_4_0/source/lib/registry/tools/regtree.c 2005-09-03 23:23:14 UTC (rev 10016) @@ -28,6 +28,7 @@ { struct registry_key *subkey; struct registry_value *value; + struct security_descriptor *sec_desc; WERROR error; int i; TALLOC_CTX *mem_ctx; @@ -68,9
svn commit: samba r10017 - in branches/tmp/RPCREWRITE/source: auth registry rpc_client
Author: jra Date: 2005-09-03 23:49:14 + (Sat, 03 Sep 2005) New Revision: 10017 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10017 Log: smbd now builds. Still unsure about some of the changes in auth/auth_domain.c. Will check these *carefully* against 3.0.x. Jeremy. Modified: branches/tmp/RPCREWRITE/source/auth/auth_domain.c branches/tmp/RPCREWRITE/source/registry/reg_cachehook.c branches/tmp/RPCREWRITE/source/rpc_client/cli_netlogon.c Changeset: Modified: branches/tmp/RPCREWRITE/source/auth/auth_domain.c === --- branches/tmp/RPCREWRITE/source/auth/auth_domain.c 2005-09-03 23:23:14 UTC (rev 10016) +++ branches/tmp/RPCREWRITE/source/auth/auth_domain.c 2005-09-03 23:49:14 UTC (rev 10017) @@ -40,7 +40,7 @@ * **/ -static NTSTATUS connect_to_domain_password_server(struct cli_state **cli, +static NTSTATUS connect_to_domain_password_server(struct cli_state **cli, const char *domain, const char *dc_name, struct in_addr dc_ip, @@ -104,12 +104,22 @@ if(!netlogon_pipe) { DEBUG(0,(connect_to_domain_password_server: unable to open the domain client session to \ machine %s. Error was : %s.\n, dc_name, cli_errstr(*cli))); - cli_ulogoff(*cli); cli_shutdown(*cli); release_server_mutex(); return NT_STATUS_NO_LOGON_SERVERS; } +#if 0 + /* JRA TESTME - do we need to do this to get the netlogon request to succeed ? */ + ntresult = rpccli_netlogon_setup_creds(cmd_entry-rpc_pipe, + dc_name, + lp_workgroup(), + global_myname(), + trust_password, + sec_channel_type, + neg_flags); +#endif + /* We exit here with the mutex *locked*. JRA */ *pipe_ret = netlogon_pipe; @@ -124,11 +134,12 @@ / static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx, - const auth_usersupplied_info *user_info, - const char *domain, - uchar chal[8], - auth_serversupplied_info **server_info, - const char *dc_name, struct in_addr dc_ip) + const auth_usersupplied_info *user_info, + const char *domain, + uchar chal[8], + auth_serversupplied_info **server_info, + const char *dc_name, + struct in_addr dc_ip) { NET_USER_INFO_3 info3; @@ -149,8 +160,12 @@ /* rety loop for robustness */ for (i = 0; !NT_STATUS_IS_OK(nt_status) retry (i 3); i++) { - nt_status = connect_to_domain_password_server(cli, domain, dc_name, - dc_ip, netlogon_pipe, retry); + nt_status = connect_to_domain_password_server(cli, + domain, + dc_name, + dc_ip, + netlogon_pipe, + retry); } if ( !NT_STATUS_IS_OK(nt_status) ) { @@ -168,13 +183,19 @@ * in the info3 structure. */ - nt_status = cli_netlogon_sam_network_logon(cli, mem_ctx, - NULL, user_info-smb_name.str, user_info-domain.str, - user_info-wksta_name.str, chal, user_info-lm_resp, - user_info-nt_resp, info3); - - /* let go as soon as possible so we avoid any potential deadlocks - with winbind lookup up users or groups */ + nt_status = rpccli_netlogon_sam_network_logon(netlogon_pipe, + mem_ctx, + dc_name, /* server name */ + user_info-smb_name.str, /* user name logging on. */ + user_info-domain.str, /* domain name */ + user_info-wksta_name.str, /* workstation name */ + chal, /* 8 byte challenge. */ +
svn commit: samba r10018 - in trunk/source/registry: .
Author: jra Date: 2005-09-03 23:50:52 + (Sat, 03 Sep 2005) New Revision: 10018 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10018 Log: Fix the build (Jerry please check). Jeremy. Modified: trunk/source/registry/reg_cachehook.c Changeset: Modified: trunk/source/registry/reg_cachehook.c === --- trunk/source/registry/reg_cachehook.c 2005-09-03 23:49:14 UTC (rev 10017) +++ trunk/source/registry/reg_cachehook.c 2005-09-03 23:50:52 UTC (rev 10018) @@ -36,7 +36,7 @@ BOOL reghook_cache_init( void ) { - cache_tree = pathtree_init( default_hook, NULL, NULL ); + cache_tree = pathtree_init( default_hook, NULL ); return ( cache_tree == NULL ); }
Build status as of Sun Sep 4 00:00:01 2005
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2005-09-03 00:00:09.0 + +++ /home/build/master/cache/broken_results.txt 2005-09-04 00:00:33.0 + @@ -1,17 +1,17 @@ -Build status as of Sat Sep 3 00:00:01 2005 +Build status as of Sun Sep 4 00:00:01 2005 Build counts: Tree Total Broken Panic -ccache 38 5 0 -distcc 38 4 0 -lorikeet-heimdal 35 35 0 -ppp 25 0 0 +ccache 39 5 0 +distcc 39 4 0 +lorikeet-heimdal 36 22 0 +ppp 26 0 0 rsync38 2 0 -samba17 2 0 +samba27 4 1 samba-docs 0 0 0 -samba4 46 22 0 -samba_3_040 11 0 -smb-build33 3 0 -talloc 36 11 0 -tdb 36 14 0 +samba4 46 20 0 +samba_3_040 18 0 +smb-build34 3 0 +talloc 37 11 0 +tdb 37 15 0
svn commit: samba r10019 - in branches/SAMBA_4_0/source/lib/tdr: .
Author: jelmer Date: 2005-09-04 02:01:42 + (Sun, 04 Sep 2005) New Revision: 10019 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10019 Log: Only return NT_STATUS_NO_MEMORY if the alloc failed.. Modified: branches/SAMBA_4_0/source/lib/tdr/tdr.c Changeset: Modified: branches/SAMBA_4_0/source/lib/tdr/tdr.c === --- branches/SAMBA_4_0/source/lib/tdr/tdr.c 2005-09-03 23:50:52 UTC (rev 10018) +++ branches/SAMBA_4_0/source/lib/tdr/tdr.c 2005-09-04 02:01:42 UTC (rev 10019) @@ -55,7 +55,11 @@ } tdr-data.data = talloc_realloc(tdr, tdr-data.data, uint8_t, tdr-data.length + TDR_BASE_MARSHALL_SIZE); - return NT_STATUS_NO_MEMORY; + + if (tdr-data.data == NULL) + return NT_STATUS_NO_MEMORY; + + return NT_STATUS_OK; }
svn commit: samba r10020 - in branches/SAMBA_4_0/source/lib/registry: . common
Author: jelmer Date: 2005-09-04 02:09:32 + (Sun, 04 Sep 2005) New Revision: 10020 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10020 Log: Support for malloc / realloc / free in HBIN blocks Initial support for adding keys (still broken though) Modified: branches/SAMBA_4_0/source/lib/registry/common/reg_interface.c branches/SAMBA_4_0/source/lib/registry/reg_backend_nt4.c branches/SAMBA_4_0/source/lib/registry/regf.idl Changeset: Sorry, the patch is too large (502 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=10020