[Samba] How to increase os level for one interface

2006-05-19 Thread Rashid N. Achilov
Samba 3.0.22 on box with three network cards. How to I can inrcease os level 
only for one interface and do not touch it for another. On second interface 
is a Windows Server with AD, and it should be keep Domain Master Role.
-- 
   With Best Regards.
   Rashid N. Achilov (RNA1-RIPE), Web: http://granch.ru/~shelton
   Granch Ltd. system administrator, e-mail: achilov [at] granch [dot] ru
   PGP: 83 CD E2 A7 37 4A D5 81 D6 D6 52 BF C9 2F 85 AF 97 BE CB 0A
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] How to prevent an election

2006-05-19 Thread Rashid N. Achilov
How to prevent an election in a network, when a Windows XP is started? Samba 
has now os level = 32 at this network and 

announce version = 5.0 
fake announce = NT Workstation

If I set it to 5.2 and NT appropriately, can this help to prevent 
election?
-- 
   With Best Regards.
   Rashid N. Achilov (RNA1-RIPE), Web: http://granch.ru/~shelton
   Granch Ltd. system administrator, e-mail: achilov [at] granch [dot] ru
   PGP: 83 CD E2 A7 37 4A D5 81 D6 D6 52 BF C9 2F 85 AF 97 BE CB 0A
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Can't get past login window

2006-05-19 Thread David Ackerman
I am new at Samba.  I just about have it working.  From my windows XP
client, I can access the workgroup and then see the server.  When I click on
server to access network folders, the login pops up.  I put in the username
and password (both of which are already in Samba).  The login window
refreshes and I get in the login screen:  XXX/username, with XXX being the
name of my local Windows XP computer.  I put in password and the window just
refreshes the same and I can't get past it.  My /home directory is 777 and
the user's directory is 700.  I am using Webmin as much as possible.  Any
help will be great.  The answer is probably simple.  Thanks.

 

David

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


Re: [Samba] samba log and cups

2006-05-19 Thread Emilio Casbas

Mark Proehl wrote:

Hi,

if your samba is compiled without libcups, then you should not set
printing = CUPS.
  

why?
you can use CUPS with samba even if samba is not linked against libcups.so.

From the smb.conf manual page:

   For printing = CUPS : If SAMBA is compiled against libcups, then printcap = 
cups uses the  CUPS  API
   to submit jobs, etc.

If samba is not compiled against libcups, how should it be able to use
the cups api?
  
Because we've using our customized print command , no from the CUPS 
default.
This command do some sort internal proccesing and then send the job from 
the spool samba
to spool cups, and samba/cups integration is working perfect, but as I 
said, the unique problem

is the log error from samba.

Thanks
Emilio C.



Mark
  





On Thu, May 18, 2006 at 05:56:44PM +0200, Emilio Casbas wrote:
  

We've seen a lot of lines in samba log with the message;

[2006/05/18 17:49:15, 0] printing/pcap.c:pcap_cache_reload(149)
 Unable to open printcap file CUPS for read!

Our smbd isn´t compiled with CUPS why we are using a customized print 
command

however, we are using CUPS as printer system with;
printing = CUPS
printcap name = CUPS

All system is working well, the only problem is the samba log what it's 
filling with

that message.

samba version is samba-3.0.20
any ideas?

Thanks.
Emilio C.

--




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


[Samba] Character in file names are dispalyed wrong

2006-05-19 Thread Dr.Peer-Joachim Koch

Hi,

we are running here in some trouble with file names.
So under unix files are name and displayed corretly.

Something like aa_12:00
I don't like it with space and : , but it's
generate from some software..

Anyway under Unix the name is displayed correctly,
but samba is showing something different _NID69~9


[global]
dos charset = CP850
unix charset = UTF-8
display charset = UTF-8
workgroup = BGC


What's wrong here ?
How can we change the smb.conf to display everything correctly ?

--
Bye,
Peer
_
Max-Planck-Institut fuer Biogeochemie
Dr. Peer-Joachim Koch
Hans-Knöll Str.10Telefon: ++49 3641 57-6705
D-07745 Jena Telefax: ++49 3641 57-7705
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Re: [Samba] Redirection of Desktop

2006-05-19 Thread Wolfgang Ratzka

Matthew Crites schrieb:

Hi, I am using a logon script to modify the
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell
Folders\Desktop to %LOGONSERVER%\profiles\%USERNAME%.  On the samba
server I have a share that hosts the profiles under %N\profiles\%U


Do not do this. The profiles share will be overwritten by the local
copy of the user profile (usually C:\Documents and Settings\%username%)
upon user logoff. So you should not directly write to this directory.
--
Wolfgang Ratzka
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Can't get past login window

2006-05-19 Thread c p tiwari

dear
  First u make it sure that you are accessing it with correct alias 
share name.And you try this with cmd line from any linux machine

#smbclient -L //server-ip -N
Above cmd will display the share name (alias name).
now
#smbclient //server-ip/sharename -U username

If you are not able to access then verify the path of your samba share in 
configuration .

regards

cp tiwari






  


On Fri, 19 May 2006 David Ackerman wrote :
I am new at Samba.  I just about have it working.  From my windows XP
client, I can access the workgroup and then see the server.  When I click on
server to access network folders, the login pops up.  I put in the username
and password (both of which are already in Samba).  The login window
refreshes and I get in the login screen:  XXX/username, with XXX being the
name of my local Windows XP computer.  I put in password and the window just
refreshes the same and I can't get past it.  My /home directory is 777 and
the user's directory is 700.  I am using Webmin as much as possible.  Any
help will be great.  The answer is probably simple.  Thanks.



David

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

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


[Samba] net rpc join fails the first time but succeeds the second

2006-05-19 Thread Felipe Alfaro Solana

Hi.

I'm having some trouble when trying to join a SAMBA machine, acting as
a member server, to a NT-style domain server managed by a SAMBA PDC
using an LDAP back-end. Both machines are running samba-3.0.10-1.4E.6
on Red Hat Enterprise Linux 4.1 Update 3 for AMD64.

When trying to add the member server to the domain, it fails with an
error message. However, if I try to add it again, the operation
succeeds.

The first try to add the member server fails with this error message:

[EMAIL PROTECTED] ~]# net rpc join CENTRAL -U Administrator%password
[2006/05/19 13:01:08, 0] utils/net_rpc_join.c:net_rpc_join_newstyle(319)
 Error domain join verification (reused connection): NT_STATUS_ACCESS_DENIED

Unable to join domain CENTRAL.

I can see the SAMBA machine account has been created:

[EMAIL PROTECTED] ~]# pdbedit -L
Administrator:0:Domain Administrator
member$:10001:Machine

Then, immediately, I try to add the member server, once again:

[EMAIL PROTECTED] ~]# net rpc join CENTRAL -U Administrator%password
Joined domain CENTRAL.

Both, the member server and PDC are using nss_ldap.
Thus:

[EMAIL PROTECTED] ~]# id Administrator
uid=0(root) gid=0(root) groups=0(root)

The smb.conf for the PDC is:

[global]

  # Store SAMBA data into an LDAP backend
  passdb backend = ldapsam:ldap://ldap/
  ldap admin dn = cn=Directory Manager
  ldap suffix = dc=central
  ldap user suffix = ou=People
  ldap machine suffix = ou=Computers
  ldap group suffix = ou=Groups

  # Scripts for managing users and computers
  add user script = /usr/sbin/luseradd -g Domain Users %u
  delete user script = /usr/sbin/luserdel -r %u
  add group script = /usr/sbin/lgroupadd %g
  delete group script = /usr/sbin/groupdel %g
  add user to group script = /usr/sbin/lgroupmod -A %u %g
  delete user from group script = /usr/sbin/lgroupmod -R %u %g
  add machine script = /usr/sbin/luseradd -g Domain Computers -c
Machine -s /bin/false -d /dev/null -n -M %u

  workgroup = CENTRAL
  netbios name = NDS1
  server string = CENTRAL Samba Domain Controller

  load printers = no

  log file = /var/log/samba/%m.log

  security = user
  encrypt passwords = yes

  socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

  os level = 35
  local master = yes
  domain master = yes
  preferred master = yes
  domain logons = yes
  logon path =

  wins support = yes

The smb.conf for the member server is:

[global]

  workgroup = CENTRAL
  server string = CENTRAL File Server
  netbios name = FS1
  log file = /var/log/samba/%m.log
  max log size = 50
  security = domain
  encrypt passwords = yes
  socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

Any ideas?
Thank you very much.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] sharing a printer

2006-05-19 Thread Ivan Ricotti
Hi folks,

I installed a Samsung ML-1610 on CUPS and on my linux server the printer do its
work fine. Now I'm trying to share the printer on my local network (windows home
edition clients).

My smb.conf:

[samsung]
comment = Samsung ML-1610
path = /tmp
guest ok = Yes
printable = Yes
printer name = Samsung ML-1610

When I install the printer on the windows client all seems ok (my workgroup it's
ok, I browse the workgroup and I find the printer, I installed the driver) but I
can't print! :(
The printer status is always paused and when I try to access to the printer
from the control panel it says: access denied.

Any hint?

Thanks a lot,
Ivan

-- 
Ivan Ricotti
--- 
eLabor sc - via G. Garibaldi 33, 56127 Pisa
tel: +39 050970363 - fax +39 0503137878
email: [EMAIL PROTECTED]
GnuPG KeyID: DFD581C5 - 13/11/2003
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] sharing a printer

2006-05-19 Thread Adam Williams

add use client driver = yes to get rid of the access denied error.


Ivan Ricotti wrote:

Hi folks,

I installed a Samsung ML-1610 on CUPS and on my linux server the printer do its
work fine. Now I'm trying to share the printer on my local network (windows home
edition clients).

My smb.conf:

[samsung]
comment = Samsung ML-1610
path = /tmp
guest ok = Yes
printable = Yes
printer name = Samsung ML-1610

When I install the printer on the windows client all seems ok (my workgroup it's
ok, I browse the workgroup and I find the printer, I installed the driver) but I
can't print! :(
The printer status is always paused and when I try to access to the printer
from the control panel it says: access denied.

Any hint?

Thanks a lot,
Ivan

  


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


Re: [Samba] sharing a printer

2006-05-19 Thread Ivan Ricotti
Hello guys,

