Re: [Samba] Question on how to get Samba to use larger pread/write calls.

2011-01-18 Thread James Peach
On 17 January 2011 08:14, Chris Duffy c...@small-tree.com wrote:
 We are testing Samba 3 (and 4) on Fedora Core 13,
 10Gbit connection with a Mac OS 10.6.4 system
 as the client.  We will be adding some Windows
 machines sooner or later with 10Gbit interfaces.

 We are seeing 100-150MBytes/sec read or write
 performance between the Mac and the FC13 system
 over 10Gbit interface but it should be capable of
 400-500MBytes/sec.  We have a local raid
 on the FC13 system that runs 1GByte/sec locally
 using an Areca 1880-ix-16 raid card (6Gbit version).
 It has 16 fast Hitachi disks in a Raid5 format
 using xfs filesystem.

 The problem here is that samba is poking the Areca
 at 128KByte I/O's on preads and writes, i.e.
 shown to us using strace on the smbd daemons
 that are running.  Using vmstat/iostat/sar utilities,
 we see 100% utilization of the Areca card because the
 average wait time is real high and the average
 queue length to it is also high..too many
 small I/O's.
 This is not the case if I run fio or dd locally
 to/from the Areca's raid using 1-4MByte I/O's.
 I see fast I/O...

 I do not see any way to increase the size of Samba's
 pread/write's in the smb.conf documentation.  I
 am sure it may be just a matter of getting the source
 code and making some changes to allow larger
 sized IO's butand of course I suppose Windows
 clients may complain but

 I remember that back in the old Irix days with the
 group of engineers in Australia I worked with,
 we had Samba screaming fast but not sure if they
 tweaked the version of Samba on Irix to do this.

Hi Chris :)

IIRC, we used a carefully tweaked read ahead module to make sure that
I/Os were hitting the disks properly aligned and of reasonable size.

http://www.samba.org/samba/docs/man/manpages-3/vfs_readahead.8.html


 Can you guys come up with a way for us to allow
 the reads/writes to/from the disks to be tunable
 up to say 4MB in size?

 Thx
 chris duffy

 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba




-- 
James Peach | jor...@gmail.com
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Connecting an iMac to os/2

2011-01-11 Thread James Peach
On 11 January 2011 12:07, James Moe ji...@sohnen-moe.com wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hello,
  I have an iMac v10.6. I'd like to get it to connect to an old os/2
 server, v4.5 fp3.
  Using smbutils on the iMac:

 $ smbutil -v view //sma-server1.sma.com
 smbutil: server connection failed: RPC struct is bad

  Can anyone suggest what changes may be made that will correct this
 error? Is it even possible?

I don't think that the Mac OS X client will support a server that old.
You could file a bug at bugreporter.apple.com, but I'm pretty
confident that's what they'll tell you. Sorry.


 - --
 James Moe
 moe dot james at sohnen-moe dot com
 520.743.3936
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v2.0.15 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAk0suJ4ACgkQzTcr8Prq0ZPJ7wCeMTU56gbcigWb1gsjR57AxkGm
 ycEAoLKKbbvi1plOlr/7EEHJV7KYg+79
 =ls/L
 -END PGP SIGNATURE-
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba




-- 
James Peach | jor...@gmail.com
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[SCM] Samba Shared Repository - branch master updated

2010-10-20 Thread James Peach
The branch, master has been updated
   via  c8000c9 smbtorture: Fix typo in status message.
  from  7a194c6 s3: Make unpack_pjob static

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit c8000c94a59267326b13df3c631b9ac2921d0615
Author: James Peach jpe...@samba.org
Date:   Wed Oct 20 10:07:33 2010 -0700

smbtorture: Fix typo in status message.

---

Summary of changes:
 source4/torture/raw/notify.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c
