2_2 CVS Fails to Compile - rpc_server/srv_spoolss_nt.c

2003-04-01 Thread Richard Bollinger
Compiling rpc_server/srv_spoolss_nt.c
rpc_server/srv_spoolss_nt.c: In function `open_printer_hnd':
rpc_server/srv_spoolss_nt.c:512: structure has no member named `ctx'
make: *** [rpc_server/srv_spoolss_nt.o] Error 1

Looks like something from 3_0 crept in... that version does define a member "ctx" 
within the Printer
structure... this one does not.  Maybe that inserted code needs to go (or more 
infrastructure needs
to be added)?

Thanks, Rich B

Possible fix:

--- ../source/rpc_server/srv_spoolss_nt.c Tue Apr  1 07:15:19 2003
+++ ./rpc_server/srv_spoolss_nt.c Tue Apr  1 08:51:44 2003
@@ -509,12 +509,6 @@

  new_printer->notify.option=NULL;

- if ( !(new_printer->ctx = talloc_init_named("Printer Entry [0x%x]", (uint32)hnd)) ) {
- DEBUG(0,("open_printer_hnd: talloc_init() failed!\n"));
- close_printer_handle(p, hnd);
- return False;
- }
-
  if (!set_printer_hnd_printertype(new_printer, name)) {
  close_printer_handle(p, hnd);
  return False;



Re: missing config.h.in for CVS SAMBA_3_0?

2003-02-10 Thread Richard Bollinger
Oh... so it was.  Nevermind.

- Original Message - 
From: "Gerald (Jerry) Carter" <[EMAIL PROTECTED]>
To: "Richard Bollinger" <[EMAIL PROTECTED]>
Cc: "Guenther Deschner" <[EMAIL PROTECTED]>; "Samba Technical" <[EMAIL PROTECTED]>
Sent: Monday, February 10, 2003 2:19 PM
Subject: Re: missing config.h.in for CVS SAMBA_3_0?


> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On Mon, 10 Feb 2003, Richard Bollinger wrote:
> 
> > I still haven't heard a really good reason for the file being dropped
> > from CVS.  If we're on a crusade to delete any derivative files, why not
> > drop "configure" as well?
> 
> It has been.



Re: missing config.h.in for CVS SAMBA_3_0?

2003-02-10 Thread Richard Bollinger
I still haven't heard a really good reason for the file being dropped from CVS.  If 
we're on a
crusade to delete any derivative files, why not drop "configure" as well?

- Original Message -
From: "Gerald (Jerry) Carter" <[EMAIL PROTECTED]>
To: "Richard Bollinger" <[EMAIL PROTECTED]>
Cc: "Guenther Deschner" <[EMAIL PROTECTED]>; "Samba Technical" <[EMAIL PROTECTED]>
Sent: Monday, February 10, 2003 2:03 PM
Subject: Re: missing config.h.in for CVS SAMBA_3_0?


> -----BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On Fri, 7 Feb 2003, Richard Bollinger wrote:
>
> > OK... its just a pain because one of the platforms I automatically build
> > from CVS on doesn't have the tools required to run autogen.sh, so I have
> > to do some convoluted tricks to run autoheader and autoconf on my Linux
> > server against my Solaris source tree.  Seems as though it would be
> > better to put config.h.in back into CVS for "less priviledged" folk
> > among us.
>
> There are generated in ~ftp/unpacked/samba[*]
> You can grab it from there.
>
>
>
>
> cheers, jerry
>  --
>  Hewlett-Packard- http://www.hp.com
>  SAMBA Team -- http://www.samba.org
>  GnuPG Key   http://www.plainjoe.org/gpg_public.asc
>  "You can never go home again, Oatman, but I guess you can shop there."
> --John Cusack - "Grosse Point Blank" (1997)
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.2.0 (GNU/Linux)
> Comment: For info see http://quantumlab.net/pine_privacy_guard/
>
> iD8DBQE+R/d4IR7qMdg1EfYRAhZ6AKCyo2IPu/93cCXfu+GtNWZYp6cL7ACg7mj1
> RQ+xONQlyC5UBIrJMpb/LY8=
> =ETEj
> -END PGP SIGNATURE-
>




Re: missing config.h.in for CVS SAMBA_3_0?

2003-02-07 Thread Richard Bollinger
OK... its just a pain because one of the platforms I automatically build from CVS on 
doesn't have
the tools required to run autogen.sh, so I have to do some convoluted tricks to run 
autoheader and
autoconf on my Linux server against my Solaris source tree.  Seems as though it would 
be better to
put config.h.in back into CVS for "less priviledged" folk among us.

Just my 2 cents.

Rich B

- Original Message -
From: "Guenther Deschner" <[EMAIL PROTECTED]>
To: "Richard Bollinger" <[EMAIL PROTECTED]>; "Samba Technical" 
<[EMAIL PROTECTED]>
Sent: Friday, February 07, 2003 9:25 AM
Subject: Re: missing config.h.in for CVS SAMBA_3_0?
hi,

just call autogen.sh and it will be recreated.

bye,
guenther

On Fri, Feb 07, 2003 at 08:21:21AM -0500, Richard Bollinger wrote:
> Double checked cvsweb - its config.h.in is gone?
>
> I got this message this morning when I updated my CVS tracking copy:
> cvs server: source/include/config.h.in is no longer in the repository
>
> Did someone do an oops, adding both config.h and config.h.in to .cvsignore?
>

--
Guenther Deschner [EMAIL PROTECTED]
SuSE Linux AGGnuPG: 8EE11688
Berliner Str. 27  phone:  +49 (0) 30 / 430944778
D-13507 Berlin   fax:  +49 (0) 30 / 43732804





missing config.h.in for CVS SAMBA_3_0?

2003-02-07 Thread Richard Bollinger
Double checked cvsweb - its config.h.in is gone?

I got this message this morning when I updated my CVS tracking copy:
cvs server: source/include/config.h.in is no longer in the repository

Did someone do an oops, adding both config.h and config.h.in to .cvsignore?




SAMBA_3_0 CVS compile error in nsswitch/wbinfo.c on sparc-sun-solaris2.8

2003-01-06 Thread Richard Bollinger
cc: WorkShop Compilers 5.0 98/12/15 C 5.0  sparc-sun-solaris2.8

Compiling nsswitch/wbinfo.c
"nsswitch/wbinfo.c", line 586: left operand must be modifiable lvalue: op "="
cc: acomp failed for nsswitch/wbinfo.c
*** Error code 2
make: Fatal error: Command failed for target `nsswitch/wbinfo.o'

Problem appears to be a recent change to the declaration for variable "password" to 
type const char
*.

Fix is to drop the "const" (see below)..

Thanks, Rich B

--- ../source/nsswitch/wbinfo.c Fri Jan  3 07:15:27 2003
+++ ./nsswitch/wbinfo.c Mon Jan  6 10:08:32 2003
@@ -573,7 +573,7 @@

 static BOOL wbinfo_set_auth_user(char *username)
 {
- const char *password;
+ char *password;
  fstring user, domain;

  /* Separate into user and password */




Re: Another showstopper in 2.2.5

2002-08-21 Thread Richard Bollinger

Hmmm... reading the man page for sigaction()... the semantics are a bit unclear 
regarding sa_mask:

  sa_mask  gives  a  mask of signals which should be blocked
   during execution of the signal handler.  In addition,  the
   signal which triggered the handler will be blocked, unless
   the SA_NODEFER or SA_NOMASK flags are used.

So... for example, if the mask indicated only that we wanted to block SIGQUIT, for 
example, could
the signal handler being registered be hit by SIGPIPE while it is running?  That being 
the case,
would we need to specify a mask which includes at least everything we've decided to 
IGNORE?

- Original Message -
From: <[EMAIL PROTECTED]>
To: "Fredrik Ohrn" <[EMAIL PROTECTED]>
Cc: "Richard Bollinger" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, August 21, 2002 9:58 AM
Subject: Re: Another showstopper in 2.2.5


> On Wed, Aug 21, 2002 at 07:40:04PM +0200, Fredrik Ohrn wrote:
> >
> > OK, I've tried it out and it didn't help.
> >
> > I removed my BlockSignals stuff and added ZERO_STRUCT(act) instead, now
> > the smbd dies on SIGPIPE just as before.
>
> Ok, we need to know when SIGPIPE is being removed from the blocked
> signal set on your system.
>
> Can you add some code in the main loop that prints out the current
> signal mask using this code:
>
> sigset_t blocked_mask = siggetmask();
> DEBUG(0,"SIGPIPE is %s\n", sigismember(&blocked_mask, SIGPIPE) ? "blocked" : 
>"nonblocked" ));
>
> So we can see when the SIGPIPE is being removed from your
> masked set.
>
> Thanks,
>
> Jeremy.
>




Re: Another showstopper in 2.2.5

2002-08-21 Thread Richard Bollinger

I looked around to see where all of the signal handling code is / should be...

lib/signal.c has most of the good stuff... BUT there are calls to sigaction also in
smbd/notify_kernel.c and smbd/oplock_linux.c which look suspicious.

I can't reproduce the problem myself, but it looks as though there should be a call to
ZERO_STRUCT(act) inserted in both kernel_notify_init() and in 
linux_init_kernel_oplocks(), because
the structure element sa_mask is left undefined in both cases... thus making it 
possible for _any_
signal to occur inside signal handlers being installed in those places.

What do you guys think?

Rich Bollinger, Elliott Company




SAMBA_3_0 CVS Fails to Compile

2002-08-19 Thread Richard Bollinger

from build_env.h:
#define BUILD_ENV_UNAME "Linux LS01 2.0.38 #4 Wed Jun 6 14:22:03 EDT 2001 i586 unknown"
#define BUILD_ENV_DATE "Mon Aug 19 09:57:00 EDT 2002"
#define BUILD_ENV_SRCDIR "."
#define BUILD_ENV_BUILDDIR "/usr/local/lxsrc/samba_3_0/samba-3.0-alpha18/source.Linux"
#define BUILD_ENV_USER "rab"
#define BUILD_ENV_HOST "LS01"
#define BUILD_ENV_COMPILER "gcc"

First fixed Makefile.in as follows, so proto.h could be made:
--- ../source/Makefile.in Mon Aug 19 07:15:58 2002
+++ Makefile.in Mon Aug 19 09:52:52 2002
@@ -170,9 +170,9 @@
   libsmb/passchange.o libsmb/unexpected.o libsmb/doserr.o \
   libsmb/namecache.o $(RPC_PARSE_OBJ1)

-LIBMSRPC_OBJ = rpc_client/cli_lsarpc.o rpc_client/cli_samr.o \
+LIBMSRPC_OBJ = libsmb/cli_lsarpc.o rpc_client/cli_samr.o \
 rpc_client/cli_netlogon.o rpc_client/cli_srvsvc.o \
-rpc_client/cli_wkssvc.o rpc_client/cli_dfs.o \
+rpc_client/cli_wkssvc.o libsmb/cli_dfs.o \
 rpc_client/cli_reg.o rpc_client/cli_pipe.o \
 rpc_client/cli_spoolss.o rpc_client/cli_spoolss_notify.o

Now, I get this error:
Compiling nsswitch/winbindd_rpc.c
nsswitch/winbindd_rpc.c: In function `trusted_domains':
nsswitch/winbindd_rpc.c:595: warning: passing arg 6 of `cli_lsa_enum_trust_dom' from 
incompatible
pointer type
nsswitch/winbindd_rpc.c:595: warning: passing arg 7 of `cli_lsa_enum_trust_dom' from 
incompatible
pointer type
nsswitch/winbindd_rpc.c:595: too few arguments to function `cli_lsa_enum_trust_dom'
make: *** [nsswitch/winbindd_rpc.o] Error 1




Head Compile Errors in rpc_server/srv_reg_nt.c on sparc-sun-solaris2.8 cc: WorkShop Compilers 5.0 98/12/15 C 5.0

2002-07-07 Thread Richard Bollinger

on sparc-sun-solaris2.8 cc: WorkShop Compilers 5.0 98/12/15 C 5.0

Compiling rpc_server/srv_reg_nt.c
"rpc_server/srv_reg_nt.c", line 77: cannot do pointer arithmetic on operand of unknown 
size
"rpc_server/srv_reg_nt.c", line 82: cannot do pointer arithmetic on operand of unknown 
size
"rpc_server/srv_reg_nt.c", line 93: cannot do pointer arithmetic on operand of unknown 
size
"rpc_server/srv_reg_nt.c", line 157: cannot do pointer arithmetic on operand of 
unknown size
cc: acomp failed for rpc_server/srv_reg_nt.c
*** Error code 2
make: Fatal error: Command failed for target `rpc_server/srv_reg_nt.o'


Fix is:

--- ../source/rpc_server/srv_reg_nt.c Sat Jul  6 07:15:40 2002
+++ ./rpc_server/srv_reg_nt.c Sun Jul  7 11:47:07 2002
@@ -58,7 +58,8 @@
 static BOOL store_reg_keys( TDB_CONTEXT *tdb, char *keyname, char **subkeys, uint32
um_subkeys  )
 {
  TDB_DATA kbuf, dbuf;
- void *buffer, *tmpbuf;
+ char *buffer;
+ void *tmpbuf;
  int i = 0;
  uint32 len, buflen;
  BOOL ret = True;
@@ -121,7 +122,7 @@
  pstring path;
  uint32 num_items;
  TDB_DATA dbuf;
- void *buf;
+ char *buf;
  uint32 buflen, len;
  int i;
  char *s;


Rich Bollinger, Elliott Company






2_2 CVS cli_spoolss_notify.c Compile Error - missing defines from head smb.h

2002-06-25 Thread Richard Bollinger

Compiling rpc_client/cli_spoolss_notify.c
rpc_client/cli_spoolss_notify.c: In function `spoolss_connect_to_client':
rpc_client/cli_spoolss_notify.c:126: `NEGOTIATE_SECURITY_USER_LEVEL' undeclared (first 
use this
function)
rpc_client/cli_spoolss_notify.c:126: (Each undeclared identifier is reported only once
rpc_client/cli_spoolss_notify.c:126: for each function it appears in.)
make: *** [rpc_client/cli_spoolss_notify.o] Error 1

Fix (missing defines borrowed from head):

--- ../source/include/smb.h Mon Jun 10 07:17:07 2002
+++ ./include/smb.h Tue Jun 25 08:23:40 2002
@@ -1291,6 +1291,12 @@
 #define BROWSER_ELECTION_VERSION 0x010f
 #define BROWSER_CONSTANT 0xaa55

+/* Security mode bits. */
+#define NEGOTIATE_SECURITY_USER_LEVEL 0x01
+#define NEGOTIATE_SECURITY_CHALLENGE_RESPONSE 0x02
+#define NEGOTIATE_SECURITY_SIGNATURES_ENABLED 0x04
+#define NEGOTIATE_SECURITY_SIGNATURES_REQUIRED 0x08
+
 /* NT Flags2 bits - cifs6.txt section 3.1.2 */

 #define FLAGS2_LONG_PATH_COMPONENTS   0x0001

Rich Bollinger





SAMBA_3_0 CVS - A dead end?

2002-06-21 Thread Richard Bollinger

A while ago there had been talk about the SAMBA_3_0 CVS branch being somewhat more 
stable than
"head" for folk who want to live near, but not on the bleeding edge.  It looks like it 
was dropped
for lack of interest... no material updates since May.  Before I whack my private 
copy, is it likely
that it will wake up again any time soon?  For that matter, is there a document which 
gives the
uninitiated some idea what the 18 different CVS branches are there for?

Thanks, Rich Bollinger





2_2 Compile Broken by mangle_... changed to return void

2002-06-13 Thread Richard Bollinger

...
Compiling smbd/dir.c
smbd/dir.c: In function `get_dir_entry':
smbd/dir.c:608: void value not ignored as it ought to be
make: *** [smbd/dir.o] Error 1
...
Please fix.  Thanks, Rich Bollinger





Linux Compile Cleanup - 2_2 CVS - Patch Enclosed

2002-06-07 Thread Richard Bollinger

Compiling smbd/oplock_linux.c
smbd/oplock_linux.c: In function `linux_oplock_receive_message':
smbd/oplock_linux.c:138: warning: passing arg 1 of `memmove' discards qualifiers from 
pointer target
type
smbd/oplock_linux.c:138: warning: passing arg 2 of `memmove' discards qualifiers from 
pointer target
type

Compiling smbd/notify_kernel.c
smbd/notify_kernel.c: In function `kernel_check_notify':
smbd/notify_kernel.c:105: warning: passing arg 1 of `memmove' discards qualifiers from 
pointer
target type
smbd/notify_kernel.c:105: warning: passing arg 2 of `memmove' discards qualifiers from 
pointer
target type
smbd/notify_kernel.c: In function `kernel_remove_notify':
smbd/notify_kernel.c:134: warning: passing arg 1 of `memmove' discards qualifiers from 
pointer
target type
smbd/notify_kernel.c:134: warning: passing arg 2 of `memmove' discards qualifiers from 
pointer
target type

Patches:

--- ../source/smbd/oplock_linux.c Thu Jun  6 20:15:19 2002
+++ ./smbd/oplock_linux.c Fri Jun  7 08:49:01 2002
@@ -134,7 +134,7 @@
  fsp = file_find_fd(fd);
  fd_pending_array[0] = (sig_atomic_t)-1;
  if (signals_received > 1)
- memmove(&fd_pending_array[0], &fd_pending_array[1],
+ memmove((void *)&fd_pending_array[0], (void *)&fd_pending_array[1],
  sizeof(sig_atomic_t)*(signals_received-1));
  signals_received--;
  /* now we can receive more signals */
--- ../source/smbd/notify_kernel.c Wed Jun  5 07:16:10 2002
+++ ./smbd/notify_kernel.c Fri Jun  7 08:49:41 2002
@@ -101,7 +101,7 @@
  close((int)fd_pending_array[i]);
  fd_pending_array[i] = (sig_atomic_t)-1;
  if (signals_received - i - 1) {
- memmove(&fd_pending_array[i], &fd_pending_array[i+1],
+ memmove((void *)&fd_pending_array[i], (void *)&fd_pending_array[i+1],
  sizeof(sig_atomic_t)*(signals_received-i-1));
  }
  data->directory_handle = -1;
@@ -130,7 +130,7 @@
  close(fd);
  fd_pending_array[i] = (sig_atomic_t)-1;
  if (signals_received - i - 1) {
- memmove(&fd_pending_array[i], &fd_pending_array[i+1],
+ memmove((void *)&fd_pending_array[i], (void *)&fd_pending_array[i+1],
  sizeof(sig_atomic_t)*(signals_received-i-1));
  }
  data->directory_handle = -1;


Rich Bollinger, Elliott Company
My attbi.com email was blocked... damn spammers!





Re: Samba 2_2 CVS w/ Linux 2.4.18 Oplock Hangup... Help!

2002-06-06 Thread Richard Bollinger

Lookin' good now.  Same test results in correct behavior... that is, when the unix 
side attempts
access, the oplock is broken.

Thanks!, Rich Bollinger, Elliott Company

- Original Message -
From: "Jeremy Allison" <[EMAIL PROTECTED]>
To: "Richard Bollinger" <[EMAIL PROTECTED]>
Cc: "Samba Technical" <[EMAIL PROTECTED]>
Sent: Thursday, June 06, 2002 8:07 PM
Subject: Re: Samba 2_2 CVS w/ Linux 2.4.18 Oplock Hangup... Help!


On Thu, Jun 06, 2002 at 03:39:59PM -0400, Richard Bollinger wrote:
> Test scenerio:
>
> Server:  Samba 2_2 CVS as of morning of 6/4/2002.  Linux 2.4.18 ext2 file system.  
>AMD Athlon
> processor.
>
> On PC...
> net use f: \\server\share
> type hi.txt
>
> On Server...
> smbstatusshows the file oplocked
> cat hi.txthangs until control C hit
>
> On PC...
> net use f: /d
>
> On Server...
> smbstatusshows the connection still in effect and file still oplocked!
> cat hi.txtstill hangs until control C hit
>
> smbstatus output:
>
> Samba version 2.2.5-pre #1 Tue Jun 4 14:03:39 EDT 2002
> Service  uid  gid  pid machine
> --
> u_tmprab  tcs  30240   p139 (128.1.3.139) Thu Jun  6 15:22:51 
>2002
>
> Locked files:
> PidDenyMode   Access  R/WOplock   Name
> --
> 30240  DENY_NONE  0x1 RDONLY EXCLUSIVE+BATCH  /u/tmp/hi.txt   Thu Jun  6 
>15:23:28
2002

I think I have just fixed this. Could you please try
CVS updating on the SAMBA_2_2 branch and testing again ?

Thanks,

Jeremy.






Samba 2_2 CVS w/ Linux 2.4.18 Oplock Hangup... Help!

2002-06-06 Thread Richard Bollinger

Test scenerio:

Server:  Samba 2_2 CVS as of morning of 6/4/2002.  Linux 2.4.18 ext2 file system.  AMD 
Athlon
processor.

On PC...
net use f: \\server\share
type hi.txt

On Server...
smbstatusshows the file oplocked
cat hi.txthangs until control C hit

On PC...
net use f: /d

On Server...
smbstatusshows the connection still in effect and file still oplocked!
cat hi.txtstill hangs until control C hit

smbstatus output:

Samba version 2.2.5-pre #1 Tue Jun 4 14:03:39 EDT 2002
Service  uid  gid  pid machine
--
u_tmprab  tcs  30240   p139 (128.1.3.139) Thu Jun  6 15:22:51 2002

Locked files:
PidDenyMode   Access  R/WOplock   Name
--
30240  DENY_NONE  0x1 RDONLY EXCLUSIVE+BATCH  /u/tmp/hi.txt   Thu Jun  6 
15:23:28 2002



debug session to see where it is:


root@LS04:/u/tmp/samba_2_2/samba-2.2.5-pre/source.Linux# gdb bin/smbd
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-slackware-linux"...
(gdb) attach 30240
Attaching to program: /usr/local/tmp/samba_2_2/samba-2.2.5-pre/source.Linux/bin/smbd, 
Pid 30240
0x4012cd8e in ?? ()
(gdb) where
#0  0x4012cd8e in ?? ()
#1  0x8149c46 in receive_local_message (buffer=0x401c9009 "",
buffer_len=131137, timeout=1) at smbd/oplock.c:100
#2  0x80a0355 in async_processing (buffer=0x401c9009 "", buffer_len=131137)
at smbd/process.c:121
#3  0x80a05fe in receive_message_or_smb (buffer=0x401c9009 "",
buffer_len=131137, timeout=6) at smbd/process.c:245
#4  0x80a17c6 in smbd_process () at smbd/process.c:1250
#5  0x806a098 in main (argc=2, argv=0xbae4) at smbd/server.c:835
#6  0x400842eb in ?? ()
(gdb) quit
The program is running.  Quit anyway (and detach it)? (y or n) s y
Detaching from program: 
/usr/local/tmp/samba_2_2/samba-2.2.5-pre/source.Linux/bin/smbd, Pid 30240



strace oddly enough just loops???


root@LS04:/u/tmp/samba_2_2/samba-2.2.5-pre/source.Linux# strace -p 30240
select(21, [12 20], NULL, NULL, {0, 1}) = 0 (Timeout)
select(21, [5 12 20], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0})
time(NULL)  = 1023392251
select(21, [12 20], NULL, NULL, {0, 1000}) = 0 (Timeout)
select(21, [5 12 20], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0})
time(NULL)  = 1023392251
select(21, [12 20], NULL, NULL, {0, 1000}) = 0 (Timeout)
select(21, [5 12 20], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0})
time(NULL)  = 1023392251
select(21, [12 20], NULL, NULL, {0, 1000}) = 0 (Timeout)
select(21, [5 12 20], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0})
time(NULL)  = 1023392251
select(21, [12 20], NULL, NULL, {0, 1000}) = 0 (Timeout)
select(21, [5 12 20], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0})
time(NULL)  = 1023392251
select(21, [12 20], NULL, NULL, {0, 1000}) = 0 (Timeout)
select(21, [5 12 20], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0})
time(NULL)  = 1023392251
select(21, [12 20], NULL, NULL, {0, 1000}) = 0 (Timeout)
select(21, [5 12 20], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0})
time(NULL)  = 1023392251