use client driver = yes helps because I have no more access denied errors,
unfortunately the printers does not print! :(

From Windows clients the printer is still paused (I see that when I try to
print a document and I have to select the printer). When I send a document to
the printer no process appears in the print queue and no data arrive to the
printer (the printer's led does not blink).

I tried to add AllowUser in printers.conf but... no way out.

Any ideas?
Thank you very much,
Ivan


Adam Williams wrote:
 add use client driver = yes to get rid of the access denied error.
 
 
 Ivan Ricotti wrote:
 
 Hi folks,

 I installed a Samsung ML-1610 on CUPS and on my linux server the
 printer do its
 work fine. Now I'm trying to share the printer on my local network
 (windows home
 edition clients).

 My smb.conf:

 [samsung]
 comment = Samsung ML-1610
 path = /tmp
 guest ok = Yes
 printable = Yes
 printer name = Samsung ML-1610

 When I install the printer on the windows client all seems ok (my
 workgroup it's
 ok, I browse the workgroup and I find the printer, I installed the
 driver) but I
 can't print! :(
 The printer status is always paused and when I try to access to the
 printer
 from the control panel it says: access denied.

 Any hint?

 Thanks a lot,
 Ivan

   
 
 

-- 
Ivan Ricotti
--- 
eLabor sc - via G. Garibaldi 33, 56127 Pisa
tel: +39 050970363 - fax +39 0503137878
email: [EMAIL PROTECTED]
GnuPG KeyID: DFD581C5 - 13/11/2003
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] net rpc join fails the first time but succeeds the second

2006-05-19 Thread Mark Proehl
Hi,

if you create a new user with luseradd, is this new user immediately
available? Or do you have to wait some time between the following two
commands:

   /usr/sbin/luseradd -g Domain Computers -c Machine -s /bin/false -d 
/dev/null -n -M testuser
   id testuser

Mark



On Fri, May 19, 2006 at 01:13:21PM +0200, Felipe Alfaro Solana wrote:
 Hi.
 
 I'm having some trouble when trying to join a SAMBA machine, acting as
 a member server, to a NT-style domain server managed by a SAMBA PDC
 using an LDAP back-end. Both machines are running samba-3.0.10-1.4E.6
 on Red Hat Enterprise Linux 4.1 Update 3 for AMD64.
 
 When trying to add the member server to the domain, it fails with an
 error message. However, if I try to add it again, the operation
 succeeds.
 
 The first try to add the member server fails with this error message:
 
 [EMAIL PROTECTED] ~]# net rpc join CENTRAL -U Administrator%password
 [2006/05/19 13:01:08, 0] utils/net_rpc_join.c:net_rpc_join_newstyle(319)
  Error domain join verification (reused connection): NT_STATUS_ACCESS_DENIED
 
 Unable to join domain CENTRAL.
 
 I can see the SAMBA machine account has been created:
 
 [EMAIL PROTECTED] ~]# pdbedit -L
 Administrator:0:Domain Administrator
 member$:10001:Machine
 
 Then, immediately, I try to add the member server, once again:
 
 [EMAIL PROTECTED] ~]# net rpc join CENTRAL -U Administrator%password
 Joined domain CENTRAL.
 
 Both, the member server and PDC are using nss_ldap.
 Thus:
 
 [EMAIL PROTECTED] ~]# id Administrator
 uid=0(root) gid=0(root) groups=0(root)
 
 The smb.conf for the PDC is:
 
 [global]
 
   # Store SAMBA data into an LDAP backend
   passdb backend = ldapsam:ldap://ldap/
   ldap admin dn = cn=Directory Manager
   ldap suffix = dc=central
   ldap user suffix = ou=People
   ldap machine suffix = ou=Computers
   ldap group suffix = ou=Groups
 
   # Scripts for managing users and computers
   add user script = /usr/sbin/luseradd -g Domain Users %u
   delete user script = /usr/sbin/luserdel -r %u
   add group script = /usr/sbin/lgroupadd %g
   delete group script = /usr/sbin/groupdel %g
   add user to group script = /usr/sbin/lgroupmod -A %u %g
   delete user from group script = /usr/sbin/lgroupmod -R %u %g
   add machine script = /usr/sbin/luseradd -g Domain Computers -c
 Machine -s /bin/false -d /dev/null -n -M %u
 
   workgroup = CENTRAL
   netbios name = NDS1
   server string = CENTRAL Samba Domain Controller
 
   load printers = no
 
   log file = /var/log/samba/%m.log
 
   security = user
   encrypt passwords = yes
 
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
 
   os level = 35
   local master = yes
   domain master = yes
   preferred master = yes
   domain logons = yes
   logon path =
 
   wins support = yes
 
 The smb.conf for the member server is:
 
 [global]
 
   workgroup = CENTRAL
   server string = CENTRAL File Server
   netbios name = FS1
   log file = /var/log/samba/%m.log
   max log size = 50
   security = domain
   encrypt passwords = yes
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
 
 Any ideas?
 Thank you very much.
 --
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] sharing a printer

2006-05-19 Thread Ivan Ricotti
Shame on me. SHAME ON ME!

It was (obvioulsly) my fault: the printer name, set in CUPS printer.conf, was
Samsung and in the smb.conf I set the a lowercase s in the printer name.
Now it's all ok.

Thank you very much to everybody.
Ivan

-- 
Ivan Ricotti
--- 
eLabor sc - via G. Garibaldi 33, 56127 Pisa
tel: +39 050970363 - fax +39 0503137878
email: [EMAIL PROTECTED]
GnuPG KeyID: DFD581C5 - 13/11/2003
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] sharing a printer

2006-05-19 Thread RaSca

Ivan Ricotti ha scritto:

Hello guys,
use client driver = yes helps because I have no more access denied errors,
unfortunately the printers does not print! :(

From Windows clients the printer is still paused (I see that when I try to

print a document and I have to select the printer). When I send a document to
the printer no process appears in the print queue and no data arrive to the
printer (the printer's led does not blink).
I tried to add AllowUser in printers.conf but... no way out.


This seems to be a Cups problem. I not sure but there should be another 
options in the cups configuration file wich is used to grant the access 
to local printers by network hosts and IPS.
Check out the man page of cups to see a way to grant access to all, 
then, once the printer begin to work, you can understand what options 
are used to set permissions.


Bye,

--
RaSca
Il regno dei cieli e' simile ad un mercante che va in cerca di
perle preziose. Trovatane una di grande valore va, vende tutti
i suoi averi e la compra - Gesu' Cristo
http://web.tiscali.it/rascasoft
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

[Samba] Samba Windows 2003 AD

2006-05-19 Thread stijn . mahieu
Hello,

I have joined my samba 3.0.7 server successfully to Windows 2003 ADS, and 
Kerberos authentication seems to work fine, provided that the user also 
exists on the Linux machine. However, I can't seem to create a share that 
grants access to the Domain Users Group. Will I need to set up Winbind for 
that or is there a way to do this in my current setup? If I need to set up 
winbind, will I need to remove the ADS bits in my smb.conf file?

Any tips are very much appreciated.

Stijn

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


Re: [Samba] sharing a printer

2006-05-19 Thread Joe Cipale
I solved my CUPS printing issues by installing an HP Jet-DirectX 3-port Print 
Server. Setup was quick, easy and I was printing from all three printers in 
less than 20 minutes. Not only from Linux/windows, but even from my freinds 
iBook.

RaSca wrote:


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


Re: [Samba] How to increase os level for one interface

2006-05-19 Thread Jeremy Allison
On Fri, May 19, 2006 at 12:24:29PM +0700, Rashid N. Achilov wrote:
 Samba 3.0.22 on box with three network cards. How to I can inrcease os level 
 only for one interface and do not touch it for another. On second interface 
 is a Windows Server with AD, and it should be keep Domain Master Role.

We can't currently do this... It's an interesting idea though. Let me
think about it.

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


Re: [Samba] Character in file names are dispalyed wrong

2006-05-19 Thread Jeremy Allison
On Fri, May 19, 2006 at 10:08:40AM +0200, Dr.Peer-Joachim Koch wrote:
 Hi,
 
 we are running here in some trouble with file names.
 So under unix files are name and displayed corretly.
 
 Something like aa_12:00
 I don't like it with space and : , but it's
 generate from some software..
 
 Anyway under Unix the name is displayed correctly,
 but samba is showing something different _NID69~9

The file name has a colon : character in it which is illegal
under Windows. Samba has to mangle the filename to make it
into something legal for Windows to display.

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


[Samba] RE: PDC's on same Network (Golden Butler)

2006-05-19 Thread adrian sender
You can have as many PDC's on a network with same subnet as you like keeping 
in mind they must have different domain names - ie workgroup =


Cheers,
Adrian Sender.



From: Golden Butler [EMAIL PROTECTED]
To: Samba Mailing List samba@lists.samba.org
Subject: [Samba] 2 PDC's on same Network
Date: Thu, 18 May 2006 08:57:59 -0500
Hi,

I'm looking to replace our existing Samba 2.X.X PDC with version  3.0.20.  
I would like to configure and test the new PDC with our existing ldap 
server on our network.  Is it possible to have two working PDC's running on 
the same network at the same time.  Will the new PDC cause any problems 
with the existing PDC and user logins?



- Golden



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


RE: [Samba] Can't get past login window

2006-05-19 Thread adrian sender

Keep in mind xx must be the same for useradd  smbpasswd.

useradd test
passwd test
xx
xx

smbpasswd -a test
xx
xx

In share definition set valid users = test root

Adrian Sender.


From: David Ackerman [EMAIL PROTECTED]
To: samba@lists.samba.org
Subject: [Samba] Can't get past login window
Sent: Friday, 19 May 2006 4:01:07 PM
I am new at Samba.  I just about have it working.  From my windows XP
client, I can access the workgroup and then see the server.  When I click on
server to access network folders, the login pops up.  I put in the username
and password (both of which are already in Samba).  The login window
refreshes and I get in the login screen:  XXX/username, with XXX being the
name of my local Windows XP computer.  I put in password and the window just
refreshes the same and I can't get past it.  My /home directory is 777 and
the user's directory is 700.  I am using Webmin as much as possible.  Any
help will be great.  The answer is probably simple.  Thanks.



David


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


RE: [Samba] net rpc join fails the first time but succeeds the second

2006-05-19 Thread adrian sender
Your domain  member is not configured correctly, you need it to be able to 
authenticate with ldap.


Should look something like this as per Chapter 7 Samba 3 by Example..
http://samba.org/samba/docs/man/Samba-Guide/unixclients.html#sdcsdmldap

Example 7.1. Samba Domain Member in Samba Domain Using LDAP smb.conf File

# Global parameters

[global]
unix charset = LOCALE
workgroup = MEGANET2
security = DOMAIN
username map = /etc/samba/smbusers
log level = 10
syslog = 0
log file = /var/log/samba/%m
max log size = 50
smb ports = 139
name resolve order = wins bcast hosts
printcap name = CUPS
wins server = 192.168.2.1
ldap suffix = dc=abmas,dc=biz
ldap machine suffix = ou=People
ldap user suffix = ou=People
ldap group suffix = ou=Groups
ldap idmap suffix = ou=Idmap
ldap admin dn = cn=Manager,dc=abmas,dc=biz
idmap backend = ldap:ldap://lapdc.abmas.biz
idmap uid = 1-2
idmap gid = 1-2
winbind trusted domains only = Yes
printer admin = root
printing = cups

Stick to the official docs, will save you days/years of time.

Adrian Sender.




From: Felipe Alfaro Solana [EMAIL PROTECTED]
To: Samba Mailing List samba@lists.samba.org
Subject: [Samba] net rpc join fails the first time but succeeds the second
Sent: Friday, 19 May 2006 9:13:21 PM
Hi.

I'm having some trouble when trying to join a SAMBA machine, acting as
a member server, to a NT-style domain server managed by a SAMBA PDC
using an LDAP back-end. Both machines are running samba-3.0.10-1.4E.6
on Red Hat Enterprise Linux 4.1 Update 3 for AMD64.

When trying to add the member server to the domain, it fails with an
error message. However, if I try to add it again, the operation
succeeds.

The first try to add the member server fails with this error message:

[EMAIL PROTECTED] ~]# net rpc join CENTRAL -U Administrator%password
[2006/05/19 13:01:08, 0] utils/net_rpc_join.c:net_rpc_join_newstyle(319)
Error domain join verification (reused connection): NT_STATUS_ACCESS_DENIED

Unable to join domain CENTRAL.

I can see the SAMBA machine account has been created:

[EMAIL PROTECTED] ~]# pdbedit -L
Administrator:0:Domain Administrator
member$:10001:Machine

Then, immediately, I try to add the member server, once again:

[EMAIL PROTECTED] ~]# net rpc join CENTRAL -U Administrator%password
Joined domain CENTRAL.

Both, the member server and PDC are using nss_ldap.
Thus:

[EMAIL PROTECTED] ~]# id Administrator
uid=0(root) gid=0(root) groups=0(root)

The smb.conf for the PDC is:

[global]

 # Store SAMBA data into an LDAP backend
 passdb backend = ldapsam:ldap://ldap/
 ldap admin dn = cn=Directory Manager
 ldap suffix = dc=central
 ldap user suffix = ou=People
 ldap machine suffix = ou=Computers
 ldap group suffix = ou=Groups

 # Scripts for managing users and computers
 add user script = /usr/sbin/luseradd -g Domain Users %u
 delete user script = /usr/sbin/luserdel -r %u
 add group script = /usr/sbin/lgroupadd %g
 delete group script = /usr/sbin/groupdel %g
 add user to group script = /usr/sbin/lgroupmod -A %u %g
 delete user from group script = /usr/sbin/lgroupmod -R %u %g
 add machine script = /usr/sbin/luseradd -g Domain Computers -c
