[Samba] How to copy a file from linux to window pc

2006-10-02 Thread Indunil Jayasooriya

Hi,

I have file at /opt/mailbackup/mailbackup.tar.gz (this is a Linux Machine)

I want to put this file to a windows pc.

What is the command to do it.

can I use something like the following.

mount -t smbfs

Then How to use this ?

--
Thank you
Indunil Jayasooriya
--
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 copy a file from linux to window pc

2006-10-02 Thread odi
The simliest way is to do this with smbclient, which is like a simple ftp 
client, type smbclient --help for command line options.

regards odi
Am Montag, 2. Oktober 2006 08:56 schrieb Indunil Jayasooriya:
 Hi,

 I have file at /opt/mailbackup/mailbackup.tar.gz (this is a Linux Machine)

 I want to put this file to a windows pc.

 What is the command to do it.

 can I use something like the following.

 mount -t smbfs

 Then How to use this ?

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


[Samba] Horrible write performance from XP to Samba

2006-10-02 Thread Peter Daum
I noted an extremely poor performance when copying big files from
a windows xp client to a samba share. The exact version of samba
does not seem to matter: I tried several different samba servers
with versions between 3.014 and 3.0.23b running on Linux 2.4.32
and 2.6.17 (machines and network otherwise idle, clients connected
via fast ethernet, servers via Gbit; network performance in both
directions around 95 Mbit/s). I made several tests copying a 1GB
file with Windows 98 and Windows XP clients. Reading the file from
the server takes predictably around 105 seconds (~9.75 MB/s).

Writing to the server takes only slightly longer on Win98 (130
seconds, ~8 MB/s) while the same takes approximately 45 minutes
from a XP client (I don't know whether this matters, I noted that
on the XP write test, the directory listing on the server
immediately shows a file with the final size - obviously a sparse
file, repeatedly invoking du shows the gradually increasing actual
size).

I wrote a little test program that just writes data to a file and
shows the throughput; the transfer rates I get that way are pretty
reasonable, so it is not a general problem but something that only
occurs on specific operations like copying.

Tracing the network traffic also didn't tell me what the problem
might be: XP uses for copying as well as for other write
operations WriteAndXRequest, the only peculiarity I noticed is the
slightly exotic block size of 61440 bytes per request when copying
(which also doesn't seem to be the problem - Win98 uses the same
block size with WriteRaw)

Has anybody else made similar experiences? (Since I could see this
issue with differently configured servers/clients, it should not
be just my personal problem. Of course in most settings where the
data usually goes mostly from the server to the client it is not
obvious)

Any ideas what's going on and what to do about it?

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


[Samba] Re: WINS over subnets

2006-10-02 Thread Hoggins!

Edmundo Valle Neto a écrit :

...

Theres some options that I think are not needed in your config, but 
probably doesnt cause that problem that you have, in exeption of this one:


local master = no

Try to set it to yes, I never tried to set it to no and let it be only 
the DMB to see what happens but the samba docs have something to say 
about that, If you want Samba to be a DMB, then it is recommended that 
you also set preferred master to yes, because Samba will not become a 
DMB for the whole of your LAN or WAN IF IT IS NOT ALSO A LMB ON ITS OWN 
BROADCAST ISOLATED SUBNET. Anyway its at least recommended to samba be 
the LMB too.


Well, this option was previously set to yes, and it did not work either. 
Changing this, I thought it would make difficult the election of a LMB 
on other nets, but you say it won't, so I put it back, and maybe the 
other things I changed will cause it to work at last !


Do you have any other ideas about this config ?

Thanks,

Hoggins!

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


[Samba] fully qualified usernames ??

2006-10-02 Thread Robert Gehr

Hi there

Just a couple of questions to help me understand.

When I upgrade from 3.0.22 to 3.0.23c the access restrictions on my
shares on the member server no longer work. I read in the Changes file

Since Samba 3.0.8, it has been recommended that all domain accounts
listed in smb.conf on a member server be fully qualified with the

So far so good I know what I have to do still I don't quite understand
why the member server is no longer able to identify the user connecting.

When, on the member server, I do a wbinfo -U ID I get the correct SID
When I do wbinfo -a joe%passwd it succeeds as well as a
wbinfo -a DOMAIN\\joe%passwd

So winbindd identifies joe all right even without the DOMAIN prefix. Why
does this no longer work for shares on the member server that have

valid users = joe

defined??

The member server gets its local users and groups via ldap.

I also have in my smb.conf:
winbind trusted domains only = Yes


What am I missing??

Thanks


--
Best Regards
Robert Gehr


Technological progress has merely provided us
 with more efficient means for going backwards

~ Aldous Huxley



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


[Samba] Auth Problem

2006-10-02 Thread Marian Neagul
Hello,

 

I have a problem related to user authentication: Users can not login from
Windows workstations.

I get the following error:

The system could not log you in. Make sure your User Name and domain are
correct then type your password again.

 

Users can access shares, they are prompted for a user and password and it is
ok. The same user and password does not work for login.

What could be the problem? I've posted the logs and smb.conf  at
http://www.info.uvt.ro/~neagul/samba/

I want to mention that the server is a production server and was hit by a
hardware failure. :-( I restored everything but it doesn't work.

 

 

Thank you!

 

Marian Neagul

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


[Samba] Re: How to copy a file from linux to window pc

2006-10-02 Thread Gerard Seibert
Indunil Jayasooriya [EMAIL PROTECTED]

 Hi,
 
 I have file at /opt/mailbackup/mailbackup.tar.gz (this is a Linux Machine)
 
 I want to put this file to a windows pc.
 
 What is the command to do it.
 
 can I use something like the following.
 
 mount -t smbfs
 
 Then How to use this ?

I use this method on my FreeBSD 6.1 system.


1) Create a directory: '/c'

2) Create an alias:

 alias c:='mount /c'

3) Place this in my /etc/fstab file:

 //[EMAIL PROTECTED]/directory/c   smbfs rw,noauto 00

Obviously you will need to make sure that the drive or directory you
want to access are configured correctly on the Windows machine.

Now all I have to do is type: c: at the command line and the Win share
is mounted. I can then do a simple cp file Win-file.

Ciao!

-- 
Gerard

 Terrorist memo: Bush is listening. Use big words.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


RE: [Samba] fully qualified usernames ??

2006-10-02 Thread Peter Trifonov
Dear Robert,
 So far so good I know what I have to do still I don't quite 
 understand why the member server is no longer able to 
 identify the user connecting.

 So winbindd identifies joe all right even without the DOMAIN 
 prefix. Why does this no longer work for shares on the member 
 server that have
 The member server gets its local users and groups via ldap.

Do you use groups to identify users which are allowed to read from 
the ***directory*** corresponding to the share in problem?

In other words, what are the permissions for that directory?
I ask this because there is a bug in Samba which causes incorrect handling
of domain groups.


With best regards,
P. Trifonov  


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


Re: [Samba] fully qualified usernames ??

2006-10-02 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Robert Gehr wrote:

 So winbindd identifies joe all right even 
 without the DOMAIN prefix. Why does this
 no longer work for shares on the member server that have

 
 valid users = joe
 
 defined??

please read the WHATSNEW.txt.






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.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFIQWvIR7qMdg1EfYRApMyAKCi+DjZOUlZYE1RBP3OnpRfkZgjzACgh2Cl
qdAHPLbAOCbWEhxfNwCB+Kk=
=Mb+X
-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] How to copy a file from linux to window pc

2006-10-02 Thread Gary Dale

Indunil Jayasooriya wrote:

Hi,

I have file at /opt/mailbackup/mailbackup.tar.gz (this is a Linux 
Machine)


I want to put this file to a windows pc.

What is the command to do it.

can I use something like the following.

mount -t smbfs

Then How to use this ?



There are two basic options: either you can share a folder in Windows 
and copy the file from the Linux machine, or you can share your 
/opt/mailbackup folder in Linux and copy the file from the Windows 
machine. I don't recommend the first option because of security issues 
with Windows.


To do the second, you need to be running Samba on your Linux box.

First create an entry in /etc/samba/smb.conf (do this as root) for the 
folder you want to share. Then restart the smbd and nmbd daemons. On the 
Windows machine, mount the share then copy the file to where you want it.


Another option is to e-mail the file as an attachment to the Windows user.



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


Re: [Samba] winbindd cause system hang

2006-10-02 Thread Superbiji

The workaround is by deleting those problematic users in windows directory
and then add them again

setfacl again to her home


my smb.conf:
password server = 10.x.x.x


On 9/29/06, Felipe Augusto van de Wiel [EMAIL PROTECTED] wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/26/2006 08:53 AM, Superbiji escreveu:
 Hi All,

 my os (Centos 4.3) connects to Windows directory using winbind
 everything works fine:

 ls -alh shows remote username and group
 getent passwd shows remote usernames

 until I run :
 getfacl -R /home/samba
 to backup whole acl

 after 1 minutes the system hang (typing w, ls, top with no response)
 but I can kill winbind and start it again, evrything back to normal

 Please help

Looks like you winbind it not properly configured. Can you
please attach your smb.conf and also information about how did you
setup your nsswitch (libnss)?  Some log with increased loglevel
would be very good.

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


[Samba] Invalid Pipe Handle

2006-10-02 Thread chrissie

Hi,

i am using samba 3 on OpenSUSE10 with about 30 Windows-XP-Client. Aparently,
i find the following in the smb.log-file:

[2006/10/02 14:09:45, 1] smbd/service.c:make_connection_snum(662)
  aaabbb (192.168.0.23) connect to service images initially as user aaabbb
(uid=1020, gid=100) (pid 26187)
[2006/10/02 14:09:56, 1] smbd/ipc.c:api_fd_reply(290)
  api_fd_reply: INVALID PIPE HANDLE: 7799
[2006/10/02 14:11:43, 1] smbd/service.c:make_connection_snum(662)

Is this something critical i should take care of?

TIA,
chrissie.
-- 
ROOT LOGIN REFUSED
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Samba not expanding AD groups

2006-10-02 Thread Jim Millard
I have noticed a problem with Samba not appearing to expand an AD group
name to allow access to a share. We have had to shut down samba
completely, manualy kill all smbd, and winbind apps (nmbd seems to go
away properly). Then restart samba to get access for our users to work.

Sample smb.conf entry:
[global]
  winbind separator = +
  ...

[test]
   path = /test
   public = no
   writable = yes
   printable = no
   valid users = @CC+Domain Users

We currently have Samba versions 3.0.22 and 3.0.23a running on Gentoo
and 3,0,23c running on FC5.

I see this problem on all of these systems.

I have inherited these from another admin and I am not sure the configs
are all that complete or good.

I would appreciate any pointers to information that would help me clean
up this mess. I have already got the servers running faster by changing
the log level down to reduce disk activity. We have also set the
renew_lifetime = 36000 in krb5.conf thinking the old value of 0 was
causing performance issues due to authenticating every access.

Thank you all for any help you might have.

-- 
Regards,
Jim Millard
Linux System Administrator
Canyon County Idaho


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


Re: [Samba] mssql, problem authenticating from stored procedure...

2006-10-02 Thread Felipe Augusto van de Wiel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/30/2006 03:33 PM, Kristoffer Egefelt escreveu:
 Hello,
 
 running plain samba 3.023c on debian,  I'm trying to connect 
 to a samba share from within a stored procedure.
 
 This works as long as samba is in share mode:
 [2006/09/29 14:53:01, 5] auth/auth.c:check_ntlm_password(309)
  check_ntlm_password:  guest authentication for user [] - [] - [nobody]
 succeeded
 
 
 When I try to attach samba share manually when logged in as 
 the user running the sqlserver agent, it also works:
 
 [2006/09/30 17:58:43, 2] auth/auth.c:check_ntlm_password(309)
  check_ntlm_password:  authentication for user [sqlserver] - [sqlserver]
 - [sqlserver] succeeded
 
 But when running the stored procedure, which causes the 
 sqlserver user to login to the samba server I get this:
 
 [2006/09/30 17:59:28, 2] auth/auth.c:check_ntlm_password(319)
  check_ntlm_password:  Authentication for user [sqlserver] - [sqlserver]
 FAILED with error NT_STATUS_WRONG_PASSWORD
 
 This is extremely strange to me... :(
 Any ideas is greatly appreciated... :)

Any chances that your password contains special characters
that are not properly quoted inside SQL?

This is what I can think about, it does not looks like a
Samba problem, not even something related to NTLM/SMB/CIFS, more
likely that it is just the STORED PROCEDURE code.


 /Kristoffer
 but when user authentication is needed


Kind regards,

- --
Felipe Augusto van de Wiel [EMAIL PROTECTED]
Coordenadoria de Tecnologia da Informação (CTI) - SEDU/PARANACIDADE
http://www.paranacidade.org.br/   Phone: (+55 41 3350 3300)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org

iD8DBQFFITbiCj65ZxU4gPQRAv6aAJ9Z11yX6dCon8BD620FjfvE29fNCQCgjOiF
oJlzHVw3PInggjXItx5zlW4=
=C9Ya
-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] vfs object recycle: could two shares use the same repository?

2006-10-02 Thread Felipe Augusto van de Wiel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 10/01/2006 04:28 PM, M. Mueller escreveu:
 Hi,
 i use the vfs-object recycle on the [homes] share and defined
 recycle:repository = /backup/recycle/%G/%U/.recycle.
 What happens, when using the same repository path for another share,
 e.g. [data]. Could this lead to data loss in the waste bin?

I never did that, and should be easy to test it out, but
I don't know what would happen if two filenames has the same name
and were deleted from different shares.


 I could of course branch into /backup/recycle/%G/%U/.recycle/homes and
 /backup/recycle/%G/%U/.recycle/data but i would like to avoid that.

Maybe you can use another variable on the path, to make
it more automagic. :-)


 Thanks for any comments,
 Malte Müller

Kind regards,

- --
Felipe Augusto van de Wiel [EMAIL PROTECTED]
Coordenadoria de Tecnologia da Informação (CTI) - SEDU/PARANACIDADE
http://www.paranacidade.org.br/   Phone: (+55 41 3350 3300)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org

iD8DBQFFITjgCj65ZxU4gPQRAuSyAKCdNo6KvV4YM6sQ9UQjvFvPAAgr5ACcCfBE
g2H6ux9y0as9pXFAzLl1bMQ=
=/d/r
-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] Kinit failed: Clients credentials have been revoked

2006-10-02 Thread Norbert Wegener

I have joined an AD domain the usual way
kinit [EMAIL PROTECTED]

and
net ads join -U [EMAIL PROTECTED]

wbinfo -m lists the trusted domains. So far so good.
Unfortunately every few minutes I get error messages in the logfile:

Oct  2 19:52:53 (none) winbindd[31193]:   Kinit failed: Clients 
credentials have been revoked
Oct  2 19:56:34 (none) winbindd[31193]: [2006/10/02 19:56:34, 0] 
libsmb/cliconnect.c:cli_session_setup_spnego(759)
Oct  2 19:56:34 (none) winbindd[31193]:   Kinit failed: Clients 
credentials have been revoked
Oct  2 19:56:34 (none) winbindd[31193]: [2006/10/02 19:56:34, 0] 
libads/kerberos.c:ads_kinit_password(146)
Oct  2 19:56:34 (none) winbindd[31193]:   kerberos_kinit_password 
host/[EMAIL PROTECTED] failed: Clients credentials have been 
revoked
Oct  2 19:56:37 (none) winbindd[31193]: [2006/10/02 19:56:37, 0] 
libsmb/cliconnect.c:cli_session_setup_spnego(759)
Oct  2 19:56:37 (none) winbindd[31193]:   Kinit failed: Clients 
credentials have been revoked
Oct  2 19:56:40 (none) winbindd[31193]: [2006/10/02 19:56:40, 0] 
libsmb/cliconnect.c:cli_session_setup_spnego(759)
Oct  2 19:56:40 (none) winbindd[31193]:   Kinit failed: Clients 
credentials have been revoked