index 7ccdbd7..d96ec93 100644
--- a/source4/torture/raw/notify.c
+++ b/source4/torture/raw/notify.c
@@ -74,7 +74,7 @@ static bool test_notify_dir(struct smbcli_state *cli, struct 
smbcli_state *cli2,
struct smbcli_request *req, *req2;
extern int torture_numops;
 
-   printf(TESTING CHANGE NOTIFY ON DIRECTRIES\n);
+   printf(TESTING CHANGE NOTIFY ON DIRECTORIES\n);

/*
  get a handle on the directory


-- 
Samba Shared Repository


Re: [Samba] macmini samba

2010-08-24 Thread James Peach
On 24 August 2010 15:09, larry lar...@artonagroup.com wrote:
 Hi,



 Did anyone know the samba daemon,config file and the installation path on
 MAC OS 10.6?

$ smbd -b
   Built by:r...@ghosttown.apple.com
   Built on:Thu May  6 17:48:29 PDT 2010
   Built using: /usr/bin/cc
   Build host:  Darwin ghosttown.apple.com 10.0 Darwin Kernel Version
10.0.0: Fri Jul 31 22:46:25 PDT 2009;
root:xnu-1456.1.25~1/RELEASE_X86_64 x86_64
   SRCDIR:  /SourceCache/samba/samba-235.4/samba/source
   BUILDDIR:/var/tmp/samba/samba-235.4~1/x86_64

Paths:
   SBINDIR: /usr/sbin
   BINDIR: /usr/bin
   SWATDIR: /usr/swat
   CONFIGFILE: /private/etc/smb.conf
   LOGFILEBASE: /private/var/log/samba
   LMHOSTSFILE: /private/etc/lmhosts
   LIBDIR: /usr/lib/samba
   SHLIBEXT: dylib
   LOCKDIR: /private/var/samba
   PIDDIR: /private/var/run
   SMB_PASSWD_FILE: /private/var/db/samba/smbpasswd
   PRIVATE_DIR: /private/var/db/samba





 I have a problem that the windows users can only access shares on MAC by
 computer name.



 But need input user name and password by IP address.







 Thanks



 Larry

 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba




-- 
James Peach | jor...@gmail.com
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[SCM] Samba Shared Repository - branch master updated

2010-08-17 Thread James Peach
The branch, master has been updated
   via  effc61c... smbtorture: Make SAMBA3CASEINSENSITIVE report failures 
properly.
   via  b7ad0c6... smbtorture: Emit correct test results if setup fails.
   via  21fe753... smbtorture: Ensure that the RPC setup returns correct 
status.
  from  f37793e... s4:ldap_server use talloc_unlink() to avoid 
talloc_free() with references

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit effc61cb782a470a0a3dee317ad271e521f6c3be
Author: James Peach jpe...@samba.org
Date:   Thu Aug 12 14:31:52 2010 -0700

smbtorture: Make SAMBA3CASEINSENSITIVE report failures properly.

commit b7ad0c6e394b09a8933080e966ba1c77575d9f31
Author: James Peach jpe...@samba.org
Date:   Thu Aug 12 12:36:24 2010 -0700

smbtorture: Emit correct test results if setup fails.

If the test setup fails, we still need to format the test result for the
UI. At leas in the subunit case, the format doesn't specify what to do
here, so we fail every test manually with the setup failure message.

commit 21fe7533032168222a32bc12e2ade1169d41b763
Author: James Peach jpe...@samba.org
Date:   Thu Aug 12 12:35:53 2010 -0700

smbtorture: Ensure that the RPC setup returns correct status.

---

Summary of changes:
 lib/torture/torture.c|   46 +
 source4/torture/raw/samba3misc.c |   10 +---
 source4/torture/rpc/rpc.c|8 +++---
 3 files changed, 41 insertions(+), 23 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/torture/torture.c b/lib/torture/torture.c
index 71bd53b..27b2bdc 100644
--- a/lib/torture/torture.c
+++ b/lib/torture/torture.c
@@ -343,6 +343,7 @@ static bool internal_torture_run_test(struct 
torture_context *context,
context-active_testname = talloc_asprintf(context, %s-%s, 
old_testname, test-name);
}
 
+
context-active_tcase = tcase;
context-active_test = test;
 
@@ -401,43 +402,58 @@ bool torture_run_tcase(struct torture_context *context,
bool ret = true;
char *old_testname;
struct torture_test *test;
+   bool setup_succeeded = true;
+   const char * setup_reason = Setup failed;
 
context-active_tcase = tcase;
if (context-results-ui_ops-tcase_start) 
context-results-ui_ops-tcase_start(context, tcase);
 
-   if (tcase-fixture_persistent  tcase-setup 
-!tcase-setup(context, tcase-data)) {
-   /* FIXME: Use torture ui ops for reporting this error */
-   fprintf(stderr, Setup failed: );
-   if (context-last_reason != NULL)
-   fprintf(stderr, %s, context-last_reason);
-   fprintf(stderr, \n);
-   ret = false;
-   goto done;
+   if (tcase-fixture_persistent  tcase-setup) {
+   setup_succeeded = tcase-setup(context, tcase-data);
+   }
+
+   if (!setup_succeeded) {
+   /* Uh-oh. The setup failed, so we can't run any of the tests
+* in this testcase. The subunit format doesn't specify what
+* to do here, so we keep the failure reason, and manually
+* use it to fail every test.
+*/
+   if (context-last_reason != NULL) {
+   setup_reason = talloc_asprintf(context,
+   Setup failed: %s, context-last_reason);
+   }
}
 
old_testname = context-active_testname;
context-active_testname = talloc_asprintf(context, %s-%s, 
   old_testname, tcase-name);
for (test = tcase-tests; test; test = test-next) {
-   ret = internal_torture_run_test(context, tcase, test, 
-   tcase-fixture_persistent);
+   if (setup_succeeded) {
+   ret = internal_torture_run_test(context, tcase, test,
+   tcase-fixture_persistent);
+   } else {
+   context-active_tcase = tcase;
+   context-active_test = test;
+   torture_ui_test_start(context, tcase, test);
+   torture_ui_test_result(context, TORTURE_FAIL, 
setup_reason);
+   }
}
talloc_free(context-active_testname);
context-active_testname = old_testname;
 
-   if (tcase-fixture_persistent  tcase-teardown 
-   !tcase-teardown(context, tcase-data))
+   if (setup_succeeded  tcase-fixture_persistent  tcase-teardown 
+   !tcase-teardown(context, tcase-data)) {
ret = false;
+   }
 
-done:
context-active_tcase = NULL;
+   context-active_test = NULL;
 
if (context-results-ui_ops

[SCM] Samba Shared Repository - branch master updated

2010-08-11 Thread James Peach
The branch, master has been updated
   via  44de839... smbtorture: Don't crash RAW-QFILEINFO if there's no 
alternate name.
   via  88d48a7... smbtorture: Make BASE-OPENATTR report a failure if it 
fails.
  from  c43e832... s3-waf: fix the waf build with more recent MIT krb5 libs.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 44de839dabb6062d524ddc0001ca23fb8505e643
Author: James Peach jpe...@samba.org
Date:   Fri Aug 6 15:21:31 2010 -0700

smbtorture: Don't crash RAW-QFILEINFO if there's no alternate name.

commit 88d48a7d92ca7dedc5357a1e7caab544e586bafb
Author: James Peach jpe...@samba.org
Date:   Fri Aug 6 15:25:12 2010 -0700

smbtorture: Make BASE-OPENATTR report a failure if it fails.

---

Summary of changes:
 source4/torture/basic/attr.c|6 --
 source4/torture/raw/qfileinfo.c |5 +
 2 files changed, 9 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/basic/attr.c b/source4/torture/basic/attr.c
index 49e8a59..66d17b4 100644
--- a/source4/torture/basic/attr.c
+++ b/source4/torture/basic/attr.c
@@ -121,7 +121,8 @@ bool torture_openattrtest(struct torture_context *tctx,
if (fnum1 == -1) {
for (l = 0; l  ARRAY_SIZE(attr_results); l++) {
if (attr_results[l].num == k) {
-   torture_comment(tctx, [%d] 
trunc open 0x%x - 0x%x of %s failed - should have succeeded !(%s)\n,
+   torture_result(tctx, 
TORTURE_FAIL,
+   [%d] trunc 
open 0x%x - 0x%x of %s failed - should have succeeded !(%s),
k, 
open_attrs_table[i],

open_attrs_table[j],
fname, 
smbcli_errstr(cli1-tree));
@@ -160,7 +161,8 @@ bool torture_openattrtest(struct torture_context *tctx,
if (attr != attr_results[l].result_attr 
||
open_attrs_table[i] != 
attr_results[l].init_attr ||
open_attrs_table[j] != 
attr_results[l].trunc_attr) {
-   torture_comment(tctx, [%d] 
getatr check failed. [0x%x] trunc [0x%x] got attr 0x%x, should be 0x%x\n,
+   torture_result(tctx, 
TORTURE_FAIL,
+   [%d] getatr check 
failed. [0x%x] trunc [0x%x] got attr 0x%x, should be 0x%x,
   k, open_attrs_table[i],
   open_attrs_table[j],
   (unsigned int)attr,
diff --git a/source4/torture/raw/qfileinfo.c b/source4/torture/raw/qfileinfo.c
index 54f1d12..2a5a2e7 100644
--- a/source4/torture/raw/qfileinfo.c
+++ b/source4/torture/raw/qfileinfo.c
@@ -667,6 +667,11 @@ static bool torture_raw_qfileinfo_internals(struct 
torture_context *torture,
s1 = fnum_find(ALT_NAME_INFO);
if (s1) {
correct_name = s1-alt_name_info.out.fname.s;
+   }
+
+   if (!correct_name) {
+   torture_comment(torture, no alternate name information\n);
+   } else {
torture_comment(torture, alt_name: %s\n, correct_name);

NAME_CHECK(ALT_NAME_INFO,alt_name_info, fname, 
STR_UNICODE);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-07-16 Thread James Peach
The branch, master has been updated
   via  ec25a00... smbtorture shell: Allow any config option to be set.
  from  e058de3... Make the map to guest parameter work correctly with 
NTLMSSP (spnego and raw) under SMB2. Still need to investigate fixing this with 
krb5 auth (does this make sense ?).

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit ec25a000317f863df7af0d97f1fd8948b2f8959d
Author: James Peach jpe...@samba.org
Date:   Fri Jul 16 11:07:31 2010 -0700

smbtorture shell: Allow any config option to be set.

Not sure what I was thinking by restricting the shell to torture:
parametric options. It's really extemely useful to be able to set
arbitrary options.

---

Summary of changes:
 source4/torture/shell.c |   11 ++-
 1 files changed, 6 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/shell.c b/source4/torture/shell.c
index 7c313af..03c670a 100644
--- a/source4/torture/shell.c
+++ b/source4/torture/shell.c
@@ -175,8 +175,6 @@ static void shell_help(const struct shell_command * command,
 static void shell_set(const struct shell_command *command,
struct torture_context *tctx, int argc, const char **argv)
 {
-   char * name;
-
switch (argc) {
case 0:
lpcfg_dump(tctx-lp_ctx, stdout,
@@ -185,9 +183,12 @@ static void shell_set(const struct shell_command *command,
break;
 
case 2:
-   name = talloc_asprintf(NULL, torture:%s, argv[0]);
-   lpcfg_set_cmdline(tctx-lp_ctx, name, argv[1]);
-   talloc_free(name);
+   /* We want to allow users to set any config option. Top level
+* options will get checked against their static definition, but
+* parametric options can't be checked and will just get stashed
+* as they are provided.
+*/
+   lpcfg_set_cmdline(tctx-lp_ctx, argv[0], argv[1]);
break;
 
default:


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-06-21 Thread James Peach
The branch, master has been updated
   via  6227eac... smbtorture: Fixx off-by-one command line parsing.
   via  0fc18ea... smbtorture: Add target command to interactive shell.
   via  7a25e2e... smbtorture: Enhance shell help command.
   via  bf35aa8... smbtorture: Add auth command to the shell.
   via  3f398ec... smbtorture: Refactor interactive shell into independent 
commands.
   via  9f69790... smbtorture: Move interactive shell into a separate file.
   via  a5e14bd... smbtorture: Print global options for interactive list 
command.
   via  12e15b0... smbtorture: Add history support to shell mode.
   via  6f96293... smbtorture: Add list command to smbtorture shell.
  from  acf54c3... s3-winbind: Make KRB5_EVENT_REFRESH_TIME a function

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 6227eac607131ed1042af1de83af7f70d0b05375
Author: James Peach jpe...@samba.org
Date:   Mon Jun 21 11:09:45 2010 -0700

smbtorture: Fixx off-by-one command line parsing.

If we are not in shell mode we require both the target and test name
arguments. Make sure we process these from the correct index.

commit 0fc18ead76a79286365646eeb7607b39b01a1c9f
Author: James Peach jpe...@samba.org
Date:   Mon Mar 22 21:55:49 2010 -0700

smbtorture: Add target command to interactive shell.

Add a target command to set the target server to test. Refactor
the command line argument processing a little so that you can run
--shell without any additional arguments.

commit 7a25e2efe9360b333fedc3fb938774437703700e
Author: James Peach jpe...@samba.org
Date:   Sun Mar 21 22:04:37 2010 -0700

smbtorture: Enhance shell help command.

Sort the command list alphabetically. Let the help command print
usage info for other commands.

commit bf35aa86038aa5bbf06bf73eb58cfa6fa1eae904
Author: James Peach jpe...@samba.org
Date:   Sun Mar 21 21:56:05 2010 -0700

smbtorture: Add auth command to the shell.

Add a new auth command to set the cmdline credentials from withing
the smbtorture shell.

commit 3f398ec36d6b733c92682f5eb03eeacb047e582f
Author: James Peach jpe...@samba.org
Date:   Fri Mar 19 22:04:08 2010 -0700

smbtorture: Refactor interactive shell into independent commands.

Refactor the smbtorture interactive shell into a set of independent
command callbacks to make it easier to add more independent commands.

commit 9f697903556529bb4fedd73d027c317e56f6bf21
Author: James Peach jpe...@samba.org
Date:   Fri Mar 19 21:24:15 2010 -0700

smbtorture: Move interactive shell into a separate file.

commit a5e14bded48ac53e21307eda1c9767be64b39a17
Author: James Peach jpe...@samba.org
Date:   Thu Mar 18 21:59:35 2010 -0700

smbtorture: Print global options for interactive list command.

commit 12e15b0ac800a84d553ff82c4c61ccc8da9fd5fd
Author: James Peach jpe...@samba.org
Date:   Thu Mar 18 21:25:17 2010 -0700

smbtorture: Add history support to shell mode.

commit 6f96293406bfaff35e7588d0624842de145ff249
Author: James Peach jpe...@samba.org
Date:   Thu Mar 18 21:14:47 2010 -0700

smbtorture: Add list command to smbtorture shell.

---

Summary of changes:
 lib/torture/torture.c   |2 +-
 lib/torture/torture.h   |2 +-
 source4/lib/smbreadline/readline.m4 |5 +
 source4/torture/config.mk   |5 +-
 source4/torture/shell.c |  318 +++
 source4/torture/smbtorture.c|  141 ++--
 source4/torture/smbtorture.h|5 +
 source4/torture/wscript_build   |2 +-
 8 files changed, 422 insertions(+), 58 deletions(-)
 create mode 100644 source4/torture/shell.c


Changeset truncated at 500 lines:

diff --git a/lib/torture/torture.c b/lib/torture/torture.c
index dcb28ee..4333f98 100644
--- a/lib/torture/torture.c
+++ b/lib/torture/torture.c
@@ -305,7 +305,7 @@ bool torture_run_suite(struct torture_context *context,
 }
 
 bool torture_run_suite_restricted(struct torture_context *context, 
-  struct torture_suite *suite, char **restricted)
+  struct torture_suite *suite, const char **restricted)
 {
/* FIXME */
return false;
diff --git a/lib/torture/torture.h b/lib/torture/torture.h
index 931937c..6482e89 100644
--- a/lib/torture/torture.h
+++ b/lib/torture/torture.h
@@ -221,7 +221,7 @@ bool torture_run_suite(struct torture_context *context,
 /* Run the specified testsuite recursively, but only the specified 
  * tests */
 bool torture_run_suite_restricted(struct torture_context *context, 
-  struct torture_suite *suite, char **restricted);
+  struct torture_suite *suite, const char **restricted);
 
 /* Run the specified testcase */
 bool torture_run_tcase(struct torture_context

Re: [SCM] Samba Shared Repository - branch master updated

2010-06-21 Thread James Peach
On Jun 21, 2010, at 2:09 PM, Matthieu Patou wrote:

 James,
 
 It seems that something is wrong with your patch set, I get:
 
 m...@ares:/usr/local/src/samba4/source4$ make
 WAF_MAKE=1 ../buildtools/bin/waf build
 Waf: Entering directory `/usr/local/src/samba4/source4/bin'
 [1775/1973] Compiling torture/shell.c
 ../torture/shell.c: In function ‘shell_set’:
 ../torture/shell.c:181: error: implicit declaration of function ‘lp_dump’
 ../torture/shell.c:188: error: implicit declaration of function 
 ‘lp_set_cmdline’
 Waf: Leaving directory `/usr/local/src/samba4/source4/bin'
 Build failed: - task failed (err #1):
 {task: cc shell.c - shell_28.o}
 make: *** [all] Erreur 1

Sorry, fixed with f5709975c1671dc23471a81b2a6523138d98a74b

 
 reseting to acf54c3... s3-winbind: Make KRB5_EVENT_REFRESH_TIME a function, 
 allow me to build !
 
 Can you have a look ?
 
 On 21/06/2010 22:31, James Peach wrote:
 The branch, master has been updated
via  6227eac... smbtorture: Fixx off-by-one command line parsing.
via  0fc18ea... smbtorture: Add target command to interactive shell.
via  7a25e2e... smbtorture: Enhance shell help command.
via  bf35aa8... smbtorture: Add auth command to the shell.
via  3f398ec... smbtorture: Refactor interactive shell into 
 independent commands.
via  9f69790... smbtorture: Move interactive shell into a separate 
 file.
via  a5e14bd... smbtorture: Print global options for interactive 
 list command.
via  12e15b0... smbtorture: Add history support to shell mode.
via  6f96293... smbtorture: Add list command to smbtorture shell.
   from  acf54c3... s3-winbind: Make KRB5_EVENT_REFRESH_TIME a function
 
 http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
 
 
 - Log -
 commit 6227eac607131ed1042af1de83af7f70d0b05375
 Author: James Peachjpe...@samba.org
 Date:   Mon Jun 21 11:09:45 2010 -0700
 
 smbtorture: Fixx off-by-one command line parsing.
 
 If we are not in shell mode we require both the target and test name
 arguments. Make sure we process these from the correct index.
 
 commit 0fc18ead76a79286365646eeb7607b39b01a1c9f
 Author: James Peachjpe...@samba.org
 Date:   Mon Mar 22 21:55:49 2010 -0700
 
 smbtorture: Add target command to interactive shell.
 
 Add a target command to set the target server to test. Refactor
 the command line argument processing a little so that you can run
 --shell without any additional arguments.
 
 commit 7a25e2efe9360b333fedc3fb938774437703700e
 Author: James Peachjpe...@samba.org
 Date:   Sun Mar 21 22:04:37 2010 -0700
 
 smbtorture: Enhance shell help command.
 
 Sort the command list alphabetically. Let the help command print
 usage info for other commands.
 
 commit bf35aa86038aa5bbf06bf73eb58cfa6fa1eae904
 Author: James Peachjpe...@samba.org
 Date:   Sun Mar 21 21:56:05 2010 -0700
 
 smbtorture: Add auth command to the shell.
 
 Add a new auth command to set the cmdline credentials from withing
 the smbtorture shell.
 
 commit 3f398ec36d6b733c92682f5eb03eeacb047e582f
 Author: James Peachjpe...@samba.org
 Date:   Fri Mar 19 22:04:08 2010 -0700
 
 smbtorture: Refactor interactive shell into independent commands.
 
 Refactor the smbtorture interactive shell into a set of independent
 command callbacks to make it easier to add more independent commands.
 
 commit 9f697903556529bb4fedd73d027c317e56f6bf21
 Author: James Peachjpe...@samba.org
 Date:   Fri Mar 19 21:24:15 2010 -0700
 
 smbtorture: Move interactive shell into a separate file.
 
 commit a5e14bded48ac53e21307eda1c9767be64b39a17
 Author: James Peachjpe...@samba.org
 Date:   Thu Mar 18 21:59:35 2010 -0700
 
 smbtorture: Print global options for interactive list command.
 
 commit 12e15b0ac800a84d553ff82c4c61ccc8da9fd5fd
 Author: James Peachjpe...@samba.org
 Date:   Thu Mar 18 21:25:17 2010 -0700
 
 smbtorture: Add history support to shell mode.
 
 commit 6f96293406bfaff35e7588d0624842de145ff249
 Author: James Peachjpe...@samba.org
 Date:   Thu Mar 18 21:14:47 2010 -0700
 
 smbtorture: Add list command to smbtorture shell.
 
 ---
 
 Summary of changes:
  lib/torture/torture.c   |2 +-
  lib/torture/torture.h   |2 +-
  source4/lib/smbreadline/readline.m4 |5 +
  source4/torture/config.mk   |5 +-
  source4/torture/shell.c |  318 
 +++
  source4/torture/smbtorture.c|  141 ++--
  source4/torture/smbtorture.h|5 +
  source4/torture/wscript_build   |2 +-
  8 files changed, 422 insertions(+), 58 deletions(-)
  create mode 100644 source4/torture/shell.c
 
 
 Changeset truncated at 500 lines:
 
 diff --git a/lib/torture/torture.c b/lib/torture/torture.c
 index dcb28ee..4333f98 100644
 --- a/lib/torture

Re: [Samba] mac client: folder copy problem

2009-12-16 Thread James Peach
2009/12/16 Jeremy Allison j...@samba.org:
 On Wed, Dec 16, 2009 at 07:00:09PM +0100, Anton Starikov wrote:
 And although it creates directory, it doesn't copy contents, because it 
 stops process of copying directory after this error. If I repeat filesync, 
 the contents of directory will be copid (cause directory is already here).

 So, it looks exactly the same.
 If so, then problem in chflags().
 I expect that samba on linux is compiled without support for chflags, 
 obviously.

 I presume that settings unix extensions = no would probably fix this, but 
 it has a drawback, because then you loose native unix things like symlinks 
 etc.

 Which is, at least in our case is not possible, cause shares accessed by 
 both, mac and linux clients over NFS (the same clients on different hosts) 
 and symlinks are heavily used.

 I think, OSX client, when it sees that server supports unix extensions, 
 expects that on other side is OSX server with samba which supports chflags.

 So, if we don't discuss rewrite of OSX cifs FS, then only solution is to 
 emulate chflags support on samba side (or convert flags to XFS/ETX3 attrs 
 somehow)

 Hmmm. Looks like a client bug then, in that they don't cope with an
 error on chflags set. What error is the Samba server returning here ?

 George, what errors can the MacOSX client cope with and continue ?

FileSync wants to create accurate copies of files, including all their
metadata. We just pass the error up the stack. The current code does
not look too closely at the unix capabilities, we  should be looking
at the flags mask in the UNIX_INFO2 response and handling the case
where the server doesn't understand any flags.

Please file a bug at http://bugreporter.apple.com and attach the
packet trace. This will help us to make a case to fix this in an
update.

-- 
James Peach | jor...@gmail.com
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] mac client: folder copy problem

2009-12-16 Thread James Peach
2009/12/16 Anton Starikov ant.stari...@gmail.com:

 On Dec 16, 2009, at 7:08 PM, Jeremy Allison wrote:

 On Wed, Dec 16, 2009 at 07:00:09PM +0100, Anton Starikov wrote:
 And although it creates directory, it doesn't copy contents, because it 
 stops process of copying directory after this error. If I repeat filesync, 
 the contents of directory will be copid (cause directory is already here).

 So, it looks exactly the same.
 If so, then problem in chflags().
 I expect that samba on linux is compiled without support for chflags, 
 obviously.

 I presume that settings unix extensions = no would probably fix this, but 
 it has a drawback, because then you loose native unix things like symlinks 
 etc.

 Which is, at least in our case is not possible, cause shares accessed by 
 both, mac and linux clients over NFS (the same clients on different hosts) 
 and symlinks are heavily used.

 I think, OSX client, when it sees that server supports unix extensions, 
 expects that on other side is OSX server with samba which supports chflags.

 So, if we don't discuss rewrite of OSX cifs FS, then only solution is to 
 emulate chflags support on samba side (or convert flags to XFS/ETX3 attrs 
 somehow)

 Hmmm. Looks like a client bug then, in that they don't cope with an
 error on chflags set. What error is the Samba server returning here ?

 Of course it is client error. But it is much easy to add dirty hack to 
 samba on server that fooling around bunch of clients.
 Does Apple opensource their implementation of smbfs?

http://www.opensource.apple.com/source/smb/smb-348.7/

-- 
James Peach | jor...@gmail.com
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] mac client: folder copy problem

2009-12-16 Thread James Peach
2009/12/16 Anton Starikov ant.stari...@gmail.com:
 One question.

 The fact that client ignore ACL capabilities of server, it is also normal for 
 current smbfs implementation?

Even in 10.5, the smbfs client does not ignore the filesystem ACL
support attribute.


 On Dec 16, 2009, at 9:28 PM, James Peach wrote:

 2009/12/16 Jeremy Allison j...@samba.org:
 On Wed, Dec 16, 2009 at 07:00:09PM +0100, Anton Starikov wrote:
 And although it creates directory, it doesn't copy contents, because it 
 stops process of copying directory after this error. If I repeat filesync, 
 the contents of directory will be copid (cause directory is already here).

 So, it looks exactly the same.
 If so, then problem in chflags().
 I expect that samba on linux is compiled without support for chflags, 
 obviously.

 I presume that settings unix extensions = no would probably fix this, 
 but it has a drawback, because then you loose native unix things like 
 symlinks etc.

 Which is, at least in our case is not possible, cause shares accessed by 
 both, mac and linux clients over NFS (the same clients on different hosts) 
 and symlinks are heavily used.

 I think, OSX client, when it sees that server supports unix extensions, 
 expects that on other side is OSX server with samba which supports chflags.

 So, if we don't discuss rewrite of OSX cifs FS, then only solution is to 
 emulate chflags support on samba side (or convert flags to XFS/ETX3 
 attrs somehow)

 Hmmm. Looks like a client bug then, in that they don't cope with an
 error on chflags set. What error is the Samba server returning here ?

 George, what errors can the MacOSX client cope with and continue ?

 FileSync wants to create accurate copies of files, including all their
 metadata. We just pass the error up the stack. The current code does
 not look too closely at the unix capabilities, we  should be looking
 at the flags mask in the UNIX_INFO2 response and handling the case
 where the server doesn't understand any flags.

 Please file a bug at http://bugreporter.apple.com and attach the
 packet trace. This will help us to make a case to fix this in an
 update.

 --
 James Peach | jor...@gmail.com





-- 
James Peach | jor...@gmail.com
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] mac client: folder copy problem

2009-12-16 Thread James Peach
2009/12/16 Anton Starikov ant.stari...@gmail.com:

 On Dec 16, 2009, at 9:45 PM, James Peach wrote:

 2009/12/16 Anton Starikov ant.stari...@gmail.com:
 One question.

 The fact that client ignore ACL capabilities of server, it is also normal 
 for current smbfs implementation?

 Even in 10.5, the smbfs client does not ignore the filesystem ACL
 support attribute.

 With unix extensions enabled?

 Then I don't understand. Where is the problem.

 On server side I see

 smbd_audit: antst|xxx|antst|sys_acl_get_file|ok|.
 smbd_audit: antst|xxx|antst|sys_acl_get_file|ok|.
 smbd_audit: antst|xxx|antst|sys_acl_get_entry|ok|
 smbd_audit: antst|xxx|antst|sys_acl_free_acl|ok|
 smbd_audit: antst|xxx|antst|sys_acl_free_acl|ok|
 smbd_audit: antst|xxx|antst|get_nt_acl|ok|.


 a file:

 # getfacl /home/antst/tt1
 getfacl: Removing leading '/' from absolute path names
 # file: home/antst/tt1
 # owner: antst
 # group: cmsusers
 user::rw-
 user:mohand:rwx
 group::r--
 mask::rwx
 other::---

 And on client side:

 ls -le  /tmp/qq1/tt1
 -rw-r-  1 antst  cmsusers  0 Dec 16 20:19 /tmp/qq1/tt1


 And if I try to set ACL from OSX I get
 $ chmod +a mohand allow write /tmp/qq1/tt1
 chmod: Failed to set ACL on file '/tmp/qq1/tt1': Operation not supported

 Looking into the source code of client (thanks for link) I see that 
 CIFS_UNIX_POSIX_ACLS_CAP is not referenced in the sources (except header 
 file, where it is defined). Although it can mean nothing and you can use 
 somewhere in the code just numerical value.

It doesn't use unix ACLs, it uses SMB ACLs.

-- 
James Peach | jor...@gmail.com
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Permission problem with mac os x client

2009-07-16 Thread James Peach
2009/7/16 Udo Mueller deb...@cs-ol.de:
 Hi all,

 Server: Debian 5.0 with samba 3.2.5
 Client: Current Mac OS X

 Wanted: files with 0760, directories with 2770

 Config: create mask = 760
        directory mask = 770
        force create mode = 760
        force directory mode = 2770

 Problem: files created with 644 or 764 or 600
         directories created with 2700 or 0770 or 0700

 My setup works just perfect with Windows Clients.

 Anyone knows why this doesnt work with mac os x?

try unix extensions = no

-- 
James Peach | jor...@gmail.com
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Time capsule and bad smb

2009-04-22 Thread James Peach
2009/4/21 Pietro Battiston too...@email.it:
 Il giorno lun, 16/02/2009 alle 23.03 -0800, Jeremy Allison ha scritto:
 On Mon, Feb 16, 2009 at 09:42:48PM -0800, James Peach wrote:
 
  Volker's suggestion is the best.
 
  Pietro should to http://developer.apple.com/bugreporter/ and log a
  bug against the TIme Capsule. It would be best to attach a packet
  trace to the bug. Follow the instructions here:
 
  http://wiki.samba.org/index.php/Capture_Packets

 Boo, hiss, cop-out :-).

  I'll try and dig up a time capsule to bring to Connectathon next week
  if any of the Linux smbfs folks would like to test against it ...

 Sure, I'll be there and I'd love to take a look at it.
 Will there be any Time Capsule engineers there though
 if we do find bugs ?

 Did someone debug the problem?

yes

 The bug I filed (# 6598363) in the Apple bugtracker is just there,
 alone, with apparently no care given to, since more than 2 months...

Not everything that happens to a bug report is visible to the
originator. When they ship a release that includes the fix, the bug
should be sent back to you to verify. Sorry the process is so opaque.

-- 
James Peach | jor...@gmail.com
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Re: samba Digest, Vol 76, Issue 10

2009-04-11 Thread James Peach
2009/4/10 Alex Thurley alex.thur...@bonn-is.de:
 Dear List,

 I wonder if somebody has a correctly working SMB service in Mac OS X Server
 10.5.x. I've got here lots of This process has forked..

This is because a call to the Security framework touches a part of
CoreFoundation that is unhappy that Samba forks without a subsequent
exec. It's annoying but harmless.

 and Broken Pipe
 errors as described in this post:
 http://www.afp548.com/forum/viewtopic.php?showtopic=22295

Not really enough info to say what is happening here. the broken pipe
means that the client disconnected unexpectedly, but it's not clear
why. As some of the posters in that thread note, there is a bug in the
streams module where we return an error for reads after the
end-of-file (we ought to succeed but return no data).


 Would be nice if a Samba-guru could point us to the right direction.

Volker's suggestion to file a Radar with Apple is spot on.

-- 
James Peach | jor...@gmail.com
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Time capsule and bad smb

2009-02-18 Thread James Peach
2009/2/18 Pietro Battiston too...@email.it:
 Il giorno lun, 16/02/2009 alle 21.42 -0800, James Peach ha scritto:

 Pietro should to http://developer.apple.com/bugreporter/ and log a
 bug against the TIme Capsule. It would be best to attach a packet
 trace to the bug. Follow the instructions here:

 http://wiki.samba.org/index.php/Capture_Packets

 To report a bug I had to give my home address among a lot of other
 personal data. Apple will certainly send me home a flowers bouquet to
 thank for my contribution. So nice.

 Anyway, done, Bug ID # 6598363.

Cool!


 Thank you everyone for the help.

Looks like the Time Capsule is sending an incorrect word count field
in the logoff response. Thanks for taking the time to send a trace.

-- 
James Peach | jor...@gmail.com
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Time capsule and bad smb

2009-02-17 Thread James Peach
2009/2/16 Jeremy Allison j...@samba.org:
 On Mon, Feb 16, 2009 at 09:42:48PM -0800, James Peach wrote:

 Volker's suggestion is the best.

 Pietro should to http://developer.apple.com/bugreporter/ and log a
 bug against the TIme Capsule. It would be best to attach a packet
 trace to the bug. Follow the instructions here:

 http://wiki.samba.org/index.php/Capture_Packets

 Boo, hiss, cop-out :-).

 I'll try and dig up a time capsule to bring to Connectathon next week
 if any of the Linux smbfs folks would like to test against it ...

 Sure, I'll be there and I'd love to take a look at it.
 Will there be any Time Capsule engineers there though
 if we do find bugs ?

No, but if you do the testing, I'll write up the bugs for you

-- 
James Peach | jor...@gmail.com
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba+acl problem on OSX

2009-02-17 Thread James Peach
2009/2/17 Eero Volotinen eero.voloti...@iki.fi:
 I have problem using samba+acl (ext3+acl) on OSX client.

 Access rights works fine on Linux and Windows series, but OSX Leopard says
 access denied to every directory that is using acl.

 Is OSX cifs client too stripped that it cannot use acl or is this OSX bug?
 Is there any solution on OSX that can access samba+acl directories?

The Mac OS X client looks at the posix mode bits to preflight access
checks. you can disable this on the server side by setting unix
extensions = no

-- 
James Peach | jor...@gmail.com
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Time capsule and bad smb

2009-02-16 Thread James Peach
2009/2/16 Jeremy Allison j...@samba.org:
 On Mon, Feb 16, 2009 at 05:01:53PM +0100, Pietro Battiston wrote:
 Some update to the mail below: if I understand correctly, there are two
 different problems showing up:
 1) mount.cifs and the Time Capsule (I have no idea on which front the
 problem is) don't seem to be able to handshake correctly if the share
 name contains whitespaces. I didn't notice at first glance, but then found
 some no such share errors in dmesg - not reported as output of the
 command. Then I tried to change the share name (on the Time Capsule,
 obviously) to a single word and reconnect, and it worked (almost, keep
 reading).
 2) on some particular smb commands - please bear with me if what I say
 is somewhat imprecise - the Time Capsule sends back packets badly
 formatted (or that mount.cifs thinks are badly formatted). This happens,
 in particular:
 - for some packets that report an error, such as the no such share
 - for some packets during the unmount

 This is the reason why - as far as I can conjecture - though the
 handshaking failed because the name of the share could not be resolved,
 I didn't get a message about that: in the communication where the Time
 Capsule said hey, I don't have that share!, some packet was reported
 as incorrect and dropped.

 Notice that now it does mount immediately, but when I unmount it takes
 almost a minute, and in dmesg I get:

 [341279.777815] Bad SMB: : dump of 48 bytes of data at 0xcc482e00
 [341279.777836]  0027 424d53ff 0074 00018800 ' . . . � S M B
 t . . . . . . .
 [341279.777855]    
 2118 . . . . . . . . . . . . . . . !
 [341279.777873]  0096 ff03 0f00 6401a8c0 . . . . .
 � . . . . . . � � . d

 Googling, I found a very similar problem:
 https://bugzilla.redhat.com/show_bug.cgi?id=191112
 , in which case it was said to the reporter the server is buggy, go
 tell to the producer. Now, before trying, probably in vain, to talk
 with some Apple guy, I'd like to know the opinion of someone slightly
 more expert than me (I have used smb/cifs 5-6 times in all my life),
 also because my conjecture doesn't explain everything... in
 particular it's a mistery for me the fact that one of the two sites I
 linked in the former email claimed to have mounted successfully a Time
 Capsule with a share name containing whitespaces. I'll try to contact
 the writer of that page (notice that before trying changing the share name, 
 I had
 tried changing the Time Capsule firmware, installing all the 3 available
 versions with no luck, so the difference isn't there).

 In the meanwhile, any hint? I anyone connecting to a Time Capsule without
 problems?

 We have an Apple Samba Team member, James Peach. James, any ideas
 on what is going wrong here ?

Volker's suggestion is the best.

Pietro should to http://developer.apple.com/bugreporter/ and log a
bug against the TIme Capsule. It would be best to attach a packet
trace to the bug. Follow the instructions here:

http://wiki.samba.org/index.php/Capture_Packets

I'll try and dig up a time capsule to bring to Connectathon next week
if any of the Linux smbfs folks would like to test against it ...

-- 
James Peach | jor...@gmail.com
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] mac os 10.5.5 and symbolic link to www

2008-10-29 Thread James Peach
2008/10/29 Marc Fromm [EMAIL PROTECTED]:
(unix extensions = no)
 My smb.conf does not contain unix extensions option.

unix extensions = yes is the default that will be used if smb.conf
does not specify otherwise

 Is this a setting on the mac that I need to change?

you need to change it on the server

 If you want the server to follow the symlink instead, you have to turn off 
 unix extension support
 I'm not sure about the above comment. On the server I can follow the symbolic 
 link to the
 www directory, it only does not work when a Mac makes a samba connection and 
 on the
 Mac I try to go to the www directory.

Because the target of the symlink is a location on the server. When
the Mac client tries to resolve the symlink, it will try to access the
corresponding location on the client.

If you turn the unix extensions support off, then the server will
follow the symlink and the Mac will behave just like the Windows
clients



 -Original Message-
 From: James Peach [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, October 28, 2008 3:40 PM
 To: Marc Fromm
 Cc: samba@lists.samba.org
 Subject: Re: [Samba] mac os 10.5.5 and symbolic link to www

 2008/10/28 Marc Fromm [EMAIL PROTECTED]:
 We have a new server running Red Hat 5.2EL.
 Windows machines can samba to the linux server with no problems, including 
 symbolic links to the www directory.
 Our Mac OS 10.5.5 machines have a problem with symbolic links to the www 
 directory.
 On the Mac computers, the symbolic links show up as an alias that cannot be 
 followed.
 These same MAC computers can samba to the www directory via a symbolic link 
 on our Fedora Core 5 server.

 The Mac is almost certainly using the unix extensions to follow the
 symlink on the client side. If you want the server to follow the
 symlink instead, you have to turn off unix extension support (unix
 extensions = no).


 Since the www symbolic link works on a PC that sambas to the Red Hat server, 
 is this strictly a problem on the macs or is there a setting I need to 
 change in a conf file on the Red Hat server, since the same Macs can use the 
 symbolic link to the www directory on the Fedora server?

 Thanks

 Marc

 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/listinfo/samba




 --
 James Peach | [EMAIL PROTECTED]




-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] mac os 10.5.5 and symbolic link to www

2008-10-28 Thread James Peach
2008/10/28 Marc Fromm [EMAIL PROTECTED]:
 We have a new server running Red Hat 5.2EL.
 Windows machines can samba to the linux server with no problems, including 
 symbolic links to the www directory.
 Our Mac OS 10.5.5 machines have a problem with symbolic links to the www 
 directory.
 On the Mac computers, the symbolic links show up as an alias that cannot be 
 followed.
 These same MAC computers can samba to the www directory via a symbolic link 
 on our Fedora Core 5 server.

The Mac is almost certainly using the unix extensions to follow the
symlink on the client side. If you want the server to follow the
symlink instead, you have to turn off unix extension support (unix
extensions = no).


 Since the www symbolic link works on a PC that sambas to the Red Hat server, 
 is this strictly a problem on the macs or is there a setting I need to change 
 in a conf file on the Red Hat server, since the same Macs can use the 
 symbolic link to the www directory on the Fedora server?

 Thanks

 Marc

 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/listinfo/samba




-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Installing windows drivers into print$ on OS X 10.5 Leopard

2008-10-28 Thread James Peach
2008/10/26 Chris [EMAIL PROTECTED]:
 Has anyone had any success installing windows printer drivers onto a
 leopard-hosted print$ share?

 If I use the Add Printer Wizard method, if copies the driver files to
 \\SERVER\print$\W32X86 then fails with an Operation cannot be completed.

 If I use the rpcclient method I get a WERR_INVALID_PARAM error.  Using the
 Adobe Generic PostScript driver as an example.

 osxserver:W32X86 root# ls -l
 total 2832
 drwxrwxr-x  2 root  domainadmins  68 Oct 25 23:16 0
 drwxrwxr-x  2 root  domainadmins  68 Oct 25 23:16 2
 drwxrwxr-x  2 root  domainadmins  68 Oct 26 00:00 3
 -rw-r--r--  1 fred  domainadmins   13492 Oct 26 01:43 DEFPRTR2.PPD
 -rw-r--r--  1 fred  domainadmins  135248 Oct 26 01:43 PS5UI.DLL
 -rw-r--r--  1 fred  domainadmins   26056 Oct 26 01:43 PSCRIPT.HLP
 -rw-r--r--  1 fred  domainadmins  792644 Oct 26 01:43 PSCRIPT.NTF
 -rw-r--r--  1 fred  domainadmins  470608 Oct 26 01:43 PSCRIPT5.DLL

 osxserver:W32X86 root# rpcclient localhost -d3 -Ufred%password -c 'adddriver
 Windows NT x86
 genericps:PSCRIPT5.DLL:DEFPRTR2.PPD:PS5UI.DLL:PSCRIPT.HLP:NULL:RAW:PSCRIPT.NTF'
 added interface ip=192.168.223.13 bcast=192.168.223.255 nmask=255.255.255.0
 lp_load: refreshing parameters
 Initialising global parameters
 params.c:pm_process() - Processing configuration file
 /private/etc/smb.conf
 Processing section [global]
 params.c:pm_process() - Processing configuration file /var/db/smb.conf
 Processing section [global]
 Processing section [global]
 Connecting to host=localhost
 Connecting to 127.0.0.1 at port 445
 Doing spnego session setup (blob length=126)
 got OID=1 2 840 113554 1 2 2
 got OID=1 2 840 48018 1 2 2
 got OID=1 3 6 1 4 1 311 2 2 10
 got principal=cifs/[EMAIL PROTECTED]
 Got challenge flags:
 Got NTLMSSP neg_flags=0x40898215
 NTLMSSP: Set final flags:
 Got NTLMSSP neg_flags=0x40088215
 NTLMSSP Sign/Seal - Initialising with flags:
 Got NTLMSSP neg_flags=0x40088215
 rpc_pipe_bind: Remote machine localhost pipe \lsarpc fnum 0x7400 bind
 request returned ok.
 lsa_io_sec_qos: length c does not match size 8
 rpc_pipe_bind: Remote machine localhost pipe \spoolss fnum 0x7401 bind
 request returned ok.
 result was WERR_INVALID_PARAM

I believe that this problem is because the Darwin VFS doesn't
implement the read operation, only the pread operation. You should be
able to work around this by temporarily commenting out the vfs
objects line in /etc/smb.conf while you do the printer setup.



 smb.log shows this:
  osxserver (127.0.0.1) connect to service print$ initially as user fred
 (uid=1025, gid=20) (pid 36350)
 [2008/10/26 02:01:50, 2, pid=36350]
 /SourceCache/samba/samba-187.8/samba/source/smbd/open.c:open_file(391)
  fred opened file W32X86/PSCRIPT5.DLL read=Yes write=No (numopen=1)
 [2008/10/26 02:01:50, 2, pid=36350]
 /SourceCache/samba/samba-187.8/samba/source/smbd/close.c:close_normal_file(399)
  fred closed file W32X86/PSCRIPT5.DLL (numopen=0) NT_STATUS_OK
 [2008/10/26 02:01:50, 1, pid=36350]
 /SourceCache/samba/samba-187.8/samba/source/smbd/service.c:close_cnum(1284)
  osxserver (127.0.0.1) closed connection to service print$

 User fred is a member of Admins and Domain Admins and I have explicitly
 added SePrintOperatorPrivilege to EXAMPLE\Domain Admins (it didn't help.)

 This used to work great on 10.4...

 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/listinfo/samba




-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] mac os 10.5.5 and symbolic link to www

2008-10-28 Thread James Peach
2008/10/28 Kyle [EMAIL PROTECTED]:

 Can some one clarify that statement a little more for the hard at learning
 please? Do you mean the MAC is using the SAMBA symlink and attempting to
 follow it to a location on its local disk?

Yes. Because Windows clients do not understand the SMB protocol
extension the Mac uses in this case, the server follows the symlink on
their behalf (to a location on the server's disk).


 The Mac is almost certainly using the unix extensions to follow the symlink
 on the client side. If you want the server to follow the symlink instead,
 you have to turn off unix extension support (unix extensions = no).

 
 Kind Regards

 Kyle



 James Peach wrote:

 2008/10/28 Marc Fromm [EMAIL PROTECTED]:


 We have a new server running Red Hat 5.2EL.
 Windows machines can samba to the linux server with no problems,
 including symbolic links to the www directory.
 Our Mac OS 10.5.5 machines have a problem with symbolic links to the www
 directory.
 On the Mac computers, the symbolic links show up as an alias that cannot
 be followed.
 These same MAC computers can samba to the www directory via a symbolic
 link on our Fedora Core 5 server.


 The Mac is almost certainly using the unix extensions to follow the
 symlink on the client side. If you want the server to follow the
 symlink instead, you have to turn off unix extension support (unix
 extensions = no).




 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/listinfo/samba




-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] smbd

2008-10-24 Thread James Peach
2008/10/23 vishesh [EMAIL PROTECTED]:
 dear all
  When samba running, i issued command to list process using ps -C smbd  list
 more than one process.
 I have following queries regarding this
 how one can determine how many smbd process run?
 Is there any way to determine which smbd process link with which share
 session?

The smbstatus command will tell you this

-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] strang locking behaviour with macosx clients

2008-09-30 Thread James Peach
2008/9/30 Holger Hegmanns [EMAIL PROTECTED]:
 On Mon, Sep 29, 2008 at 08:45:40PM -0700, James Peach wrote:
 2008/9/29 Holger Hegmanns [EMAIL PROTECTED]:
  The only debug information I have is the output of smbstatus. The column
  DenyMode looks totally different if a mac or a windows client opens
  the same file.
 
  A *windows* client opens a file:
  [...]
  Locked files:
  Pid  UidDenyMode   Access  R/WOplock
SharePath   Name   Time
  --
  19919501DENY_ALL   0x2019f RDWR
  EXCLUSIVE+BATCH  /data0/prod   ~test~0kjyv(.idlk   Tue Sep 30 00:50:24 2008
  19919501DENY_WRITE 0x20089 RDONLY
  EXCLUSIVE+BATCH  /data0/prod   test.indd   Tue Sep 30 00:50:24 2008
 
  A *mac* client opens a file:
  [...]
  Locked files:
  Pid  UidDenyMode   Access  R/WOplock
SharePath   Name   Time
  --
  19564501DENY_NONE  0x20007 RDWR   NONE
/data0/prod   ~test~0kjyv(.idlk   Tue Sep 30 00:51:43 2008
  19564501DENY_NONE  0x20001 RDONLY NONE
/data0/prod   test.indd   Tue Sep 30 00:51:43 2008
 
  Believe it or not, but generally windows denies the opening of a file
  that is already opened on a mac.

 It's the client's choice which kind of deny mode to use. If the OS X
 application is happy to use DENY_NONE, then presumably that's correct
 for that usage. There's no bug here and nothing you can do on the
 server to alter this behaviour.

 Thanks for your help, James. But who is responsible for the lock of this
 file? The application (Indesign by the example above)? Only with the
 existence of the .idlk file?

The application is 100% responsible for locking. There's nothing in
the protocol or the server that can override the application's choice
of locking strategy.

 Isn't it horrible?

I guess that depends on your point of view :)

 What's about that scenario:
 The Mac opens the file and it takes some time to create the .idlk file.
 Than there is no lock at all, not even an application based.

If InDesign doesn't take a lock, then there's no lock.

-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] OSX client, Linux server, permissions problem

2008-09-29 Thread James Peach
2008/9/29 Brian Gregorcy [EMAIL PROTECTED]:


 barsalou wrote:

 I've been using samba for some time and have always had a good experience.

 I decided to try and configure my home network to let all my computers
 talk to the samba share.

 I'm stuck on one part where my OSX client, when creating new
 files/directories, won't create them writeable by the group.

 I've tried what seems like every combination of directory mask, force
 directory mode, etc. but I'm unable to get the OSX client to create folders
 with 770 permissions on any newly created folders.

 What I'd like to do is find a way to see all the permission's that are
 getting applied to that directory when it is getting created.

 This isn't a production box, so I'm willing to try anything at the moment.

 The good news is that it does create new files and folders...just that
 other users can't modify them.

 I do have logging turned up, but do not know what I should be looking for.

 Scenario:

 Client - OSX 10.5
 Server - Ubuntu 7.04, XFS mounted /home, Samba 3.026a


 Share section of smb.conf

 [shared]
 path = /home/shared
 available = yes
 browseable = yes
 writable = yes
 create mask = 02770
 directory mask = 02770
 force group = +shared


 Testparm results (shared section)
 [shared]
path = /home/shared
force group = +shared
read only = No

 Hope I didn't forget anything.




 I know this doesn't help but we are seeing the same problem, I opened a bug
 with apple but so far have not heard anything back.  I also sent this email
 to this list awhile back and did not get a response, the copy of the email I
 sent is below.

You might be seeing the SMB unix extensions in action. In 10.5, the OS
X SMB filesystem was taught to understand some SMB protocol extensions
designed for unix system. what *might* be happening here is that the
client is resetting the permissions after Samba applies the
configuration mode masks.

You should be able to verify this by packet sniffing or setting unix
extensions = no on the server.

-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] OSX client, Linux server, permissions problem

2008-09-29 Thread James Peach
2008/9/29 Brian Gregorcy [EMAIL PROTECTED]:
 You might be seeing the SMB unix extensions in action. In 10.5, the OS
 X SMB filesystem was taught to understand some SMB protocol extensions
 designed for unix system. what *might* be happening here is that the
 client is resetting the permissions after Samba applies the
 configuration mode masks.

 You should be able to verify this by packet sniffing or setting unix
 extensions = no on the server.


 That worked for me :)

 Thanks I have been looking for that for awhile now, is there any downside to
 disabling unix extensions?

The client will behave as though it is talking to a windows box, so
unix modes will be best-effort and symlinks will be resolved on the
server side rather than on the client side.

-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] strang locking behaviour with macosx clients

2008-09-29 Thread James Peach
2008/9/29 Holger Hegmanns [EMAIL PROTECTED]:
 I'm running a samba pdc on my gentoo box in a mixed environment with a
 couple of Windows XP clients and only a few MacOSX clients. The users
 told me, the file locking across the platforms does not work properly
 sometimes.

 I tried to google my problem, but without luck. I switched all the flags
 related the lock mechanism of samba on and off, but the problem seems to
 be solved yet.

 The only debug information I have is the output of smbstatus. The column
 DenyMode looks totally different if a mac or a windows client opens
 the same file.

 A *windows* client opens a file:
 [...]
 Locked files:
 Pid  UidDenyMode   Access  R/WOplock
   SharePath   Name   Time
 --
 19919501DENY_ALL   0x2019f RDWR
 EXCLUSIVE+BATCH  /data0/prod   ~test~0kjyv(.idlk   Tue Sep 30 00:50:24 2008
 19919501DENY_WRITE 0x20089 RDONLY
 EXCLUSIVE+BATCH  /data0/prod   test.indd   Tue Sep 30 00:50:24 2008

 A *mac* client opens a file:
 [...]
 Locked files:
 Pid  UidDenyMode   Access  R/WOplock
   SharePath   Name   Time
 --
 19564501DENY_NONE  0x20007 RDWR   NONE
   /data0/prod   ~test~0kjyv(.idlk   Tue Sep 30 00:51:43 2008
 19564501DENY_NONE  0x20001 RDONLY NONE
   /data0/prod   test.indd   Tue Sep 30 00:51:43 2008

 Believe it or not, but generally windows denies the opening of a file
 that is already opened on a mac.

It's the client's choice which kind of deny mode to use. If the OS X
application is happy to use DENY_NONE, then presumably that's correct
for that usage. There's no bug here and nothing you can do on the
server to alter this behaviour.

-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] odd mac situation

2008-09-24 Thread James Peach
2008/9/11 Mike Eggleston [EMAIL PROTECTED]:
 Morning,

 This is somewhat off topic. I've not thought of a better place to ask
 than here.

 I have a user on a Macbook (Mac OS X 10.5, Leopard) with Microsoft Office
 2008 for the mac and Parallels running an image of Microsoft Windows XP
 Pro with Microsoft Office 2007. Inside Parallels and XP Pro the user can
 open a spreadsheet shared from a Windows Server 2003 box, and yet the
 user gets an error (read only, etc) when opening the same spreadsheet
 shared from the same server on the pure mac side in Microsoft Office 2008.

 Any idea what might be going on. The user is using a domain account from
 a samba PDC (ha, there's the samba reference) and I find no entries in
 the Event Viewer on the Windows 2003 server.

You should check that the Mac user is getting the authentication they
expect. Maybe they accidentally got connected as the guest user? I
expect that you could verify this from the Windows serve console.

-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] the field ttl in struct referral doesn't work

2008-08-31 Thread James Peach
2008/8/31 dengke [EMAIL PROTECTED]:




 In samba source code, the file source\include\msdfs.h defines a struct named
 referral.In this struct, there is a field named ttl which is used to decide 
 how long
 should client cache referral, and this field uses constant 
 REFERRAL_TTL(#define
 REFERRAL_TTL 600) as default.My problem is when i set REFERRAL_TTL to be
 10, it doesn't work.

I used this a couple of years ago with Win2K clients and it worked
fine. What makes you think it's not working?

-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] nmbd Hogging CPU on Mac OSX (10.5.4)

2008-08-24 Thread James Peach
2008/8/21 Mark Jackson [EMAIL PROTECTED]:
 Hi All,

 Firstly, I know this is a MacOS X issue and not sure if you guys can help,
 but I'm really hoping you can since I don't appear to be getting any joy
 elsewhere.

 Running OSX 10.5.4 and recently (last week) nmbd is hogging the CPU. I know
 this is a part of the Samba server on OSX, hence the post to this mail-list.

 When I disconnect from the network, nmbd goes away and doesn't hog the CPU.
 Reconnect, within a minute it comes back. Happens on both Wired and Wireless
 connections. I don't have filesharing enabled within OSX.

 Checked the logs in /var/logs/samba/log.nmbd and the last entries are below.

 My Mac is on my corporate network which is 99% Windows, if that matters...?

 Any thoughts or comments appreciated as this is getting quite frustrating
 now.

 Thanks,
 Mark

 [2008/08/21 09:09:28, 0, pid=118]
 /SourceCache/samba/samba-187.4/samba/source/lib/util_tdb.c:tdb_log(662)
  tdb(/private/var/samba/gencache.tdb): tdb_rec_read bad magic 0xd9fee666 at
 offset=2592
 [2008/08/21 09:09:33, 0, pid=118]
 /SourceCache/samba/samba-187.4/samba/source/lib/util_tdb.c:tdb_log(662)
  tdb(/private/var/samba/gencache.tdb): tdb_rec_read bad magic 0xd9fee666 at
 offset=2592
 [2008/08/21 09:09:33, 0, pid=118]
 /SourceCache/samba/samba-187.4/samba/source/lib/util_tdb.c:tdb_log(662)
  tdb(/private/var/samba/gencache.tdb): tdb_rec_read bad magic 0xd9fee666 at
 offset=2592
 [2008/08/21 09:09:33, 0, pid=118]
 /SourceCache/samba/samba-187.4/samba/source/lib/util_tdb.c:tdb_log(662)
  tdb(/private/var/samba/gencache.tdb): tdb_rec_read bad magic 0xd9fee666 at
 offset=2592
 [2008/08/21 09:09:34, 0, pid=118]
 /SourceCache/samba/samba-187.4/samba/source/nmbd/nmbd_browsesync.c:find_domain_master_name_query_fail(351)
  find_domain_master_name_query_fail:
  Unable to find the Domain Master Browser name WORKGROUP1b for the
 workgroup WORKGROUP.
  Unable to sync browse lists in this workgroup.
 [2008/08/21 09:09:34, 0, pid=118]
 /SourceCache/samba/samba-187.4/samba/source/nmbd/nmbd_browsesync.c:find_domain_master_name_query_fail(351)
  find_domain_master_name_query_fail:
  Unable to find the Domain Master Browser name WORKGROUP1b for the
 workgroup WORKGROUP.
  Unable to sync browse lists in this workgroup.
 [2008/08/21 09:24:43, 0, pid=118]
 /SourceCache/samba/samba-187.4/samba/source/nmbd/nmbd_browsesync.c:find_domain_master_name_query_fail(351)
  find_domain_master_name_query_fail:
  Unable to find the Domain Master Browser name WORKGROUP1b for the
 workgroup WORKGROUP.
  Unable to sync browse lists in this workgroup.
 [2008/08/21 09:24:43, 0, pid=118]
 /SourceCache/samba/samba-187.4/samba/source/nmbd/nmbd_browsesync.c:find_domain_master_name_query_fail(351)
  find_domain_master_name_query_fail:
  Unable to find the Domain Master Browser name WORKGROUP1b for the
 workgroup WORKGROUP.
  Unable to sync browse lists in this workgroup.
 [2008/08/21 09:29:54, 0, pid=118]
 /SourceCache/samba/samba-187.4/samba/source/lib/util_tdb.c:tdb_log(662)
  tdb(/private/var/samba/gencache.tdb): remove_from_freelist: not on list at
 off=8736
 [2008/08/21 09:29:54, 0, pid=118]
 /SourceCache/samba/samba-187.4/samba/source/lib/util_tdb.c:tdb_log(662)
  tdb(/private/var/samba/gencache.tdb): tdb_free: left free failed at 8736

gencache.tdb is corrupt, delete /var/samba/gencache.tdb.

-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Leopard Macs using Kerberos: Failed to parse negTokenTarg

2008-08-05 Thread James Peach
Realm: SU.WIN.STANFORD.EDU
Server Name (Principal): cifs/sesfs.stanford.edu
Name-type: Principal (1)
Name: cifs
Name: sesfs.stanford.edu
enc-part rc4-hmac
Encryption type: rc4-hmac (23)
Kvno: 2
enc-part: 24F85A3983BE0989B20CC51F...
Authenticator des-cbc-md5
Encryption type: des-cbc-md5 (3)
Authenticator data: ADB975580F588B675C...
Native OS: MacOSX
Native LAN Manager: NETSMB

 Finally, here's the dump of the successful packet (Reassembled TCP (2431
 bytes)). As before, the security blob starts at byte 0x3f, but in this
 packet, at byte 0x62 (the 36th byte of the security blob), we have a byte of
 0xa2, like the parser is expecting.

   00 00 09 7b ff 53 4d 42 73 00 00 00 00 08 01 48   ...{.SMBs..H
 0010  00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00   
 0020  00 00 01 00 0c ff 00 00 00 04 41 32 00 02 00 58   ..A2...X
 0030  4b 00 00 32 09 00 00 00 00 4c 00 00 80 40 09 60   [EMAIL PROTECTED]
 0040  82 09 2e 06 06 2b 06 01 05 05 02 a0 82 09 22 30   .+0
 0050  82 09 1e a0 0d 30 0b 06 09 2a 86 48 82 f7 12 01   .0...*.H
 0060  02 02 a2 82 09 0b 04 82 09 07 60 82 09 03 06 09   ..`.
 0070  2a 86 48 86 f7 12 01 02 02 01 00 6e 82 08 f2 30   *.Hn...0
 0080  82 08 ee a0 03 02 01 05 a1 03 02 01 0e a2 07 03   
 0090  05 00 00 00 00 00 a3 82 08 46 61 82 08 42 30 82   .Fa..B0.
 00a0  08 3e a0 03 02 01 05 a1 15 1b 13 53 55 2e 57 49   ..SU.WI
 00b0  4e 2e 53 54 41 4e 46 4f 52 44 2e 45 44 55 a2 25   N.STANFORD.EDU.%
 00c0  30 23 a0 03 02 01 01 a1 1c 30 1a 1b 04 63 69 66   0#...0...cif
 00d0  73 1b 12 73 65 73 66 73 2e 73 74 61 6e 66 6f 72   s..sesfs.stanfor
 00e0  64 2e 65 64 75 a3 82 07 f7 30 82 07 f3 a0 03 02   d.edu0..
  snip

 I've posted the full text of the log files and packet displays on the web
 at:

http://www.stanford.edu/~lanz/leopard-samba/

 Does this analysis look correct?

yes

 And if so, is this something that can be patched in Samba?

Fixed in Samba 3.2 ..

http://git.samba.org/?p=samba.git;a=commit;h=59a2bcf30fef14ecc826271862b645dd3a61cb48



-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] oplocks OS X

2008-07-30 Thread James Peach
2008/7/30 Aquaserver [EMAIL PROTECTED]:
 Hello
 I enable oplocks on samba server and testparm send me no error.
 But when 2 users open the same file there is nothing like File in Use (i
 have seen this on a forum).
 All client use OS X, normally samba works fine on it.

oplocks aren't locks in the sense of you have one and I don't get
access. they are a permission to cache. If an application holds an
oplock on a file, that will not prevent another application opening
the same file.

-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] [Slightly OT] Mac and Samba

2008-05-21 Thread James Peach
2008/5/21 Rubin Bennett [EMAIL PROTECTED]:
 Hello all...
 I have a question that is outside the realm of my experience but that
 has come up several times recently.

 I have a mixed network (some Macs, some PCs) that needs a server.  I'm
 going through the standard process of deciding between Samba and a
 Windows domain controller, my strong preference being to install
 Linux/Samba server.

The Mac won't join to a Samba (NT4-style) domain, only to an Active
Directory domain.

 The sticking point seems to be that the Mac users
 need to be able to run Access and Quickbooks, recent versions, neither
 of which are ported to the Mac as I understand it.

You could run these under Parallels or VMware Fusion.


 So my question is this:  When faced with this situation, what do folks
 out there do?  Install a Terminal server of some flavor (out of reach
 for this tiny non-profit)?  Or is there some simple thing I could do
 that would bridge the gap in a cost effective and reasonably easy to
 administer way?

 Thanks very much in advance,
 Rubin
 --
 Rubin Bennett
 RB Technologies
 http://thatitguy.com
 [EMAIL PROTECTED]
 (802)223-4448

 They that can give up essential liberty to obtain a little
 temporary security deserve neither liberty nor safety
  --Benjamin Franklin, Historical Review of Pennsylvania, 1759


 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/listinfo/samba




-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha3-1647-gea3f4b9

2008-05-20 Thread James Peach
The branch, v4-0-test has been updated
   via  ea3f4b93057e85c4ea516cc77dd0f293016d520c (commit)
  from  f72dc52ccc426c8057b91b4699dfeda7d9e9b864 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -
commit ea3f4b93057e85c4ea516cc77dd0f293016d520c
Author: James Peach [EMAIL PROTECTED]
Date:   Tue May 20 10:54:45 2008 -0700

smbtorture: Add RAW-BENCH-TCON benchmark.

Add a simple test to benchmark the rate at which a server can accept
new tree connections. You can tune the length of time to run the
benchmark for and the number of parallel connections to make.

---

Summary of changes:
 source/lib/util/time.c|2 +-
 source/lib/util/time.h|2 +-
 source/torture/config.mk  |1 +
 source/torture/raw/raw.c  |2 +
 source/torture/raw/tconrate.c |  201 +
 5 files changed, 206 insertions(+), 2 deletions(-)
 create mode 100644 source/torture/raw/tconrate.c


Changeset truncated at 500 lines:

diff --git a/source/lib/util/time.c b/source/lib/util/time.c
index a181885..978d73c 100644
--- a/source/lib/util/time.c
+++ b/source/lib/util/time.c
@@ -376,7 +376,7 @@ _PUBLIC_ NTTIME pull_nttime(uint8_t *base, uint16_t offset)
 /**
   return (tv1 - tv2) in microseconds
 */
-_PUBLIC_ int64_t usec_time_diff(struct timeval *tv1, struct timeval *tv2)
+_PUBLIC_ int64_t usec_time_diff(const struct timeval *tv1, const struct 
timeval *tv2)
 {
int64_t sec_diff = tv1-tv_sec - tv2-tv_sec;
return (sec_diff * 100) + (int64_t)(tv1-tv_usec - tv2-tv_usec);
diff --git a/source/lib/util/time.h b/source/lib/util/time.h
index 1ab976c..e4008c5 100644
--- a/source/lib/util/time.h
+++ b/source/lib/util/time.h
@@ -127,7 +127,7 @@ _PUBLIC_ NTTIME nttime_from_string(const char *s);
 /**
   return (tv1 - tv2) in microseconds
 */
-_PUBLIC_ int64_t usec_time_diff(struct timeval *tv1, struct timeval *tv2);
+_PUBLIC_ int64_t usec_time_diff(const struct timeval *tv1, const struct 
timeval *tv2);
 
 /**
   return a zero timeval
diff --git a/source/torture/config.mk b/source/torture/config.mk
index e82cb45..2857b99 100644
--- a/source/torture/config.mk
+++ b/source/torture/config.mk
@@ -70,6 +70,7 @@ TORTURE_RAW_OBJ_FILES = $(addprefix $(torturesrcdir)/raw/, \
pingpong.o \
lockbench.o \
lookuprate.o \
+   tconrate.o \
openbench.o \
rename.o \
eas.o \
diff --git a/source/torture/raw/raw.c b/source/torture/raw/raw.c
index c613308..0a7fc3e 100644
--- a/source/torture/raw/raw.c
+++ b/source/torture/raw/raw.c
@@ -35,6 +35,8 @@ NTSTATUS torture_raw_init(void)
torture_suite_add_simple_test(suite, BENCH-OPEN, torture_bench_open);
torture_suite_add_simple_test(suite, BENCH-LOOKUP,
torture_bench_lookup);
+   torture_suite_add_simple_test(suite, BENCH-TCON,
+   torture_bench_treeconnect);
torture_suite_add_simple_test(suite, OFFLINE, torture_test_offline);
torture_suite_add_1smb_test(suite, QFSINFO, torture_raw_qfsinfo);
torture_suite_add_1smb_test(suite, QFILEINFO, torture_raw_qfileinfo);
diff --git a/source/torture/raw/tconrate.c b/source/torture/raw/tconrate.c
new file mode 100644
index 000..6f0ba0d
--- /dev/null
+++ b/source/torture/raw/tconrate.c
@@ -0,0 +1,201 @@
+/*
+   SMB tree connection rate test
+
+   Copyright (C) 2006-2007 James Peach
+
+   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
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see http://www.gnu.org/licenses/.
+*/
+
+#include includes.h
+#include libcli/libcli.h
+#include libcli/resolve/resolve.h
+#include torture/smbtorture.h
+#include lib/cmdline/popt_common.h
+#include param/param.h
+
+#include system/filesys.h
+#include system/shmem.h
+
+#define TIME_LIMIT_SECS 30
+#define usec_to_sec(s) ((s) / 100)
+#define sec_to_usec(s) ((s) * 100)
+
+/* Map a shared memory buffer of at least nelem counters. */
+static void * map_count_buffer(unsigned nelem, size_t elemsz)
+{
+   void * buf;
+   size_t bufsz;
+   size_t pagesz = getpagesize();
+
+   bufsz = nelem * elemsz;
+   bufsz = (bufsz + pagesz) % pagesz; /* round up to pagesz */
+
+#ifdef MAP_ANON
+   /* BSD */
+   buf = mmap(NULL, bufsz, PROT_READ

[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha3-277-g8a8449c

2008-04-23 Thread James Peach
The branch, v4-0-test has been updated
   via  8a8449c95336d8019e9105fba6ef09473aae813b (commit)
  from  0c59b39ad8edcaf9f06a2d1393e11e06e4b2f18f (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -
commit 8a8449c95336d8019e9105fba6ef09473aae813b
Author: James Peach [EMAIL PROTECTED]
Date:   Wed Apr 23 11:26:38 2008 -0700

testsuite: skip RAW-BENCH-LOOKUP by default.

---

Summary of changes:
 source/samba4-skip |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/samba4-skip b/source/samba4-skip
index 8d86cdb..4ac35a3 100644
--- a/source/samba4-skip
+++ b/source/samba4-skip
@@ -4,6 +4,7 @@ base.iometer
 base.casetable
 base.nttrans
 .*base.bench.holdcon.* # Very slow
+raw.bench.lookup   # Very slow
 base.scan.maxfid
 raw.hold.oplock# Not a test, but a way to block other clients 
for a test
 raw.ping.pong  # Needs second server to test


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-1042-ga51cb3c

2008-04-21 Thread James Peach
The branch, v3-2-test has been updated
   via  a51cb3c1a9549d74c1e5cf05bc43b955af1a25b7 (commit)
   via  831a09ae25e98eacc0b0be5390d3ac3aa671a8a5 (commit)
   via  4244be792eeb69e883a1ece013b62fe6941086f2 (commit)
   via  b294b2055a422e1af59e3b6843b84750b6786d99 (commit)
   via  8eff35bc4acc13807c895af43b52db79ee195cb5 (commit)
   via  8c12c5cea01d9b801fe80c2a87b8139c488a62a5 (commit)
  from  87232351b5e66728f8d602259961909e8c1dfcb6 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit a51cb3c1a9549d74c1e5cf05bc43b955af1a25b7
Author: James Peach [EMAIL PROTECTED]
Date:   Mon Apr 21 11:19:22 2008 -0700

smbspool: Fix the smbspool build.

commit 831a09ae25e98eacc0b0be5390d3ac3aa671a8a5
Author: James Peach [EMAIL PROTECTED]
Date:   Mon Apr 21 10:57:09 2008 -0700

smbspool: minor formatting cleanups.

commit 4244be792eeb69e883a1ece013b62fe6941086f2
Author: James Peach [EMAIL PROTECTED]
Date:   Mon Apr 21 10:10:29 2008 -0700

smbspool: Run indent to approximate conding standards.

commit b294b2055a422e1af59e3b6843b84750b6786d99
Author: James Peach [EMAIL PROTECTED]
Date:   Mon Apr 21 09:29:07 2008 -0700

smbspool: add my copyright.

commit 8eff35bc4acc13807c895af43b52db79ee195cb5
Author: Mike Sweet [EMAIL PROTECTED]
Date:   Mon Apr 21 09:19:51 2008 -0700

smbspool: Fix CUPS authentication protocol support.

There were a couple of places where we weren't checking for
authentication correctly. This chance fixes those places and properly
supports Kerberos where available.

commit 8c12c5cea01d9b801fe80c2a87b8139c488a62a5
Author: Mike Sweet [EMAIL PROTECTED]
Date:   Mon Apr 21 09:16:01 2008 -0700

smbspool: fix Kerberos support for CUPS 1.3.

To summarize the changes, the patches remove the old (probably non-
working) Kerberos support code which is unnecessary with CUPS 1.3
and adds some checks on the NT status we get back to see whether
the connection error is related to authentication.  If so, we send
the ATTR: message to tell CUPS we need a username and password and
return exit code 2 so cupsd will do the right thing.

AUTH_USERNAME, AUTH_PASSWORD, and KRB5CCNAME are set and supported
by CUPS 1.3.  The new exit code is supported by CUPS 1.2.x and 1.3,
and it treated as a general failure in CUPS 1.1.  The ATTR: message
is only supported by CUPS 1.3, while CUPS 1.2 will assume the
username,password value we are setting.

The current code only uses the AUTH_* env vars if they are set.
If not, we fall back to the previous behavior.

I really can't tell whether the Kerberos code that was in there
would work at all. It did not work for Mac OS X which is why
I dropped it.

---

Summary of changes:
 source/client/smbspool.c | 1104 +++---
 1 files changed, 545 insertions(+), 559 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/smbspool.c b/source/client/smbspool.c
index e827df4..ed5fc69 100644
--- a/source/client/smbspool.c
+++ b/source/client/smbspool.c
@@ -1,33 +1,47 @@
-/* 
+/*
Unix SMB/CIFS implementation.
SMB backend for the Common UNIX Printing System (CUPS)
-   Copyright 1999 by Easy Software Products
-   Copyright Andrew Tridgell 1994-1998
-   Copyright Andrew Bartlett 2002
-   Copyright Rodrigo Fernandez-Vizarra 2005 
-   
+
+   Copyright (C) Easy Software Products1999
+   Copyright (C) Andrew Tridgell   1994-1998
+   Copyright (C) Andrew Bartlett   2002
+   Copyright (C) Rodrigo Fernandez-Vizarra  2005
+   Copyright (C) James Peach   2008
+
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
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-   
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
-   
+
You should have received a copy of the GNU General Public License
along with this program.  If not, see http://www.gnu.org/licenses/.
 */
 
 #include includes.h
 
-#define TICKET_CC_DIR/tmp
-#define CC_PREFIXkrb5cc_ /* prefix of the ticket cache */
-#define CC_MAX_FILE_LEN  24   
-#define CC_MAX_FILE_PATH_LEN (sizeof(TICKET_CC_DIR)-1)+ CC_MAX_FILE_LEN+2  
 
-#define OVERWRITE1   
-#define KRB5CCNAME   KRB5CCNAME
+/*
+ * Starting with CUPS 1.3, Kerberos support is provided by cupsd including
+ * the forwarding of user credentials via the authenticated session between

[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha3-265-gca7e4d9

2008-04-21 Thread James Peach
The branch, v4-0-test has been updated
   via  ca7e4d9166a7cb10495cf3ecd9c4e72103fbec30 (commit)
  from  8fa23fac516dbf4c8245c1d009e81f02a6341775 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -
commit ca7e4d9166a7cb10495cf3ecd9c4e72103fbec30
Author: James Peach [EMAIL PROTECTED]
Date:   Mon Apr 21 15:09:43 2008 -0700

smbtorture: Add RAW-BENCH-LOOKUP micro-benchmark.

This test samples the lookup rate for a non-existant filename in a
directory, while varying the number of files in the directory. The
lookup rate should continue to approximate the lookup rate for the
empty directory case.

---

Summary of changes:
 source/torture/config.mk|1 +
 source/torture/raw/lookuprate.c |  319 +++
 source/torture/raw/raw.c|2 +
 3 files changed, 322 insertions(+), 0 deletions(-)
 create mode 100644 source/torture/raw/lookuprate.c


Changeset truncated at 500 lines:

diff --git a/source/torture/config.mk b/source/torture/config.mk
index 2f3fa38..1565797 100644
--- a/source/torture/config.mk
+++ b/source/torture/config.mk
@@ -86,6 +86,7 @@ TORTURE_RAW_OBJ_FILES = $(addprefix torture/raw/, \
lock.o \
pingpong.o \
lockbench.o \
+   lookuprate.o \
openbench.o \
rename.o \
eas.o \
diff --git a/source/torture/raw/lookuprate.c b/source/torture/raw/lookuprate.c
new file mode 100644
index 000..4b505dc
--- /dev/null
+++ b/source/torture/raw/lookuprate.c
@@ -0,0 +1,319 @@
+/*
+   File lookup rate test.
+
+   Copyright (C) James Peach 2006
+
+   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
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see http://www.gnu.org/licenses/.
+*/
+
+#include includes.h
+#include param/param.h
+#include system/filesys.h
+#include torture/torture.h
+#include torture/basic/proto.h
+#include libcli/libcli.h
+#include lib/cmdline/popt_common.h
+#include auth/credentials/credentials.h
+
+#define BASEDIR \\lookuprate
+#define MISSINGNAME BASEDIR \\foo
+
+#define FUZZ_PERCENT 10
+
+#define usec_to_sec(s) ((s) / 100)
+#define sec_to_usec(s) ((s) * 100)
+
+struct rate_record
+{
+unsigned   dirent_count;
+unsigned   querypath_persec;
+unsigned   findfirst_persec;
+};
+
+static struct rate_record records[] =
+{
+{ 0, 0, 0 },   /* Base (optimal) lookup rate. */
+{ 100, 0, 0},
+{ 1000, 0, 0},
+{ 1, 0, 0},
+{ 10, 0, 0}
+};
+
+typedef NTSTATUS lookup_function(struct smbcli_tree *tree, const char * path);
+
+/* Test whether rhs is within fuzz% of lhs. */
+static bool fuzzily_equal(unsigned lhs, unsigned rhs, int percent)
+{
+   double fuzz = (double)lhs * (double)percent/100.0;
+
+   if (((double)rhs = ((double)lhs - fuzz)) 
+   ((double)rhs = ((double)lhs + fuzz))) {
+   return true;
+   }
+
+   return false;
+
+}
+
+static NTSTATUS fill_directory(struct smbcli_tree *tree,
+   const char * path, unsigned count)
+{
+   NTSTATUSstatus;
+   char*fname = NULL;
+   unsignedi;
+   unsignedcurrent;
+
+   struct timeval start;
+   struct timeval now;
+
+   status = smbcli_mkdir(tree, path);
+   if (!NT_STATUS_IS_OK(status)) {
+   return status;
+   }
+
+   printf(filling directory %s with %u files... , path, count);
+   fflush(stdout);
+
+   current = random();
+   start = timeval_current();
+
+   for (i = 0; i  count; ++i) {
+   int fnum;
+
+   ++current;
+   fname = talloc_asprintf(NULL, %s\\fill%u,
+   path, current);
+
+   fnum = smbcli_open(tree, fname, O_RDONLY|O_CREAT,
+   OPENX_MODE_DENY_NONE);
+   if (fnum  0) {
+   talloc_free(fname);
+   return smbcli_nt_error(tree);
+   }
+
+   smbcli_close(tree, fnum);
+   talloc_free(fname);
+   }
+
+   if (count) {
+   double rate;
+   now = timeval_current();
+   rate = (double)count / usec_to_sec((double)usec_time_diff(now, 
start));
+   printf(%u/sec\n

[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha3-115-g2b8cf1b

2008-04-13 Thread James Peach
The branch, v4-0-test has been updated
   via  2b8cf1b2a447711d123c563dfbd9a54941155267 (commit)
  from  9b8448c1e4567be26fa4890c647e0d4d46efbe20 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -
commit 2b8cf1b2a447711d123c563dfbd9a54941155267
Author: James Peach [EMAIL PROTECTED]
Date:   Sun Apr 13 14:09:09 2008 -0700

smb_build: Make sure LIBRARY_SONAME is never uninitialized.

---

Summary of changes:
 source/build/smb_build/makefile.pm |4 
 1 files changed, 4 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/build/smb_build/makefile.pm 
b/source/build/smb_build/makefile.pm
index fb3ac56..2470fa1 100644
--- a/source/build/smb_build/makefile.pm
+++ b/source/build/smb_build/makefile.pm
@@ -220,6 +220,10 @@ sub SharedLibrary($$)
 {
my ($self,$ctx) = @_;
 
+   if (!defined($ctx-{LIBRARY_SONAME})) {
+   $ctx-{LIBRARY_SONAME} = ;
+   }
+
$self-output(SHARED_LIBS += 
$ctx-{SHAREDDIR}/$ctx-{LIBRARY_REALNAME}\n) if (defined($ctx-{SO_VERSION}));
 
$self-_prepare_list($ctx, DEPEND_LIST);


-- 
Samba Shared Repository


Re: [Samba] Help: justification for Linux PDC vs Windows...

2008-04-10 Thread James Peach
On 10/04/2008, JJB [EMAIL PROTECTED] wrote:
[snip]
  Thanks everyone who posted so far. While we are at it, is Apple's
 OpenDirectory a rough equivalent of AD

In some ways, yes.

 or is OpenDirectory just
 Samba/OpenLDAP compiled on OS X?

No, it's a completely different beast.

-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-679-g3ed2c65

2008-04-07 Thread James Peach
The branch, v3-2-test has been updated
   via  3ed2c65bde0c2e5ad10cf777dae8a2d3e626a42c (commit)
   via  59a2bcf30fef14ecc826271862b645dd3a61cb48 (commit)
   via  fd168e7b5065ba15b1cf56522b6810b8e6fdd7d5 (commit)
  from  04cd914a1f12691d27ddc67887a757cd813848a7 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit 3ed2c65bde0c2e5ad10cf777dae8a2d3e626a42c
Author: James Peach [EMAIL PROTECTED]
Date:   Mon Apr 7 15:28:10 2008 -0700

Remove unused variable.

commit 59a2bcf30fef14ecc826271862b645dd3a61cb48
Author: Bill Ricker [EMAIL PROTECTED]
Date:   Mon Apr 7 15:02:56 2008 -0700

Fix Kerberos interop with Mac OS X 10.5 clients.

Ignore optional req_flags. Use the Kerberos mechanism OID negotiated
with the client rather than hardcoding OID_KERBEROS5_OLD.

commit fd168e7b5065ba15b1cf56522b6810b8e6fdd7d5
Author: James Peach [EMAIL PROTECTED]
Date:   Mon Apr 7 15:00:41 2008 -0700

Use bool for BOOL and true/false for True/False. We need lowercase
bool to get the declarations picked up by the prototype parser.

---

Summary of changes:
 source/libsmb/asn1.c  |  139 
 source/libsmb/clispnego.c |   12 
 source/smbd/seal.c|8 ++-
 source/smbd/sesssetup.c   |   49 +---
 4 files changed, 121 insertions(+), 87 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libsmb/asn1.c b/source/libsmb/asn1.c
index 99c5b0b..bdbe49b 100644
--- a/source/libsmb/asn1.c
+++ b/source/libsmb/asn1.c
@@ -36,19 +36,19 @@ void asn1_free(ASN1_DATA *data)
 /* write to the ASN1 buffer, advancing the buffer pointer */
 bool asn1_write(ASN1_DATA *data, const void *p, int len)
 {
-   if (data-has_error) return False;
+   if (data-has_error) return false;
if (data-length  data-ofs+len) {
data-data = SMB_REALLOC_ARRAY(data-data, unsigned char,
   data-ofs+len);
if (!data-data) {
-   data-has_error = True;
-   return False;
+   data-has_error = true;
+   return false;
}
data-length = data-ofs+len;
}
memcpy(data-data + data-ofs, p, len);
data-ofs += len;
-   return True;
+   return true;
 }
 
 /* useful fn for writing a uint8 */
@@ -65,8 +65,8 @@ bool asn1_push_tag(ASN1_DATA *data, uint8 tag)
asn1_write_uint8(data, tag);
nesting = SMB_MALLOC_P(struct nesting);
if (!nesting) {
-   data-has_error = True;
-   return False;
+   data-has_error = true;
+   return false;
}
 
nesting-start = data-ofs;
@@ -82,14 +82,14 @@ bool asn1_pop_tag(ASN1_DATA *data)
size_t len;
 
if (data-has_error) {
-   return False;
+   return false;
}
 
nesting = data-nesting;
 
if (!nesting) {
-   data-has_error = True;
-   return False;
+   data-has_error = true;
+   return false;
}
len = data-ofs - (nesting-start+1);
/* yes, this is ugly. We don't know in advance how many bytes the length
@@ -97,23 +97,23 @@ bool asn1_pop_tag(ASN1_DATA *data)
   need to correct our mistake */
if (len  0x) {
data-data[nesting-start] = 0x83;
-   if (!asn1_write_uint8(data, 0)) return False;
-   if (!asn1_write_uint8(data, 0)) return False;
-   if (!asn1_write_uint8(data, 0)) return False;
+   if (!asn1_write_uint8(data, 0)) return false;
+   if (!asn1_write_uint8(data, 0)) return false;
+   if (!asn1_write_uint8(data, 0)) return false;
memmove(data-data+nesting-start+4, 
data-data+nesting-start+1, len);
data-data[nesting-start+1] = (len16)  0xFF;
data-data[nesting-start+2] = (len8)  0xFF;
data-data[nesting-start+3] = len0xff;
} else if (len  255) {
data-data[nesting-start] = 0x82;
-   if (!asn1_write_uint8(data, 0)) return False;
-   if (!asn1_write_uint8(data, 0)) return False;
+   if (!asn1_write_uint8(data, 0)) return false;
+   if (!asn1_write_uint8(data, 0)) return false;
memmove(data-data+nesting-start+3, 
data-data+nesting-start+1, len);
data-data[nesting-start+1] = len8;
data-data[nesting-start+2] = len0xff;
} else if (len  127) {
data-data[nesting-start] = 0x81;
-   if (!asn1_write_uint8(data, 0)) return False;
+   if (!asn1_write_uint8(data, 0)) return false;
memmove(data-data+nesting-start+2

Re: [Samba] configure script not found in newly checked out source from SVN repository.

2008-03-26 Thread James Peach
On 26/03/2008, Siju George [EMAIL PROTECTED] wrote:
 Hi,

  I was following

  
 http://wiki.samba.org/index.php/Samba4/HOWTO#Testing_Samba4_Active_Directory_in_Ubuntu_7.04_howto

  to put Samba 4 to test.

  I got this error.

  ===
  [EMAIL PROTECTED]:/var/Software/samba4/source$ sudo svn update
  At revision 26701.

Run ./autogen.sh at this point

  [EMAIL PROTECTED]:/var/Software/samba4/source$ sudo ./configure 
 --prefix=/usr/local
  sudo: ./configure: command not found

Don't run configure under sudo. do the configure and make as yourself,
then do sudo make install to install.


-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-412-gf19d1e3

2008-03-24 Thread James Peach
The branch, v3-2-test has been updated
   via  f19d1e3d93d0d9dfe80372c6c5635f1047f9aa88 (commit)
  from  07a9f7daa83c94afefe0d81db4812135121862c2 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit f19d1e3d93d0d9dfe80372c6c5635f1047f9aa88
Author: Eric Cronin [EMAIL PROTECTED]
Date:   Mon Mar 24 12:33:04 2008 -0700

Missing HAVE_UPDWTMPX check before using updwtmpx().

In 10.5 Mac OS X added enough utmpx support to make it past the
first two preprocessor checks around line 390 of src/smbd/utmp.c
and on to the utmpx block which uses updwtmpx().  Unfortunately,
as ./configure correctly surmised, 10.5 doesn't have that.

https://bugzilla.samba.org/show_bug.cgi?id=5184

---

Summary of changes:
 source/smbd/utmp.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/utmp.c b/source/smbd/utmp.c
index 5931b2b..de6d707 100644
--- a/source/smbd/utmp.c
+++ b/source/smbd/utmp.c
@@ -409,6 +409,10 @@ static void sys_utmp_update(struct utmp *u, const char 
*hostname, bool claim)
/* Odd.  Have utmpx.h but no getutmpx().  Drop to non-x stuff */
DEBUG(1,(utmp_update: have utmpx.h but no getutmpx() function\n));
utmp_nox_update(u, claim);
+#elif !defined(HAVE_UPDWTMPX)
+   /* Have utmpx.h but no updwtmpx().  Drop to non-x stuff */
+   DEBUG(1,(utmp_update: have utmpx.h but no updwtmpx() function\n));
+   utmp_nox_update(u, claim);
 #else
char *uname = NULL;
char *wname = NULL;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-847-g22ac34a

2007-12-22 Thread James Peach
The branch, v3-2-test has been updated
   via  22ac34a329c9be9cf7d1e6749ebcfb50215378e4 (commit)
   via  30cb2d215f1a4a440d5ecaab3f898daa714eee2b (commit)
   via  de3c5b808a941ac8e9ebe7169536d8290067eef5 (commit)
  from  cebaa483e62910ac3f87cd135b2aff18dc880416 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit 22ac34a329c9be9cf7d1e6749ebcfb50215378e4
Author: James Peach [EMAIL PROTECTED]
Date:   Sat Dec 22 14:10:06 2007 -0800

Fix may be used uninitialized compiler warnings.

commit 30cb2d215f1a4a440d5ecaab3f898daa714eee2b
Merge: de3c5b808a941ac8e9ebe7169536d8290067eef5 
cebaa483e62910ac3f87cd135b2aff18dc880416
Author: James Peach [EMAIL PROTECTED]
Date:   Sat Dec 22 14:01:44 2007 -0800

Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test

commit de3c5b808a941ac8e9ebe7169536d8290067eef5
Author: James Peach [EMAIL PROTECTED]
Date:   Sat Dec 22 14:01:25 2007 -0800

Cache the underlying filesystem capabilities at connection time.

This change alters the Samba connection code to cache the filesystem
capabilities when a new client connects. This can be used to enable
filesystem specific optimisations is a general manner.

---

Summary of changes:
 source/auth/auth_util.c |6 +++---
 source/include/smb.h|4 
 source/smbd/service.c   |   15 +++
 3 files changed, 22 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/auth/auth_util.c b/source/auth/auth_util.c
index 373a2a3..3f65e6b 100644
--- a/source/auth/auth_util.c
+++ b/source/auth/auth_util.c
@@ -1423,7 +1423,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
static const char zeros[16] = { 0, };
 
NTSTATUS nt_status = NT_STATUS_OK;
-   char *found_username;
+   char *found_username = NULL;
const char *nt_domain;
const char *nt_username;
struct samu *sam_account = NULL;
@@ -1431,8 +1431,8 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
DOM_SID group_sid;
bool username_was_mapped;
 
-   uid_t uid;
-   gid_t gid;
+   uid_t uid = (uid_t)-1;
+   gid_t gid = (gid_t)-1;
 
auth_serversupplied_info *result;
 
diff --git a/source/include/smb.h b/source/include/smb.h
index 1222c9a..63ae51e 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -658,10 +658,14 @@ typedef struct connection_struct {
int num_files_open;
unsigned int num_smb_operations; /* Count of smb operations on this 
tree. */
 
+   /* Semantics requested by the client or forced by the server config. */
bool case_sensitive;
bool case_preserve;
bool short_case_preserve;
 
+   /* Semantics provided by the underlying filesystem. */
+   int fs_capabilities;
+
name_compare_entry *hide_list; /* Per-share list of files to return as 
hidden. */
name_compare_entry *veto_list; /* Per-share list of files to veto 
(never show). */
name_compare_entry *veto_oplock_list; /* Per-share list of files to 
refuse oplocks on. */   
diff --git a/source/smbd/service.c b/source/smbd/service.c
index ed43528..8e69a3b 100644
--- a/source/smbd/service.c
+++ b/source/smbd/service.c
@@ -1165,6 +1165,21 @@ static connection_struct *make_connection_snum(int snum, 
user_struct *vuser,
}
 #endif
 
+   /* Figure out the characteristics of the underlying filesystem. This
+* assumes that all the filesystem mounted withing a share path have
+* the same characteristics, which is likely but not guaranteed.
+*/
+   {
+   vfs_statvfs_struct svfs;
+
+   conn-fs_capabilities =
+   FILE_CASE_SENSITIVE_SEARCH | FILE_CASE_PRESERVED_NAMES;
+
+   if (SMB_VFS_STATVFS(conn, conn-connectpath, svfs) == 0) {
+   conn-fs_capabilities = svfs.FsCapabilities;
+   }
+   }
+
/*
 * Print out the 'connected as' stuff here as we need
 * to know the effective uid and gid we will be using


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-848-g9e8b8f8

2007-12-22 Thread James Peach
The branch, v3-2-test has been updated
   via  9e8b8f8c16612d8a08b55802f4fd9afca5498a7c (commit)
  from  22ac34a329c9be9cf7d1e6749ebcfb50215378e4 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit 9e8b8f8c16612d8a08b55802f4fd9afca5498a7c
Author: James Peach [EMAIL PROTECTED]
Date:   Sat Dec 22 14:55:37 2007 -0800

Use filesystem capabilities to support case-insensitive filesystems.

If we know the underlying filesystem is case-insensitive, then we
know that it won't help to search for case variations of the requested
name.

Jeremy, please review (and revert if you disagree).

---

Summary of changes:
 source/smbd/dir.c  |   38 +-
 source/smbd/filename.c |9 +
 2 files changed, 30 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/dir.c b/source/smbd/dir.c
index 05679ee..ccf91fe 100644
--- a/source/smbd/dir.c
+++ b/source/smbd/dir.c
@@ -646,10 +646,13 @@ const char *dptr_ReadDirName(TALLOC_CTX *ctx,
 
TALLOC_FREE(pathreal);
 
-   /* In case sensitive mode we don't search - we know if it 
doesn't exist 
-  with a stat we will fail. */
+   /* Stat failed. We know this is authoratiative if we are
+* providing case sensitive semantics or the underlying
+* filesystem is case sensitive.
+*/
 
-   if (dptr-conn-case_sensitive) {
+   if (dptr-conn-case_sensitive ||
+   !(dptr-conn-fs_capabilities  
FILE_CASE_SENSITIVE_SEARCH)) {
/* We need to set the underlying dir_hnd offset to -1 
also as
   this function is usually called with the output from 
TellDir. */
dptr-dir_hnd-offset = *poffset = 
END_OF_DIRECTORY_OFFSET;
@@ -924,12 +927,7 @@ static bool user_can_read_file(connection_struct *conn, 
char *name, SMB_STRUCT_S
return True;
}
 
-   /* If we can't stat it does not show it */
-   if (!VALID_STAT(*pst)  (SMB_VFS_STAT(conn, name, pst) != 0)) {
-   DEBUG(10,(user_can_read_file: SMB_VFS_STAT failed for file %s 
with error %s\n,
-   name, strerror(errno) ));
-   return False;
-   }
+   SMB_ASSERT(VALID_STAT(*pst));
 
/* Pseudo-open the file (note - no fd's created). */
 
@@ -987,10 +985,7 @@ static bool user_can_write_file(connection_struct *conn, 
char *name, SMB_STRUCT_
return True;
}
 
-   /* If we can't stat it does not show it */
-   if (!VALID_STAT(*pst)  (SMB_VFS_STAT(conn, name, pst) != 0)) {
-   return False;
-   }
+   SMB_ASSERT(VALID_STAT(*pst));
 
/* Pseudo-open the file */
 
@@ -1039,9 +1034,7 @@ static bool file_is_special(connection_struct *conn, char 
*name, SMB_STRUCT_STAT
if (conn-admin_user)
return False;
 
-   /* If we can't stat it does not show it */
-   if (!VALID_STAT(*pst)  (SMB_VFS_STAT(conn, name, pst) != 0))
-   return True;
+   SMB_ASSERT(VALID_STAT(*pst));
 
if (S_ISREG(pst-st_mode) || S_ISDIR(pst-st_mode) || 
S_ISLNK(pst-st_mode))
return False;
@@ -1050,7 +1043,9 @@ static bool file_is_special(connection_struct *conn, char 
*name, SMB_STRUCT_STAT
 }
 
 /***
- Should the file be seen by the client ?
+ Should the file be seen by the client ? NOTE: A successful return
+ is no guarantee of the file's existence ... you also have to check
+ whether pst is valid.
 /
 
 bool is_visible_file(connection_struct *conn, const char *dir_path, const char 
*name, SMB_STRUCT_STAT *pst, bool use_veto)
@@ -1086,6 +1081,15 @@ bool is_visible_file(connection_struct *conn, const char 
*dir_path, const char *
return True;
}
 
+   /* If the file name does not exist, there's no point checking
+* the configuration options. We succeed, on the basis that the
+* checks *might* have passed if the file was present.
+*/
+   if (SMB_VFS_STAT(conn, entry, pst) != 0) {
+   SAFE_FREE(entry);
+   return True;
+   }
+
/* Honour _hide unreadable_ option */
if (hide_unreadable  !user_can_read_file(conn, entry, pst)) {
DEBUG(10,(is_visible_file: file %s is unreadable.\n, 
entry ));
diff --git a/source/smbd/filename.c b/source/smbd/filename.c
index dc733d4..f0d036b 100644
--- a/source/smbd/filename.c
+++ b/source/smbd/filename.c
@@ -735,6 +735,15 @@ static

Re: [Samba] samba 3.0.28 and dropboxes

2007-12-21 Thread James Peach
On 20/12/2007, CJ Keist [EMAIL PROTECTED] wrote:
 All,
 I searched archives and found one related to our problem, with
 subject samba 3.0.26a and dropboxes, but there was no solution. So
 posting this again for hopes of a fix.

 We have dropboxes where users can drop files in someone else's
 dropbox folder.  You have write permissions but not read for the folder.
 In UNIX the dropbox permision is set as 2733.  This all worked fine with
 Samba 3.0.6a.  But now have upgraded to Samba 3.0.28 and
 they are no longer working.

I think that's a Samba bug, There was a change in the directory
handling code that started requiring the ability to read the
directory. I have a patch for this somewhere - I'll try to dig it up
in the new year.

-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-755-g08fee0d

2007-12-20 Thread James Peach
The branch, v3-2-test has been updated
   via  08fee0d28a20648d74c6b03d120eaf628f4de70c (commit)
  from  465fd4385013c95f9778d710d70796feae4eb858 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit 08fee0d28a20648d74c6b03d120eaf628f4de70c
Author: James Peach [EMAIL PROTECTED]
Date:   Thu Dec 20 08:31:27 2007 -0800

Fix typo in filesystem capabilities bits.

---

Summary of changes:
 source/smbd/statvfs.c |4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/statvfs.c b/source/smbd/statvfs.c
index 4314890..0e9a2c2 100644
--- a/source/smbd/statvfs.c
+++ b/source/smbd/statvfs.c
@@ -39,13 +39,11 @@ static int linux_statvfs(const char *path, 
vfs_statvfs_struct *statbuf)
statbuf-FreeFileNodes = statvfs_buf.f_ffree;
statbuf-FsIdentifier = statvfs_buf.f_fsid;
 
-#if defined(FILE_CASE_SENSITIVE_SEARCH)  defined(FILE_CASE_PRESERVING_NAMES)
/* Good defaults for Linux filesystems are case sensitive
 * and case preserving.
 */
statbuf-FsCapabilities =
-   FILE_CASE_SENSITIVE_SEARCH | FILE_CASE_PRESERVING_NAMES;
-#endif
+   FILE_CASE_SENSITIVE_SEARCH | FILE_CASE_PRESERVED_NAMES;
}
return result;
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-753-g5de89dd

2007-12-19 Thread James Peach
The branch, v3-2-test has been updated
   via  5de89dd6e0a8a56a5a0f998e3b1d3538367db7d6 (commit)
   via  36db6755103f01cb74bf4194fc81ca6d4b5320e4 (commit)
   via  555173eb3f6511e88798d6ef3d1fed0c219a9921 (commit)
   via  d5d9e4084cfb3db3bebff0334b93f376022ef5d3 (commit)
   via  9fead46b54519b3df78a869dbc99207046587d6a (commit)
  from  6d765e0de523211a2d0b43a2c4c4117f5f0c662f (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit 5de89dd6e0a8a56a5a0f998e3b1d3538367db7d6
Author: James Peach [EMAIL PROTECTED]
Date:   Wed Dec 19 22:39:40 2007 -0800

Remove unused variable 'didmsg'.

commit 36db6755103f01cb74bf4194fc81ca6d4b5320e4
Author: James Peach [EMAIL PROTECTED]
Date:   Wed Dec 19 22:33:43 2007 -0800

Fix a couple of warnings in mDNS registration. One of these is an
actual bug where we pass a pointer instead of a pointer to a pointer.

commit 555173eb3f6511e88798d6ef3d1fed0c219a9921
Author: James Peach [EMAIL PROTECTED]
Date:   Mon Oct 15 14:03:40 2007 -0700

Add filesystem capabilities bitmask to statfs info.

This patch adds Darwin support for the Samba statfs VFS call. It
also adds a filesystem capabilities bitmask to the information
returned by the call.

commit d5d9e4084cfb3db3bebff0334b93f376022ef5d3
Author: James Peach [EMAIL PROTECTED]
Date:   Mon Oct 15 14:01:12 2007 -0700

Expose per-fsp extension talloc context.

This patch supplements the fsp extension API with an operation to
retrieve the malloc zone pointer for that fsp.

commit 9fead46b54519b3df78a869dbc99207046587d6a
Author: James Peach [EMAIL PROTECTED]
Date:   Mon Oct 15 13:59:37 2007 -0700

Release per-fsp data on file closure.

---

Summary of changes:
 source/include/vfs.h   |   11 +
 source/modules/vfs_readahead.c |4 --
 source/smbd/dnsregister.c  |3 +-
 source/smbd/files.c|5 ++
 source/smbd/statvfs.c  |   85 
 source/smbd/vfs.c  |   16 +++-
 6 files changed, 116 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/vfs.h b/source/include/vfs.h
index e1669a2..5a3ec58 100644
--- a/source/include/vfs.h
+++ b/source/include/vfs.h
@@ -577,14 +577,25 @@ typedef struct vfs_statvfs_struct {
SMB_BIG_UINT FsIdentifier;   /* fsid */
/* NB Namelen comes from FILE_SYSTEM_ATTRIBUTE_INFO call */
/* NB flags can come from FILE_SYSTEM_DEVICE_INFO call   */
+
+   int FsCapabilities;
 } vfs_statvfs_struct;
 
+/* Add a new FSP extension of the given type. Returns a pointer to the
+ * extenstion data.
+ */
 #define VFS_ADD_FSP_EXTENSION(handle, fsp, type) \
 vfs_add_fsp_extension_notype(handle, (fsp), sizeof(type))
 
+/* Return a pointer to the existing FSP extension data. */
 #define VFS_FETCH_FSP_EXTENSION(handle, fsp) \
 vfs_fetch_fsp_extension(handle, (fsp))
 
+/* Return the talloc context associated with an FSP extension. */
+#define VFS_MEMCTX_FSP_EXTENSION(handle, fsp) \
+vfs_memctx_fsp_extension(handle, (fsp))
+
+/* Remove and destroy an FSP extension. */
 #define VFS_REMOVE_FSP_EXTENSION(handle, fsp) \
 vfs_remove_fsp_extension((handle), (fsp))
 
diff --git a/source/modules/vfs_readahead.c b/source/modules/vfs_readahead.c
index 5b663a7..8fdd616 100644
--- a/source/modules/vfs_readahead.c
+++ b/source/modules/vfs_readahead.c
@@ -17,10 +17,6 @@
 
 #include includes.h
 
-#if !defined(HAVE_LINUX_READAHEAD)  !defined(HAVE_POSIX_FADVISE)
-static bool didmsg;
-#endif
-
 struct readahead_data {
SMB_OFF_T off_bound;
SMB_OFF_T len;
diff --git a/source/smbd/dnsregister.c b/source/smbd/dnsregister.c
index 44bd39f..2319097 100644
--- a/source/smbd/dnsregister.c
+++ b/source/smbd/dnsregister.c
@@ -41,7 +41,6 @@ struct dns_reg_state {
 
 void dns_register_close(struct dns_reg_state **dns_state_ptr)
 {
-   int mdnsd_conn_fd;
struct dns_reg_state *dns_state = *dns_state_ptr;
 
if (dns_state == NULL) {
@@ -74,7 +73,7 @@ static void dns_register_smbd_retry(struct event_context *ctx,
/* Clear previous registration state to force new
 * registration attempt. Clears event handler.
 */
-   dns_register_close(dns_state);
+   dns_register_close(dns_state);
 }
 
 static void schedule_dns_register_smbd_retry(struct dns_reg_state *dns_state,
diff --git a/source/smbd/files.c b/source/smbd/files.c
index 179963d..95f01b8 100644
--- a/source/smbd/files.c
+++ b/source/smbd/files.c
@@ -460,6 +460,11 @@ void file_free(files_struct *fsp)
ZERO_STRUCT(fsp_fi_cache);
}
 
+   /* Drop all remaining extensions. */
+   while (fsp-vfs_extension) {
+   vfs_remove_fsp_extension(fsp-vfs_extension-owner, fsp);
+   }
+
SAFE_FREE(fsp);
 }
 
diff

[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-711-gdb74b99

2007-12-17 Thread James Peach
The branch, v3-2-test has been updated
   via  db74b99d0ef1a60894c838b4c9d0d454db6cf620 (commit)
  from  92acc0115d8d4111289c2ade1db7bb060ee908db (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit db74b99d0ef1a60894c838b4c9d0d454db6cf620
Author: Rishi Srivatsavai [EMAIL PROTECTED]
Date:   Mon Dec 17 22:09:09 2007 -0800

Add smbclient support for basic mDNS browsing.

Patch from Rishi Srivatsavai (bugzilla #4150), with tallocification
and minor syle changes by me.

---

Summary of changes:
 source/Makefile.in|8 +-
 source/client/client.c|7 ++
 source/client/dnsbrowse.c |  236 +
 source/configure.in   |1 +
 4 files changed, 250 insertions(+), 2 deletions(-)
 create mode 100644 source/client/dnsbrowse.c


Changeset truncated at 500 lines:

diff --git a/source/Makefile.in b/source/Makefile.in
index 21fc8ce..eda3297 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -673,6 +673,7 @@ LIBBIGBALLOFMUD_OBJ = $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) 
$(SECRETS_OBJ) \
$(GROUPDB_OBJ) $(KRBCLIENT_OBJ) $(SMBLDAP_OBJ) $(LDB_OBJ)
 
 CLIENT_OBJ1 = client/client.o client/clitar.o rpc_client/cli_pipe.o \
+ client/dnsbrowse.o \
  $(RPC_CLIENT_OBJ1) \
  $(RPC_PARSE_OBJ2)
 
@@ -1140,7 +1141,8 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(SMBD_OBJ) 
@BUILD_POPT@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LDAP_LIBS) \
$(KRB5LIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \
-   $(ACL_LIBS) $(PASSDB_LIBS) $(LIBS) @POPTLIBS@ @SMBD_LIBS@
+   $(ACL_LIBS) $(PASSDB_LIBS) $(LIBS) $(DNSSD_LIBS) \
+   @POPTLIBS@ @SMBD_LIBS@
 
 bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(NMBD_OBJ) @BUILD_POPT@
@echo Linking $@
@@ -1159,7 +1161,9 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) 
$(RPCCLIENT_OBJ) @BUILD_POPT@
 
 bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(CLIENT_OBJ) @BUILD_POPT@
@echo Linking $@
-   @$(CC) $(FLAGS) -o $@ $(CLIENT_OBJ) $(LDFLAGS) $(DYNEXP) $(TERMLDFLAGS) 
$(TERMLIBS) $(LIBS) @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS)
+   @$(CC) $(FLAGS) -o $@ $(CLIENT_OBJ) $(LDFLAGS) $(DYNEXP) \
+   $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) @POPTLIBS@ \
+   $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(DNSSD_LIBS)
 
 bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(NET_OBJ) @BUILD_POPT@
@echo Linking $@
diff --git a/source/client/client.c b/source/client/client.c
index d59af9e..97d7cf0 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -28,10 +28,13 @@
 #define REGISTER 0
 #endif
 
+extern int do_smb_browse(void); /* mDNS browsing */
+
 extern bool AllowDebugChange;
 extern bool override_logfile;
 extern char tar_type;
 extern bool in_client;
+
 static int port = 0;
 static char *service;
 static char *desthost;
@@ -4512,6 +4515,7 @@ static int do_message_op(void)
{ send-buffer, 'b', POPT_ARG_INT, io_bufsize, 'b', Changes 
the transmit/send buffer, BYTES },
{ port, 'p', POPT_ARG_INT, port, 'p', Port to connect to, 
PORT },
{ grepable, 'g', POPT_ARG_NONE, NULL, 'g', Produce grepable 
output },
+{ browse, 'B', POPT_ARG_NONE, NULL, 'B', Browse SMB servers 
using DNS },
POPT_COMMON_SAMBA
POPT_COMMON_CONNECTION
POPT_COMMON_CREDENTIALS
@@ -4654,6 +4658,9 @@ static int do_message_op(void)
case 'g':
grepable=true;
break;
+   case 'B':
+   return(do_smb_browse());
+
}
}
 
diff --git a/source/client/dnsbrowse.c b/source/client/dnsbrowse.c
new file mode 100644
index 000..c4819ce
--- /dev/null
+++ b/source/client/dnsbrowse.c
@@ -0,0 +1,236 @@
+/*
+   Unix SMB/CIFS implementation.
+   DNS-SD browse client
+   Copyright (C) Rishi Srivatsavai 2007
+
+   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
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see http://www.gnu.org/licenses/.
+*/
+
+#include includes.h
+
+#ifdef WITH_DNSSD_SUPPORT
+
+#include dns_sd.h
+
+/* Holds service instances found during DNS browse */
+struct mdns_smbsrv_result
+{
+   char *serviceName;
+   

[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-643-g0de2b3e

2007-12-13 Thread James Peach
The branch, v3-2-test has been updated
   via  0de2b3eb515f2da21ffd1ce54979bb1f8063024b (commit)
   via  1e7241517d1f55d60af22570e0c9feb280e3fdb5 (commit)
  from  27078d1292e8588956ae78e4cddb1bcebbe84478 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit 0de2b3eb515f2da21ffd1ce54979bb1f8063024b
Merge: 1e7241517d1f55d60af22570e0c9feb280e3fdb5 
27078d1292e8588956ae78e4cddb1bcebbe84478
Author: James Peach [EMAIL PROTECTED]
Date:   Thu Dec 13 20:56:53 2007 -0800

Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test

commit 1e7241517d1f55d60af22570e0c9feb280e3fdb5
Author: Rishi Srivatsavai [EMAIL PROTECTED]
Date:   Thu Dec 13 20:56:29 2007 -0800

Register the smb service with mDNS if mSDN is supported.

If mDNS is supported, attempt to register the first port we are
listening on for the _smb._tcp service. This provides more reliable
service discovery than NetBIOS browsing.

---

Summary of changes:
 source/Makefile.in|1 +
 source/include/includes.h |   14 +++
 source/smbd/dnsregister.c |  212 +
 source/smbd/server.c  |   50 +--
 4 files changed, 268 insertions(+), 9 deletions(-)
 create mode 100644 source/smbd/dnsregister.c


Changeset truncated at 500 lines:

diff --git a/source/Makefile.in b/source/Makefile.in
index d26f688..5a8d7e1 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -547,6 +547,7 @@ SMBD_OBJ_SRV = smbd/files.o smbd/chgpasswd.o 
smbd/connection.o \
   $(AFS_SETTOKEN_OBJ) smbd/aio.o smbd/statvfs.o \
   smbd/dmapi.o \
   smbd/file_access.o \
+  smbd/dnsregister.o \
   $(MANGLE_OBJ) @VFS_STATIC@
 
 SMBD_OBJ_BASE = $(PARAM_WITHOUT_REG_OBJ) $(SMBD_OBJ_SRV) $(LIBSMB_OBJ) \
diff --git a/source/include/includes.h b/source/include/includes.h
index 4e42088..2245174 100644
--- a/source/include/includes.h
+++ b/source/include/includes.h
@@ -752,6 +752,20 @@ struct printjob;
 
 #include smb_ldap.h
 
+struct dns_reg_state;
+
+void dns_register_smbd(struct dns_reg_state ** dns_state_ptr,
+   unsigned port,
+   int *maxfd,
+   fd_set *listen_set,
+   struct timeval *timeout);
+
+void dns_register_close(struct dns_reg_state ** dns_state_ptr);
+
+
+bool dns_register_smbd_reply(struct dns_reg_state *dns_state,
+   fd_set *lfds, struct timeval *timeout);
+
 /*
  * Reasons for cache flush.
  */
diff --git a/source/smbd/dnsregister.c b/source/smbd/dnsregister.c
new file mode 100644
index 000..fcd97b5
--- /dev/null
+++ b/source/smbd/dnsregister.c
@@ -0,0 +1,212 @@
+/*
+   Unix SMB/CIFS implementation.
+   DNS-SD registration
+   Copyright (C) Rishi Srivatsavai 2007
+
+   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
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see http://www.gnu.org/licenses/.
+*/
+
+#include includes.h
+#include dns_sd.h
+
+/* Uses DNS service discovery (libdns_sd) to
+ * register the SMB service. SMB service is registered
+ * on .local domain via Multicast DNS  any
+ * other unicast DNS domains available.
+ *
+ * Users use the smbclient -B (Browse) option to
+ * browse for advertised SMB services.
+ */
+
+#define DNS_REG_RETRY_INTERVAL (5*60)  /* in seconds */
+
+struct dns_reg_state {
+   DNSServiceRef srv_ref;
+   struct timed_event *retry_handler;
+};
+
+#ifdef WITH_DNSSD_SUPPORT
+
+void dns_register_close(struct dns_reg_state **dns_state_ptr)
+{
+   int mdnsd_conn_fd;
+   struct dns_reg_state *dns_state = *dns_state_ptr;
+
+   if (dns_state == NULL) {
+   return;
+   }
+
+   if (dns_state-srv_ref != NULL) {
+   /* Close connection to the mDNS daemon */
+   DNSServiceRefDeallocate(dns_state-srv_ref);
+   dns_state-srv_ref = NULL;
+   }
+
+   /* Clear event handler */
+   if (dns_state-retry_handler != NULL) {
+   TALLOC_FREE(dns_state-retry_handler);
+   dns_state-retry_handler = NULL;
+   }
+
+   talloc_free(dns_state);
+   *dns_state_ptr = NULL;
+}
+
+static void dns_register_smbd_retry(struct event_context *ctx,
+   struct timed_event *te,
+   const struct timeval *now

[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-644-gcf221a9

2007-12-13 Thread James Peach
The branch, v3-2-test has been updated
   via  cf221a94bd8794add508a2b9305b8c0d40c3346a (commit)
  from  0de2b3eb515f2da21ffd1ce54979bb1f8063024b (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit cf221a94bd8794add508a2b9305b8c0d40c3346a
Author: James Peach [EMAIL PROTECTED]
Date:   Thu Dec 13 22:12:21 2007 -0800

Move dns_sd.h include to fix the build.

---

Summary of changes:
 source/smbd/dnsregister.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/dnsregister.c b/source/smbd/dnsregister.c
index fcd97b5..44bd39f 100644
--- a/source/smbd/dnsregister.c
+++ b/source/smbd/dnsregister.c
@@ -18,7 +18,6 @@
 */
 
 #include includes.h
-#include dns_sd.h
 
 /* Uses DNS service discovery (libdns_sd) to
  * register the SMB service. SMB service is registered
@@ -31,13 +30,15 @@
 
 #define DNS_REG_RETRY_INTERVAL (5*60)  /* in seconds */
 
+#ifdef WITH_DNSSD_SUPPORT
+
+#include dns_sd.h
+
 struct dns_reg_state {
DNSServiceRef srv_ref;
struct timed_event *retry_handler;
 };
 
-#ifdef WITH_DNSSD_SUPPORT
-
 void dns_register_close(struct dns_reg_state **dns_state_ptr)
 {
int mdnsd_conn_fd;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-618-g2dfe952

2007-12-12 Thread James Peach
The branch, v3-2-test has been updated
   via  2dfe9525b9e6e7dcbac191c1fb6288e166d171e5 (commit)
  from  b215fb1ad0d5bb3fa7084c2773845ce1dffb2173 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit 2dfe9525b9e6e7dcbac191c1fb6288e166d171e5
Author: James Peach [EMAIL PROTECTED]
Date:   Fri Oct 12 22:16:22 2007 -0700

Autoconf support for detecting DNS Service Discovery support.

Patch from Rishi Srivatsavai [EMAIL PROTECTED], with some
adaptations.

---

Summary of changes:
 source/Makefile.in  |1 +
 source/configure.in |   37 +
 2 files changed, 38 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/Makefile.in b/source/Makefile.in
index 285255e..d26f688 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -63,6 +63,7 @@ [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
[EMAIL PROTECTED]@
 
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
diff --git a/source/configure.in b/source/configure.in
index 4c72ad3..06a6a45 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -6162,6 +6162,40 @@ AC_SUBST(POPTLIBS)
 AC_SUBST(FLAGS1)
 
 #
+# Check if user wants DNS service discovery support
+
+AC_ARG_ENABLE(dnssd,
+[  --enable-dnssd  Enable DNS service discovery support 
(default=auto)])
+
+if test x$enable_dnssd != xno; then
+have_dnssd_support=yes
+
+AC_CHECK_HEADERS(dns_sd.h)
+if test x$ac_cv_header_dns_sd_h != xyes; then
+   have_dnssd_support=no
+fi
+
+# On Darwin the DNSSD API is in libc, but on other platforms it's
+# probably in -ldns_sd
+AC_CHECK_FUNCS(DNSServiceRegister)
+AC_CHECK_LIB_EXT(dns_sd, DNSSD_LIBS, DNSServiceRegister)
+if test x$ac_cv_func_DNSServiceRegister != xyes -a \
+x$ac_cv_lib_ext_DNSServiceRegister != xyes; then
+   have_dnssd_support=no
+fi
+
+if test x$have_dnssd_support = xyes; then
+   AC_DEFINE(WTH_DNSSD_SUPPORT, 1,
+   [Whether to enable DNS service discovery support])
+else
+   if test x$enable_dnssd = xyes; then
+   AC_MSG_ERROR(DNS service discovery support not available)
+   fi
+fi
+
+fi
+
+#
 # Check to see if we should use the included iniparser
 
 AC_ARG_WITH(included-iniparser,
@@ -6467,6 +6501,9 @@ fi
 if test x$with_dnsupdate_support != xno; then
 AC_MSG_RESULT([UUID_LIBS = $UUID_LIBS])
 fi
+if test x$have_dnssd_support != xno; then
+AC_MSG_RESULT([DNSSD_LIBS = $DNSSD_LIBS])
+fi
 AC_MSG_RESULT([AUTH_LIBS = $AUTH_LIBS])
 
 #


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-619-gc8468a1

2007-12-12 Thread James Peach
The branch, v3-2-test has been updated
   via  c8468a1bb49535f0467e1a83b4c8bc5c8dce834e (commit)
  from  2dfe9525b9e6e7dcbac191c1fb6288e166d171e5 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit c8468a1bb49535f0467e1a83b4c8bc5c8dce834e
Author: James Peach [EMAIL PROTECTED]
Date:   Wed Dec 12 22:12:10 2007 -0800

Fix typo.

---

Summary of changes:
 source/configure.in |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/configure.in b/source/configure.in
index 06a6a45..84ae6f7 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -6185,7 +6185,7 @@ if test x$enable_dnssd != xno; then
 fi
 
 if test x$have_dnssd_support = xyes; then
-   AC_DEFINE(WTH_DNSSD_SUPPORT, 1,
+   AC_DEFINE(WITH_DNSSD_SUPPORT, 1,
[Whether to enable DNS service discovery support])
 else
if test x$enable_dnssd = xyes; then


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-561-g40c26d5

2007-12-09 Thread James Peach
The branch, v3-2-test has been updated
   via  40c26d55736ae08934e18c27168fff10dd15442f (commit)
   via  5c347cb46d85d04bbba7c99dca7ff9628f977d84 (commit)
   via  4786654992e3cb2280b77406f9217fcec981602c (commit)
   via  87c302e250aacc4d5d6a3cce3f134dd13fa457bf (commit)
   via  e1bfdc17c49da582cdf907e260301ab1946b2ed3 (commit)
   via  ffee51586cfc32a7e394f606e5021ee8fd198559 (commit)
  from  616d6b97e594a846e9b3ac4cbe48538d649462e9 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit 40c26d55736ae08934e18c27168fff10dd15442f
Author: James Peach [EMAIL PROTECTED]
Date:   Sun Dec 9 14:18:54 2007 -0800

Support fetching very long server lists with RAP_NetServerEnum3.

Use the RAP_NetServerEnum3 server list continuation API for retrieving
server lists that are too long to fit in a single reply.

Patch from George Colley [EMAIL PROTECTED].

commit 5c347cb46d85d04bbba7c99dca7ff9628f977d84
Author: James Peach [EMAIL PROTECTED]
Date:   Sun Dec 9 14:02:23 2007 -0800

Choose a better default for sockaddr length.

commit 4786654992e3cb2280b77406f9217fcec981602c
Author: James Peach [EMAIL PROTECTED]
Date:   Sun Dec 9 14:01:57 2007 -0800

Specifically ask for IP4 addresses if we don't have IP6 support.

commit 87c302e250aacc4d5d6a3cce3f134dd13fa457bf
Author: James Peach [EMAIL PROTECTED]
Date:   Sun Dec 9 14:00:25 2007 -0800

Make sure NULL is defined to the IPv6 test doesn't spuriously fail.

commit e1bfdc17c49da582cdf907e260301ab1946b2ed3
Author: James Peach [EMAIL PROTECTED]
Date:   Sun Dec 9 13:28:00 2007 -0800

Fix connect(2) callers to use correct sockaddr size.

Some systems (eg Mac OSX 10.5) require the length passed to match
the socket address family. This introduces sys_connect() that does
the right thing, and replaces all uses oc connect(2) with sys_connect().

Note that there are some LGPL callers that still call connect(2)
directly.

commit ffee51586cfc32a7e394f606e5021ee8fd198559
Author: James Peach [EMAIL PROTECTED]
Date:   Sun Dec 9 13:22:19 2007 -0800

Move load_case_tables() to after logging is set up. This can log
errors.

---

Summary of changes:
 source/client/client.c|3 +-
 source/configure.in   |1 +
 source/lib/ctdbd_conn.c   |2 +-
 source/lib/sock_exec.c|4 +-
 source/lib/system.c   |   18 +
 source/lib/util_sock.c|9 ++-
 source/libsmb/clirap.c|  167 +---
 source/libsmb/namequery.c |5 ++
 8 files changed, 159 insertions(+), 50 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/client.c b/source/client/client.c
index 1e2f96c..80e906d 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -4522,7 +4522,6 @@ static int do_message_op(void)
if (!client_set_cur_dir(\\)) {
exit(ENOMEM);
}
-   load_case_tables();
 
 #ifdef KANJI
term_code = talloc_strdup(frame,KANJI);
@@ -4546,6 +4545,8 @@ static int do_message_op(void)
x_setbuf( dbf, NULL );
}
 
+   load_case_tables();
+
/* skip argv(0) */
pc = poptGetContext(smbclient, argc, (const char **) argv, 
long_options, 0);
poptSetOtherOptionHelp(pc, service password);
diff --git a/source/configure.in b/source/configure.in
index 4eea331..4c72ad3 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -3046,6 +3046,7 @@ fi
 dnl test for ipv6
 AC_CACHE_CHECK([for ipv6 support],samba_cv_HAVE_IPV6,[
 AC_TRY_COMPILE([
+#include stdlib.h /* for NULL */
 #include sys/socket.h
 #include sys/types.h
 #include netdb.h],
diff --git a/source/lib/ctdbd_conn.c b/source/lib/ctdbd_conn.c
index 47693ec..899bbcf 100644
--- a/source/lib/ctdbd_conn.c
+++ b/source/lib/ctdbd_conn.c
@@ -135,7 +135,7 @@ static NTSTATUS ctdbd_connect(TALLOC_CTX *mem_ctx,
addr.sun_family = AF_UNIX;
strncpy(addr.sun_path, sockname, sizeof(addr.sun_path));
 
-   if (connect(fd, (struct sockaddr *)addr, sizeof(addr)) == -1) {
+   if (sys_connect(fd, (struct sockaddr *)addr) == -1) {
DEBUG(0, (connect(%s) failed: %s\n, sockname,
  strerror(errno)));
close(fd);
diff --git a/source/lib/sock_exec.c b/source/lib/sock_exec.c
index 5e3178c..203d7e9 100644
--- a/source/lib/sock_exec.c
+++ b/source/lib/sock_exec.c
@@ -60,7 +60,7 @@ static int socketpair_tcp(int fd[2])
 
sock.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
 
-   if (connect(fd[1],(struct sockaddr *)sock,sizeof(sock)) == -1) {
+   if (sys_connect(fd[1], (struct sockaddr *)sock) == -1) {
if (errno != EINPROGRESS) goto failed;
} else {
connect_done = 1;
@@ -70,7 +70,7 @@ static int socketpair_tcp(int fd[2])
 
close(listener

Re: [SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-562-g677ac6a

2007-12-09 Thread James Peach

On 09/12/2007, at 3:10 PM, Jeremy Allison wrote:


The branch, v3-2-test has been updated
  via  677ac6adc38b0747f825ee597e0502277a8f74b1 (commit)
 from  40c26d55736ae08934e18c27168fff10dd15442f (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log  
-

commit 677ac6adc38b0747f825ee597e0502277a8f74b1
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Sun Dec 9 14:59:07 2007 -0800

   Many systems don't have sa_len as part of struct sockaddr.
   Revert 5c347cb46d85d04bbba7c99dca7ff9628f977d84
   Choose a better default for sockaddr length..


thanks Jeremy!

--
James Peach | [EMAIL PROTECTED]




[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-357-g660ea44

2007-11-21 Thread James Peach
The branch, v3-2-test has been updated
   via  660ea443364e949ed06c28b00f0e1c3757f0da27 (commit)
   via  12eee4f7fe27bb4ca376301b959dbfb918b7ba2d (commit)
  from  f652fe2bdb7a3a36e83dcf4b08347543fdffb9f0 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit 660ea443364e949ed06c28b00f0e1c3757f0da27
Merge: 12eee4f7fe27bb4ca376301b959dbfb918b7ba2d 
f652fe2bdb7a3a36e83dcf4b08347543fdffb9f0
Author: James Peach [EMAIL PROTECTED]
Date:   Wed Nov 21 18:31:35 2007 -0800

Merge ssh://git.samba.org/data/git/samba into v3-2-test

commit 12eee4f7fe27bb4ca376301b959dbfb918b7ba2d
Author: David Losada Carballo [EMAIL PROTECTED]
Date:   Tue Nov 20 16:45:33 2007 -0800

Extend commit module to help with NFS quotas.

Add commit on eof and commit past eof modes. Patch from David
Losada Carballo with some modifications during the merge.

---

Summary of changes:
 source/configure.in |2 +-
 source/modules/vfs_commit.c |  183 +--
 2 files changed, 159 insertions(+), 26 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/configure.in b/source/configure.in
index 69a8e3f..b6cd77b 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -1292,7 +1292,7 @@ fi
 AC_CHECK_FUNCS(waitpid getcwd strdup strndup strnlen strerror chown fchown 
lchown chmod fchmod chroot link mknod mknod64)
 AC_CHECK_FUNCS(strtol strtoll strtoul strtoull strtouq __strtoull)
 AC_CHECK_FUNCS(fstat strchr utime utimes chflags)
-AC_CHECK_FUNCS(getrlimit fsync memset strlcpy strlcat setpgid)
+AC_CHECK_FUNCS(getrlimit fsync fdatasync memset strlcpy strlcat setpgid)
 AC_CHECK_FUNCS(memmove vsnprintf snprintf asprintf vasprintf setsid glob 
strpbrk pipe crypt16 getauthuid)
 AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction sigset innetgr 
setnetgrent getnetgrent endnetgrent)
 AC_CHECK_FUNCS(initgroups select poll rdchk getgrnam getgrent pathconf 
realpath)
diff --git a/source/modules/vfs_commit.c b/source/modules/vfs_commit.c
index 39de7f7..d7d8192 100644
--- a/source/modules/vfs_commit.c
+++ b/source/modules/vfs_commit.c
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) James Peach 2006
+ * Copyright (c) James Peach 2006, 2007
+ * Copyright (c) David Losada Carballo 2007
  *
  * 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
@@ -29,23 +30,73 @@
  * Tunables:
  *
  *  commit: dthresh Amount of dirty data that can accumulate
- * before we commit (sync) it.
+ *  before we commit (sync) it.
  *
  *  commit: debug   Debug level at which to emit messages.
  *
+ *  commit: eof modeString. Tunes how the module tries to guess when
+ *  the client has written the last bytes of the file.
+ *  Possible values (default = hinted):
+ *
+ * (*)  = hintedSome clients (i.e. Windows Explorer) declare the
+ *  size of the file before transferring it. With this
+ *  option, we remember that hint, and commit after
+ *  writing in that file position. If the client
+ *  doesn't declare the size of file, commiting on EOF 
+ *  is not triggered.
+ *
+ *  = growthCommits after a write operation has made the file
+ *  size grow. If the client declares a file size, it
+ *  refrains to commit until the file has reached it.
+ *  Useful for defeating writeback on NFS shares.
+ *
  */
 
 #define MODULE commit
 
 static int module_debug;
 
+enum eof_mode
+{
+EOF_NONE = 0x,
+EOF_HINTED = 0x0001,
+EOF_GROWTH = 0x0002
+};
+
 struct commit_info
 {
+/* For chunk-based commits */
 SMB_OFF_T dbytes;  /* Dirty (uncommitted) bytes */
 SMB_OFF_T dthresh; /* Dirty data threshold */
+/* For commits on EOF */
+enum eof_mode on_eof;
+SMB_OFF_T eof; /* Expected file size */
 };
 
-static void commit_all(
+static int commit_do(
+struct commit_info *c,
+int fd)
+{
+int result;
+
+   DEBUG(module_debug,
+   (%s: flushing %lu dirty bytes\n,
+MODULE, (unsigned long)c-dbytes));
+
+#if HAVE_FDATASYNC
+result = fdatasync(fd);
+#elif HAVE_FSYNC
+result = fsync(fd);
+#else
+   result = 0
+#endif
+if (result == 0) {
+c-dbytes = 0; /* on success, no dirty bytes */
+}
+return result;
+}
+
+static int commit_all(
 struct vfs_handle_struct * handle,
 files_struct

[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-332-g8b0bee7

2007-11-18 Thread James Peach
The branch, v3-2-test has been updated
   via  8b0bee7c7688a966777f502c97922d7ad40d841c (commit)
  from  977dc3accb3d440e5fd19591c425da7dc3718d94 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit 8b0bee7c7688a966777f502c97922d7ad40d841c
Author: James Peach [EMAIL PROTECTED]
Date:   Sun Nov 18 13:56:19 2007 -0800

Detect Heimdal Kerberos on OpenBSD 4.2.

Patch from Sean McCreary [EMAIL PROTECTED].

---

Summary of changes:
 source/configure.in |   17 +
 1 files changed, 17 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/configure.in b/source/configure.in
index d37e392..69a8e3f 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -3671,10 +3671,12 @@ if test x$with_ads_support != xno; then
   KRB5_CFLAGS=-I/usr/include/heimdal
   KRB5_CPPFLAGS=-I/usr/include/heimdal
   KRB5_LDFLAGS=-L/usr/lib/heimdal/lib
+ FOUND_KRB5=yes
   AC_MSG_RESULT(yes)
   else
   KRB5_CFLAGS=-I/usr/include/heimdal
   KRB5_CPPFLAGS=-I/usr/include/heimdal
+ FOUND_KRB5=yes
   AC_MSG_RESULT(yes)
   fi
 else
@@ -3690,6 +3692,21 @@ if test x$with_ads_support != xno; then
   KRB5_LDFLAGS=-L/usr/kerberos/lib
   KRB5_CFLAGS=-I/usr/kerberos/include
   KRB5_CPPFLAGS=-I/usr/kerberos/include
+  FOUND_KRB5=yes
+  AC_MSG_RESULT(yes)
+else
+  AC_MSG_RESULT(no)
+fi
+  fi
+
+  if test x$FOUND_KRB5 = xno; then
+#
+# see if this box has the OpenBSD location for heimdal krb5
+AC_MSG_CHECKING(for /usr/include/kerberosV)
+if test -d /usr/include/kerberosV; then
+  KRB5_CPPFLAGS=-I/usr/include/kerberosV
+  KRB5_LIBS=-lcrypto
+  FOUND_KRB5=yes
   AC_MSG_RESULT(yes)
 else
   AC_MSG_RESULT(no)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-96-g1eddefa

2007-10-22 Thread James Peach
The branch, v3-2-test has been updated
   via  1eddefa72cefd0c6836ddbe8eaef074ce732b0d9 (commit)
  from  37ee6f498b175b8f3b7e75eba8dd7c709327384c (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit 1eddefa72cefd0c6836ddbe8eaef074ce732b0d9
Author: James Peach [EMAIL PROTECTED]
Date:   Mon Oct 22 22:03:40 2007 -0700

Reorder pthread mutex check so that it doesn't output its result
in the middle of the output for the winbind nss check.

---

Summary of changes:
 source/configure.in |   25 +
 1 files changed, 13 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/configure.in b/source/configure.in
index a96e2d9..90c61c7 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -5973,18 +5973,6 @@ case $host_os in
;;
 esac
 
-AC_CHECK_LIB(pthread, pthread_mutex_lock, [WINBIND_NSS_PTHREAD=-lpthread
-   AC_DEFINE(HAVE_PTHREAD, 1, [whether pthread exists])])
-AC_SUBST(WINBIND_NSS_PTHREAD)
-AC_SUBST(WINBIND_NSS)
-AC_SUBST(WINBIND_WINS_NSS)
-AC_SUBST(WINBIND_NSS_LDSHFLAGS)
-AC_SUBST(WINBIND_NSS_EXTRA_OBJS)
-AC_SUBST(WINBIND_NSS_EXTRA_LIBS)
-AC_SUBST(NSSSONAMEVERSIONSUFFIX)
-
-AC_SUBST(WINBIND_KRB5_LOCATOR)
-
 # Check the setting of --with-winbind
 
 AC_ARG_WITH(winbind,
@@ -6036,6 +6024,19 @@ else
 AC_MSG_RESULT(no$winbind_no_reason)
 fi
 
+AC_CHECK_LIB(pthread, pthread_mutex_lock, [WINBIND_NSS_PTHREAD=-lpthread
+   AC_DEFINE(HAVE_PTHREAD, 1, [whether pthread exists])])
+
+AC_SUBST(WINBIND_NSS_PTHREAD)
+AC_SUBST(WINBIND_NSS)
+AC_SUBST(WINBIND_WINS_NSS)
+AC_SUBST(WINBIND_NSS_LDSHFLAGS)
+AC_SUBST(WINBIND_NSS_EXTRA_OBJS)
+AC_SUBST(WINBIND_NSS_EXTRA_LIBS)
+AC_SUBST(NSSSONAMEVERSIONSUFFIX)
+
+AC_SUBST(WINBIND_KRB5_LOCATOR)
+
 # Solaris 10 does have new member in nss_XbyY_key
 AC_CHECK_MEMBER(union nss_XbyY_key.ipnode.af_family,
AC_DEFINE(HAVE_NSS_XBYY_KEY_IPNODE, 1, [Defined if union 
nss_XbyY_key has ipnode field]),,


-- 
Samba Shared Repository


Re: [SCM] Draft Samba Repository branch, v3-2-unstable, updated. 4da9ac14bb49c8a977b57c97402244d98aa6fb92

2007-10-05 Thread James Peach

On Oct 5, 2007, at 9:38 AM, Gerald (Jerry) Carter wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Fyi...

The From: on the commit mail will always be from the person
pushing to the repo.  But the history in the log commits will
be ok.

Metze, this is the standard post-receive-email script in
the contrib/ directory of the git source code.


How keen are you to remain standard? I find is very useful to get the  
actual diffs in the commit email.


--
James Peach | [EMAIL PROTECTED]





Re: [Samba] Illegal Characters in filename

2007-09-14 Thread James Peach
On 14/09/2007, Sean Dizazzo [EMAIL PROTECTED] wrote:
 Hi all,

 We are sharing directories from Windows 2003 server to, among other
 things, Mac computers.  Most of the time the windows shares work
 perfectly.  However we are running into a problem with users entering
 odd characters into file names on the Mac clients.

What sort of characters?

 The Mac clients see these files/folders perfectly fine, as samba on
 the Mac allows for these odd characters.  However, if someone tries to
 access one of these files on a  windows client, the operation errors
 out.  The errors range from not sufficient permissions to the file
 doesn't exist

Which windows clients? If the server is happy to accept file names
with these characters in them, it's odd that clients would not also
accept them.

 For internal use, we can yell at the offenders to have them stop
 adding odd characters to the names.  This will work somewhat.  But
 some of these files and folders are created by external clients that
 are much harder to yell at.

 Is there any way to either use the mac samba client to limit the
 allowed characters, or to somehow force a filename change when an
 illegal character is entered?

Not to my knowledge.

The Mac client is not Samba, so you might have better luck on a
Mac-specific mailing list, eg:
http://lists.apple.com/mailman/listinfo/macos-x-server/

make sure you note what Os the mac clients are running and whether the
SMB client is the Apple one or the Thursby one

-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Samba and OSX 10.4

2007-08-29 Thread James Peach
On 17/08/2007, Kevin McIntosh [EMAIL PROTECTED] wrote:
 Is OSX 10.4.10 compatible with Samba's print server software?

yes

 My I.T. Dept
 has had no luck in getting this to work.  From what I've seen online, there
 does seem to be issues, but Samba also seems to be fully supported by Apple
 which doesn't make sense if it's not compatible.

you might ask on one of the OS X Server lists:
http://lists.apple.com/mailman/listinfo/macos-x-server/

you should also provide details on exactly what you tried and how it
fails to work

-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] remove group mappings manually?

2007-08-22 Thread James Peach
On 16/08/07, Paddy O'Herlihy [EMAIL PROTECTED] wrote:
 Hi,

 We have a os x server here with duplicate groupmappings unfortunately the
 net groupmap functions are broken due to apple modifications.

 Can I manually delete the groupmapping from the database?

 I assumed the group mappings were stored in ldap but can't find any
 reference there. The group_mapping tdb also seems empty so asides rom
 looking at the source I am at a loss.

The right way to manipulate group mappings on OS X server is to use
Workgroup Manager. You can add SMBSID or SMBRID attributes to groups
to force them to be mapped to particular absolute or domain-relative
SIDs.

-- 
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Problem with MacOSX and SAMBA

2007-06-07 Thread James Peach

On 07/06/07, Dr.Peer-Joachim Koch [EMAIL PROTECTED] wrote:

Hi,

our Mac users have sometimes trouble with samba shares.
Those users are not able for a certain time ( 0.5 -20 sec)
to read or write to files.
Some reported error messages like read only file or
file not found.

Windows users (XP) have some also slow access, but no further
problems.

Our file system is also used from or linux cluster (192CPU),
but we are using a GFS to share the load. I'm not sure if
the gfs or ldap or something else causes the delay in the file
i/o. Error messages did not appear in the samba (normal) log.

Any idea ?


Not really. Do these problems reproduce with a local filesystem (eg.
EXT3 or XFS)?

If you could provide a packet trace of the OS X clients that might be
helpful (maybe).

--
James Peach | [EMAIL PROTECTED]
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] OSX losses link when samba is restarted

2007-05-25 Thread James Peach

On 25/05/07, Alexander Lazarevich [EMAIL PROTECTED] wrote:

 [EMAIL PROTECTED] wrote:
 We run Samba 3.0.24 on a FC5 and RHEL4-AS systems. Works great with windows
 clients, and OSX clients work great with it too except for one problem:

 Whenever I restart samba (with /etc/init.d/smb restart) any OSX client that
 has a samba share open will lose that connection, and so if a person had a
 file open and was editing, all changes made since the last save are lost.
 This of course does NOT happen with windows clients, they are smart enough
 to recognize the link is reconnected. But OSX losses the link completely,
 and the share has to be remounted, which is really silly.

 I'm not sure if there is some smb.conf setting that will fix this for OSX,
 and not screw things up for windows clients. Or maybe there is an OSX tweek
 to make on each client? I searched this list for OSX and found no similar
 problems. Arghgh.

 Anyone see this behavior and know of a fix.

 Our OSX clients are 10.4.9.

 Thanks in advance,

 Alex

 This is normal behavior of OS X, I'm afraid. I would love to have a way
 around it too.

 Andy

Well shoot, okay so it's normal behavior, but isn't there some system
setting that can be changed on the mac that changes the behavior? There
must be some fix for this, I mean this is nuts if that's just the way it
is and there really is no way around it.


Unfortunately there is no fix in 10.4. You could file a bug with
Apple, but I don't like your chances.


Is there any documentation you can point me to that talks about this
issue?


there might be something on http://www.apple.com/support


My boss uses OSX and I don't think he's going to be happy if I just
say,  there is no way around it, and don't say nothing else.


FWIW, the SMB client is noticeably improved in 10.5.

--
James Peach | [EMAIL PROTECTED]
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: svn commit: samba r23108 - in branches: SAMBA_3_0/source/lib/replace SAMBA_3_0_26/source/lib/replace SAMBA_4_0/source/lib/replace

2007-05-24 Thread James Peach

On May 24, 2007, at 12:15 AM, [EMAIL PROTECTED] wrote:


Author: obnox
Date: 2007-05-24 07:15:36 + (Thu, 24 May 2007)
New Revision: 23108

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23108

Log:
Add defines of RTLD_NOW and RTLD_GLOBAL to replace.h.
Fixing build of ldb for instance on some systems without dlfcn.h.


Modified:
  branches/SAMBA_3_0/source/lib/replace/replace.h
  branches/SAMBA_3_0_26/source/lib/replace/replace.h
  branches/SAMBA_4_0/source/lib/replace/replace.h


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/replace.h
===
--- branches/SAMBA_3_0/source/lib/replace/replace.h	2007-05-24  
01:57:02 UTC (rev 23107)
+++ branches/SAMBA_3_0/source/lib/replace/replace.h	2007-05-24  
07:15:36 UTC (rev 23108)

@@ -111,11 +111,6 @@
extern int errno;
#endif

-#if defined(HAVE_LINUX_READAHEAD)  ! defined(HAVE_READAHEAD_DECL)
-ssize_t readahead(int fd, off64_t offset, size_t count);
-#endif
-
-
#ifndef HAVE_STRDUP
#define strdup rep_strdup
char *rep_strdup(const char *s);
@@ -326,6 +321,12 @@
#ifndef RTLD_LAZY
#define RTLD_LAZY 0
#endif
+#ifndef RTLD_NOW
+#define RTLD_NOW 0
+#endif
+#ifndef RTLD_GLOBAL
+#define RTLD_GLOBAL 0
+#endif


Is there any expectation that this is actually going to work? If we  
cabn't figure out the header that these definition live in, then  
making them up isn't necessarily going to help, eg. on AIX RTLD_GLOBAL  
appears to be 0x100. I don't know any system that defines them *all*  
to zero.


If ldb requires these definitions, Id suggest simply disabling shared  
library support in lds unless they are present. That seems safer that  
passing an arbitrary (random?) value into dlopen.


--
James Peach | [EMAIL PROTECTED]



Re: [Samba] strict allocate = no does not work

2007-05-04 Thread James Peach

On 04/05/07, Markus Knapp [EMAIL PROTECTED] wrote:

Hi!

I've got Debian 4.0 on an NSLU2 with Samba. The system is on an
USB-Stick, the Samba share is on an USB-Disk.


If the filesystem some version of FAT? If so, FAT does not support
holey files, so  you will always get strict allocation.

--
James Peach | [EMAIL PROTECTED]
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: svn commit: samba r22318 - in branches: SAMBA_3_0/source/lib SAMBA_3_0_25/source/lib

2007-04-17 Thread James Peach

On 17/04/2007, at 10:17 AM, [EMAIL PROTECTED] wrote:


Author: lmuelle
Date: 2007-04-17 17:17:19 + (Tue, 17 Apr 2007)
New Revision: 22318

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22318

Log:
If we're running as non root we might not be able to dump the core  
file

to the corepath.

Even the chdir() will fail if the LOGFILEBASE path is set 0700.

If the currrent user doesn't have the permission to create the core  
file

we end with:
  unable to change to LOGFILEBASE
  refusing to dump core

The alternative would be to change the permissions of the directory.
But taht would not ensure core dumps are working out of the box.

Modified:
  branches/SAMBA_3_0/source/lib/fault.c
  branches/SAMBA_3_0_25/source/lib/fault.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/fault.c
===
--- branches/SAMBA_3_0/source/lib/fault.c	2007-04-17 17:07:14 UTC  
(rev 22317)
+++ branches/SAMBA_3_0/source/lib/fault.c	2007-04-17 17:17:19 UTC  
(rev 22318)

@@ -161,6 +161,13 @@
}

#if DUMP_CORE
+	/* If we're running as non root we might not be able to dump the  
core
+	 * file to the corepath.  There must not be an unbecome_root()  
before

+* we call abort(). */
+   if (getuid() != 0) {


Do you need to check geteuid() here?

--
James Peach | [EMAIL PROTECTED]



Re: [Samba] Performance Problems in smbmount but not in smbclient

2007-04-13 Thread James Peach

On 13/04/07, Rob Caskey [EMAIL PROTECTED] wrote:

I have an OS X 10.4 Server machine that has abysmal performance when
copying files to it over smbmount from a linux machine or through Finder
on OS X but performs very well when copying files through smbclient from
the same Linux and OS X machines. I have already tried the commonly
suggested adjustment of net.inet.tcp.delayed_ack=0 and have not noticed
a significant performance improvement. Through smbmount I am seeing
about 2-3 megs up and 8 megs down, when I am in the upper 20s or lower
30s/sec with smbclient.

What could account for this performance discrepancy?


You are using 2 completely different SMB clients, which have different
performance characteristics. Try using cifsfs on Linux - it's
supported and reputed to have good performance.

--
James Peach | [EMAIL PROTECTED]
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: svn commit: samba r22132 - in branches: SAMBA_3_0/source/modules SAMBA_3_0/source/smbd SAMBA_3_0_25/source/modules SAMBA_3_0_25/source/smbd

2007-04-08 Thread James Peach

On 08/04/2007, at 12:41 PM, [EMAIL PROTECTED] wrote:


Author: jra
Date: 2007-04-08 19:41:47 + (Sun, 08 Apr 2007)
New Revision: 22132

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi? 
view=revroot=sambarev=22132


Log:
I hate inefficiency. Don't call conv_str_size()
on every pread/sendfile call, initialize these
variables in an allocated struct at connection
time and just refer to them directly.


This code is so close to vfs_cacheprime that I'm tempted to suggest  
they should be merged. Was there a particular reason you didn't do this?


--
James Peach | [EMAIL PROTECTED]




Re: svn commit: samba r22132 - in branches: SAMBA_3_0/source/modules SAMBA_3_0/source/smbd SAMBA_3_0_25/source/modules SAMBA_3_0_25/source/smbd

2007-04-08 Thread James Peach

On 08/04/2007, at 4:54 PM, Jeremy Allison wrote:


On Sun, Apr 08, 2007 at 03:25:55PM -0700, James Peach wrote:

On 08/04/2007, at 12:41 PM, [EMAIL PROTECTED] wrote:


Author: jra
Date: 2007-04-08 19:41:47 + (Sun, 08 Apr 2007)
New Revision: 22132

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?
view=revroot=sambarev=22132

Log:
I hate inefficiency. Don't call conv_str_size()
on every pread/sendfile call, initialize these
variables in an allocated struct at connection
time and just refer to them directly.


This code is so close to vfs_cacheprime that I'm tempted to suggest
they should be merged. Was there a particular reason you didn't do  
this?


Yes - mine is much simpler :-). I was just doing
the minimal thing that works for Vista.

Doing cacheprime isn't the same as the readahead()
system call on Linux. posix_fadvise is close enough
that I could squeeze it in


You could add this to vfs_cacheprime, and just have an option that  
determines whether it does a readahead (ie. I/O hint) or an actual  
read(2).



This code gives a marked speed increase for Vista
clients when using explorer against Linux servers.


Sure, but 2 modules that do *almost* the same thing is just confusing.

--
James Peach | [EMAIL PROTECTED]




Re: svn commit: samba r22132 - in branches: SAMBA_3_0/source/modules SAMBA_3_0/source/smbd SAMBA_3_0_25/source/modules SAMBA_3_0_25/source/smbd

2007-04-08 Thread James Peach


On 08/04/2007, at 5:23 PM, Jeremy Allison wrote:


On Sun, Apr 08, 2007 at 05:09:36PM -0700, James Peach wrote:


You could add this to vfs_cacheprime, and just have an option that
determines whether it does a readahead (ie. I/O hint) or an actual
read(2).


I await your patch :-).


I knew you were going to say that!
Sure, but 2 modules that do *almost* the same thing is just  
confusing.


I don't think they do. readahead is built around
this one syscall on Linux. It's not the same as
cacheprime - cacheprime reads from the start of
the file, readahead triggers on every pread/sendfile
request that matches offset MOD readahead_offset.


They're not *exactly* the same, but they are mostly the same. The  
difference is quite subtle. This patch should resolve the differences:


Index: SAMBA_3_0/source/modules/vfs_cacheprime.c
===
--- SAMBA_3_0/source/modules/vfs_cacheprime.c   (revision 22132)
+++ SAMBA_3_0/source/modules/vfs_cacheprime.c   (working copy)
@@ -1,5 +1,6 @@
/*
- * Copyright (c) James Peach 2005-2006
+ * Copyright (c) James Peach 2005-2007
+ * Copyright (c) Jeremy Allison 2007
  *
  * 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

@@ -31,6 +32,14 @@
  *  cacheprime:rsizeAmount of readahead in bytes. This  
should be a

  *  multiple of the RAID stripe width.
  *  cacheprime:debugDebug level at which to emit messages.
+ *  cacheprime:force alignment
+ *  Force all I/O to be aligned to an rsize  
boundary.
+ *  If this is false, we simply issue a  
readahead on

+ *  each rsize boundary.
+ *
+ * To configure for Vista:
+ *  cacheprime:rsize = 0x8
+ *  cacheprime:force alignment = no
  */
#define READAHEAD_MIN   (128 * 1024)/* min is 128 KiB */
@@ -41,7 +50,38 @@
static int module_debug;
static ssize_t g_readsz = 0;
static void * g_readbuf = NULL;
+static BOOL g_forcealign = False;
+static void sys_readahead(int fd, SMB_OFF_T offset, SMB_OFF_T len)
+{
+static BOOL didmsg = False;
+int err;
+
+#if defined(HAVE_LINUX_READAHEAD)
+   err = readahead(fromfd, offset, (size_t)rhd-len);
+
+		DEBUG(10,(%s: readahead on fd %u, offset %llu, len %u returned %d 
\n,

+MODULE,
+   (unsigned int)fromfd,
+   (unsigned long long)offset,
+   (unsigned int)rhd-len,
+   err ));
+#elif defined(HAVE_POSIX_FADVISE)
+		err = posix_fadvise(fromfd, offset, (off_t)rhd-len,  
POSIX_FADV_WILLNEED);
+		DEBUG(10,(%s: posix_fadvise on fd %u, offset %llu, len %u  
returned %d\n,

+MODULE,
+   (unsigned int)fromfd,
+   (unsigned long long)offset,
+   (unsigned int)rhd-len,
+   err ));
+#else
+   if (!didmsg) {
+   DEBUG(0,(%s: no readahead on this platform\n, 
MODULE));
+   didmsg = True;
+   }
+#endif
+}
+
/* Prime the kernel buffer cache with data from the specified file.  
We use
  * per-fsp data to make sure we only ever do this once. If pread is  
being

  * emulated by seek/read/seek, when this will suck quite a lot.
@@ -71,15 +111,20 @@
 return False;
 }
-DEBUG(module_debug,
-(%s: doing readahead of %lld bytes at %lld for %s\n,
-MODULE, (long long)g_readsz, (long long)*last,
-fsp-fsp_name));
+if (g_forcealign) {
+DEBUG(module_debug,
+(%s: doing readahead of %lld bytes at %lld for % 
s\n,

+MODULE, (long long)g_readsz, (long long)*last,
+fsp-fsp_name));
-nread = sys_pread(fd, g_readbuf, g_readsz, *last);
-if (nread  0) {
-*last = -1;
-return False;
+nread = sys_pread(fd, g_readbuf, g_readsz, *last);
+if (nread  0) {
+*last = -1;
+return False;
+}
+} else {
+sys_readahead(fd, *last, g_readsz);
+nread += g_readsz;
 }
 *last += nread;
@@ -103,6 +148,9 @@
 g_readsz = conv_str_size(lp_parm_const_string(SNUM(handle- 
conn),

 MODULE, rsize, NULL));
+g_forcealign = lp_parm_bool(SNUM(handle-conn), MODULE,
+force alignment, False);
+
 if (g_readsz  READAHEAD_MIN) {
 DEBUG(module_debug, (%s: %ld bytes of readahead 
 requested, using minimum of %u\n,
@@ -115,9 +163,11 @@
 g_readsz = READAHEAD_MAX;
 }
-if ((g_readbuf = SMB_MALLOC(g_readsz)) == NULL

Re: [Samba] Mac OSX Samba Q

2007-04-03 Thread James Peach

On 03/04/07, Dawn  Marie Perry [EMAIL PROTECTED] wrote:

Are Samba  Quark compatible?


I haven't tested quark, but I don't know of any problems.

--
James Peach | [EMAIL PROTECTED]
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: svn commit: samba r22037 - in branches/SAMBA_4_0/source/build/smb_build: .

2007-04-02 Thread James Peach

On Apr 2, 2007, at 11:13 AM, Stefan (metze) Metzmacher wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[EMAIL PROTECTED] schrieb:

Author: jpeach
Date: 2007-04-02 17:29:03 + (Mon, 02 Apr 2007)
New Revision: 22037

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=22037

Log:
Make sure STATICDIR exists before linking a static archive.


Hi James,

thanks for splitting up this commit:-)

have you thought about the $ vs.*.c yet?


I think the right thing might be to require GNU Make for $srcdir !=  
$builddir. If you search the automake mailing list, there are claims  
that GNU Make is the only make that implements VPATH correctly.


So the trick is to actually implement this. Since configure doesn't do  
substitutions on main.mk AFAICT, probably the best thing to do is to  
have the perl build tools emit the default build rules somewhere.


--
James Peach | [EMAIL PROTECTED]



Re: svn commit: samba r21991 - in branches/SAMBA_3_0/source: include lib libsmb smbd

2007-03-29 Thread James Peach

On Mar 29, 2007, at 9:31 AM, Jeremy Allison wrote:

On Thu, Mar 29, 2007 at 09:41:23AM +0200, Stefan (metze) Metzmacher  
wrote:







Log:



I hate Steve French :-). Add support for encryption



contexts



Jeremy.


Hi Jeremy,

can you explain that a bit more?


What - the hating Steve French (that's obvious) or the encryption
contexts ?

What is the typical request sequence to establish the encryption  
context?


trans2 setfsinfo.

So the encryption context is attached to the connection_struct  
(which is

a tree connect in samba3)?


That's the plan - not yet implemented. Context zero represents
the global context for fully encrypted traffic on all tid's.

Wouldn't it be better to attach it to the session id instead of the  
tree

id, as a tree id can be used by multiple sessions.


No. The use case Steve bugged me about was the ability
to have some shares (tid's) encrypted and some not on
the same session. In this case encryption is a property
of the tid, not the sessionid.


Why is having the ability to do this a good thing? If a client wants  
to do unencrypted traffic it can always set up a new session.


--
James Peach | [EMAIL PROTECTED]



Re: svn commit: samba r21991 - in branches/SAMBA_3_0/source: include lib libsmb smbd

2007-03-29 Thread James Peach

On Mar 29, 2007, at 10:35 AM, Jeremy Allison wrote:


On Thu, Mar 29, 2007 at 10:23:57AM -0700, James Peach wrote:


Why is having the ability to do this a good thing? If a client wants
to do unencrypted traffic it can always set up a new session.


Yes, but the thing that convinced me was the ability
to have the following :

[share_secure]
   encryption = mandatory
   path = /

[share_unsecure]
   encryption = auto (or no)
   path = /yyy

If we want the server to be able to make
encryption mandatory and we don't allow
it per share then we disallow that server
from serving any unencrypted (currently
Windows) clients.


You probably also want to allow shares to have different levels of  
encryption. For example,


[share_really_secure]
encryption = mandatory
minimum encryption = the_best_algorithm_we_implement

[homes]
encryption = mandatory
minimum encryption = the_faster_but_weaker_algorithm


People probably want the ability to
serve both encrypted and non encrypted
shares from the saem server.

Currently the point is moot as the
implmentation only supported encryption
context zero - ie. encrypt everything.

But the goal is not to contrain the
design.


There's 2 issues - the first is supporting the configuration above,  
the second is that the only space we have in the protocol is in trans2  
levels which require a tree connection.


If you wanted encryption to be a property of the VC, you could connect  
to [Samba$] and negotiate it there which would work around the second  
issue. If some shares require encryption and some don't you can just  
set up different VCs to handle it.


That said, we can live with having encryption as a property of the  
TID :)


--
James Peach | [EMAIL PROTECTED]



Re: svn commit: samba r21931 - in branches/SAMBA_3_0/source: . lib/replace/system

2007-03-22 Thread James Peach


On Mar 22, 2007, at 10:35 AM, [EMAIL PROTECTED] wrote:


Author: metze
Date: 2007-03-22 17:35:34 + (Thu, 22 Mar 2007)
New Revision: 21931

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21931

Log:
include acl/libacl.h is present


[snip]



Modified: branches/SAMBA_3_0/source/lib/replace/system/filesys.h
===
--- branches/SAMBA_3_0/source/lib/replace/system/filesys.h 
2007-03-22 13:15:36 UTC (rev 21930)
+++ branches/SAMBA_3_0/source/lib/replace/system/filesys.h 
2007-03-22 17:35:34 UTC (rev 21931)

@@ -41,6 +41,10 @@
#include sys/acl.h
#endif

+#ifdef HAVE_SYS_ACL_H

 ^^ this should be HAVE_ACL_LIBACL_H



+#include acl/libacl.h
+#endif
+
#ifdef HAVE_SYS_FS_S5PARAM_H
#include sys/fs/s5param.h
#endif



--
James Peach | [EMAIL PROTECTED]





Re: svn commit: samba r21918 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_25/source/nsswitch SAMBA_3_0_RELEASE/source/nsswitch

2007-03-21 Thread James Peach

On 21/03/2007, at 2:08 PM, [EMAIL PROTECTED] wrote:


Author: jerry
Date: 2007-03-21 21:08:15 + (Wed, 21 Mar 2007)
New Revision: 21918

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi? 
view=revroot=sambarev=21918


Log:
Reverting this change as it is now causing aborts() in


Thanks for finding this Jerry.


find_builtin_domain().This all needs more testing
before anyone starts changing these lookup routines again.


So when the idmap code calls find_domain_from_sid_noinit with a local  
SID, it is supposed to return NULL so that it falls through to the  
passdb backend. OTOH it can't ever fail for the BUILTIN domain (even  
though that is a local SID) because we can't not have a BUILTIN domain.


Am I reading this right?

--
James Peach | [EMAIL PROTECTED]




Re: [Samba] Resolution of Groups on Mac OS X 10.4.8...

2007-03-12 Thread James Peach

On 12/03/07, Peter [EMAIL PROTECTED] wrote:

Hi,

my Problem:

I tried to limit the disk usage for certain samba users by means of
group quotas. But when looking at the disk free space from the client
the quota is not honoured. So I wrote a little script trying to find
out the quota left using the dfree command setting. So far
everything is fine, but now, as soon as the script is called (I
placed some debug output there) the groups, the user signing on via
samba is member of, are not recognised. Calling id for this
purpose, I got for my user a:

uid=1001(a) gid=1099(dummy) groups=1099(dummy)

but called from the commend line (after su s2) I got:

uid=1001(a) gid=1099(dummy) groups=1099(dummy), 1098(tmp), 1002(x),
1001(y)

So my questions are:
How are those groups are resolved in Mac OS X?


The standard unix group APIs call into libc, which eventually ends up
in Directory Services and memberd. There are at least 2 layers of
caching involved, so it is probably possible to see stale group
membership information if you are unlucky.

id(1) will only ever show you up to 15 supplementary groups. Also, Mac
OS X supports nested groups, which can be surprising sometimes.

You can check group memberships with dseditgroup(8):

http://developer.apple.com/documentation/Darwin/Reference/ManPages/man8/dseditgroup.8.html


Which mechanism is
used by samba (the default installation provided by apple) to resolve
this???


IIRC, Samba uses getgroups/setgroups on 10.4.

--
James Peach | [EMAIL PROTECTED]
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: svn commit: samba r21783 - in branches: SAMBA_3_0/source/include SAMBA_3_0/source/smbd SAMBA_3_0_25/source/include SAMBA_3_0_25/source/smbd

2007-03-10 Thread James Peach

On 10/03/2007, at 6:33 PM, [EMAIL PROTECTED] wrote:


Author: jra
Date: 2007-03-11 02:33:17 + (Sun, 11 Mar 2007)
New Revision: 21783

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi? 
view=revroot=sambarev=21783


Log:
Add in the create info field to the reply
from POSIX_OPEN and POSIX_MKDIR as specified
by Stevef in the wikki (extra 4 byte field).

Also fix horrible bug in James's code (James
you should review this for your Apple patch
tree) where he failed to allocate the correct
return memory size when returning a INFO2


Thanks Jeremy, I'll take a look to see why my test didn't catch this.

--
James Peach | [EMAIL PROTECTED]




Re: [Samba] MAC OSX-Users - samba PDC - passwd

2007-02-19 Thread James Peach

On 19/02/07, Dr.Peer-Joachim Koch [EMAIL PROTECTED] wrote:

Hi,

we have just moved our old NT4 domain to some linux
boxes running samba as a PDC.

Everything is working well, but ...

Setting passwords seems to be tricky. For
Windows eyerything is working great. All passwords
(unix,windows) are correctly set.
For linux I've written a little wrapper to call smbpasswd
and this is also working withou any problems.

But what to do for MAC OSX users ?
Any idea ?


This isn't something I've ever needed to do, but there's likely to be
a hint somewhere in the server documentation:
   http://www.apple.com/server/documentation/

Otherwise, you might ask on the os-x-server list (lists.apple.com) or
macenterprise list at macenterprise.org.

--
James Peach | [EMAIL PROTECTED]
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Re: ClearCase Interop problem with recent Samba versions

2007-02-18 Thread James Peach

On Feb 16, 2007, at 12:19 PM, Volker Lendecke wrote:


On Fri, Feb 16, 2007 at 05:46:08PM +, Bill Marshall wrote:

I think the Vmware Physical to Virtual converter
http://www.vmware.com/products/converter/ also has problems with  
systems that
claim to host msdfs. The wizard failed with a crazy error and there  
wasn't a

hint until I did some network traces.


Just thought if it was wise to enable dfs by default. It
seems to cause quite difficult to track down grief in some
situations.


My experience is that host msdfs is OK since it just sets the  
capability bit. msdfs root can cause changes in client behaviour. We  
saw this in netbench testing ... I can probably dig up the traces if  
necessary.


--
James Peach | [EMAIL PROTECTED]

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Sniffer techniques

2007-02-10 Thread James Peach

On 10/02/07, John Schmerold [EMAIL PROTECTED] wrote:

As the group knows, I'm having compatibility issues with a critical
database application. It's been wisely suggested that I monitor the
line to see what's up. Problem is: I've never done this before 
suspect others like me are not familiar with these techniques.

I did find an old LinuxWorld article http://tinyurl.com/yrjurx however
I help thinking there is more on the top.

Anyone find one or more how-tos especially enlightning?


There's some very brief info about packet sniffing here:
http://wiki.samba.org/index.php/Capture_Packets

--
James Peach | [EMAIL PROTECTED]
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: svn commit: samba r21111 - in branches/SAMBA_3_0/source: modules param smbd

2007-02-01 Thread James Peach

On Feb 1, 2007, at 7:11 AM, [EMAIL PROTECTED] wrote:


Author: vlendec
Date: 2007-02-01 15:11:06 + (Thu, 01 Feb 2007)
New Revision: 2

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=2

Log:
Reorganize the change notify params a bit. We now have the per-share
parameters

change notify = [yes]/no   # do we do it at all
kernel change notify = [yes]/no# enable/disable inotify

Those who want FAM need to say

change notify = yes
vfs objects = notify_fam


I would have thought that both inotify and FAM should be modules?

--
James Peach | [EMAIL PROTECTED]



Re: [Samba] Advertising Samba shares on the local network via mDNS

2007-01-31 Thread James Peach

On 31/01/07, Rishi Srivatsavai [EMAIL PROTECTED] wrote:

Hello All,

I would like to add support for advertising Samba shares (browseable ones)
on the local network using Multicast DNS. Multicast DNS allows applications
to query/publish network services on the local link. I would appreciate if
you
could all please share your thoughts on whether such support would be
welcome in Samba. If you know of existing efforts in Samba to include
such support please let me know as well.


On Mac OS X, the Samba service is already advertised over mDNS (by
launchd). It would be useful to add the list of shares to the
advertisement though.

--
James Peach | [EMAIL PROTECTED]
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: svn commit: samba r21068 - in branches/SAMBA_4_0/source/script/tests: .

2007-01-30 Thread James Peach

On 30/01/2007, at 5:28 PM, [EMAIL PROTECTED] wrote:


Author: abartlet
Date: 2007-01-31 01:28:55 + (Wed, 31 Jan 2007)
New Revision: 21068

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi? 
view=revroot=sambarev=21068


Log:
Code to configure, start and stop Fedora DS.

We can't actually use it, as we are stuck inside our socket_wrapper
network, and can't talk to it.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/script/tests/mktestsetup.sh


This might be better in a separate platform script which  
mktestsetup.sh calls ...


--
James Peach | [EMAIL PROTECTED]




Re: [Samba] Mac OS X and AD

2007-01-20 Thread James Peach

On 20/01/07, David A. Toth [EMAIL PROTECTED] wrote:

I have a question about integrating MAc OS X and Windows 2003 AD Domain.
Getting the machine to join the doamin is easy. But when I try to map the home
drives, I can see them but not access them. There was a note that implied this 
is due
to sending encrypted vs non-encrypted with samba and that Win 2K3 server SP1
broke that. It says to disable kerberos authentication on the Windows side. Is 
that
the case or is there a fix for Samba that re-enables this feature. Sorry I 
don't have
the version of Samba it is using but just wondering if anyone on the list can 
point me
in the right direction. Thanks!


The best place to ask this sort of question is the macos-x-server list:
   http://lists.apple.com/mailman/listinfo/macos-x-server

--
James Peach | [EMAIL PROTECTED]
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Samba 3.0.10 - Invalid Value!!!

2007-01-12 Thread James Peach

On 12/01/07, Volker Lendecke [EMAIL PROTECTED] wrote:

On Thu, Jan 11, 2007 at 03:20:39PM -0800, Niatross wrote:
 I have a Macintosh Xserve running OS 10.4.8 and it's running Samba 3.0.10.
 Everytime a Windows XP workstation logs off the Macintosh Xserve server, the
 following shows up in the log.smbd (located at var/log/samba):

 [2007/01/11 14:24:17, 0] pdb_ods.c:make_a_mod(2045)
  make_a_mod: INVALID VALUE!!!

pdb_ods.c is not in the original Samba sources, I would
expect that this is a modification that Apple has made.

You should contact your Apple support for help on this
topic.


See http://developer.apple.com/bugreporter/ for how to open an Apple
bug. They'll probably ask for a packet trace of this.

--
James Peach | [EMAIL PROTECTED]
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: svn commit: samba r20699 - in branches/SAMBA_3_0/source/smbd: .

2007-01-12 Thread James Peach

On Jan 12, 2007, at 12:49 AM, [EMAIL PROTECTED] wrote:


Author: vlendec
Date: 2007-01-12 08:49:09 + (Fri, 12 Jan 2007)
New Revision: 20699

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=20699

Log:
This is an attempt to fix bug 4326.

James, can you please confirm this and merge it to 3_0_24? For me it  
fixes the

segfault.


Looks good to me.

--
James Peach | [EMAIL PROTECTED]



Re: svn commit: samba r20655 - in branches/SAMBA_3_0_24/source: client include libsmb printing rpc_server smbd

2007-01-10 Thread James Peach


On Jan 10, 2007, at 9:47 AM, [EMAIL PROTECTED] wrote:


Author: jra
Date: 2007-01-10 17:47:53 + (Wed, 10 Jan 2007)
New Revision: 20655

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=20655

Log:
After consulting with Volker, fix our pathname
handling. Gets rid of more code than it adds.
I will port this to SAMBA_3_0 next. There are
still some wrinkles with wildcard delete I am
working on - for example a dirtype pattern of
0x8aa4 isn't handled correctly yet still
looking at this.
Jeremy.

Modified:
   branches/SAMBA_3_0_24/source/client/client.c
   branches/SAMBA_3_0_24/source/include/smb.h
   branches/SAMBA_3_0_24/source/include/smb_macros.h


ISDOT and ISDOTDOT are already defined in lib/replace/system/dir.h. Do  
you really need them here?



   branches/SAMBA_3_0_24/source/libsmb/clifile.c
   branches/SAMBA_3_0_24/source/libsmb/errormap.c
   branches/SAMBA_3_0_24/source/printing/nt_printing.c
   branches/SAMBA_3_0_24/source/rpc_server/srv_srvsvc_nt.c
   branches/SAMBA_3_0_24/source/smbd/dosmode.c
   branches/SAMBA_3_0_24/source/smbd/filename.c


Do you really mean if (ISDOT(start))? If ISDOT(start) is true, then  
end is guaranteed to be '\0'.


--
James Peach | [EMAIL PROTECTED]



Re: svn commit: samba r20655 - in branches/SAMBA_3_0_24/source: client include libsmb printing rpc_server smbd

2007-01-10 Thread James Peach


On Jan 10, 2007, at 11:15 AM, Jeremy Allison wrote:


On Wed, Jan 10, 2007 at 10:59:35AM -0800, James Peach wrote:

  branches/SAMBA_3_0_24/source/client/client.c
  branches/SAMBA_3_0_24/source/include/smb.h
  branches/SAMBA_3_0_24/source/include/smb_macros.h


ISDOT and ISDOTDOT are already defined in lib/replace/system/dir.h.  
Do

you really need them here?


They were already in smbd/dir.c


Yeh, I put them there in the pre-libreplace days.




Do you really mean if (ISDOT(start))? If ISDOT(start) is true, then
end is guaranteed to be '\0'.


Yes I think so


'k

--
James Peach | [EMAIL PROTECTED]



Re: svn commit: samba r20394 - in branches/SAMBA_3_0/source: include lib smbd

2006-12-28 Thread James Peach

On 28/12/2006, at 1:50 PM, [EMAIL PROTECTED] wrote:


Author: vlendec
Date: 2006-12-28 21:50:31 + (Thu, 28 Dec 2006)
New Revision: 20394

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi? 
view=revroot=sambarev=20394


Log:
This is a *VERY* early start of my work on notify.


What's the goal of this work? ie. can you give a idea of the final  
design that you are working towards?


--
James Peach | [EMAIL PROTECTED]




Re: [Samba] XP Clients kicked off Tiger Server - not consistent

2006-12-20 Thread James Peach

On 20/12/06, Paul McGrath [EMAIL PROTECTED] wrote:

Hi,
  I am running a Panther Server as a domain controller with a Mac Tiger
Server (all latest patches) as the location of home folders and group
shares.  I have one group of users who keep losing connection to the
server (both home and group folders).  The can only reconnect to the
server if they logoff the XP client and login again.  I have loads of
other XP users and Mac clients who do not have this problem.  They are
all using XPSP2.  I've tried loads of server settings and some XP
registry settings but it still happens.  Some of these PCs where ghosted
and I didn't change the SID so I am going to try that next.  Any other


You might have better luck asking the OS X server folk over at
   http://lists.apple.com/mailman/listinfo/macos-x-server

--
James Peach | [EMAIL PROTECTED]
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Compilation error on Mac OS X 10.4.7

2006-12-13 Thread James Peach

On 13/12/06, Olivier Meyer [EMAIL PROTECTED] wrote:

Dear List:

I am having difficulties compiling samba-3.0.23d on mac os x.
Here is the output of 'uname -a':
Darwin TI-15 8.7.0 Darwin Kernel Version 8.7.0: Fri May 26 15:20:53
PDT 2006; root:xnu-792.6.76.obj~1/RELEASE_PPC Power Macintosh powerpc

The errors I get are:
Compiling lib/system.c
lib/system.c: In function 'sys_getxattr':
lib/system.c:1420: error: too few arguments to function 'getxattr'
lib/system.c: In function 'sys_fgetxattr':
lib/system.c:1504: error: too few arguments to function 'fgetxattr'
lib/system.c: In function 'sys_listxattr':
lib/system.c:1705: error: too few arguments to function 'listxattr'
lib/system.c: In function 'sys_flistxattr':
lib/system.c:1741: error: too few arguments to function 'flistxattr'
lib/system.c: In function 'sys_removexattr':
lib/system.c:1759: error: too few arguments to function 'removexattr'
lib/system.c: In function 'sys_fremovexattr':
lib/system.c:1811: error: too few arguments to function 'fremovexattr'
lib/system.c: In function 'sys_setxattr':
lib/system.c:1842: error: too few arguments to function 'setxattr'
lib/system.c: In function 'sys_fsetxattr':
lib/system.c:1939: error: too few arguments to function 'fsetxattr'

Since I am a C programmer, I looked at the prototype for getxattr.
It is  ssize_t getxattr(const char *path, const char *name, void
*value, size_t size, u_int32_t position, int options);
and in the lib/system.c, it is called as:
return getxattr(path, name, value, size);

I think that position and options can safely be set to zero, but could
someone tell me if configure can be told to detect the prototype for
getxattr, and add 0,0 to the argument list.


This is fixed in the svn repository. To download and build this, see
http://us2.samba.org/samba/devel/

--
James Peach | [EMAIL PROTECTED]
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Authenticating to a MacOS X server

2006-12-12 Thread James Peach

On 12/12/06, Luke Sharkey [EMAIL PROTECTED] wrote:

Hello

I am currently testing Fedora Core 6 i386 on a moderately sized network
(with the permission of the system administrator), with 150 or so computers,
some running Mac OSX and others running NT 4.0.

As to the storage of personal files and authentication, there is both a NT
4.0 server (for the NT 4.0 machines to authenticate to) and a Mac OSX server
(for the Mac OS X machines to authenticate to).

Having *never really done all that much networking before*, I am having
problems detecting the Apple Mac servers.   I am able to use konqueror  to
access smb:/ and browse the Windows server quite easily (even though I have
not yet set up smb.conf; why is this, by the way?), and authenticating to
the NT4.0 server, using the Samba-howto and winbind, would not prove too
difficult, I think.

However, the NT 4.0 server is due to be replaced some time this year, and so
I would like to be able to authenticate to the OSX server instead.
Nonetheless, though documentation for authenticating to Windows servers on
the internet is excellent (samba howto, etc.)  I can find very little about
connecting to OSX networks.

Can anyone tell me where I can find some documentation, etc., or give me a
head start?  At the moment, as I've already said, I don't even know how to
detect the OS X server (it may be password protected, by the way).


The OS X Server manuals are all online here:
   http://www.apple.com/support/manuals/macosxserver/

You probably should take a look at the Open Directory manual and the
User Management manual at least.


Secondly, seeing as OS X is unix and is distantly related to Linux, (I know
this is a strange question to ask on a Samba mailing list) but is there
anyway I could authenticate to the Apple server without using Samba?


Yes. OS X Server supports lots of different authentication methods.
See mnuals above.


I would like to be able to have the /home partitions on the server, and I know
Samba has problems with this due to the sockets that KDE / etc. uses


Another good resource is the os-x-server mailing list:
   http://lists.apple.com/mailman/listinfo/macos-x-server

--
James Peach | [EMAIL PROTECTED]
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: svn commit: samba r20090 - in branches: SAMBA_3_0/source/auth SAMBA_3_0/source/groupdb SAMBA_3_0/source/lib SAMBA_3_0/source/nsswitch SAMBA_3_0/source/passdb SAMBA_3_0/source/rpcclient SAMBA_3_0/s

2006-12-09 Thread James Peach


On 08/12/2006, at 6:58 PM, [EMAIL PROTECTED] wrote:


Author: jra
Date: 2006-12-09 02:58:18 + (Sat, 09 Dec 2006)
New Revision: 20090

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi? 
view=revroot=sambarev=20090


Log:
Fix a class of bugs found by James Peach. Ensure
we never mix malloc and talloc'ed contexts in the
add_XX_to_array() and add_XX_to_array_unique()
calls. Ensure that these calls always return
False on out of memory, True otherwise and always
check them. Ensure that the relevent parts of
the conn struct and the nt_user_tokens are
TALLOC_DESTROYED not SAFE_FREE'd.
James - this should fix your crash bug in both
branches.


Thanks Jeremy. One thing - in create_token_from_username, the gids  
array can be allocated on either tmp_ctx or mem_ctx. tmp_ctx is  
destroyed on exit, but mem_ctx is not, and can be the null context.  
Do you need to explicity free gids?


--
James Peach | [EMAIL PROTECTED]




Re: svn commit: samba r20090 - in branches: SAMBA_3_0/source/auth SAMBA_3_0/source/groupdb SAMBA_3_0/source/lib SAMBA_3_0/source/nsswitch SAMBA_3_0/source/passdb SAMBA_3_0/source/rpcclient SAMBA_3_0/s

2006-12-09 Thread James Peach


On 09/12/2006, at 3:52 PM, Jeremy Allison wrote:


On Sat, Dec 09, 2006 at 03:13:10PM -0800, James Peach wrote:


Thanks Jeremy. One thing - in create_token_from_username, the gids
array can be allocated on either tmp_ctx or mem_ctx. tmp_ctx is
destroyed on exit, but mem_ctx is not, and can be the null context.
Do you need to explicity free gids?


The cases when create_token_from_username() is called with
the null context are both in smbd/service.c. In these cases
the allocated sids (not gids actually) array is assigned to
conn-nt_user_token, which is freed with TALLOC_FREE() in
conn_free() in smbd/conn.c.


But what happens to the gids that were allocated on mem_ctx by  
pdb_default_enum_group_memberships? Previously they were allocated on  
tmp_ctx which is destroyed on the way out. Now they are just left  
dangling. Am I missing something here?



Actually there is one talloced thing that should be freed,
and that's the found_username string. I'll fix this.


I'd argue that if create_token_from_username fails it should clean  
found_username itself. Callers shouldn't have to do this.


--
James Peach | [EMAIL PROTECTED]




Re: [Samba] libdm.so.0 needed by smbd

2006-12-07 Thread James Peach

On 07/12/06, Latrell Wang 王獻綱 [EMAIL PROTECTED] wrote:

Hi all:



I upgraded samba to 3.0.23d, and the compilation was successfully. However, 
when I want to start samba, it shows it can't find libdm.so.6.

Is it related to openldap?


No, it's for DMAPI, which is used to determine when files are offline
(ie, the file data is stored on a tape somewhere, not on the local
disk).


How can I get the library?


That depends on your platform. Since your Samba depends on libdm, then
I assume that libdm is available for your platform. You'll need to
figure out which package it is in and install that.

--
James Peach | [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

[Samba] Re: help with samba

2006-11-01 Thread James Peach

On Oct 29, 2006, at 5:49 PM, julio cruz wrote:


Hi James:

I hope you can give me a hand in diagnosing the problem with my samba.
   - I recently installed FC6 and installation worked fine
   - I installed Samba as well to talk with the other computer used  
by my kids
   - my computer can talk with their win XP and read/write files  
with no problem
   - their windows XP can see my computer [FC6] but cannot access  
[read/write] files and printer.


Is there something I overlook?


Maybe you didn't set up the right user accounts? Try working through  
this example:


http://us2.samba.org/samba/docs/man/Samba-Guide/simple.html#AccountingOffice

If this doesn't help, please post your smb.conf file and the recent  
entries from

your log.smbd logfile.

--
James Peach | [EMAIL PROTECTED]

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] dmapi doesn't work on aix; possible fix included

2006-10-29 Thread James Peach

On 29/10/06, J Raynor [EMAIL PROTECTED] wrote:

I'm running samba 3.0.23c on aix 5.3 TL4.  I'm using Tivoli HSM 5.3.4.0
on a JFS2 filesystem.  Samba compiled fine, and I set dmapi support =
yes in smb.conf, but samba wouldn't recognize offline files (migrated
files in tsm terminology).  After setting a higher log level I think
I've tracked down the problem.  The patch is at the bottom of this email.

The first problem is this snippet in dmapi_file_flags() in smbd/dmapi.c:

 err = dm_path_to_handle(CONST_DISCARD(char *, path),
 dm_handle, dm_handle_len);
 if (err  0) {
 DEBUG(DMAPI_TRACE, (dm_path_to_handle(%s): %s\n,
 path, strerror(errno)));

 if (errno != EPERM) {
 return 0;
 }



On AIX, dm_path_to_handle() is returning EACCES instead of EPERM, so it
hits the return 0.  Is EPERM supposed to be the only allowed error, or
is this something that's likely implementation dependent?


This code was originally written for Linux and IRIX. IIRC in Linux there was
a problem where the process capabilities were reset across fork() because
Samba changes its effective user ID. So when we get a permission error
we go back and try to re-acquire our capabilities.


Changing the if-condition to (errno != EPERM  errno != EACCES) lets
things continue on.  The rest of the problem in dmapi_file_flags() is
that things are running with the effective uid of the user, so dmapi
calls are failing.  The posix capability DMAPI_ACCESS_CAPABILITY is


Note that DMAPI_ACCESS_CAPABILITY is not a real capability, it's just
a name for whatever capability set is needed to do DMAPI operations on
the current platform.


supposed to allow the functions to work, but to my knowledge AIX doesn't
  have posix capabilties.


This is well beyond my knowledge of AIX. I used capabilities for this,
rather than
(un)become_root for performance reasons. If there's no other way to achieve the
functionality, then I guess this is fine.

I'd prefer a feature-based test for whether this is necessary, rather
than a platform-
based test. Something like

#if !defined(HAVE_POSIX_CAPABILITIES)
become_root();
#endif


I used become_root/unbecome_root around the dmapi calls, and this
appeared to get things to work.  Samba's log messages are indicating
that files are offline, and Windows Explorer is picking up on this and
changing the file icons to indicate that the files are offline. However,
I don't know if my solution is entirely correct.  Here's the patch:




*** dmapi.c.origSat Oct 28 02:33:13 2006
--- dmapi.c Sat Oct 28 11:12:54 2006
***
*** 246,252 
 DEBUG(DMAPI_TRACE, (dm_path_to_handle(%s): %s\n,
 path, strerror(errno)));

!   if (errno != EPERM) {
 return 0;
 }

--- 246,252 
 DEBUG(DMAPI_TRACE, (dm_path_to_handle(%s): %s\n,
 path, strerror(errno)));

!   if (errno != EPERM  errno != EACCES) {
 return 0;
 }

***
*** 259,266 
--- 259,274 

 set_effective_capability(DMAPI_ACCESS_CAPABILITY);

+ #ifdef AIX
+   become_root();
+ #endif
+
 err = dm_path_to_handle(CONST_DISCARD(char *, path),
 dm_handle, dm_handle_len);
+
+ #ifdef AIX
+   unbecome_root();
+ #endif
 if (err  0) {
 DEBUG(DMAPI_TRACE,
 (retrying dm_path_to_handle(%s): %s\n,
***
*** 269,276 
--- 277,293 
 }
 }

+ #ifdef AIX
+   become_root();
+ #endif
+
 err = dm_get_eventlist(dmapi_session, dm_handle, dm_handle_len,
 DM_NO_TOKEN, DM_EVENT_MAX, events, nevents);
+
+ #ifdef AIX
+   unbecome_root();
+ #endif
+
 if (err  0) {
 DEBUG(DMAPI_TRACE, (dm_get_eventlist(%s): %s\n,
 path, strerror(errno)));




--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba




--
James Peach | [EMAIL PROTECTED]
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


  1   2   >