Machine -s /bin/false -d /dev/null -n -M %u

 workgroup = CENTRAL
 netbios name = NDS1
 server string = CENTRAL Samba Domain Controller

 load printers = no

 log file = /var/log/samba/%m.log

 security = user
 encrypt passwords = yes

 socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

 os level = 35
 local master = yes
 domain master = yes
 preferred master = yes
 domain logons = yes
 logon path =

 wins support = yes

The smb.conf for the member server is:

[global]

 workgroup = CENTRAL
 server string = CENTRAL File Server
 netbios name = FS1
 log file = /var/log/samba/%m.log
 max log size = 50
 security = domain
 encrypt passwords = yes
 socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

Any ideas?
Thank you very much.


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


[Samba] smbd hanging because netbios-ssn TCP connexion not seen as down

2006-05-19 Thread Cedric Delfosse

Hello,

(Samba 3.0.21c / Linux 2.4.27)

a smbd process was hanging on a file server since one day. This smbd 
process was locking some files on the server, and that was causing some 
share violation for a Windows user (well, that what I think).


I did a lsof on the smbd process, and I saw that the TCP netbios-ssn 
connection was still seen as established with the machine of the windows 
user that locked the files. The problem is that the machine was shut 
down at this moment since at least half an hour.


A strace showed me that smbd was looping on select calls, waiting for 
some data to read from the socket. Maybe that's why the smbd process was 
not exiting, and so still locking some files.


What can I do to avoid this kind of problem ?
In my smb.conf file, the keepalive option value was 300. Shouldn't 
this option be sufficient ?
How does keepalive work ? Does it work by sending some kind of 
netbios-ssn echo packets to the windows client ?

Does it work with all versions of Windows ?

If I set: socket options = SO_KEEPALIVE TCP_NODELAY, will this fix the 
problem when keepalive SAMBA option doesn't work ? (tcp_keepalive_time 
is 2 hours for Linux 2.4).


Best regards,

--
Cédric Delfosse Linbox / FreeALter Soft
152, rue de Grigy - Technopole Metz   57070 METZ
tél : 03 87 50 87 98   http://linbox.com
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Safe to ignore this message ? -Attempt to bind using schannel without successful serverauth2

2006-05-19 Thread Paul S

OS:  SLES 9
Samba Version:  3.0.20b-3.4-SUSE
Server is running in test mode, as a PDC

I find this message in my log files quite frequently, the majority coming
from one particluar machine (XP SP2):

[2006/05/19 10:35:06, 0] rpc_server/srv_pipe.c:api_pipe_bind_req(981)
 Attempt to bind using schannel without successful serverauth2
[2006/05/19 10:40:16, 0] rpc_server/srv_pipe.c:api_pipe_bind_req(981)
 Attempt to bind using schannel without successful serverauth2

The server seems to function properly so far, thus I am wondering if I can
safely ignore this message.

Workstations are able to join the domain and log in.  File sharing seems to
work well.  The speed and responsiveness of network browsing  is quite
impressive.  I have no complaints about functionality.

While researching this message, I found a post on the lists archives (Sun
Sep 11 18:53:19 GMT 2005, posted by Jeremy Allison) that seems to indicate
that this message is part of normal operation.


I'm starting to think the correct fix is just to raise the debug
level of the message in smbd so that people don't get worried by
it - it seems to be part of normal operation 


If anyone can confirm that this is part of normal operation, or shed some
light on what this means, I would appreciate it.  We have been using Samba
2.2.8a for a few years now, and entries to the log files are very
infrequent.  Perhaps the newer versions are just more chatty to the log
files.

If there is something wrong, I would like to deal with it before I go live
with the server.

Below is my smb.conf file, minus the shares.

Paul

---

[global]
  log level = 1
  syslog = 0
  log file = /var/log/samba/%m.log
  max log size = 1024
  smb ports = 139

  workgroup = abcd
  netbios name = testsmb

  username map = /etc/samba/smbusers
  pam password change = Yes
  passwd program = /usr/bin/passwd '%u'
  passwd chat = *New*Password* %n\n \
 *Re-enter*new*password* %n\n *Password*changed*

  unix password sync = Yes
  map to guest = Bad User
  logon path =
  logon home =
  logon script = scripts\%U.bat
  security = user
  encrypt passwords = yes
  passdb backend = tdbsam
  add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s
/bin/false %m$
  domain logons = yes
  local master = yes
  wins support = yes
  name resolve order = wins bcast hosts
  domain master = yes
  preferred master = yes
  os level = 65
  time server = yes
  socketoptions = TCP_NODELAY
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Safe to ignore this message ? -Attempt to bind using schannel without successful serverauth2

2006-05-19 Thread Jeremy Allison
On Fri, May 19, 2006 at 01:07:02PM -0400, Paul S wrote:
 OS:  SLES 9
 Samba Version:  3.0.20b-3.4-SUSE
 Server is running in test mode, as a PDC
 
 I find this message in my log files quite frequently, the majority coming
 from one particluar machine (XP SP2):
 
 [2006/05/19 10:35:06, 0] rpc_server/srv_pipe.c:api_pipe_bind_req(981)
  Attempt to bind using schannel without successful serverauth2
 [2006/05/19 10:40:16, 0] rpc_server/srv_pipe.c:api_pipe_bind_req(981)
  Attempt to bind using schannel without successful serverauth2
 
 The server seems to function properly so far, thus I am wondering if I can
 safely ignore this message.
 
 Workstations are able to join the domain and log in.  File sharing seems to
 work well.  The speed and responsiveness of network browsing  is quite
 impressive.  I have no complaints about functionality.
 
 While researching this message, I found a post on the lists archives (Sun
 Sep 11 18:53:19 GMT 2005, posted by Jeremy Allison) that seems to indicate
 that this message is part of normal operation.
 
 I'm starting to think the correct fix is just to raise the debug
 level of the message in smbd so that people don't get worried by
 it - it seems to be part of normal operation 
 
 If anyone can confirm that this is part of normal operation, or shed some
 light on what this means, I would appreciate it.  We have been using Samba
 2.2.8a for a few years now, and entries to the log files are very
 infrequent.  Perhaps the newer versions are just more chatty to the log
 files.
 
 If there is something wrong, I would like to deal with it before I go live
 with the server.

Actually it was a misunderstanding by us of the horror that is schannel
auth :-). This should be fixed in 3.0.23 (I think it was fixed in 3.0.22
also) but the message in itself is usually harmless - the client retries.
But you shouldn't see it with a later release.

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


[Samba] Guest Printer Access

2006-05-19 Thread Bruce

I am using Samba as a file and print server on an otherwise Windows home
network.

I would like to have user access to folders, but I would like anyone to
access the printer. So far, I have been unsuccessful in getting this to work
- any attempt to access the printer by anyone not already logged in pops up
a login dialog.

Can someone give me a hint on how I might go about doing this?


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


[Samba] Samba Windows 2003 AD

2006-05-19 Thread stijn . mahieu
Hello,

I have joined my samba 3.0.7 server successfully to Windows 2003 ADS, and 
Kerberos authentication seems to work fine, provided that the user also 
exists on the Linux machine. However, I can't seem to create a share that 
grants access to the Domain Users Group. Will I need to set up Winbind for 
that or is there a way to do this in my current setup? If I need to set up 
winbind, will I need to remove the ADS bits in my smb.conf file?

Any tips are very much appreciated.

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


RE: [Samba] Performance issue on AIX when deleting files inadirectorywith a large number of files

