Re: svn commit: samba r14977 - in branches/SAMBA_4_0/source: auth/credentials lib/socket_wrapper
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] schrieb: > Modified: branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.c > === > --- branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.c > 2006-04-08 02:40:15 UTC (rev 14976) > +++ branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.c > 2006-04-08 02:44:37 UTC (rev 14977) > @@ -672,11 +672,7 @@ > case AF_UNIX: > return real_setsockopt(s, level, optname, optval, optlen); > case AF_INET: > - /* Silence some warnings */ > -#ifdef TCP_NODELAY > - if (optname == TCP_NODELAY) > - return 0; > -#endif > + return 0; > default: > errno = ENOPROTOOPT; > return -1; > Hi tridge, is this really correct? metze -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEN1yum70gjA5TCD8RAijWAKC+0duzg5FiiQKHtV59nglGk90J4gCfTVJS a4w9F8L0IO2Xthos+8R/2Hw= =PEMC -END PGP SIGNATURE-
svn commit: samba r14989 - in branches/SAMBA_3_0/source/smbd: .
Author: jra Date: 2006-04-08 05:09:12 + (Sat, 08 Apr 2006) New Revision: 14989 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14989 Log: Fix from Mathias Dietz <[EMAIL PROTECTED]>. EPERM can be a valid return from getting an xattr. Don't disable if we get it. Jeremy. Modified: branches/SAMBA_3_0/source/smbd/dosmode.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/dosmode.c === --- branches/SAMBA_3_0/source/smbd/dosmode.c2006-04-08 05:09:04 UTC (rev 14988) +++ branches/SAMBA_3_0/source/smbd/dosmode.c2006-04-08 05:09:12 UTC (rev 14989) @@ -222,7 +222,7 @@ sizeret = SMB_VFS_GETXATTR(conn, path, SAMBA_XATTR_DOS_ATTRIB, attrstr, sizeof(attrstr)); if (sizeret == -1) { #if defined(ENOTSUP) && defined(ENOATTR) - if ((errno != ENOTSUP) && (errno != ENOATTR) && (errno != EACCES)) { + if ((errno != ENOTSUP) && (errno != ENOATTR) && (errno != EACCES) && (errno != EPERM)) { DEBUG(1,("get_ea_dos_attributes: Cannot get attribute from EA on file %s: Error = %s\n", path, strerror(errno) )); set_store_dos_attributes(SNUM(conn), False);
svn commit: samba r14988 - in trunk/source/smbd: .
Author: jra Date: 2006-04-08 05:09:04 + (Sat, 08 Apr 2006) New Revision: 14988 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14988 Log: Fix from Mathias Dietz <[EMAIL PROTECTED]>. EPERM can be a valid return from getting an xattr. Don't disable if we get it. Jeremy. Modified: trunk/source/smbd/dosmode.c Changeset: Modified: trunk/source/smbd/dosmode.c === --- trunk/source/smbd/dosmode.c 2006-04-08 05:00:05 UTC (rev 14987) +++ trunk/source/smbd/dosmode.c 2006-04-08 05:09:04 UTC (rev 14988) @@ -222,7 +222,7 @@ sizeret = SMB_VFS_GETXATTR(conn, path, SAMBA_XATTR_DOS_ATTRIB, attrstr, sizeof(attrstr)); if (sizeret == -1) { #if defined(ENOTSUP) && defined(ENOATTR) - if ((errno != ENOTSUP) && (errno != ENOATTR) && (errno != EACCES)) { + if ((errno != ENOTSUP) && (errno != ENOATTR) && (errno != EACCES) && (errno != EPERM)) { DEBUG(1,("get_ea_dos_attributes: Cannot get attribute from EA on file %s: Error = %s\n", path, strerror(errno) )); set_store_dos_attributes(SNUM(conn), False);
svn commit: samba r14987 - in trunk/source/smbd: .
Author: jra Date: 2006-04-08 05:00:05 + (Sat, 08 Apr 2006) New Revision: 14987 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14987 Log: Fix OS/2 directory delete bug found by kukks. (Thanks a lot for all your hard work on this). We were caching the results of *all* directory scans, not just the results that match the client wildcard. This actually made no sense, as only matches on the client wildcard can be returned to the client and so might need to be searched for in the cache. This fixes the directory cache to only cache entries that we return to the client. Jeremy. Modified: trunk/source/smbd/dir.c trunk/source/smbd/trans2.c Changeset: Modified: trunk/source/smbd/dir.c === --- trunk/source/smbd/dir.c 2006-04-08 05:00:04 UTC (rev 14986) +++ trunk/source/smbd/dir.c 2006-04-08 05:00:05 UTC (rev 14987) @@ -645,6 +645,15 @@ } / + Add the name we're returning into the underlying cache. +/ + +void dptr_DirCacheAdd(struct dptr_struct *dptr, const char *name, long offset) +{ + DirCacheAdd(dptr->dir_hnd, name, offset); +} + +/ Fill the 5 byte server reserved dptr field. / @@ -812,6 +821,8 @@ DEBUG(3,("get_dir_entry mask=[%s] found %s fname=%s\n",mask, pathreal,fname)); found = True; + + DirCacheAdd(conn->dirptr->dir_hnd, dname, curoff); } } @@ -1109,21 +1120,15 @@ } while ((n = vfs_readdirname(conn, dirp->dir))) { - struct name_cache_entry *e; /* Ignore . and .. - we've already returned them. */ if (*n == '.') { if ((n[1] == '\0') || (n[1] == '.' && n[2] == '\0')) { continue; } } - dirp->offset = SMB_VFS_TELLDIR(conn, dirp->dir); - dirp->name_cache_index = (dirp->name_cache_index+1) % NAME_CACHE_SIZE; - e = &dirp->name_cache[dirp->name_cache_index]; - SAFE_FREE(e->name); - e->name = SMB_STRDUP(n); - *poffset = e->offset= dirp->offset; + *poffset = dirp->offset = SMB_VFS_TELLDIR(conn, dirp->dir); dirp->file_number++; - return e->name; + return n; } *poffset = dirp->offset = END_OF_DIRECTORY_OFFSET; return NULL; @@ -1184,6 +1189,21 @@ } /*** + Add an entry into the dcache. +/ + +void DirCacheAdd(struct smb_Dir *dirp, const char *name, long offset) +{ + struct name_cache_entry *e; + + dirp->name_cache_index = (dirp->name_cache_index+1) % NAME_CACHE_SIZE; + e = &dirp->name_cache[dirp->name_cache_index]; + SAFE_FREE(e->name); + e->name = SMB_STRDUP(name); + e->offset = offset; +} + +/*** Find an entry by name. Leave us at the offset after it. Don't check for veto or invisible files. / Modified: trunk/source/smbd/trans2.c === --- trunk/source/smbd/trans2.c 2006-04-08 05:00:04 UTC (rev 14986) +++ trunk/source/smbd/trans2.c 2006-04-08 05:00:05 UTC (rev 14987) @@ -1163,6 +1163,8 @@ DEBUG(5,("get_lanman2_dir_entry found %s fname=%s\n",pathreal,fname)); found = True; + + dptr_DirCacheAdd(conn->dirptr, dname, curr_dirpos); } }
svn commit: samba r14986 - in branches/SAMBA_3_0/source/smbd: .
Author: jra Date: 2006-04-08 05:00:04 + (Sat, 08 Apr 2006) New Revision: 14986 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14986 Log: Fix OS/2 directory delete bug found by kukks. (Thanks a lot for all your hard work on this). We were caching the results of *all* directory scans, not just the results that match the client wildcard. This actually made no sense, as only matches on the client wildcard can be returned to the client and so might need to be searched for in the cache. This fixes the directory cache to only cache entries that we return to the client. Jeremy. Modified: branches/SAMBA_3_0/source/smbd/dir.c branches/SAMBA_3_0/source/smbd/trans2.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/dir.c === --- branches/SAMBA_3_0/source/smbd/dir.c2006-04-08 04:19:50 UTC (rev 14985) +++ branches/SAMBA_3_0/source/smbd/dir.c2006-04-08 05:00:04 UTC (rev 14986) @@ -645,6 +645,15 @@ } / + Add the name we're returning into the underlying cache. +/ + +void dptr_DirCacheAdd(struct dptr_struct *dptr, const char *name, long offset) +{ + DirCacheAdd(dptr->dir_hnd, name, offset); +} + +/ Fill the 5 byte server reserved dptr field. / @@ -812,6 +821,8 @@ DEBUG(3,("get_dir_entry mask=[%s] found %s fname=%s\n",mask, pathreal,fname)); found = True; + + DirCacheAdd(conn->dirptr->dir_hnd, dname, curoff); } } @@ -1109,21 +1120,15 @@ } while ((n = vfs_readdirname(conn, dirp->dir))) { - struct name_cache_entry *e; /* Ignore . and .. - we've already returned them. */ if (*n == '.') { if ((n[1] == '\0') || (n[1] == '.' && n[2] == '\0')) { continue; } } - dirp->offset = SMB_VFS_TELLDIR(conn, dirp->dir); - dirp->name_cache_index = (dirp->name_cache_index+1) % NAME_CACHE_SIZE; - e = &dirp->name_cache[dirp->name_cache_index]; - SAFE_FREE(e->name); - e->name = SMB_STRDUP(n); - *poffset = e->offset= dirp->offset; + *poffset = dirp->offset = SMB_VFS_TELLDIR(conn, dirp->dir); dirp->file_number++; - return e->name; + return n; } *poffset = dirp->offset = END_OF_DIRECTORY_OFFSET; return NULL; @@ -1184,6 +1189,21 @@ } /*** + Add an entry into the dcache. +/ + +void DirCacheAdd(struct smb_Dir *dirp, const char *name, long offset) +{ + struct name_cache_entry *e; + + dirp->name_cache_index = (dirp->name_cache_index+1) % NAME_CACHE_SIZE; + e = &dirp->name_cache[dirp->name_cache_index]; + SAFE_FREE(e->name); + e->name = SMB_STRDUP(name); + e->offset = offset; +} + +/*** Find an entry by name. Leave us at the offset after it. Don't check for veto or invisible files. / Modified: branches/SAMBA_3_0/source/smbd/trans2.c === --- branches/SAMBA_3_0/source/smbd/trans2.c 2006-04-08 04:19:50 UTC (rev 14985) +++ branches/SAMBA_3_0/source/smbd/trans2.c 2006-04-08 05:00:04 UTC (rev 14986) @@ -1163,6 +1163,8 @@ DEBUG(5,("get_lanman2_dir_entry found %s fname=%s\n",pathreal,fname)); found = True; + + dptr_DirCacheAdd(conn->dirptr, dname, curr_dirpos); } }
svn commit: samba r14985 - in trunk/source/libsmb: .
Author: jra Date: 2006-04-08 04:19:50 + (Sat, 08 Apr 2006) New Revision: 14985 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14985 Log: Add client side of POSIX lock code. Still need to add cli_posix_getlock(). Jeremy. Modified: trunk/source/libsmb/clifile.c Changeset: Modified: trunk/source/libsmb/clifile.c === --- trunk/source/libsmb/clifile.c 2006-04-08 03:04:00 UTC (rev 14984) +++ trunk/source/libsmb/clifile.c 2006-04-08 04:19:50 UTC (rev 14985) @@ -816,6 +816,7 @@ send a lock with a specified locktype this is used for testing LOCKING_ANDX_CANCEL_LOCK / + NTSTATUS cli_locktype(struct cli_state *cli, int fnum, uint32 offset, uint32 len, int timeout, unsigned char locktype) { @@ -863,11 +864,11 @@ return cli_nt_error(cli); } - / Lock a file. note that timeout is in units of 2 milliseconds / + BOOL cli_lock(struct cli_state *cli, int fnum, uint32 offset, uint32 len, int timeout, enum brl_type lock_type) { @@ -1068,8 +1069,110 @@ return True; } +/ + Get/unlock a POSIX lock on a file - internal function. +/ +static BOOL cli_posix_lock_internal(struct cli_state *cli, int fnum, + SMB_BIG_UINT offset, SMB_BIG_UINT len, BOOL wait_lock, enum brl_type lock_type) +{ + unsigned int param_len = 4; + unsigned int data_len = POSIX_LOCK_DATA_SIZE; + uint16 setup = TRANSACT2_SETFILEINFO; + char param[4]; + unsigned char data[POSIX_LOCK_DATA_SIZE]; + char *rparam=NULL, *rdata=NULL; + int saved_timeout = cli->timeout; + + SSVAL(param,0,fnum); + SSVAL(param,2,SMB_SET_POSIX_LOCK); + + switch (lock_type) { + case READ_LOCK: + SSVAL(data, POSIX_LOCK_TYPE_OFFSET, POSIX_LOCK_TYPE_READ); + break; + case WRITE_LOCK: + SSVAL(data, POSIX_LOCK_TYPE_OFFSET, POSIX_LOCK_TYPE_WRITE); + break; + case UNLOCK_LOCK: + SSVAL(data, POSIX_LOCK_TYPE_OFFSET, POSIX_LOCK_TYPE_UNLOCK); + break; + default: + return False; + } + + if (wait_lock) { + SSVAL(data, POSIX_LOCK_FLAGS_OFFSET, POSIX_LOCK_FLAG_WAIT); + cli->timeout = 0x7FFF; + } else { + SSVAL(data, POSIX_LOCK_FLAGS_OFFSET, POSIX_LOCK_FLAG_NOWAIT); + } + + SIVAL(data, POSIX_LOCK_PID_OFFSET, cli->pid); + SOFF_T(data, POSIX_LOCK_START_OFFSET, offset); + SOFF_T(data, POSIX_LOCK_LEN_OFFSET, len); + + if (!cli_send_trans(cli, SMBtrans2, + NULL,/* name */ + -1, 0, /* fid, flags */ + &setup, 1, 0, /* setup, length, max */ + param, param_len, 2,/* param, length, max */ + (char *)&data, data_len, cli->max_xmit /* data, length, max */ + )) { + cli->timeout = saved_timeout; + return False; + } + + if (!cli_receive_trans(cli, SMBtrans2, + &rparam, ¶m_len, + &rdata, &data_len)) { + cli->timeout = saved_timeout; + SAFE_FREE(rdata); + SAFE_FREE(rparam); + return False; + } + + cli->timeout = saved_timeout; + + SAFE_FREE(rdata); + SAFE_FREE(rparam); + + return True; +} + / + POSIX Lock a file. +/ + +BOOL cli_posix_lock(struct cli_state *cli, int fnum, + SMB_BIG_UINT offset, SMB_BIG_UINT len, + BOOL wait_lock, enum brl_type lock_type) +{ + if (lock_type != READ_LOCK || lock_type != WRITE_LOCK) { + return False; + } + return cli_posix_lock_internal(cli, fnum, offset, len, wait_lock, lock_type); +} + +/ + POSIX Unlock a file. +/ + +BOOL cli_posix_unlock(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len) +{ + return cli_posix_l
svn commit: samba r14984 - in branches/SAMBA_4_0/source/lib/appweb/mpr: .
Author: tridge Date: 2006-04-08 03:04:00 + (Sat, 08 Apr 2006) New Revision: 14984 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14984 Log: marking mprBreakpoint() as a __noreturn__ function should reduce the number of ejs errors from the IBM checker Modified: branches/SAMBA_4_0/source/lib/appweb/mpr/miniMpr.h Changeset: Modified: branches/SAMBA_4_0/source/lib/appweb/mpr/miniMpr.h === --- branches/SAMBA_4_0/source/lib/appweb/mpr/miniMpr.h 2006-04-08 03:00:12 UTC (rev 14983) +++ branches/SAMBA_4_0/source/lib/appweb/mpr/miniMpr.h 2006-04-08 03:04:00 UTC (rev 14984) @@ -258,7 +258,7 @@ extern int mprAllocSprintf(char **msgbuf, int maxSize, const char *fmt, ...) PRINTF_ATTRIBUTE(3,4); extern char*mprItoa(int num, char *buf, int width); extern voidmprLog(int level, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); -extern voidmprBreakpoint(const char *file, int line, const char *msg); +extern voidmprBreakpoint(const char *file, int line, const char *msg) NORETURN_ATTRIBUTE; #endif /* BLD_GOAHEAD_WEBSERVER */ extern MprArray*mprCreateArray(void);
svn commit: samba r14983 - in branches/SAMBA_4_0/source/libnet: .
Author: tridge Date: 2006-04-08 03:00:12 + (Sat, 08 Apr 2006) New Revision: 14983 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14983 Log: fix an uninitialised var Modified: branches/SAMBA_4_0/source/libnet/libnet_samsync_ldb.c Changeset: Modified: branches/SAMBA_4_0/source/libnet/libnet_samsync_ldb.c === --- branches/SAMBA_4_0/source/libnet/libnet_samsync_ldb.c 2006-04-08 02:58:54 UTC (rev 14982) +++ branches/SAMBA_4_0/source/libnet/libnet_samsync_ldb.c 2006-04-08 03:00:12 UTC (rev 14983) @@ -239,7 +239,7 @@ const struct dom_sid *user_sid; struct ldb_message *msg; struct ldb_message **msgs; - struct ldb_message **remote_msgs; + struct ldb_message **remote_msgs = NULL; int ret, i; uint32_t acb; BOOL add = False;
svn commit: samba r14982 - in branches/SAMBA_4_0/source/utils: .
Author: tridge Date: 2006-04-08 02:58:54 + (Sat, 08 Apr 2006) New Revision: 14982 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14982 Log: mark a deliberate missing break Modified: branches/SAMBA_4_0/source/utils/ntlm_auth.c Changeset: Modified: branches/SAMBA_4_0/source/utils/ntlm_auth.c === --- branches/SAMBA_4_0/source/utils/ntlm_auth.c 2006-04-08 02:58:36 UTC (rev 14981) +++ branches/SAMBA_4_0/source/utils/ntlm_auth.c 2006-04-08 02:58:54 UTC (rev 14982) @@ -418,6 +418,7 @@ if (!in.length) { first = True; } + /* fall through */ case SQUID_2_5_NTLMSSP: nt_status = gensec_start_mech_by_oid(state->gensec_state, GENSEC_OID_NTLMSSP); break;
svn commit: samba r14981 - in branches/SAMBA_4_0/source/lib/registry/tools: .
Author: tridge Date: 2006-04-08 02:58:36 + (Sat, 08 Apr 2006) New Revision: 14981 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14981 Log: fixed a use of a wild ptr in regshell Modified: branches/SAMBA_4_0/source/lib/registry/tools/regshell.c Changeset: Modified: branches/SAMBA_4_0/source/lib/registry/tools/regshell.c === --- branches/SAMBA_4_0/source/lib/registry/tools/regshell.c 2006-04-08 02:55:16 UTC (rev 14980) +++ branches/SAMBA_4_0/source/lib/registry/tools/regshell.c 2006-04-08 02:58:36 UTC (rev 14981) @@ -93,9 +93,9 @@ if (argc < 4) { fprintf(stderr, "Usage: set value-name type value\n"); } else { - struct registry_value *val; - if (reg_string_to_val(mem_ctx, argv[2], argv[3], &val->data_type, &val->data)) { - WERROR error = reg_val_set(cur, argv[1], val->data_type, val->data); + struct registry_value val; + if (reg_string_to_val(mem_ctx, argv[2], argv[3], &val.data_type, &val.data)) { + WERROR error = reg_val_set(cur, argv[1], val.data_type, val.data); if (!W_ERROR_IS_OK(error)) { fprintf(stderr, "Error setting value: %s\n", win_errstr(error)); return NULL;
svn commit: samba r14980 - in branches/SAMBA_4_0/source/torture: .
Author: tridge Date: 2006-04-08 02:55:16 + (Sat, 08 Apr 2006) New Revision: 14980 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14980 Log: fixed several IBM checker errors in gentest and masktest Modified: branches/SAMBA_4_0/source/torture/gentest.c branches/SAMBA_4_0/source/torture/masktest.c Changeset: Modified: branches/SAMBA_4_0/source/torture/gentest.c === --- branches/SAMBA_4_0/source/torture/gentest.c 2006-04-08 02:49:44 UTC (rev 14979) +++ branches/SAMBA_4_0/source/torture/gentest.c 2006-04-08 02:55:16 UTC (rev 14980) @@ -656,6 +656,8 @@ "ASOMEWHATLONGERATTRIBUTEVALUE"}; int i; + ZERO_STRUCT(ea); + do { i = gen_int_range(0, ARRAY_SIZE(names)-1); } while (ignore_pattern(names[i])); @@ -725,7 +727,6 @@ static BOOL oplock_handler(struct smbcli_transport *transport, uint16_t tid, uint16_t fnum, uint8_t level, void *private) { union smb_close io; - NTSTATUS status; int i, j; BOOL do_close; struct smbcli_tree *tree = NULL; @@ -766,8 +767,7 @@ req = smb_raw_close_send(tree, &io); if (req == NULL) { - printf("WARNING: close failed in oplock_handler_close - %s\n", - nt_errstr(status)); + printf("WARNING: close failed in oplock_handler_close\n"); return False; } @@ -1823,6 +1823,7 @@ struct smb_notify parm[NSERVERS]; int n; + ZERO_STRUCT(parm[0]); parm[0].in.buffer_size = gen_io_count(); parm[0].in.completion_filter = gen_bits_mask(0xFF); parm[0].in.file.fnum = gen_fnum(instance); Modified: branches/SAMBA_4_0/source/torture/masktest.c === --- branches/SAMBA_4_0/source/torture/masktest.c2006-04-08 02:49:44 UTC (rev 14979) +++ branches/SAMBA_4_0/source/torture/masktest.c2006-04-08 02:55:16 UTC (rev 14980) @@ -182,6 +182,8 @@ smbcli_unlink(cli->tree, file); if (count % 100 == 0) DEBUG(0,("%d\n", count)); + + resultp = NULL; } static void test_mask(int argc, char *argv[],
svn commit: samba r14979 - in branches/SAMBA_4_0/source/client: .
Author: tridge Date: 2006-04-08 02:49:44 + (Sat, 08 Apr 2006) New Revision: 14979 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14979 Log: avoid a null ptr deref Modified: branches/SAMBA_4_0/source/client/client.c Changeset: Modified: branches/SAMBA_4_0/source/client/client.c === --- branches/SAMBA_4_0/source/client/client.c 2006-04-08 02:47:42 UTC (rev 14978) +++ branches/SAMBA_4_0/source/client/client.c 2006-04-08 02:49:44 UTC (rev 14979) @@ -408,11 +408,13 @@ static void adjust_do_list_queue(void) { + if (do_list_queue == NULL) return; + /* * If the starting point of the queue is more than half way through, * move everything toward the beginning. */ - if (do_list_queue && (do_list_queue_start == do_list_queue_end)) + if (do_list_queue_start == do_list_queue_end) { DEBUG(4,("do_list_queue is empty\n")); do_list_queue_start = do_list_queue_end = 0;
svn commit: samba r14978 - in branches/SAMBA_4_0/source/lib/registry/tools: .
Author: tridge Date: 2006-04-08 02:47:42 + (Sat, 08 Apr 2006) New Revision: 14978 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14978 Log: fixed a print of NULL Modified: branches/SAMBA_4_0/source/lib/registry/tools/regtree.c Changeset: Modified: branches/SAMBA_4_0/source/lib/registry/tools/regtree.c === --- branches/SAMBA_4_0/source/lib/registry/tools/regtree.c 2006-04-08 02:44:37 UTC (rev 14977) +++ branches/SAMBA_4_0/source/lib/registry/tools/regtree.c 2006-04-08 02:47:42 UTC (rev 14978) @@ -42,7 +42,7 @@ } else { if(!p->name) printf("\n"); if(fullpath) printf("%s\n", p->path); - else printf("%s\n", p->name); + else printf("%s\n", p->name?p->name:"(NULL)"); } mem_ctx = talloc_init("print_tree");
svn commit: samba r14977 - in branches/SAMBA_4_0/source: auth/credentials lib/socket_wrapper
Author: tridge Date: 2006-04-08 02:44:37 + (Sat, 08 Apr 2006) New Revision: 14977 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14977 Log: more IBM checker fixes Modified: branches/SAMBA_4_0/source/auth/credentials/credentials_files.c branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.c Changeset: Modified: branches/SAMBA_4_0/source/auth/credentials/credentials_files.c === --- branches/SAMBA_4_0/source/auth/credentials/credentials_files.c 2006-04-08 02:40:15 UTC (rev 14976) +++ branches/SAMBA_4_0/source/auth/credentials/credentials_files.c 2006-04-08 02:44:37 UTC (rev 14977) @@ -52,6 +52,7 @@ *++p = '\0'; /* advance p, and null-terminate pass */ break; } + /* fall through */ case 0: if (p - pass) { *p = '\0'; /* null-terminate it, just in case... */ Modified: branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.c === --- branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.c 2006-04-08 02:40:15 UTC (rev 14976) +++ branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.c 2006-04-08 02:44:37 UTC (rev 14977) @@ -672,11 +672,7 @@ case AF_UNIX: return real_setsockopt(s, level, optname, optval, optlen); case AF_INET: - /* Silence some warnings */ -#ifdef TCP_NODELAY - if (optname == TCP_NODELAY) - return 0; -#endif + return 0; default: errno = ENOPROTOOPT; return -1;
svn commit: samba r14976 - in branches/SAMBA_4_0/source/lib/util: .
Author: tridge Date: 2006-04-08 02:40:15 + (Sat, 08 Apr 2006) New Revision: 14976 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14976 Log: another use of the magic comment recognised by the IBM checker for deliberate fall through in switch Modified: branches/SAMBA_4_0/source/lib/util/util_file.c Changeset: Modified: branches/SAMBA_4_0/source/lib/util/util_file.c === --- branches/SAMBA_4_0/source/lib/util/util_file.c 2006-04-08 02:36:28 UTC (rev 14975) +++ branches/SAMBA_4_0/source/lib/util/util_file.c 2006-04-08 02:40:15 UTC (rev 14976) @@ -82,6 +82,7 @@ case ' ': if (start_of_line) break; + /* fall through */ default: start_of_line = False; s[len++] = c;
svn commit: samba r14975 - in branches/SAMBA_4_0/source/auth: .
Author: tridge Date: 2006-04-08 02:36:28 + (Sat, 08 Apr 2006) New Revision: 14975 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14975 Log: use the magic comment recognised by the IBM checker for deliberate fall through in switch Modified: branches/SAMBA_4_0/source/auth/auth_sam.c Changeset: Modified: branches/SAMBA_4_0/source/auth/auth_sam.c === --- branches/SAMBA_4_0/source/auth/auth_sam.c 2006-04-08 02:35:00 UTC (rev 14974) +++ branches/SAMBA_4_0/source/auth/auth_sam.c 2006-04-08 02:36:28 UTC (rev 14975) @@ -110,7 +110,7 @@ } user_info = user_info_temp; - /* NO break */ + /*fall through*/ } case AUTH_PASSWORD_HASH: *lm_sess_key = data_blob(NULL, 0);
svn commit: samba r14974 - in branches/SAMBA_4_0/source/libcli/raw: .
Author: tridge Date: 2006-04-08 02:35:00 + (Sat, 08 Apr 2006) New Revision: 14974 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14974 Log: work around an ibm checker bug Modified: branches/SAMBA_4_0/source/libcli/raw/rawioctl.c Changeset: Modified: branches/SAMBA_4_0/source/libcli/raw/rawioctl.c === --- branches/SAMBA_4_0/source/libcli/raw/rawioctl.c 2006-04-08 02:33:24 UTC (rev 14973) +++ branches/SAMBA_4_0/source/libcli/raw/rawioctl.c 2006-04-08 02:35:00 UTC (rev 14974) @@ -73,13 +73,13 @@ union smb_ioctl *parms) { struct smb_nttrans nt; - uint16_t setup[4]; + uint8_t setup[8]; nt.in.max_setup = 0; nt.in.max_param = 0; nt.in.max_data = 0; nt.in.setup_count = 4; - nt.in.setup = setup; + nt.in.setup = (uint16_t *)setup; SIVAL(setup, 0, parms->ntioctl.in.function); SSVAL(setup, 4, parms->ntioctl.in.file.fnum); SCVAL(setup, 6, parms->ntioctl.in.fsctl);
svn commit: samba r14973 - in branches/SAMBA_4_0/source/libcli/raw: .
Author: tridge Date: 2006-04-08 02:33:24 + (Sat, 08 Apr 2006) New Revision: 14973 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14973 Log: req cannot be NULL in smb_raw_t2open_recv() (found by IBM checker) Modified: branches/SAMBA_4_0/source/libcli/raw/rawfile.c Changeset: Modified: branches/SAMBA_4_0/source/libcli/raw/rawfile.c === --- branches/SAMBA_4_0/source/libcli/raw/rawfile.c 2006-04-08 02:29:48 UTC (rev 14972) +++ branches/SAMBA_4_0/source/libcli/raw/rawfile.c 2006-04-08 02:33:24 UTC (rev 14973) @@ -396,7 +396,7 @@ / static NTSTATUS smb_raw_t2open_recv(struct smbcli_request *req, TALLOC_CTX *mem_ctx, union smb_open *parms) { - struct smbcli_transport *transport = req?req->transport:NULL; + struct smbcli_transport *transport = req->transport; struct smb_trans2 t2; NTSTATUS status;
svn commit: samba r14972 - in branches/SAMBA_4_0/source/lib/tdb/common: .
Author: tridge Date: 2006-04-08 02:29:48 + (Sat, 08 Apr 2006) New Revision: 14972 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14972 Log: fix an uninitialised warning from ibm checker Modified: branches/SAMBA_4_0/source/lib/tdb/common/io.c Changeset: Modified: branches/SAMBA_4_0/source/lib/tdb/common/io.c === --- branches/SAMBA_4_0/source/lib/tdb/common/io.c 2006-04-08 02:04:19 UTC (rev 14971) +++ branches/SAMBA_4_0/source/lib/tdb/common/io.c 2006-04-08 02:29:48 UTC (rev 14972) @@ -173,7 +173,7 @@ } } } else { - u32 off; + u32 off=0; for (;h < tdb->header.hash_size;h++) { if (tdb_ofs_read(tdb, TDB_HASH_TOP(h), &off) != 0 || off != 0) { break;
svn commit: samba r14971 - in branches/SAMBA_4_0/source/script/tests: .
Author: tpot Date: 2006-04-08 02:04:19 + (Sat, 08 Apr 2006) New Revision: 14971 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14971 Log: Update test script with new location of tdb and ldb wrappers. Modified: branches/SAMBA_4_0/source/script/tests/test_swig.sh Changeset: Modified: branches/SAMBA_4_0/source/script/tests/test_swig.sh === --- branches/SAMBA_4_0/source/script/tests/test_swig.sh 2006-04-08 01:52:09 UTC (rev 14970) +++ branches/SAMBA_4_0/source/script/tests/test_swig.sh 2006-04-08 02:04:19 UTC (rev 14971) @@ -12,7 +12,7 @@ failed=0 -export PYTHONPATH=scripting/swig:$PYTHONPATH +export PYTHONPATH=lib/tdb/swig:lib/ldb/swig:scripting/swig:$PYTHONPATH export LD_LIBRARY_PATH=bin:$LD_LIBRARY_PATH scripting/swig/torture/torture_tdb.py || failed=`expr $failed + 1`
svn commit: samba r14970 - in branches/SAMBA_4_0/source/lib: ldb tdb
Author: tpot Date: 2006-04-08 01:52:09 + (Sat, 08 Apr 2006) New Revision: 14970 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14970 Log: Add configure stuff for Python to tdb and ldb standalone builds. Modified: branches/SAMBA_4_0/source/lib/ldb/config.m4 branches/SAMBA_4_0/source/lib/tdb/config.m4 Changeset: Modified: branches/SAMBA_4_0/source/lib/ldb/config.m4 === --- branches/SAMBA_4_0/source/lib/ldb/config.m4 2006-04-08 00:47:15 UTC (rev 14969) +++ branches/SAMBA_4_0/source/lib/ldb/config.m4 2006-04-08 01:52:09 UTC (rev 14970) @@ -1 +1,32 @@ SMB_ENABLE(ldb_sqlite3,$with_sqlite3_support) + +AC_MSG_CHECKING([for Python]) + +PYTHON= + +AC_ARG_WITH(python, +[ --with-python=PYTHONNAME build Python libraries], +[ case "${withval-python}" in + yes) +PYTHON=python +;; + no) +PYTHON= +;; + *) +PYTHON=${withval-python} +;; + esac ]) + +if test x"$PYTHON" != "x"; then + incdir=`python -c 'import sys; print "%s/include/python%d.%d" % (sys.prefix, sys.version_info[[0]], sys.version_info[[1]])'` + CPPFLAGS="$CPPFLAGS -I $incdir" +fi + +if test x"$PYTHON" != "x"; then + AC_MSG_RESULT([${withval-python}]) +else + AC_MSG_RESULT(no) +fi + +AC_SUBST(PYTHON) Modified: branches/SAMBA_4_0/source/lib/tdb/config.m4 === --- branches/SAMBA_4_0/source/lib/tdb/config.m4 2006-04-08 00:47:15 UTC (rev 14969) +++ branches/SAMBA_4_0/source/lib/tdb/config.m4 2006-04-08 01:52:09 UTC (rev 14970) @@ -5,3 +5,34 @@ AC_HAVE_DECL(pread, [#include ]) AC_HAVE_DECL(pwrite, [#include ]) + +AC_MSG_CHECKING([for Python]) + +PYTHON= + +AC_ARG_WITH(python, +[ --with-python=PYTHONNAME build Python libraries], +[ case "${withval-python}" in + yes) +PYTHON=python +;; + no) +PYTHON= +;; + *) +PYTHON=${withval-python} +;; + esac ]) + +if test x"$PYTHON" != "x"; then + incdir=`python -c 'import sys; print "%s/include/python%d.%d" % (sys.prefix, sys.version_info[[0]], sys.version_info[[1]])'` + CPPFLAGS="$CPPFLAGS -I $incdir" +fi + +if test x"$PYTHON" != "x"; then + AC_MSG_RESULT([${withval-python}]) +else + AC_MSG_RESULT(no) +fi + +AC_SUBST(PYTHON)
svn commit: samba r14969 - in branches/SAMBA_4_0/source/torture/raw: .
Author: tridge Date: 2006-04-08 00:47:15 + (Sat, 08 Apr 2006) New Revision: 14969 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14969 Log: ensure that even on slow machines we leave plenty of time for a series of events to propogate internally in smbd before asking for them (the test was failing on slow machines) Modified: branches/SAMBA_4_0/source/torture/raw/notify.c Changeset: Modified: branches/SAMBA_4_0/source/torture/raw/notify.c === --- branches/SAMBA_4_0/source/torture/raw/notify.c 2006-04-08 00:40:52 UTC (rev 14968) +++ branches/SAMBA_4_0/source/torture/raw/notify.c 2006-04-08 00:47:15 UTC (rev 14969) @@ -214,7 +214,7 @@ /* and we now see the rest of the unlink calls on both directory handles */ notify.in.file.fnum = fnum; - msleep(10); + sleep(1); req = smb_raw_changenotify_send(cli->tree, ¬ify); status = smb_raw_changenotify_recv(req, mem_ctx, ¬ify); CHECK_STATUS(status, NT_STATUS_OK);
svn commit: samba r14968 - in branches/SAMBA_4_0/source: lib/ldb lib/ldb/swig lib/tdb lib/tdb/swig scripting/swig
Author: tpot Date: 2006-04-08 00:40:52 + (Sat, 08 Apr 2006) New Revision: 14968 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14968 Log: Move tdb and ldb swig wrappers in to lib/tdb and lib/ldb directories. Added: branches/SAMBA_4_0/source/lib/ldb/swig/ branches/SAMBA_4_0/source/lib/ldb/swig/Ldb.py branches/SAMBA_4_0/source/lib/ldb/swig/ldb.i branches/SAMBA_4_0/source/lib/tdb/swig/ branches/SAMBA_4_0/source/lib/tdb/swig/Tdb.py branches/SAMBA_4_0/source/lib/tdb/swig/tdb.i Removed: branches/SAMBA_4_0/source/scripting/swig/Ldb.py branches/SAMBA_4_0/source/scripting/swig/Tdb.py branches/SAMBA_4_0/source/scripting/swig/ldb.i branches/SAMBA_4_0/source/scripting/swig/tdb.i Modified: branches/SAMBA_4_0/source/lib/ldb/config.mk branches/SAMBA_4_0/source/lib/tdb/config.mk branches/SAMBA_4_0/source/scripting/swig/ branches/SAMBA_4_0/source/scripting/swig/config.mk Changeset: Sorry, the patch is too large (765 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14968
Build status as of Sat Apr 8 00:00:02 2006
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2006-04-07 00:00:04.0 + +++ /home/build/master/cache/broken_results.txt 2006-04-08 00:00:05.0 + @@ -1,17 +1,17 @@ -Build status as of Fri Apr 7 00:00:02 2006 +Build status as of Sat Apr 8 00:00:02 2006 Build counts: Tree Total Broken Panic ccache 9 1 0 distcc 10 2 0 -lorikeet-heimdal 17 16 0 +lorikeet-heimdal 13 13 0 ppp 18 0 0 -rsync31 2 0 +rsync32 2 0 samba2 0 0 samba-docs 0 0 0 -samba4 38 36 0 +samba4 38 25 2 samba_3_034 7 0 smb-build22 0 0 -talloc 11 7 0 +talloc 9 6 0 tdb 30 3 0
Re: svn commit: samba r14895 - branches/SAMBA_3_0/source/nsswitch trunk/source/nsswitch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: > Author: vlendec > Date: 2006-04-03 19:08:23 + (Mon, 03 Apr 2006) > New Revision: 14895 > > WebSVN: > http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14895 > > Log: > Merge the 3.0.22 change Thanks. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFENqxWIR7qMdg1EfYRAlfEAKDN1zProXFxeANiyCagzpqUQsMO4gCg7aGQ w3SBCWqPfzbq4poRcVApWQc= =0+Ev -END PGP SIGNATURE-
svn commit: samba r14967 - in branches/SAMBA_4_0/source/torture: .
Author: metze Date: 2006-04-07 18:02:51 + (Fri, 07 Apr 2006) New Revision: 14967 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14967 Log: load shared module torture test after we know where to search... metze Modified: branches/SAMBA_4_0/source/torture/smbtorture.c Changeset: Modified: branches/SAMBA_4_0/source/torture/smbtorture.c === --- branches/SAMBA_4_0/source/torture/smbtorture.c 2006-04-07 14:14:27 UTC (rev 14966) +++ branches/SAMBA_4_0/source/torture/smbtorture.c 2006-04-07 18:02:51 UTC (rev 14967) @@ -281,8 +281,6 @@ setbuffer(stdout, NULL, 0); #endif - torture_init(); - /* we are never interested in SIGPIPE */ BlockSignals(True,SIGPIPE); @@ -314,6 +312,7 @@ default: d_printf("Invalid option %s: %s\n", poptBadOption(pc, 0), poptStrerror(opt)); + torture_init(); usage(pc); exit(1); } @@ -329,6 +328,7 @@ alarm(max_runtime); } + torture_init(); ldb_global_init(); if (torture_seed == 0) {
svn commit: samba r14966 - in branches/SAMBA_4_0/source/ntvfs: common sysdep
Author: metze Date: 2006-04-07 14:14:27 + (Fri, 07 Apr 2006) New Revision: 14966 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14966 Log: make more functions _PUBLIC_ metze Modified: branches/SAMBA_4_0/source/ntvfs/common/opendb.c branches/SAMBA_4_0/source/ntvfs/sysdep/sys_notify.c Changeset: Modified: branches/SAMBA_4_0/source/ntvfs/common/opendb.c === --- branches/SAMBA_4_0/source/ntvfs/common/opendb.c 2006-04-07 14:13:31 UTC (rev 14965) +++ branches/SAMBA_4_0/source/ntvfs/common/opendb.c 2006-04-07 14:14:27 UTC (rev 14966) @@ -68,8 +68,8 @@ talloc_free(). We need the messaging_ctx to allow for pending open notifications. */ -struct odb_context *odb_init(TALLOC_CTX *mem_ctx, uint32_t server, -struct messaging_context *messaging_ctx) +_PUBLIC_ struct odb_context *odb_init(TALLOC_CTX *mem_ctx, uint32_t server, + struct messaging_context *messaging_ctx) { char *path; struct odb_context *odb; @@ -109,8 +109,8 @@ get a lock on a entry in the odb. This call returns a lock handle, which the caller should unlock using talloc_free(). */ -struct odb_lock *odb_lock(TALLOC_CTX *mem_ctx, - struct odb_context *odb, DATA_BLOB *file_key) +_PUBLIC_ struct odb_lock *odb_lock(TALLOC_CTX *mem_ctx, + struct odb_context *odb, DATA_BLOB *file_key) { struct odb_lock *lck; @@ -257,10 +257,10 @@ Note that the path is only used by the delete on close logic, not for comparing with other filenames */ -NTSTATUS odb_open_file(struct odb_lock *lck, void *file_handle, - uint32_t stream_id, uint32_t share_access, - uint32_t access_mask, BOOL delete_on_close, - const char *path) +_PUBLIC_ NTSTATUS odb_open_file(struct odb_lock *lck, void *file_handle, + uint32_t stream_id, uint32_t share_access, + uint32_t access_mask, BOOL delete_on_close, + const char *path) { struct odb_context *odb = lck->odb; struct opendb_entry e; @@ -312,7 +312,7 @@ /* register a pending open file in the open files database */ -NTSTATUS odb_open_file_pending(struct odb_lock *lck, void *private) +_PUBLIC_ NTSTATUS odb_open_file_pending(struct odb_lock *lck, void *private) { struct odb_context *odb = lck->odb; struct opendb_file file; @@ -337,7 +337,7 @@ /* remove a opendb entry */ -NTSTATUS odb_close_file(struct odb_lock *lck, void *file_handle) +_PUBLIC_ NTSTATUS odb_close_file(struct odb_lock *lck, void *file_handle) { struct odb_context *odb = lck->odb; struct opendb_file file; @@ -384,7 +384,7 @@ /* remove a pending opendb entry */ -NTSTATUS odb_remove_pending(struct odb_lock *lck, void *private) +_PUBLIC_ NTSTATUS odb_remove_pending(struct odb_lock *lck, void *private) { struct odb_context *odb = lck->odb; int i; @@ -420,7 +420,7 @@ /* rename the path in a open file */ -NTSTATUS odb_rename(struct odb_lock *lck, const char *path) +_PUBLIC_ NTSTATUS odb_rename(struct odb_lock *lck, const char *path) { struct opendb_file file; NTSTATUS status; @@ -439,7 +439,7 @@ /* update delete on close flag on an open file */ -NTSTATUS odb_set_delete_on_close(struct odb_lock *lck, BOOL del_on_close) +_PUBLIC_ NTSTATUS odb_set_delete_on_close(struct odb_lock *lck, BOOL del_on_close) { NTSTATUS status; struct opendb_file file; @@ -456,9 +456,9 @@ return the current value of the delete_on_close bit, and how many people still have the file open */ -NTSTATUS odb_get_delete_on_close(struct odb_context *odb, -DATA_BLOB *key, BOOL *del_on_close, -int *open_count, char **path) +_PUBLIC_ NTSTATUS odb_get_delete_on_close(struct odb_context *odb, + DATA_BLOB *key, BOOL *del_on_close, + int *open_count, char **path) { NTSTATUS status; struct opendb_file file; @@ -500,9 +500,9 @@ determine if a file can be opened with the given share_access, create_options and access_mask */ -NTSTATUS odb_can_open(struct odb_lock *lck, - uint32_t share_access, uint32_t create_options, - uint32_t access_mask) +_PUBLIC_ NTSTATUS odb_can_open(struct odb_lock *lck, + uint32_t share_access, uint32_t create_options, + uint32_t access_mask) { struct odb_context *odb = lck->odb; NTSTATUS status; Modified: branches/SAMBA_4_0/source/ntvfs/sysdep/sys_notify.c === --- branches/SAMBA_4_0/source/ntvfs/sy
svn commit: samba r14965 - in branches/SAMBA_4_0/source/rpc_server: .
Author: metze Date: 2006-04-07 14:13:31 + (Fri, 07 Apr 2006) New Revision: 14965 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14965 Log: the unixinfo pipe need the sidmap code from SAMDB metze Modified: branches/SAMBA_4_0/source/rpc_server/config.mk Changeset: Modified: branches/SAMBA_4_0/source/rpc_server/config.mk === --- branches/SAMBA_4_0/source/rpc_server/config.mk 2006-04-07 13:15:46 UTC (rev 14964) +++ branches/SAMBA_4_0/source/rpc_server/config.mk 2006-04-07 14:13:31 UTC (rev 14965) @@ -97,6 +97,7 @@ unixinfo/dcesrv_unixinfo.o REQUIRED_SUBSYSTEMS = \ DCERPC_COMMON \ + SAMDB \ NDR_UNIXINFO # End MODULE dcerpc_unixinfo
svn commit: samba r14964 - in branches/SAMBA_4_0/source: dsdb dsdb/common ntvfs ntvfs/common ntvfs/posix ntvfs/sysdep ntvfs/unixuid rpc_server/lsa rpc_server/unixinfo
Author: metze Date: 2006-04-07 13:15:46 + (Fri, 07 Apr 2006) New Revision: 14964 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14964 Log: - move sidmap code from ntvfs_common to SAMDB - make ntvfs_common a library - create sys_notify library metze Added: branches/SAMBA_4_0/source/dsdb/common/sidmap.c branches/SAMBA_4_0/source/ntvfs/common/init.c Removed: branches/SAMBA_4_0/source/ntvfs/common/sidmap.c Modified: branches/SAMBA_4_0/source/dsdb/config.mk branches/SAMBA_4_0/source/ntvfs/common/config.mk branches/SAMBA_4_0/source/ntvfs/common/notify.c branches/SAMBA_4_0/source/ntvfs/config.mk branches/SAMBA_4_0/source/ntvfs/posix/config.mk branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h branches/SAMBA_4_0/source/ntvfs/sysdep/config.m4 branches/SAMBA_4_0/source/ntvfs/sysdep/config.mk branches/SAMBA_4_0/source/ntvfs/sysdep/inotify.c branches/SAMBA_4_0/source/ntvfs/sysdep/sys_notify.c branches/SAMBA_4_0/source/ntvfs/sysdep/sys_notify.h branches/SAMBA_4_0/source/ntvfs/unixuid/config.mk branches/SAMBA_4_0/source/ntvfs/unixuid/vfs_unixuid.c branches/SAMBA_4_0/source/rpc_server/lsa/dcesrv_lsa.c branches/SAMBA_4_0/source/rpc_server/unixinfo/dcesrv_unixinfo.c Changeset: Sorry, the patch is too large (1523 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14964
svn commit: samba r14963 - in branches/SAMBA_4_0/source/ntvfs/posix: .
Author: tridge Date: 2006-04-07 12:32:51 + (Fri, 07 Apr 2006) New Revision: 14963 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14963 Log: check talloc returns Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_notify.c Changeset: Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_notify.c === --- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_notify.c 2006-04-07 12:19:29 UTC (rev 14962) +++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_notify.c 2006-04-07 12:32:51 UTC (rev 14963) @@ -109,12 +109,23 @@ { struct pvfs_notify_buffer *n = talloc_get_type(private, struct pvfs_notify_buffer); size_t len; + struct notify_changes *n2; char *new_path; - n->changes = talloc_realloc(n, n->changes, struct notify_changes, n->num_changes+1); - n->changes[n->num_changes].action = ev->action; + n2 = talloc_realloc(n, n->changes, struct notify_changes, n->num_changes+1); + if (n2 == NULL) { + /* nothing much we can do for this */ + return; + } + n->changes = n2; + new_path = talloc_strdup(n->changes, ev->path); + if (new_path == NULL) { + return; + } string_replace(new_path, '/', '\\'); + + n->changes[n->num_changes].action = ev->action; n->changes[n->num_changes].name.s = new_path; n->num_changes++;
svn commit: samba r14962 - in branches/SAMBA_4_0/source/librpc/rpc: .
Author: tridge Date: 2006-04-07 12:19:29 + (Fri, 07 Apr 2006) New Revision: 14962 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14962 Log: fixed a valgrind error 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 2006-04-07 12:11:50 UTC (rev 14961) +++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c 2006-04-07 12:19:29 UTC (rev 14962) @@ -425,7 +425,8 @@ TALLOC_CTX *mem_ctx = talloc_init("floor_get_lhs_data"); struct ndr_pull *ndr = ndr_pull_init_blob(&epm_floor->lhs.lhs_data, mem_ctx); NTSTATUS status; - + uint16_t if_version=0; + ndr->flags |= LIBNDR_FLAG_NOALIGN; status = ndr_pull_GUID(ndr, NDR_SCALARS | NDR_BUFFERS, &syntax->uuid); @@ -434,7 +435,8 @@ return status; } - status = ndr_pull_uint16(ndr, NDR_SCALARS, &syntax->if_version); + status = ndr_pull_uint16(ndr, NDR_SCALARS, &if_version); + syntax->if_version = if_version; talloc_free(mem_ctx);
svn commit: samba r14961 - in branches/SAMBA_4_0/source/ntvfs/posix: .
Author: metze Date: 2006-04-07 12:11:50 + (Fri, 07 Apr 2006) New Revision: 14961 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14961 Log: fix compiler warning tridge: please add checks after talloc_realloc() and talloc_strdup()! metze Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_notify.c Changeset: Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_notify.c === --- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_notify.c 2006-04-07 11:44:55 UTC (rev 14960) +++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_notify.c 2006-04-07 12:11:50 UTC (rev 14961) @@ -109,11 +109,13 @@ { struct pvfs_notify_buffer *n = talloc_get_type(private, struct pvfs_notify_buffer); size_t len; + char *new_path; n->changes = talloc_realloc(n, n->changes, struct notify_changes, n->num_changes+1); n->changes[n->num_changes].action = ev->action; - n->changes[n->num_changes].name.s = talloc_strdup(n->changes, ev->path); - string_replace(n->changes[n->num_changes].name.s, '/', '\\'); + new_path = talloc_strdup(n->changes, ev->path); + string_replace(new_path, '/', '\\'); + n->changes[n->num_changes].name.s = new_path; n->num_changes++; /*
svn commit: samba r14960 - in branches/SAMBA_4_0/source/ntvfs/common: .
Author: tridge Date: 2006-04-07 11:44:55 + (Fri, 07 Apr 2006) New Revision: 14960 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14960 Log: don't declare variables mid-function Modified: branches/SAMBA_4_0/source/ntvfs/common/notify.c Changeset: Modified: branches/SAMBA_4_0/source/ntvfs/common/notify.c === --- branches/SAMBA_4_0/source/ntvfs/common/notify.c 2006-04-07 11:25:21 UTC (rev 14959) +++ branches/SAMBA_4_0/source/ntvfs/common/notify.c 2006-04-07 11:44:55 UTC (rev 14960) @@ -609,9 +609,10 @@ while (min_i < max_i) { struct notify_entry *e; + int cmp; i = (min_i+max_i)/2; e = &d->entries[i]; - int cmp = strncmp(path, e->path, p_len); + cmp = strncmp(path, e->path, p_len); if (cmp == 0) { if (p_len == e->path_len) { max_i = i;
svn commit: samba r14959 - in branches/SAMBA_4_0/source/ntvfs: common posix
Author: tridge Date: 2006-04-07 11:25:21 + (Fri, 07 Apr 2006) New Revision: 14959 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14959 Log: allow change notify to be disabled completely using notify:enable=False Modified: branches/SAMBA_4_0/source/ntvfs/common/notify.c branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c Changeset: Modified: branches/SAMBA_4_0/source/ntvfs/common/notify.c === --- branches/SAMBA_4_0/source/ntvfs/common/notify.c 2006-04-07 11:18:34 UTC (rev 14958) +++ branches/SAMBA_4_0/source/ntvfs/common/notify.c 2006-04-07 11:25:21 UTC (rev 14959) @@ -83,6 +83,10 @@ char *path; struct notify_context *notify; + if (lp_parm_bool(snum, "notify", "enable", True) != True) { + return NULL; + } + notify = talloc(mem_ctx, struct notify_context); if (notify == NULL) { return NULL; @@ -339,6 +343,11 @@ size_t len; int depth; + /* see if change notify is enabled at all */ + if (notify == NULL) { + return NT_STATUS_NOT_IMPLEMENTED; + } + status = notify_lock(notify); NT_STATUS_NOT_OK_RETURN(status); @@ -410,6 +419,11 @@ int i, depth; struct notify_depth *d; + /* see if change notify is enabled at all */ + if (notify == NULL) { + return NT_STATUS_NOT_IMPLEMENTED; + } + for (listel=notify->list;listel;listel=listel->next) { if (listel->private == private) { DLIST_REMOVE(notify->list, listel); @@ -552,6 +566,11 @@ int depth; const char *p, *next_p; + /* see if change notify is enabled at all */ + if (notify == NULL) { + return; + } + status = notify_load(notify); if (!NT_STATUS_IS_OK(status)) { return; Modified: branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c === --- branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c 2006-04-07 11:18:34 UTC (rev 14958) +++ branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c 2006-04-07 11:25:21 UTC (rev 14959) @@ -185,14 +185,12 @@ return NT_STATUS_INTERNAL_DB_CORRUPTION; } + /* allow this to be NULL - we just disable change notify */ pvfs->notify_context = notify_init(pvfs, pvfs->ntvfs->ctx->server_id, pvfs->ntvfs->ctx->msg_ctx, event_context_find(pvfs), pvfs->ntvfs->ctx->config.snum); - if (pvfs->notify_context == NULL) { - return NT_STATUS_INTERNAL_DB_CORRUPTION; - } pvfs->sidmap = sidmap_open(pvfs); if (pvfs->sidmap == NULL) {
svn commit: samba r14958 - in branches/SAMBA_4_0/source/librpc/ndr: .
Author: tridge Date: 2006-04-07 11:18:34 + (Fri, 07 Apr 2006) New Revision: 14958 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14958 Log: fixed big-endian dcerpc connections for the new string handling code Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_string.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_string.c === --- branches/SAMBA_4_0/source/librpc/ndr/ndr_string.c 2006-04-07 10:59:10 UTC (rev 14957) +++ branches/SAMBA_4_0/source/librpc/ndr/ndr_string.c 2006-04-07 11:18:34 UTC (rev 14958) @@ -564,6 +564,10 @@ return NT_STATUS_OK; } + if (NDR_BE(ndr) && chset == CH_UTF16) { + chset = CH_UTF16BE; + } + NDR_PULL_NEED_BYTES(ndr, length*byte_mul); ret = convert_string_talloc(ndr->current_mem_ctx, @@ -584,6 +588,10 @@ { ssize_t ret, required; + if (NDR_BE(ndr) && chset == CH_UTF16) { + chset = CH_UTF16BE; + } + required = byte_mul * length; NDR_PUSH_NEED_BYTES(ndr, required);
svn commit: samba r14957 - in branches/SAMBA_4_0/source: .
Author: tridge Date: 2006-04-07 10:59:10 + (Fri, 07 Apr 2006) New Revision: 14957 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14957 Log: fixed shell syntax for config.h creation, and move after AC_OUTPUT Modified: branches/SAMBA_4_0/source/configure.in Changeset: Modified: branches/SAMBA_4_0/source/configure.in === --- branches/SAMBA_4_0/source/configure.in 2006-04-07 10:36:54 UTC (rev 14956) +++ branches/SAMBA_4_0/source/configure.in 2006-04-07 10:59:10 UTC (rev 14957) @@ -110,14 +110,14 @@ $SMB_INFO_LIBRARIES CEOF -cmp include/config_tmp.h include/config.h >/dev/null 2>&1 -CMP_RET=$? -if [ $CMP_RET != 0 ];then - cp include/config_tmp.h include/config.h -fi - AC_OUTPUT_COMMANDS( [$PERL -I${builddir} -I${srcdir} -I${srcdir}/build ${srcdir}/build/smb_build/main.pl || exit $?],[ PERL="$PERL";export PERL;export srcdir; export builddir; ]) AC_OUTPUT + +cmp include/config_tmp.h include/config.h >/dev/null 2>&1 +CMP_RET=$? +if test $CMP_RET != 0; then + cp include/config_tmp.h include/config.h +fi
svn commit: samba r14956 - in branches/SAMBA_4_0/source: librpc/idl ntvfs/common ntvfs/sysdep torture/raw
Author: tridge Date: 2006-04-07 10:36:54 + (Fri, 07 Apr 2006) New Revision: 14956 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14956 Log: change the notify search to be much more efficient by using a per-depth bisection search. This makes the notify_trigger() call log(N) which makes us scale well for large numbers of outstanding notifies Modified: branches/SAMBA_4_0/source/librpc/idl/notify.idl branches/SAMBA_4_0/source/ntvfs/common/notify.c branches/SAMBA_4_0/source/ntvfs/sysdep/sys_notify.c branches/SAMBA_4_0/source/torture/raw/notify.c Changeset: Sorry, the patch is too large (573 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14956