[Samba] Execute on file access

2007-07-05 Thread spam
Hi Samba-Folks,

it might be a feature request, it might the the proof that I'm too stupid
to find it in the documentation:

I'd like to execute a binary program on each file which gets stored or
modified on the samba server. Is that possible?

I'd like to store images on a samba server, and from each image stored a
thumbnail should be calculated. Thus, after a file is created/modified, I
need to call a program passing the path name of the stored/modified file
as a parameter.

You might as well think about calling a virus scanner on the file just
stored.

I know that this might be a performance issue, but that will be my problem
- not yours :-)

Thank you for your replies,

  Peter


-- 
-
Angaben gemäß §35a GmbH-Gesetz:
ITServ GmbH
Sitz der Gesellschaft: 65474 Bischofsheim
Eingetragen unter der Registernummer HRB54785 beim AG Darmstadt
Vertretungsberechtigter Geschäftsführer: Peter Bauer
Umsatzsteuer-ID: DE182270475
-

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


[Samba] Problem with Everyone SID (S-1-1-0)

2007-07-05 Thread Patrick Rynhart

Hi,

I'm running Samba 3.0.25b as a PDC.

In log.smbd (at Debug level 10) I have noticed:
log.smbd:  Could not convert SID S-1-1-0 to gid, ignoring it

This problem occurs in function sid_to_gid in lookup_sid.c.  An attempt is
made for winbind to then resolve the group, but this results in

log.winbindd:  Could not find domain for sid S-1-1-0
log.winbindd:  sid2gid_lookupsid_recv: Could not convert get sid type for
S-1-1-0

However, S-1-1-0 is a well known SID as defined in util_sid.c

I have tried adding a group mapping for S-1-1-0 (but I don't think this
should be necessary because S-1-1-0 is well known)

i.e.

# net groupmap list | egrep Everyone
Everyone (S-1-1-0) - Everyone

but (even with this mapping) the error message persists.

Could someone please advise how this issue could be resolved.

Regards,

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


Re: [Samba] Miserable read performance (factor ~60 too slow)

2007-07-05 Thread Steve Platt
I'm curious - do you see an unusually high TCP retransmission rate during
these slow transfers? You may need to look on the Server first ...

I think the command is something like netstat -s and look in the TCP section.

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


Re: [Samba] Execute on file access

2007-07-05 Thread Volker Lendecke
On Thu, Jul 05, 2007 at 08:29:47AM +0200, [EMAIL PROTECTED] wrote:
 I'd like to store images on a samba server, and from each image stored a
 thumbnail should be calculated. Thus, after a file is created/modified, I
 need to call a program passing the path name of the stored/modified file
 as a parameter.

Write a VFS module that connects to the close operation.

Volker


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

Re: [Samba] Execute on file access

2007-07-05 Thread spam
 I'd like to store images on a samba server, and from each image stored a
 thumbnail should be calculated. Thus, after a file is created/modified,
 I
 need to call a program passing the path name of the stored/modified file
 as a parameter.

 Write a VFS module that connects to the close operation.

Simple enough! Yes, give me two or three minutes, and I'll be done.  ;-)

Open Source makes everybody a brilliant programmer, true?

However, thank you for your answer, which reads to a non-programmer like
me as: no, that feature is missing.

  Peter


-- 
-
Angaben gemäß §35a GmbH-Gesetz:
ITServ GmbH
Sitz der Gesellschaft: 65474 Bischofsheim
Eingetragen unter der Registernummer HRB54785 beim AG Darmstadt
Vertretungsberechtigter Geschäftsführer: Peter Bauer
Umsatzsteuer-ID: DE182270475
-

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


Re: [Samba] Miserable read performance (factor ~60 too slow)

2007-07-05 Thread Denis Vlasenko
On Thursday 05 July 2007 00:48, Arno Schäfer wrote:
 - copying a 700MB file from the CIFS share of the Windows XP box to a 
 different Windows PC starts immediately and takes about two minutes.
 
 - copying the same file via HTTP from the new Samba server takes a 
 little more than one minute (10.5 MB/sec).
 
 - copying the file from the Samba share varies hugely. It can take 
 between 90 seconds and literally hours (!).
 
 - sometimes it goes faster, but almost always the startup time is 
 between 20 and 90 seconds, that is the time before the copying even begins.
 
 - I have found repeatedly that when I am copying a file from the Samba 
 share, and it goes extremely slow (estimated time 90 minutes), and I 
 start copying a second file (from the same or a different PC), suddenly 
 the copying speeds up to normal speed.

Run tcpdump and watch what is going on the wire. This very likely to give
more info: you will see retransmits, or data being sent in very small packets,
or big spans of nothing being sent...

strace -p smbd process pid can also be useful.
--
vda
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Excel - share Access Denied after opening file

2007-07-05 Thread leonardo616
I have a strange problem with Excel + Word from an XP Pro (SP2) PC to a 
Linux Samba share (HOME).

If I 
1 - open Excel,
2 - then open a file on my Samba share HOME,
3 - any subsequent attempts to save or open a file on the HOME share
  
immediately result in an 'Access Denied' windows error message 
as soon as I select the root of the HOME share!

The same thing happens if I open a file from anywhere else 1st.

I am just using Workgroups - no Domains.
The same thing happens if I have Windows simple file sharing enabled or 
disabled.

I have tried amending various Samba options (using SWAT).
e.g. 'nt acl support', locking, dos filemode/filetimes.

There are no error messages in my samba logs or Windows Firewall.

All Windows Explorer activities work OK.


I have one other Samba server running on my network - a Linksys NSLU2.
I can successfully access shares on this device when I am denied access 
on my HOME share.


Does anyone have any idea what causes this - or how to fix it?

-
-


SMB.CONF - Samba version 3.0.3-5 - Fedora Core 2


[global]
workgroup = DATAHOME
netbios name = DMZ
server string = DMZ Samba Server
password server = None
passwd program = /usr/bin/passwd %u
username map = /etc/samba/smbusers
unix password sync = Yes
log file = /var/log/samba/%m.log
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
os level = 33
preferred master = No
local master = No
domain master = No
dns proxy = No
ldap ssl = no
remote announce = 192.168.200.255/DATAHOME
printer admin = miket
nt acl support = No
strict locking = No
dos filemode = Yes
dos filetimes = Yes

[homes]
comment = Home Directories
valid users = %S
read only = No
browseable = No

[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No

[HOME]
path = /home
read only = No
create mask = 0774
force create mode = 0774
force security mode = 0777
directory mask = 0775
force directory mode = 0775
force directory security mode = 0777
inherit permissions = Yes
fstype = Samba
~

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


Re: [Samba] Execute on file access

2007-07-05 Thread Volker Lendecke
On Thu, Jul 05, 2007 at 12:22:57PM +0200, [EMAIL PROTECTED] wrote:
  I'd like to store images on a samba server, and from each image stored a
  thumbnail should be calculated. Thus, after a file is created/modified,
  I
  need to call a program passing the path name of the stored/modified file
  as a parameter.
 
  Write a VFS module that connects to the close operation.
 
 Simple enough! Yes, give me two or three minutes, and I'll be done.  ;-)
 
 Open Source makes everybody a brilliant programmer, true?
 
 However, thank you for your answer, which reads to a non-programmer like
 me as: no, that feature is missing.

Yep. Feel free to look at http://samba.org/samba/support/ to
find someone do it for you :-)

Volker


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

[Samba] winbind rpc only

2007-07-05 Thread Thorkil Olesen
I have sat the parameter in smb.conf:

winbind rpc only = Yes

Testparm says:

Unknown parameter encountered: winbind rpc only
Ignoring unknown parameter winbind rpc only

The man-page for smb.conf do document it. Is that wrong?

Samba 3.0.25b.

-- 
Thorkil Olesen,
Hanstholm, Denmark.


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


Re: [Samba] Samba 3.0.25 OpenLDAP 2.3 issues

2007-07-05 Thread Ingo Steuwer
Am Mittwoch, 4. Juli 2007 18:13 schrieb Eric Masson:
 Hi,

[..]
 smbd then complains about accounts it can't create.

 I've already opened the acl in slapd.conf with no result :

 access to dn.subtree=ou=Domains,dc=interne,dc=example,dc=org
 by self write
 by dn=cn=Manager,dc=interne,dc=example,dc=org write
 by * auth

 Any idea ?

Are you sure samba tries to add the user in ou=Domains? Allow access to the 
whole LDAP for testing purposes, AFAIR samba will add the user under the 
LDAP-base.

Regards
Ingo Steuwer

-- 
Ingo Steuwer   Projektmanagement[EMAIL PROTECTED]
Univention GmbHLinux for your Business  fon: +49 421 22 232-43
Mary-Somerville-Str.1  28359 Bremen fax: +49 421 22 232-99
   http://www.univention.de
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Custom Windows Welcome message

2007-07-05 Thread Ralf Wiegand
Hello - I running Samba as a PDC on FC6 with roaming profiles. I need to setup 
a custom Windows logon/welcome message... to tell users want they can expect 
using this domain. Is it also possible to place different PDF files on the 
users desktop when he or she logs on, but only referencing one source file, so 
I don't have a copy for each user?
What is the best approach?

Thank You.
Ralf




 

Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] winbind rpc only

2007-07-05 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thorkil,

 I have sat the parameter in smb.conf:
 
 winbind rpc only = Yes
 
 Testparm says:
 
 Unknown parameter encountered: winbind rpc only
 Ignoring unknown parameter winbind rpc only
 
 The man-page for smb.conf do document it. Is 
 that wrong?

The parameter is only supported in the upcoming 3.0.26
series and later.  Which is also why is is not mentioned in
the release notes.





cheers, jerry
=
Samba--- http://www.samba.org
Centeris ---  http://www.centeris.com
What man is a man who does not make the world better?  --Balian
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGjPf8IR7qMdg1EfYRAheWAJ9mx9IAwMdCNlBB8wNUOBKdfz3DbQCcDRR/
FNPKXqmFd9rEiT5oukNjq8c=
=TKG/
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Problem jioning domain using net rpc join