2006-05-19 Thread Lund, Claus
- Original Message -
From: Jeremy Allison [EMAIL PROTECTED]
To: Jeremy Allison [EMAIL PROTECTED]
Cc: samba@lists.samba.org; William Jojo [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Friday, May 12, 2006 7:06 PM
Subject: Re: [Samba] Performance issue on AIX when deleting files
inadirectory with a large number of files



 Ok - here is the patch. Bill - if you could test this on
 AIX by setting the (now per-share) parameter :

 change notify timeout = 0


Thanks Jeremy! I should have an answer for you on Monday morning.

 on the share definition that holds a large number of files,
 you might find a speed up. I can see the effect it has here
 when I disable the kernel and FAM based change notify.


You know, I was trying to manufacture a way to do this with DMAPI (which
is
supported on JFS2) and set an event on {postcreate, postdelete,
postrename}
and check the errno value for success, but there seems to be absolutely
no
way to get the lib to do signalling. It appears to be a poll/select API.
BummerI wish IBM would put some of these cool Linux-only goodies in
their FS.


Cheers,

Bill


 Jeremy.



I have tested this patch (Samba 3.0.22 + Jeremy's patch) and everything
seems to be solid and it solves my problem.
I'll be putting it into production later this week.

Thank you very much,
Claus
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] domain name vs ip address causes refresh problem and lowercase vs capitol folder names - how to fix refresh issue?

2006-05-19 Thread jetpeach

I have Samba 3.022 and have run into a curious problem - when I access my
shared folders over the internet using Windows XP, I get different behavior
whether I put the domain name (e.g. \\mydomain.com) versus if I put my
direct ip address in (e.g. \\12.34.56.78) when accessing my shares.

First, the first screen listing all the shares is in all caps when using the
domain name but in lowercase when using the ip address.  No big deal here, I
don't really care but it's curious.

But the real problem is with refreshing the directories after making any
changes when using the domain name.  If I rename or move a folder, it will
not be refreshed unless I hit F5.  This is not a problem when using the IP
address directly.

So I can just use the IP directly for now, but I am trying to debug the
problem because my IP isn't static and it would be nice to have access using
the domain name.  I've fiddled with options such as dns proxy = yes and
such, but nothing seems to have made a different.  Any advice would be much
appreciated.  I included my smb.conf file below.

Thanks very much in advance!
jet
[global]
workgroup = Workgroup
server string = %h server (Samba, Ubuntu)
dns proxy = no

log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0

panic action = /usr/share/samba/panic-action %d

hosts allow = ALL

### Authentication ###

security = user username map = /etc/samba/smbusers

encrypt passwords = true
passdb backend = tdbsam guest

obey pam restrictions = yes

guest account = nobody
invalid users = root


passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* 
%n\n .

socket options = IPTOS_THROUGHPUT SO_KEEPALIVE

#=== Share Definitions ===

create mask = 0770
directory mask = 0770

[printers]
comment = All Printers
browseable = no
path = /tmp
printable = yes
create mask = 0700

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers


[PROGS]
path = /home/jet/progs
case sensitive = no
read only = no
vfs objects = recycle

[SHARED]
path = /home/jet/Shared
case sensitive = no
read only = no
vfs objects = recycle

[MOVIES]
path = /home/jet/Desktop/Movies/
case sensitive = no
read only = no
vfs objects = recycle

[FTP]
path = /home/jet/ftp/
case sensitive = no
read only = no
vfs objects = recycle

[CDROMDVD]
path = /media/cdrom0/
case sensitive = no

[FUNNY SHIT]
path = /home/jet/Funny Shit/
case sensitive = no
read only = no
vfs objects = recycle

[LAPPY_SHARED]
path = /home/jet/Desktop/Lappy_shared/
case sensitive = no
read only = no
vfs objects = recycle
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

[Samba] Client Oplock Requests

2006-05-19 Thread Zach Seils
Are Mac OS X and/or Linux SMB clients capable of requesting oplocks?   
Can you please point me to a reference for how to enable this on the  
client?


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


[Samba] Samba 3.0.23pre1 with windows vista

2006-05-19 Thread ahmed.feroz

Hi

We are using samba samba-3.0.23pre1 when we try to connect  Windows
Vista, Beta 2, Version 6,Build 5308  we are getting the following error




Doing spnego session setup (blob length=80)



SPNEGO login failed: Unexpected information received



lang_tdb_init: /usr/local/samba3023pre1/lib/en_US.UTF-8.msg: No such
file or directory



session setup failed: SUCCESS - 0.



The network trace and logs are attached with this mail. We tried
bypassing spnego and do NT style session setup in samba 3.0.23pre1, it
still failing. Can some one help us in solving this issue



Thanks and Regards

FEROZ AHMED

WIPRO Technologies

Bangalore

Tel: +91-80-28440011 Ext 18150

Cell: +91-9880157370






The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

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

[Samba] smbclient vs. smbmount -- discrepancy?

2006-05-19 Thread Ken D'Ambrosio
Hi.  Using Debian smbclient 3.0.22 and smbmount 3.0.22, I've found an
oddity that I can't explain:  when I use smbclient, and log in to an XP
box's C$ share as administrator, if I try to go to
c:\Documents and Settings\Administrator
it tells me I don't have permissions; note that I can see stuff above
Administrator in the hierarchy.  If I try to visit the same location
after mounting it with smbmount, it works just fine.  Is this a bug, or
is there some difference between the two that I should have figured out?

Thanks,

-Ken D'Ambrosio


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


[Samba] Quota shows S-XXX instead of actual names

2006-05-19 Thread Ephi Dror
Hi everyone,
 
I am wondering why do I see S-XXX numbers instead of actual names when
viewing and setting quota from windows.
 
My server is configured as a stand alone in which I use pdbedit to add
bunch of users.
 
However,  when I look at properties- security, names are coming up
correct (not as S-XXX numbers)
 
Any idea why.
 
Your help is highly appreciated.
 
Cheers,
Ephi
 
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


A Message you sent has not been delivered

2006-05-19 Thread notificacion
Tamsa (an automated content monitoring gateway) has 
not delivered the following message:

   Message: B000c00e6f.0001.mml
   From:[EMAIL PROTECTED]
   To:  [EMAIL PROTECTED]
   Subject: Re: Extended Mail System  

This is due to automatic rules that have determined that the 
intended recipient is not authorised to receive messages with
Executable file(s) attached.

If you believe the message was business related please send a 
message to GONZALEZ N. Alfonso Email [EMAIL PROTECTED] and request that the 
message be 
released to it's intended recipient.  If no contact is
made within 5 days the message will automatically be deleted.
PLEASE READ THIS IMPORTANT ETIQUETTE MESSAGE BEFORE POSTING:

http://www.catb.org/~esr/faqs/smart-questions.html

svn commit: samba r15705 - branches/SAMBA_3_0/source/nsswitch trunk/source/nsswitch

2006-05-19 Thread vlendec
Author: vlendec
Date: 2006-05-19 07:01:53 + (Fri, 19 May 2006)
New Revision: 15705

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

Log:
Fix bug number 3788. Thanks to Jeff Wright.

Volker

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbind_nss_aix.c
   trunk/source/nsswitch/winbind_nss_aix.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbind_nss_aix.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbind_nss_aix.c2006-05-18 
22:34:16 UTC (rev 15704)
+++ branches/SAMBA_3_0/source/nsswitch/winbind_nss_aix.c2006-05-19 
07:01:53 UTC (rev 15705)
@@ -360,6 +360,9 @@
 
logit(getgrset '%s'\n, r_user);
 
+ZERO_STRUCT(response);
+ZERO_STRUCT(request);
+
STRCPY_RETNULL(request.data.username, r_user);
 
if (*user == WB_AIX_ENCODED) {

Modified: trunk/source/nsswitch/winbind_nss_aix.c
===
--- trunk/source/nsswitch/winbind_nss_aix.c 2006-05-18 22:34:16 UTC (rev 
15704)
+++ trunk/source/nsswitch/winbind_nss_aix.c 2006-05-19 07:01:53 UTC (rev 
15705)
@@ -360,6 +360,9 @@
 
logit(getgrset '%s'\n, r_user);
 
+ZERO_STRUCT(response);
+ZERO_STRUCT(request);
+
STRCPY_RETNULL(request.data.username, r_user);
 
if (*user == WB_AIX_ENCODED) {



svn commit: samba r15706 - in branches/SAMBA_4_0/source/torture/basic: .

2006-05-19 Thread vlendec
Author: vlendec
Date: 2006-05-19 07:47:28 + (Fri, 19 May 2006)
New Revision: 15706

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

Log:
This is a very specific test that helps me in making sure I don't screw up too
badly in getting rid of set_saved_ntstatus in Samba3. If this is not the
appropriate place to put it, please tell me.

Volker

Modified:
   branches/SAMBA_4_0/source/torture/basic/base.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/basic/base.c
===
--- branches/SAMBA_4_0/source/torture/basic/base.c  2006-05-19 07:01:53 UTC 
(rev 15705)
+++ branches/SAMBA_4_0/source/torture/basic/base.c  2006-05-19 07:47:28 UTC 
(rev 15706)
@@ -1608,9 +1608,158 @@
return ret;
 }
 
+/*
+ * This is a test to excercise some weird Samba3 error paths.
+ */
 
+static BOOL torture_samba3_errorpaths(struct torture_context *torture)
+{
+   BOOL nt_status_support;
+   struct smbcli_state *cli_nt = NULL, *cli_dos = NULL;
+   BOOL result = False;
+   int fnum;
+   const char *os2_fname = .+,;=[].;
+   const char *dirname = samba3_errordir;
+   union smb_open io;
+   TALLOC_CTX *mem_ctx = talloc_init(NULL);
+   NTSTATUS status;
 
+   if (mem_ctx == NULL) {
+   printf(talloc_init failed\n);
+   return False;
+   }
 
+   nt_status_support = lp_nt_status_support();
+
+   if (!lp_set_cmdline(nt status support, yes)) {
+   printf(Could not set 'nt status support = yes'\n);
+   goto fail;
+   }
+
+   if (!torture_open_connection(cli_nt)) {
+   goto fail;
+   }
+
+   if (!lp_set_cmdline(nt status support, no)) {
+   printf(Could not set 'nt status support = yes'\n);
+   goto fail;
+   }
+
+   if (!torture_open_connection(cli_dos)) {
+   goto fail;
+   }
+
+   if (!lp_set_cmdline(nt status support,
+   nt_status_support ? yes:no)) {
+   printf(Could not reset 'nt status support = yes');
+   goto fail;
+   }
+
+   smbcli_unlink(cli_nt-tree, os2_fname);
+   smbcli_rmdir(cli_nt-tree, dirname);
+
+   if (!NT_STATUS_IS_OK(smbcli_mkdir(cli_nt-tree, dirname))) {
+   printf(smbcli_mkdir(%s) failed: %s\n, dirname,
+  smbcli_errstr(cli_nt-tree));
+   goto fail;
+   }
+
+   io.generic.level = RAW_OPEN_NTCREATEX;
+   io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED;
+   io.ntcreatex.in.root_fid = 0;
+   io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
+   io.ntcreatex.in.alloc_size = 1024*1024;
+   io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_DIRECTORY;
+   io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_NONE;
+   io.ntcreatex.in.open_disposition = NTCREATEX_DISP_CREATE;
+   io.ntcreatex.in.create_options = 0;
+   io.ntcreatex.in.impersonation = NTCREATEX_IMPERSONATION_ANONYMOUS;
+   io.ntcreatex.in.security_flags = 0;
+   io.ntcreatex.in.fname = dirname;
+
+   status = smb_raw_open(cli_nt-tree, mem_ctx, io);
+   if (!NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION)) {
+   printf((%s) incorrect status %s should be %s\n,
+  __location__, nt_errstr(status),
+  nt_errstr(NT_STATUS_OBJECT_NAME_COLLISION));
+   goto fail;
+   }
+   status = smb_raw_open(cli_dos-tree, mem_ctx, io);
+   if (!NT_STATUS_EQUAL(status, NT_STATUS_DOS(ERRDOS, ERRfilexists))) {
+   printf((%s) incorrect status %s should be %s\n,
+  __location__, nt_errstr(status),
+  nt_errstr(NT_STATUS_DOS(ERRDOS, ERRfilexists)));
+   goto fail;
+   }
+
+   status = smbcli_mkdir(cli_nt-tree, dirname);
+   if (!NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION)) {
+   printf((%s) incorrect status %s should be %s\n,
+  __location__, nt_errstr(status),
+  nt_errstr(NT_STATUS_OBJECT_NAME_COLLISION));
+   goto fail;
+   }
+   status = smbcli_mkdir(cli_dos-tree, dirname);
+   if (!NT_STATUS_EQUAL(status, NT_STATUS_DOS(ERRDOS, ERRnoaccess))) {
+   printf((%s) incorrect status %s should be %s\n,
+  __location__, nt_errstr(status),
+  nt_errstr(NT_STATUS_DOS(ERRDOS, ERRnoaccess)));
+   goto fail;
+   }
+
+   if (!lp_parm_bool(-1, target, samba3, False)) {
+   goto done;
+   }
+
+   fnum = smbcli_open(cli_dos-tree, os2_fname, 
+  O_RDWR | O_CREAT | O_TRUNC,
+  DENY_NONE);
+   if (fnum != -1) {
+   printf(Open(%s) succeeded -- expected failure\n,
+  os2_fname);
+   smbcli_close(cli_dos-tree, fnum);
+ 

svn commit: samba r15707 - in trunk/source/smbd: .

2006-05-19 Thread vlendec
Author: vlendec
Date: 2006-05-19 12:43:32 + (Fri, 19 May 2006)
New Revision: 15707

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

Log:
set_saved_error_triple(0, 0, status); has the same meaning as
set_saved_ntstatus(status);...

Volker


Modified:
   trunk/source/smbd/open.c


Changeset:
Modified: trunk/source/smbd/open.c
===
--- trunk/source/smbd/open.c2006-05-19 07:47:28 UTC (rev 15706)
+++ trunk/source/smbd/open.c2006-05-19 12:43:32 UTC (rev 15707)
@@ -1918,7 +1918,7 @@
 Error was %s\n, fname, strerror(errno) ));
/* Ensure we return the correct NT status to the
 * client. */
-   set_saved_error_triple(0, 0, status);
+   set_saved_ntstatus(status);
return NULL;
}
 



svn commit: samba r15708 - in branches/SAMBA_4_0/source/smb_server/smb: .

2006-05-19 Thread metze
Author: metze
Date: 2006-05-19 13:32:17 + (Fri, 19 May 2006)
New Revision: 15708

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

Log:
setup count is 8bit and param_count and data_count are 32bit

metze
Modified:
   branches/SAMBA_4_0/source/smb_server/smb/nttrans.c


Changeset:
Modified: branches/SAMBA_4_0/source/smb_server/smb/nttrans.c
===
--- branches/SAMBA_4_0/source/smb_server/smb/nttrans.c  2006-05-19 12:43:32 UTC 
(rev 15707)
+++ branches/SAMBA_4_0/source/smb_server/smb/nttrans.c  2006-05-19 13:32:17 UTC 
(rev 15708)
@@ -42,8 +42,8 @@
 /* setup a nttrans reply, given the data and params sizes */
 static NTSTATUS nttrans_setup_reply(struct nttrans_op *op, 
struct smb_nttrans *trans,
-   uint16_t param_size, uint16_t data_size,
-   uint16_t setup_count)
+   uint32_t param_size, uint32_t data_size,
+   uint8_t setup_count)
 {
trans-out.setup_count = setup_count;
if (setup_count != 0) {



svn commit: samba r15709 - in branches/SAMBA_4_0/source/smb_server/smb: .

2006-05-19 Thread metze
Author: metze
Date: 2006-05-19 13:37:43 + (Fri, 19 May 2006)
New Revision: 15709

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

Log:
- return an error is better than ignoring a non supported request
- zero nttrans output fields before calling the backends

metze
Modified:
   branches/SAMBA_4_0/source/smb_server/smb/nttrans.c


Changeset:
Modified: branches/SAMBA_4_0/source/smb_server/smb/nttrans.c
===
--- branches/SAMBA_4_0/source/smb_server/smb/nttrans.c  2006-05-19 13:32:17 UTC 
(rev 15708)
+++ branches/SAMBA_4_0/source/smb_server/smb/nttrans.c  2006-05-19 13:37:43 UTC 
(rev 15709)
@@ -626,9 +626,11 @@
if (param_total  param_count ||
data_total  data_count) {
DEBUG(0,(REWRITE: not handling partial nttrans requests!\n));
+   smbsrv_send_error(req, NT_STATUS_FOOBAR);
return;
}
 
+   ZERO_STRUCT(trans-out);
SMBSRV_CALL_NTVFS_BACKEND(nttrans_backend(req, op));
 }
 



svn commit: samba r15710 - in branches/SAMBA_4_0/source/smb_server/smb: .

2006-05-19 Thread metze
Author: metze
Date: 2006-05-19 13:44:39 + (Fri, 19 May 2006)
New Revision: 15710

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

Log:
- we no longer need to set the nttrans out fields to zero
  in the backends
- some whitespace cleanups

metze
Modified:
   branches/SAMBA_4_0/source/smb_server/smb/nttrans.c


Changeset:
Modified: branches/SAMBA_4_0/source/smb_server/smb/nttrans.c
===
--- branches/SAMBA_4_0/source/smb_server/smb/nttrans.c  2006-05-19 13:37:43 UTC 
(rev 15709)
+++ branches/SAMBA_4_0/source/smb_server/smb/nttrans.c  2006-05-19 13:44:39 UTC 
(rev 15710)
@@ -275,11 +275,6 @@
  
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
NT_STATUS_NOT_OK_RETURN(status);
 
-   trans-out.setup_count = 0;
-   trans-out.setup   = NULL;
-   trans-out.params  = data_blob(NULL, 0);
-   trans-out.data= data_blob(NULL, 0);
-
return ntvfs_setfileinfo(req-ntvfs, io);
 }
 