Re: Broken change to lib/interfaces.c in last night's 2_2 CVS - Fix Enclosed - Fixed for real this time !?!

2002-06-04 Thread Richard Bollinger

Oops -- sorry... That changes compiles OK, but NOT if you rerun configure!!!  Here's 
config.log:

configure:10972: checking for iface AIX
configure:10989: gcc -o conftest -O -g 
conftest.c  -ldl 1>&5
In file included from configure:10986:
./lib/interfaces.c:34: config.h: No such file or directory
configure: failed program was:
#line 10981 "configure"
#include "confdefs.h"

#define HAVE_IFACE_AIX 1
#define AUTOCONF_TEST 1
#include "confdefs.h"
#include "./lib/interfaces.c"
configure:11013: checking for iface ifconf
configure:11030: gcc -o conftest -O -g 
conftest.c  -ldl 1>&5
In file included from configure:11027:
./lib/interfaces.c:34: config.h: No such file or directory
configure: failed program was:
#line 11022 "configure"
#include "confdefs.h"

#define HAVE_IFACE_IFCONF 1
#define AUTOCONF_TEST 1
#include "confdefs.h"
#include "./lib/interfaces.c"
configure:11055: checking for iface ifreq
configure:11072: gcc -o conftest -O -g 
23   conftest.c  -ldl 1>&5
In file included from configure:11069:
./lib/interfaces.c:34: config.h: No such file or directory
In file included from configure:11069:
./lib/interfaces.c:159: sys/stropts.h: No such file or directory
configure: failed program was:
#line 11064 "configure"
#include "confdefs.h"