2007-07-05 Thread Tony Molloy

Hi,

I have a samba PDC running on Centos4 with several hundred Windows PS's using 
it for authentication. 

I've just upgraded the fileserver which serves the users home directories to 
Centos5. The problem is how to get the upgraded fileserver to join the 
existing domain.

On the server JANUS I have an account for the upgraded fileserver 
in /etc/passwd same as before.

When I try and join the domain from the fileserver I get



[EMAIL PROTECTED] ~]# net rpc join MEMBER  -U root -d 2
[2007/07/05 14:13:37, 2] lib/interface.c:add_interface(81)
  added interface ip=10.220.1.153 bcast=10.220.1.255 nmask=255.255.255.0
[2007/07/05 14:13:37, 1] utils/net_rpc.c:run_rpc_command(170)
  rpc command function failed! (NT_STATUS_ACCESS_DENIED)
Password: x
[2007/07/05 14:13:43, 0] utils/net_rpc_join.c:net_rpc_join_newstyle(350)
  Error in domain join verification (credential setup failed): 
NT_STATUS_ACCESS_DENIED
  
Unable to join domain CSIS.
[2007/07/05 14:13:43, 2] utils/net.c:main(988)
  return code = 1

Tony

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


Re: [Samba] Problem jioning domain using net rpc join SOLVED

2007-07-05 Thread Tony Molloy
On Thursday 05 July 2007 14:15, Tony Molloy wrote:
 Hi,


 I've just upgraded the fileserver which serves the users home directories
 to Centos5. The problem is how to get the upgraded fileserver to join the
 existing domain.

 On the server JANUS I have an account for the upgraded fileserver
 in /etc/passwd same as before.

OOP's I forgot to recreate the account in the smbpasswd file.

So now it joined the domain.

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


[Samba] Files rename problem

2007-07-05 Thread Pol Hallen
Hi folks

i using debian stable (with samba v3.0.24-6)

When I try to rename (from windows host) a file in the sharing of samba, the 
file isn't renamed :-/

Example:
readme.txt 
to
Readme.txt (i renamed only the letter R)
I press enter (and f5 to refresh) but the file is always readme.txt

Instead if i rename completly the file (all letters) the rename is correct 
(Readme.txt)

Why? 

I remember that old version of samba doesn't have this problem.

Can I resolve this problem?

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


Re: [Samba] Samba Problem With Big File Transfer on Windows Client

2007-07-05 Thread Nuno Pissarra

Hi
After your sugestion i have been testing samba with the options keepalive,
dead time, debug level = 4, but the final result was the same apparently,
even the logs dont show any useful information.
During the test i notice a peak in the CPU usage bye the process pdflush
and smbd. I think pdflush is a kernel process dont konw if this helps to
identify the problem origin.
Aravinda Guzzar thanks for the sugestion on the ftruncate function and the
packets situation, but i dont think i have the know-how  to do it

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


Re: [Samba] Custom Windows Welcome message

2007-07-05 Thread Natxo Asenjo

On 7/5/07, Ralf Wiegand [EMAIL PROTECTED] wrote:

Hello - I running Samba as a PDC on FC6 with roaming profiles. I need to setup a 
custom Windows logon/welcome message... to tell users want they can expect using 
this domain.


I am sorry to ask you to stfw:
http://www.google.nl/search?q=windows%20welcome%20message

the first result is spot on.


Is it also possible to place different PDF files on the users desktop

when he or she logs on, but only referencing one source file, so I
don't have a copy for each user?

What is the best approach?


use a login script or a mandatory desktop.

These 2 questions have nothing to do with samba, though ;), they are
normal windows networking in action.

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


Re: [Samba] Custom Windows Welcome message

2007-07-05 Thread Ralf Wiegand
Thanks for the tip.  In a windows AD domain, this is accomplished by using a 
group policy... so how do you do this in samba.  I don't want to added each XP 
box.
If it is done via a logon script, do you have an example?

Ralf

- Original Message 
From: Natxo Asenjo [EMAIL PROTECTED]
To: samba@lists.samba.org
Sent: Thursday, July 5, 2007 10:50:20 AM
Subject: Re: [Samba] Custom Windows Welcome message

On 7/5/07, Ralf Wiegand [EMAIL PROTECTED] wrote:
 Hello - I running Samba as a PDC on FC6 with roaming profiles. I need to 
 setup a custom Windows logon/welcome message... to tell users want they can 
 expect using this domain.

I am sorry to ask you to stfw:
http://www.google.nl/search?q=windows%20welcome%20message

the first result is spot on.

Is it also possible to place different PDF files on the users desktop
when he or she logs on, but only referencing one source file, so I
don't have a copy for each user?
 What is the best approach?

use a login script or a mandatory desktop.

These 2 questions have nothing to do with samba, though ;), they are
normal windows networking in action.

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







  

Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mailp=graduation+giftscs=bz
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Custom Windows Welcome message

2007-07-05 Thread Adam Tauno Williams

 Thanks for the tip.  In a windows AD domain, this is accomplished by using a 
 group policy... so how do you do this in samba.  I don't want to added each 
 XP box.
 If it is done via a logon script, do you have an example?

Through NT domain policies (ntconfig.pol).  This isn't a Samba related
question;  just the same techniques and tools as with an NT4 PDC.

http://www.microsoft.com/technet/archive/winntas/maintain/featusability/prof_pol.mspx?pf=true

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


Re: [Samba] Miserable read performance (factor ~60 too slow)

2007-07-05 Thread Oliver Schulze L.

Could it be the disk?
Can you do a:
hdparm -t /dev/sda

Then benchmark your XP disk with www.hdtune.com

HTH
Oliver

Arno Schäfer wrote:

Hi,

I am trying to migrate my files from a Windows XP Pro box to a new 
server running OpenSuSE 10.2/Linux 2.6.18 (x86_64) and Samba 3.0.25b.


The Server is a new Athlon 64 X2 4000+/1GB with two 400GB SATA disks 
in a software RAID1 configuration. The share file system is reiserfs 
on a 350GB RAID1 partition.


I have a small LAN with three PCs on 100MBit Ethernet and a Laptop on 
WLAN on a 4 Port Switch/WLAN/DSL router.



I am experiencing extremely (an I really mean EXTREMELY) bad 
performance. It is so bad that it can not have anything to do with 
performance tuning, it must be a configuration error somewhere.


Doing some comparisons, I find that

- copying a 700MB file from the CIFS share of the Windows XP box to a 
different Windows PC starts immediately and takes about two minutes.


- copying the same file via HTTP from the new Samba server takes a 
little more than one minute (10.5 MB/sec).


- copying the file from the Samba share varies hugely. It can take 
between 90 seconds and literally hours (!).


- sometimes it goes faster, but almost always the startup time is 
between 20 and 90 seconds, that is the time before the copying even 
begins.


- I have found repeatedly that when I am copying a file from the Samba 
share, and it goes extremely slow (estimated time 90 minutes), and I 
start copying a second file (from the same or a different PC), 
suddenly the copying speeds up to normal speed.


ifconfig does not show any collisions or errors, and as I said, 
copying via HTTP is extremely fast.


The Linux installation is as barebones as I could make it, no X11, no 
firewall (for now), no ZENWorks or AppArmor or anything. I already 
once reinstalled everything from scratch, to no avail.


Any ideas would be immensely appreciated, as I am seriously 
considering going back to Windows XP ;-)


Best Regards,

Arno


Here is my smb.conf:

[global]
workgroup = MSHEIMNETZ
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \\%L\profiles\.msprofile
logon home = \\%L\%U\.9xprofile
logon drive = P:
usershare allow guests = Yes
add machine script = /usr/sbin/useradd  -c Machine -d 
/var/lib/nobody -s /bin/false %m$

domain logons = No
domain master = No
security = share
netbios name = FILESERVER2

[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775

[share]
comment = share
path = /share
read only = No
guest ok = Yes
browsable = Yes



--
Oliver Schulze L.   | http://tinymailto.com/oliver  
Asuncion - Paraguay | http://www.solojuegos.mobi


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


Re: [Samba] Big problem with USERIDs

2007-07-05 Thread Oliver Schulze L.

Have you tried reparing the .tdb files?

Look at the howto, I the command is tdbbackup

HTH
Oliver


--
Oliver Schulze L.   | http://tinymailto.com/oliver  
Asuncion - Paraguay | http://www.solojuegos.mobi


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


Re: [Samba] Problem with Everyone SID (S-1-1-0)

2007-07-05 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Patrick Rynhart wrote:
 Hi,
 
 I'm running Samba 3.0.25b as a PDC.
 
 In log.smbd (at Debug level 10) I have noticed:
 log.smbd:  Could not convert SID S-1-1-0 to gid, ignoring it

There are a couple of well known sids added to the user's
NT token in smbd.  I doubt you really needs these converted
to a SID, but if you do, please explain exactly what you
are trying to accomplish.





cheers, jerry
=
Samba--- http://www.samba.org
Centeris ---  http://www.centeris.com
What man is a man who does not make the world better?  --Balian
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGjSCAIR7qMdg1EfYRAk4qAJ4rIxhv1qjpgQN6vdCgnp5m/g4xswCeKZoJ
0S3Buate/KQWOzHlEPnImmk=
=cKvK
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Execute on file access

2007-07-05 Thread Jeremy Allison
On Thu, Jul 05, 2007 at 12:22:57PM +0200, [EMAIL PROTECTED] wrote:
  I'd like to store images on a samba server, and from each image stored a
  thumbnail should be calculated. Thus, after a file is created/modified,
  I
  need to call a program passing the path name of the stored/modified file
  as a parameter.
 
  Write a VFS module that connects to the close operation.
 
 Simple enough! Yes, give me two or three minutes, and I'll be done.  ;-)
 
 Open Source makes everybody a brilliant programmer, true?
 
 However, thank you for your answer, which reads to a non-programmer like
 me as: no, that feature is missing.

You always have the option to purchase programmer time to implement
a feature like that. On closed source systems no, that feature is missing
would be your only answer until enough people complained or the
company providing the software went out of business.

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


Re: [Samba] Miserable read performance (factor ~60 too slow)

2007-07-05 Thread Andrew Morgan

On Thu, 5 Jul 2007, Arno Schäfer wrote:


Hi,

I am trying to migrate my files from a Windows XP Pro box to a new server 
running OpenSuSE 10.2/Linux 2.6.18 (x86_64) and Samba 3.0.25b.


The Server is a new Athlon 64 X2 4000+/1GB with two 400GB SATA disks in a 
software RAID1 configuration. The share file system is reiserfs on a 350GB 
RAID1 partition.


I have a small LAN with three PCs on 100MBit Ethernet and a Laptop on WLAN on 
a 4 Port Switch/WLAN/DSL router.



I am experiencing extremely (an I really mean EXTREMELY) bad performance. It 
is so bad that it can not have anything to do with performance tuning, it 
must be a configuration error somewhere.


Doing some comparisons, I find that

- copying a 700MB file from the CIFS share of the Windows XP box to a 
different Windows PC starts immediately and takes about two minutes.


- copying the same file via HTTP from the new Samba server takes a little 
more than one minute (10.5 MB/sec).


- copying the file from the Samba share varies hugely. It can take between 90 
seconds and literally hours (!).


- sometimes it goes faster, but almost always the startup time is between 20 
and 90 seconds, that is the time before the copying even begins.


- I have found repeatedly that when I am copying a file from the Samba share, 
and it goes extremely slow (estimated time 90 minutes), and I start copying a 
second file (from the same or a different PC), suddenly the copying speeds up 
to normal speed.


ifconfig does not show any collisions or errors, and as I said, copying via 
HTTP is extremely fast.


The Linux installation is as barebones as I could make it, no X11, no 
firewall (for now), no ZENWorks or AppArmor or anything. I already once 
reinstalled everything from scratch, to no avail.


Any ideas would be immensely appreciated, as I am seriously considering going 
back to Windows XP ;-)