@@ -355,7 +350,6 @@
 
status = nttrans_setup_reply(op, op-trans, size, 0, 0);
NT_STATUS_NOT_OK_RETURN(status);
-
p = op-trans-out.params.data;
 
/* construct the changes buffer */
@@ -589,17 +583,17 @@
op-op_info = NULL;
op-send_fn = NULL;
 
-   trans-in.max_setup   = CVAL(req-in.vwv, 0);
+   trans-in.max_setup  = CVAL(req-in.vwv, 0);
param_total  = IVAL(req-in.vwv, 3);
data_total   = IVAL(req-in.vwv, 7);
-   trans-in.max_param   = IVAL(req-in.vwv, 11);
-   trans-in.max_data= IVAL(req-in.vwv, 15);
+   trans-in.max_param  = IVAL(req-in.vwv, 11);
+   trans-in.max_data   = IVAL(req-in.vwv, 15);
param_count  = IVAL(req-in.vwv, 19);
param_ofs= IVAL(req-in.vwv, 23);
data_count   = IVAL(req-in.vwv, 27);
data_ofs = IVAL(req-in.vwv, 31);
-   trans-in.setup_count = CVAL(req-in.vwv, 35);
-   trans-in.function   = SVAL(req-in.vwv, 36);
+   trans-in.setup_count= CVAL(req-in.vwv, 35);
+   trans-in.function   = SVAL(req-in.vwv, 36);
 