What causes this messages and is it to ignore or important?
I am using samba-3.0.12-5 on a Suse Linux 9.3 system.

This is my smb.conf:

[global]
   security = ads
   use kerberos keytab
   realm = ORG1.MYDOMAIN.NET
   netbios name = de70176c
   workgroup = MYDOMAIN.NET
   winbind separator = !
   idmap uid = 1-2
   idmap gid = 1-2
   winbind enum users = yes
   winbind enum groups = yes
   template homedir = /home/%D/%U
   template shell = /bin/bash
   client use spnego = yes
   client ntlmv2 auth = yes
   encrypt passwords = yes
   #winbind use default domain = yes
   preferred master = no
   restrict anonymous = 2


Thanks
Norbert Wegener

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


RE: [Samba] Sync unix and samba passwords

2006-10-02 Thread Craig Jackson
 

Hello. It's me again. Downloaded Samba source and compiled it with LDAP
and pam_smbpass options. Of course it didn't work. The Changelog and the
INSTALL clearly point to this only working with smbpasswd. The LDAP code
has not been incorporated. Wouldn't call this a bug but more like a
feature request.

Anyone have a patch or maybe want to write one?

Humbly.

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


Re: [Fwd: [Samba] Re: Samba print problem (everything looks right)]

2006-10-02 Thread cmaurand

I never used cupsaddsmb.  It did it manually with rpcclient.

Curtis

Dale Schroeder wrote:
 This problem has been driving me crazy for a week.
 
 Fedora Core 4, Cups 1.2.1 Samba 3.0.23a Thanks in advance.
 
  --
 Curtis Maurand
 Senior Network  Systems Engineer
 BlueTarp Financial, Inc.
 443 Congress St. 6th Floor
 Portland, ME 04101
 207.797.5900 x233 (office)
 207.797.3833 (fax)
 mailto:[EMAIL PROTECTED]
 http://www.bluetarp.com
 -- To unsubscribe from this list go to the following URL and read the
 instructions: https://lists.samba.org/mailman/listinfo/samba
 
 
 If you used cupsaddsmb to export your printer, CUPS 1.2.1 had a bug,
 that caused problems with Samba.  (See below)
 1.2.2 had a different bug with advanced features.  Try 1.2.3 or 1.2.4.
 
 Dale
 
  Original Message 
 Subject:  [Samba] Re: Samba print problem (everything looks right)
 Date: Fri, 09 Jun 2006 09:34:55 -0400
 From: Brian White [EMAIL PROTECTED]
 Organization: Precidia Technologies http://www.precidia.com/
 To:   Alessandro Morgantini [EMAIL PROTECTED]
 CC:   samba@lists.samba.org
 References:   [EMAIL PROTECTED]
 
 
 
 I read your posts on samba mailing list.
 I have the same problem:
 I can print, but I can't open the printer properties page (no driver 
 message...).
 For me also, the drivers are read from samba server e written on 
 C:\WinNT\System32\spool\drivers\... (I have removed him in advance to 
 test this).
 
 There was a bug in the cupssmbadd program that stripped all end-of-line 
 characters during the conversion.  (Many thanks to Vincent Nicolas for 
 catching this!)  See http://www.cups.org/str.php?L1750
 
   Brian
  ( [EMAIL PROTECTED] )
 
 ---
   BREAKFAST.COM Halted...  Cereal Port Not Responding
 -- 
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/listinfo/samba
 


-- 
Curtis Maurand
Senior Network  Systems Engineer
BlueTarp Financial, Inc.
443 Congress St.
6th Floor
Portland, ME 04101
207.797.5900 x233 (office)
207.797.3833  (fax)
mailto:[EMAIL PROTECTED]
http://www.bluetarp.com

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


[Samba] ridmap info has changed

2006-10-02 Thread Graham Dunn
After a restart, I'm seeing all the userid's change. Which I thought
idmap_rid was supposed to prevent.

I see this in log.winbind from an ls -l.

[2006/10/02 17:20:52, 1] nsswitch/winbindd_group.c:winbindd_getgrgid(340)
  Can't find domain from sid

Any ideas what's happened?

wbinfo -u and -g seem to work

# wbinfo -u | wc -l
   28724
# wbinfo -g | wc -l
   13270

Thanks,
Graham


samba-3.0.20b on FreeBSD 5.3-RELEASE-p9

# Global parameters
[global]

workgroup = HARRIS
security = ADS
netbios name = ATARASHII
encrypt passwords = yes
realm = CS.MYHARRIS.NET
password server = wtldc1vm.cs.myharris.net
wins server = 137.237.104.156
client schannel = no

allow trusted domains = No
idmap backend = idmap_rid:HARRIS=1-30
idmap uid = 1-30
idmap gid = 1-30
winbind separator = .
template homedir = /home/%U
template shell = /bin/sh
winbind cache time = 3600
winbind nested groups = Yes
winbind use default domain = Yes
winbind enum users = No
winbind enum groups = No


force create mode = 0666
force directory mode = 0777
dos filemode = Yes

server string = Samba File Server %v

map to guest = Bad User

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


[Samba] change passwd from windows--more grief

2006-10-02 Thread Steve Glasser
Hi group,

I can't seem to get passwd change from windows to work.  I am running
samba 3.0.20-3.1.20060mdk installed from rpms on Mandriva 2006; the
clients are windows XP sp2.  When I try to change passwd from windows I
get You do not have permission to change your password.

What am I doing wrong? 

My global smb.conf is below.  
From log.smbd I think this error pertains to the windows error: 

[2006/10/02 15:25:00, 3] smbd/chgpasswd.c:chgpasswd(457)
  chgpasswd: Password change (as_root=Yes) for user: foo
  PAM: unable to obtain the new authentication token - is password to
weak?

This is while using a new passwd of 9 random letters/numbers.

Any suggestions welcome, thanks in advance



dos charset = 850
unix charset = ISO8859-1
workgroup = DELTAGRADING
server string = %h server (Samba, Mandrake)
passdb backend = tdbsam
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew
\sUNIX\spassword:* %n\n .
passwd chat debug = Yes
username map = /etc/samba/smbusers
unix password sync = Yes
log level = 3
name resolve order = wins bcast hosts
time server = Yes
printcap name = CUPS
add user script = /usr/sbin/useradd -m %u
delete user script = /usr/sbin/userdel -r %u
add group script = /usr/sbin/groupadd %g
delete group script = /usr/sbin/groupdel %g
add user to group script = /usr/sbin/usermod -G %g %u
add machine script = /usr/sbin/useradd -s /bin/false
-d /dev/null %u
logon script = scripts\%U.bat
logon path =
logon drive = H:
domain logons = Yes
os level = 128
preferred master = Yes
domain master = Yes
wins support = Yes
ldap passwd sync = Yes
idmap uid = 15000-2
idmap gid = 15000-2


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


[Samba] problem accessing Windows XP as a client

2006-10-02 Thread Norman S . Clerman
Samba friends,

I have a computer running SUSE Linux 10.1. At work all the computers on
the network, except this one, are running either Windows 2000 Pro or
Windows 2000 Server. The computers are physically connected through a
router. I am an administrator on all the Windows computers and have no
problem whatsoever mounting administrative shares such as C$ using smbmnt.

Using the same Linux computer at home, I try to access a computer
running Windows XP Pro, on which I'm also an administrator. I have
turned off simple file sharing on the Windows XP computer. The computers
are also connected through a router. I can't access using smbclient, and
I can't mount using smbmnt. The Windows XP computer has the name of
APPLE, and when I try

smbclient -L APPLE

or

smbclient -L apple

I get a message

connection to apple failed.

Any suggestions?

Norm Clerman


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


Re: [Fwd: [Samba] Re: Samba print problem (everything looks right)]

2006-10-02 Thread Cybionet

Greeting Curtis,

 For my knowledge, can you explain how (with rpc)...and please don't 
refer me to the documentation on the site. I have use 1 day to try to 
make it work and the documentation is not very clear.


Actually, my windows and linux client use cups as print server very 
well, but I never success to add driver in samba.


Robert

I never used cupsaddsmb.  It did it manually with rpcclient.

Curtis

Dale Schroeder wrote:
  

This problem has been driving me crazy for a week.

Fedora Core 4, Cups 1.2.1 Samba 3.0.23a Thanks in advance.

 --
Curtis Maurand
Senior Network  Systems Engineer
BlueTarp Financial, Inc.
443 Congress St. 6th Floor
Portland, ME 04101
207.797.5900 x233 (office)
207.797.3833 (fax)
mailto:[EMAIL PROTECTED]
http://www.bluetarp.com
-- To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba


If you used cupsaddsmb to export your printer, CUPS 1.2.1 had a bug,
that caused problems with Samba.  (See below)
1.2.2 had a different bug with advanced features.  Try 1.2.3 or 1.2.4.

Dale

 Original Message 
Subject:[Samba] Re: Samba print problem (everything looks right)
Date:   Fri, 09 Jun 2006 09:34:55 -0400
From:   Brian White [EMAIL PROTECTED]
Organization:   Precidia Technologies http://www.precidia.com/
To: Alessandro Morgantini [EMAIL PROTECTED]
CC: samba@lists.samba.org
References: [EMAIL PROTECTED]





I read your posts on samba mailing list.
I have the same problem:
I can print, but I can't open the printer properties page (no driver 
message...).
For me also, the drivers are read from samba server e written on 
C:\WinNT\System32\spool\drivers\... (I have removed him in advance to 
test this).
  
There was a bug in the cupssmbadd program that stripped all end-of-line 
characters during the conversion.  (Many thanks to Vincent Nicolas for 
catching this!)  See http://www.cups.org/str.php?L1750


  Brian
 ( [EMAIL PROTECTED] )

---
  BREAKFAST.COM Halted...  Cereal Port Not Responding
--
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] Re: WINS over subnets

2006-10-02 Thread Hoggins!
Okay, I checked on my clients, and what I see is for the most 
surprising: they only display hosts within the samba server's 
browse.dat, not even the other hosts on the same subnet (usually, I 
believe they would have been discovered through broadcast). So the only 
machines that appear on ALL the machines of all the subnets are :

- the server
- the XP box, located on the same subnet as the server

The other hosts' names can be successfully resolved by the server 
(checked with Ethereal) when explicitly typed in the explorer bar. But 
they are not discovered by the network browsing.


Any idea of the problem ?

The local masters don't seem to be doing their job, do they ?

Hoggins!

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


Re: [Samba] Re: WINS over subnets

2006-10-02 Thread Craig White
On Tue, 2006-10-03 at 04:41 +0200, Hoggins! wrote:
 Okay, I checked on my clients, and what I see is for the most 
 surprising: they only display hosts within the samba server's 
 browse.dat, not even the other hosts on the same subnet (usually, I 
 believe they would have been discovered through broadcast). So the only 
 machines that appear on ALL the machines of all the subnets are :
   - the server
   - the XP box, located on the same subnet as the server
 
 The other hosts' names can be successfully resolved by the server 
 (checked with Ethereal) when explicitly typed in the explorer bar. But 
 they are not discovered by the network browsing.
 
 Any idea of the problem ?
 
 The local masters don't seem to be doing their job, do they ?

Official Samba HowTo suggests that you would need a WINS server on each
subnet

http://samba.org/samba/docs/man/Samba-HOWTO-Collection/NetworkBrowsing.html#id2588936

You might want to review the documentation - there is a possibility
that 
'remote browse sync = broadcast_address_of_remote_subnet'
might work for you.

Craig

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


Re: [Samba] WINS over subnets

2006-10-02 Thread John H Terpstra
On Thursday 28 September 2006 11:23, Barry, Christopher wrote:
 On Thu, 2006-09-28 at 04:14 +0200, Hoggins! wrote:
  Hello,
 
  I'm trying to make browsing work over several routed subnets, but
  obviously, something goes wrong. Here's the situation :
 
 
 
  !---!
  ! hgsserver ! (SAMBA HOST)
  !---!
 
|192.168.2.0/24   !--!  192.168.3.0/24
|-! wifigate !- - - -
|!--!  (several wireless WinXP boxes)
 
  !--!
  ! WinXP box!
  ! hoggins!
  !--!

 SNIP...

  My browse.dat does not contain all I need, it just contains my machine
  (hoggins) and the server. I would like to have all the other hosts
  that are on subnet 192.168.3.0/24. These hosts have received the
  server's IP address as the WINS server in their DHCP transaction, and I
  can see they communicate with it when doing an ethereal analysis.
  But the browse list remains desperately empty from these hosts.
 
  Any ideas on how to solve this really annoying problem ?
 
  Thanks in advance,
 
  Hoggins!

 For each host on 192.168.3.0/24, manually add in the WINS address of
 hgsserver in the wireless NIC configuration. Because WINS does not jump
 routers, you'll need to tell the client where to find this information.

Wrong! WINS uses directed UDP. Directed UDP is routable. Does your router pass 
directed UDP packets?

Check your wins.dat file on hgsserver to see if all clients have registered 
with the WINS server.

- John T.



 --
 Regards,
 Christopher Barry
 Manager of Information Systems
 SilverStorm Technologies, Inc.
 O: 610-233-4870
 F: 610-233-4777
 C: 267-242-9306

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


Re: [Samba] Re: WINS over subnets

2006-10-02 Thread John H Terpstra
On Sunday 01 October 2006 18:45, Hoggins! wrote:
 Edmundo Valle Neto a écrit :
  Hoggins! escreveu:
 
  Yes, in that case it should maintain a more complete list. And yes you
  just must have ONE WINS server.
  I think you didnt got the point, domain master, local master, domain
  controllers, wins server, etc are just roles of the same server,
  enabling some options in smb.conf the same server can be all of them at
  the same time.
  BUT, other subnets need local master browsers too, they can be any
  Windows workstation (normally you should not worry about that), this is
  one of the reasons that all of them must use the same single WINS server
  (I am not saying that yours are not), the LMB can be any available
  workstation (the machines in the subnet should elect one automatically),
  so any machine ending up beeing a LMB will use the  same WINS server to
  find the DMB and sync. It works that way without you needing to care
  about it.
 
 
  Ok, if the wireless clients can see each others probably that segment
  has an LMB with the browse list of that segment but just isnt passing it
  to the samba server.
  About the LMBs I just said that to make it clear, that the other
  networks dont register themselves directly with samba to be included in
  the browse.dat file, who does that is the LMB of that segment (as
  explained before).

 Thanks, I understand better now how it works.
 So the LMB (any Win machine, elected) of the 192.168.3.0/24 segment must
 send its browse list to the server, right ? I must check this traffic
 with ethereal and/or with debug level 2. Sorry I didn't yet.

Not quite! 

The LMB does nothing to contact the DMB. The responsibility for browse list 
synchronization belongs to the DMB.

The DMB looks for the LMB registrations in the WINS (wins.dat) database. It 
then contacts each LMB to synchronise the browse list.

Ergo, if the WINS database does not contain all machines that are LMBs - 
browse list synchronization will not happen.