You have an Ethernet duplex mismatch between your server and the switch 
port.  Based on the symptoms you describe, your server is probably at full 
duplex and the switch port is at half duplex.


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

[Samba] Re: winbind rpc only

2007-07-05 Thread Thorkil Olesen
Gerald (Jerry) Carter jerry at samba.org writes:

 The parameter is only supported in the upcoming 3.0.26
 series and later.  Which is also why is is not mentioned in
 the release notes.

So the documentation in the man-page is a little ahead ;-)

Thanks for the answer!

-- 
Thorkil Olesen,
Hanstholm, Denmark.



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


[Samba] Promoting BDC to PDC

2007-07-05 Thread Ivan Ordonez

Hi,

Does someone know how will all my client machines find the BDC when 
the PDC is stopped. Both PDC and BDC are running Samba with LDAPSAM 
backend replicated on both the PDC with master LDAP database and BDC 
with replicated LDAP database. But when I stop PDC the clients are 
not detecting the BDC broadcast. The replication on all domain 
controllers are perfect.  I went as far as making BDC the new PDC by 
doing the following on smb.conf.  There's actually a little success 
when I did this.


preferred master = Yes
domain master = Yes

I was able to login but then could not access the shared drive 
running on a member server.  I made sure that the smb.conf file on 
the member server that contains all the shared drive is set to:


Password Server = new PDC hostname


Any idea of where I may be wrong?  I guess to make it short, how can 
I promote a BDC to a PDC, if in case the PDC crashed.  I want to make 
sure that if I promote one of the BDC to PDC, that all my user can 
still login and access shared files.


We have 4 machine running samba, 3 with LDAP backend (PDC, 2 BDC) and 
1 machine as fileserver or member server only and used for filesharing.



Thanks,
-Ivan

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


Re: [Samba] OS/2 Warp 4 Access Issues

2007-07-05 Thread Michael Powell
OK, here are the versions:

OS/2 Warp 4.50
Debian Etch
Samba 3.0.24-6etch4
linux kernel 2.6.18

I actually started having problems before upgrading to etch.  Then, I was on a 
2.4 kernel, and had upgraded to what was then the latest security fix for
samba for the debian stable version previous to etch.  I was hoping that
upgrading to etch might fix the problem, but it did not.  FWIW, I did a 
clean upgrade to etch, using the netinstall CD, so all of the previous
binaries and config files were over-written (nothing left behind to cause
problems).

As for the problem... on the OS/2 box, the shares on the debian box are 
displayed (just as the shares on the Win9x box are), but when I click on
any of the debian shares, OS/2 reports that No objects were found that
match the specified find criteria.  So, none of the files that reside
in the shared folders are displayed.  It is as if the shares have no files
in them (but they do!).

OS/2 does appear to access the PDF Printer share OK, and acts as
though it is printing to it, but I have no idea where the PDF files that
it is printing are being saved.  ;-)  It cannot access any of the
disk shares.

Here is the smb.conf config file (with certain bits replaced with 'X'):

[global]
netbios name = XX
server string = debian
workgroup = XX
hosts allow = 127. 192.168.X.
#printcap name = /etc/printcap
printcap name = cups
load printers = yes
printing = cups
cups options = raw
guest account = smbguest
log file = /var/log/samba/samba.log
max log size = 1000
security = user
username level = 8
password level = 8
username map = /etc/samba/smbusers
add user script = /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba 
Machine Account' -s /dev/null -M '%u'
smb passwd file = /etc/samba/smbpasswd
encrypt passwords = yes
unix password sync = no
passwd program = /usr/bin/passwd '%u'
passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n 
*passwd:*all*authentication*tokens*updated*successfully*\n
null passwords = no
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
interfaces = 127.0.0.1/8 192.168.X.X
remote browse sync = 192.168.X.255
remote announce = 192.168.X.255
local master = no
os level = 33
domain master = no
preferred master = no
time server = no
domain logons = no
logon drive = m:
logon home = \\%L\homes\%u
logon path = \\%L\profiles\%u
logon script = %G.bat
name resolve order = wins lmhosts bcast
wins support = no
msdfs root = yes

wins proxy = no
dns proxy = no
preserve case = no
winbind use default domain = yes
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
template shell = /dev/null

[homes]
comment = Home Directories
path = /home
read only = no
available = yes
browseable = yes
writable = yes
guest ok = no
public = no
printable = no
share modes = no
locking = no

[netlogon]
comment = Network Logon Service
path = /home/netlogon
read only = no
available = yes
browseable = yes
writable = no
guest ok = no
public = no
printable = no
share modes = no
locking = no

Thanks for your assistance!

On Sat, 30 Jun 2007 17:33:51 -0400
Felix Miata [EMAIL PROTECTED] wrote:

 Problems between OS/2 and Samba have been the rule rather than the
 exception since Samba 3 replaced Samba 2. Most issues are resolved in
 the latest versions, but to really be able to help you'll probably need
 to provide more information on your versions, kernel, Debian and Samba,
 plus Samba configuration.
 
 My SUSE box is running 3.0.26pre1 compiled from SVN plus a recompiled
 kernel that includes SMBFS, as CIFS remains broken for use with OS/2. I
 stay out of trouble by mounting all OS/2 shares ro, and using only OS/2
 to move or copy files from Samba shares to OS/2.
 -- 
 Respect everyone.   I Peter 2:17 NIV
 
  Team OS/2 ** Reg. Linux User #211409
 
 Felix Miata  ***  http://mrmazda.no-ip.com/
 -- 
 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] error when trying to execute net join..

2007-07-05 Thread justin ehrlichman

I get this error after executing the net join ads command:

 ads_connect: Invalid or incomplete multibyte or wide character


anybody have any idea what that means?
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Samba PDC LDAP HowTo 4 U

2007-07-05 Thread Linux Guy

Chris Smart wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all,
I've written a HowTo for 'Samba domain with LDAP back end' and am
looking for people to test it and tell me the stupid things I did.

I also wanted to put the HowTo out there in case others wanted to do
something similar and because I know you've got nothing better to do on
your weekend than play with Linux ;)

I'm by no means a Samba expert so please let me know if you have any
suggestions or improvements :)

It's wikified online at :
http://wiki.makethemove.net/index.php?title=LDAP-Samba;


  

Am still reading it...   :)
However, I wanted to take a moment to mention the smbldap-installer at
http://majen.net/smbldap/
It rocks!
I am glad to see you covering some areas not covered in many howto's.
Questions that may come up in setting up a pdc may be...
Folder redirection using policy files, etc.
How to copy existing profiles to the roaming profiles.

Giving a user permission to join the domain. (so folks aren't running
around with the root password)
net rpc rights grant Domain Admins SeMachineAccountPrivilege

and possibly these as well..
SeMachineAccountPrivilege \
SeTakeOwnershipPrivilege \
SeBackupPrivilege \
SeRestorePrivilege \
SeRemoteShutdownPrivilege \
SePrintOperatorPrivilege \
SeAddUsersPrivilege \














--
This message has been scanned for viruses and dangerous content by RCRnet, and 
is believed to be clean.

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


[Samba] gosa web gui

2007-07-05 Thread Linux Guy

Any comments on gosa for management?

Looks pretty..  Haven't tried it yet though.  :)






--
This message has been scanned for viruses and dangerous content by RCRnet, and 
is believed to be clean.

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


Re: [Samba] Promoting BDC to PDC

2007-07-05 Thread Gary Dale

Ivan Ordonez wrote:

Hi,

Does someone know how will all my client machines find the BDC when 
the PDC is stopped. Both PDC and BDC are running Samba with LDAPSAM 
backend replicated on both the PDC with master LDAP database and BDC 
with replicated LDAP database. But when I stop PDC the clients are not 
detecting the BDC broadcast. The replication on all domain controllers 
are perfect.  I went as far as making BDC the new PDC by doing the 
following on smb.conf.  There's actually a little success when I did 
this.


preferred master = Yes
domain master = Yes

I was able to login but then could not access the shared drive running 
on a member server.  I made sure that the smb.conf file on the member 
server that contains all the shared drive is set to:


Password Server = new PDC hostname