if (req-in.wct != 19 + trans-in.setup_count) {
smbsrv_send_error(req, NT_STATUS_DOS(ERRSRV, ERRerror));



svn commit: samba r15711 - in branches/SAMBA_4_0/source/smb_server/smb: .

2006-05-19 Thread metze
Author: metze
Date: 2006-05-19 13:58:06 + (Fri, 19 May 2006)
New Revision: 15711

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

Log:
- make use of nttrans_setup_reply()

metze 
Modified:
   branches/SAMBA_4_0/source/smb_server/smb/nttrans.c


Changeset:
Modified: branches/SAMBA_4_0/source/smb_server/smb/nttrans.c
===
--- branches/SAMBA_4_0/source/smb_server/smb/nttrans.c  2006-05-19 13:44:39 UTC 
(rev 15710)
+++ branches/SAMBA_4_0/source/smb_server/smb/nttrans.c  2006-05-19 13:58:06 UTC 
(rev 15711)
@@ -68,14 +68,11 @@
 {
union smb_open *io = talloc_get_type(op-op_info, union smb_open);
uint8_t *params;
+   NTSTATUS status;
 
-   op-trans-out.setup_count = 0;
-   op-trans-out.setup   = NULL;
-   op-trans-out.params  = data_blob_talloc(op, NULL, 69);
-   op-trans-out.data= data_blob(NULL, 0);
-
+   status = nttrans_setup_reply(op, op-trans, 69, 0, 0);
+   NT_STATUS_NOT_OK_RETURN(status);
params = op-trans-out.params.data;
-   NT_STATUS_HAVE_NO_MEMORY(params);
 
SSVAL(params,0, io-ntcreatex.out.oplock_level);
SSVAL(params,2, io-ntcreatex.out.file.fnum);
@@ -197,22 +194,20 @@
  */
 static NTSTATUS nttrans_query_sec_desc_send(struct nttrans_op *op)
 {
-   struct smb_nttrans *trans = op-trans;
union smb_fileinfo *io = talloc_get_type(op-op_info, union 
smb_fileinfo);
+   uint8_t *params;
NTSTATUS status;
 
-   trans-out.setup_count = 0;
-   trans-out.setup   = NULL;
-   trans-out.params  = data_blob_talloc(op, NULL, 4);
-   trans-out.data= data_blob(NULL, 0);
-   NT_STATUS_HAVE_NO_MEMORY(trans-out.params.data);
+   status = nttrans_setup_reply(op, op-trans, 4, 0, 0);
+   NT_STATUS_NOT_OK_RETURN(status);
+   params = op-trans-out.params.data;
 
-   status = ndr_push_struct_blob(trans-out.data, op, 
+   status = ndr_push_struct_blob(op-trans-out.data, op, 
  io-query_secdesc.out.sd, 
  
(ndr_push_flags_fn_t)ndr_push_security_descriptor);
NT_STATUS_NOT_OK_RETURN(status);
 
-   SIVAL(trans-out.params.data, 0, trans-out.data.length);
+   SIVAL(params, 0, op-trans-out.data.length);
 
return NT_STATUS_OK;
 }



svn commit: samba r15712 - branches/SAMBA_3_0/source/smbd trunk/source/smbd

2006-05-19 Thread jerry
Author: jerry
Date: 2006-05-19 14:00:12 + (Fri, 19 May 2006)
New Revision: 15712

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

Log:
BUG 3435: patch from volker to fix 'msdfs root = yes' in [homes]
Modified:
   branches/SAMBA_3_0/source/smbd/msdfs.c
   trunk/source/smbd/msdfs.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/msdfs.c
===
--- branches/SAMBA_3_0/source/smbd/msdfs.c  2006-05-19 13:58:06 UTC (rev 
15711)
+++ branches/SAMBA_3_0/source/smbd/msdfs.c  2006-05-19 14:00:12 UTC (rev 
15712)
@@ -419,7 +419,10 @@
return False;
}

-   if (!strequal(dp.servicename, lp_servicename(SNUM(conn)) )) {
+   if ( !( strequal(dp.servicename, lp_servicename(SNUM(conn))) 
+   || ( strequal(dp.servicename, HOMES_NAME) 
+ strequal(lp_servicename(SNUM(conn)), 
get_current_username()) )) ) 
+   {
return False;
}
 

Modified: trunk/source/smbd/msdfs.c
===
--- trunk/source/smbd/msdfs.c   2006-05-19 13:58:06 UTC (rev 15711)
+++ trunk/source/smbd/msdfs.c   2006-05-19 14:00:12 UTC (rev 15712)
@@ -419,7 +419,10 @@
return False;
}

-   if (!strequal(dp.servicename, lp_servicename(SNUM(conn)) )) {
+   if ( !( strequal(dp.servicename, lp_servicename(SNUM(conn))) 
+   || ( strequal(dp.servicename, HOMES_NAME) 
+ strequal(lp_servicename(SNUM(conn)), 
get_current_username()) )) ) 
+   {
return False;
}
 



svn commit: samba r15713 - in branches/SAMBA_4_0/source/torture: .

2006-05-19 Thread metze
Author: metze
Date: 2006-05-19 14:10:14 + (Fri, 19 May 2006)
New Revision: 15713

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

Log:
- initialize ntioctl.in.max_data and ntioctl.in.blob
- use define instead of hex value

metze
Modified:
   branches/SAMBA_4_0/source/torture/torture_util.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/torture_util.c
===
--- branches/SAMBA_4_0/source/torture/torture_util.c2006-05-19 14:00:12 UTC 
(rev 15712)
+++ branches/SAMBA_4_0/source/torture/torture_util.c2006-05-19 14:10:14 UTC 
(rev 15713)
@@ -22,6 +22,7 @@
 #include smb.h
 #include lib/cmdline/popt_common.h
 #include libcli/raw/libcliraw.h
+#include libcli/raw/ioctl.h
 #include libcli/libcli.h
 #include system/shmem.h
 #include system/time.h
@@ -385,10 +386,12 @@
}
 
nt.ntioctl.level = RAW_IOCTL_NTIOCTL;
-   nt.ntioctl.in.function = 0x900c4;
+   nt.ntioctl.in.function = FSCTL_SET_SPARSE;
nt.ntioctl.in.file.fnum = fnum;
nt.ntioctl.in.fsctl = True;
nt.ntioctl.in.filter = 0;
+   nt.ntioctl.in.max_data = 0;
+   nt.ntioctl.in.blob = data_blob(NULL, 0);
 
status = smb_raw_ioctl(tree, mem_ctx, nt);
 



svn commit: samba r15714 - in branches/SAMBA_4_0/source/smb_server/smb: .

2006-05-19 Thread metze
Author: metze
Date: 2006-05-19 14:15:21 + (Fri, 19 May 2006)
New Revision: 15714

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

Log:
fix async handling of ntioctl calls and push the DATA_BLOB into the reply

metze
Modified:
   branches/SAMBA_4_0/source/smb_server/smb/nttrans.c


Changeset:
Modified: branches/SAMBA_4_0/source/smb_server/smb/nttrans.c
===
--- branches/SAMBA_4_0/source/smb_server/smb/nttrans.c  2006-05-19 14:10:14 UTC 
(rev 15713)
+++ branches/SAMBA_4_0/source/smb_server/smb/nttrans.c  2006-05-19 14:15:21 UTC 
(rev 15714)
@@ -283,6 +283,28 @@
 }
 
 /* 
+   parse NTTRANS_IOCTL send
+ */
+static NTSTATUS nttrans_ioctl_send(struct nttrans_op *op)
+{
+   union smb_ioctl *info = talloc_get_type(op-op_info, union smb_ioctl);
+   NTSTATUS status;
+
+   /* 
+* we pass 0 as data_count here,
+* because we reuse the DATA_BLOB from the smb_ioctl
+* struct
+*/
+   status = nttrans_setup_reply(op, op-trans, 0, 0, 1);
+   NT_STATUS_NOT_OK_RETURN(status);
+
+   op-trans-out.setup[0] = 0;
+   op-trans-out.data = info-ntioctl.out.blob;
+
+   return NT_STATUS_OK;
+}
+
+/* 
parse NTTRANS_IOCTL request
  */
 static NTSTATUS nttrans_ioctl(struct smbsrv_request *req, 
@@ -290,11 +312,6 @@
 {
struct smb_nttrans *trans = op-trans;
union smb_ioctl *nt;
-   uint32_t function;
-   uint16_t fnum;
-   uint8_t filter;
-   BOOL fsctl;
-   NTSTATUS status;
 
/* should have at least 4 setup words */
if (trans-in.setup_count != 4) {
@@ -304,24 +321,17 @@
nt = talloc(op, union smb_ioctl);
NT_STATUS_HAVE_NO_MEMORY(nt);

-   function  = IVAL(trans-in.setup, 0);
-   fnum  = SVAL(trans-in.setup, 4);
-   fsctl = CVAL(trans-in.setup, 6);
-   filter = CVAL(trans-in.setup, 7);
+   nt-ntioctl.level   = RAW_IOCTL_NTIOCTL;
+   nt-ntioctl.in.function = IVAL(trans-in.setup, 0);
+   nt-ntioctl.in.file.fnum= SVAL(trans-in.setup, 4);
+   nt-ntioctl.in.fsctl= CVAL(trans-in.setup, 6);
+   nt-ntioctl.in.filter   = CVAL(trans-in.setup, 7);
+   nt-ntioctl.in.max_data = trans-in.max_data;
+   nt-ntioctl.in.blob = trans-in.data;
 
-   nt-ntioctl.level = RAW_IOCTL_NTIOCTL;
-   nt-ntioctl.in.file.fnum = fnum;
-   nt-ntioctl.in.function = function;
-   nt-ntioctl.in.fsctl = fsctl;
-   nt-ntioctl.in.filter = filter;
-   nt-ntioctl.in.max_data = trans-in.max_data;
-   nt-ntioctl.in.blob = trans-in.data;
+   op-op_info = nt;
+   op-send_fn = nttrans_ioctl_send;
 
-   status = nttrans_setup_reply(op, trans, 0, 0, 1);
-   NT_STATUS_NOT_OK_RETURN(status);
-
-   trans-out.setup[0] = 0;
-   
return ntvfs_ioctl(req-ntvfs, nt);
 }
 



svn commit: samba r15715 - in branches/SAMBA_4_0/source/smb_server: .

2006-05-19 Thread metze
Author: metze
Date: 2006-05-19 14:25:15 + (Fri, 19 May 2006)
New Revision: 15715

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

Log:
add my copyright

metze
Modified:
   branches/SAMBA_4_0/source/smb_server/session.c


Changeset:
Modified: branches/SAMBA_4_0/source/smb_server/session.c
===
--- branches/SAMBA_4_0/source/smb_server/session.c  2006-05-19 14:15:21 UTC 
(rev 15714)
+++ branches/SAMBA_4_0/source/smb_server/session.c  2006-05-19 14:25:15 UTC 
(rev 15715)
@@ -3,7 +3,8 @@
Password and authentication handling
Copyright (C) Andrew Tridgell 1992-2005
Copyright (C) Andrew Bartlett [EMAIL PROTECTED] 2005
-   
+   Copyright (C) Stefan Metzmacher 2005-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 2 of the License, or



svn commit: samba r15716 - in branches/SAMBA_4_0/source/ntvfs: .

2006-05-19 Thread metze
Author: metze
Date: 2006-05-19 14:32:42 + (Fri, 19 May 2006)
New Revision: 15716

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

Log:
disable the cifs_posix ntvfs backend as it will not be updated
with coming ntvfs subsystem changes

metze
Modified:
   branches/SAMBA_4_0/source/ntvfs/config.mk


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/config.mk
===
--- branches/SAMBA_4_0/source/ntvfs/config.mk   2006-05-19 14:25:15 UTC (rev 
15715)
+++ branches/SAMBA_4_0/source/ntvfs/config.mk   2006-05-19 14:32:42 UTC (rev 
15716)
@@ -31,6 +31,7 @@
 
 # Start MODULE ntvfs_cifs_posix_cli
 [MODULE::ntvfs_cifs_posix]
+ENABLE = NO
 INIT_FUNCTION = ntvfs_cifs_posix_init
 SUBSYSTEM = ntvfs
 PRIVATE_PROTO_HEADER = cifs_posix_cli/proto.h



svn commit: samba r15717 - branches/SAMBA_3_0/source/script/tests trunk/source/script/tests

2006-05-19 Thread jerry
Author: jerry
Date: 2006-05-19 14:44:50 + (Fri, 19 May 2006)
New Revision: 15717

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

Log:
BUG 3711: patch fromLeonid Kabanov [EMAIL PROTECTED] for some solaris 
sheel scripting bugs with 'make test'
Modified:
   branches/SAMBA_3_0/source/script/tests/selftest.sh
   trunk/source/script/tests/selftest.sh


Changeset:
Modified: branches/SAMBA_3_0/source/script/tests/selftest.sh
===
--- branches/SAMBA_3_0/source/script/tests/selftest.sh  2006-05-19 14:32:42 UTC 
(rev 15716)
+++ branches/SAMBA_3_0/source/script/tests/selftest.sh  2006-05-19 14:44:50 UTC 
(rev 15717)
@@ -15,7 +15,7 @@
 mkdir -p $PREFIX || exit $?
 OLD_PWD=`pwd`
 cd $PREFIX || exit $?
-export PREFIX_ABS=`pwd`
+PREFIX_ABS=`pwd`
 cd $OLD_PWD
 
 if [ -z $TORTURE_MAXTIME ]; then
@@ -29,7 +29,7 @@
 
 SERVER=localhost2
 SERVER_IP=127.0.0.2
-USERNAME=`whoami`
+USERNAME=`PATH=/usr/ucb:$PATH whoami`
 PASSWORD=test
 
 SRCDIR=`pwd`

Modified: trunk/source/script/tests/selftest.sh
===
--- trunk/source/script/tests/selftest.sh   2006-05-19 14:32:42 UTC (rev 
15716)
+++ trunk/source/script/tests/selftest.sh   2006-05-19 14:44:50 UTC (rev 
15717)
@@ -15,7 +15,7 @@
 mkdir -p $PREFIX || exit $?
 OLD_PWD=`pwd`
 cd $PREFIX || exit $?
-export PREFIX_ABS=`pwd`
+PREFIX_ABS=`pwd`
 cd $OLD_PWD
 
 if [ -z $TORTURE_MAXTIME ]; then
@@ -29,7 +29,7 @@
 
 SERVER=localhost2
 SERVER_IP=127.0.0.2
-USERNAME=`whoami`
+USERNAME=`PATH=/usr/ucb:$PATH whoami`
 PASSWORD=test
 
 SRCDIR=`pwd`



svn commit: samba r15718 - in branches/SAMBA_4_0/source: libcli/raw ntvfs/nbench ntvfs/posix ntvfs/simple smb_server/smb torture/basic torture/nbench torture/raw

2006-05-19 Thread metze
Author: metze
Date: 2006-05-19 15:10:39 + (Fri, 19 May 2006)
New Revision: 15718

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

Log:
- split the SMBflush with the 0x wildcard fnum into a different level

metze
Modified:
   branches/SAMBA_4_0/source/libcli/raw/interfaces.h
   branches/SAMBA_4_0/source/libcli/raw/rawfile.c
   branches/SAMBA_4_0/source/ntvfs/nbench/vfs_nbench.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_flush.c
   branches/SAMBA_4_0/source/ntvfs/simple/vfs_simple.c
   branches/SAMBA_4_0/source/smb_server/smb/reply.c
   branches/SAMBA_4_0/source/torture/basic/delaywrite.c
   branches/SAMBA_4_0/source/torture/nbench/nbio.c
   branches/SAMBA_4_0/source/torture/raw/close.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/raw/interfaces.h
===
--- branches/SAMBA_4_0/source/libcli/raw/interfaces.h   2006-05-19 14:44:50 UTC 
(rev 15717)
+++ branches/SAMBA_4_0/source/libcli/raw/interfaces.h   2006-05-19 15:10:39 UTC 
(rev 15718)
@@ -1725,13 +1725,20 @@
} ntioctl;
 };
 
+enum smb_flush_level {RAW_FLUSH_FLUSH, RAW_FLUSH_ALL};
+
 /* struct for SMBflush */
 union smb_flush {
struct {
+   enum smb_ioctl_level level;
struct {
union smb_handle file;
} in;
} flush, generic;
+
+   struct {
+   enum smb_ioctl_level level;
+   } flush_all;
 };
 
 

Modified: branches/SAMBA_4_0/source/libcli/raw/rawfile.c
===
--- branches/SAMBA_4_0/source/libcli/raw/rawfile.c  2006-05-19 14:44:50 UTC 
(rev 15717)
+++ branches/SAMBA_4_0/source/libcli/raw/rawfile.c  2006-05-19 15:10:39 UTC 
(rev 15718)
@@ -849,9 +849,19 @@
 struct smbcli_request *smb_raw_flush_send(struct smbcli_tree *tree, union 
smb_flush *parms)
 {
struct smbcli_request *req; 
+   uint16_t fnum;
 
+   switch (parms-generic.level) {
+   case RAW_FLUSH_FLUSH:
+   fnum = parms-flush.in.file.fnum;
+   break;
+   case RAW_FLUSH_ALL:
+   fnum = 0x;
+   break;
+   }
+
SETUP_REQUEST(SMBflush, 1, 0);
-   SSVAL(req-out.vwv, VWV(0), parms-flush.in.file.fnum);
+   SSVAL(req-out.vwv, VWV(0), fnum);
 
if (!smbcli_request_send(req)) {
smbcli_request_destroy(req);

Modified: branches/SAMBA_4_0/source/ntvfs/nbench/vfs_nbench.c
===
--- branches/SAMBA_4_0/source/ntvfs/nbench/vfs_nbench.c 2006-05-19 14:44:50 UTC 
(rev 15717)
+++ branches/SAMBA_4_0/source/ntvfs/nbench/vfs_nbench.c 2006-05-19 15:10:39 UTC 
(rev 15718)
@@ -534,10 +534,19 @@
 static void nbench_flush_send(struct ntvfs_request *req)
 {
union smb_flush *io = req-async_states-private_data;
+   uint16_t fnum;
 
+   switch (io-generic.level) {
+   case RAW_FLUSH_FLUSH:
+   fnum = io-flush.in.file.fnum;
+   break;
+   case RAW_FLUSH_ALL:
+   fnum = 0x;
+   break;
+   }
+
nbench_log(req, Flush %d %s\n,
-  io-flush.in.file.fnum,
-  get_nt_error_c_code(req-async_states-status));
+  fnum, get_nt_error_c_code(req-async_states-status));
 
PASS_THRU_REP_POST(req);
 }

Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_flush.c
===
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_flush.c  2006-05-19 14:44:50 UTC 
(rev 15717)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_flush.c  2006-05-19 15:10:39 UTC 
(rev 15718)
@@ -46,23 +46,27 @@
struct pvfs_state *pvfs = ntvfs-private_data;
struct pvfs_file *f;
 
-   if (io-flush.in.file.fnum != 0x) {
+   switch (io-generic.level) {
+   case RAW_FLUSH_FLUSH:
f = pvfs_find_fd(pvfs, req, io-flush.in.file.fnum);
if (!f) {
return NT_STATUS_INVALID_HANDLE;
}
pvfs_flush_file(pvfs, f);
return NT_STATUS_OK;
-   }
 
-   if (!(pvfs-flags  PVFS_FLAG_STRICT_SYNC)) {
+   case RAW_FLUSH_ALL:
+   if (!(pvfs-flags  PVFS_FLAG_STRICT_SYNC)) {
+   return NT_STATUS_OK;
+   }
+
+   /* they are asking to flush all open files */
+   for (f=pvfs-files.list;f;f=f-next) {
+   pvfs_flush_file(pvfs, f);
+   }
+
return NT_STATUS_OK;
}
 
-   /* they are asking to flush all open files */
-   for (f=pvfs-files.list;f;f=f-next) {
-   pvfs_flush_file(pvfs, f);
-   }
-
-   return NT_STATUS_OK;
+   return NT_STATUS_INVALID_LEVEL;
 }

Modified: branches/SAMBA_4_0/source/ntvfs/simple/vfs_simple.c

svn commit: samba r15719 - in branches/SAMBA_4_0/source/lib/replace: .

2006-05-19 Thread jmcd
Author: jmcd
Date: 2006-05-19 18:37:35 + (Fri, 19 May 2006)
New Revision: 15719

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

Log:
Fix build on systems (AIX) that don't have vsyslog or strcasestr, with
--enable-developer on.  syslog() and toupper() required more includes.

Someone more familiar with samba4 builds should verify this, please.

Modified:
   branches/SAMBA_4_0/source/lib/replace/replace.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/replace.c
===
--- branches/SAMBA_4_0/source/lib/replace/replace.c 2006-05-19 15:10:39 UTC 
(rev 15718)
+++ branches/SAMBA_4_0/source/lib/replace/replace.c 2006-05-19 18:37:35 UTC 
(rev 15719)
@@ -19,10 +19,12 @@
 */
 
 #include includes.h
+#include system/locale.h
 #include system/wait.h
 #include system/time.h
 #include system/network.h
 #include system/filesys.h
+#include system/syslog.h
 
  void replace_dummy(void);
  void replace_dummy(void) {}



svn commit: samba r15720 - in trunk/source: include smbd

2006-05-19 Thread vlendec
Author: vlendec
Date: 2006-05-19 19:50:33 + (Fri, 19 May 2006)
New Revision: 15720

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

Log:
Steal the NT_STATUS_DOS trick to stash forced DOS error codes into NTSTATUS
from Samba4.

Get rid of set_saved_error_triple. The places where DOS and NTSTATUS codes are
actually not mappable are made explicit in the code by looking at what kind of
code is required.

Volker

Modified:
   trunk/source/include/nt_status.h
   trunk/source/include/nterr.h
   trunk/source/include/smb_macros.h
   trunk/source/smbd/error.c
   trunk/source/smbd/open.c
   trunk/source/smbd/process.c
   trunk/source/smbd/reply.c


Changeset:
Modified: trunk/source/include/nt_status.h
===
--- trunk/source/include/nt_status.h2006-05-19 18:37:35 UTC (rev 15719)
+++ trunk/source/include/nt_status.h2006-05-19 19:50:33 UTC (rev 15720)
@@ -56,7 +56,6 @@
 
 #define NT_STATUS_IS_OK(x) (NT_STATUS_V(x) == 0)
 #define NT_STATUS_IS_ERR(x) ((NT_STATUS_V(x)  0xc000) == 0xc000)
-#define NT_STATUS_IS_INVALID(x) (NT_STATUS_V(x) == 0x)
 #define NT_STATUS_EQUAL(x,y) (NT_STATUS_V(x) == NT_STATUS_V(y))
 #define W_ERROR_IS_OK(x) (W_ERROR_V(x) == 0)
 #define W_ERROR_EQUAL(x,y) (W_ERROR_V(x) == W_ERROR_V(y))
@@ -67,4 +66,12 @@
 }\
 } while (0)
 