- John T.


  Yes, it is possible and most of the times the recommended way.
 
 
  Theres some tools and comands to see problems with name resolution on
  the XP clients, like nbtstat or the netbios browsing console.
 
  Putting a log level of 2 in smb.conf, is there any interesting
  information about elections in the nmbd log? Whould help if you include
  your smb.conf here too.

 Yes, I put debug level to 2, and I saw that the server was always
 elected as the master. And also that the machines successfully
 registered to the server.
 My smb.conf (a bit modified since my first post, but the symptoms are
 the same though) :

 [global]
   display charset = ASCII
   workgroup = BOUFFARD
   netbios aliases = hgsserver
   server string = PARTAGES
   interfaces = eth0
   security = SHARE
   map to guest = Bad User
   root directory = /
   pam password change = Yes
   passwd program = /usr/bin/passwd %u
   passwd chat debug = Yes
   username map = /etc/samba/smbusers
   unix password sync = Yes
 # log level = 2
 # syslog = 3
 # syslog only = Yes
   log file = /var/log/samba/%m.log
   max log size = 50
   debug timestamp = No
   time server = Yes
   server signing = auto
   socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
   printcap name = /etc/printcap
   os level = 32
   lm announce = Yes
   preferred master = Yes
   domain master = Yes
   local master = no
   dns proxy = No
   wins support = Yes
   ldap ssl = no
   remote announce = 192.168.3.255/BOUFFARD
   remote browse sync = 192.168.3.255 224.0.0.1
   usershare path =
   winbind enum users = Yes
   winbind enum groups = Yes
   winbind use default domain = Yes
   guest ok = Yes
   hosts allow = 192.168.2.0/24, 192.168.3.0/24
   cups options = raw

 [...] (some shares declarations)

 I'll come with more results on benchmarks ASAP. Thanks for your help and
 patience.

 Regards,

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


Re: [Samba] Re: WINS over subnets

2006-10-02 Thread Craig White
On Mon, 2006-10-02 at 19:55 -0700, Craig White wrote:
 On Tue, 2006-10-03 at 04:41 +0200, Hoggins! wrote:
  Okay, I checked on my clients, and what I see is for the most 
  surprising: they only display hosts within the samba server's 
  browse.dat, not even the other hosts on the same subnet (usually, I 
  believe they would have been discovered through broadcast). So the only 
  machines that appear on ALL the machines of all the subnets are :
  - the server
  - the XP box, located on the same subnet as the server
  
  The other hosts' names can be successfully resolved by the server 
  (checked with Ethereal) when explicitly typed in the explorer bar. But 
  they are not discovered by the network browsing.
  
  Any idea of the problem ?
  
  The local masters don't seem to be doing their job, do they ?
 
 Official Samba HowTo suggests that you would need a WINS server on each
 subnet
 
 http://samba.org/samba/docs/man/Samba-HOWTO-Collection/NetworkBrowsing.html#id2588936
 
 You might want to review the documentation - there is a possibility
 that 
 'remote browse sync = broadcast_address_of_remote_subnet'
 might work for you.

OK correction...I have it on good authority that I have given bad advice
above...

1 - only 1 WINS server
2 - remote browse sync is not what you want
3 - clients need to have proper configuration of WINS server address -
if by DHCP, then you probably need to set the node type (option 44/46)
correctly
4 - OP should check contents of wins.dat (on my RH systems, they are
located in /var/cache/samba but on others, they are in /var/lib/samba
YMMV)

Craig

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


Re: [Samba] WINS over subnets

2006-10-02 Thread John H Terpstra
On Thursday 28 September 2006 16:13, Aaron Kincer wrote:
 Barry, Christopher wrote:
  For each host on 192.168.3.0/24, manually add in the WINS address of
  hgsserver in the wireless NIC configuration. Because WINS does not jump
  routers, you'll need to tell the client where to find this information.

 This is not entirely correct. Many routers can be configured to forward
 NetBIOS and WINS frames. Firewalls that split subnets off different
 interfaces can do it too. However, it can be messy to forward broadcast
 frames.

WINS uses UDP unicast (directed UDP) which is routable. What you have referred 
to is known as NetBIOS helper agent - a router configuration option that 
can perform forwarding of NetBIOS UDP broadcasts. This option is a VERY bad 
thing and is totally unecessary if WINS is correctly configured and if 
clients are working as they should.

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


Re: [Samba] Re: WINS over subnets - something strange in the HOWTO

2006-10-02 Thread Edmundo Valle Neto

John H Terpstra escreveu:

On Sunday 01 October 2006 18:45, Hoggins! wrote:
  

Edmundo Valle Neto a écrit :


Hoggins! escreveu:

Yes, in that case it should maintain a more complete list. And yes you
just must have ONE WINS server.
I think you didnt got the point, domain master, local master, domain
controllers, wins server, etc are just roles of the same server,
enabling some options in smb.conf the same server can be all of them at
the same time.
BUT, other subnets need local master browsers too, they can be any
Windows workstation (normally you should not worry about that), this is
one of the reasons that all of them must use the same single WINS server
(I am not saying that yours are not), the LMB can be any available
workstation (the machines in the subnet should elect one automatically),
so any machine ending up beeing a LMB will use the  same WINS server to
find the DMB and sync. It works that way without you needing to care
about it.


Ok, if the wireless clients can see each others probably that segment
has an LMB with the browse list of that segment but just isnt passing it
to the samba server.
About the LMBs I just said that to make it clear, that the other
networks dont register themselves directly with samba to be included in
the browse.dat file, who does that is the LMB of that segment (as
explained before).
  

Thanks, I understand better now how it works.
So the LMB (any Win machine, elected) of the 192.168.3.0/24 segment must
send its browse list to the server, right ? I must check this traffic
with ethereal and/or with debug level 2. Sorry I didn't yet.



Not quite! 

The LMB does nothing to contact the DMB. The responsibility for browse list 
synchronization belongs to the DMB.


The DMB looks for the LMB registrations in the WINS (wins.dat) database. It 
then contacts each LMB to synchronise the browse list.


Ergo, if the WINS database does not contain all machines that are LMBs - 
browse list synchronization will not happen.


- John T.
  


John.

   Look at this at: 
http://samba.org/samba/docs/man/Samba-HOWTO-Collection/NetworkBrowsing.html



How Browsing Functions

...
Instead, the DMB serves the role of contacting each LMB (found by asking 
WINS or from LMHOSTS) and exchanging browse list contents.

...

This is what you said.

But.


Cross-Subnet Browsing

...
As soon as N2_B has become the LMB, it looks for a DMB with which to 
synchronize its browse list. It does this by querying the WINS server 
(N2_D) for the IP address associated with the NetBIOS name 
WORKGROUP1B. This name was registered by the DMB (N1_C) with the WINS 
server as soon as it was started.


Once N2_B knows the address of the DMB, it tells it that is the LMB for 
subnet 2 by sending a MasterAnnouncement packet as a UDP port 138 
packet. It then synchronizes with it by doing a NetServerEnum2 call. 
This tells the DMB to send it all the server names it knows about. Once 
the DMB receives the MasterAnnouncement packet, it schedules a 
synchronization request to the sender of that packet. After both 
synchronizations are complete, the browse lists look like those in 
Browse Subnet Example 2

...

And thats the another explanation that I said.

Shouldnt that last explanation be different?

Regards.

Edmundo Valle Neto

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


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

2006-10-02 Thread mimir
Author: mimir
Date: 2006-10-02 06:00:14 + (Mon, 02 Oct 2006)
New Revision: 19025

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

Log:
- remove read-only and policy dependent fields and flags
- do not stop NET-API-USERMODIFY test when a single field fails
- add account flags to the fields tested
- separate cleanup step from closing domain at the end


rafal


Modified:
   branches/SAMBA_4_0/source/torture/libnet/libnet_user.c
   branches/SAMBA_4_0/source/torture/libnet/userman.c
   branches/SAMBA_4_0/source/torture/libnet/usertest.h


Changeset:
Modified: branches/SAMBA_4_0/source/torture/libnet/libnet_user.c
===
--- branches/SAMBA_4_0/source/torture/libnet/libnet_user.c  2006-10-02 
05:53:45 UTC (rev 19024)
+++ branches/SAMBA_4_0/source/torture/libnet/libnet_user.c  2006-10-02 
06:00:14 UTC (rev 19025)
@@ -343,11 +343,11 @@
case account_name:
continue_if_field_set(r-in.account_name);
r-in.account_name = talloc_asprintf(mem_ctx, 
TEST_CHG_ACCOUNTNAME,
-(int)random());
+(int)(random() % 
100));
fldname = account_name;

/* update the test's user name in case it's about to 
change */
-   *user_name = r-in.account_name;
+   *user_name = talloc_strdup(mem_ctx, r-in.account_name);
break;
 
case full_name:
@@ -406,41 +406,6 @@
fldname = acct_expiry;
break;
 
-   case allow_password_change:
-   continue_if_field_set(r-in.allow_password_change);
-   now = timeval_add(now, (random() % (31*24*60*60)), 0);
-   r-in.allow_password_change = talloc_memdup(mem_ctx, 
now, sizeof(now));
-   fldname = allow_password_change;
-   break;
-
-   case force_password_change:
-   continue_if_field_set(r-in.force_password_change);
-   now = timeval_add(now, (random() % (31*24*60*60)), 0);
-   r-in.force_password_change = talloc_memdup(mem_ctx, 
now, sizeof(now));
-   fldname = force_password_change;
-   break;
-
-   case last_logon:
-   continue_if_field_set(r-in.last_logon);
-   now = timeval_add(now, (random() % (31*24*60*60)), 0);
-   r-in.last_logon = talloc_memdup(mem_ctx, now, 
sizeof(now));
-   fldname = last_logon;
-   break;
-
-   case last_logoff:
-   continue_if_field_set(r-in.last_logoff);
-   now = timeval_add(now, (random() % (31*24*60*60)), 0);
-   r-in.last_logoff = talloc_memdup(mem_ctx, now, 
sizeof(now));
-   fldname = last_logoff;
-   break;
-
-   case last_password_change:
-   continue_if_field_set(r-in.last_password_change);
-   now = timeval_add(now, (random() % (31*24*60*60)), 0);
-   r-in.last_password_change = talloc_memdup(mem_ctx, 
now, sizeof(now));
-   fldname = last_password_change;
-   break;
-
default:
fldname = unknown_field;
}
@@ -455,6 +420,28 @@
 }
 
 