Any idea of where I may be wrong?  I guess to make it short, how can I 
promote a BDC to a PDC, if in case the PDC crashed.  I want to make 
sure that if I promote one of the BDC to PDC, that all my user can 
still login and access shared files.


We have 4 machine running samba, 3 with LDAP backend (PDC, 2 BDC) and 
1 machine as fileserver or member server only and used for filesharing.



Thanks,
-Ivan




Having the password server set to * should be sufficient to get the
rollover to work.

Accessing the files should require that the shares are declared in the
smb.conf on each domain controller. Other than that, once the new domain
controller takes over, everything should work.

I don't believe Samba actually differentiates between types of domain
controllers. In your case, the distinction just revolves around the LDAP
replication. Beyond that, I don't think the problem would be related to
your use of LDAP.

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


Re: [Samba] OS/2 Warp 4 Access Issues

2007-07-05 Thread Guenter Kukkukk
Am Donnerstag, 5. Juli 2007 22:38 schrieb Michael Powell:
 OK, here are the versions:
 
 OS/2 Warp 4.50
 Debian Etch
 Samba 3.0.24-6etch4
 linux kernel 2.6.18
 
 I actually started having problems before upgrading to etch.  Then, I was on 
 a 
 2.4 kernel, and had upgraded to what was then the latest security fix for
 samba for the debian stable version previous to etch.  I was hoping that
 upgrading to etch might fix the problem, but it did not.  FWIW, I did a 
 clean upgrade to etch, using the netinstall CD, so all of the previous
 binaries and config files were over-written (nothing left behind to cause
 problems).
 
 As for the problem... on the OS/2 box, the shares on the debian box are 
 displayed (just as the shares on the Win9x box are), but when I click on
 any of the debian shares, OS/2 reports that No objects were found that
 match the specified find criteria.  So, none of the files that reside
 in the shared folders are displayed.  It is as if the shares have no files
 in them (but they do!).
 
 OS/2 does appear to access the PDF Printer share OK, and acts as
 though it is printing to it, but I have no idea where the PDF files that
 it is printing are being saved.  ;-)  It cannot access any of the
 disk shares.
 
 Here is the smb.conf config file (with certain bits replaced with 'X'):
 
 [global]
 netbios name = XX
 server string = debian
 workgroup = XX
 hosts allow = 127. 192.168.X.
 #printcap name = /etc/printcap
 printcap name = cups
 load printers = yes
 printing = cups
 cups options = raw
 guest account = smbguest
 log file = /var/log/samba/samba.log
 max log size = 1000
 security = user
 username level = 8
 password level = 8
 username map = /etc/samba/smbusers
 add user script = /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba 
 Machine Account' -s /dev/null -M '%u'
 smb passwd file = /etc/samba/smbpasswd
 encrypt passwords = yes
 unix password sync = no
 passwd program = /usr/bin/passwd '%u'
 passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n 
 *passwd:*all*authentication*tokens*updated*successfully*\n
 null passwords = no
 socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
 interfaces = 127.0.0.1/8 192.168.X.X
 remote browse sync = 192.168.X.255
 remote announce = 192.168.X.255
 local master = no
 os level = 33
 domain master = no
 preferred master = no
 time server = no
 domain logons = no
 logon drive = m:
 logon home = \\%L\homes\%u
 logon path = \\%L\profiles\%u
 logon script = %G.bat
 name resolve order = wins lmhosts bcast
 wins support = no
 msdfs root = yes
 
 wins proxy = no
 dns proxy = no
 preserve case = no
 winbind use default domain = yes
 idmap uid = 16777216-33554431
 idmap gid = 16777216-33554431
 template shell = /dev/null
 
 [homes]
 comment = Home Directories
 path = /home
 read only = no
 available = yes
 browseable = yes
 writable = yes
 guest ok = no
 public = no
 printable = no
 share modes = no
 locking = no
 
 [netlogon]
 comment = Network Logon Service
 path = /home/netlogon
 read only = no
 available = yes
 browseable = yes
 writable = no
 guest ok = no
 public = no
 printable = no
 share modes = no
 locking = no
 
 Thanks for your assistance!
 

Hi Michael,

add the following to the [global] section of smb.conf:

ea support = yes

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


Re: [Samba] Custom Windows Welcome message

2007-07-05 Thread Natxo Asenjo

On 7/5/07, Ralf Wiegand [EMAIL PROTECTED] wrote:


Thanks for the tip.  In a windows AD domain, this is accomplished by using a
group policy... so how do you do this in samba.  I don't want to added each
XP box.


with the old nt policy editor.


If it is done via a logon script, do you have an example?


the script would be to copy the pdf files to the desktop of the user,
not for the welcome stuff because you cannot modify hklm keys as a
normal user. And no, I do not have an example handy, but come on ...,
are you a windows admin or what ? ;)

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


[Samba] SAMBA ADS to NIS mapping

2007-07-05 Thread Barry Dowell
I am working in an environment with an HP-UX NIS that my Red Hat ES 4.x
system is using for Unix access controls.

My Red Hat system is serving as an NFS server for the HP-UX users who also
could be Windows users coming from a Windows Server 2003 active directory.

I have tested some configurations of SAMBA using winbind, but I don't get
the results I want.  What happens when using winbind (via authconfig) is
that if I have the template directory for homedir configured as per below,
the home directory must be owned by REALM\user, rather than mapping over to
the NIS user owned directory in the same location.  For now, I've disabled
winbind since we don't actually have need for it outside of helping to map
usernames from Windows ADS to Unix NIS (if we are actually supposed to use
it there).

What I want to have happen is that REALM\username maps over to a user from
the NIS.  As an example, what I am expecting is that I need to have an
smbpasswd file that includes all of the users from my NIS.  I have done that
via instructions taken from
http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/custom-guide/s1-samb
a-configuring.html that instruct to do:

ypcat passwd | mksmbpasswd.sh  /etc/samba/smbpasswd


I have set username map = /etc/samba/smbusers  and have added a few specific
users (for testing) to the mapping there with unixname = windowsname  for
the users I am testing on.


The Red Hat server has been joined to the Windows domain, kerberos is
working fine, and when I have winbind running I can successfully use wbinfo
-g or wbinfo -u to dump the group or user names.  (Though I have winbind off
at the moment).

Again though, what I really want to have happen is for windows usernames to
be mapped over to NIS usernames so that when a Windows user attempts to
access their home directory they will be able to.


Anyone able to help clear up my confusion here and point me in the proper
direction to have names from one side mapped to names on the other side?




Snippets from smb.conf
[global]
   security = ADS
   username map = /etc/samba/smbusers

# WINBIND stuff
   template homedir = /exports/home/%u
   template shell = /bin/bash

# Share Definitions
==
#   idmap uid = 16777216-33554431
#   idmap gid = 16777216-33554431
   idmap uid = 16777216-33554431
   idmap gid = 16777216-33554431
   password server = WINDOWSPASSWORDSERVER
   realm = REALM
#   winbind use default domain = no



Thanks in advance!


Bcd


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


RE: [Samba] SAMBA ADS to NIS mapping

2007-07-05 Thread Barry Dowell
 
D'oh!  I think I have things figured out actually, but have a remaining
issue to unburden if someone is able to help.

First, the username mapping (without winbind in effect) seems to be working
for me now.  I had thought it wasn't functioning properly because when I
browsed to \\sambaserver I would see my named folder (home directory there)
showing up, but couldn't access same.

I was not paying enough attention to see that the real problem there is that
samba was trying to map my home folder based on the path noted in the NIS (
which is just /home/username ) rather than the path that the samba server is
using to get there currently ( /exports/home/username )

I updated the path under the [homes] tag in the samba.conf to get that
resolved and woohoo! Things work there now.


But, I'm left with a final issue, or what I think is a final issue.

My Windows names typically do not exactly match the Unix usernames.  As an
example I have users in Windows in the following format:
FirstInitialMiddleInitialLastname  so Joe The User would be JTUSER.  Over on
Unix I have that same user as JUSER.

During earlier testing, even with the smbusers file noting that juser =
REALM\jtuser jtuser  the mapping that samba was doing for the home directory
always seemed to be attempting to go to a folder named after the windows
user, rather than one named after the NIS username.

How do I make sure that the home directory that is shown is the properly
named NIS username folder, rather than one that doesn't exist (the longer
windows named folder)?


Thanks in advance again for helping to clear this all up for me.


Bcd



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Barry Dowell
Sent: Thursday, July 05, 2007 6:24 PM
To: samba@lists.samba.org
Subject: [Samba] SAMBA ADS to NIS mapping

I am working in an environment with an HP-UX NIS that my Red Hat ES 4.x
system is using for Unix access controls.

My Red Hat system is serving as an NFS server for the HP-UX users who also
could be Windows users coming from a Windows Server 2003 active directory.

I have tested some configurations of SAMBA using winbind, but I don't get
the results I want.  What happens when using winbind (via authconfig) is
that if I have the template directory for homedir configured as per below,
the home directory must be owned by REALM\user, rather than mapping over to
the NIS user owned directory in the same location.  For now, I've disabled
winbind since we don't actually have need for it outside of helping to map
usernames from Windows ADS to Unix NIS (if we are actually supposed to use
it there).

What I want to have happen is that REALM\username maps over to a user from
the NIS.  As an example, what I am expecting is that I need to have an
smbpasswd file that includes all of the users from my NIS.  I have done that
via instructions taken from
http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/custom-guide/s1-samb
a-configuring.html that instruct to do:

ypcat passwd | mksmbpasswd.sh  /etc/samba/smbpasswd


I have set username map = /etc/samba/smbusers  and have added a few specific
users (for testing) to the mapping there with unixname = windowsname  for
the users I am testing on.


The Red Hat server has been joined to the Windows domain, kerberos is
working fine, and when I have winbind running I can successfully use wbinfo
-g or wbinfo -u to dump the group or user names.  (Though I have winbind off
at the moment).

Again though, what I really want to have happen is for windows usernames to
be mapped over to NIS usernames so that when a Windows user attempts to
access their home directory they will be able to.


Anyone able to help clear up my confusion here and point me in the proper
direction to have names from one side mapped to names on the other side?