+/* this defines special NTSTATUS codes to represent DOS errors.  I
+   have chosen this macro to produce status codes in the invalid
+   NTSTATUS range */
+#define NT_STATUS_DOS(class, code) NT_STATUS(0xF100 | ((class)16) | code)
+#define NT_STATUS_IS_DOS(status) ((NT_STATUS_V(status)  0xFF00) == 
0xF100)
+#define NT_STATUS_DOS_CLASS(status) ((NT_STATUS_V(status)  16)  0xFF)
+#define NT_STATUS_DOS_CODE(status) (NT_STATUS_V(status)  0x)
+
 #endif

Modified: trunk/source/include/nterr.h
===
--- trunk/source/include/nterr.h2006-05-19 18:37:35 UTC (rev 15719)
+++ trunk/source/include/nterr.h2006-05-19 19:50:33 UTC (rev 15720)
@@ -37,9 +37,6 @@
 #define STATUS_NOTIFY_ENUM_DIRNT_STATUS(0x010c)
 #define ERROR_INVALID_DATATYPE   NT_STATUS(0x070c)
 
-/* Special invalid NT status code. */
-#define NT_STATUS_INVALIDNT_STATUS(0x)
-
 /* Win32 Error codes extracted using a loop in smbclient then printing a
netmon sniff to a file. */
 

Modified: trunk/source/include/smb_macros.h
===
--- trunk/source/include/smb_macros.h   2006-05-19 18:37:35 UTC (rev 15719)
+++ trunk/source/include/smb_macros.h   2006-05-19 19:50:33 UTC (rev 15720)
@@ -182,7 +182,6 @@
 #define CACHED_ERROR(fsp) cached_error_packet(outbuf,fsp,__LINE__,__FILE__)
 
 #define ERROR_DOS(class,code) 
error_packet(outbuf,class,code,NT_STATUS_OK,__LINE__,__FILE__)
-#define ERROR_FORCE_DOS(class,code) 
error_packet(outbuf,class,code,NT_STATUS_INVALID,__LINE__,__FILE__)
 #define ERROR_NT(status) error_packet(outbuf,0,0,status,__LINE__,__FILE__)
 #define ERROR_FORCE_NT(status) 
error_packet(outbuf,-1,-1,status,__LINE__,__FILE__)
 #define ERROR_BOTH(status,class,code) 
error_packet(outbuf,class,code,status,__LINE__,__FILE__)

Modified: trunk/source/smbd/error.c
===
--- trunk/source/smbd/error.c   2006-05-19 18:37:35 UTC (rev 15719)
+++ trunk/source/smbd/error.c   2006-05-19 19:50:33 UTC (rev 15720)
@@ -25,29 +25,11 @@
 
 extern uint32 global_client_caps;
 /* these can be set by some functions to override the error codes */
-static int override_ERR_class;
-static uint32 override_ERR_code;
 static NTSTATUS override_ERR_ntstatus;
 
-/
- Setting eclass and ecode only and status to NT_STATUS_INVALID forces DOS 
errors.
- Setting status only and eclass and ecode to -1 forces NT errors.
-/
- 
-void set_saved_error_triple(int eclass, int ecode, NTSTATUS status)
-{
-   override_ERR_class = eclass;
-   override_ERR_code = ecode;
-   override_ERR_ntstatus = status;
-}
-
 void set_saved_ntstatus(NTSTATUS status)
 {
-   uint8 tmp_eclass;   /* Hmmm. override_ERR_class is not uint8... */
override_ERR_ntstatus = status;
-   ntstatus_to_dos(status, tmp_eclass, override_ERR_code);
-   override_ERR_class = tmp_eclass;
-   
 }
 
 /
@@ -103,6 +85,10 @@
return error_packet(outbuf,eclass,ecode,ntstatus,line,file);
 }
 
+BOOL use_nt_status(void)
+{
+   return lp_nt_status_support()  (global_client_caps  CAP_STATUS32);
+}
 
 /
  Create an error packet. Normally called using the ERROR() macro.
@@ -117,18 +103,14 @@

svn commit: samba r15721 - in trunk/source/smbd: .

2006-05-19 Thread vlendec
Author: vlendec
Date: 2006-05-19 19:54:39 + (Fri, 19 May 2006)
New Revision: 15721

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

Log:
Make us actually survive BASE-SAMBA3ERROR
Modified:
   trunk/source/smbd/reply.c


Changeset:
Modified: trunk/source/smbd/reply.c
===
--- trunk/source/smbd/reply.c   2006-05-19 19:50:33 UTC (rev 15720)
+++ trunk/source/smbd/reply.c   2006-05-19 19:54:39 UTC (rev 15721)
@@ -3831,6 +3831,17 @@
 
status = mkdir_internal(conn, directory,bad_path);
if (!NT_STATUS_IS_OK(status)) {
+
+   if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION) 
+   !use_nt_status()) {
+   /*
+* Yes, in the DOS error code case we get a
+* ERRDOS:ERRnoaccess here. See BASE-SAMBA3ERROR
+* samba4 torture test.
+*/
+   status = NT_STATUS_DOS(ERRDOS, ERRnoaccess);
+   }
+
END_PROFILE(SMBmkdir);
return ERROR_NT(status);
}



svn commit: samba r15722 - in trunk/source: printing smbd

2006-05-19 Thread vlendec
Author: vlendec
Date: 2006-05-19 20:40:44 + (Fri, 19 May 2006)
New Revision: 15722

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

Log:
Lift set_saved_ntstatus from print_fsp_open.

Volker

Modified:
   trunk/source/printing/printfsp.c
   trunk/source/smbd/open.c
   trunk/source/smbd/reply.c


Changeset:
Modified: trunk/source/printing/printfsp.c
===
--- trunk/source/printing/printfsp.c2006-05-19 19:54:39 UTC (rev 15721)
+++ trunk/source/printing/printfsp.c2006-05-19 20:40:44 UTC (rev 15722)
@@ -28,7 +28,8 @@
 print_job_start().
 ***/
 
-files_struct *print_fsp_open(connection_struct *conn, const char *fname)
+NTSTATUS print_fsp_open(connection_struct *conn, const char *fname,
+   files_struct **result)
 {
int jobid;
SMB_STRUCT_STAT sbuf;
@@ -38,8 +39,7 @@
 
status = file_new(conn, fsp);
if(!NT_STATUS_IS_OK(status)) {
-   set_saved_ntstatus(status);
-   return NULL;
+   return status;
}
 
fstrcpy( name, Remote Downlevel Document);
@@ -54,8 +54,9 @@
 
jobid = print_job_start(current_user, SNUM(conn), name, NULL);
if (jobid == -1) {
+   status = map_nt_error_from_unix(errno);
file_free(fsp);
-   return NULL;
+   return status;
}
 
/* Convert to RAP id. */
@@ -64,7 +65,7 @@
/* We need to delete the entry in the tdb. */
pjob_delete(lp_const_servicename(SNUM(conn)), jobid);
file_free(fsp);
-   return NULL;
+   return NT_STATUS_ACCESS_DENIED; /* No errno around here */
}
 
/* setup a full fsp */
@@ -91,7 +92,8 @@
 
conn-num_files_open++;
 
-   return fsp;
+   *result = fsp;
+   return NT_STATUS_OK;
 }
 
 /

Modified: trunk/source/smbd/open.c
===
--- trunk/source/smbd/open.c2006-05-19 19:54:39 UTC (rev 15721)
+++ trunk/source/smbd/open.c2006-05-19 20:40:44 UTC (rev 15722)
@@ -1115,7 +1115,11 @@
 
DEBUG(10, (open_file_ntcreate: printer open fname=%s\n, 
fname));
 
-   return print_fsp_open(conn, fname);
+   status = print_fsp_open(conn, fname, fsp);
+   if (!NT_STATUS_IS_OK(status)) {
+   set_saved_ntstatus(status);
+   }
+   return fsp;
}
 
/* We add aARCH to this as this mode is only used if the file is

Modified: trunk/source/smbd/reply.c
===
--- trunk/source/smbd/reply.c   2006-05-19 19:54:39 UTC (rev 15721)
+++ trunk/source/smbd/reply.c   2006-05-19 20:40:44 UTC (rev 15722)
@@ -3591,6 +3591,8 @@
 {
int outsize = 0;
files_struct *fsp;
+   NTSTATUS status;
+   
START_PROFILE(SMBsplopen);

if (!CAN_PRINT(conn)) {
@@ -3599,11 +3601,11 @@
}
 
/* Open for exclusive use, write only. */
-   fsp = print_fsp_open(conn, NULL);
+   status = print_fsp_open(conn, NULL, fsp);
 
-   if (!fsp) {
+   if (!NT_STATUS_IS_OK(status)) {
END_PROFILE(SMBsplopen);
-   return(UNIXERROR(ERRDOS,ERRnoaccess));
+   return(ERROR_NT(status));
}
 
outsize = set_message(outbuf,1,0,True);



svn commit: samba r15724 - in trunk/source/smbd: .

2006-05-19 Thread vlendec
Author: vlendec
Date: 2006-05-19 21:06:28 + (Fri, 19 May 2006)
New Revision: 15724

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

Log:
Convert dup_file_fsp not to use set_saved_ntstatus

Volker

Modified:
   trunk/source/smbd/files.c
   trunk/source/smbd/open.c


Changeset:
Modified: trunk/source/smbd/files.c
===
--- trunk/source/smbd/files.c   2006-05-19 20:57:10 UTC (rev 15723)
+++ trunk/source/smbd/files.c   2006-05-19 21:06:28 UTC (rev 15724)
@@ -522,10 +522,11 @@
  Duplicate the file handle part for a DOS or FCB open.
 /
 
-files_struct *dup_file_fsp(files_struct *fsp,
+NTSTATUS dup_file_fsp(files_struct *fsp,
uint32 access_mask,
uint32 share_access,
-   uint32 create_options)
+   uint32 create_options,
+   files_struct **result)
 {
NTSTATUS status;
files_struct *dup_fsp;
@@ -533,8 +534,7 @@
status = file_new(fsp-conn, dup_fsp);
 
if (!NT_STATUS_IS_OK(status)) {
-   set_saved_ntstatus(status);
-   return NULL;
+   return status;
}
 
SAFE_FREE(dup_fsp-fh);
@@ -569,5 +569,6 @@
dup_fsp-aio_write_behind = fsp-aio_write_behind;
 string_set(dup_fsp-fsp_name,fsp-fsp_name);
 
-   return dup_fsp;
+   *result = dup_fsp;
+   return NT_STATUS_OK;
 }

Modified: trunk/source/smbd/open.c
===
--- trunk/source/smbd/open.c2006-05-19 20:57:10 UTC (rev 15723)
+++ trunk/source/smbd/open.c2006-05-19 21:06:28 UTC (rev 15724)
@@ -884,8 +884,8 @@
}
 