+#define TEST_STR_FLD(fld) \
+   if (!strequal(req.in.fld, user_req.out.fld)) { \
+   printf(failed to change '%s'\n, #fld); \
+   ret = False; \
+   goto cleanup; \
+   }
+
+#define TEST_TIME_FLD(fld) \
+   if (timeval_compare(req.in.fld, user_req.out.fld)) { \
+   printf(failed to change '%s'\n, #fld); \
+   ret = False; \
+   goto cleanup; \
+   }
+
+#define TEST_NUM_FLD(fld) \
+   if (req.in.fld != user_req.out.fld) { \
+   printf(failed to change '%s'\n, #fld); \
+   ret = False; \
+   goto cleanup; \
+   }
+
+
 BOOL torture_modifyuser(struct torture_context *torture)
 {
NTSTATUS status;
@@ -467,6 +454,7 @@
char *name;
struct libnet_context *ctx;
struct libnet_ModifyUser req;
+   struct libnet_UserInfo user_req;
int fld;
BOOL ret = True;
 
@@ -507,7 +495,7 @@
 
printf(Testing change of all fields - each single one in turn\n);
 
-   for (fld = 1; fld  FIELDS_NUM; fld++) {
+   for (fld = 1; fld  FIELDS_NUM - 1; fld++) {
ZERO_STRUCT(req);
req.in.domain_name = lp_workgroup();
req.in.user_name = name;
@@ -517,11 

svn commit: linux-cifs-client r91 - in branches/linux-2.6-cifs-git-devel/fs/cifs: .

2006-10-02 Thread sfrench
Author: sfrench
Date: 2006-10-02 06:04:39 + (Mon, 02 Oct 2006)
New Revision: 91

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=linux-cifs-clientrev=91

Log:
Merge latest fix from GK

Modified:
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h
   branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c


Changeset:
Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h
===
--- branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h 2006-10-01 19:58:24 UTC 
(rev 90)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h 2006-10-02 06:04:39 UTC 
(rev 91)
@@ -409,6 +409,8 @@
 
 /* Dialect index is 13 for LANMAN */
 
+#define MIN_TZ_ADJ (15 * 60) /* minimum grid for timezones in seconds */
+
 typedef struct lanman_neg_rsp {
struct smb_hdr hdr; /* wct = 13 */
__le16 DialectIndex;
@@ -678,7 +680,7 @@
 typedef struct smb_com_close_req {
struct smb_hdr hdr; /* wct = 3 */
__u16 FileID;
-   __u32 LastWriteTime;/* should be zero */
+   __u32 LastWriteTime;/* should be zero or -1 */
__u16 ByteCount;/* 0 */
 } __attribute__((packed)) CLOSE_REQ;
 

Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c
===
--- branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c 2006-10-01 19:58:24 UTC 
(rev 90)
+++ branches/linux-2.6-cifs-git-devel/fs/cifs/cifssmb.c 2006-10-02 06:04:39 UTC 
(rev 91)
@@ -450,7 +450,7 @@
} else if((pSMBr-hdr.WordCount == 13)
 ((pSMBr-DialectIndex == LANMAN_PROT)
|| (pSMBr-DialectIndex == LANMAN2_PROT))) {
-   int tmp, adjust;
+   __s16 tmp;
struct lanman_neg_rsp * rsp = (struct lanman_neg_rsp *)pSMBr;
 
if((secFlags  CIFSSEC_MAY_LANMAN) || 
@@ -476,14 +476,16 @@
server-maxRw = 0;/* we do not need to use raw anyway */
server-capabilities = CAP_MPX_MODE;
}
-   tmp = le16_to_cpu(rsp-ServerTimeZone);
-   if (tmp == (int)0x) {
+   tmp = (__s16)le16_to_cpu(rsp-ServerTimeZone);
+   if (tmp == -1) {
/* OS/2 often does not set timezone therefore
 * we must use server time to calc time zone.
-* Could deviate slightly from the right zone. Not easy
-* to adjust, since timezones are not always a multiple
-* of 60 (sometimes 30 minutes - are there smaller?)
+* Could deviate slightly from the right zone.
+* Smallest defined timezone difference is 15 minutes
+* (i.e. Nepal).  Rounding up/down is done to match
+* this requirement.
 */
+   int val, seconds, remain, result;
struct timespec ts, utc;
utc = CURRENT_TIME;
ts = cnvrtDosUnixTm(le16_to_cpu(rsp-SrvTime.Date),
@@ -491,12 +493,18 @@
cFYI(1,(SrvTime: %d sec since 1970 (utc: %d) diff: %d,
(int)ts.tv_sec, (int)utc.tv_sec, 
(int)(utc.tv_sec - ts.tv_sec)));
-   tmp = (int)(utc.tv_sec - ts.tv_sec);
-   adjust = tmp  0 ? -29 : 29;
-   tmp = ((tmp + adjust) / 60) * 60;
-   server-timeAdj = tmp;
+   val = (int)(utc.tv_sec - ts.tv_sec);
+   seconds = val  0 ? -val : val;
+   result = (seconds / MIN_TZ_ADJ) * MIN_TZ_ADJ;
+   remain = seconds % MIN_TZ_ADJ;
+   if(remain = (MIN_TZ_ADJ / 2))
+   result += MIN_TZ_ADJ;
+   if(val  0)
+   result = - result;
+   server-timeAdj = result;
} else {
-   server-timeAdj = tmp * 60; /* also in seconds */
+   server-timeAdj = (int)tmp;
+   server-timeAdj *= 60; /* also in seconds */
}
cFYI(1,(server-timeAdj: %d seconds, server-timeAdj));
 
@@ -559,7 +567,8 @@
cFYI(0, (Max buf = %d, ses-server-maxBuf));
GETU32(ses-server-sessid) = le32_to_cpu(pSMBr-SessionKey);
server-capabilities = le32_to_cpu(pSMBr-Capabilities);
-   server-timeAdj = le16_to_cpu(pSMBr-ServerTimeZone) * 60;  
+   server-timeAdj = (int)(__s16)le16_to_cpu(pSMBr-ServerTimeZone);
+   server-timeAdj *= 60;
if (pSMBr-EncryptionKeyLength == CIFS_CRYPTO_KEY_SIZE) {
memcpy(server-cryptKey, pSMBr-u.EncryptionKey,
   CIFS_CRYPTO_KEY_SIZE);
@@ -1645,7 

svn commit: linux-cifs-client r92 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2006-10-02 Thread sfrench
Author: sfrench
Date: 2006-10-02 06:05:44 + (Mon, 02 Oct 2006)
New Revision: 92

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=linux-cifs-clientrev=92

Log:
Merge latest fix from GK

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h   2006-10-02 
06:04:39 UTC (rev 91)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.h   2006-10-02 
06:05:44 UTC (rev 92)
@@ -97,10 +97,10 @@
 extern struct inode_operations cifs_symlink_inode_ops;
 
 /* Functions related to files and directories */
-extern struct file_operations cifs_file_ops;
-extern struct file_operations cifs_file_direct_ops; /* if directio mount */
-extern struct file_operations cifs_file_nobrl_ops;
-extern struct file_operations cifs_file_direct_nobrl_ops; /* if directio mount 
*/
+extern const struct file_operations cifs_file_ops;
+extern const struct file_operations cifs_file_direct_ops; /* if directio mount 
*/
+extern const struct file_operations cifs_file_nobrl_ops;
+extern const struct file_operations cifs_file_direct_nobrl_ops; /* if directio 
mount */
 extern int cifs_open(struct inode *inode, struct file *file);
 extern int cifs_close(struct inode *inode, struct file *file);
 extern int cifs_closedir(struct inode *inode, struct file *file);
@@ -112,7 +112,7 @@
 extern int cifs_fsync(struct file *, struct dentry *, int);
 extern int cifs_flush(struct file *);
 extern int cifs_file_mmap(struct file * , struct vm_area_struct *);
-extern struct file_operations cifs_dir_ops;
+extern const struct file_operations cifs_dir_ops;
 extern int cifs_dir_open(struct inode *inode, struct file *file);
 extern int cifs_readdir(struct file *file, void *direntry, filldir_t filldir);
 extern int cifs_dir_notify(struct file *, unsigned long arg);

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h  2006-10-02 
06:04:39 UTC (rev 91)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h  2006-10-02 
06:05:44 UTC (rev 92)
@@ -418,6 +418,8 @@
 
 /* Dialect index is 13 for LANMAN */
 
+#define MIN_TZ_ADJ (15 * 60) /* minimum grid for timezones in seconds */
+
 typedef struct lanman_neg_rsp {
struct smb_hdr hdr; /* wct = 13 */
__le16 DialectIndex;
@@ -687,7 +689,7 @@
 typedef struct smb_com_close_req {
struct smb_hdr hdr; /* wct = 3 */
__u16 FileID;
-   __u32 LastWriteTime;/* should be zero */
+   __u32 LastWriteTime;/* should be zero or -1 */
__u16 ByteCount;/* 0 */
 } __attribute__((packed)) CLOSE_REQ;
 

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c
===
--- branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c  2006-10-02 
06:04:39 UTC (rev 91)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c  2006-10-02 
06:05:44 UTC (rev 92)
@@ -477,7 +477,7 @@
} else if((pSMBr-hdr.WordCount == 13)
 ((pSMBr-DialectIndex == LANMAN_PROT)
|| (pSMBr-DialectIndex == LANMAN2_PROT))) {
-   int tmp, adjust;
+   __s16 tmp;
struct lanman_neg_rsp * rsp = (struct lanman_neg_rsp *)pSMBr;
 
if((secFlags  CIFSSEC_MAY_LANMAN) || 
@@ -503,14 +503,16 @@
server-maxRw = 0;/* we do not need to use raw anyway */
server-capabilities = CAP_MPX_MODE;
}
-   tmp = le16_to_cpu(rsp-ServerTimeZone);
-   if (tmp == (int)0x) {
+   tmp = (__s16)le16_to_cpu(rsp-ServerTimeZone);
+   if (tmp == -1) {
/* OS/2 often does not set timezone therefore
 * we must use server time to calc time zone.
-* Could deviate slightly from the right zone. Not easy
-* to adjust, since timezones are not always a multiple
-* of 60 (sometimes 30 minutes - are there smaller?)
+* Could deviate slightly from the right zone.
+* Smallest defined timezone difference is 15 minutes
+* (i.e. Nepal).  Rounding up/down is done to match
+* this requirement.
 */
+   int val, seconds, remain, result;
struct timespec ts, utc;
utc = CURRENT_TIME;
ts = 

svn commit: samba r19026 - in branches/SAMBA_3_0/source/include: .

2006-10-02 Thread metze
Author: metze
Date: 2006-10-02 06:32:58 + (Mon, 02 Oct 2006)
New Revision: 19026

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

Log:
we don't need this twice

metze
Modified:
   branches/SAMBA_3_0/source/include/includes.h


Changeset:
Modified: branches/SAMBA_3_0/source/include/includes.h
===
--- branches/SAMBA_3_0/source/include/includes.h2006-10-02 06:00:14 UTC 
(rev 19025)
+++ branches/SAMBA_3_0/source/include/includes.h2006-10-02 06:32:58 UTC 
(rev 19026)
@@ -74,14 +74,6 @@
 #endif
 #endif
 
-#ifndef NORETURN_ATTRIBUTE
-#if (__GNUC__ = 3)
-#define NORETURN_ATTRIBUTE __attribute__ ((noreturn))
-#else
-#define NORETURN_ATTRIBUTE
-#endif
-#endif
-
 #if defined(__GNUC__)  !defined(__cplusplus)
 /** gcc attribute used on function parameters so that it does not emit
  * warnings about them being unused. **/



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

2006-10-02 Thread vlendec
Author: vlendec
Date: 2006-10-02 08:35:19 + (Mon, 02 Oct 2006)
New Revision: 19027

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

Log:
Modify RPC-SAMBA3-SPOOLSS so that it can be activated in the build farm
Modified:
   branches/SAMBA_4_0/source/torture/rpc/samba3rpc.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/samba3rpc.c
===
--- branches/SAMBA_4_0/source/torture/rpc/samba3rpc.c   2006-10-02 06:32:58 UTC 
(rev 19026)
+++ branches/SAMBA_4_0/source/torture/rpc/samba3rpc.c   2006-10-02 08:35:19 UTC 
(rev 19027)
@@ -2229,6 +2229,53 @@
return NT_STATUS_OK;
 }
 
+static BOOL enumprinters(TALLOC_CTX *mem_ctx, struct dcerpc_pipe *pipe,
+int level)
+{
+   struct spoolss_EnumPrinters r;
+   NTSTATUS status;
+   DATA_BLOB blob;
+
+   r.in.flags = PRINTER_ENUM_LOCAL;
+   r.in.server = localhost;
+   r.in.level = 1;
+   r.in.buffer = NULL;
+   r.in.offered = 0;
+
+   status = dcerpc_spoolss_EnumPrinters(pipe, mem_ctx, r);
+   if (!NT_STATUS_IS_OK(status)) {
+   d_printf((%s) dcerpc_spoolss_EnumPrinters failed: %s\n,
+__location__, nt_errstr(status));
+   return False;
+   }
+
+   if (!W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) {
+   d_printf((%s) EnumPrinters unexpected return code %s, should 
+be WERR_INSUFFICIENT_BUFFER\n, __location__,
+win_errstr(r.out.result));
+   return False;
+   }
+
+   blob = data_blob_talloc(mem_ctx, NULL, r.out.needed);
+   if (blob.data == NULL) {
+   d_printf((%s) data_blob_talloc failed\n, __location__);
+   return False;
+   }
+
+   r.in.buffer = blob;
+   r.in.offered = r.out.needed;
+
+   status = dcerpc_spoolss_EnumPrinters(pipe, mem_ctx, r);
+   if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(r.out.result)) {
+   d_printf((%s) dcerpc_spoolss_EnumPrinters failed: %s, 
+%s\n, __location__, nt_errstr(status),
+win_errstr(r.out.result));
+   return False;
+   }
+
+   return True;
+}
+
 static NTSTATUS getprinterinfo(TALLOC_CTX *ctx, struct dcerpc_pipe *pipe,
   struct policy_handle *handle, int level,
   union spoolss_PrinterInfo **res)
@@ -2352,9 +2399,7 @@
struct spoolss_OpenPrinterEx r;
 
ZERO_STRUCT(r);
-   r.in.printername = talloc_asprintf(
-   mem_ctx, %s,
-   lp_parm_string(-1, torture, host));
+   r.in.printername = localhost;
r.in.datatype = NULL;
r.in.access_mask = 0;
r.in.level = 1;
@@ -2368,6 +2413,13 @@
talloc_free(mem_ctx);
return False;
}
+   if (!W_ERROR_IS_OK(r.out.result)) {
+   d_printf((%s) dcerpc_spoolss_OpenPrinterEx failed: 
+%s\n, __location__,
+win_errstr(r.out.result));
+   talloc_free(mem_ctx);
+   return False;
+   }
}
 
{
@@ -2383,6 +2435,13 @@
talloc_free(mem_ctx);
return False;
}
+   if (!W_ERROR_IS_OK(r.out.result)) {
+   d_printf((%s) dcerpc_spoolss_ClosePrinter failed: 
+%s\n, __location__,
+win_errstr(r.out.result));
+   talloc_free(mem_ctx);
+   return False;
+   }
}
 
{
@@ -2390,8 +2449,7 @@
 
ZERO_STRUCT(r);
r.in.printername = talloc_asprintf(
-   mem_ctx, %s\\%s, dcerpc_server_name(p),
-   printers[0]);
+   mem_ctx, localhost\\%s, printers[0]);
r.in.datatype = NULL;
r.in.access_mask = 0;
r.in.level = 1;
@@ -2405,6 +2463,13 @@
talloc_free(mem_ctx);
return False;
}
+   if (!W_ERROR_IS_OK(r.out.result)) {
+   d_printf((%s) dcerpc_spoolss_OpenPrinterEx failed: 
+%s\n, __location__,
+win_errstr(r.out.result));
+   talloc_free(mem_ctx);
+   return False;
+   }
}
 
{
@@ -2441,6 +2506,12 @@
}
}
 
+   if (!enumprinters(mem_ctx, p, 1)) {
+   d_printf((%s) enumprinters failed\n, __location__);
+   talloc_free(mem_ctx);
+  

svn commit: samba r19028 - in branches/SAMBA_3_0/source: include rpc_parse rpc_server

2006-10-02 Thread vlendec
Author: vlendec
Date: 2006-10-02 08:38:54 + (Mon, 02 Oct 2006)
New Revision: 19028

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

Log:
Implement getprinterinfo level 6 (only the status) and get rid of snum in the
getprinter calls. Survives the RPC-SAMBA3-SPOOLSS test which I will activate
when the Samba4 build farm has picked it up.

Volker

Modified:
   branches/SAMBA_3_0/source/include/rpc_spoolss.h
   branches/SAMBA_3_0/source/rpc_parse/parse_spoolss.c
   branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c


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


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

2006-10-02 Thread metze
Author: metze
Date: 2006-10-02 08:56:35 + (Mon, 02 Oct 2006)
New Revision: 19029

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

Log:
test if opendir() on a file sets errno = ENOTDIR

metze
Modified:
   branches/SAMBA_4_0/source/lib/replace/test/os2_delete.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/test/os2_delete.c
===
--- branches/SAMBA_4_0/source/lib/replace/test/os2_delete.c 2006-10-02 
08:38:54 UTC (rev 19028)
+++ branches/SAMBA_4_0/source/lib/replace/test/os2_delete.c 2006-10-02 
08:56:35 UTC (rev 19029)
@@ -21,7 +21,7 @@
 
 static int test_readdir_os2_delete_ret;
 
-#define FAILED(d) (fprintf(stderr, Failed for %s - %s\n, d, 
strerror(errno)), test_readdir_os2_delete_ret = 1, 1)
+#define FAILED(d) (fprintf(stderr, Failed for %s - %d = %s\n, d, errno, 
strerror(errno)), test_readdir_os2_delete_ret = 1, 1)
 
 #ifndef MIN
 #define MIN(a,b) ((a)(b)?(a):(b))
@@ -87,7 +87,11 @@
 
cleanup();
create_files();
-   
+
+   d = opendir(TESTDIR /test0.txt);
+   if (d != NULL) FAILED(opendir() on file succeed);
+   if (errno != ENOTDIR) FAILED(opendir() on file didn't give ENOTDIR);
+
d = opendir(TESTDIR);
 
/* skip past . and .. */



svn commit: samba r19030 - in branches/SAMBA_3_0/source/lib/replace: .

2006-10-02 Thread metze
Author: metze
Date: 2006-10-02 09:20:18 + (Mon, 02 Oct 2006)
New Revision: 19030

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

Log:
merge missing stuff from samba4:

- strnlen() and strndup() are broken on AIX
- we need some extra CFLAGS on HPUX 11.11

metze
Modified:
   branches/SAMBA_3_0/source/lib/replace/libreplace_cc.m4
   branches/SAMBA_3_0/source/lib/replace/replace.h


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/libreplace_cc.m4
===
--- branches/SAMBA_3_0/source/lib/replace/libreplace_cc.m4  2006-10-02 
08:56:35 UTC (rev 19029)
+++ branches/SAMBA_3_0/source/lib/replace/libreplace_cc.m4  2006-10-02 
09:20:18 UTC (rev 19030)
@@ -60,8 +60,14 @@
*hpux*)
# mmap on HPUX is completely broken...
AC_DEFINE(MMAP_BLACKLIST, 1, [Whether MMAP is broken])
+   if test `uname -r` = B.11.11; then
+   AC_MSG_WARN([Enabling HPUX 11.11 header bug workaround])
+   CFLAGS=$CFLAGS -D_LARGEFILE64_SUPPORT -D__LP64__ 
-DO_LARGEFILE=04000
+   fi
;;
*aix*)
+   AC_DEFINE(BROKEN_STRNDUP, 1, [Whether strndup is broken])
+   AC_DEFINE(BROKEN_STRNLEN, 1, [Whether strnlen is broken])
if test ${GCC} != yes; then
## for funky AIX compiler using strncpy()
CFLAGS=$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000

Modified: branches/SAMBA_3_0/source/lib/replace/replace.h
===
--- branches/SAMBA_3_0/source/lib/replace/replace.h 2006-10-02 08:56:35 UTC 
(rev 19029)
+++ branches/SAMBA_3_0/source/lib/replace/replace.h 2006-10-02 09:20:18 UTC 
(rev 19030)
@@ -121,12 +121,14 @@
 size_t rep_strlcat(char *d, const char *s, size_t bufsize);
 #endif
 
-#ifndef HAVE_STRNDUP
+#if (defined(BROKEN_STRNDUP) || !defined(HAVE_STRNDUP))
+#undef HAVE_STRNDUP
 #define strndup rep_strndup
 char *rep_strndup(const char *s, size_t n);
 #endif
 
-#ifndef HAVE_STRNLEN
+#if (defined(BROKEN_STRNLEN) || !defined(HAVE_STRNLEN))
+#undef HAVE_STRNLEN
 #define strnlen rep_strnlen
 size_t rep_strnlen(const char *s, size_t n);
 #endif



svn commit: samba r19031 - in branches/SAMBA_3_0/source/lib/replace/test: .

2006-10-02 Thread metze
Author: metze
Date: 2006-10-02 09:21:20 + (Mon, 02 Oct 2006)
New Revision: 19031

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

Log:
merge from samba4:

add test that opendir() on files sets errno = ENOTDIR

metze
Modified:
   branches/SAMBA_3_0/source/lib/replace/test/os2_delete.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/test/os2_delete.c
===
--- branches/SAMBA_3_0/source/lib/replace/test/os2_delete.c 2006-10-02 
09:20:18 UTC (rev 19030)
+++ branches/SAMBA_3_0/source/lib/replace/test/os2_delete.c 2006-10-02 
09:21:20 UTC (rev 19031)
@@ -21,7 +21,7 @@
 
 static int test_readdir_os2_delete_ret;
 
-#define FAILED(d) (fprintf(stderr, Failed for %s - %s\n, d, 
strerror(errno)), test_readdir_os2_delete_ret = 1, 1)
+#define FAILED(d) (fprintf(stderr, Failed for %s - %d = %s\n, d, errno, 
strerror(errno)), test_readdir_os2_delete_ret = 1, 1)
 
 #ifndef MIN
 #define MIN(a,b) ((a)(b)?(a):(b))