#define HAVE_IFACE_IFREQ 1
#define AUTOCONF_TEST 1
#include "confdefs.h"
#include "./lib/interfaces.c"

Looks like the include needs to be wrapped in ifndef 
--- ../source/lib/interfaces.c Tue Jun  4 07:46:46 2002
+++ ./lib/interfaces.c Tue Jun  4 12:58:15 2002
@@ -31,6 +31,10 @@
 
 */
 
+#ifndef AUTOCONF_TEST
+#include "config.h"
+#endif
+
 #include 
 #include 
 #include 
@@ -57,7 +61,6 @@
  struct in_addr netmask;
 };
 #else
-#include "config.h"
 #include "interfaces.h"
 #endif


Rich Bollinger

- Original Message - 
From: "Green, Paul" <[EMAIL PROTECTED]>
To: "'Richard Bollinger'" <[EMAIL PROTECTED]>; "Samba Technical" 
<[EMAIL PROTECTED]>
Sent: Tuesday, June 04, 2002 11:24 AM
Subject: RE: Broken change to lib/interfaces.c in last night's 2_2 CVS - Fix Enclosed


> Mea culpa. Thanks, Rich. 
> 
> PG
> 
> Richard Bollinger [mailto:[EMAIL PROTECTED]] writes:
> > Problem is that there are ifdef tests depending on the 
> > contents of config.h before it's included.
> > This patch moves up that include to the beginning:
> 





Broken change to lib/interfaces.c in last night's 2_2 CVS - Fix Enclosed

2002-06-04 Thread Richard Bollinger

Here's the error on Solaris

Compiling lib/interfaces.c
"lib/interfaces.c", line 112: undefined symbol: SIOCGIFCONF
"lib/interfaces.c", line 123: undefined symbol: SIOCGIFADDR
"lib/interfaces.c", line 130: undefined symbol: SIOCGIFFLAGS
"lib/interfaces.c", line 138: undefined symbol: SIOCGIFNETMASK

Problem is that there are ifdef tests depending on the contents of config.h before 
it's included.
This patch moves up that include to the beginning:

--- ../source/lib/interfaces.c Tue Jun  4 07:46:46 2002
+++ ./lib/interfaces.c Tue Jun  4 10:02:49 2002
@@ -31,6 +31,7 @@

 */

+#include "config.h"
 #include 
 #include 
 #include 
@@ -57,7 +58,6 @@
  struct in_addr netmask;
 };
 #else
-#include "config.h"
 #include "interfaces.h"
 #endif


Rich Bollinger, Elliott Company





Re: Thanks for fixing oplock.c for Linux 2.0 in 2_2 CVS

2002-05-30 Thread Richard Bollinger

Wouldn't it be neat if we could do _better_ than MS at their own game and somehow 
prevent the
win9x client bug from getting triggered in case of timeout disconnections?

Rich Bollinger
- Original Message -
From: "Jeremy Allison" <[EMAIL PROTECTED]>
To: "Richard Bollinger" <[EMAIL PROTECTED]>
Cc: "Volker Lendecke" <[EMAIL PROTECTED]>; "Jeremy Allison" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>; "Andrew Bartlett" <[EMAIL PROTECTED]>; "Samba Technical"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, May 30, 2002 8:30 PM
Subject: Re: Thanks for fixing oplock.c for Linux 2.0 in 2_2 CVS


On Thu, May 30, 2002 at 07:36:21PM -0400, Richard Bollinger wrote:
> Please see:  http://support.microsoft.com/default.aspx?scid=kb;en-us;Q297684

Ah - this is very interesting, thanks for pointing this out.

Using the registry setting here :

\System\CurrentControlSet\Services\LanmanServer\Parameters

autodisconnect

and setting it to 1 (meaning 1 minute) I have perfectly
reproduced this client problem with Win98 client, W2K
server.

I thought they might have some heuristics to avoid running
into this bug themselves when talking to a Win98 client
but no - it's just that their timeout on autodisconnect
is much longer..

This means we're completely the same as a W2K server in
this respect - we probably need to add a big warning message
to the timeout parameter on the man page, but I don't think
any code changes would help.

Jeremy.





Re: Thanks for fixing oplock.c for Linux 2.0 in 2_2 CVS