Snippets from smb.conf
[global]
   security = ADS
   username map = /etc/samba/smbusers

# WINBIND stuff
   template homedir = /exports/home/%u
   template shell = /bin/bash

# Share Definitions
==
#   idmap uid = 16777216-33554431
#   idmap gid = 16777216-33554431
   idmap uid = 16777216-33554431
   idmap gid = 16777216-33554431
   password server = WINDOWSPASSWORDSERVER
   realm = REALM
#   winbind use default domain = no



Thanks in advance!


Bcd


--
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


svn commit: samba r23720 - in branches/SAMBA_4_0/source: scripting/libjs selftest setup

2007-07-05 Thread abartlet
Author: abartlet
Date: 2007-07-05 06:15:40 + (Thu, 05 Jul 2007)
New Revision: 23720

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

Log:
Allow the member server to work against an LDAP Backend.  Another case
where LDB isn't as strict as OpenLDAP, the self join record contains
duplicate servicePrincipalNames once the DNS name and domain name are
made equal.  (Easier to just skip the useless self-join).

Andrew Bartlett

Added:
   branches/SAMBA_4_0/source/setup/provision_self_join.ldif
Modified:
   branches/SAMBA_4_0/source/scripting/libjs/provision.js
   branches/SAMBA_4_0/source/selftest/Samba4.pm
   branches/SAMBA_4_0/source/setup/provision_users.ldif


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/libjs/provision.js
===
--- branches/SAMBA_4_0/source/scripting/libjs/provision.js  2007-07-05 
03:30:46 UTC (rev 23719)
+++ branches/SAMBA_4_0/source/scripting/libjs/provision.js  2007-07-05 
06:15:40 UTC (rev 23720)
@@ -700,6 +700,11 @@
message(Setting up sam.ldb users and groups\n);
setup_add_ldif(provision_users.ldif, info, samdb, false);
 
+   if (lp.get(server role) == domain controller) {
+   message(Setting up self join\n);
+   setup_add_ldif(provision_self_join.ldif, info, samdb, false);
+   }
+
if (setup_name_mappings(info, samdb) == false) {
return false;
}
@@ -769,6 +774,11 @@
 /* Write out a DNS zone file, from the info in the current database */
 function provision_dns(subobj, message, paths, session_info, credentials)
 {
+   var lp = loadparm_init();
+   if (lp.get(server role) != domain controller) {
+   message(No DNS zone required for role %s\n, lp.get(server 
role));
+   return;
+   }
message(Setting up DNS zone:  + subobj.DNSDOMAIN +  \n);
var ldb = ldb_init();
ldb.session_info = session_info;

Modified: branches/SAMBA_4_0/source/selftest/Samba4.pm
===
--- branches/SAMBA_4_0/source/selftest/Samba4.pm2007-07-05 03:30:46 UTC 
(rev 23719)
+++ branches/SAMBA_4_0/source/selftest/Samba4.pm2007-07-05 06:15:40 UTC 
(rev 23720)
@@ -281,6 +281,8 @@
$localdomain = $netbiosname if $server_role eq member server;
my $localrealm = $realm;
$localrealm = $netbiosname if $server_role eq member server;
+   my $localbasedn = $basedn;
+   $localbasedn = DC=$netbiosname if $server_role eq member server;
 
open(CONFFILE, $conffile);
print CONFFILE 
@@ -400,7 +402,7 @@
push (@provision_options, --krbtgtpass=krbtgt$password);
push (@provision_options, --machinepass=machine$password);
push (@provision_options, --root=$root);
-   push (@provision_options, --simple-bind-dn=cn=Manager,$basedn);
+   push (@provision_options, --simple-bind-dn=cn=Manager,$localbasedn);
push (@provision_options, --password=$password);
push (@provision_options, --root=$root);
 
@@ -430,7 +432,7 @@
if (defined($self-{ldap})) {
 
 push (@provision_options, --ldap-backend=$ldap_uri);
-   system($self-{bindir}/smbscript 
$self-{setupdir}/provision-backend $configuration 
--ldap-manager-pass=$password --root=$root --realm=$dnsname 
--host-name=$netbiosname --ldap-backend-type=$self-{ldap}2) == 0 or 
die(backend provision failed);
+   system($self-{bindir}/smbscript 
$self-{setupdir}/provision-backend $configuration 
--ldap-manager-pass=$password --root=$root --realm=$localrealm 
--host-name=$netbiosname --ldap-backend-type=$self-{ldap}2) == 0 or 
die(backend provision failed);
 
if ($self-{ldap} eq openldap) {
   ($ret-{SLAPD_CONF}, $ret-{OPENLDAP_PIDFILE}) = 
$self-mk_openldap($ldapdir, $configuration) or die(Unable to create openldap 
directories);

Added: branches/SAMBA_4_0/source/setup/provision_self_join.ldif
===
--- branches/SAMBA_4_0/source/setup/provision_self_join.ldif2007-07-05 
03:30:46 UTC (rev 23719)
+++ branches/SAMBA_4_0/source/setup/provision_self_join.ldif2007-07-05 
06:15:40 UTC (rev 23720)
@@ -0,0 +1,23 @@
+#Join the DC to itself by default
+
+dn: CN=${NETBIOSNAME},CN=Domain Controllers,${DOMAINDN}
+objectClass: computer
+cn: ${NETBIOSNAME}
+userAccountControl: 532480
+localPolicyFlags: 0
+primaryGroupID: 516
+accountExpires: 9223372036854775807
+sAMAccountName: ${NETBIOSNAME}$
+sAMAccountType: 805306369
+operatingSystem: Samba
+operatingSystemVersion: 4.0
+dNSHostName: ${DNSNAME}
+isCriticalSystemObject: TRUE
+sambaPassword: ${MACHINEPASS}
+servicePrincipalName: HOST/${DNSNAME}
+servicePrincipalName: HOST/${NETBIOSNAME}
+servicePrincipalName: HOST/${DNSNAME}/${REALM}
+servicePrincipalName: HOST/${NETBIOSNAME}/${REALM}
+servicePrincipalName: 

svn commit: samba r23721 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark: .

2007-07-05 Thread sahlberg
Author: sahlberg
Date: 2007-07-05 07:19:14 + (Thu, 05 Jul 2007)
New Revision: 23721

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

Log:
For unions, The TAG and the ARM are aligned independently.

Move emitting ALIGN_TO_x_BYTES to after the tag has been dissected so the 
alignment only affects the ARM.



Modified:
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm


Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
===
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm  
2007-07-05 06:15:40 UTC (rev 23720)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm  
2007-07-05 07:19:14 UTC (rev 23721)
@@ -614,12 +614,6 @@
$self-pidl_code($switch_type level;);
$self-pidl_code();
 
-   if ($e-{ALIGN}  1) {
-   $self-pidl_code(ALIGN_TO_$e-{ALIGN}_BYTES;);
-   }
-
-   $self-pidl_code();
-
$self-pidl_code(old_offset = offset;);
$self-pidl_code(if (parent_tree) {);
$self-indent;
@@ -632,6 +626,12 @@
 
$self-pidl_code(offset = $switch_dissect(tvb, offset, pinfo, tree, 
drep, hf_index, level););
 
+   if ($e-{ALIGN}  1) {
+   $self-pidl_code(ALIGN_TO_$e-{ALIGN}_BYTES;);
+   $self-pidl_code();
+   }
+
+
$self-pidl_code(switch(level) {$res\t});
$self-pidl_code(proto_item_set_len(item, offset-old_offset);\n);
$self-pidl_code(return offset;);



svn commit: samba r23722 - in branches: SAMBA_3_0/source/modules SAMBA_3_0_26/source/modules

2007-07-05 Thread vlendec
Author: vlendec
Date: 2007-07-05 10:32:51 + (Thu, 05 Jul 2007)
New Revision: 23722

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

Log:
Fix the build of the catia module
Modified:
   branches/SAMBA_3_0/source/modules/vfs_catia.c
   branches/SAMBA_3_0_26/source/modules/vfs_catia.c


Changeset:
Modified: branches/SAMBA_3_0/source/modules/vfs_catia.c
===
--- branches/SAMBA_3_0/source/modules/vfs_catia.c   2007-07-05 07:19:14 UTC 
(rev 23721)
+++ branches/SAMBA_3_0/source/modules/vfs_catia.c   2007-07-05 10:32:51 UTC 
(rev 23722)
@@ -232,7 +232,7 @@
 
 static size_t catia_get_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
   const char *name, uint32 security_info,
-  struct  security_descriptor_info **ppdesc)
+  struct  security_descriptor **ppdesc)
 {
 return SMB_VFS_NEXT_GET_NT_ACL(handle, fsp, name, security_info,
   ppdesc);
@@ -240,7 +240,7 @@
 
 static NTSTATUS catia_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp, 
 const char *name, uint32 security_info_sent,
-struct security_descriptor_info *psd)
+struct security_descriptor *psd)
 {
 return SMB_VFS_NEXT_SET_NT_ACL(handle, fsp, name, security_info_sent,
   psd);

Modified: branches/SAMBA_3_0_26/source/modules/vfs_catia.c
===
--- branches/SAMBA_3_0_26/source/modules/vfs_catia.c2007-07-05 07:19:14 UTC 
(rev 23721)
+++ branches/SAMBA_3_0_26/source/modules/vfs_catia.c2007-07-05 10:32:51 UTC 
(rev 23722)
@@ -232,7 +232,7 @@
 
 static size_t catia_get_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
   const char *name, uint32 security_info,
-  struct  security_descriptor_info **ppdesc)
+  struct  security_descriptor **ppdesc)
 {
 return SMB_VFS_NEXT_GET_NT_ACL(handle, fsp, name, security_info,
   ppdesc);
@@ -240,7 +240,7 @@
 
 static NTSTATUS catia_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp, 
 const char *name, uint32 security_info_sent,
-struct security_descriptor_info *psd)
+struct security_descriptor *psd)
 {
 return SMB_VFS_NEXT_SET_NT_ACL(handle, fsp, name, security_info_sent,
   psd);



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

2007-07-05 Thread Stefan (metze) Metzmacher
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[EMAIL PROTECTED] schrieb:
 Author: abartlet
 Date: 2007-07-05 03:06:59 + (Thu, 05 Jul 2007)
 New Revision: 23718
 
 WebSVN: 
 http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23718
 
 Log:
 Make Samba4 work against the LDAP backend again. 
 
 When we set up the schema, we don't have a partitions container yet.
 The LDAP error differs from that given by LDB, so I think we still
 have some conformance work to do.

yes, the problem is that ldb_tdb returns just 0 search results, but
success when the basedn isn't present. And it realy should return
LDB_ERR_NO_SUCH_OBJECT in this case, but we have too many code not
checking for LDB_ERR_NO_SUCH_OBJECT, so that we would break a lot
if we would let ldb_tdb return LDB_ERR_NO_SUCH_OBJECT.

metze
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFGjJedm70gjA5TCD8RAvtzAKCCgnVcVwcFP3V1pz+wjU2bINpinQCfbEsR
3KRfSGvVt6vZLGomR1TCy3E=
=F/Na
-END PGP SIGNATURE-



svn commit: samba r23723 - in branches: SAMBA_3_0/source/libsmb SAMBA_3_0_26/source/libsmb

2007-07-05 Thread idra
Author: idra
Date: 2007-07-05 13:46:47 + (Thu, 05 Jul 2007)
New Revision: 23723

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

Log:

Alexander Larsson pointed me at a missing mapping in clierror.c
When renaming a file across 2 filesystem a samba server returns
NT_STATUS_NOT_SAME_DEVICE but thius is not translated to EXDEV,
and the generic EINVAL is returned instead.
This should fix it, Jeremy or Derrel please check if this is ok.


Modified:
   branches/SAMBA_3_0/source/libsmb/clierror.c
   branches/SAMBA_3_0_26/source/libsmb/clierror.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/clierror.c
===
--- branches/SAMBA_3_0/source/libsmb/clierror.c 2007-07-05 10:32:51 UTC (rev 
23722)
+++ branches/SAMBA_3_0/source/libsmb/clierror.c 2007-07-05 13:46:47 UTC (rev 
23723)
@@ -336,7 +336,9 @@
 #ifdef ECOMM
{NT_STATUS_NET_WRITE_FAULT, ECOMM},
 #endif
-
+#ifdef EXDEV
+   {NT_STATUS_NOT_SAME_DEVICE, EXDEV},
+#endif
{NT_STATUS(0), 0}
 };
 