/* We need to duplicate this fsp. */
-   dup_fsp = dup_file_fsp(fsp, access_mask, share_access, create_options);
-   if (!dup_fsp) {
+   if (!NT_STATUS_IS_OK(dup_file_fsp(fsp, access_mask, share_access,
+ create_options, dup_fsp))) {
return NULL;
}
 



svn commit: samba r15725 - in branches/SAMBA_4_0/source/dsdb/samdb: . ldb_modules

2006-05-19 Thread idra
Author: idra
Date: 2006-05-19 21:12:26 + (Fri, 19 May 2006)
New Revision: 15725

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

Log:

First shot at making password_hash async
The async path is not yet enabled by default so it should make no harm


Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/password_hash.c
   branches/SAMBA_4_0/source/dsdb/samdb/samdb.c


Changeset:
Sorry, the patch is too large (1161 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15725


svn commit: samba r15726 - in branches/SAMBA_4_0/source/libnet: .

2006-05-19 Thread mimir
Author: mimir
Date: 2006-05-19 21:28:28 + (Fri, 19 May 2006)
New Revision: 15726

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

Log:
Comments and a couple of minor formattings in the code.


rafal


Modified:
   branches/SAMBA_4_0/source/libnet/userman.c


Changeset:
Sorry, the patch is too large (529 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15726


Build status as of Sat May 20 00:00:03 2006

2006-05-19 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2006-05-19 
00:00:53.0 +
+++ /home/build/master/cache/broken_results.txt 2006-05-20 00:00:30.0 
+
@@ -1,17 +1,17 @@
-Build status as of Fri May 19 00:00:03 2006
+Build status as of Sat May 20 00:00:03 2006
 
 Build counts:
 Tree Total  Broken Panic 
-ccache   34 3  0 
-distcc   36 3  0 
-lorikeet-heimdal 35 23 0 
+ccache   33 3  0 
+distcc   34 3  0 
+lorikeet-heimdal 33 23 0 
 ppp  21 0  0 
-rsync37 3  0 
-samba6  2  0 
+rsync36 4  0 
+samba4  2  0 
 samba-docs   0  0  0 
-samba4   42 34 10
-samba_3_039 18 0 
-smb-build31 1  0 
-talloc   28 14 0 
-tdb  28 4  0 
+samba4   42 27 7 
+samba_3_038 14 0 
+smb-build30 1  0 
+talloc   24 11 0 
+tdb  24 3  0 
 


svn commit: samba r15727 - in branches/SAMBA_3_0/source/torture: .

2006-05-19 Thread jra
Author: jra
Date: 2006-05-20 02:04:19 + (Sat, 20 May 2006)
New Revision: 15727

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

Log:
Fix msgtest - noticed by Aleksey Fedoseev [EMAIL PROTECTED].
Jeremy.

Modified:
   branches/SAMBA_3_0/source/torture/msgtest.c


Changeset:
Modified: branches/SAMBA_3_0/source/torture/msgtest.c
===
--- branches/SAMBA_3_0/source/torture/msgtest.c 2006-05-19 21:28:28 UTC (rev 
15726)
+++ branches/SAMBA_3_0/source/torture/msgtest.c 2006-05-20 02:04:19 UTC (rev 
15727)
@@ -39,6 +39,8 @@
int i, n;
char buf[12];
 
+   load_case_tables();
+
setup_logging(argv[0],True);

lp_load(dyn_CONFIGFILE,False,False,False,True);



svn commit: samba r15728 - in trunk/source/torture: .

2006-05-19 Thread jra
Author: jra
Date: 2006-05-20 02:05:33 + (Sat, 20 May 2006)
New Revision: 15728

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

Log:
Fix msgtest - noticed by Aleksey Fedoseev [EMAIL PROTECTED].
Jeremy.

Modified:
   trunk/source/torture/msgtest.c


Changeset:
Modified: trunk/source/torture/msgtest.c
===
--- trunk/source/torture/msgtest.c  2006-05-20 02:04:19 UTC (rev 15727)
+++ trunk/source/torture/msgtest.c  2006-05-20 02:05:33 UTC (rev 15728)
@@ -39,6 +39,8 @@
int i, n;
char buf[12];
 
+   load_case_tables();
+
setup_logging(argv[0],True);

lp_load(dyn_CONFIGFILE,False,False,False,True);



svn commit: samba r15729 - in branches/SAMBA_3_0/source/torture: .

2006-05-19 Thread jra
Author: jra
Date: 2006-05-20 02:09:35 + (Sat, 20 May 2006)
New Revision: 15729

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

Log:
Second part of Aleksey Fedoseev [EMAIL PROTECTED] patch.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/torture/msgtest.c


Changeset:
Modified: branches/SAMBA_3_0/source/torture/msgtest.c
===
--- branches/SAMBA_3_0/source/torture/msgtest.c 2006-05-20 02:05:33 UTC (rev 
15728)
+++ branches/SAMBA_3_0/source/torture/msgtest.c 2006-05-20 02:09:35 UTC (rev 
15729)
@@ -25,6 +25,24 @@
 
 static int pong_count;
 
+
+/* samba4 timeval functions */
+
+double timeval_elapsed2(const struct timeval *tv1, const struct timeval *tv2)
+{
+return (tv2-tv_sec - tv1-tv_sec) +
+   (tv2-tv_usec - tv1-tv_usec)*1.0e-6;
+}
+
+/**
+  return the number of seconds elapsed since a given time
+*/
+double timeval_elapsed(const struct timeval *tv)
+{
+struct timeval tv2 = timeval_current();
+return timeval_elapsed2(tv, tv2);
+}
+
 /
 a useful function for testing the message system
 /
@@ -85,9 +103,44 @@
 
if (pong_count != 2) {
fprintf(stderr, Duplicate filter failed (%d).\n, pong_count);
-   exit(1);
}
 
+   /* Speed testing */
+
+   pong_count = 0;
+
+   {
+   struct timeval tv = timeval_current();
+   size_t timelimit = n;
+   size_t ping_count = 0;
+
+   printf(Sending pings for %d seconds\n, timelimit);
+   while (timeval_elapsed(tv)  timelimit) {  

+   if(message_send_pid(pid_to_procid(pid), MSG_PING,
+   buf, 11, 
False)) ping_count++;
+   if(message_send_pid(pid_to_procid(pid), MSG_PING,
+   NULL, 0, 
False)) ping_count++;
+
+   while (ping_count  pong_count + 20) {
+   message_dispatch();
+   }
+   }
+   
+   printf(waiting for %d remaining replies (done %d)\n, 
+  ping_count - pong_count, pong_count);
+   while (timeval_elapsed(tv)  30  pong_count  ping_count) {
+   message_dispatch();
+   }
+   
+   if (ping_count != pong_count) {
+   fprintf(stderr, ping test failed! received %d, sent 
%d\n, 
+  pong_count, ping_count);
+   }
+   
+   printf(ping rate of %.0f messages/sec\n, 
+  (ping_count+pong_count)/timeval_elapsed(tv));
+   }
+
return (0);
 }
 



svn commit: samba r15731 - in branches/SAMBA_4_0/source/scripting/ejs: .

2006-05-19 Thread tridge
Author: tridge
Date: 2006-05-20 03:08:44 + (Sat, 20 May 2006)
New Revision: 15731

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

Log:

module init functions should return NTSTATUS, not void

Modified:
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_auth.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_config.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_data.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_ldb.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_nbt.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_nss.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_rand.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_samba3.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_string.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_sys.c


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_auth.c
===
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_auth.c 2006-05-20 
02:09:38 UTC (rev 15730)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_auth.c 2006-05-20 
03:08:44 UTC (rev 15731)
@@ -187,8 +187,9 @@
 /*
   setup C functions that be called from ejs
 */
-void smb_setup_ejs_auth(void)
+NTSTATUS smb_setup_ejs_auth(void)
 {
ejsDefineCFunction(-1, userAuth, ejs_userAuth, NULL, 
MPR_VAR_SCRIPT_HANDLE);
ejsDefineCFunction(-1, system_session, ejs_system_session, NULL, 
MPR_VAR_SCRIPT_HANDLE);
+   return NT_STATUS_OK;
 }

Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_config.c
===
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_config.c   2006-05-20 
02:09:38 UTC (rev 15730)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_config.c   2006-05-20 
03:08:44 UTC (rev 15731)
@@ -215,7 +215,8 @@
 /*
   setup C functions that be called from ejs
 */
-void smb_setup_ejs_config(void)
+NTSTATUS smb_setup_ejs_config(void)
 {
ejsDefineCFunction(-1, loadparm_init, ejs_loadparm_init, NULL, 
MPR_VAR_SCRIPT_HANDLE);
+   return NT_STATUS_OK;
 }

Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_data.c
===
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_data.c 2006-05-20 
02:09:38 UTC (rev 15730)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_data.c 2006-05-20 
03:08:44 UTC (rev 15731)
@@ -278,7 +278,8 @@
 /*
   setup C functions that be called from ejs
 */
-void smb_setup_ejs_datablob(void)
+NTSTATUS smb_setup_ejs_datablob(void)
 {
ejsDefineCFunction(-1, datablob_init, ejs_datablob_init, NULL, 
MPR_VAR_SCRIPT_HANDLE);
+   return NT_STATUS_OK;
 }

Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_ldb.c
===
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_ldb.c  2006-05-20 
02:09:38 UTC (rev 15730)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_ldb.c  2006-05-20 
03:08:44 UTC (rev 15731)
@@ -556,7 +556,8 @@
 /*
   setup C functions that be called from ejs
 */
-void smb_setup_ejs_ldb(void)
+NTSTATUS smb_setup_ejs_ldb(void)
 {
ejsDefineCFunction(-1, ldb_init, ejs_ldb_init, NULL, 
MPR_VAR_SCRIPT_HANDLE);
+   return NT_STATUS_OK;
 }

Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_nbt.c
===
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_nbt.c  2006-05-20 
02:09:38 UTC (rev 15730)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_nbt.c  2006-05-20 
03:08:44 UTC (rev 15731)
@@ -87,7 +87,8 @@
 /*
   setup C functions that be called from ejs
 */
-void smb_setup_ejs_nbt(void)
+NTSTATUS smb_setup_ejs_nbt(void)
 {
ejsDefineCFunction(-1, resolveName, ejs_resolve_name, NULL, 
MPR_VAR_SCRIPT_HANDLE);
+   return NT_STATUS_OK;
 }

Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_nss.c
===
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_nss.c  2006-05-20 
02:09:38 UTC (rev 15730)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_nss.c  2006-05-20 
03:08:44 UTC (rev 15731)
@@ -154,7 +154,8 @@
 /*
   setup C functions that be called from ejs
 */
-void smb_setup_ejs_nss(void)
+NTSTATUS smb_setup_ejs_nss(void)
 {
ejsDefineCFunction(-1, nss_init, ejs_nss_init, NULL, 
MPR_VAR_SCRIPT_HANDLE);
+   return NT_STATUS_OK;
 }

Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_rand.c
===
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_rand.c 2006-05-20 
02:09:38 UTC (rev 15730)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_rand.c 2006-05-20 
03:08:44 UTC (rev 15731)
@@ -98,7 +98,8 @@
 /*
   setup C functions that be called from ejs
 */
-void smb_setup_ejs_random(void)