2002-05-30 Thread Richard Bollinger

Please see:  http://support.microsoft.com/default.aspx?scid=kb;en-us;Q297684

Which says in part...
SYMPTOMS
When you perform drive mapping from a Windows 2000-based client computer to either a 
Microsoft
Windows NT or Windows 2000 network share, the drive mapping may be disconnected after 
15 minutes
of inactivity and Windows Explorer may display a red "X" on the icon of the mapped 
drive.
However, if you attempt to access or browse the mapped drive, it reconnects quickly.



CAUSE
This behavior can occur because both Windows NT Server version 4.0 and Windows 2000 
Server can
drop idle connections after a specified time-out period, which by default is 15 
minutes, so that
server resources are not wasted on unused sessions. The connection can be 
re-established very
quickly at a later time, if required.



RESOLUTION
To resolve this behavior, use a command to change the default time-out period on the 
Windows NT
Server 4.0 or Windows 2000 Server: At a command prompt, type: net config server
/autodisconnect:30 .

The valid value range to configure this setting from a command line is from -1 through 
65,535
minutes. To disable Autodisconnect, set it to -1 .


Rich Bollinger

- Original Message -
From: "Jeremy Allison" <[EMAIL PROTECTED]>
To: "Volker Lendecke" <[EMAIL PROTECTED]>
Cc: "Jeremy Allison" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; "Andrew Bartlett"
<[EMAIL PROTECTED]>; "Richard Bollinger" <[EMAIL PROTECTED]>; "Samba Technical"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, May 30, 2002 5:32 PM
Subject: Re: Thanks for fixing oplock.c for Linux 2.0 in 2_2 CVS


On Thu, May 30, 2002 at 09:35:38AM +0200, Volker Lendecke wrote:
> On Wed, May 29, 2002 at 04:55:20PM -0700, Jeremy Allison wrote:
> > On Wed, May 29, 2002 at 04:48:27PM -0700, [EMAIL PROTECTED] wrote:
> > >
> > > And are you saying that Win2k will never 'idle' a client connection?  I'm
> > > sure I've seen smbfs being 'idled' by NT before...
> >
> > I don't think it ever drops the TCP connection on purpose.
>
> I'm quite positive it does. I have seen sites with 'security = server' fail
> miserably after having changed to W2k on the DC due to disconnects from the DC.

No, I mean that the Win2k server service won't drop a client
connection on purpose if there's no traffic on it (it doesn't
idle connections).

Jeremy.





Re: Thanks for fixing oplock.c for Linux 2.0 in 2_2 CVS

2002-05-29 Thread Richard Bollinger

Have you tried setting the "undocumented" AUTODISCONENCT parameter in the registry?

http://support.microsoft.com/search/preview.aspx?scid=kb;en-us;Q138365

Rich B
- Original Message -
From: "Jeremy Allison" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Jeremy Allison" <[EMAIL PROTECTED]>; "Andrew Bartlett" <[EMAIL PROTECTED]>; 
"Richard
Bollinger" <[EMAIL PROTECTED]>; "Samba Technical" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, May 29, 2002 7:55 PM
Subject: Re: Thanks for fixing oplock.c for Linux 2.0 in 2_2 CVS


On Wed, May 29, 2002 at 04:48:27PM -0700, [EMAIL PROTECTED] wrote:
>
> And are you saying that Win2k will never 'idle' a client connection?  I'm
> sure I've seen smbfs being 'idled' by NT before...

I don't think it ever drops the TCP connection on purpose.

Jeremy.






Re: Thanks for fixing oplock.c for Linux 2.0 in 2_2 CVS

2002-05-29 Thread Richard Bollinger

Stoping the "server" service is a very unusual step.  Disconnecting an individual 
connection,
possibly via idle timeout,  is not so unusual and I don't see the same behaviour with 
W2K server
vs Samba.  Something else must be going on.

Rich B