@@ -87,7 +87,11 @@
 
cleanup();
create_files();
-   
+
+   d = opendir(TESTDIR /test0.txt);
+   if (d != NULL) FAILED(opendir() on file succeed);
+   if (errno != ENOTDIR) FAILED(opendir() on file didn't give ENOTDIR);
+
d = opendir(TESTDIR);
 
/* skip past . and .. */



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

2006-10-02 Thread metze
Author: metze
Date: 2006-10-02 09:26:05 + (Mon, 02 Oct 2006)
New Revision: 19032

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

Log:
let the getdents replacement fail and see what the build-farm says.

metze
Modified:
   branches/SAMBA_4_0/source/lib/replace/repdir.m4


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/repdir.m4
===
--- branches/SAMBA_4_0/source/lib/replace/repdir.m4 2006-10-02 09:21:20 UTC 
(rev 19031)
+++ branches/SAMBA_4_0/source/lib/replace/repdir.m4 2006-10-02 09:26:05 UTC 
(rev 19032)
@@ -54,6 +54,7 @@
 AC_CACHE_CHECK([for replacing readdir using 
getdents()],libreplace_cv_READDIR_GETDENTS,[
AC_TRY_RUN([
 #define _LIBREPLACE_REPLACE_H
+#error _donot_use_getdents_replacement_anymore
 #include $libreplacedir/repdir_getdents.c
 #define test_readdir_os2_delete main
 #include $libreplacedir/test/os2_delete.c],



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

2006-10-02 Thread metze
Author: metze
Date: 2006-10-02 10:35:40 + (Mon, 02 Oct 2006)
New Revision: 19033

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

Log:
prepare to use the libreplace testsuite as LOCAL-REPLACE in smbtorture

metze
Modified:
   branches/SAMBA_4_0/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_4_0/source/lib/replace/test/testsuite.c  2006-10-02 
09:26:05 UTC (rev 19032)
+++ branches/SAMBA_4_0/source/lib/replace/test/testsuite.c  2006-10-02 
10:35:40 UTC (rev 19033)
@@ -89,7 +89,7 @@
char buf[4];
const struct {
const char *src;
-   int result;
+   size_t result;
} tests[] = {
{ abc, 3 },
{ abcdef, 6 },
@@ -373,9 +373,11 @@
return true;
 }
 
-int torture_local_replace(void *ctx)
+struct torture_context;
+
+bool torture_local_replace(struct torture_context *torture)
 {
-   int ret = true;
+   bool ret = true;
ret = test_ftruncate();
ret = test_strlcpy();
ret = test_strlcat();
@@ -423,7 +425,7 @@
return ret;
 }
 
-#if !defined(_SAMBA_BUILD_) || 
((SAMBA_VERSION_MAJOR==3)(SAMBA_VERSION_MINOR9))
+#if _SAMBA_BUILD_4
 int main(void)
 {
if (!torture_local_replace(NULL)) {



svn commit: samba r19034 - in branches/SAMBA_3_0/source/lib/replace/test: .

2006-10-02 Thread metze
Author: metze
Date: 2006-10-02 10:37:17 + (Mon, 02 Oct 2006)
New Revision: 19034

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

Log:
merge from samba4:

prepare libreplace testsuite for usage in smbtorture

metze
Modified:
   branches/SAMBA_3_0/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_3_0/source/lib/replace/test/testsuite.c  2006-10-02 
10:35:40 UTC (rev 19033)
+++ branches/SAMBA_3_0/source/lib/replace/test/testsuite.c  2006-10-02 
10:37:17 UTC (rev 19034)
@@ -89,7 +89,7 @@
char buf[4];
const struct {
const char *src;
-   int result;
+   size_t result;
} tests[] = {
{ abc, 3 },
{ abcdef, 6 },
@@ -373,9 +373,11 @@
return true;
 }
 
-int torture_local_replace(void *ctx)
+struct torture_context;
+
+bool torture_local_replace(struct torture_context *torture)
 {
-   int ret = true;
+   bool ret = true;
ret = test_ftruncate();
ret = test_strlcpy();
ret = test_strlcat();
@@ -423,7 +425,7 @@
return ret;
 }
 
-#if !defined(_SAMBA_BUILD_) || 
((SAMBA_VERSION_MAJOR==3)(SAMBA_VERSION_MINOR9))
+#if _SAMBA_BUILD_4
 int main(void)
 {
if (!torture_local_replace(NULL)) {



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

2006-10-02 Thread metze
Author: metze
Date: 2006-10-02 10:38:24 + (Mon, 02 Oct 2006)
New Revision: 19035

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

Log:
add LOCAL-REPLACE test

metze
Modified:
   branches/SAMBA_4_0/source/torture/local/config.mk
   branches/SAMBA_4_0/source/torture/local/local.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/local/config.mk
===
--- branches/SAMBA_4_0/source/torture/local/config.mk   2006-10-02 10:37:17 UTC 
(rev 19034)
+++ branches/SAMBA_4_0/source/torture/local/config.mk   2006-10-02 10:38:24 UTC 
(rev 19035)
@@ -7,6 +7,8 @@
proto.h
 OBJ_FILES = \
iconv.o \
+   ../../lib/replace/test/testsuite.o \
+   ../../lib/replace/test/os2_delete.o \
../../lib/talloc/testsuite.o \
../../lib/crypto/md4test.o \
../../lib/crypto/md5test.o \

Modified: branches/SAMBA_4_0/source/torture/local/local.c
===
--- branches/SAMBA_4_0/source/torture/local/local.c 2006-10-02 10:37:17 UTC 
(rev 19034)
+++ branches/SAMBA_4_0/source/torture/local/local.c 2006-10-02 10:38:24 UTC 
(rev 19035)
@@ -50,6 +50,7 @@
int i;
TALLOC_CTX *mem_ctx = talloc_autofree_context();
 
+   register_torture_op(LOCAL-REPLACE, torture_local_replace);
register_torture_op(LOCAL-TALLOC, torture_local_talloc);
register_torture_op(LOCAL-CRYPTO-MD4, torture_local_crypto_md4);
register_torture_op(LOCAL-CRYPTO-MD5, torture_local_crypto_md5);



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

2006-10-02 Thread metze
Author: metze
Date: 2006-10-02 10:45:00 + (Mon, 02 Oct 2006)
New Revision: 19036

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

Log:
add LOCAL-REPLACE and reorder the testlist

metze
Modified:
   branches/SAMBA_4_0/source/script/tests/test_local.sh


Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/test_local.sh
===
--- branches/SAMBA_4_0/source/script/tests/test_local.sh2006-10-02 
10:38:24 UTC (rev 19035)
+++ branches/SAMBA_4_0/source/script/tests/test_local.sh2006-10-02 
10:45:00 UTC (rev 19036)
@@ -1,9 +1,11 @@
 #!/bin/sh
 
-local_tests=LOCAL-NTLMSSP LOCAL-TALLOC LOCAL-MESSAGING LOCAL-IRPC
-local_tests=$local_tests LOCAL-BINDING LOCAL-IDTREE LOCAL-SOCKET
-local_tests=$local_tests LOCAL-PAC LOCAL-STRLIST LOCAL-SDDL LOCAL-NDR
-local_tests=$local_tests LOCAL-EVENT LOCAL-CRYPTO-MD4
+local_tests=LOCAL-REPLACE LOCAL-TALLOC LOCAL-STRLIST
+local_tests=$local_tests LOCAL-IDTREE LOCAL-EVENT
+local_tests=$local_tests LOCAL-SOCKET LOCAL-MESSAGING LOCAL-IRPC
+local_tests=$local_tests LOCAL-NDR LOCAL-BINDING
+local_tests=$local_tests LOCAL-SDDL LOCAL-PAC
+local_tests=$local_tests LOCAL-NTLMSSP LOCAL-CRYPTO-MD4
 local_tests=$local_tests LOCAL-CRYPTO-MD5 LOCAL-CRYPTO-HMACMD5
 local_tests=$local_tests LOCAL-CRYPTO-SHA1 LOCAL-CRYPTO-HMACSHA1
 



svn commit: samba r19037 - in branches: SAMBA_3_0/source/libsmb SAMBA_3_0_23/source/libsmb

2006-10-02 Thread vlendec
Author: vlendec
Date: 2006-10-02 11:03:53 + (Mon, 02 Oct 2006)
New Revision: 19037

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

Log:
Fix a segfault
Modified:
   branches/SAMBA_3_0/source/libsmb/clispnego.c
   branches/SAMBA_3_0_23/source/libsmb/clispnego.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/clispnego.c
===
--- branches/SAMBA_3_0/source/libsmb/clispnego.c2006-10-02 10:45:00 UTC 
(rev 19036)
+++ branches/SAMBA_3_0/source/libsmb/clispnego.c2006-10-02 11:03:53 UTC 
(rev 19037)
@@ -165,7 +165,7 @@
ret = !data.has_error;
if (data.has_error) {
int j;
-   SAFE_FREE(principal);
+   SAFE_FREE(*principal);
for(j = 0; j  i  j  ASN1_MAX_OIDS-1; j++) {
SAFE_FREE(OIDs[j]);
}

Modified: branches/SAMBA_3_0_23/source/libsmb/clispnego.c
===
--- branches/SAMBA_3_0_23/source/libsmb/clispnego.c 2006-10-02 10:45:00 UTC 
(rev 19036)
+++ branches/SAMBA_3_0_23/source/libsmb/clispnego.c 2006-10-02 11:03:53 UTC 
(rev 19037)
@@ -165,7 +165,7 @@
ret = !data.has_error;
if (data.has_error) {
int j;
-   SAFE_FREE(principal);
+   SAFE_FREE(*principal);
for(j = 0; j  i  j  ASN1_MAX_OIDS-1; j++) {
SAFE_FREE(OIDs[j]);
}



svn commit: samba r19039 - in branches: SAMBA_3_0/source/libads SAMBA_3_0/source/utils SAMBA_3_0_23/source/libads SAMBA_3_0_23/source/utils

2006-10-02 Thread gd
Author: gd
Date: 2006-10-02 12:06:49 + (Mon, 02 Oct 2006)
New Revision: 19039

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

Log:
Do not segfault in net ads printer info when a requested printserver
does not exist.

Guenther

Modified:
   branches/SAMBA_3_0/source/libads/ldap_printer.c
   branches/SAMBA_3_0/source/utils/net_ads.c
   branches/SAMBA_3_0_23/source/libads/ldap_printer.c
   branches/SAMBA_3_0_23/source/utils/net_ads.c


Changeset:
Modified: branches/SAMBA_3_0/source/libads/ldap_printer.c
===
--- branches/SAMBA_3_0/source/libads/ldap_printer.c 2006-10-02 11:35:41 UTC 
(rev 19038)
+++ branches/SAMBA_3_0/source/libads/ldap_printer.c 2006-10-02 12:06:49 UTC 
(rev 19039)
@@ -41,8 +41,18 @@
  servername));
return status;
}
+   if (ads_count_replies(ads, *res) != 1) {
+   return ADS_ERROR(LDAP_NO_SUCH_OBJECT);
+   }
srv_dn = ldap_get_dn(ads-ld, *res);
+   if (srv_dn == NULL) {
+   return ADS_ERROR(LDAP_NO_MEMORY);
+   }
srv_cn = ldap_explode_dn(srv_dn, 1);
+   if (srv_cn == NULL) {
+   ldap_memfree(srv_dn);
+   return ADS_ERROR(LDAP_INVALID_DN_SYNTAX);
+   }
ads_msgfree(ads, *res);
 
asprintf(s, (cn=%s-%s), srv_cn[0], printer);

Modified: branches/SAMBA_3_0/source/utils/net_ads.c
===
--- branches/SAMBA_3_0/source/utils/net_ads.c   2006-10-02 11:35:41 UTC (rev 
19038)
+++ branches/SAMBA_3_0/source/utils/net_ads.c   2006-10-02 12:06:49 UTC (rev 
19039)
@@ -1634,7 +1634,8 @@
rc = ads_find_printer_on_server(ads, res, printername, servername);
 
if (!ADS_ERR_OK(rc)) {
-   d_fprintf(stderr, ads_find_printer_on_server: %s\n, 
ads_errstr(rc));
+   d_fprintf(stderr, Server '%s' not found: %s\n, 
+   servername, ads_errstr(rc));
ads_msgfree(ads, res);
ads_destroy(ads);
return -1;

Modified: branches/SAMBA_3_0_23/source/libads/ldap_printer.c
===
--- branches/SAMBA_3_0_23/source/libads/ldap_printer.c  2006-10-02 11:35:41 UTC 
(rev 19038)
+++ branches/SAMBA_3_0_23/source/libads/ldap_printer.c  2006-10-02 12:06:49 UTC 
(rev 19039)
@@ -40,8 +40,18 @@
  servername));
return status;
}
+   if (ads_count_replies(ads, *res) != 1) {
+   return ADS_ERROR(LDAP_NO_SUCH_OBJECT);
+   }
srv_dn = ldap_get_dn(ads-ld, *res);
+   if (srv_dn == NULL) {
+   return ADS_ERROR(LDAP_NO_MEMORY);
+   }
srv_cn = ldap_explode_dn(srv_dn, 1);
+   if (srv_cn == NULL) {
+   ldap_memfree(srv_dn);
+   return ADS_ERROR(LDAP_INVALID_DN_SYNTAX);
+   }
ads_msgfree(ads, *res);
 
asprintf(s, (cn=%s-%s), srv_cn[0], printer);

Modified: branches/SAMBA_3_0_23/source/utils/net_ads.c
===
--- branches/SAMBA_3_0_23/source/utils/net_ads.c2006-10-02 11:35:41 UTC 
(rev 19038)
+++ branches/SAMBA_3_0_23/source/utils/net_ads.c2006-10-02 12:06:49 UTC 
(rev 19039)
@@ -1426,7 +1426,8 @@
rc = ads_find_printer_on_server(ads, res, printername, servername);
 
if (!ADS_ERR_OK(rc)) {
-   d_fprintf(stderr, ads_find_printer_on_server: %s\n, 
ads_errstr(rc));
+   d_fprintf(stderr, Server '%s' not found: %s\n, 
+   servername, ads_errstr(rc));
ads_msgfree(ads, res);
ads_destroy(ads);
return -1;



svn commit: samba r19040 - in branches/SAMBA_3_0/source/script/tests: .

2006-10-02 Thread metze
Author: metze
Date: 2006-10-02 12:24:51 + (Mon, 02 Oct 2006)
New Revision: 19040

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

Log:
use more portable shellscripting, hopefully give better results on Tru64

metze
Modified:
   branches/SAMBA_3_0/source/script/tests/gdb_backtrace


Changeset:
Modified: branches/SAMBA_3_0/source/script/tests/gdb_backtrace
===
--- branches/SAMBA_3_0/source/script/tests/gdb_backtrace2006-10-02 
12:06:49 UTC (rev 19039)
+++ branches/SAMBA_3_0/source/script/tests/gdb_backtrace2006-10-02 
12:24:51 UTC (rev 19040)
@@ -5,9 +5,9 @@
 # we want everything on stderr, so the program is not disturbed
 exec 12
 
-BASENAME=$( basename $0)
+BASENAME=`basename $0`
 
-test -z ${GDB_BIN}  GDB_BIN=$( type -p gdb)
+test -z ${GDB_BIN}  GDB_BIN=`type -p gdb`
 if [ -z ${GDB_BIN} ]; then
echo ERROR: ${BASENAME} needs an installed gdb. 
exit 1



svn commit: samba r19041 - in branches/SAMBA_3_0/source/libsmb: .

2006-10-02 Thread vlendec
Author: vlendec
Date: 2006-10-02 12:54:49 + (Mon, 02 Oct 2006)
New Revision: 19041

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

Log:
Make us connect to Vista RC1. Apparently metze had done the same patch some
weeks ago.

We have some work before us, when in AD mode Vista sends
[EMAIL PROTECTED] as the principal.

Volker

Modified:
   branches/SAMBA_3_0/source/libsmb/cliconnect.c
   branches/SAMBA_3_0/source/libsmb/clispnego.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/cliconnect.c
===
--- branches/SAMBA_3_0/source/libsmb/cliconnect.c   2006-10-02 12:24:51 UTC 
(rev 19040)
+++ branches/SAMBA_3_0/source/libsmb/cliconnect.c   2006-10-02 12:54:49 UTC 
(rev 19041)
@@ -762,8 +762,21 @@
 #endif
free(OIDs[i]);
}
-   DEBUG(3,(got principal=%s\n, principal));
 
+   DEBUG(3,(got principal=%s\n, principal ? principal : null));
+
+   if (got_kerberos_mechanism  (principal == NULL)) {
+   /*
+* It is WRONG to depend on the principal sent in the negprot
+* reply, but right now we do it. So for safety (don't
+* segfault later) disable Kerberos when no principal was
+* sent. -- VL
+*/
+   DEBUG(1, (Kerberos mech was offered, but no principal was 
sent\n));
+   DEBUGADD(1, (Disabling Kerberos\n));
+   cli-use_kerberos = False;
+   }
+
fstrcpy(cli-user_name, user);
 
 #ifdef HAVE_KRB5

Modified: branches/SAMBA_3_0/source/libsmb/clispnego.c
===
--- branches/SAMBA_3_0/source/libsmb/clispnego.c2006-10-02 12:24:51 UTC 
(rev 19040)
+++ branches/SAMBA_3_0/source/libsmb/clispnego.c2006-10-02 12:54:49 UTC 
(rev 19041)
@@ -149,13 +149,16 @@
asn1_end_tag(data);
asn1_end_tag(data);
 
-   asn1_start_tag(data, ASN1_CONTEXT(3));
-   asn1_start_tag(data, ASN1_SEQUENCE(0));
-   asn1_start_tag(data, ASN1_CONTEXT(0));
-   asn1_read_GeneralString(data,principal);
-   asn1_end_tag(data);
-   asn1_end_tag(data);
-   asn1_end_tag(data);
+   *principal = NULL;
+   if (asn1_tag_remaining(data)  0) {
+   asn1_start_tag(data, ASN1_CONTEXT(3));
+   asn1_start_tag(data, ASN1_SEQUENCE(0));
+   asn1_start_tag(data, ASN1_CONTEXT(0));
+   asn1_read_GeneralString(data,principal);
+   asn1_end_tag(data);
+   asn1_end_tag(data);
+   asn1_end_tag(data);
+   }
 
asn1_end_tag(data);
asn1_end_tag(data);



svn commit: samba r19042 - in branches/SAMBA_3_0/source/libsmb: .

2006-10-02 Thread vlendec
Author: vlendec
Date: 2006-10-02 13:09:42 + (Mon, 02 Oct 2006)
New Revision: 19042

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

Log:
Fix the non-krb5 build. This needs sooo severe cleanup ... :-)

Volker

Modified:
   branches/SAMBA_3_0/source/libsmb/cliconnect.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/cliconnect.c
===
--- branches/SAMBA_3_0/source/libsmb/cliconnect.c   2006-10-02 12:54:49 UTC 
(rev 19041)
+++ branches/SAMBA_3_0/source/libsmb/cliconnect.c   2006-10-02 13:09:42 UTC 
(rev 19042)
@@ -765,6 +765,7 @@
 
DEBUG(3,(got principal=%s\n, principal ? principal : null));
 
+#ifdef HAVE_KRB5
if (got_kerberos_mechanism  (principal == NULL)) {
/*
 * It is WRONG to depend on the principal sent in the negprot
@@ -776,6 +777,7 @@
DEBUGADD(1, (Disabling Kerberos\n));
cli-use_kerberos = False;
}
+#endif
 
fstrcpy(cli-user_name, user);
 



svn commit: samba r19043 - in branches/SAMBA_3_0/source/libsmb: .

2006-10-02 Thread vlendec
Author: vlendec
Date: 2006-10-02 13:30:05 + (Mon, 02 Oct 2006)
New Revision: 19043

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

Log:
There's no point in #ifdef'ing the detection whether we were offered KRB5 in
SPNEGO, as long as we don't make use of it without krb libs. Makes the code a
bit simpler.

Volker

Modified:
   branches/SAMBA_3_0/source/libsmb/cliconnect.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/cliconnect.c
===
--- branches/SAMBA_3_0/source/libsmb/cliconnect.c   2006-10-02 13:09:42 UTC 
(rev 19042)
+++ branches/SAMBA_3_0/source/libsmb/cliconnect.c   2006-10-02 13:30:05 UTC 
(rev 19043)
@@ -723,9 +723,7 @@
char *principal;
char *OIDs[ASN1_MAX_OIDS];
int i;
-#ifdef HAVE_KRB5
BOOL got_kerberos_mechanism = False;
-#endif
DATA_BLOB blob;
 
DEBUG(3,(Doing spnego session setup (blob length=%lu)\n, (unsigned 
long)cli-secblob.length));
@@ -754,18 +752,15 @@
/* make sure the server understands kerberos */
for (i=0;OIDs[i];i++) {
DEBUG(3,(got OID=%s\n, OIDs[i]));
-#ifdef HAVE_KRB5
if (strcmp(OIDs[i], OID_KERBEROS5_OLD) == 0 ||
strcmp(OIDs[i], OID_KERBEROS5) == 0) {
got_kerberos_mechanism = True;
}
-#endif
free(OIDs[i]);
}
 
DEBUG(3,(got principal=%s\n, principal ? principal : null));
 
-#ifdef HAVE_KRB5
if (got_kerberos_mechanism  (principal == NULL)) {
/*
 * It is WRONG to depend on the principal sent in the negprot
@@ -773,11 +768,10 @@
 * segfault later) disable Kerberos when no principal was
 * sent. -- VL
 */
-   DEBUG(1, (Kerberos mech was offered, but no principal was 
sent\n));
-   DEBUGADD(1, (Disabling Kerberos\n));
+   DEBUG(1, (Kerberos mech was offered, but no principal was 
+ sent, disabling Kerberos\n));
cli-use_kerberos = False;
}
-#endif
 
fstrcpy(cli-user_name, user);
 



svn commit: samba r19044 - in branches/tmp/vl-messaging: . examples/LDAP examples/libsmbclient examples/misc packaging/Debian/debian-sarge packaging/Debian/debian-woody packaging/RHEL packaging/RHEL/s

2006-10-02 Thread ab
Author: ab
Date: 2006-10-02 13:30:37 + (Mon, 02 Oct 2006)
New Revision: 19044

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

Log:
Merge vl-messaging with SAMBA_3_0 -r 17384:19040. Handle talloc and dlinklist 
API changes for messaging code.
Added:
   branches/tmp/vl-messaging/.bzrignore
   branches/tmp/vl-messaging/source/.valgrind_suppressions
   branches/tmp/vl-messaging/source/TODO
   branches/tmp/vl-messaging/source/groupdb/mapping.h
   branches/tmp/vl-messaging/source/groupdb/mapping_ldb.c
   branches/tmp/vl-messaging/source/groupdb/mapping_tdb.c
   branches/tmp/vl-messaging/source/include/ads_protos.h
   branches/tmp/vl-messaging/source/include/core.h
   branches/tmp/vl-messaging/source/include/core/
   branches/tmp/vl-messaging/source/include/dcerpc.h
   branches/tmp/vl-messaging/source/include/ndr.h
   branches/tmp/vl-messaging/source/lib/ldb/
   branches/tmp/vl-messaging/source/lib/replace/
   branches/tmp/vl-messaging/source/lib/socket_wrapper/
   branches/tmp/vl-messaging/source/lib/talloc/
   branches/tmp/vl-messaging/source/lib/util_nscd.c
   branches/tmp/vl-messaging/source/libaddns/
   branches/tmp/vl-messaging/source/libgpo/
   branches/tmp/vl-messaging/source/libgpo/gpo_filesync.c
   branches/tmp/vl-messaging/source/librpc/
   branches/tmp/vl-messaging/source/modules/README.nfs4acls.txt
   branches/tmp/vl-messaging/source/modules/nfs4_acls.c
   branches/tmp/vl-messaging/source/modules/nfs4_acls.h
   branches/tmp/vl-messaging/source/modules/vfs_aixacl2.c
   branches/tmp/vl-messaging/source/nsswitch/winbindd_ccache_access.c
   branches/tmp/vl-messaging/source/printing/print_test.c
   branches/tmp/vl-messaging/source/rpc_server/srv_initshutdown_nt.c
   branches/tmp/vl-messaging/source/rpc_server/srv_winreg_nt.c
   branches/tmp/vl-messaging/source/script/build_idl.sh
   branches/tmp/vl-messaging/source/script/tests/test_groupmap.sh
   branches/tmp/vl-messaging/source/script/tests/test_local_s3.sh
   branches/tmp/vl-messaging/source/tdb/Makefile.in
   branches/tmp/vl-messaging/source/tdb/aclocal.m4
   branches/tmp/vl-messaging/source/tdb/autogen.sh
   branches/tmp/vl-messaging/source/tdb/bin/
   branches/tmp/vl-messaging/source/tdb/common/
   branches/tmp/vl-messaging/source/tdb/config.m4
   branches/tmp/vl-messaging/source/tdb/config.mk
   branches/tmp/vl-messaging/source/tdb/configure.in
   branches/tmp/vl-messaging/source/tdb/docs/
   branches/tmp/vl-messaging/source/tdb/include/
   branches/tmp/vl-messaging/source/tdb/swig/
   branches/tmp/vl-messaging/source/tdb/tdb.pc.in
   branches/tmp/vl-messaging/source/tdb/tools/
   branches/tmp/vl-messaging/source/utils/net_dns.c
Removed:
   branches/tmp/vl-messaging/source/include/rpc_dfs.h
   branches/tmp/vl-messaging/source/include/rpc_echo.h
   branches/tmp/vl-messaging/source/include/rpc_reg.h
   branches/tmp/vl-messaging/source/include/rpc_shutdown.h
   branches/tmp/vl-messaging/source/include/rpc_srvsvc.h
   branches/tmp/vl-messaging/source/include/rpc_unixinfo.h
   branches/tmp/vl-messaging/source/include/rpc_wkssvc.h
   branches/tmp/vl-messaging/source/include/socket_wrapper.h
   branches/tmp/vl-messaging/source/include/talloc.h
   branches/tmp/vl-messaging/source/lib/getsmbpass.c
   branches/tmp/vl-messaging/source/lib/replace.c
   branches/tmp/vl-messaging/source/lib/replace1.c
   branches/tmp/vl-messaging/source/lib/snprintf.c
   branches/tmp/vl-messaging/source/lib/socket_wrapper.c
   branches/tmp/vl-messaging/source/lib/talloc.c
   branches/tmp/vl-messaging/source/lib/talloctort.c
   branches/tmp/vl-messaging/source/lib/timegm.c
   branches/tmp/vl-messaging/source/libads/gpo.c
   branches/tmp/vl-messaging/source/libads/gpo_util.c
   branches/tmp/vl-messaging/source/libndr/
   branches/tmp/vl-messaging/source/libsmb/gpo.c
   branches/tmp/vl-messaging/source/rpc_client/cli_dfs.c
   branches/tmp/vl-messaging/source/rpc_client/cli_echo.c
   branches/tmp/vl-messaging/source/rpc_client/cli_shutdown.c
   branches/tmp/vl-messaging/source/rpc_client/cli_srvsvc.c
   branches/tmp/vl-messaging/source/rpc_client/cli_unixinfo.c
   branches/tmp/vl-messaging/source/rpc_client/cli_wkssvc.c
   branches/tmp/vl-messaging/source/rpc_parse/parse_dfs.c
   branches/tmp/vl-messaging/source/rpc_parse/parse_echo.c
   branches/tmp/vl-messaging/source/rpc_parse/parse_reg.c
   branches/tmp/vl-messaging/source/rpc_parse/parse_shutdown.c
   branches/tmp/vl-messaging/source/rpc_parse/parse_srv.c
   branches/tmp/vl-messaging/source/rpc_parse/parse_unixinfo.c
   branches/tmp/vl-messaging/source/rpc_parse/parse_wks.c
   branches/tmp/vl-messaging/source/rpc_server/srv_dfs.c
   branches/tmp/vl-messaging/source/rpc_server/srv_echo.c
   branches/tmp/vl-messaging/source/rpc_server/srv_reg.c
   branches/tmp/vl-messaging/source/rpc_server/srv_reg_nt.c
   branches/tmp/vl-messaging/source/rpc_server/srv_srvsvc.c
   branches/tmp/vl-messaging/source/rpc_server/srv_unixinfo.c
   branches/tmp/vl-messaging/source/rpc_server/srv_wkssvc.c
   

svn commit: samba r19045 - in branches/tmp/vl-messaging/source/libsmb: .

2006-10-02 Thread ab
Author: ab
Date: 2006-10-02 13:35:07 + (Mon, 02 Oct 2006)
New Revision: 19045

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

Log:
Merge segfault fixes from Volker. -r 19040:19044
Modified:
   branches/tmp/vl-messaging/source/libsmb/cliconnect.c
   branches/tmp/vl-messaging/source/libsmb/clispnego.c


Changeset:
Modified: branches/tmp/vl-messaging/source/libsmb/cliconnect.c
===
--- branches/tmp/vl-messaging/source/libsmb/cliconnect.c2006-10-02 
13:30:37 UTC (rev 19044)
+++ branches/tmp/vl-messaging/source/libsmb/cliconnect.c2006-10-02 
13:35:07 UTC (rev 19045)
@@ -723,9 +723,7 @@
char *principal;
char *OIDs[ASN1_MAX_OIDS];
int i;
-#ifdef HAVE_KRB5
BOOL got_kerberos_mechanism = False;
-#endif
DATA_BLOB blob;
 
DEBUG(3,(Doing spnego session setup (blob length=%lu)\n, (unsigned 
long)cli-secblob.length));
@@ -754,16 +752,27 @@
/* make sure the server understands kerberos */
for (i=0;OIDs[i];i++) {
DEBUG(3,(got OID=%s\n, OIDs[i]));
-#ifdef HAVE_KRB5
if (strcmp(OIDs[i], OID_KERBEROS5_OLD) == 0 ||
strcmp(OIDs[i], OID_KERBEROS5) == 0) {
got_kerberos_mechanism = True;
}
-#endif
free(OIDs[i]);
}
-   DEBUG(3,(got principal=%s\n, principal));
 
+   DEBUG(3,(got principal=%s\n, principal ? principal : null));
+
+   if (got_kerberos_mechanism  (principal == NULL)) {
+   /*
+* It is WRONG to depend on the principal sent in the negprot
+* reply, but right now we do it. So for safety (don't
+* segfault later) disable Kerberos when no principal was
+* sent. -- VL
+*/
+   DEBUG(1, (Kerberos mech was offered, but no principal was 
+ sent, disabling Kerberos\n));
+   cli-use_kerberos = False;
+   }
+
fstrcpy(cli-user_name, user);
 
 #ifdef HAVE_KRB5

Modified: branches/tmp/vl-messaging/source/libsmb/clispnego.c
===
--- branches/tmp/vl-messaging/source/libsmb/clispnego.c 2006-10-02 13:30:37 UTC 
(rev 19044)
+++ branches/tmp/vl-messaging/source/libsmb/clispnego.c 2006-10-02 13:35:07 UTC 
(rev 19045)
@@ -149,13 +149,16 @@
asn1_end_tag(data);
asn1_end_tag(data);
 
-   asn1_start_tag(data, ASN1_CONTEXT(3));
-   asn1_start_tag(data, ASN1_SEQUENCE(0));
-   asn1_start_tag(data, ASN1_CONTEXT(0));
-   asn1_read_GeneralString(data,principal);
-   asn1_end_tag(data);
-   asn1_end_tag(data);
-   asn1_end_tag(data);
+   *principal = NULL;
+   if (asn1_tag_remaining(data)  0) {
+   asn1_start_tag(data, ASN1_CONTEXT(3));
+   asn1_start_tag(data, ASN1_SEQUENCE(0));
+   asn1_start_tag(data, ASN1_CONTEXT(0));
+   asn1_read_GeneralString(data,principal);
+   asn1_end_tag(data);
+   asn1_end_tag(data);
+   asn1_end_tag(data);
+   }
 
asn1_end_tag(data);
asn1_end_tag(data);



svn commit: samba r19046 - in branches/SAMBA_3_0/source/script/tests: .

2006-10-02 Thread vlendec
Author: vlendec
Date: 2006-10-02 13:50:30 + (Mon, 02 Oct 2006)
New Revision: 19046

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

Log:
It does not do much yet, but activate RPC-SAMBA3-SPOOLSS
Modified:
   branches/SAMBA_3_0/source/script/tests/test_posix_s3.sh


Changeset:
Modified: branches/SAMBA_3_0/source/script/tests/test_posix_s3.sh
===
--- branches/SAMBA_3_0/source/script/tests/test_posix_s3.sh 2006-10-02 
13:35:07 UTC (rev 19045)
+++ branches/SAMBA_3_0/source/script/tests/test_posix_s3.sh 2006-10-02 
13:50:30 UTC (rev 19046)
@@ -34,7 +34,7 @@
 raw=$raw RAW-SAMBA3HIDE RAW-SAMBA3BADPATH
 
 rpc=RPC-AUTHCONTEXT RPC-BINDSAMBA3 RPC-SAMBA3-SRVSVC RPC-SAMBA3-SHARESEC
-rpc=$rpc RPC-UNIXINFO
+rpc=$rpc RPC-UNIXINFO RPC-SAMBA3-SPOOLSS
 
 if test x$RUN_FROM_BUILD_FARM = xyes; then
rpc=$rpc RPC-NETLOGSAMBA3 RPC-SAMBA3SESSIONKEY RPC-SAMBA3-GETUSERNAME



svn commit: samba r19047 - in branches/tmp/vl-messaging/source/lib: .

2006-10-02 Thread ab
Author: ab
Date: 2006-10-02 14:06:04 + (Mon, 02 Oct 2006)
New Revision: 19047

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

Log:
Reformat and simplify code a bit; add some pointer checks. Patch from Aleksey 
Fedoseev
Modified:
   branches/tmp/vl-messaging/source/lib/dbwrap_msg.c


Changeset:
Modified: branches/tmp/vl-messaging/source/lib/dbwrap_msg.c
===
--- branches/tmp/vl-messaging/source/lib/dbwrap_msg.c   2006-10-02 13:50:30 UTC 
(rev 19046)
+++ branches/tmp/vl-messaging/source/lib/dbwrap_msg.c   2006-10-02 14:06:04 UTC 
(rev 19047)
@@ -458,6 +458,10 @@
TDB_DATA buf;
static BOOL traverse_msg_reg = False;
int count = 0;
+
+   if(fn == NULL) {
+   return -1;
+   }

null_data.dsize = 0;
null_data.dptr = NULL;
@@ -484,7 +488,7 @@
while(ctx-record != NULL) {
count++;
 
-   if(fn  fn(ctx-record-key, ctx-record-value, 
private_data)) {
+   if(fn(ctx-record-key, ctx-record-value, private_data)) {
/* break the traversal */
TALLOC_FREE(ctx-record);
message_deregister(MSG_DB_TRAVERSE);
@@ -1105,6 +1109,8 @@
  struct db_entry *database,
  struct db_records_list *record)
 {
+   SMB_ASSERT(record  record-key.dptr);
+
{
char *keystr = hex_encode(NULL, (unsigned char 
*)record-key.dptr,
  record-key.dsize);
@@ -1124,6 +1130,11 @@
TALLOC_FREE(li);

data = msg_pack_data(NULL, database-idx, record-value);
+
+   if(data.dptr == NULL) {
+   DEBUG(0, (Can't pack data\n));
+   return ;
+   }

DEBUG(10, (Sending fetchlock response (len %d) to %s\n,
   data.dsize, procid_str_static(source)));
@@ -1142,6 +1153,8 @@
 static void process_db_delete(struct db_entry *database,
  struct db_records_list *record)
 {
+   SMB_ASSERT(record  record-key.dptr);
+
{
char *keystr = hex_encode(NULL, (unsigned char 
*)record-key.dptr,
  record-key.dsize);
@@ -1196,7 +1209,7 @@
 void process_db_request(struct process_id *lockd_pid,
struct process_id *src_pid,
int msg_type,
-   char* buffer,
+   char *buffer,
size_t len)
 {
uint8_t idx;
@@ -1210,78 +1223,79 @@
if(msg_type == MSG_DB_INIT) {
/* create new database or return opened one */
process_db_init(lockd_pid, src_pid, buffer);
+   return;
+   }
+
+   if(msg_type == MSG_DB_STORE) {
+   if(!msg_unpack_double_data(buffer, len, NULL,
+  idx, data1, data2)) {
+   DEBUG(0, (Can't unpack data\n));
+   return ;
+   }
} else {
-   if(msg_type == MSG_DB_STORE) {
-   if(!msg_unpack_double_data(buffer, len, NULL,
-  idx, data1, data2)) {
-   DEBUG(0, (Can't unpack data\n));
-   return ;
-   }
-   } else {
-   data2.dsize = 0;
-   data2.dptr = NULL;
+   data2.dsize = 0;
+   data2.dptr = NULL;
+   
+   if(!msg_unpack_data(buffer, len, NULL,
+   idx, data1)) {
+   DEBUG(0, (Can't unpack data\n));
+   return ;
+   }
+   }   
+   
+   /* find the database */
+   dbl = find_db_by_index(idx);
+   if(dbl == NULL) {
+   DEBUG(0, (Bad database index %d\n, idx));
+   TALLOC_FREE(data1.dptr);
+   TALLOC_FREE(data2.dptr);
+   return ;
+   }
+   
+   if(msg_type == MSG_DB_FREE) {
+   
+   process_db_free(dbl);
+   
+   } else if(msg_type == MSG_DB_REINIT) {
+   
+   process_db_reinit(dbl);
+   
+   } else if(msg_type == MSG_DB_FETCHLOCK) {
+   
+   process_db_fetch(lockd_pid, src_pid, dbl, data1);
+   
+   } else if(msg_type == MSG_DB_TRAVERSE) {
 
-   if(!msg_unpack_data(buffer, len, NULL,
-   idx, data1)) {
-   DEBUG(0, (Can't unpack data\n));
-   return ;
-   

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

2006-10-02 Thread derrell
Author: derrell
Date: 2006-10-02 15:23:03 + (Mon, 02 Oct 2006)
New Revision: 19048

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

Log:
ensure our memory gets cleaned up even upon exception
Modified:
   branches/SAMBA_4_0/source/scripting/ejs/literal.c


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/ejs/literal.c
===
--- branches/SAMBA_4_0/source/scripting/ejs/literal.c   2006-10-02 14:06:04 UTC 
(rev 19047)
+++ branches/SAMBA_4_0/source/scripting/ejs/literal.c   2006-10-02 15:23:03 UTC 
(rev 19048)
@@ -92,7 +92,7 @@
 
 tok.source = argv[0];
 tok.pos = 0;
-tok.ctx = talloc_new(NULL);
+tok.ctx = talloc_new(mprMemCtx());
 if (tok.ctx == NULL) {
 mpr_Return(eid, mprCreateUndefinedVar());
 return 0;



svn commit: samba r19049 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3: .

2006-10-02 Thread jerry
Author: jerry
Date: 2006-10-02 16:19:05 + (Mon, 02 Oct 2006)
New Revision: 19049

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

Log:
Samba 3 client fixes

* Make sure to check for NULL pointers when dealing with
  [out,unique] before assigning valoues
* Detect RPC faults and return immediately


Modified:
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm


Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
===
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm   
2006-10-02 15:23:03 UTC (rev 19048)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm   
2006-10-02 16:19:05 UTC (rev 19049)
@@ -58,6 +58,14 @@
pidl ;
pidl status = cli_do_rpc_ndr(cli, mem_ctx, PI_$uif, $ufn, r, 
(ndr_pull_flags_fn_t)ndr_pull_$fn-{NAME}, 
(ndr_push_flags_fn_t)ndr_push_$fn-{NAME});;
pidl ;
+
+   pidl if ( !NT_STATUS_IS_OK(status) ) {;
+   indent;
+   pidl return status;;
+   deindent;
+   pidl };
+
+   pidl ;
pidl if (DEBUGLEVEL = 10);
pidl \tNDR_PRINT_OUT_DEBUG($fn-{NAME}, r);;
pidl ;
@@ -71,7 +79,16 @@
 
fatal($e, [out] argument is not a pointer or array) if 
($e-{LEVELS}[0]-{TYPE} ne POINTER and $e-{LEVELS}[0]-{TYPE} ne ARRAY);
 
-   pidl *$e-{NAME} = *r.out.$e-{NAME};;
+   if ( ($e-{LEVELS}[0]-{TYPE} eq POINTER)  
($e-{LEVELS}[0]-{POINTER_TYPE} eq unique) ) {
+   pidl if ( $e-{NAME} ) {;
+   indent;
+   pidl *$e-{NAME} = *r.out.$e-{NAME};;
+   deindent;
+   pidl };
+   } else {
+   pidl *$e-{NAME} = *r.out.$e-{NAME};;
+   }
+   
}
 
pidl;



svn commit: samba r19050 - in branches/SAMBA_3_0_23/source/libsmb: .

2006-10-02 Thread jra
Author: jra
Date: 2006-10-02 17:26:06 + (Mon, 02 Oct 2006)
New Revision: 19050

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

Log:
Merge Volker's Vista RC1 fix - nice to get more testing
on the release side of things.
Jeremy.

Modified:
   branches/SAMBA_3_0_23/source/libsmb/cliconnect.c
   branches/SAMBA_3_0_23/source/libsmb/clispnego.c


Changeset:
Modified: branches/SAMBA_3_0_23/source/libsmb/cliconnect.c
===
--- branches/SAMBA_3_0_23/source/libsmb/cliconnect.c2006-10-02 16:19:05 UTC 
(rev 19049)
+++ branches/SAMBA_3_0_23/source/libsmb/cliconnect.c2006-10-02 17:26:06 UTC 
(rev 19050)
@@ -746,16 +746,27 @@
/* make sure the server understands kerberos */
for (i=0;OIDs[i];i++) {
DEBUG(3,(got OID=%s\n, OIDs[i]));
-#ifdef HAVE_KRB5
if (strcmp(OIDs[i], OID_KERBEROS5_OLD) == 0 ||
strcmp(OIDs[i], OID_KERBEROS5) == 0) {
got_kerberos_mechanism = True;
}
-#endif
free(OIDs[i]);
}
-   DEBUG(3,(got principal=%s\n, principal));
 
+   DEBUG(3,(got principal=%s\n, principal ? principal : null));
+
+   if (got_kerberos_mechanism  (principal == NULL)) {
+   /*
+* It is WRONG to depend on the principal sent in the negprot
+* reply, but right now we do it. So for safety (don't
+* segfault later) disable Kerberos when no principal was
+* sent. -- VL
+*/
+   DEBUG(1, (Kerberos mech was offered, but no principal was 
+   sent, disabling Kerberos\n));
+   cli-use_kerberos = False;
+   }
+
fstrcpy(cli-user_name, user);
 
 #ifdef HAVE_KRB5

Modified: branches/SAMBA_3_0_23/source/libsmb/clispnego.c
===
--- branches/SAMBA_3_0_23/source/libsmb/clispnego.c 2006-10-02 16:19:05 UTC 
(rev 19049)
+++ branches/SAMBA_3_0_23/source/libsmb/clispnego.c 2006-10-02 17:26:06 UTC 
(rev 19050)
@@ -149,13 +149,16 @@
asn1_end_tag(data);
asn1_end_tag(data);
 
-   asn1_start_tag(data, ASN1_CONTEXT(3));
-   asn1_start_tag(data, ASN1_SEQUENCE(0));
-   asn1_start_tag(data, ASN1_CONTEXT(0));
-   asn1_read_GeneralString(data,principal);
-   asn1_end_tag(data);
-   asn1_end_tag(data);
-   asn1_end_tag(data);
+   *principal = NULL;
+   if (asn1_tag_remaining(data)  0) {
+   asn1_start_tag(data, ASN1_CONTEXT(3));
+   asn1_start_tag(data, ASN1_SEQUENCE(0));
+   asn1_start_tag(data, ASN1_CONTEXT(0));
+   asn1_read_GeneralString(data,principal);
+   asn1_end_tag(data);
+   asn1_end_tag(data);
+   asn1_end_tag(data);
+   }
 
asn1_end_tag(data);
asn1_end_tag(data);



svn commit: samba r19051 - in branches/SAMBA_4_0: jsonrpc source/scripting/ejs source/web_server

2006-10-02 Thread derrell
Author: derrell
Date: 2006-10-02 20:39:31 + (Mon, 02 Oct 2006)
New Revision: 19051

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

Log:
JSON-RPC server work-in-progress.  It's almost working.
Modified:
   branches/SAMBA_4_0/jsonrpc/json.esp
   branches/SAMBA_4_0/jsonrpc/jsondate.esp
   branches/SAMBA_4_0/jsonrpc/request.esp
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_sys.c
   branches/SAMBA_4_0/source/web_server/http.c


Changeset:
Modified: branches/SAMBA_4_0/jsonrpc/json.esp
===
--- branches/SAMBA_4_0/jsonrpc/json.esp 2006-10-02 17:26:06 UTC (rev 19050)
+++ branches/SAMBA_4_0/jsonrpc/json.esp 2006-10-02 20:39:31 UTC (rev 19051)
@@ -37,6 +37,11 @@
 }
 }
 
+if (arr.length == 0)
+{
+return ;
+}
+
 return join(, arr);
 }
 
@@ -72,11 +77,15 @@
 }
 else if (type == float ||
  type == integer ||
- type == integer64 ||
- type == pointer)
+ type == integer64)
 {
-return (o + 0);
+return o + 0;
 }
+else if (type == pointer)
+{
+var x =  + o;
+return '' + substr(x, 16, strlen(x) - 16 - 1) + '';
+}
 else if (type == object)
 {
 var buf;
@@ -128,6 +137,10 @@
 {
 return '' + this._internal.escape(o) + '';
 }
+else
+{
+return '{ unknown_object:' + type + '}';
+}
 }
 
 /* Allocate the public Json access object */
@@ -193,6 +206,7 @@
 
 
 /* Test it */
+/*
 libinclude(base.js);
 function testFormat()
 {
@@ -211,7 +225,11 @@
 test.obj.array[1] = 223;
 printf(%s\n, Json.encode(test));
 }
+testFormat();
+*/
 
+/*
+libinclude(base.js);
 function testParse()
 {
 var s;
@@ -236,8 +254,6 @@
 obj = Json.decode(s);
 printf(Decode/encode of\n\t%s\nyielded\n\t%s\n\n, s, Json.encode(obj));
 }
-
-//testFormat();
 testParse();
-
+*/
 %

Modified: branches/SAMBA_4_0/jsonrpc/jsondate.esp
===
--- branches/SAMBA_4_0/jsonrpc/jsondate.esp 2006-10-02 17:26:06 UTC (rev 
19050)
+++ branches/SAMBA_4_0/jsonrpc/jsondate.esp 2006-10-02 20:39:31 UTC (rev 
19051)
@@ -78,7 +78,7 @@
 
 if (typeof(secondsSinceEpoch) != number)
 {
-var currentTime = getTimeOfDay();
+var currentTime = gettimeofday();
 secondsSinceEpoch = currentTime.sec;
 microseconds = currentTime.usec;
 }
@@ -105,7 +105,7 @@
 {
 return this.month;
 }
-o.getUtcMonth = getUtcMonth;
+o.getUtcMonth = _getUtcMonth;
 
 function _getUtcDay()
 {
@@ -167,7 +167,7 @@
 
 if (! secondsSinceEpoch)
 {
-var now = getTimeOfDay();
+var now = gettimeofday();
 o.setEpochTime(now.sec);
 }
 else

Modified: branches/SAMBA_4_0/jsonrpc/request.esp
===
--- branches/SAMBA_4_0/jsonrpc/request.esp  2006-10-02 17:26:06 UTC (rev 
19050)
+++ branches/SAMBA_4_0/jsonrpc/request.esp  2006-10-02 20:39:31 UTC (rev 
19051)
@@ -14,6 +14,7 @@
  */
 
 /* Bring in the date class */
+jsonrpc_include(json.esp);
 jsonrpc_include(jsondate.esp);
 
 /* bring the string functions into the global frame */
@@ -28,12 +29,6 @@
 }
 
 
-/* KLUDGE... */
-form = new Array();
-server = new Array();
-request = new Array();
-/* ...KLUDGE */
-
 /*
  * All of our manipulation of JSON RPC methods will be through this object.
  * Each class of methods will assign to here, and all of the constants will
@@ -147,7 +142,7 @@
 if (scriptTransportId == jsonrpc.Constant.ScriptTransport.NotInUse)
 {
 /* ... then just output the reply. */
-printf(reply);
+write(reply);
 }
 else
 {
@@ -156,43 +151,11 @@
 qx.io.remote.ScriptTransport._requestFinished( +
 scriptTransportId + ,  + reply +
 );;
-printf(reply);
+write(reply);
 }
 }
 
 
-/*
- * class Json
- *
- * This class provides the JSON encoder and decoder, and some utility
- * functions.
- */
-Json = new Object();
-
-/* KLUDGE... */
-function _jsonDecode(s)
-{
-var o = new Object();
-o.id = 23;
-o.service = qooxdoo.test;
-o.method = echo;
-o.params = new Array(1);
-o.params[0] = hello world;
-return o;
-}
-/* ...KLUDGE */
-
-Json.decode = _jsonDecode;
-
-/* KLUDGE... */
-function _jsonEncode(o)
-{
-return { result: \hello world\ }
-}
-/* ...KLUDGE */
-
-Json.encode = _jsonEncode;
-
 function _jsonValidRequest(req)
 {
 if (req == undefined)
@@ -300,14 +263,14 @@
 scriptTransportId = jsonrpc.Constant.ScriptTransport.NotInUse;
 
 /* What type of request did we receive? */
-if (server[REQUEST_METHOD] == POST 
-server[CONENT_TYPE] == text/json)
+if (request[REQUEST_METHOD] == POST 
+request[CONTENT_TYPE] == 

svn commit: samba r19052 - in branches/SAMBA_4_0/jsonrpc: .

2006-10-02 Thread derrell
Author: derrell
Date: 2006-10-02 20:44:19 + (Mon, 02 Oct 2006)
New Revision: 19052

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

Log:
clarify what actually does what
Modified:
   branches/SAMBA_4_0/jsonrpc/request.esp


Changeset:
Modified: branches/SAMBA_4_0/jsonrpc/request.esp
===
--- branches/SAMBA_4_0/jsonrpc/request.esp  2006-10-02 20:39:31 UTC (rev 
19051)
+++ branches/SAMBA_4_0/jsonrpc/request.esp  2006-10-02 20:44:19 UTC (rev 
19052)
@@ -13,8 +13,10 @@
  * This is a simple JSON-RPC server.
  */
 
+/* Bring in the json format/parse functions */
+jsonrpc_include(json.esp);
+
 /* Bring in the date class */
-jsonrpc_include(json.esp);
 jsonrpc_include(jsondate.esp);
 
 /* bring the string functions into the global frame */



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

2006-10-02 Thread mimir
Author: mimir
Date: 2006-10-02 22:18:36 + (Mon, 02 Oct 2006)
New Revision: 19053

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

Log:
match the flag values with the actual equivalents in samr.idl


rafal


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


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/userman.h
===
--- branches/SAMBA_4_0/source/libnet/userman.h  2006-10-02 20:44:19 UTC (rev 
19052)
+++ branches/SAMBA_4_0/source/libnet/userman.h  2006-10-02 22:18:36 UTC (rev 
19053)
@@ -49,11 +49,11 @@
 #define USERMOD_FIELD_FULL_NAME   ( 0x0002 )
 #define USERMOD_FIELD_DESCRIPTION ( 0x0010 )
 #define USERMOD_FIELD_COMMENT ( 0x0020 )
+#define USERMOD_FIELD_HOME_DIRECTORY  ( 0x0040 )
+#define USERMOD_FIELD_HOME_DRIVE  ( 0x0080 )
 #define USERMOD_FIELD_LOGON_SCRIPT( 0x0100 )
 #define USERMOD_FIELD_PROFILE_PATH( 0x0200 )
 #define USERMOD_FIELD_WORKSTATIONS( 0x0400 )
-#define USERMOD_FIELD_HOME_DIRECTORY  ( 0x0800 )
-#define USERMOD_FIELD_HOME_DRIVE  ( 0x1000 )
 #define USERMOD_FIELD_LOGON_HOURS ( 0x2000 )
 #define USERMOD_FIELD_ACCT_EXPIRY ( 0x4000 )
 #define USERMOD_FIELD_ACCT_FLAGS  ( 0x0010 )



svn commit: samba r19054 - in branches: SAMBA_3_0/source/lib SAMBA_3_0_23/source/lib

2006-10-02 Thread jra
Author: jra
Date: 2006-10-02 23:34:03 + (Mon, 02 Oct 2006)
New Revision: 19054

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

Log:
Callers of gencache may not have the rights to
open read/write. Allow them to fallback to read-only.
Jeremy

Modified:
   branches/SAMBA_3_0/source/lib/gencache.c
   branches/SAMBA_3_0_23/source/lib/gencache.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/gencache.c
===
--- branches/SAMBA_3_0/source/lib/gencache.c2006-10-02 22:18:36 UTC (rev 
19053)
+++ branches/SAMBA_3_0/source/lib/gencache.c2006-10-02 23:34:03 UTC (rev 
19054)
@@ -31,6 +31,7 @@
 #define READ_CACHE_DATA_FMT_TEMPLATE %%12u/%%%us
 
 static TDB_CONTEXT *cache;
+static BOOL cache_readonly;
 
 /**
  * @file gencache.c
@@ -66,6 +67,14 @@
cache = tdb_open_log(cache_fname, 0, TDB_DEFAULT,
 O_RDWR|O_CREAT, 0644);
 
+   if (!cache  (errno == EACCES)) {
+   cache = tdb_open_log(cache_fname, 0, TDB_DEFAULT, O_RDONLY, 
0644);
+   if (cache) {
+   cache_readonly = True;
+   DEBUG(5, (gencache_init: Opening cache file %s 
read-only.\n, cache_fname));
+   }
+   }
+
SAFE_FREE(cache_fname);
if (!cache) {
DEBUG(5, (Attempt to open gencache.tdb has failed.\n));
@@ -90,6 +99,7 @@
DEBUG(5, (Closing cache file\n));
ret = tdb_close(cache);
cache = NULL;
+   cache_readonly = False;
return ret != -1;
 }
 
@@ -117,6 +127,10 @@
 
if (!gencache_init()) return False;

+   if (cache_readonly) {
+   return False;
+   }
+
asprintf(valstr, CACHE_DATA_FMT, (int)timeout, value);
if (!valstr)
return False;
@@ -155,6 +169,10 @@
 
if (!gencache_init()) return False; 

+   if (cache_readonly) {
+   return False;
+   }
+
keybuf.dptr = CONST_DISCARD(char *, keystr);
keybuf.dsize = strlen(keystr)+1;
DEBUG(10, (Deleting cache entry (key = %s)\n, keystr));

Modified: branches/SAMBA_3_0_23/source/lib/gencache.c
===
--- branches/SAMBA_3_0_23/source/lib/gencache.c 2006-10-02 22:18:36 UTC (rev 
19053)
+++ branches/SAMBA_3_0_23/source/lib/gencache.c 2006-10-02 23:34:03 UTC (rev 
19054)
@@ -31,6 +31,7 @@
 #define READ_CACHE_DATA_FMT_TEMPLATE %%12u/%%%us
 
 static TDB_CONTEXT *cache;
+static BOOL cache_readonly;
 
 /**
  * @file gencache.c
@@ -66,6 +67,14 @@
cache = tdb_open_log(cache_fname, 0, TDB_DEFAULT,
 O_RDWR|O_CREAT, 0644);
 
+   if (!cache  (errno == EACCES)) {
+   cache = tdb_open_log(cache_fname, 0, TDB_DEFAULT, O_RDONLY, 
0644);
+   if (cache) {
+   cache_readonly = True;
+   DEBUG(5, (gencache_init: Opening cache file %s 
read-only.\n, cache_fname));
+   }
+   }
+
SAFE_FREE(cache_fname);
if (!cache) {
DEBUG(5, (Attempt to open gencache.tdb has failed.\n));
@@ -90,6 +99,7 @@
DEBUG(5, (Closing cache file\n));
ret = tdb_close(cache);
cache = NULL;
+   cache_readonly = False;
return ret != -1;
 }
 
@@ -117,6 +127,10 @@
 
if (!gencache_init()) return False;

+   if (cache_readonly) {
+   return False;
+   }
+
asprintf(valstr, CACHE_DATA_FMT, (int)timeout, value);
if (!valstr)
return False;
@@ -162,6 +176,10 @@
 
if (!gencache_init()) return False;

+   if (cache_readonly) {
+   return False;
+   }
+
/* 
 * Check whether entry exists in the cache
 * Don't verify gencache_get exit code, since the entry may be expired
@@ -213,6 +231,10 @@
 
if (!gencache_init()) return False; 

+   if (cache_readonly) {
+   return False;
+   }
+
keybuf.dptr = SMB_STRDUP(keystr);
keybuf.dsize = strlen(keystr)+1;
DEBUG(10, (Deleting cache entry (key = %s)\n, keystr));
@@ -431,5 +453,3 @@
tdb_unlock_bystring(cache, key);
return;
 }
-
-



Build status as of Tue Oct 3 00:00:01 2006

2006-10-02 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2006-10-02 
00:00:34.0 +
+++ /home/build/master/cache/broken_results.txt 2006-10-03 00:00:12.0 
+
@@ -1,21 +1,21 @@
-Build status as of Mon Oct  2 00:00:02 2006
+Build status as of Tue Oct  3 00:00:01 2006
 
 Build counts:
 Tree Total  Broken Panic 
 SOC  0  0  0 
 build_farm   0  0  0 
-ccache   45 8  0 
-distcc   45 7  0 
+ccache   16 3  0 
+distcc   16 3  0 
 ldb  41 5  0 
-libreplace   41 1  0 
+libreplace   40 1  0 
 lorikeet-heimdal 8  5  0 
 ppp  17 0  0 
-rsync45 11 0 
+rsync44 10 0 
 samba0  0  0 
 samba-docs   0  0  0 
-samba4   41 9  1 
-samba_3_040 12 1 
-smb-build30 3  0 
-talloc   45 4  0 
-tdb  43 3  0 
+samba4   43 11 1 
+samba_3_042 15 1 
+smb-build29 3  0 
+talloc   44 4  0 
+tdb  42 2  0 
 


svn commit: samba r19055 - in branches/SAMBA_4_0: jsonrpc jsonrpc/qooxdoo source/scripting/ejs

2006-10-02 Thread derrell
Author: derrell
Date: 2006-10-03 02:38:08 + (Tue, 03 Oct 2006)
New Revision: 19055

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

Log:
JSON-RPC is working!  It passes the small qooxdoo JSON-RPC test suite
perfectly.

This check in covers the remaining fixes and enhancements to complete the
server.  In a subsequent check-in, I need to learn about the new qooxdoo
packaging mechanism.  Although it'd be nice to have the whole source tree,
that's huge and needn't be in samba svn.  It's now supposed to be very easy to
package qooxdoo, so I'll figure out how that's done and then check in the
relevant small number of files.

Steps after that involve generating the stubs to allow various ejs functions
to be called via JSON-RPC.

Derrell

Modified:
   branches/SAMBA_4_0/jsonrpc/json.esp
   branches/SAMBA_4_0/jsonrpc/jsondate.esp
   branches/SAMBA_4_0/jsonrpc/qooxdoo/test.esp
   branches/SAMBA_4_0/jsonrpc/request.esp
   branches/SAMBA_4_0/source/scripting/ejs/literal.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c


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