Modified: branches/SAMBA_3_0_26/source/libsmb/clierror.c
===
--- branches/SAMBA_3_0_26/source/libsmb/clierror.c  2007-07-05 10:32:51 UTC 
(rev 23722)
+++ branches/SAMBA_3_0_26/source/libsmb/clierror.c  2007-07-05 13:46:47 UTC 
(rev 23723)
@@ -331,7 +331,9 @@
 #ifdef ECOMM
{NT_STATUS_NET_WRITE_FAULT, ECOMM},
 #endif
-
+#ifdef EXDEV
+   {NT_STATUS_NOT_SAME_DEVICE, EXDEV},
+#endif
{NT_STATUS(0), 0}
 };
 



svn commit: samba r23724 - in branches/SAMBA_3_0/source: include printing rpc_server smbd

2007-07-05 Thread vlendec
Author: vlendec
Date: 2007-07-05 16:26:27 + (Thu, 05 Jul 2007)
New Revision: 23724

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

Log:
Reduce access to the global inbuf a tiny bit. Add a struct smb_request
that contains some of the fields from the SMB header, removing the need
to access inbuf directly. This right now is used only in the open file
code  friends, and creating that header is only done when needed. This
needs more work, but it is a start.

Jeremy, I'm only checking this into 3_0, please review before I merge it
to _26.

Volker


Modified:
   branches/SAMBA_3_0/source/include/smb.h
   branches/SAMBA_3_0/source/printing/nt_printing.c
   branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c
   branches/SAMBA_3_0/source/smbd/dir.c
   branches/SAMBA_3_0/source/smbd/nttrans.c
   branches/SAMBA_3_0/source/smbd/open.c
   branches/SAMBA_3_0/source/smbd/posix_acls.c
   branches/SAMBA_3_0/source/smbd/process.c
   branches/SAMBA_3_0/source/smbd/reply.c
   branches/SAMBA_3_0/source/smbd/trans2.c


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


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

2007-07-05 Thread vlendec
Author: vlendec
Date: 2007-07-05 16:27:47 + (Thu, 05 Jul 2007)
New Revision: 23725

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

Log:
Remove get_current_mid()

Jeremy, next one to review :-)


Modified:
   branches/SAMBA_3_0/source/smbd/open.c
   branches/SAMBA_3_0/source/smbd/process.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/open.c
===
--- branches/SAMBA_3_0/source/smbd/open.c   2007-07-05 16:26:27 UTC (rev 
23724)
+++ branches/SAMBA_3_0/source/smbd/open.c   2007-07-05 16:27:47 UTC (rev 
23725)
@@ -644,6 +644,7 @@
 
 static BOOL delay_for_oplocks(struct share_mode_lock *lck,
  files_struct *fsp,
+ uint16 mid,
  int pass_number,
  int oplock_request)
 {
@@ -728,7 +729,7 @@
 
DEBUG(10, (Sending break request to PID %s\n,
   procid_str_static(exclusive-pid)));
-   exclusive-op_mid = get_current_mid();
+   exclusive-op_mid = mid;
 
/* Create the message. */
share_mode_entry_to_message(msg, exclusive);
@@ -768,9 +769,9 @@
 static void defer_open(struct share_mode_lock *lck,
   struct timeval request_time,
   struct timeval timeout,
+  uint16 mid,
   struct deferred_open_record *state)
 {
-   uint16 mid = get_current_mid();
int i;
 
/* Paranoia check */
@@ -1065,7 +1066,9 @@
 
 }
 
-static void schedule_defer_open(struct share_mode_lock *lck, struct timeval 
request_time)
+static void schedule_defer_open(struct share_mode_lock *lck,
+   struct timeval request_time,
+   uint16 mid)
 {
struct deferred_open_record state;
 
@@ -1096,7 +1099,7 @@
state.id = lck-id;
 
if (!request_timed_out(request_time, timeout)) {
-   defer_open(lck, request_time, timeout, state);
+   defer_open(lck, request_time, timeout, mid, state);
}
 }
 
@@ -1443,8 +1446,10 @@
}
 
/* First pass - send break only on batch oplocks. */
-   if (delay_for_oplocks(lck, fsp, 1, oplock_request)) {
-   schedule_defer_open(lck, request_time);
+   if ((req != NULL)
+delay_for_oplocks(lck, fsp, req-mid, 1,
+oplock_request)) {
+   schedule_defer_open(lck, request_time, req-mid);
TALLOC_FREE(lck);
file_free(fsp);
return NT_STATUS_SHARING_VIOLATION;
@@ -1461,8 +1466,11 @@
 * status again. */
/* Second pass - send break for both batch or
 * exclusive oplocks. */
-   if (delay_for_oplocks(lck, fsp, 2, oplock_request)) {
-   schedule_defer_open(lck, request_time);
+   if ((req != NULL)
+ delay_for_oplocks(lck, fsp, req-mid, 2,
+ oplock_request)) {
+   schedule_defer_open(lck, request_time,
+   req-mid);
TALLOC_FREE(lck);
file_free(fsp);
return NT_STATUS_SHARING_VIOLATION;
@@ -1576,10 +1584,11 @@
state.delayed_for_oplocks = False;
state.id = id;
 
-   if (!request_timed_out(request_time,
-  timeout)) {
+   if ((req != NULL)
+!request_timed_out(request_time,
+ timeout)) {
defer_open(lck, request_time, timeout,
-  state);
+  req-mid, state);
}
}
 
@@ -1667,8 +1676,10 @@
}
 
/* First pass - send break only on batch oplocks. */
-   if (delay_for_oplocks(lck, fsp, 1, oplock_request)) {
-   schedule_defer_open(lck, request_time);
+   if ((req != NULL)
+delay_for_oplocks(lck, fsp, req-mid, 1,
+oplock_request)) {
+   schedule_defer_open(lck, request_time, req-mid);
TALLOC_FREE(lck);
fd_close(conn, fsp);
file_free(fsp);
@@ -1684,8 +1695,11 @@
 * status again. */
 

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

2007-07-05 Thread simo
On Thu, 2007-07-05 at 09:02 +0200, Stefan (metze) Metzmacher wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 [EMAIL PROTECTED] schrieb:
  Author: abartlet
  Date: 2007-07-05 03:06:59 + (Thu, 05 Jul 2007)
  New Revision: 23718
  
  WebSVN: 
  http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23718
  
  Log:
  Make Samba4 work against the LDAP backend again. 
  
  When we set up the schema, we don't have a partitions container yet.
  The LDAP error differs from that given by LDB, so I think we still
  have some conformance work to do.
 
 yes, the problem is that ldb_tdb returns just 0 search results, but
 success when the basedn isn't present. And it realy should return
 LDB_ERR_NO_SUCH_OBJECT in this case, but we have too many code not
 checking for LDB_ERR_NO_SUCH_OBJECT, so that we would break a lot
 if we would let ldb_tdb return LDB_ERR_NO_SUCH_OBJECT.

I think it is reasonable to change tdb to throw an error if the base
does not exists.
We need to deal with LDB_ERR_NO_SUCH_OBJECT as ldap backends can happily
return that. I will look into this as soon as I can carve some time for
it.

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer
email: [EMAIL PROTECTED]
http://samba.org



Re: svn commit: samba r23724 - in branches/SAMBA_3_0/source: include printing rpc_server smbd

2007-07-05 Thread Jeremy Allison
On Thu, Jul 05, 2007 at 04:26:29PM +, [EMAIL PROTECTED] wrote:
 Jeremy, I'm only checking this into 3_0, please review before I merge it
 to _26.

Not a good day for reviews today I'm afraid. This might have
to wait until the weekend, sorry.

Jeremy.


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

2007-07-05 Thread vlendec
Author: vlendec
Date: 2007-07-05 16:36:15 + (Thu, 05 Jul 2007)
New Revision: 23727

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

Log:
Explicitly pass down FLAGS2 to srvstr_get_path.

Next step is to remove the bug that in the trans2 code we use the inbuf
as the base pointer to decide whether we need ucs2 alignment where we
need to use the beginning of the params buffer

Jeremy, last one for today to reviw :-)


Modified:
   branches/SAMBA_3_0/source/smbd/nttrans.c
   branches/SAMBA_3_0/source/smbd/reply.c
   branches/SAMBA_3_0/source/smbd/trans2.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/nttrans.c
===
--- branches/SAMBA_3_0/source/smbd/nttrans.c2007-07-05 16:33:37 UTC (rev 
23726)
+++ branches/SAMBA_3_0/source/smbd/nttrans.c2007-07-05 16:36:15 UTC (rev 
23727)
@@ -562,7 +562,9 @@
 
if(!dir_fsp-is_directory) {
 
-   srvstr_get_path(inbuf, fname, smb_buf(inbuf), 
sizeof(fname), 0, STR_TERMINATE, status);
+   srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), fname,
+   smb_buf(inbuf), sizeof(fname), 0,
+   STR_TERMINATE, status);
if (!NT_STATUS_IS_OK(status)) {
END_PROFILE(SMBntcreateX);
return ERROR_NT(status);
@@ -604,14 +606,18 @@
dir_name_len++;
}
 
-   srvstr_get_path(inbuf, rel_fname, smb_buf(inbuf), 
sizeof(rel_fname), 0, STR_TERMINATE, status);
+   srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), rel_fname,
+   smb_buf(inbuf), sizeof(rel_fname), 0,
+   STR_TERMINATE, status);
if (!NT_STATUS_IS_OK(status)) {
END_PROFILE(SMBntcreateX);
return ERROR_NT(status);
}
pstrcat(fname, rel_fname);
} else {
-   srvstr_get_path(inbuf, fname, smb_buf(inbuf), sizeof(fname), 0, 
STR_TERMINATE, status);
+   srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), fname,
+   smb_buf(inbuf), sizeof(fname), 0,
+   STR_TERMINATE, status);
if (!NT_STATUS_IS_OK(status)) {
END_PROFILE(SMBntcreateX);
return ERROR_NT(status);
@@ -1011,7 +1017,9 @@
 
flags = IVAL(params,0);
 
-   srvstr_get_path(inbuf, fname, params+53, sizeof(fname), 
parameter_count-53, STR_TERMINATE, status);
+   srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), fname, params+53,
+   sizeof(fname), parameter_count-53, STR_TERMINATE,
+   status);
if (!NT_STATUS_IS_OK(status)) {
return ERROR_NT(status);
}
@@ -1288,7 +1296,10 @@
}
 