- Original Message -
From: "Jeremy Allison" <[EMAIL PROTECTED]>
To: "Jeremy Allison" <[EMAIL PROTECTED]>
Cc: "Richard Bollinger" <[EMAIL PROTECTED]>; "Samba Technical" 
<[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, May 29, 2002 4:43 PM
Subject: Re: Thanks for fixing oplock.c for Linux 2.0 in 2_2 CVS


Actually this was a TCP retransmit (shame :-).

Ok - I've played with this a lot and it seems to be completely
reproducible against a W2K SP2 server as well.

If you stop and then restart the "Server" service on W2k, with
a Win98 client connected, then the Win98 client stops responding
to oplock break requests.

Now this is unfortunate in that it happens more to Samba than
to W2K as the idling of connections can cause the serving smbd
to kill itself.

It causes a 30 second wait the first time you try and run an
executable, but after that we stop granting oplocks to that
client and so everything should keep going.

Jeremy.







Re: Thanks for fixing oplock.c for Linux 2.0 in 2_2 CVS

2002-05-24 Thread Richard Bollinger

Right... or if it times out because of the dead time setting... so it's shouldn't be 
that rare
in the wild.  I have a feeling that a lot of folks just disable oplocks to avoid the 
"troubles".
My test at work showed that the problem did not occur with a W2K server when I forced 
the
disconnect from the server end.

Rich B

- Original Message -
From: "Jeremy Allison" <[EMAIL PROTECTED]>
To: "Richard Bollinger" <[EMAIL PROTECTED]>
Cc: "Jeremy Allison" <[EMAIL PROTECTED]>; "Samba Technical" <[EMAIL PROTECTED]>
Sent: Friday, May 24, 2002 10:21 PM
Subject: Re: Thanks for fixing oplock.c for Linux 2.0 in 2_2 CVS


On Fri, May 24, 2002 at 02:05:12PM -0400, Richard Bollinger wrote:
> OK... time for a brain flush and refill...
>
> I went back and verified my test conditions and determined that the same failure can 
>be
demonstrated
> with every server platform we own running Samba 2.X with oplocks enabled and with a 
>Win98
client.
> Here's the setup:
>
> On Win98 client:
> net use i: \\server\share1
>
> On Server:
> smbd instance goes away by dead time exceeded or with kill command
>
> On Win98 client:
> net use j: \\server\share2
> j:
> cd netbench
> netbench.exe<<<--- here's where we get the oplock freeze for 30 
>seconds
>
> I can send you a copy of the netbench directory off list if you need it.  I suspect 
>the same
failure
> will happen for any DOS executable.

Ok - I've been looking at this - it only happens if the smbd has
been killed in between the first and second net use commands.

The client repeatably fails to respond to a valid oplock break request

I'm looking into this more.

Jeremy.





Re: Thanks for fixing oplock.c for Linux 2.0 in 2_2 CVS

2002-05-24 Thread Richard Bollinger

Same exact failure with
Linux 2.0.38
Linux 2.2.20
Linux 2.4.18
SunOS 5.6

I'll have to let you know Tuesday if it fails with just any old executable... but I'd 
expect it
would.

Rich B
- Original Message -
From: "Jeremy Allison" <[EMAIL PROTECTED]>
To: "Richard Bollinger" <[EMAIL PROTECTED]>
Cc: "Jeremy Allison" <[EMAIL PROTECTED]>; "Samba Technical" <[EMAIL PROTECTED]>
Sent: Friday, May 24, 2002 6:58 PM
Subject: Re: Thanks for fixing oplock.c for Linux 2.0 in 2_2 CVS


On Fri, May 24, 2002 at 02:05:12PM -0400, Richard Bollinger wrote:
> OK... time for a brain flush and refill...
>
> I went back and verified my test conditions and determined that the same failure can 
>be
demonstrated
> with every server platform we own running Samba 2.X with oplocks enabled and with a 
>Win98
client.
> Here's the setup:
>
> On Win98 client:
> net use i: \\server\share1
>
> On Server:
> smbd instance goes away by dead time exceeded or with kill command
>
> On Win98 client:
> net use j: \\server\share2
> j:
> cd netbench
> netbench.exe<<<--- here's where we get the oplock freeze for 30 
>seconds
>
> I can send you a copy of the netbench directory off list if you need it.  I suspect 
>the same
failure
> will happen for any DOS executable.

What is the Linux kernel version you are running ? Can you confirm it happens
with any DOS executable and I'll then try and reproduce the problem.

Thanks,

Jeremy.





Re: Thanks for fixing oplock.c for Linux 2.0 in 2_2 CVS

2002-05-24 Thread Richard Bollinger

OK... time for a brain flush and refill...

I went back and verified my test conditions and determined that the same failure can 
be demonstrated
with every server platform we own running Samba 2.X with oplocks enabled and with a 
Win98 client.
Here's the setup:

On Win98 client:
net use i: \\server\share1

On Server:
smbd instance goes away by dead time exceeded or with kill command

On Win98 client:
net use j: \\server\share2
j:
cd netbench
netbench.exe<<<--- here's where we get the oplock freeze for 30 
seconds

I can send you a copy of the netbench directory off list if you need it.  I suspect 
the same failure
will happen for any DOS executable.

Rich B
- Original Message -
From: "Jeremy Allison" <[EMAIL PROTECTED]>
To: "Richard Bollinger" <[EMAIL PROTECTED]>
Cc: "Jeremy Allison" <[EMAIL PROTECTED]>; "Samba Technical" <[EMAIL PROTECTED]>
Sent: Friday, May 24, 2002 1:10 PM
Subject: Re: Thanks for fixing oplock.c for Linux 2.0 in 2_2 CVS


>>...
> Well, this is a client failure to respond. The does happen sometimes,
> especially with Winx9 clients - their TCP stack is ... well not
> wonderful, let's just say :-).
>
> Dropped packets for whatever reason can also cause this. It doesn't
> mean the fix is bad, occasionally this will just happen (it does on
> NT servers also, they just don't log the message like we do :-).
>
> Jeremy.







Re: Thanks for fixing oplock.c for Linux 2.0 in 2_2 CVS

2002-05-24 Thread Richard Bollinger

How embarassing... still apparently broken / inconsistent :-(

Client is win98 4.10.1998.

[2002/05/24 08:36:40, 0] smbd/server.c:main(707)
  smbd version 2.2.5-pre started.
  Copyright Andrew Tridgell and the Samba Team 1992-2002
  (rab@LS01) (gcc version 2.7.2.3) #1 Fri May 24 07:21:54 EDT 2002 
i586-pc-linux-gnulibc1
[2002/05/24 08:36:41, 1] lib/debug.c:debug_message(258)
  INFO: Debug class all level = 1   (pid 14812 from pid 14812)
[2002/05/24 08:36:42.394090, 1, pid=14812] smbd/files.c:file_init(166)
  file_init: Information only: requested 1 open files, 246 are available.
[2002/05/24 09:02:09.743130, 1, pid=21159] smbd/service.c:make_connection(653)
  p139 (x.x.x.x) connect to service tmp as user rab (uid=5255, gid=6641) (pid 21159)
[2002/05/24 09:02:49.071320, 0, pid=21159] smbd/oplock.c:oplock_break(786)
  oplock_break: receive_smb timed out after 30 seconds.
  oplock_break failed for file netbench/netbench.exe (dev = 900, inode = 181, file_id 
= 1).
[2002/05/24 09:02:49.098472, 0, pid=21159] smbd/oplock.c:oplock_break(858)
  oplock_break: client failure in oplock break in file netbench/netbench.exe

- Original Message -
From: "Jeremy Allison" <[EMAIL PROTECTED]>
To: "Richard Bollinger" <[EMAIL PROTECTED]>
Cc: "Jeremy Allison" <[EMAIL PROTECTED]>; "Samba Technical" <[EMAIL PROTECTED]>
Sent: Thursday, May 23, 2002 3:24 PM
Subject: Re: Thanks for fixing oplock.c for Linux 2.0 in 2_2 CVS


> On Thu, May 23, 2002 at 03:18:04PM -0400, Richard Bollinger wrote:
> > I only ran a quick functionality test ... a very old version of Netbench (2.10).  
>It always hung
for
> > 30 seconds when starting netbench.exe... until the oplock timed out.  Seems fine 
>now.
>
> Great ! Thanks - good news. This will be in 2.2.5 and 3.0.
>
> Cheers,
>
> Jeremy.
>





Re: Thanks for fixing oplock.c for Linux 2.0 in 2_2 CVS

2002-05-23 Thread Richard Bollinger

I only ran a quick functionality test ... a very old version of Netbench (2.10).  It 
always hung for
30 seconds when starting netbench.exe... until the oplock timed out.  Seems fine now.

Rich Bollinger
- Original Message -
From: "Jeremy Allison" <[EMAIL PROTECTED]>
To: "Richard Bollinger" <[EMAIL PROTECTED]>
Cc: "Samba Technical" <[EMAIL PROTECTED]>
Sent: Thursday, May 23, 2002 3:05 PM
Subject: Re: Thanks for fixing oplock.c for Linux 2.0 in 2_2 CVS


>
> That was me :-). So have you CVS checked out and tested the code ?
> I have been testing it to destruction on a HP 2.0.x machine (the
> Print Service Appliance is based on 2.0.x linux) but would appreciate
> some independent confirmation of my fixes.
>
> Cheers,
>
> Jeremy.
>





Thanks for fixing oplock.c for Linux 2.0 in 2_2 CVS

2002-05-23 Thread Richard Bollinger

Much thanks and praises to whomever diagnosed and fixed the timing problems with linux 
2.0 and
oplocks.  On one busy 2.0.38 server, I had seen consistent oplock timeouts... 
especially when
running an executable DOS program from the share... only the problem would not 
reproduce on other
machines.  This problem had been around as far back as 2.0.7.

Thanks again,
Rich Bollinger





Re: One more compile warning fix for Solaris

2002-05-17 Thread Richard Bollinger

Better yet - to match the declaration in proto.h we should use socklen_t.:

--- ../source/smbd/oplock.c Fri May 17 07:16:51 2002
+++ ./smbd/oplock.c Fri May 17 16:27:55 2002
@@ -76,7 +76,7 @@
 BOOL receive_local_message(fd_set *fds, char *buffer, int buffer_len, int timeout)
 {
  struct sockaddr_in from;
- int fromlen = sizeof(from);
+ socklen_t fromlen = sizeof(from);
  int32 msg_len = 0;
 
  smb_read_error = 0;



- Original Message - 
From: "Matt Seitz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 17, 2002 4:09 PM
Subject: RE: One more compile warning fix for Solaris


From: Richard Bollinger [mailto:[EMAIL PROTECTED]]
>- int fromlen = sizeof(from);
>+ unsigned int fromlen = sizeof(from);

Wouldn't the following be more portable?
size_t fromlen = sizeof(from);

Sincerely,

Matt Seitz
Senior Software Engineer
Quantum Corporation






One more compile warning fix for Solaris

2002-05-17 Thread Richard Bollinger

Fixes this error using WorkShop Compilers 5.0 98/12/15 C 5.0 on sparc-sun-solaris2.8:

Compiling smbd/oplock.c
"smbd/oplock.c", line 136: warning: argument #6 is incompatible with prototype:
prototype: pointer to uint : "include/proto.h", line 365
argument : pointer to int

--- ../source/smbd/oplock.c Fri May 17 07:16:51 2002
+++ ./smbd/oplock.c Fri May 17 15:51:56 2002
@@ -76,7 +76,7 @@
 BOOL receive_local_message(fd_set *fds, char *buffer, int buffer_len, int timeout)
 {
  struct sockaddr_in from;
- int fromlen = sizeof(from);
+ unsigned int fromlen = sizeof(from);
  int32 msg_len = 0;
 
  smb_read_error = 0;


Rich Bollinger, Elliott Company





Fix warnings from Solaris Compiles of CVS 2_2

2002-05-15 Thread Richard Bollinger

Here's the changes required to elimenate all of the compiler's warnings issued while 
compiling CVS
2_2 with
cc: WorkShop Compilers 5.0 98/12/15 C 5.0 on sparc-sun-solaris2.8.  Most of them seem 
reasonable;
though someone might want to take a closer look.  The changes don't apparently affect 
generated
code.

Rich Bollinger

--- ../source/rpc_client/cli_login.c Tue Mar 19 07:56:55 2002
+++ ./rpc_client/cli_login.c Wed May 15 15:00:07 2002
@@ -52,7 +52,7 @@
   / Long-term Session key **/

   /* calculate the session key */
-  cred_session_key(&clnt_chal, &srv_chal, (char *)mach_pwd, cli->sess_key);
+  cred_session_key(&clnt_chal, &srv_chal, (uchar *)mach_pwd, cli->sess_key);
   memset((char *)cli->sess_key+8, '\0', 8);

   /*** Authenticate 2 /
--- ../source/libsmb/cli_netlogon.c Thu Apr 18 07:46:04 2002
+++ ./libsmb/cli_netlogon.c Wed May 15 15:11:21 2002
@@ -443,7 +443,7 @@
   0, /* param_ctrl */
   0xdead, 0xbeef, /* LUID? */
   username, cli->clnt_name_slash,
-  cli->sess_key, lm_owf_user_pwd,
+  (char *)cli->sess_key, lm_owf_user_pwd,
   nt_owf_user_pwd);

 break;
@@ -455,8 +455,8 @@

 generate_random_buffer(chal, 8, False);

-SMBencrypt(password, chal, local_lm_response);
-SMBNTencrypt(password, chal, local_nt_response);
+SMBencrypt((const uchar *)password, chal, local_lm_response);
+SMBNTencrypt((const uchar *)password, chal, local_nt_response);

 init_id_info2(&ctr.auth.id2, lp_workgroup(),
   0, /* param_ctrl */
--- ../source/lib/kanji.c Tue Mar 19 07:48:55 2002
+++ ./lib/kanji.c Wed May 15 15:03:22 2002
@@ -1249,7 +1249,7 @@
 const unsigned char *sp;
 unsigned char *dp;

-sp = from;
+sp = (const uchar *)from;
 dp = (unsigned char*) cvtbuf;
 while (*sp && (((char *)dp)- cvtbuf < sizeof(cvtbuf)-7)) {
  if (is_kana(*sp)) {
@@ -1321,7 +1321,7 @@
 const unsigned char *sp;
 unsigned char *dp;

-sp = from;
+sp = (const uchar *)from;
 dp = (unsigned char*) cvtbuf;
 while (*sp && (((char *)dp) - cvtbuf < sizeof(cvtbuf)-4)) {
  if (*sp >= 0x80) {
--- ../source/lib/messages.c Wed Mar 27 07:17:40 2002
+++ ./lib/messages.c Wed May 15 14:42:07 2002
@@ -474,7 +474,7 @@
   lock the messaging tdb based on a string - this is used as a primitive form of mutex
   between smbd instances.
 */
-BOOL message_named_mutex(char *name, unsigned int timeout)
+BOOL message_named_mutex(const char *name, unsigned int timeout)
 {
  TDB_DATA key;
  int ret;
@@ -482,7 +482,7 @@
  if (!message_init())
  return False;

- key.dptr = name;
+ key.dptr = (char *)name;
  key.dsize = strlen(name)+1;

  if (timeout) {
--- ../source/smbd/oplock.c Fri Apr 19 07:16:33 2002
+++ ./smbd/oplock.c Wed May 15 15:07:36 2002
@@ -133,7 +133,7 @@
  * Read a loopback udp message.
  */
  msg_len = sys_recvfrom(oplock_sock, &buffer[OPBRK_CMD_HEADER_LEN],
- buffer_len - OPBRK_CMD_HEADER_LEN, 0, (struct sockaddr *)&from, &fromlen);
+ buffer_len - OPBRK_CMD_HEADER_LEN, 0, (struct sockaddr *)&from, (uint *)&fromlen);

  if(msg_len < 0) {
  DEBUG(0,("receive_local_message. Error in recvfrom. (%s).\n",strerror(errno)));
--- ../source/libsmb/smbencrypt.c Fri Mar 22 07:16:33 2002
+++ ./libsmb/smbencrypt.c Wed May 15 14:53:18 2002
@@ -59,7 +59,7 @@
  int16 wpwd[129];

  /* Password cannot be longer than 128 characters */
- len = strlen(passwd);
+ len = strlen((const char *)passwd);
  if(len > 128)
  len = 128;
  /* Password must be converted to NT unicode - null terminated. */
--- ../source/rpc_server/srv_netlog_nt.c Thu Mar 28 07:46:34 2002
+++ ./rpc_server/srv_netlog_nt.c Wed May 15 14:56:29 2002
@@ -223,7 +223,7 @@

  /* from client / server challenges and md4 password, generate sess key */
  cred_session_key(&p->dc.clnt_chal, &p->dc.srv_chal,
- (char *)p->dc.md4pw, p->dc.sess_key);
+ (uchar *)p->dc.md4pw, p->dc.sess_key);

  /* Save the machine account name. */
  fstrcpy(p->dc.mach_acct, mach_acct);
--- ../source/rpc_server/srv_spoolss_nt.c Fri May 10 07:16:53 2002
+++ ./rpc_server/srv_spoolss_nt.c Wed May 15 15:41:30 2002
@@ -7960,6 +7960,5 @@
  return WERR_UNKNOWN_LEVEL;
  }

- return WERR_ACCESS_DENIED;
 }

--- ../source/nsswitch/winbind_nss.c Mon May 13 07:16:12 2002
+++ ./nsswitch/winbind_nss.c Wed May 15 15:21:37 2002
@@ -867,7 +867,7 @@
  }

  ret = fill_pwent(result, &pw_cache[ndx_pw_cache],
- &buffer, &buflen);
+ &buffer, (int *)&buflen);

  /* Out of memory - try again */

@@ -917,7 +917,7 @@

  if (ret == NSS_STATUS_SUCCESS) {
  ret = fill_pwent(result, &response.data.pw,
- &buffer, &buflen);
+ &buffer, (int *)&buflen);

  if (ret == NSS_STATUS_TRYAGAIN) {
  keep_response = True;
@@ -930,7 +930,7 @@

  /* We've been called again */

- r

Re: CVS 2_2 Fails to Compile on Solaris - rpc_parse/parse_spoolss.c

2002-05-13 Thread Richard Bollinger

Builds OK now.  Thanks!

- Original Message - 
From: "Gerald Carter" <[EMAIL PROTECTED]>
To: "Richard Bollinger" <[EMAIL PROTECTED]>
Cc: "Samba Technical" <[EMAIL PROTECTED]>
Sent: Monday, May 13, 2002 9:43 AM
Subject: Re: CVS 2_2 Fails to Compile on Solaris - rpc_parse/parse_spoolss.c


> On Mon, 13 May 2002, Richard Bollinger wrote:
> 
> 
> I'm about to check in a fix right now.  10 minutes. :-)
> 
> cheers, jerry
>  -





CVS 2_2 Fails to Compile on Solaris - rpc_parse/parse_spoolss.c

2002-05-13 Thread Richard Bollinger

Looks like most recent change to rpc_parse/parse_spoolss.c includes a structure 
initializer just a
bit too fancy for Sun's compiler...  On sparc-sun-solaris2.8 using cc: WorkShop 
Compilers 5.0
98/12/15 C 5.0, I get following build failures from today's 2_2 CVS:

Compiling rpc_parse/parse_spoolss.c
"rpc_parse/parse_spoolss.c", line 559: non-constant initializer: op "+"
"rpc_parse/parse_spoolss.c", line 560: non-constant initializer: op "+"
"rpc_parse/parse_spoolss.c", line 561: non-constant initializer: op "+"
"rpc_parse/parse_spoolss.c", line 562: non-constant initializer: op "+"
"rpc_parse/parse_spoolss.c", line 563: non-constant initializer: op "+"
"rpc_parse/parse_spoolss.c", line 564: non-constant initializer: op "+"
"rpc_parse/parse_spoolss.c", line 565: non-constant initializer: op "+"
"rpc_parse/parse_spoolss.c", line 566: non-constant initializer: op "+"
"rpc_parse/parse_spoolss.c", line 2009: cannot recover from previous errors
cc: acomp failed for rpc_parse/parse_spoolss.c
*** Error code 2
make: Fatal error: Command failed for target `rpc_parse/parse_spoolss.o'

Thanks, Rich Bollinger





Re: 2..2.4-pre Makefile inconsistencies - Fix enclosed

2002-04-30 Thread Richard Bollinger

OK... I've added what it takes to fix the other OS equivalents of SONAME setting... 
with further
changes to configure.in  Heres a summary of the different approaches:

1) As in CVS:
a) tricky recursive Makefile entries allow $@ to be the bare shared library name 
while really
building nsswitch/$@ or bin/$@
b) was missing ",soname=\$@" in LDSHFLAGS for Linux to make it work like the other 
OS's
c) doesn't accomodate special situations as where SONAME needs a version number 
appended

2) Revised approach:
a) configure.in needs changes to split out SONAMEFLAG from LDSHFLAGS settings for 
every OS
b) Makefile.in needs @SONAMEFLAG@`basename $@` added to each shared link
c) easy to fix special case for libsmbclient.so
d) only tested on Linux and Solaris

Rich B

--- ../source/configure.in Mon Apr 29 07:16:35 2002
+++ ./configure.in Tue Apr 30 17:04:48 2002
@@ -851,7 +851,8 @@
  ;;
  *solaris*) AC_DEFINE(SUNOS5)
  BLDSHARED="true"
- LDSHFLAGS="-h \$@ -G"
+ LDSHFLAGS="-G"
+ SONAMEFLAG="-h "
  if test "${ac_cv_prog_CC}" = "gcc"; then
  PICFLAG="-fPIC"
  else
@@ -863,11 +864,13 @@
  ;;
  *sunos*) AC_DEFINE(SUNOS4)
  BLDSHARED="true"
- LDSHFLAGS="-Wl,-h,\$@ -G"
+ LDSHFLAGS="-G"
+ SONAMEFLAG="-Wl,-h,"
  PICFLAG="-KPIC"   # Is this correct for SunOS
  ;;
  *bsd*)  BLDSHARED="true"
- LDSHFLAGS="-Wl,-soname,\$@ -shared"
+ LDSHFLAGS="-shared"
+ SONAMEFLAG="-Wl,-soname,"
  PICFLAG="-fPIC"
  AC_DEFINE(STAT_ST_BLOCKSIZE,512)
  ;;
@@ -878,7 +881,8 @@
  esac
  ATTEMPT_WRAP32_BUILD=yes
  BLDSHARED="true"
- LDSHFLAGS="-set_version sgi1.0 -soname \$@ -shared"
+ LDSHFLAGS="-set_version sgi1.0 -shared"
+ SONAMEFLAG="-soname "
  SHLD="\${LD}"
  if test "${ac_cv_prog_CC}" = "gcc"; then
  PICFLAG="-fPIC"
@@ -899,7 +903,8 @@
  if test $ac_cv_prog_cc_Ae = yes; then
  BLDSHARED="true"
  SHLD="/usr/bin/ld"
- LDSHFLAGS="-B symbolic -b -z +h \$@"
+ LDSHFLAGS="-B symbolic -b -z"
+ SONAMEFLAG="+h "
  PICFLAG="+z"
  fi
  DYNEXP="-Wl,-E"
@@ -908,13 +913,15 @@
  *qnx*) AC_DEFINE(QNX);;
  *osf*) AC_DEFINE(OSF1)
  BLDSHARED="true"
- LDSHFLAGS="-Wl,-soname,\$@ -shared"
+ LDSHFLAGS="-shared"
+ SONAMEFLAG="-Wl,-soname,"
  PICFLAG="-fPIC"
  ;;
  *sco*) AC_DEFINE(SCO);;
  *unixware*) AC_DEFINE(UNIXWARE)
  BLDSHARED="true"
- LDSHFLAGS="-Wl,-soname,\$@ -shared"
+ LDSHFLAGS="-shared"
+ SONAMEFLAG="-Wl,-soname,"
  PICFLAG="-KPIC"
  ;;
  *next2*) AC_DEFINE(NEXT2);;
@@ -2674,10 +2681,10 @@
  WINBIND_STARGETS="bin/winbindd"
  case "$host_os" in
 *irix*)
- WINBIND_LTARGETS="libns_winbind.so"
+ WINBIND_LTARGETS="nsswitch/libns_winbind.so"
 ;;
 *)
- WINBIND_LTARGETS="libnss_winbind.so"
+ WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
 ;;
  esac

--- ../source/Makefile.in Tue Apr 30 07:45:16 2002
+++ ./Makefile.in Tue Apr 30 13:46:26 2002
@@ -91,7 +91,7 @@
 WINBIND_PROGS = @WINBIND_TARGETS@
 WINBIND_SPROGS = @WINBIND_STARGETS@
 WINBIND_PAM_PROGS = @WINBIND_PAM_TARGETS@
-WINBIND_LPROGS = nsswitch/@WINBIND_LTARGETS@
+WINBIND_LPROGS = @WINBIND_LTARGETS@

 SPROGS = bin/smbd bin/nmbd bin/swat
 PROGS1 = bin/smbclient bin/smbspool bin/testparm bin/testprns bin/smbstatus 
bin/smbcontrol
bin/tdbbackup bin/make_printerdef @RUNPROG@
@@ -629,62 +629,48 @@
  @$(CC) $(FLAGS) -o $@ $(SMBSH_OBJ) $(LDFLAGS) $(LIBS)

 bin/smbwrapper.@SHLIBEXT@: $(PICOBJS) bin/.dummy
- $(MAKE) smbwrapper.@SHLIBEXT@
-
-smbwrapper.@SHLIBEXT@: $(PICOBJS) bin/.dummy
- @echo Linking shared library bin/$@
- @$(SHLD) @LDSHFLAGS@ -o bin/$@ $(PICOBJS) $(LIBS)
+ @echo Linking shared library $@
+ @$(SHLD) @LDSHFLAGS@ -o $@ $(PICOBJS) $(LIBS) \
+ @SONAMEFLAG@`basename $@`

 bin/smbwrapper.32.@SHLIBEXT@: $(PICOBJS32) bin/.dummy
- $(MAKE) smbwrapper.32.@SHLIBEXT@
-
-smbwrapper.32.@SHLIBEXT@: $(PICOBJS32) bin/.dummy
- @echo Linking shared library bin/$@
- @$(SHLD) -32 @LDSHFLAGS@ -o bin/$@ $(PICOBJS32) $(LIBS)
+ @echo Linking shared library $@
+ @$(SHLD) -32 @LDSHFLAGS@ -o $@ $(PICOBJS32) $(LIBS) \
+ @SONAMEFLAG@`basename $@`

 bin/libsmbclient.@SHLIBEXT@: $(LIBSMBCLIENT_PICOBJS) bin/.dummy
- $(MAKE) libsmbclient.@SHLIBEXT@
-
-libsmbclient.@SHLIBEXT@: $(LIBSMBCLIENT_PICOBJS) bin/.dummy
- @echo Linking libsmbclient shared library bin/$@
- @$(SHLD) @LDSHFLAGS@ -o bin/$@ $(LIBSMBCLIENT_PICOBJS) $(LIBS) \
- @[EMAIL PROTECTED]$(LIBSMBCLIENT_MAJOR)
+ @echo Linking libsmbclient shared library $@
+ @$(SHLD) @LDSHFLAGS@ -o $@ $(LIBSMBCLIENT_PICOBJS) $(LIBS) \
+ @SONAMEFLAG@`basename $@`.$(LIBSMBCLIENT_MAJOR)

 bin/libsmbclient.a: $(LIBSMBCLIENT_PICOBJS) bin/.dummy
  @echo Linking libsmbclient non-shared library $@
  @-$(AR) -rc $@ $(LIBSMBCLIENT_PICOBJS)

 bin/pam_smbpass.@SHLIBEXT@: $(PAM_SMBPASS_OBJ) bin/.dummy
- $(MAKE) pam_smbpass.@SHLIBEXT@
-
-pam_smbpass.@SHLIBEXT@: $(PAM_SMBPASS_OBJ) bin/.dummy
- @echo Linking shared library bin/$@
- $(SHLD) @LDSHFLAGS@ -symbolic -o bin/$@ $(PAM_SMBPASS_OBJ) $(LDFLAGS) -lpam 
$(DYNEXP) $(LIBS) -lc
+ @echo Linking shared library $@
+ $(SHLD) @LDSHFLAGS@ -symbolic -o $@ $(PAM_SMBPASS_OBJ) $(LDFLAGS) -lpam $(

Re: 2..2.4-pre Makefile inconsistencies - Fix enclosed

2002-04-30 Thread Richard Bollinger

Try this version of my patch out for size.  I've added explicit SONAME setting as 
apparently
required to solve the problem:

--- ../source/configure.in Mon Apr 29 07:16:35 2002
+++ ./configure.in Mon Apr 29 09:32:29 2002
@@ -2674,10 +2674,10 @@
  WINBIND_STARGETS="bin/winbindd"
  case "$host_os" in
 *irix*)
- WINBIND_LTARGETS="libns_winbind.so"
+ WINBIND_LTARGETS="nsswitch/libns_winbind.so"
 ;;
 *)
- WINBIND_LTARGETS="libnss_winbind.so"
+ WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
 ;;
  esac

--- ../source/Makefile.in Tue Apr 30 07:45:16 2002
+++ ./Makefile.in Tue Apr 30 13:46:26 2002
@@ -91,7 +91,7 @@
 WINBIND_PROGS = @WINBIND_TARGETS@
 WINBIND_SPROGS = @WINBIND_STARGETS@
 WINBIND_PAM_PROGS = @WINBIND_PAM_TARGETS@
-WINBIND_LPROGS = nsswitch/@WINBIND_LTARGETS@
+WINBIND_LPROGS = @WINBIND_LTARGETS@

 SPROGS = bin/smbd bin/nmbd bin/swat
 PROGS1 = bin/smbclient bin/smbspool bin/testparm bin/testprns bin/smbstatus 
bin/smbcontrol
bin/tdbbackup bin/make_printerdef @RUNPROG@
@@ -629,62 +629,48 @@
  @$(CC) $(FLAGS) -o $@ $(SMBSH_OBJ) $(LDFLAGS) $(LIBS)

 bin/smbwrapper.@SHLIBEXT@: $(PICOBJS) bin/.dummy
- $(MAKE) smbwrapper.@SHLIBEXT@
-
-smbwrapper.@SHLIBEXT@: $(PICOBJS) bin/.dummy
- @echo Linking shared library bin/$@
- @$(SHLD) @LDSHFLAGS@ -o bin/$@ $(PICOBJS) $(LIBS)
+ @echo Linking shared library $@
+ @$(SHLD) @LDSHFLAGS@ -o $@ $(PICOBJS) $(LIBS) \
+ @SONAMEFLAG@`basename $@`

 bin/smbwrapper.32.@SHLIBEXT@: $(PICOBJS32) bin/.dummy
- $(MAKE) smbwrapper.32.@SHLIBEXT@
-
-smbwrapper.32.@SHLIBEXT@: $(PICOBJS32) bin/.dummy
- @echo Linking shared library bin/$@
- @$(SHLD) -32 @LDSHFLAGS@ -o bin/$@ $(PICOBJS32) $(LIBS)
+ @echo Linking shared library $@
+ @$(SHLD) -32 @LDSHFLAGS@ -o $@ $(PICOBJS32) $(LIBS) \
+ @SONAMEFLAG@`basename $@`

 bin/libsmbclient.@SHLIBEXT@: $(LIBSMBCLIENT_PICOBJS) bin/.dummy
- $(MAKE) libsmbclient.@SHLIBEXT@
-
-libsmbclient.@SHLIBEXT@: $(LIBSMBCLIENT_PICOBJS) bin/.dummy
- @echo Linking libsmbclient shared library bin/$@
- @$(SHLD) @LDSHFLAGS@ -o bin/$@ $(LIBSMBCLIENT_PICOBJS) $(LIBS) \
- @[EMAIL PROTECTED]$(LIBSMBCLIENT_MAJOR)
+ @echo Linking libsmbclient shared library $@
+ @$(SHLD) @LDSHFLAGS@ -o $@ $(LIBSMBCLIENT_PICOBJS) $(LIBS) \
+ @SONAMEFLAG@`basename $@`.$(LIBSMBCLIENT_MAJOR)

 bin/libsmbclient.a: $(LIBSMBCLIENT_PICOBJS) bin/.dummy
  @echo Linking libsmbclient non-shared library $@
  @-$(AR) -rc $@ $(LIBSMBCLIENT_PICOBJS)

 bin/pam_smbpass.@SHLIBEXT@: $(PAM_SMBPASS_OBJ) bin/.dummy
- $(MAKE) pam_smbpass.@SHLIBEXT@
-
-pam_smbpass.@SHLIBEXT@: $(PAM_SMBPASS_OBJ) bin/.dummy
- @echo Linking shared library bin/$@
- $(SHLD) @LDSHFLAGS@ -symbolic -o bin/$@ $(PAM_SMBPASS_OBJ) $(LDFLAGS) -lpam 
$(DYNEXP) $(LIBS) -lc
+ @echo Linking shared library $@
+ $(SHLD) @LDSHFLAGS@ -symbolic -o $@ $(PAM_SMBPASS_OBJ) $(LDFLAGS) -lpam $(DYNEXP) 
+$(LIBS) -lc \
+ @SONAMEFLAG@`basename $@`

 nsswitch/libnss_wins.so: $(NSS_OBJ)
- $(MAKE) libnss_wins.so
-
-libnss_wins.so: $(NSS_OBJ)
- @echo "Linking nsswitch/$@"
- @$(SHLD) @LDSHFLAGS@ -o nsswitch/$@ $(NSS_OBJ) -lc
+ @echo "Linking $@"
+ @$(SHLD) @LDSHFLAGS@ -o $@ $(NSS_OBJ) -lc \
+ @SONAMEFLAG@`basename $@`

 bin/winbindd: $(WINBINDD_OBJ) bin/.dummy
  @echo Linking $@
  @$(LINK) -o $@ $(WINBINDD_OBJ) $(DYNEXP) $(LIBS)

-nsswitch/@WINBIND_LTARGETS@: $(WINBIND_NSS_PICOBJS)
- $(MAKE) @WINBIND_LTARGETS@
-
 @WINBIND_LTARGETS@: $(WINBIND_NSS_PICOBJS)
- @echo "Linking nsswitch/$@"
- @$(SHLD) @LDSHFLAGS@ -o nsswitch/$@ $(WINBIND_NSS_PICOBJS) @WINBIND_NSS_EXTRA_LIBS@
+ @echo "Linking $@"
+ @$(SHLD) @LDSHFLAGS@ -o $@ $(WINBIND_NSS_PICOBJS) @WINBIND_NSS_EXTRA_LIBS@ \
+ @SONAMEFLAG@`basename $@`

 nsswitch/pam_winbind.so: $(PAM_WINBIND_OBJ)
- $(MAKE) pam_winbind.so
+ @echo Linking $@
+ @$(SHLD) @LDSHFLAGS@ -o $@ $(PAM_WINBIND_OBJ) \
+ @SONAMEFLAG@`basename $@`

-pam_winbind.so: $(PAM_WINBIND_OBJ)
- @echo Linking nsswitch/$@
- @$(SHLD) @LDSHFLAGS@ -o nsswitch/$@ $(PAM_WINBIND_OBJ)

 bin/wbinfo: $(WBINFO_OBJ) $(PARAM_OBJ) $(LIB_OBJ) $(NOPROTO_OBJ) \
  $(UBIQX_OBJ) @BUILD_POPT@ bin/.dummy


- Original Message -
From: "Richard Bollinger" <[EMAIL PROTECTED]>
To: "Herbert Lewis" <[EMAIL PROTECTED]>
Cc: "samba-technical" <[EMAIL PROTECTED]>
Sent: Tuesday, April 30, 2002 12:59 PM
Subject: Re: 2..2.4-pre Makefile inconsistencies - Fix enclosed


> My changes didn't affect the ld command which does the linking (verified by running 
>it both ways
and
> getting identical broken binary files) - hence the problem remains :-(.
>
> There appear to be two ways to _really_ solve the problem...
>
> 1) create the .so files in the current directory rather than a subdirectory
> or
> 2) specify the soname with the correct option to ld, perhaps as was done for 
>libsmbclient.so
>
> Rich B





Re: 2..2.4-pre Makefile inconsistencies - Fix enclosed

2002-04-30 Thread Richard Bollinger

My changes didn't affect the ld command which does the linking (verified by running it 
both ways and
getting identical broken binary files) - hence the problem remains :-(.

There appear to be two ways to _really_ solve the problem...

1) create the .so files in the current directory rather than a subdirectory
or
2) specify the soname with the correct option to ld, perhaps as was done for 
libsmbclient.so

Rich B

- Original Message -
From: "Herbert Lewis" <[EMAIL PROTECTED]>
To: "Richard Bollinger" <[EMAIL PROTECTED]>
Cc: "samba-technical" <[EMAIL PROTECTED]>
Sent: Tuesday, April 30, 2002 11:15 AM
Subject: Re: 2..2.4-pre Makefile inconsistencies - Fix enclosed


> The problem with your "fix" is that the soname in the libraries
> ends up being set to the wrong values. For example the file
> on linux is /lib/libnss_winbind.so but the value stored in the
> file as the soname is nsswitch/libnss_winbind.so. Dito for all
> the others. If you can find a better fix that preserves getting
> the sonames right and simplifies things then I'd be happy to
> use it.





Re: 2..2.4-pre Makefile inconsistencies - Fix enclosed

2002-04-30 Thread Richard Bollinger

I don't want to ruffle anyone's feathers, but last nights changes to Makefile.in seems 
to make it
more complex...  Here's my "fix" to that fix (Makefile.in now 21 lines shorter and 
avoids recursive
make):

--- ../source/configure.in Mon Apr 29 07:16:35 2002
+++ configure.in Mon Apr 29 09:32:29 2002
@@ -2674,10 +2674,10 @@
  WINBIND_STARGETS="bin/winbindd"
  case "$host_os" in
 *irix*)
- WINBIND_LTARGETS="libns_winbind.so"
+ WINBIND_LTARGETS="nsswitch/libns_winbind.so"
 ;;
 *)
- WINBIND_LTARGETS="libnss_winbind.so"
+ WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
 ;;
  esac

--- Makefile.in Tue Apr 30 09:22:41 2002
+++ /tmp/Makefile.in Tue Apr 30 09:21:50 2002
@@ -91,7 +91,7 @@
 WINBIND_PROGS = @WINBIND_TARGETS@
 WINBIND_SPROGS = @WINBIND_STARGETS@
 WINBIND_PAM_PROGS = @WINBIND_PAM_TARGETS@
-WINBIND_LPROGS = nsswitch/@WINBIND_LTARGETS@
+WINBIND_LPROGS = @WINBIND_LTARGETS@

 SPROGS = bin/smbd bin/nmbd bin/swat
 PROGS1 = bin/smbclient bin/smbspool bin/testparm bin/testprns bin/smbstatus 
bin/smbcontrol
bin/tdbbackup bin/make_printerdef @RUNPROG@
@@ -635,25 +635,16 @@
  @$(CC) $(FLAGS) -o $@ $(SMBSH_OBJ) $(LDFLAGS) $(LIBS)

 bin/smbwrapper.@SHLIBEXT@: $(PICOBJS) bin/.dummy
- $(MAKE) smbwrapper.@SHLIBEXT@
-
-smbwrapper.@SHLIBEXT@: $(PICOBJS) bin/.dummy
- @echo Linking shared library bin/$@
- @$(SHLD) @LDSHFLAGS@ -o bin/$@ $(PICOBJS) $(LIBS)
+ @echo Linking shared library $@
+ @$(SHLD) @LDSHFLAGS@ -o $@ $(PICOBJS) $(LIBS)

 bin/smbwrapper.32.@SHLIBEXT@: $(PICOBJS32) bin/.dummy
- $(MAKE) smbwrapper.32.@SHLIBEXT@
-
-smbwrapper.32.@SHLIBEXT@: $(PICOBJS32) bin/.dummy
- @echo Linking shared library bin/$@
- @$(SHLD) -32 @LDSHFLAGS@ -o bin/$@ $(PICOBJS32) $(LIBS)
+ @echo Linking shared library $@
+ @$(SHLD) -32 @LDSHFLAGS@ -o $@ $(PICOBJS32) $(LIBS)

 bin/libsmbclient.@SHLIBEXT@: $(LIBSMBCLIENT_PICOBJS) bin/.dummy
- $(MAKE) libsmbclient.@SHLIBEXT@
-
-libsmbclient.@SHLIBEXT@: $(LIBSMBCLIENT_PICOBJS) bin/.dummy
- @echo Linking libsmbclient shared library bin/$@
- @$(SHLD) @LDSHFLAGS@ -o bin/$@ $(LIBSMBCLIENT_PICOBJS) $(LIBS) \
+ @echo Linking libsmbclient shared library $@
+ @$(SHLD) @LDSHFLAGS@ -o $@ $(LIBSMBCLIENT_PICOBJS) $(LIBS) \
  @[EMAIL PROTECTED]$(LIBSMBCLIENT_MAJOR)

 bin/libsmbclient.a: $(LIBSMBCLIENT_PICOBJS) bin/.dummy
@@ -661,36 +652,24 @@
  @-$(AR) -rc $@ $(LIBSMBCLIENT_PICOBJS)

 bin/pam_smbpass.@SHLIBEXT@: $(PAM_SMBPASS_OBJ) bin/.dummy
- $(MAKE) pam_smbpass.@SHLIBEXT@
-
-pam_smbpass.@SHLIBEXT@: $(PAM_SMBPASS_OBJ) bin/.dummy
- @echo Linking shared library bin/$@
- $(SHLD) @LDSHFLAGS@ -symbolic -o bin/$@ $(PAM_SMBPASS_OBJ) $(LDFLAGS) -lpam 
$(DYNEXP) $(LIBS) -lc
+ @echo Linking shared library $@
+ $(SHLD) @LDSHFLAGS@ -symbolic -o $@ $(PAM_SMBPASS_OBJ) $(LDFLAGS) -lpam $(DYNEXP) 
+$(LIBS) -lc

 nsswitch/libnss_wins.so: $(NSS_OBJ)
- $(MAKE) libnss_wins.so
-
-libnss_wins.so: $(NSS_OBJ)
- @echo "Linking nsswitch/$@"
- @$(SHLD) @LDSHFLAGS@ -o nsswitch/$@ $(NSS_OBJ) -lc
+ @echo "Linking $@"
+ @$(SHLD) @LDSHFLAGS@ -o $@ $(NSS_OBJ) -lc

 bin/winbindd: $(WINBINDD_OBJ) bin/.dummy
  @echo Linking $@
  @$(LINK) -o $@ $(WINBINDD_OBJ) $(DYNEXP) $(LIBS)

 nsswitch/@WINBIND_LTARGETS@: $(WINBIND_NSS_PICOBJS)
- $(MAKE) @WINBIND_LTARGETS@
-
-@WINBIND_LTARGETS@: $(WINBIND_NSS_PICOBJS)
- @echo "Linking nsswitch/$@"
- @$(SHLD) @LDSHFLAGS@ -o nsswitch/$@ $(WINBIND_NSS_PICOBJS) @WINBIND_NSS_EXTRA_LIBS@
+ @echo "Linking $@"
+ @$(SHLD) @LDSHFLAGS@ -o $@ $(WINBIND_NSS_PICOBJS) @WINBIND_NSS_EXTRA_LIBS@

 nsswitch/pam_winbind.so: $(PAM_WINBIND_OBJ)
- $(MAKE) pam_winbind.so
-
-pam_winbind.so: $(PAM_WINBIND_OBJ)
- @echo Linking nsswitch/$@
- @$(SHLD) @LDSHFLAGS@ -o nsswitch/$@ $(PAM_WINBIND_OBJ)
+ @echo Linking $@
+ @$(SHLD) @LDSHFLAGS@ -o $@ $(PAM_WINBIND_OBJ)

 bin/wbinfo: $(WBINFO_OBJ) $(PARAM_OBJ) $(LIB_OBJ) $(NOPROTO_OBJ) \
  $(UBIQX_OBJ) @BUILD_POPT@ bin/.dummy





2..2.4-pre Makefile inconsistencies - Fix enclosed

2002-04-29 Thread Richard Bollinger

Repeated makes on Linux result in libnss_winbind.so being rebuilt _every_ time in 
spite of no
changes.

Problem is inconsistency between targets and commands.  Patches to configure.in and 
Makefile.in are
as follows:

--- ../source/configure.in Mon Apr 29 07:16:35 2002
+++ ./configure.in Mon Apr 29 09:32:29 2002
@@ -2674,10 +2674,10 @@
  WINBIND_STARGETS="bin/winbindd"
  case "$host_os" in
 *irix*)
- WINBIND_LTARGETS="libns_winbind.so"
+ WINBIND_LTARGETS="nsswitch/libns_winbind.so"
 ;;
 *)
- WINBIND_LTARGETS="libnss_winbind.so"
+ WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
 ;;
  esac

--- ../source/Makefile.in Mon Apr 29 07:15:48 2002
+++ ./Makefile.in Mon Apr 29 09:37:02 2002
@@ -663,7 +663,7 @@

 @WINBIND_LTARGETS@: $(WINBIND_NSS_PICOBJS)
  @echo "Linking $@"
- @$(SHLD) @LDSHFLAGS@ -o nsswitch/$@ $(WINBIND_NSS_PICOBJS) @WINBIND_NSS_EXTRA_LIBS@
+ @$(SHLD) @LDSHFLAGS@ -o $@ $(WINBIND_NSS_PICOBJS) @WINBIND_NSS_EXTRA_LIBS@

 nsswitch/pam_winbind.so: $(PAM_WINBIND_OBJ) bin/.dummy
  @echo Linking $@


Please run autoconf and check in the resulting "configure" file as well.

Rich Bollinger, Elliott Company