svn commit: samba r6164 - in branches/SAMBA_4_0/source/libnet: .
Author: mimir Date: 2005-04-01 08:14:57 + (Fri, 01 Apr 2005) New Revision: 6164 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6164 Log: More comments in the code. rafal Modified: branches/SAMBA_4_0/source/libnet/userinfo.c Changeset: Modified: branches/SAMBA_4_0/source/libnet/userinfo.c === --- branches/SAMBA_4_0/source/libnet/userinfo.c 2005-04-01 00:54:55 UTC (rev 6163) +++ branches/SAMBA_4_0/source/libnet/userinfo.c 2005-04-01 08:14:57 UTC (rev 6164) @@ -31,6 +31,10 @@ static void userinfo_handler(struct rpc_request *req); +/** + * Stage 1: Open user policy handle in SAM server. + */ + static NTSTATUS userinfo_openuser(struct composite_context *c, struct rpc_composite_userinfo *io) { @@ -63,6 +67,10 @@ } +/** + * Stage 2: Get requested user information. + */ + static NTSTATUS userinfo_getuser(struct composite_context *c, struct rpc_composite_userinfo *io) { @@ -93,6 +101,10 @@ } +/** + * Stage3: Close policy handle associated with opened user. + */ + static NTSTATUS userinfo_closeuser(struct composite_context *c, struct rpc_composite_userinfo *io) { @@ -110,11 +122,19 @@ } +/** + * Event handler for asynchronous request. Handles transition through + * intermediate stages of the call. + * + * @param req rpc call context + */ + static void userinfo_handler(struct rpc_request *req) { struct composite_context *c = req-async.private; struct userinfo_state *s = talloc_get_type(c-private, struct userinfo_state); - + + /* Stages of the call */ switch (s-stage) { case USERINFO_OPENUSER: c-status = userinfo_openuser(c, s-io); @@ -140,6 +160,13 @@ } +/** + * Sends asynchronous userinfo request + * + * @param p dce/rpc call pipe + * @param io arguments and results of the call + */ + struct composite_context* rpc_composite_userinfo_send(struct dcerpc_pipe *p, struct rpc_composite_userinfo *io) { @@ -187,12 +214,22 @@ } +/** + * Waits for and receives result of asynchronous userinfo call + * + * @param c composite context returned by asynchronous userinfo call + * @param mem_ctx memory context of the call + * @param io pointer to results (and arguments) of the call + * @return nt status code of execution + */ + NTSTATUS rpc_composite_userinfo_recv(struct composite_context *c, TALLOC_CTX *mem_ctx, struct rpc_composite_userinfo *io) { NTSTATUS status; struct userinfo_state *s; + /* wait for results of sending request */ status = composite_wait(c); if (NT_STATUS_IS_OK(status) io) { @@ -200,12 +237,22 @@ talloc_steal(mem_ctx, s-io.out.info); io-out.info = s-io.out.info; } - + + /* memory context associated to composite context is no longer needed */ talloc_free(c); return status; } +/** + * Synchronous version of userinfo call + * + * @param pipe dce/rpc call pipe + * @param mem_ctx memory context for the call + * @param io arguments and results of the call + * @return nt status code of execution + */ + NTSTATUS rpc_composite_userinfo(struct dcerpc_pipe *pipe, TALLOC_CTX *mem_ctx, struct rpc_composite_userinfo *io)
svn commit: samba r6165 - in branches/SAMBA_4_0/source: libnet torture/libnet
Author: tridge Date: 2005-04-01 11:24:52 + (Fri, 01 Apr 2005) New Revision: 6165 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6165 Log: fixed up the userinfo composite code. Fixes include: - talloc should always be done in the right context. For example, when creating the userinfo_state structure, place it inside the composite structure, not directly on the pipe. If this isn't done then correct cleanup can't happen on errors (as cleanup destroys the top level composite context only) - define private structures like userinfo_state in the userinfo.c code, not in the public header - only keep the parameters we need in the state structure. For example, the domain_handle is only needed in the first call, so we don't need to keep it around in the state structure, but the level is needed in later calls, so we need to keep it - always initialise [out,ref] parameters in RPC calls. The [ref] part means that the call assumes the pointer it has been given is valid. If you don't initialise it then you will get a segv on recv. This is why the code was dying. - don't use internal strucrure elements like the pipe pipe-conn-pending outside of the internal rpc implementation. That is an internal list, trying to use it from external code will cause crashes. - rpc calls assume that rpc call strucrures remain valid for the duration of the call. This means you need to keep the structures (such as struct samr_Close) in the userinfo_state strucrure, otherwise it will go out of scope during the async processing - need to remember to change c-state to SMBCLI_REQUEST_DONE when the request has finished in the close handler, otherwise it will loop forever trying to close Mimir, please look at the diff carefully for more detailed info on the fixes Modified: branches/SAMBA_4_0/source/libnet/composite.h branches/SAMBA_4_0/source/libnet/userinfo.c branches/SAMBA_4_0/source/torture/libnet/userinfo.c Changeset: Sorry, the patch is too large (293 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6165
svn commit: samba r6166 - in branches/SAMBA_3_0/source/lib: .
Author: gd Date: 2005-04-01 13:12:51 + (Fri, 01 Apr 2005) New Revision: 6166 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6166 Log: Derell, I'm reverting this part of -r4917 because it modifies the keys to search in tdbs in a way that is not upgrade-safe and somewhat weird to use: Users have to modify policies like pdbedit -P maximum password policies (seconds since 1970) The value-description should better go into the manpage. Guenther Modified: branches/SAMBA_3_0/source/lib/account_pol.c Changeset: Modified: branches/SAMBA_3_0/source/lib/account_pol.c === --- branches/SAMBA_3_0/source/lib/account_pol.c 2005-04-01 11:24:52 UTC (rev 6165) +++ branches/SAMBA_3_0/source/lib/account_pol.c 2005-04-01 13:12:51 UTC (rev 6166) @@ -118,8 +118,8 @@ {AP_MIN_PASSWORD_LEN, min password length}, {AP_PASSWORD_HISTORY, password history}, {AP_USER_MUST_LOGON_TO_CHG_PASS, user must logon to change password}, - {AP_MAX_PASSWORD_AGE, maximum password age (seconds since 1970)}, - {AP_MIN_PASSWORD_AGE,minimum password age (seconds since 1970)}, + {AP_MAX_PASSWORD_AGE, maximum password age}, + {AP_MIN_PASSWORD_AGE,minimum password age}, {AP_LOCK_ACCOUNT_DURATION, lockout duration}, {AP_RESET_COUNT_TIME, reset count minutes}, {AP_BAD_ATTEMPT_LOCKOUT, bad lockout attempt},
Re: svn commit: samba r6165 - in branches/SAMBA_4_0/source: libnet torture/libnet
On Fri, Apr 01, 2005 at 11:24:52AM +, [EMAIL PROTECTED] wrote: Author: tridge Date: 2005-04-01 11:24:52 + (Fri, 01 Apr 2005) New Revision: 6165 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6165 Log: fixed up the userinfo composite code. Fixes include: [...] Mimir, please look at the diff carefully for more detailed info on the fixes Thanks a lot! I'll study it tonight. cheers, -- Rafal Szczesniak Samba Team member http://www.samba.org signature.asc Description: Digital signature
svn commit: samba r6167 - in branches/SAMBA_3_0/source/include: .
Author: sfrench Date: 2005-04-01 18:14:24 + (Fri, 01 Apr 2005) New Revision: 6167 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6167 Log: Add more defines for POSIX extensions to match the newly added client implementation Modified: branches/SAMBA_3_0/source/include/trans2.h Changeset: Modified: branches/SAMBA_3_0/source/include/trans2.h === --- branches/SAMBA_3_0/source/include/trans2.h 2005-04-01 13:12:51 UTC (rev 6166) +++ branches/SAMBA_3_0/source/include/trans2.h 2005-04-01 18:14:24 UTC (rev 6167) @@ -440,6 +440,9 @@ #define SMB_QUERY_XATTR0x205 /* need for non-user XATTRs */ #define SMB_QUERY_ATTR_FLAGS 0x206 /* chflags, chattr */ #define SMB_SET_ATTR_FLAGS 0x206 +#define SMB_QUERY_POSIX_PERMISSION 0x207 +#define SMB_QUERY_POSIX_LOCK 0x208 +#define SMB_SET_POSIX_LOCK0x208 /* Transact 2 Find First levels */ #define SMB_FIND_FILE_UNIX 0x202 @@ -464,6 +467,13 @@ #define CIFS_UNIX_FCNTL_LOCKS_CAP 0x1 #define CIFS_UNIX_POSIX_ACLS_CAP0x2 +#define CIFS_UNIX_XATTTR_CAP 0x4 /* for support of other xattr + namespaces such as system, + security and trusted */ +#define CIFS_UNIX_EXTATTR_CAP 0x8 /* for support of chattr + (chflags) and lsattr */ +#define CIFS_UNIX_POSIX_LOCK 0x10 + #define SMB_QUERY_POSIX_FS_INFO 0x201
svn commit: samba r6168 - in trunk/source/smbd: .
Author: jra Date: 2005-04-01 19:57:17 + (Fri, 01 Apr 2005) New Revision: 6168 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6168 Log: Fix bug #2563. Infinite loop on non-existant file with findnext. Jeremy Modified: trunk/source/smbd/dir.c Changeset: Modified: trunk/source/smbd/dir.c === --- trunk/source/smbd/dir.c 2005-04-01 18:14:24 UTC (rev 6167) +++ trunk/source/smbd/dir.c 2005-04-01 19:57:17 UTC (rev 6168) @@ -573,8 +573,6 @@ } } - dptr-has_wild = True; - /* In case sensitive mode we don't search - we know if it doesn't exist with a stat we will fail. */ @@ -584,6 +582,7 @@ dptr-dir_hnd-offset = *poffset = -1; return NULL; } else { + dptr-has_wild = True; return dptr_normal_ReadDirName(dptr, poffset, pst); } } @@ -602,7 +601,7 @@ return False; } - while (SearchDir(dptr-dir_hnd, name, poffset) == True) { + if (SearchDir(dptr-dir_hnd, name, poffset)) { if (is_visible_file(dptr-conn, dptr-path, name, pst, True)) { return True; }
svn commit: samba r6169 - in branches/SAMBA_3_0/source/smbd: .
Author: jra Date: 2005-04-01 19:57:22 + (Fri, 01 Apr 2005) New Revision: 6169 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6169 Log: Fix bug #2563. Infinite loop on non-existant file with findnext. Jeremy Modified: branches/SAMBA_3_0/source/smbd/dir.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/dir.c === --- branches/SAMBA_3_0/source/smbd/dir.c2005-04-01 19:57:17 UTC (rev 6168) +++ branches/SAMBA_3_0/source/smbd/dir.c2005-04-01 19:57:22 UTC (rev 6169) @@ -573,8 +573,6 @@ } } - dptr-has_wild = True; - /* In case sensitive mode we don't search - we know if it doesn't exist with a stat we will fail. */ @@ -584,6 +582,7 @@ dptr-dir_hnd-offset = *poffset = -1; return NULL; } else { + dptr-has_wild = True; return dptr_normal_ReadDirName(dptr, poffset, pst); } } @@ -602,7 +601,7 @@ return False; } - while (SearchDir(dptr-dir_hnd, name, poffset) == True) { + if (SearchDir(dptr-dir_hnd, name, poffset)) { if (is_visible_file(dptr-conn, dptr-path, name, pst, True)) { return True; }
svn commit: samba r6170 - in branches/SAMBA_3_0/source/include: .
Author: sfrench Date: 2005-04-01 21:15:09 + (Fri, 01 Apr 2005) New Revision: 6170 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6170 Log: Remove redundant flag that I had just added. Modified: branches/SAMBA_3_0/source/include/trans2.h Changeset: Modified: branches/SAMBA_3_0/source/include/trans2.h === --- branches/SAMBA_3_0/source/include/trans2.h 2005-04-01 19:57:22 UTC (rev 6169) +++ branches/SAMBA_3_0/source/include/trans2.h 2005-04-01 21:15:09 UTC (rev 6170) @@ -472,7 +472,6 @@ security and trusted */ #define CIFS_UNIX_EXTATTR_CAP 0x8 /* for support of chattr (chflags) and lsattr */ -#define CIFS_UNIX_POSIX_LOCK 0x10 #define SMB_QUERY_POSIX_FS_INFO 0x201
svn commit: samba r6171 - in trunk/source: include smbd
Author: jra Date: 2005-04-01 23:11:28 + (Fri, 01 Apr 2005) New Revision: 6171 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6171 Log: Tidy up error processing significantly. Remove unix_ERR_XXX global nastyness. Jeremy. Modified: trunk/source/include/nt_status.h trunk/source/include/nterr.h trunk/source/include/smb.h trunk/source/include/smb_macros.h trunk/source/smbd/error.c trunk/source/smbd/files.c trunk/source/smbd/nttrans.c trunk/source/smbd/open.c trunk/source/smbd/oplock.c trunk/source/smbd/process.c trunk/source/smbd/reply.c trunk/source/smbd/trans2.c Changeset: Sorry, the patch is too large (934 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6171
svn commit: samba r6172 - in branches/SAMBA_3_0/source: include smbd
Author: jra Date: 2005-04-01 23:11:28 + (Fri, 01 Apr 2005) New Revision: 6172 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6172 Log: Tidy up error processing significantly. Remove unix_ERR_XXX global nastyness. Jeremy. Modified: branches/SAMBA_3_0/source/include/nt_status.h branches/SAMBA_3_0/source/include/nterr.h branches/SAMBA_3_0/source/include/smb.h branches/SAMBA_3_0/source/include/smb_macros.h branches/SAMBA_3_0/source/smbd/error.c branches/SAMBA_3_0/source/smbd/files.c branches/SAMBA_3_0/source/smbd/nttrans.c branches/SAMBA_3_0/source/smbd/open.c branches/SAMBA_3_0/source/smbd/oplock.c branches/SAMBA_3_0/source/smbd/process.c branches/SAMBA_3_0/source/smbd/reply.c branches/SAMBA_3_0/source/smbd/trans2.c Changeset: Sorry, the patch is too large (934 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6172
Build status as of Sat Apr 2 00:00:02 2005
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2005-04-01 00:00:17.0 + +++ /home/build/master/cache/broken_results.txt 2005-04-02 00:00:42.0 + @@ -1,19 +1,18 @@ -Build status as of Fri Apr 1 00:00:01 2005 +Build status as of Sat Apr 2 00:00:02 2005 Build counts: Tree Total Broken Panic ccache 38 3 0 distcc 38 3 0 ppp 22 2 0 -rsync38 4 0 +rsync38 5 0 samba1 1 1 samba-docs 0 0 0 -samba4 43 14 0 -samba_3_039 8 0 +samba4 42 14 0 +samba_3_039 10 0 Currently broken builds: Host Tree Compiler Status -cyberone samba4 gccok/ 2/?/? fusberta samba4 gccok/ 2/?/? samba-s390 samba4 gccok/ 2/?/? rhonwynsamba4 gcc-4.0ok/ 2/?/? @@ -21,6 +20,7 @@ rhonwynsamba4 tccok/ 2/?/? aretnapccache iccok/ok/ok/ 1 aretnapdistcc icc 77/?/?/? +aretnapsamba_3_0iccok/ok/ok/ 1 gwen distcc cc ok/ 1/?/? gwen samba4 cc ok/ 1/?/? gwen samba_3_0cc ok/ 1/?/? @@ -45,7 +45,10 @@ m30rsyncgccok/ok/ok/ 2 m30samba4 gccok/ 2/?/? m30samba_3_0gccok/ok/ok/ 1 +metze02rsyncgcc 1/?/?/? metze02sambagccok/ok/ok/ 1/PANIC +metze02samba4 gccok/ 2/?/? +metze02samba_3_0gcc 77/?/?/? metze02samba4 gcc-3.4ok/ 2/?/? opippp gccok/ 2/?/?
svn commit: samba r6173 - in trunk/source/smbd: .
Author: jra Date: 2005-04-02 00:13:27 + (Sat, 02 Apr 2005) New Revision: 6173 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6173 Log: Fixup T2 open call - we were returning 2 bytes short. Jeremy. Modified: trunk/source/smbd/open.c trunk/source/smbd/reply.c trunk/source/smbd/trans2.c Changeset: Modified: trunk/source/smbd/open.c === --- trunk/source/smbd/open.c2005-04-01 23:11:28 UTC (rev 6172) +++ trunk/source/smbd/open.c2005-04-02 00:13:27 UTC (rev 6173) @@ -1098,23 +1098,6 @@ return print_fsp_open(conn, fname); } - switch(ofun) { - case FILE_EXISTS_OPEN: - case FILE_EXISTS_TRUNCATE: - case FILE_EXISTS_FAIL | FILE_CREATE_IF_NOT_EXIST: - case FILE_EXISTS_OPEN | FILE_CREATE_IF_NOT_EXIST: - case FILE_EXISTS_TRUNCATE | FILE_CREATE_IF_NOT_EXIST: - break; /* These are ok. */ - default: - if (GET_OPEN_MODE(share_mode) == DOS_OPEN_EXEC) { - ofun = FILE_EXISTS_FAIL | FILE_CREATE_IF_NOT_EXIST; - break; - } - /* Cause caller to force dos errors. */ - set_saved_error_triple(ERRDOS, ERRbadaccess, NT_STATUS_INVALID); - return NULL; - } - DEBUG(10,(open_file_shared: fname = %s, dos_attrs = %x, share_mode = %x, ofun = %x, mode = %o, oplock request = %d\n, fname, new_dos_mode, share_mode, ofun, (int)mode, oplock_request )); Modified: trunk/source/smbd/reply.c === --- trunk/source/smbd/reply.c 2005-04-01 23:11:28 UTC (rev 6172) +++ trunk/source/smbd/reply.c 2005-04-02 00:13:27 UTC (rev 6173) @@ -1295,7 +1295,17 @@ END_PROFILE(SMBopenX); return ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND); } - + + /* Strange open mode mapping. */ + if (smb_ofun == 0) { + if (GET_OPEN_MODE(smb_mode) == DOS_OPEN_EXEC) { + smb_ofun = FILE_EXISTS_FAIL | FILE_CREATE_IF_NOT_EXIST; + } else { + END_PROFILE(SMBopenX); + return ERROR_FORCE_DOS(ERRDOS, ERRbadaccess); + } + } + fsp = open_file_shared(conn,fname,sbuf,smb_mode,smb_ofun,(uint32)smb_attr, oplock_request, rmode,smb_action); Modified: trunk/source/smbd/trans2.c === --- trunk/source/smbd/trans2.c 2005-04-01 23:11:28 UTC (rev 6172) +++ trunk/source/smbd/trans2.c 2005-04-02 00:13:27 UTC (rev 6173) @@ -732,6 +732,7 @@ files_struct *fsp; TALLOC_CTX *ctx = NULL; struct ea_list *ea_list = NULL; + uint16 flags = 0; NTSTATUS status; /* @@ -742,11 +743,12 @@ return ERROR_NT(NT_STATUS_INVALID_PARAMETER); } + flags = SVAL(params, 0); open_mode = SVAL(params, 2); open_attr = SVAL(params,6); -oplock_request = (SVAL(params,0) REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0; +oplock_request = (flags REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0; if (oplock_request) { -oplock_request |= (SVAL(params,0) REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0; +oplock_request |= (flags REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0; } #if 0 @@ -780,6 +782,16 @@ return set_bad_path_error(errno, bad_path, outbuf, ERRDOS,ERRnoaccess); } + /* Strange open mode mapping. */ + if (open_ofun == 0) { + if (GET_OPEN_MODE(open_mode) == DOS_OPEN_EXEC) { + open_ofun = FILE_EXISTS_FAIL | FILE_CREATE_IF_NOT_EXIST; + } else { + END_PROFILE(SMBopenX); + return ERROR_FORCE_DOS(ERRDOS, ERRbadaccess); + } + } + /* Any data in this call is an EA list. */ if (total_data !lp_ea_support(SNUM(conn))) { return ERROR_NT(NT_STATUS_EAS_NOT_SUPPORTED); @@ -839,21 +851,22 @@ } /* Realloc the size of parameters and data we will return */ - params = SMB_REALLOC(*pparams, 28); + params = SMB_REALLOC(*pparams, 30); if( params == NULL ) { return ERROR_NT(NT_STATUS_NO_MEMORY); } *pparams = params; - memset((char *)params,'\0',28); + memset((char *)params,'\0',30); SSVAL(params,0,fsp-fnum); SSVAL(params,2,fmode); put_dos_date2(params,4, mtime); SIVAL(params,8, (uint32)size); SSVAL(params,12,rmode); - if (oplock_request lp_fake_oplocks(SNUM(conn))) + if (oplock_request lp_fake_oplocks(SNUM(conn))) {
svn commit: samba r6174 - in branches/SAMBA_3_0/source/smbd: .
Author: jra Date: 2005-04-02 00:13:27 + (Sat, 02 Apr 2005) New Revision: 6174 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6174 Log: Fixup T2 open call - we were returning 2 bytes short. Jeremy. Modified: branches/SAMBA_3_0/source/smbd/open.c branches/SAMBA_3_0/source/smbd/reply.c branches/SAMBA_3_0/source/smbd/trans2.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/open.c === --- branches/SAMBA_3_0/source/smbd/open.c 2005-04-02 00:13:27 UTC (rev 6173) +++ branches/SAMBA_3_0/source/smbd/open.c 2005-04-02 00:13:27 UTC (rev 6174) @@ -1098,23 +1098,6 @@ return print_fsp_open(conn, fname); } - switch(ofun) { - case FILE_EXISTS_OPEN: - case FILE_EXISTS_TRUNCATE: - case FILE_EXISTS_FAIL | FILE_CREATE_IF_NOT_EXIST: - case FILE_EXISTS_OPEN | FILE_CREATE_IF_NOT_EXIST: - case FILE_EXISTS_TRUNCATE | FILE_CREATE_IF_NOT_EXIST: - break; /* These are ok. */ - default: - if (GET_OPEN_MODE(share_mode) == DOS_OPEN_EXEC) { - ofun = FILE_EXISTS_FAIL | FILE_CREATE_IF_NOT_EXIST; - break; - } - /* Cause caller to force dos errors. */ - set_saved_error_triple(ERRDOS, ERRbadaccess, NT_STATUS_INVALID); - return NULL; - } - DEBUG(10,(open_file_shared: fname = %s, dos_attrs = %x, share_mode = %x, ofun = %x, mode = %o, oplock request = %d\n, fname, new_dos_mode, share_mode, ofun, (int)mode, oplock_request )); Modified: branches/SAMBA_3_0/source/smbd/reply.c === --- branches/SAMBA_3_0/source/smbd/reply.c 2005-04-02 00:13:27 UTC (rev 6173) +++ branches/SAMBA_3_0/source/smbd/reply.c 2005-04-02 00:13:27 UTC (rev 6174) @@ -1295,7 +1295,17 @@ END_PROFILE(SMBopenX); return ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND); } - + + /* Strange open mode mapping. */ + if (smb_ofun == 0) { + if (GET_OPEN_MODE(smb_mode) == DOS_OPEN_EXEC) { + smb_ofun = FILE_EXISTS_FAIL | FILE_CREATE_IF_NOT_EXIST; + } else { + END_PROFILE(SMBopenX); + return ERROR_FORCE_DOS(ERRDOS, ERRbadaccess); + } + } + fsp = open_file_shared(conn,fname,sbuf,smb_mode,smb_ofun,(uint32)smb_attr, oplock_request, rmode,smb_action); Modified: branches/SAMBA_3_0/source/smbd/trans2.c === --- branches/SAMBA_3_0/source/smbd/trans2.c 2005-04-02 00:13:27 UTC (rev 6173) +++ branches/SAMBA_3_0/source/smbd/trans2.c 2005-04-02 00:13:27 UTC (rev 6174) @@ -732,6 +732,7 @@ files_struct *fsp; TALLOC_CTX *ctx = NULL; struct ea_list *ea_list = NULL; + uint16 flags = 0; NTSTATUS status; /* @@ -742,11 +743,12 @@ return ERROR_NT(NT_STATUS_INVALID_PARAMETER); } + flags = SVAL(params, 0); open_mode = SVAL(params, 2); open_attr = SVAL(params,6); -oplock_request = (SVAL(params,0) REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0; +oplock_request = (flags REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0; if (oplock_request) { -oplock_request |= (SVAL(params,0) REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0; +oplock_request |= (flags REQUEST_BATCH_OPLOCK) ? BATCH_OPLOCK : 0; } #if 0 @@ -780,6 +782,16 @@ return set_bad_path_error(errno, bad_path, outbuf, ERRDOS,ERRnoaccess); } + /* Strange open mode mapping. */ + if (open_ofun == 0) { + if (GET_OPEN_MODE(open_mode) == DOS_OPEN_EXEC) { + open_ofun = FILE_EXISTS_FAIL | FILE_CREATE_IF_NOT_EXIST; + } else { + END_PROFILE(SMBopenX); + return ERROR_FORCE_DOS(ERRDOS, ERRbadaccess); + } + } + /* Any data in this call is an EA list. */ if (total_data !lp_ea_support(SNUM(conn))) { return ERROR_NT(NT_STATUS_EAS_NOT_SUPPORTED); @@ -839,21 +851,22 @@ } /* Realloc the size of parameters and data we will return */ - params = SMB_REALLOC(*pparams, 28); + params = SMB_REALLOC(*pparams, 30); if( params == NULL ) { return ERROR_NT(NT_STATUS_NO_MEMORY); } *pparams = params; - memset((char *)params,'\0',28); + memset((char *)params,'\0',30); SSVAL(params,0,fsp-fnum); SSVAL(params,2,fmode); put_dos_date2(params,4, mtime);
svn commit: samba r6176 - branches/SAMBA_3_0/source/torture trunk/source/torture
Author: tpot Date: 2005-04-02 00:59:12 + (Sat, 02 Apr 2005) New Revision: 6176 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6176 Log: Fix a possibly uninitialised variable warning. Modified: branches/SAMBA_3_0/source/torture/torture.c trunk/source/torture/torture.c Changeset: Modified: branches/SAMBA_3_0/source/torture/torture.c === --- branches/SAMBA_3_0/source/torture/torture.c 2005-04-02 00:56:30 UTC (rev 6175) +++ branches/SAMBA_3_0/source/torture/torture.c 2005-04-02 00:59:12 UTC (rev 6176) @@ -537,7 +537,7 @@ static BOOL run_readwritetest(int dummy) { static struct cli_state *cli1, *cli2; - BOOL test1, test2; + BOOL test1, test2 = False; if (!torture_open_connection(cli1) || !torture_open_connection(cli2)) { return False; Modified: trunk/source/torture/torture.c === --- trunk/source/torture/torture.c 2005-04-02 00:56:30 UTC (rev 6175) +++ trunk/source/torture/torture.c 2005-04-02 00:59:12 UTC (rev 6176) @@ -537,7 +537,7 @@ static BOOL run_readwritetest(int dummy) { static struct cli_state *cli1, *cli2; - BOOL test1, test2; + BOOL test1, test2 = False; if (!torture_open_connection(cli1) || !torture_open_connection(cli2)) { return False;
svn commit: samba r6177 - in branches/SAMBA_4_0/source/build/smb_build: .
Author: tpot Date: 2005-04-02 01:43:54 + (Sat, 02 Apr 2005) New Revision: 6177 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6177 Log: Use here documents instead of print() statements to generate the Makefile fragments for the build system. This allows the file to be edited without using quite as many backslashes. Some are still necessary for interpolation of perl variables though. I've diffed the new Makefile against the old and there are only some extra newlines as a result of making things more consistent. Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm Changeset: Sorry, the patch is too large (620 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6177
svn commit: samba r6178 - in branches/SAMBA_4_0/source/librpc/rpc: .
Author: metze Date: 2005-04-02 06:10:45 + (Sat, 02 Apr 2005) New Revision: 6178 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6178 Log: fix ncacn_np connection without sign or seal against NT4 metze Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c === --- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c 2005-04-02 01:43:54 UTC (rev 6177) +++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c 2005-04-02 06:10:45 UTC (rev 6178) @@ -936,7 +936,10 @@ status = dcerpc_bind_auth_schannel(tmp_ctx, p, pipe_uuid, pipe_version, credentials); - } else if (!cli_credentials_is_anonymous(credentials)) { + } else if (!cli_credentials_is_anonymous(credentials) + !(binding-transport == NCACN_NP + !(binding-flags DCERPC_SIGN) + !(binding-flags DCERPC_SEAL))) { uint8_t auth_type; if (binding-flags DCERPC_AUTH_SPNEGO) { auth_type = DCERPC_AUTH_TYPE_SPNEGO;
svn commit: samba r6179 - in branches/SAMBA_4_0/source: include librpc/idl librpc/ndr torture/rpc
Author: metze Date: 2005-04-02 06:51:54 + (Sat, 02 Apr 2005) New Revision: 6179 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6179 Log: - add new spoolss tests for all spoolss_Enum*() calls which didn't need a handle as parameter, EnumPorts EnumPrinterDrivers EnumMonitors EnumPrintProcessors EnumPrinters we now do cross checks between the different info levels and sore the results in a global context, so that we later can add cross checks between the different object types - add idl for EnumMonitors and EnumPrintProcessors metze Modified: branches/SAMBA_4_0/source/include/structs.h branches/SAMBA_4_0/source/librpc/idl/spoolss.idl branches/SAMBA_4_0/source/librpc/ndr/ndr_spoolss_buf.c branches/SAMBA_4_0/source/torture/rpc/spoolss.c Changeset: Sorry, the patch is too large (1094 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=6179