if(!dir_fsp-is_directory) {
-   srvstr_get_path(inbuf, fname, params+53, sizeof(fname), 
parameter_count-53, STR_TERMINATE, status);
+   srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), fname,
+   params+53, sizeof(fname),
+   parameter_count-53, STR_TERMINATE,
+   status);
if (!NT_STATUS_IS_OK(status)) {
return ERROR_NT(status);
}
@@ -1322,14 +1333,19 @@
 
{
pstring tmpname;
-   srvstr_get_path(inbuf, tmpname, params+53, 
sizeof(tmpname), parameter_count-53, STR_TERMINATE, status);
+   srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), tmpname,
+   params+53, sizeof(tmpname),
+   parameter_count-53, STR_TERMINATE,
+   status);
if (!NT_STATUS_IS_OK(status)) {
return ERROR_NT(status);
}
pstrcat(fname, tmpname);
}
} else {
-   srvstr_get_path(inbuf, fname, params+53, sizeof(fname), 
parameter_count-53, STR_TERMINATE, status);
+   srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), fname, params+53,
+   sizeof(fname), parameter_count-53,
+   STR_TERMINATE, status);
if (!NT_STATUS_IS_OK(status)) {
return ERROR_NT(status);
}
@@ -1842,7 +1858,9 @@
init_smb_request(req, (uint8 *)inbuf);
 
p = smb_buf(inbuf) + 1;
-   p += srvstr_get_path_wcard(inbuf, oldname, p, sizeof(oldname), 0, 
STR_TERMINATE, status, src_has_wcard);
+   p += srvstr_get_path_wcard(inbuf, 

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

2007-07-05 Thread vlendec
Author: vlendec
Date: 2007-07-05 16:33:37 + (Thu, 05 Jul 2007)
New Revision: 23726

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

Log:
Explicitly pass down the FLAGS2 field to srvstr_pull_buf. The next
checkin will pull this up to srvstr_get_path. At that point we can get more
independent of the inbuf, the base_ptr in pull_string will only be used
to satisfy UCS2 alignment constraints.


Modified:
   branches/SAMBA_3_0/source/include/safe_string.h
   branches/SAMBA_3_0/source/include/srvstr.h
   branches/SAMBA_3_0/source/lib/charcnv.c
   branches/SAMBA_3_0/source/libsmb/clistr.c
   branches/SAMBA_3_0/source/libsmb/ntlmssp_parse.c
   branches/SAMBA_3_0/source/libsmb/smbencrypt.c
   branches/SAMBA_3_0/source/smbd/ipc.c
   branches/SAMBA_3_0/source/smbd/message.c
   branches/SAMBA_3_0/source/smbd/nttrans.c
   branches/SAMBA_3_0/source/smbd/pipes.c
   branches/SAMBA_3_0/source/smbd/reply.c
   branches/SAMBA_3_0/source/smbd/sesssetup.c
   branches/SAMBA_3_0/source/smbd/trans2.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/safe_string.h
===
--- branches/SAMBA_3_0/source/include/safe_string.h 2007-07-05 16:27:47 UTC 
(rev 23725)
+++ branches/SAMBA_3_0/source/include/safe_string.h 2007-07-05 16:33:37 UTC 
(rev 23726)
@@ -164,7 +164,7 @@
 #define safe_strcpy(dest,src,maxlength)
safe_strcpy_fn2(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE,dest,src,maxlength)
 #define safe_strcat(dest,src,maxlength)
safe_strcat_fn2(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE,dest,src,maxlength)
 #define push_string(base_ptr, dest, src, dest_len, flags) 
push_string_fn2(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE, base_ptr, dest, 
src, dest_len, flags)
-#define pull_string(base_ptr, dest, src, dest_len, src_len, flags) 
pull_string_fn2(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE, base_ptr, dest, 
src, dest_len, src_len, flags)
+#define pull_string(base_ptr, smb_flags2, dest, src, dest_len, src_len, flags) 
pull_string_fn2(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE, base_ptr, 
smb_flags2, dest, src, dest_len, src_len, flags)
 #define clistr_push(cli, dest, src, dest_len, flags) 
clistr_push_fn2(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE, cli, dest, src, 
dest_len, flags)
 #define clistr_pull(cli, dest, src, dest_len, src_len, flags) 
clistr_pull_fn2(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE, cli, dest, src, 
dest_len, src_len, flags)
 #define srvstr_push(base_ptr, dest, src, dest_len, flags) 
srvstr_push_fn2(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE, base_ptr, dest, 
src, dest_len, flags)
@@ -193,10 +193,10 @@
 ? __unsafe_string_function_usage_here_size_t__() \
 : push_string_fn(fn_name, fn_line, base_ptr, dest, src, dest_len, flags))
 
-#define pull_string_fn2(fn_name, fn_line, base_ptr, dest, src, dest_len, 
src_len, flags) \
+#define pull_string_fn2(fn_name, fn_line, base_ptr, smb_flags2, dest, src, 
dest_len, src_len, flags) \
 (CHECK_STRING_SIZE(dest, dest_len) \
 ? __unsafe_string_function_usage_here_size_t__() \
-: pull_string_fn(fn_name, fn_line, base_ptr, dest, src, dest_len, src_len, 
flags))
+: pull_string_fn(fn_name, fn_line, base_ptr, smb_flags2, dest, src, 
dest_len, src_len, flags))
 
 #define clistr_push_fn2(fn_name, fn_line, cli, dest, src, dest_len, flags) \
 (CHECK_STRING_SIZE(dest, dest_len) \

Modified: branches/SAMBA_3_0/source/include/srvstr.h
===
--- branches/SAMBA_3_0/source/include/srvstr.h  2007-07-05 16:27:47 UTC (rev 
23725)
+++ branches/SAMBA_3_0/source/include/srvstr.h  2007-07-05 16:33:37 UTC (rev 
23726)
@@ -18,14 +18,14 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#define srvstr_pull(base_ptr, dest, src, dest_len, src_len, flags) \
-pull_string(base_ptr, dest, src, dest_len, src_len, flags)
+#define srvstr_pull(base_ptr, smb_flags2, dest, src, dest_len, src_len, flags) 
\
+pull_string(base_ptr, smb_flags2, dest, src, dest_len, src_len, flags)
 
 /* pull a string from the smb_buf part of a packet. In this case the
string can either be null terminated or it can be terminated by the
end of the smbbuf area 
 */
 
-#define srvstr_pull_buf(inbuf, dest, src, dest_len, flags) \
-pull_string(inbuf, dest, src, dest_len, smb_bufrem(inbuf, src), flags)
+#define srvstr_pull_buf(inbuf, smb_flags2, dest, src, dest_len, flags) \
+pull_string(inbuf, smb_flags2, dest, src, dest_len, smb_bufrem(inbuf, 
src), flags)
 

Modified: branches/SAMBA_3_0/source/lib/charcnv.c
===
--- branches/SAMBA_3_0/source/lib/charcnv.c 2007-07-05 16:27:47 UTC (rev 
23725)
+++ branches/SAMBA_3_0/source/lib/charcnv.c 2007-07-05 16:33:37 UTC (rev 
23726)
@@ -1376,16 +1376,24 @@
  The resulting string in dest is always null terminated.
 **/
 
-size_t pull_string_fn(const char *function, 

svn commit: samba r23728 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_25/source/smbd SAMBA_3_0_26/source/smbd

2007-07-05 Thread jra
Author: jra
Date: 2007-07-05 18:28:18 + (Thu, 05 Jul 2007)
New Revision: 23728

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

Log:
First part of bugfix for #4763. Limit notify responses
to client max buf size.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/notify.c
   branches/SAMBA_3_0_25/source/smbd/notify.c
   branches/SAMBA_3_0_26/source/smbd/notify.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/notify.c
===
--- branches/SAMBA_3_0/source/smbd/notify.c 2007-07-05 16:36:15 UTC (rev 
23727)
+++ branches/SAMBA_3_0/source/smbd/notify.c 2007-07-05 18:28:18 UTC (rev 
23728)
@@ -22,6 +22,9 @@
 
 #include includes.h
 
+/* Max size we can send to client in a notify response. */
+extern int max_send;
+
 struct notify_change_request {
struct notify_change_request *prev, *next;
struct files_struct *fsp;   /* backpointer for cancel by mid */
@@ -147,6 +150,15 @@
 
buflen = smb_size+38+prs_offset(ps) + 4 /* padding */;
 
+   if (buflen  max_send) {
+   /*
+* We exceed what the client is willing to accept. Send
+* nothing.
+*/
+   change_notify_reply_packet(request_buf, NT_STATUS_OK);
+   goto done;
+   }
+
if (!(outbuf = SMB_MALLOC_ARRAY(char, buflen))) {
change_notify_reply_packet(request_buf, NT_STATUS_NO_MEMORY);
goto done;

Modified: branches/SAMBA_3_0_25/source/smbd/notify.c
===
--- branches/SAMBA_3_0_25/source/smbd/notify.c  2007-07-05 16:36:15 UTC (rev 
23727)
+++ branches/SAMBA_3_0_25/source/smbd/notify.c  2007-07-05 18:28:18 UTC (rev 
23728)
@@ -22,6 +22,9 @@
 
 #include includes.h
 
+/* Max size we can send to client in a notify response. */
+extern int max_send;
+
 struct notify_change_request {
struct notify_change_request *prev, *next;
struct files_struct *fsp;   /* backpointer for cancel by mid */
@@ -146,6 +149,15 @@
 
buflen = smb_size+38+prs_offset(ps) + 4 /* padding */;
 
+   if (buflen  max_send) {
+   /*
+* We exceed what the client is willing to accept. Send
+* nothing.
+*/
+   change_notify_reply_packet(request_buf, NT_STATUS_OK);
+   goto done;
+   }
+
if (!(outbuf = SMB_MALLOC_ARRAY(char, buflen))) {
change_notify_reply_packet(request_buf, NT_STATUS_NO_MEMORY);
goto done;

Modified: branches/SAMBA_3_0_26/source/smbd/notify.c
===
--- branches/SAMBA_3_0_26/source/smbd/notify.c  2007-07-05 16:36:15 UTC (rev 
23727)
+++ branches/SAMBA_3_0_26/source/smbd/notify.c  2007-07-05 18:28:18 UTC (rev 
23728)
@@ -22,6 +22,9 @@
 
 #include includes.h
 
+/* Max size we can send to client in a notify response. */
+extern int max_send;
+
 struct notify_change_request {
struct notify_change_request *prev, *next;
struct files_struct *fsp;   /* backpointer for cancel by mid */
@@ -146,6 +149,15 @@
 
buflen = smb_size+38+prs_offset(ps) + 4 /* padding */;
 
+   if (buflen  max_send) {
+   /*
+* We exceed what the client is willing to accept. Send
+* nothing.
+*/
+   change_notify_reply_packet(request_buf, NT_STATUS_OK);
+   goto done;
+   }
+
if (!(outbuf = SMB_MALLOC_ARRAY(char, buflen))) {
change_notify_reply_packet(request_buf, NT_STATUS_NO_MEMORY);
goto done;



svn commit: samba r23729 - in branches/SAMBA_3_0_26/source/nsswitch: .

2007-07-05 Thread jerry
Author: jerry
Date: 2007-07-05 19:55:25 + (Thu, 05 Jul 2007)
New Revision: 23729

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

Log:
Squashed commit of the following:

commit 3941269fa01038fca242a197e8d7c1f234d45ea7
Author: Gerald (Jerry) Carter [EMAIL PROTECTED]
Date:   Thu Jul 5 14:52:03 2007 -0500

Two fixes for winbind expand groups.

(a) Update the counter for the number of new groups to resolve else
we'll only expand one group member per level and drop the rest.
(b) Don't reset the num_names counter in winbindd_ads.c:lookup_groupmem()
or we'll drop the SIDs resolved to names via cache from the resulting
list.

Modified:
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_ads.c
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_group.c


Changeset:
Modified: branches/SAMBA_3_0_26/source/nsswitch/winbindd_ads.c
===
--- branches/SAMBA_3_0_26/source/nsswitch/winbindd_ads.c2007-07-05 
18:28:18 UTC (rev 23728)
+++ branches/SAMBA_3_0_26/source/nsswitch/winbindd_ads.c2007-07-05 
19:55:25 UTC (rev 23729)
@@ -1017,7 +1017,11 @@
DEBUG(10,(ads: lookup_groupmem: got sid %s from 
cache\n,
 sid_string_static(sid)));
sid_copy((*sid_mem)[*num_names], sid);
-   (*names)[*num_names] = CONST_DISCARD(char *,name);
+   (*names)[*num_names] = talloc_asprintf(*names, %s%c%s,
+  domain_name,
+  
*lp_winbind_separator(),
+  name );
+
(*name_types)[*num_names] = name_type;
(*num_names)++;
}
@@ -1055,7 +1059,6 @@
/* Copy the entries over from the _nocache arrays 
 * to the result arrays, skipping the gaps the 
 * lookup_sids call left. */
-   *num_names = 0;
for (i=0; i  num_nocache; i++) {
if (((names_nocache)[i] != NULL)  
((name_types_nocache)[i] != 
SID_NAME_UNKNOWN)) 

Modified: branches/SAMBA_3_0_26/source/nsswitch/winbindd_group.c
===
--- branches/SAMBA_3_0_26/source/nsswitch/winbindd_group.c  2007-07-05 
18:28:18 UTC (rev 23728)
+++ branches/SAMBA_3_0_26/source/nsswitch/winbindd_group.c  2007-07-05 
19:55:25 UTC (rev 23729)
@@ -576,6 +576,7 @@
/* One more round */
TALLOC_FREE(glist);
glist = new_glist;
+   n_glist = n_new_glist;
}
TALLOC_FREE( glist );   
 



svn commit: samba r23730 - in branches/SAMBA_3_0/source/nsswitch: .

2007-07-05 Thread jerry
Author: jerry
Date: 2007-07-05 19:55:40 + (Thu, 05 Jul 2007)
New Revision: 23730

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

Log:
Squashed commit of the following:

commit 3941269fa01038fca242a197e8d7c1f234d45ea7
Author: Gerald (Jerry) Carter [EMAIL PROTECTED]
Date:   Thu Jul 5 14:52:03 2007 -0500

Two fixes for winbind expand groups.

(a) Update the counter for the number of new groups to resolve else
we'll only expand one group member per level and drop the rest.
(b) Don't reset the num_names counter in winbindd_ads.c:lookup_groupmem()
or we'll drop the SIDs resolved to names via cache from the resulting
list.

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_group.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c   2007-07-05 19:55:25 UTC 
(rev 23729)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c   2007-07-05 19:55:40 UTC 
(rev 23730)
@@ -1017,7 +1017,11 @@
DEBUG(10,(ads: lookup_groupmem: got sid %s from 
cache\n,
 sid_string_static(sid)));
sid_copy((*sid_mem)[*num_names], sid);
-   (*names)[*num_names] = CONST_DISCARD(char *,name);
+   (*names)[*num_names] = talloc_asprintf(*names, %s%c%s,
+  domain_name,
+  
*lp_winbind_separator(),
+  name );
+
(*name_types)[*num_names] = name_type;
(*num_names)++;
}
@@ -1055,7 +1059,6 @@
/* Copy the entries over from the _nocache arrays 
 * to the result arrays, skipping the gaps the 
 * lookup_sids call left. */
-   *num_names = 0;
for (i=0; i  num_nocache; i++) {
if (((names_nocache)[i] != NULL)  
((name_types_nocache)[i] != 
SID_NAME_UNKNOWN)) 

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_group.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_group.c 2007-07-05 19:55:25 UTC 
(rev 23729)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_group.c 2007-07-05 19:55:40 UTC 
(rev 23730)
@@ -576,6 +576,7 @@
/* One more round */
TALLOC_FREE(glist);
glist = new_glist;
+   n_glist = n_new_glist;
}
TALLOC_FREE( glist );   
 



Build status as of Fri Jul 6 00:00:03 2007

2007-07-05 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2007-07-05 
00:00:30.0 +
+++ /home/build/master/cache/broken_results.txt 2007-07-06 00:01:12.0 
+
@@ -1,4 +1,4 @@
-Build status as of Thu Jul  5 00:00:01 2007
+Build status as of Fri Jul  6 00:00:03 2007
 
 Build counts:
 Tree Total  Broken Panic 
@@ -7,18 +7,18 @@
 ccache   35 8  0 
 ctdb 0  0  0 
 distcc   2  0  0 
-ldb  34 3  0 
+ldb  33 3  0 
 libreplace   33 10 0 
 lorikeet-heimdal 30 13 0 
 pidl 18 4  0 
 ppp  15 10 0 
 python   0  0  0 
-rsync34 12 0 
+rsync35 12 0 
 samba0  0  0 
 samba-docs   0  0  0 
 samba-gtk4  4  0 
-samba4   32 21 8 
-samba_3_035 18 0 
+samba4   32 22 9 
+samba_3_035 19 0 
 smb-build32 32 0 
 talloc   35 8  0 
 tdb  34 1  0