Re: [Samba] Joining Windows Domain

2007-02-19 Thread Rashid N. Achilov
On Thursday 15 February 2007 21:20, Manser, Gregory wrote:
 I am trying to join a samba 3 server to a Windows domain.  Samba is
 configured, but when I try to join the domain using the net command net
 ads join -UAdministrator%password I get 
 
  
 
 net: not found
 
  
 
 Is there something I'm missing?

You are missed 'net' binary :-). Check your path directories and ensure, 
that 'net' binary is presented and path in PATH variable
-- 
   With Best Regards.
   Rashid N. Achilov (RNA1-RIPE), Web: http://www.askd.ru/~shelton
   OOO ACK telecommunications administrator, e-mail: achilov-rn [at] askd.ru
   PGP: 83 CD E2 A7 37 4A D5 81 D6 D6 52 BF C9 2F 85 AF 97 BE CB 0A
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] 3.0.24 smbclient and printer listing

2007-02-19 Thread Volker Lendecke
On Mon, Feb 19, 2007 at 12:05:10AM +0100, Thomas Bork wrote:
 I mean this was functional in older samba versions...

Can you send sniffs of both behaviours?

Thanks,

Volker


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

Re: [Samba] Problems Samba, Kerberos, Win2003

2007-02-19 Thread Volker Lendecke
On Sat, Feb 17, 2007 at 04:32:24PM +0100, Thomas Stolz wrote:
 winbind separator = \

Can you try to remove that parameter? To me it seems this
somehow clobbers something. \ is the default anyway.

 client schannel = no

Why did you set this?

Volker


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

RE: [Samba] Problem with Share Size

2007-02-19 Thread Antoine Rocher
Sorry Volker, but I don't understand your message.
Do you mean that reiserfs is a bad choice ?
Thanks

Antoine 

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Volker Lendecke
Envoyé : vendredi 16 février 2007 22:07
À : Marcello Romani
Cc : [EMAIL PROTECTED]
Objet : Re: [Samba] Problem with Share Size

On Fri, Feb 16, 2007 at 06:30:14PM +0100, Marcello Romani wrote:
 Wikipedia reports a maximum volume size of 16TiB for reiser3
 
 http://en.wikipedia.org/wiki/ReiserFS

What it does not say is that reiserfs tends to have your
files for breakfast.

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


[Samba] ntlogon.conf

2007-02-19 Thread [EMAIL PROTECTED]

Hey Everyone...

   I'm hoping this is an easy one. I am using the ntlogon scripts that 
come with the samba examples (ntlogon.py and ntlogon.conf). It's working 
fine, except for one thing. I'm trying to set entries up for the groups 
Domain Admins or other groups with spaces in the name.


The example that comes with it shows ...

[Group-admins]

I tried the following...

[Group-Domain Admins]
[Group-Domain Admins]

but neither seemed to work. Anyone know to get this working correctly 
for groups which have spaces in the name?


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


Re: [Samba] Problems Samba, Kerberos, Win2003

2007-02-19 Thread Volker Lendecke
On Mon, Feb 19, 2007 at 10:24:01AM +0100, Thomas Stolz wrote:
 We have corrected the parameter to Slash /
 We have set 
 client schannel = no
 
 Because it does not work without it.
 In fact: don't ask me why, but its working now!

This seems that you don't have a current Samba. We used to
have problems with client schannel = yes and recent DC's,
but IIRC these problems should be solved with latest Samba.

Volker


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

RE: [Samba] Why is winbind so slow?!

2007-02-19 Thread ZIGLIO, Frediano, VF-IT

 
 On Fri, Feb 16, 2007 at 05:31:05PM +0100, ZIGLIO, Frediano, 
 VF-IT wrote:
  Hi,
I installed samba on a large Active Directory. All is 
 working, I use
  winbind in pam and everything is working.
  However sometime it just hang for a while (say 20 seconds) 
 and then go
  without problems.
  Currently I increased winbind cache time to mitigate the problem.
  There are mainly two situation where this hang occur
  1- login
  2- ls -l
  3- groups
  
  I tried to analyze the problem a bit deeply. The hang with 
 case 2 occurs
  every 2/3 minutes (without winbind cache time) so I 
 launched a strace
  on winbind and when ls -l hang I see a lot of ldap query !!! Then I
  launch tcpdump on ldap port and strace and retry the ls -l test.
  Now I do a ls -l in my home directory. My user is an AD user of a
  DOMAIN\Domain Users main group so ls -l say something like
  
  -rw-r--r--   1 user Domain Users 1234 Xxx XX  2005 file.txt
  
  ls -ln:
  
  -rw-r--r--   1 16804756 16777217 1234 Xxx XX  2005 file.txt
  
  So ls -l should ask which user is 16804756 and which group 
 is 16777217.
  Winbind should (IMHO) get SID of 16804756 and 16777217 from 
 local cache
  then check  if names are updated in cache and update if 
 necessary. The
  problem is that winbind do not simply check for 16777217 
 name but when
  group change it dump many other informations like users in 
 the group and
  then for each user in the group it ask for informations. 
 Now all users
  in AD (I know is ugly but I don't manage AD) have Domain 
 Users as the
  main group so it take very long to get all users list and 
 update every
  users. It would be better (at list for my case) that 
 winbind just get
  group name and mark the member list is not correct. 
  
  Is anybody working in this direction? Can I help you in some way?
 
 We already have fixes for this in the SAMBA_3_0_25 tree.
 If you're willing to experiment then you could try the
 SVN code to see if it fixes the issue.
 
 Jeremy.
 

Now it works a lot faster !!!
What I did:
- updated to 3.0.24 (I realized I was using 3.0.23)
- recompiled 3.0.24 rpm
- tried to compile a 3.0.25 package... without success (net doesn't
link), this is the error

Using FLAGS  =  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32
-march=i586 -fasynchronous-unwind-tables -D_GNU_SOURCE -DLDAP_DEPRECATED
-D_SAMBA_BUILD_=3
-I/home/winnt/fziglio/rpms/BUILD/samba-3.0.24/source/iniparser/src
-Iinclude -I./include  -I. -I. -I./lib/replace -I./lib/talloc
-I./tdb/include -I./libaddns -I./librpc -DHAVE_CONFIG_H
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-DLDAP_DEPRECATED
-I/home/winnt/fziglio/rpms/BUILD/samba-3.0.24/source/lib
-D_SAMBA_BUILD_=3
  PICFLAG= -fPIC
  LIBS   = -lcrypt -lcap -lresolv -lresolv -lnsl -ldl
  LDFLAGS= -pie
  DYNEXP = -Wl,--export-dynamic
  LDSHFLAGS  = -shared -Wl,-Bsymbolic
  SHLIBEXT   = so
  SONAMEFLAG = -Wl,-soname=
Linking bin/net
libaddns/dnsrecord.o: In function `dns_add_rrec':
libaddns/dnsrecord.c:308: undefined reference to `talloc_move'
libaddns/dnsrecord.o: In function `dns_create_rrec':
libaddns/dnsrecord.c:117: undefined reference to `talloc_move'
libaddns/dnssock.o: In function `dns_tcp_open':
libaddns/dnssock.c:67: undefined reference to `talloc_set_destructor'
libaddns/dnssock.o: In function `dns_udp_open':
libaddns/dnssock.c:117: undefined reference to `talloc_set_destructor'
libaddns/dnsgss.o: In function `dns_negotiate_gss_ctx_int':
libaddns/dnsgss.c:190: undefined reference to `talloc_move'
collect2: ld returned 1 exit status
make: *** [bin/net] Error 1

- replaced/compiled manually these files (after many tests)
 /usr/sbin/nmbd
 /usr/sbin/smbd
 /usr/sbin/winbindd
 /lib/libnss_winbind.so.2
 /lib/security/pam_winbind.so
 /lib/security/pam_smbpass.so
- restarted cron, sshd, smb, winbind
I have a problem with template homedir, it was /home/winnt/%U. Newer
version does not replace the %U (I tried %u without success). I tried
with getent passwd user and it replied with /home/winnt/%U as home
directory. Doing some grep I realize that the problem reside in
source/nss_info_template.c cause changing line

  *homedir = talloc_strdup( ctx, lp_template_homedir() );

to

  *homedir = talloc_strdup( ctx, /home/winnt/test );

force getent passwd test to return /home/winnt/test

bye
  Frediano Ziglio

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


Re: [Samba] Problem with Share Size

2007-02-19 Thread Volker Lendecke
On Mon, Feb 19, 2007 at 11:01:19AM +0100, Antoine Rocher wrote:
 Sorry Volker, but I don't understand your message.
 Do you mean that reiserfs is a bad choice ?

In the past I had *BIG* problems with reiserfs, it destroyed
the Samba tdb files. I have not heard of that problem for a
while, but just last week I was told again that reiser had
eaten a friend's home directory. Admittedly that case was on
a laptop that tended to crash due to hardware problems, but
having a non-recoverable fs after a hardware crash is not
very exciting.

Volker


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

RE: [Samba] Problem with Share Size

2007-02-19 Thread Antoine Rocher
OK, thanks for theses infos.
But next to some comparisons between some FS, I have chosen XFS instead of 
ReiserFS.

Antoine

-Message d'origine-
De : Volker Lendecke [mailto:[EMAIL PROTECTED] De la part de Volker Lendecke
Envoyé : lundi 19 février 2007 12:06
À : Antoine Rocher
Cc : [EMAIL PROTECTED]
Objet : Re: [Samba] Problem with Share Size

On Mon, Feb 19, 2007 at 11:01:19AM +0100, Antoine Rocher wrote:
 Sorry Volker, but I don't understand your message.
 Do you mean that reiserfs is a bad choice ?

In the past I had *BIG* problems with reiserfs, it destroyed
the Samba tdb files. I have not heard of that problem for a
while, but just last week I was told again that reiser had
eaten a friend's home directory. Admittedly that case was on
a laptop that tended to crash due to hardware problems, but
having a non-recoverable fs after a hardware crash is not
very exciting.

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


Re: [Samba] Problem with Share Size

2007-02-19 Thread Volker Lendecke
On Mon, Feb 19, 2007 at 12:35:13PM +0100, Marcello Romani wrote:
 What do you mean ?

As I said in the reply of some minutes ago: I have seen all
sorts of problems with reiserfs. Some years ago I had
frequent customer emergencies because highly loaded tdb
files on reiserfs got corrupted. This meant that Samba was
not functioning on these machines. Changing the file system
to ext2/3 solved those problems reliably. But I have not
heard about those problems for a while. Not sure if reiserfs
was fixed or people don't use it anymore :-)

But then last week I heard about the lost homedir, and this
just supported my decision to never use reiser anymore for
anything.

 I've been using reiser3 at home and work with no problem at all for 
 almost 3 years now...

I can only say what *I* have experienced. I do not give a
firm recommendation either way. It's just that I will not
touch reiserfs anymore.

I have certainly also talked to a lot of people who are big
fans of reiserfs, so it's really your choice.

Volker


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

Re: [Samba] Problem with Share Size

2007-02-19 Thread Marcello Romani

Volker Lendecke ha scritto:

On Mon, Feb 19, 2007 at 12:35:13PM +0100, Marcello Romani wrote:

What do you mean ?


As I said in the reply of some minutes ago: I have seen all


I replyed to your post and _then_ read the other responses... sorry :)


sorts of problems with reiserfs. Some years ago I had
frequent customer emergencies because highly loaded tdb
files on reiserfs got corrupted. This meant that Samba was
not functioning on these machines. Changing the file system
to ext2/3 solved those problems reliably. But I have not
heard about those problems for a while. Not sure if reiserfs
was fixed or people don't use it anymore :-)

But then last week I heard about the lost homedir, and this
just supported my decision to never use reiser anymore for
anything.

I've been using reiser3 at home and work with no problem at all for 
almost 3 years now...


I can only say what *I* have experienced. I do not give a
firm recommendation either way. It's just that I will not
touch reiserfs anymore.

I have certainly also talked to a lot of people who are big
fans of reiserfs, so it's really your choice.

Volker


I admit the machines where I put reser3 were not under extremely high 
load, so it's certainly possible that particular workloads stress 
reiser3 in ways that corrupt the filesystem. I simply didn't see this.


So I guess our experiences just differ :-)

Thanks for clarifiyng your initial statement.   

--
Marcello Romani
Responsabile IT
Ottotecnica s.r.l.
http://www.ottotecnica.com
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] pdbedit password policy - not updating ldapsam

2007-02-19 Thread jamurph

I removed version 3.0.22 and installed 3.0.24 (I removed samba files from
/etc/samba, /var/lib/samba, /var/cache/samba), but afraid I still
experiencing the same problem when I run 

 pdbedit -y -i tdbsam -e ldapsam

 Found pdb backend guest
 pdb backend guest has a valid init
 called with username=(null)
 tdb(unnamed): tdb_open_ex: could not open file /etc/samba/passdb.tdb: No
such file or directory
 Unable to open/create TDB passwd
 Can't sampwent!

I manually updated the password policy settings in
sambaDomain=BLAHDEV,dc=example,dc=org
ldapmodify -x -D ... -W
 dn: sambaDomainName=BLAHDEV,dc=roke,dc=co,dc=uk
 changeType: modify
 sambaMinPwdAge: 0
 sambaMaxPwdAge: 2592000
 sambaPwdHistoryLength: 5
 sambaLockoutThreshold: 3
 sambaMinPwdLength: 8
 sambaLockoutDuration: -1

Samba doesn't appear to recognise these changes. How can I get samba to just
look in the ldapsam and not worry about what's in other backends. Any ideas
on how to diagnose this problem would also be helpful

 [global]
   workgroup = BLAHDEV
   netbios name = BLAHDEV-PDC
   security = user
   server string = Samba Server
   log level = 2
   syslog = 0
   log file = /var/log/samba/%m.log
   max log size = 10
   time server = Yes
   logon home = 
   logon path = 
   domain logons = Yes
   domain master = Yes
   os level = 65
   preferred master = Yes
   wins support = yes
   encrypt passwords = Yes
   # unix password sync = Yes
   passwd program = /usr/sbin/ldap_userPassword_change %u
   passwd chat = *New*password* %n\n *Re-enter*new*password* %n\n
*Result**Success
   # Crackcheck settings to allow NT style password complexity checks
   check password script = /sbin/crackcheck -c -d /usr/lib/cracklib_dict
   passdb backend = ldapsam:ldap://ldap-1;
   ldap admin dn = cn=Manager,dc=example,dc=org
   ldap suffix = dc=example,dc=org
   ldap group suffix = ou=Groups
   ldap user suffix = ou=Users
   ldap machine suffix = ou=Computers
   ldap idmap suffix = ou=Idmap
   # idmap backend = ldap:ldap://ldap-1 ldap://ldap-2;
   idmap backend = ldap:ldap://ldap-1;
   add user script = /opt/IDEALX/sbin/smbldap-useradd -m %u
   delete user script = /opt/IDEALX/sbin/smbldap-userdel %u
   add machine script = /opt/IDEALX/sbin/smbldap-useradd -t 1 -w %u
   add group script = /opt/IDEALX/sbin/smbldap-groupadd -p %g
   add user to group script = /opt/IDEALX/sbin/smbldap-groupmod -m %u %g
   delete user from group script = /opt/IDEALX/sbin/smbldap-groupmod -x %u
%g
   set primary group script = /opt/IDEALX/sbin/smbldap-usermod -g '%g' '%u'
   idmap uid = 16777216-33554431
   idmap gid = 16777216-33554431
   template shell = /bin/false
   winbind use default domain = no

I'm running on centos 4.3. Is there a Linux file or PAM setting or something
that I need to change to make this work?

-- 
View this message in context: 
http://www.nabble.com/pdbedit-password-policy---not-updating-ldapsam-tf3239423.html#a9043068
Sent from the Samba - General mailing list archive at Nabble.com.

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


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

2007-02-19 Thread Dr.Peer-Joachim Koch

Hi,

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

Everything is working well, but ...

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

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


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

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

2007-02-19 Thread James Peach

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

Hi,

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

Everything is working well, but ...

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

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


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

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

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


Re: [Samba] ntlogon.conf

2007-02-19 Thread Luis Daniel Lucio Quiroz
If I guess, space is not supported, you should use your unix-group rather.

Suppose you have mapped wheel group to Domain Admins

then add [Group-whell] target.

On Monday 19 February 2007 04:16:17 [EMAIL PROTECTED] wrote:
 Hey Everyone...

 I'm hoping this is an easy one. I am using the ntlogon scripts that
 come with the samba examples (ntlogon.py and ntlogon.conf). It's working
 fine, except for one thing. I'm trying to set entries up for the groups
 Domain Admins or other groups with spaces in the name.

 The example that comes with it shows ...

 [Group-admins]

 I tried the following...

 [Group-Domain Admins]
 [Group-Domain Admins]

 but neither seemed to work. Anyone know to get this working correctly
 for groups which have spaces in the name?

 Thanks


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


Re: [Samba] 3.0.24 smbclient and printer listing

2007-02-19 Thread Thomas Bork

Volker Lendecke wrote:


I mean this was functional in older samba versions...

Can you send sniffs of both behaviours?


Mmmh, in 3.0.23c and 3.0.21c the behavior is the same:

deveis # smbclient -Utb%password //192.168.0.15/jet
Domain=[TB3] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
smb: \ dir
NT_STATUS_ACCESS_DENIED listing \*

0 blocks of size 0. 9 blocks available
smb: \ q
deveis # smbd -V
Version 3.0.23c-for-eisfair-2
deveis # smbclient -Utb%password //192.168.0.15/jet
Domain=[TB3] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
smb: \ dir
NT_STATUS_ACCESS_DENIED listing \*

0 blocks of size 0. 0 blocks available
smb: \ q
deveis # smbd -V
Version 3.0.21c-for-eisfair-3
deveis #

But why is it impossible to listing the printer share directory on 
windows clients?



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


Re: [Samba] 3.0.24 smbclient and printer listing

2007-02-19 Thread Volker Lendecke
On Mon, Feb 19, 2007 at 07:00:22PM +0100, Thomas Bork wrote:
 But why is it impossible to listing the printer share directory on 
 windows clients?

Asked the other way round: What would you expect there?

Volker


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

[Samba] lock account after failed logins

2007-02-19 Thread Martin Miethe

Hi,

does anybody know how I can lock down an samba domain account after a 
certain amount of failed logins?


I thought I heard that this issue will be solved with Samba 3?

Thanks a lot and
best regards
Martin Miethe


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


Re: [Samba] 3.0.24 smbclient and printer listing

2007-02-19 Thread Thomas Bork

Volker Lendecke wrote:

But why is it impossible to listing the printer share directory on 
windows clients?

Asked the other way round: What would you expect there?


The same output as on linux machines:

From the first posting:

Here a try with a local smb printer queue on the linux host:

deveis # smbclient -Utb%password //192.168.0.14/remoteljet
Domain=[TOMMAIK] OS=[Unix] Server=[Samba 3.0.24-for-eisfair-3]
smb: \ dir
  .   D0  Sun Feb 18 23:43:34 2007
  .. DR0  Sun Feb 18 23:20:24 2007

38234 blocks of size 262144. 21005 blocks available
smb: \ q


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


[Samba] Domain logins across subnets

2007-02-19 Thread John Paul


Greetings,

My environment is Samba 3.0.23d as a PDC, password backend is OpenLDAP 2.3.27, 
running on SuSE 10.1; workstations are Windows XP SP2, all recent patches 
applied. All machines are on the same Class B private IP network. Domain 
logons function perfectly, performance is very nice. For security and performance 
reasons we are looking at dividing the network into many VLANS, each with 
its own IP subnet. 

On the testing network, a very strange thing is happening. When the workstation 
is on the Class B subnet, all functions work perfectly - Adding machine to 
domain, logging in, mapping drive to samba server, etc. However, when placed 
on the test VLAN (a class C private IP subnet) some of this functionality 
goes away. I can ping the DC (meaning the packets are correctly routed). 
I can resolve the DC name to its IP (meaning name resolution across the subnet 
is working), I can resolve my own workstation name to the correct IP. However, 
when I try to add this machine to the domain, I get the following error:


The following error occurred attempting to join the domain DOMAIN

Logon Failure: unknown user name or bad password.

Of course I'm using the same user name and password (root) as I use
when on the Class B subnet. When I attempt to map a drive, I get System
error 1326 has occurred - Logon failure: unknown user name or bad
password. Stranger yet is that every 5 or so times, this all works
perfectly.

I've considered problems with the switching hardware, however, I set the 
workstation to ping the DC constantly for like 4 hours and not a single packet 
was dropped. There is nothing strange about the setup, it's really very simple. 
All other services function perfectly between the VLANS. I also tried adding 
a VLAN on our production network using the production DC with the exact same 
results.


I should add that on the testing network, although the logical layout
is similar, we do not have a DHCP server so all address assignments are
done by hand. However, when we move the workstation from one subnet to
another, we are careful to put the workstation in the correct subnet and
make sure that the WINS server is set correctly.

I've attached my smb.conf. If any party is interested in further diagnosing 
the problem I'll be happy spend as much time as necessary to provide the 
information you might need.


Here's my smb.conf (names have been changed to protect the guilty)

[global]
interfaces = eth0 lo
bind interfaces only = yes
workgroup = DOMAIN
server string = Domain Controller
passdb backend = ldapsam:ldap://127.0.0.1
log level = 1
syslog = 0
log file = /usr/local/samba/var/log.%m
max log size = 2500
name resolve order = wins hosts bcast
time server = Yes
show add printer wizard = No
add user script = /var/lib/samba/sbin/smbldap-useradd.pl -a -m
'%u'
delete user script = /var/lib/samba/sbin/smbldap-userdel.pl
'%u'
add group script = /var/lib/samba/sbin/smbldap-groupadd.pl -p
'%g'
delete group script = /var/lib/samba/sbin/smbldap-groupdel.pl
'%g'
add user to group script =
/var/lib/samba/sbin/smbldap-groupmod.pl -m '%u' '%g'
delete user from group script =
/var/lib/samba/sbin/smbldap-groupmod.pl -x '%u' '%g'
set primary group script =
/var/lib/samba/sbin/smbldap-usermod.pl -g '%g' '%u'
add machine script = /var/lib/samba/sbin/smbldap-useradd.pl -w
'%u'
logon script = netlogon.cmd
logon path = \\dc\profiles\%U ( file://\dcU )
logon home = \\dc\profiles\%U ( file://\dcU )
domain logons = Yes
os level = 75
preferred master = Yes
domain master = Yes
wins support = Yes
ldap admin dn = cn=Manager,dc=example,dc=org
ldap group suffix = ou=group
ldap idmap suffix = ou=Idmap
ldap machine suffix = ou=people
ldap suffix = dc=example,dc=org
ldap user suffix = ou=people
idmap backend = ldap://127.0.0.1
idmap uid = 1-2
idmap gid = 1-2
profile acls = Yes
map acl inherit = Yes

[netlogon]
comment = Net logon share
path = /netlogon
write list = root

[profiles]
comment = Roaming profile share
path = /profiles
read only = No
hide files = /desktop.ini/Desktop.ini/DESKTOP.INI/
csc policy = disable
create mask = 0700
force create mode = 0700
directory mask = 0700
force directory mode = 0700



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


Re: [Samba] 3.0.24 smbclient and printer listing

2007-02-19 Thread Volker Lendecke
On Mon, Feb 19, 2007 at 08:30:50PM +0100, Thomas Bork wrote:
 But why is it impossible to listing the printer share directory on 
 windows clients?
 Asked the other way round: What would you expect there?
 
 The same output as on linux machines:
 
 From the first posting:
 
 Here a try with a local smb printer queue on the linux host:

Then that's a Samba bug :-)

If Windows gives ACCESS_DENIED there's nothing we can do
about it. 

If you can show me a sniff of Windows showing something
here, we can adapt smbclient to do the same and hopefully
get the same info, but without such a sniff, no way.

Volker


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

Re: [Samba] lock account after failed logins

2007-02-19 Thread Dale Schroeder
Try 
here:  http://us1.samba.org/samba/docs/man/Samba-HOWTO-Collection/passdb.html#pdbeditthing 
.


Dale

Martin Miethe wrote:

Hi,

does anybody know how I can lock down an samba domain account after a 
certain amount of failed logins?


I thought I heard that this issue will be solved with Samba 3?

Thanks a lot and
best regards
Martin Miethe



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


[Samba] Windows Updates management using Samba

2007-02-19 Thread Siju George

Hi,

I was just wondering there if there is anything/setup to make a Samba
3/4 PDC to fetch MS Windows Updates from the Microsoft website and
push it to the clients. Some thing Like WSUS?

If it is not already th ere is there any plans to add this
functionality to Samba?

I am wondering how updates are done on Windows Machines under a Samba domain.
The data transfer multiplies with the no. of clients right?

May be one way is to put a caching server like Squid on the firewall
and allow the cache to serve the requested file.

Is there any other/better way than this?

Thankyou so much

Kind Regards

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


[Samba] Fw: A problem On the integrate Samba and AD 2k3 ..

2007-02-19 Thread Eric.chen

the page is my reference 
http://www.infosecwriters.com/text_resources/pdf/AD_and_Linux_TMunn.pdf

i wnat to get users group for squid' wbinfo_group.pl use auth...

now i can join the samba server to AD domain
but i can't read user's group..

can any one tell me what is happend..
===
[EMAIL PROTECTED] samba]# wbinfo -u
Administrator
Guest
SUPPORT_wqwddqw
krbtgt
HLwdqdw
evdwieh
...
...
[EMAIL PROTECTED] samba]# wbinfo -g
BUILTIN/System Operators
BUILTIN/Replicators
BUILTIN/Guests

HelpServicesGroup
TelnetClients
IIS_WPG
Domain Computers
Domain Controllers
Schema Admins
..
[EMAIL PROTECTED] samba]# wbinfo -t
checking the trust secret via RPC calls succeeded

BUT i can't get user'group

[EMAIL PROTECTED] samba]# wbinfo -n USBEnabled
S-1-5-21-4121681757-1283273484-4023308939-1859 Domain Group (2)
[EMAIL PROTECTED] samba]# wbinfo -Y USBEnabled
Could not convert sid USBEnabled to gid
[EMAIL PROTECTED] samba]#

[EMAIL PROTECTED] samba]# tail -n100 winbindd.log
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  001c num_ref_doms_1: 0001
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0020 ptr_ref_dom   : 00020004
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0024 max_entries   : 0020
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0028 num_ref_doms_2: 0001
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint16(613)
  002c uni_str_len: 0008
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint16(613)
  002e uni_max_len: 000a
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0030 buffer : 00020008
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0034 sid_ptr[0] : 0002000c
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0038 uni_max_len: 0005
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  003c offset : 
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0040 uni_str_len: 0004
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:dbg_rw_punival(814)
  0044 buffer : C.M.E.L.
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  004c num_auths: 0004
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint8(584)
  0050 sid_rev_num: 01
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint8(584)
  0051 num_auths  : 04
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint8(584)
  0052 id_auth[0] : 00
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint8(584)
  0053 id_auth[1] : 00
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint8(584)
  0054 id_auth[2] : 00
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint8(584)
  0055 id_auth[3] : 00
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint8(584)
  0056 id_auth[4] : 00
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint8(584)
  0057 id_auth[5] : 05
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32s(869)
  0058 sub_auths : 0015 f5abdf5d 4c7d330c efced28b
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0068 num_entries: 0001
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  006c ptr_trans_names: 00020010
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0070 num_entries2   : 0001
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint16(613)
  0074 sid_name_use: 0002
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint16(613)
  0078 uni_str_len: 0014
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint16(613)
  007a uni_max_len: 0014
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  007c buffer : 00020014
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0080 domain_idx  : 
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0084 uni_max_len: 000a
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0088 offset : 
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  008c uni_str_len: 000a
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:dbg_rw_punival(814)
  0090 buffer : U.S.B.E.n.a.b.l.e.d.
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  00a4 mapped_count: 0001
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_ntstatus(672)
  00a8 status  : NT_STATUS_OK
[2007/02/20 09:19:29, 5] nsswitch/winbindd_rpc.c:msrpc_sid_to_name(354)
  Mapped sid to [WXYZ]\[USBEnabled]
[2007/02/20 09:19:29, 0] nsswitch/winbindd_sid.c:winbindd_sid_to_gid(288)
  winbindd_sid_to_uid: 'winbind trusted 

[Samba] A problem On the integrate Samba and AD 2k3 ..

2007-02-19 Thread Eric.chen
A problem On the integrate Samba and AD 2k3 ..


the page is my reference 
http://www.infosecwriters.com/text_resources/pdf/AD_and_Linux_TMunn.pdf
i wnat to use users group for squid' wbinfo_group.pl use auth...

now i can join the samba server to AD domain
but i can't read user's group..

can any one tell me what is happend..



like this

[EMAIL PROTECTED] samba]# wbinfo -u
Administrator
Guest
SUPPORT_wqwddqw
krbtgt
HLwdqdw
evdwieh
...
...
[EMAIL PROTECTED] samba]# wbinfo -g
BUILTIN/System Operators
BUILTIN/Replicators
BUILTIN/Guests

HelpServicesGroup
TelnetClients
IIS_WPG
Domain Computers
Domain Controllers
Schema Admins
..
[EMAIL PROTECTED] samba]# wbinfo -t
checking the trust secret via RPC calls succeeded

BUT i can't get user'group 

[EMAIL PROTECTED] samba]# wbinfo -n USBEnabled
S-1-5-21-4121681757-1283273484-4023308939-1859 Domain Group (2)
[EMAIL PROTECTED] samba]# wbinfo -Y USBEnabled
Could not convert sid USBEnabled to gid
[EMAIL PROTECTED] samba]#




[EMAIL PROTECTED] samba]# tail -n100 winbindd.log
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  001c num_ref_doms_1: 0001
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0020 ptr_ref_dom   : 00020004
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0024 max_entries   : 0020
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0028 num_ref_doms_2: 0001
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint16(613)
  002c uni_str_len: 0008
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint16(613)
  002e uni_max_len: 000a
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0030 buffer : 00020008
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0034 sid_ptr[0] : 0002000c
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0038 uni_max_len: 0005
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  003c offset : 
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0040 uni_str_len: 0004
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:dbg_rw_punival(814)
  0044 buffer : C.M.E.L.
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  004c num_auths: 0004
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint8(584)
  0050 sid_rev_num: 01
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint8(584)
  0051 num_auths  : 04
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint8(584)
  0052 id_auth[0] : 00
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint8(584)
  0053 id_auth[1] : 00
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint8(584)
  0054 id_auth[2] : 00
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint8(584)
  0055 id_auth[3] : 00
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint8(584)
  0056 id_auth[4] : 00
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint8(584)
  0057 id_auth[5] : 05
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32s(869)
  0058 sub_auths : 0015 f5abdf5d 4c7d330c efced28b
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0068 num_entries: 0001
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  006c ptr_trans_names: 00020010
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0070 num_entries2   : 0001
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint16(613)
  0074 sid_name_use: 0002
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint16(613)
  0078 uni_str_len: 0014
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint16(613)
  007a uni_max_len: 0014
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  007c buffer : 00020014
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0080 domain_idx  : 
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0084 uni_max_len: 000a
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  0088 offset : 
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  008c uni_str_len: 000a
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:dbg_rw_punival(814)
  0090 buffer : U.S.B.E.n.a.b.l.e.d.
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_uint32(642)
  00a4 mapped_count: 0001
[2007/02/20 09:19:29, 5] rpc_parse/parse_prs.c:prs_ntstatus(672)
  00a8 status  : NT_STATUS_OK
[2007/02/20 09:19:29, 5] nsswitch/winbindd_rpc.c:msrpc_sid_to_name(354)
  Mapped sid to [WXYZ]\[USBEnabled]
[2007/02/20 09:19:29, 0] nsswitch/winbindd_sid.c:winbindd_sid_to_gid(288)
  winbindd_sid_to_uid: 'winbind 

Rev 11531: Merge upstream. in file:///home/jelmer/bzr.samba/4.0-nestedpidl/

2007-02-19 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/4.0-nestedpidl/


revno: 11531
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: 4.0-nestedpidl
timestamp: Mon 2007-02-19 11:19:44 +0100
message:
  Merge upstream.
removed:
  source/pidl/tests/typelist.pl  typelist.pl-20070218211353-5j0k2o8fqwzsavj6-1
added:
  source/pidl/tests/typelist.pl  svn-v2:[EMAIL PROTECTED]
modified:
  source/auth/sam.c  svn-v2:[EMAIL PROTECTED]
  source/dsdb/samdb/ldb_modules/local_password.c svn-v2:[EMAIL PROTECTED]
  source/dsdb/samdb/ldb_modules/password_hash.c svn-v2:[EMAIL PROTECTED]
  source/heimdal/kdc/kerberos5.c svn-v2:[EMAIL PROTECTED]
  source/heimdal/lib/krb5/pac.c  svn-v2:[EMAIL PROTECTED]
  source/kdc/hdb-ldb.c   svn-v2:[EMAIL PROTECTED]
  source/librpc/idl/drsblobs.idl svn-v2:[EMAIL PROTECTED]
  source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm svn-v2:[EMAIL PROTECTED]
  source/pidl/tests/samba-ndr.pl svn-v2:[EMAIL PROTECTED]
  source/setup/schema_samba4.ldif svn-v2:[EMAIL PROTECTED]

revno: 11524.1.10
merged: svn-v2:[EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: jelmer
timestamp: Mon 2007-02-19 01:51:46 +
message:
  Refactor some of the NDR code in preparation of nested data structure 
support.

revno: 11524.1.9.1.1
merged: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Mon 2007-02-19 02:47:59 +0100
message:
  Refactor some of the NDR code in preparation of nested data structure 
support.

revno: 11524.1.9
merged: svn-v2:[EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: jelmer
timestamp: Mon 2007-02-19 00:48:05 +
message:
  Allow more flexible data structure names.

revno: 11524.1.8.1.1
merged: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Mon 2007-02-19 01:45:15 +0100
message:
  Allow more flexible data structure names.

revno: 11524.1.8
merged: svn-v2:[EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: metze
timestamp: Mon 2007-02-19 00:28:11 +
message:
  create a union for the PrimaryKerberosBlob content
  so that ndr_pull will fail if version isn't 3 and we notice
  if the format changes...
  
  metze

revno: 11524.1.7
merged: svn-v2:[EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: jelmer
timestamp: Sun 2007-02-18 23:57:26 +
message:
  Support different variables in environments.

revno: 11524.1.5.1.1
merged: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Mon 2007-02-19 00:55:14 +0100
message:
  Support different variables in environments.

revno: 11524.1.6
merged: svn-v2:[EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: metze
timestamp: Sun 2007-02-18 23:56:19 +
message:
  fix compiler warnings
  
  metze

revno: 11524.1.5
merged: svn-v2:[EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: metze
timestamp: Sun 2007-02-18 23:49:29 +
message:
  create the PAC element in the same order as w2k3,
  maybe there's some broken code in windows which relies
  on this...
  
  love: can you merge this to heimdal?
  
  metze

revno: 11524.1.4
merged: svn-v2:[EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: jelmer
timestamp: Sun 2007-02-18 23:48:16 +
message:
  Cherrypick typelib tests.

revno: 11524.1.3.1.1
merged: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: 

svn commit: samba r21444 - in branches/SAMBA_3_0/source/tdb: common include

2007-02-19 Thread vlendec
Author: vlendec
Date: 2007-02-19 11:19:53 + (Mon, 19 Feb 2007)
New Revision: 21444

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

Log:
Check in tdb_parse_record. Not merging to the other branches yet, we need to
agree on the behaviour of non-existing records.

Tridge, can you comment? Should we change tdb_fetch, or should we have
different concepts in tdb_fetch() and tdb_parse_record() ?

Volker

Modified:
   branches/SAMBA_3_0/source/tdb/common/io.c
   branches/SAMBA_3_0/source/tdb/common/tdb.c
   branches/SAMBA_3_0/source/tdb/common/tdb_private.h
   branches/SAMBA_3_0/source/tdb/include/tdb.h


Changeset:
Modified: branches/SAMBA_3_0/source/tdb/common/io.c
===
--- branches/SAMBA_3_0/source/tdb/common/io.c   2007-02-19 01:51:46 UTC (rev 
21443)
+++ branches/SAMBA_3_0/source/tdb/common/io.c   2007-02-19 11:19:53 UTC (rev 
21444)
@@ -355,6 +355,40 @@
return buf;
 }
 
+/* Give a piece of tdb data to a parser */
+
+int tdb_parse_data(struct tdb_context *tdb, TDB_DATA key,
+  tdb_off_t offset, tdb_len_t len,
+  int (*parser)(TDB_DATA key, TDB_DATA data,
+void *private_data),
+  void *private_data)
+{
+   TDB_DATA data;
+   int result;
+
+   data.dsize = len;
+
+   if ((tdb-transaction == NULL)  (tdb-map_ptr != NULL)) {
+   /*
+* Optimize by avoiding the malloc/memcpy/free, point the
+* parser directly at the mmap area.
+*/
+   if (tdb-methods-tdb_oob(tdb, offset+len, 0) != 0) {
+   return -1;
+   }
+   data.dptr = offset + (char *)tdb-map_ptr;
+   return parser(key, data, private_data);
+   }
+
+   if (!(data.dptr = tdb_alloc_read(tdb, offset, len))) {
+   return -1;
+   }
+
+   result = parser(key, data, private_data);
+   free(data.dptr);
+   return result;
+}
+
 /* read/write a record */
 int tdb_rec_read(struct tdb_context *tdb, tdb_off_t offset, struct list_struct 
*rec)
 {

Modified: branches/SAMBA_3_0/source/tdb/common/tdb.c
===
--- branches/SAMBA_3_0/source/tdb/common/tdb.c  2007-02-19 01:51:46 UTC (rev 
21443)
+++ branches/SAMBA_3_0/source/tdb/common/tdb.c  2007-02-19 11:19:53 UTC (rev 
21444)
@@ -56,6 +56,10 @@
tdb_brlock(tdb, TDB_SEQNUM_OFS, F_UNLCK, F_SETLKW, 1, 1);
 }
 
+static int tdb_key_compare(TDB_DATA key, TDB_DATA data, void *private_data)
+{
+   return memcmp(data.dptr, key.dptr, data.dsize);
+}
 
 /* Returns 0 on fail.  On success, return offset of record, and fills
in rec */
@@ -73,19 +77,12 @@
if (tdb_rec_read(tdb, rec_ptr, r) == -1)
return 0;
 
-   if (!TDB_DEAD(r)  hash==r-full_hash  
key.dsize==r-key_len) {
-   char *k;
-   /* a very likely hit - read the key */
-   k = tdb_alloc_read(tdb, rec_ptr + sizeof(*r), 
-  r-key_len);
-   if (!k)
-   return 0;
-
-   if (memcmp(key.dptr, k, key.dsize) == 0) {
-   SAFE_FREE(k);
-   return rec_ptr;
-   }
-   SAFE_FREE(k);
+   if (!TDB_DEAD(r)  hash==r-full_hash
+key.dsize==r-key_len
+tdb_parse_data(tdb, key, rec_ptr + sizeof(*r),
+ r-key_len, tdb_key_compare,
+ NULL) == 0) {
+   return rec_ptr;
}
rec_ptr = r-next;
}
@@ -163,6 +160,54 @@
return ret;
 }
 
+/*
+ * Find an entry in the database and hand the record's data to a parsing
+ * function. The parsing function is executed under the chain read lock, so it
+ * should be fast and should not block on other syscalls.
+ *
+ * DONT CALL OTHER TDB CALLS FROM THE PARSER, THIS MIGHT LEAD TO SEGFAULTS.
+ *
+ * For mmapped tdb's that do not have a transaction open it points the parsing
+ * function directly at the mmap area, it avoids the malloc/memcpy in this
+ * case. If a transaction is open or no mmap is available, it has to do
+ * malloc/read/parse/free.
+ *
+ * This is interesting for all readers of potentially large data structures in
+ * the tdb records, ldb indexes being one example.
+ */
+
+int tdb_parse_record(struct tdb_context *tdb, TDB_DATA key,
+int (*parser)(TDB_DATA key, TDB_DATA data,
+  void *private_data),
+void *private_data)
+{
+   tdb_off_t rec_ptr;
+   struct list_struct rec;
+   TDB_DATA data;
+   int ret;
+   u32 hash;
+
+   /* find which 

svn commit: samba r21445 - in branches: SAMBA_3_0/source/tdb/common SAMBA_3_0_25/source/tdb/common SAMBA_3_0_25/source/tdb/include SAMBA_4_0/source/lib/tdb/common SAMBA_4_0/source/lib/tdb/include

2007-02-19 Thread vlendec
Author: vlendec
Date: 2007-02-19 11:45:33 + (Mon, 19 Feb 2007)
New Revision: 21445

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

Log:
Apply tdb_parse_record Tridges error return, merge to 3_0_25 and 4_0
Modified:
   branches/SAMBA_3_0/source/tdb/common/tdb.c
   branches/SAMBA_3_0_25/source/tdb/common/io.c
   branches/SAMBA_3_0_25/source/tdb/common/tdb.c
   branches/SAMBA_3_0_25/source/tdb/common/tdb_private.h
   branches/SAMBA_3_0_25/source/tdb/include/tdb.h
   branches/SAMBA_4_0/source/lib/tdb/common/io.c
   branches/SAMBA_4_0/source/lib/tdb/common/tdb.c
   branches/SAMBA_4_0/source/lib/tdb/common/tdb_private.h
   branches/SAMBA_4_0/source/lib/tdb/include/tdb.h


Changeset:
Modified: branches/SAMBA_3_0/source/tdb/common/tdb.c
===
--- branches/SAMBA_3_0/source/tdb/common/tdb.c  2007-02-19 11:19:53 UTC (rev 
21444)
+++ branches/SAMBA_3_0/source/tdb/common/tdb.c  2007-02-19 11:45:33 UTC (rev 
21445)
@@ -183,19 +183,14 @@
 {
tdb_off_t rec_ptr;
struct list_struct rec;
-   TDB_DATA data;
int ret;
u32 hash;
 
/* find which hash bucket it is in */
hash = tdb-hash_fn(key);
 
-   rec_ptr = tdb_find_lock_hash(tdb,key,hash,F_RDLCK,rec);
-
-   if (rec_ptr == 0) {
-   data.dptr = NULL;
-   data.dsize = 0;
-   return parser(key, data, private_data);
+   if (!(rec_ptr = tdb_find_lock_hash(tdb,key,hash,F_RDLCK,rec))) {
+   return TDB_ERRCODE(TDB_ERR_NOEXIST, 0);
}
 
ret = tdb_parse_data(tdb, key, rec_ptr + sizeof(rec) + rec.key_len,
@@ -204,9 +199,7 @@
tdb_unlock(tdb, BUCKET(rec.full_hash), F_RDLCK);
 
return ret;
-   
 }
-
 
 /* check if an entry in the database exists 
 

Modified: branches/SAMBA_3_0_25/source/tdb/common/io.c
===
--- branches/SAMBA_3_0_25/source/tdb/common/io.c2007-02-19 11:19:53 UTC 
(rev 21444)
+++ branches/SAMBA_3_0_25/source/tdb/common/io.c2007-02-19 11:45:33 UTC 
(rev 21445)
@@ -355,6 +355,40 @@
return buf;
 }
 
+/* Give a piece of tdb data to a parser */
+
+int tdb_parse_data(struct tdb_context *tdb, TDB_DATA key,
+  tdb_off_t offset, tdb_len_t len,
+  int (*parser)(TDB_DATA key, TDB_DATA data,
+void *private_data),
+  void *private_data)
+{
+   TDB_DATA data;
+   int result;
+
+   data.dsize = len;
+
+   if ((tdb-transaction == NULL)  (tdb-map_ptr != NULL)) {
+   /*
+* Optimize by avoiding the malloc/memcpy/free, point the
+* parser directly at the mmap area.
+*/
+   if (tdb-methods-tdb_oob(tdb, offset+len, 0) != 0) {
+   return -1;
+   }
+   data.dptr = offset + (char *)tdb-map_ptr;
+   return parser(key, data, private_data);
+   }
+
+   if (!(data.dptr = tdb_alloc_read(tdb, offset, len))) {
+   return -1;
+   }
+
+   result = parser(key, data, private_data);
+   free(data.dptr);
+   return result;
+}
+
 /* read/write a record */
 int tdb_rec_read(struct tdb_context *tdb, tdb_off_t offset, struct list_struct 
*rec)
 {

Modified: branches/SAMBA_3_0_25/source/tdb/common/tdb.c
===
--- branches/SAMBA_3_0_25/source/tdb/common/tdb.c   2007-02-19 11:19:53 UTC 
(rev 21444)
+++ branches/SAMBA_3_0_25/source/tdb/common/tdb.c   2007-02-19 11:45:33 UTC 
(rev 21445)
@@ -56,6 +56,10 @@
tdb_brlock(tdb, TDB_SEQNUM_OFS, F_UNLCK, F_SETLKW, 1, 1);
 }
 
+static int tdb_key_compare(TDB_DATA key, TDB_DATA data, void *private_data)
+{
+   return memcmp(data.dptr, key.dptr, data.dsize);
+}
 
 /* Returns 0 on fail.  On success, return offset of record, and fills
in rec */
@@ -73,19 +77,12 @@
if (tdb_rec_read(tdb, rec_ptr, r) == -1)
return 0;
 
-   if (!TDB_DEAD(r)  hash==r-full_hash  
key.dsize==r-key_len) {
-   char *k;
-   /* a very likely hit - read the key */
-   k = tdb_alloc_read(tdb, rec_ptr + sizeof(*r), 
-  r-key_len);
-   if (!k)
-   return 0;
-
-   if (memcmp(key.dptr, k, key.dsize) == 0) {
-   SAFE_FREE(k);
-   return rec_ptr;
-   }
-   SAFE_FREE(k);
+   if (!TDB_DEAD(r)  hash==r-full_hash
+key.dsize==r-key_len
+tdb_parse_data(tdb, key, rec_ptr + sizeof(*r),
+ r-key_len, tdb_key_compare,
+ 

svn commit: samba r21446 - in branches: SAMBA_3_0/source/param SAMBA_3_0/source/printing SAMBA_3_0_25/source/param SAMBA_3_0_25/source/printing

2007-02-19 Thread vlendec
Author: vlendec
Date: 2007-02-19 13:30:07 + (Mon, 19 Feb 2007)
New Revision: 21446

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

Log:
Karolins printjob username
Modified:
   branches/SAMBA_3_0/source/param/loadparm.c
   branches/SAMBA_3_0/source/printing/printing.c
   branches/SAMBA_3_0_25/source/param/loadparm.c
   branches/SAMBA_3_0_25/source/printing/printing.c


Changeset:
Modified: branches/SAMBA_3_0/source/param/loadparm.c
===
--- branches/SAMBA_3_0/source/param/loadparm.c  2007-02-19 11:45:33 UTC (rev 
21445)
+++ branches/SAMBA_3_0/source/param/loadparm.c  2007-02-19 13:30:07 UTC (rev 
21446)
@@ -349,6 +349,7 @@
char *szQueuepausecommand;
char *szQueueresumecommand;
char *szPrintername;
+   char *szPrintjobUsername;
char *szDontdescend;
char **szHostsallow;
char **szHostsdeny;
@@ -488,6 +489,7 @@
NULL,   /* szQueuepausecommand */
NULL,   /* szQueueresumecommand */
NULL,   /* szPrintername */
+   NULL,   /* szPrintjobUsername */
NULL,   /* szDontdescend */
NULL,   /* szHostsallow */
NULL,   /* szHostsdeny */
@@ -1065,6 +1067,7 @@
{use client driver, P_BOOL, P_LOCAL, sDefault.bUseClientDriver, 
NULL, NULL, FLAG_ADVANCED | FLAG_PRINT}, 
{default devmode, P_BOOL, P_LOCAL, sDefault.bDefaultDevmode, NULL, 
NULL, FLAG_ADVANCED | FLAG_PRINT}, 
{force printername, P_BOOL, P_LOCAL, sDefault.bForcePrintername, 
NULL, NULL, FLAG_ADVANCED | FLAG_PRINT}, 
+   {printjob username, P_STRING, P_LOCAL, sDefault.szPrintjobUsername, 
NULL, NULL, FLAG_ADVANCED | FLAG_PRINT},
 
{N_(Filename Handling), P_SEP, P_SEPARATOR}, 
{mangling method, P_STRING, P_GLOBAL, Globals.szManglingMethod, 
NULL, NULL, FLAG_ADVANCED}, 
@@ -1409,6 +1412,7 @@
string_set((char **)parm_table[i].ptr, );
 
string_set(sDefault.fstype, FSTYPE_STRING);
+   string_set(sDefault.szPrintjobUsername, %U);
 
init_printer_values(sDefault);
 
@@ -1995,6 +1999,7 @@
 FN_LOCAL_STRING(lp_queuepausecommand, szQueuepausecommand)
 FN_LOCAL_STRING(lp_queueresumecommand, szQueueresumecommand)
 static FN_LOCAL_STRING(_lp_printername, szPrintername)
+FN_LOCAL_CONST_STRING(lp_printjob_username, szPrintjobUsername)
 FN_LOCAL_LIST(lp_hostsallow, szHostsallow)
 FN_LOCAL_LIST(lp_hostsdeny, szHostsdeny)
 FN_LOCAL_STRING(lp_magicscript, szMagicScript)

Modified: branches/SAMBA_3_0/source/printing/printing.c
===
--- branches/SAMBA_3_0/source/printing/printing.c   2007-02-19 11:45:33 UTC 
(rev 21445)
+++ branches/SAMBA_3_0/source/printing/printing.c   2007-02-19 13:30:07 UTC 
(rev 21446)
@@ -2396,7 +2396,11 @@
fstrcpy(pjob.jobname, jobname);
 
if ((vuser = get_valid_user_struct(user-vuid)) != NULL) {
-   fstrcpy(pjob.user, vuser-user.smb_name);
+   fstrcpy(pjob.user, lp_printjob_username(snum));
+   standard_sub_basic(vuser-user.smb_name, vuser-user.domain, 
+  pjob.user, sizeof(pjob.user)-1);
+   /* ensure NULL termination */ 
+   pjob.user[sizeof(pjob.user)-1] = '\0'; 
} else {
fstrcpy(pjob.user, uidtoname(user-ut.uid));
}

Modified: branches/SAMBA_3_0_25/source/param/loadparm.c
===
--- branches/SAMBA_3_0_25/source/param/loadparm.c   2007-02-19 11:45:33 UTC 
(rev 21445)
+++ branches/SAMBA_3_0_25/source/param/loadparm.c   2007-02-19 13:30:07 UTC 
(rev 21446)
@@ -348,6 +348,7 @@
char *szQueuepausecommand;
char *szQueueresumecommand;
char *szPrintername;
+   char *szPrintjobUsername;
char *szDontdescend;
char **szHostsallow;
char **szHostsdeny;
@@ -488,6 +489,7 @@
NULL,   /* szQueuepausecommand */
NULL,   /* szQueueresumecommand */
NULL,   /* szPrintername */
+   NULL,   /* szPrintjobUsername */
NULL,   /* szDontdescend */
NULL,   /* szHostsallow */
NULL,   /* szHostsdeny */
@@ -1067,6 +1069,7 @@
{use client driver, P_BOOL, P_LOCAL, sDefault.bUseClientDriver, 
NULL, NULL, FLAG_ADVANCED | FLAG_PRINT}, 
{default devmode, P_BOOL, P_LOCAL, sDefault.bDefaultDevmode, NULL, 
NULL, FLAG_ADVANCED | FLAG_PRINT}, 
{force printername, P_BOOL, P_LOCAL, sDefault.bForcePrintername, 
NULL, NULL, FLAG_ADVANCED | FLAG_PRINT}, 
+   {printjob username, P_STRING, P_LOCAL, sDefault.szPrintjobUsername, 
NULL, NULL, FLAG_ADVANCED | FLAG_PRINT},
 
  

svn commit: samba-docs r1023 - in trunk/smbdotconf/printing: .

2007-02-19 Thread vlendec
Author: vlendec
Date: 2007-02-19 13:31:46 + (Mon, 19 Feb 2007)
New Revision: 1023

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

Log:
Docs for printjob username
Added:
   trunk/smbdotconf/printing/printjobusername.xml


Changeset:
Added: trunk/smbdotconf/printing/printjobusername.xml
===
--- trunk/smbdotconf/printing/printjobusername.xml  2007-02-16 15:44:49 UTC 
(rev 1022)
+++ trunk/smbdotconf/printing/printjobusername.xml  2007-02-19 13:31:46 UTC 
(rev 1023)
@@ -0,0 +1,15 @@
+samba:parameter name=printjob username
+ context=S
+type=string
+print=1
+ xmlns:samba=http://www.samba.org/samba/DTD/samba-doc;
+ description
+paraThis parameter specifies which user information will be 
+passed to the printing system. Usually, the username is sent,
+but in some cases, e.g. the domain prefix is useful, too./para
+   
+relatedprinting/related
+
+value type=example%D\%U/value
+value type=default%U/value
+/samba:parameter



svn commit: samba r21447 - in branches/SAMBA_4_0/source/heimdal/kdc: .

2007-02-19 Thread metze
Author: metze
Date: 2007-02-19 13:38:11 + (Mon, 19 Feb 2007)
New Revision: 21447

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

Log:
make handling of replying e_data more generic

love: please merge this

metze
Modified:
   branches/SAMBA_4_0/source/heimdal/kdc/kerberos5.c


Changeset:
Modified: branches/SAMBA_4_0/source/heimdal/kdc/kerberos5.c
===
--- branches/SAMBA_4_0/source/heimdal/kdc/kerberos5.c   2007-02-19 13:30:07 UTC 
(rev 21446)
+++ branches/SAMBA_4_0/source/heimdal/kdc/kerberos5.c   2007-02-19 13:38:11 UTC 
(rev 21447)
@@ -915,6 +915,7 @@
 char *client_name = NULL, *server_name = NULL;
 krb5_error_code ret = 0;
 const char *e_text = NULL;
+krb5_data e_data;
 krb5_crypto crypto;
 Key *ckey, *skey;
 EncryptionKey *reply_key;
@@ -923,6 +924,7 @@
 #endif
 
 memset(rep, 0, sizeof(rep));
+memset(e_data, 0, sizeof(e_data));
 
 if(b-sname == NULL){
ret = KRB5KRB_ERR_GENERIC;
@@ -1208,7 +1210,6 @@
PA_DATA *pa;
unsigned char *buf;
size_t len;
-   krb5_data foo_data;
 
 use_pa: 
method_data.len = 0;
@@ -1248,25 +1249,17 @@

ASN1_MALLOC_ENCODE(METHOD_DATA, buf, len, method_data, len, ret);
free_METHOD_DATA(method_data);
-   foo_data.data   = buf;
-   foo_data.length = len;
-   
+
+   e_data.data   = buf;
+   e_data.length = len;
+   e_text =Need to use PA-ENC-TIMESTAMP/PA-PK-AS-REQ,
ret = KRB5KDC_ERR_PREAUTH_REQUIRED;
-   krb5_mk_error(context,
- ret,
- Need to use PA-ENC-TIMESTAMP/PA-PK-AS-REQ,
- foo_data,
- client_princ,
- server_princ,
- NULL,
- NULL,
- reply);
-   free(buf);
+
kdc_log(context, config, 0,
No preauth found, returning PREAUTH-REQUIRED -- %s,
client_name);
-   ret = 0;
-   goto out2;
+
+   goto out;
 }
 
 /*
@@ -1615,7 +1608,7 @@
krb5_mk_error(context,
  ret,
  e_text,
- NULL,
+ (e_data.data ? e_data : NULL),
  client_princ,
  server_princ,
  NULL,
@@ -1623,11 +1616,12 @@
  reply);
ret = 0;
 }
-out2:
 #ifdef PKINIT
 if (pkp)
_kdc_pk_free_client_param(context, pkp);
 #endif
+if (e_data.data)
+free(e_data.data);
 if (client_princ)
krb5_free_principal(context, client_princ);
 free(client_name);



svn commit: samba r21448 - in branches/SAMBA_4_0/source/heimdal/kdc: .

2007-02-19 Thread metze
Author: metze
Date: 2007-02-19 13:45:03 + (Mon, 19 Feb 2007)
New Revision: 21448

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

Log:
return the same error codes as a windows KDC

metze
Modified:
   branches/SAMBA_4_0/source/heimdal/kdc/kerberos5.c


Changeset:
Modified: branches/SAMBA_4_0/source/heimdal/kdc/kerberos5.c
===
--- branches/SAMBA_4_0/source/heimdal/kdc/kerberos5.c   2007-02-19 13:38:11 UTC 
(rev 21447)
+++ branches/SAMBA_4_0/source/heimdal/kdc/kerberos5.c   2007-02-19 13:45:03 UTC 
(rev 21448)
@@ -1085,7 +1085,7 @@
if(ret){
char *estr;
e_text = No key matches pa-data;
-   ret = KRB5KDC_ERR_PREAUTH_FAILED;
+   ret = KRB5KDC_ERR_ETYPE_NOSUPP;
if(krb5_enctype_to_string(context, enc_data.etype, estr))
estr = NULL;
if(estr == NULL)
@@ -1137,7 +1137,7 @@
e_text = Failed to decrypt PA-DATA;
 
free_EncryptedData(enc_data);
-   ret = KRB5KRB_AP_ERR_BAD_INTEGRITY;
+   ret = KRB5KDC_ERR_PREAUTH_FAILED;
continue;
}
free_EncryptedData(enc_data);
@@ -1148,7 +1148,7 @@
krb5_data_free(ts_data);
if(ret){
e_text = Failed to decode PA-ENC-TS-ENC;
-   ret = KRB5KRB_AP_ERR_BAD_INTEGRITY;
+   ret = KRB5KDC_ERR_PREAUTH_FAILED;
kdc_log(context, config, 
5, Failed to decode PA-ENC-TS_ENC -- %s,
client_name);



svn commit: samba r21449 - in branches: SAMBA_3_0/source/param SAMBA_3_0_25/source/param

2007-02-19 Thread vlendec
Author: vlendec
Date: 2007-02-19 13:52:29 + (Mon, 19 Feb 2007)
New Revision: 21449

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

Log:
Talked to Jerry on irc, he does not see what might break with this: Change
back the 'msdfs root = yes' default to 'no'.

Volker

Modified:
   branches/SAMBA_3_0/source/param/loadparm.c
   branches/SAMBA_3_0_25/source/param/loadparm.c


Changeset:
Modified: branches/SAMBA_3_0/source/param/loadparm.c
===
--- branches/SAMBA_3_0/source/param/loadparm.c  2007-02-19 13:45:03 UTC (rev 
21448)
+++ branches/SAMBA_3_0/source/param/loadparm.c  2007-02-19 13:52:29 UTC (rev 
21449)
@@ -576,7 +576,7 @@
False,  /* bInheritPerms */
False,  /* bInheritACLS */
False,  /* bInheritOwner */
-   True,   /* bMSDfsRoot */
+   False,  /* bMSDfsRoot */
False,  /* bUseClientDriver */
True,   /* bDefaultDevmode */
False,  /* bForcePrintername */

Modified: branches/SAMBA_3_0_25/source/param/loadparm.c
===
--- branches/SAMBA_3_0_25/source/param/loadparm.c   2007-02-19 13:45:03 UTC 
(rev 21448)
+++ branches/SAMBA_3_0_25/source/param/loadparm.c   2007-02-19 13:52:29 UTC 
(rev 21449)
@@ -577,7 +577,7 @@
False,  /* bInheritPerms */
False,  /* bInheritACLS */
False,  /* bInheritOwner */
-   True,   /* bMSDfsRoot */
+   False,  /* bMSDfsRoot */
False,  /* bUseClientDriver */
True,   /* bDefaultDevmode */
False,  /* bForcePrintername */



svn commit: samba-docs r1024 - in trunk/smbdotconf/vfs: .

2007-02-19 Thread vlendec
Author: vlendec
Date: 2007-02-19 13:53:03 + (Mon, 19 Feb 2007)
New Revision: 1024

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

Log:
Talked to Jerry on irc, he does not see what might break with this: Change
back the 'msdfs root = yes' default to 'no'.

Volker

Modified:
   trunk/smbdotconf/vfs/msdfsroot.xml


Changeset:
Modified: trunk/smbdotconf/vfs/msdfsroot.xml
===
--- trunk/smbdotconf/vfs/msdfsroot.xml  2007-02-19 13:31:46 UTC (rev 1023)
+++ trunk/smbdotconf/vfs/msdfsroot.xml  2007-02-19 13:53:03 UTC (rev 1024)
@@ -13,6 +13,6 @@
 /description
 
 relatedhost msdfs/related
-value type=defaultyes/value
+value type=defaultno/value
 paraSee also smbconfoption name=host msdfs//para
 /samba:parameter



svn commit: samba-docs r1025 - in trunk/smbdotconf: misc tuning

2007-02-19 Thread vlendec
Author: vlendec
Date: 2007-02-19 13:53:54 + (Mon, 19 Feb 2007)
New Revision: 1025

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

Log:
After merging the notify stuff to 3_0_25, check in the docs
Added:
   trunk/smbdotconf/misc/changenotify.xml
Removed:
   trunk/smbdotconf/misc/famchangenotify.xml
   trunk/smbdotconf/tuning/changenotifytimeout.xml
Modified:
   trunk/smbdotconf/misc/kernelchangenotify.xml


Changeset:
Added: trunk/smbdotconf/misc/changenotify.xml
===
--- trunk/smbdotconf/misc/changenotify.xml  2007-02-19 13:53:03 UTC (rev 
1024)
+++ trunk/smbdotconf/misc/changenotify.xml  2007-02-19 13:53:54 UTC (rev 
1025)
@@ -0,0 +1,14 @@
+samba:parameter name=change notify
+ context=S
+type=boolean
+ advanced=1
+ xmlns:samba=http://www.samba.org/samba/DTD/samba-doc;
+description
+   paraThis parameter specifies whether Samba should reply
+   to a client's file change notify requests.
+   /para
+
+   paraYou should never need to change this parameter/para
+/description
+value type=defaultno/value
+/samba:parameter

Deleted: trunk/smbdotconf/misc/famchangenotify.xml
===
--- trunk/smbdotconf/misc/famchangenotify.xml   2007-02-19 13:53:03 UTC (rev 
1024)
+++ trunk/smbdotconf/misc/famchangenotify.xml   2007-02-19 13:53:54 UTC (rev 
1025)
@@ -1,20 +0,0 @@
-samba:parameter name=fam change notify
- context=G
-type=boolean
- advanced=1 developer=1
- xmlns:samba=http://www.samba.org/samba/DTD/samba-doc;
-description
-   paraThis parameter specifies whether Samba should ask the 
-   FAM daemon change notifications in directories so that
-   SMB clients can refresh whenever the data on the server changes.
-   /para
-
-   paraThis parameter is only used when your system supports 
-   change notification to user programs, using the FAM daemon. If the FAM
-   daemon is not running, this parameter is automatically disabled. The
-   parameter moreinfo=nonekernel change notify/parameter
-   parameter will take precedence if it is also enabled.
-   /para
-/description
-value type=defaultyes/value
-/samba:parameter

Modified: trunk/smbdotconf/misc/kernelchangenotify.xml
===
--- trunk/smbdotconf/misc/kernelchangenotify.xml2007-02-19 13:53:03 UTC 
(rev 1024)
+++ trunk/smbdotconf/misc/kernelchangenotify.xml2007-02-19 13:53:54 UTC 
(rev 1025)
@@ -1,7 +1,7 @@
 samba:parameter name=kernel change notify
- context=G
+ context=S
 type=boolean
- advanced=1 developer=1
+ advanced=1
  xmlns:samba=http://www.samba.org/samba/DTD/samba-doc;
 description
paraThis parameter specifies whether Samba should ask the 
@@ -10,7 +10,7 @@
/para
 
paraThis parameter is only used when your kernel supports 
-   change notification to user programs, using the F_NOTIFY fcntl.
+   change notification to user programs using the inotify interface.
/para
 /description
 value type=defaultyes/value

Deleted: trunk/smbdotconf/tuning/changenotifytimeout.xml
===
--- trunk/smbdotconf/tuning/changenotifytimeout.xml 2007-02-19 13:53:03 UTC 
(rev 1024)
+++ trunk/smbdotconf/tuning/changenotifytimeout.xml 2007-02-19 13:53:54 UTC 
(rev 1025)
@@ -1,24 +0,0 @@
-samba:parameter name=change notify timeout
-   type=integer
- context=S
- developer=1
- xmlns:samba=http://www.samba.org/samba/DTD/samba-doc;
-description
-paraThis SMB allows a client to tell a server to 
-quot;watchquot; a particular directory for any changes and only reply to
-the SMB request when a change has occurred. Such constant scanning of
-a directory is expensive under UNIX, hence an 
citerefentryrefentrytitlesmbd/refentrytitle
-manvolnum8/manvolnum/citerefentry daemon only performs such a scan 
-on each requested directory once every parameter moreinfo=nonechange 
notify 
-timeout/parameter seconds. Note that in 3.0.23 this has been changed to a
-per-share parameter and setting this to zero prevents any change notify 
directory
-scans completely on a share. This is to allow this paramter to be set to 
zero on
-shares configured for very large directories, where a Windows client will 
re-scan
-the entire directory after every delete operation (when deleting many 
files) due to
-the change notify triggering. This is an extremely expensive operation on 
some
-systems./para
-/description
-
-value type=default60/value

svn commit: samba r21450 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_25/source/nsswitch

2007-02-19 Thread gd
Author: gd
Date: 2007-02-19 14:43:31 + (Mon, 19 Feb 2007)
New Revision: 21450

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

Log:
No need to TALLOC_FREE twice here.

Guenther

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_async.c
   branches/SAMBA_3_0_25/source/nsswitch/winbindd_async.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_async.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_async.c 2007-02-19 13:52:29 UTC 
(rev 21449)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_async.c 2007-02-19 14:43:31 UTC 
(rev 21450)
@@ -764,9 +764,7 @@
}
 
fstrcpy(state-response.data.name.dom_name, dom_name);
-   TALLOC_FREE(dom_name);
fstrcpy(state-response.data.name.name, name);
-   TALLOC_FREE(name);
state-response.data.name.type = type;
 
TALLOC_FREE(dom_name);

Modified: branches/SAMBA_3_0_25/source/nsswitch/winbindd_async.c
===
--- branches/SAMBA_3_0_25/source/nsswitch/winbindd_async.c  2007-02-19 
13:52:29 UTC (rev 21449)
+++ branches/SAMBA_3_0_25/source/nsswitch/winbindd_async.c  2007-02-19 
14:43:31 UTC (rev 21450)
@@ -764,9 +764,7 @@
}
 
fstrcpy(state-response.data.name.dom_name, dom_name);
-   TALLOC_FREE(dom_name);
fstrcpy(state-response.data.name.name, name);
-   TALLOC_FREE(name);
state-response.data.name.type = type;
 
TALLOC_FREE(dom_name);



svn commit: samba r21451 - in branches/SAMBA_4_0/source/auth/credentials: .

2007-02-19 Thread metze
Author: metze
Date: 2007-02-19 16:43:56 + (Mon, 19 Feb 2007)
New Revision: 21451

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

Log:
if kerberos is requested ( -k yes ), we should use authentificated connections

metze
Modified:
   branches/SAMBA_4_0/source/auth/credentials/credentials.c


Changeset:
Modified: branches/SAMBA_4_0/source/auth/credentials/credentials.c
===
--- branches/SAMBA_4_0/source/auth/credentials/credentials.c2007-02-19 
14:43:31 UTC (rev 21450)
+++ branches/SAMBA_4_0/source/auth/credentials/credentials.c2007-02-19 
16:43:56 UTC (rev 21451)
@@ -238,6 +238,11 @@
if (cred-username_obtained = CRED_SPECIFIED) {
return True;
}
+
+   if (cli_credentials_get_kerberos_state(cred) == CRED_MUST_USE_KERBEROS) 
{
+   return True;
+   }
+
return False;
 }
 



svn commit: samba r21452 - in branches/SAMBA_3_0_25/source: . groupdb lib

2007-02-19 Thread jerry
Author: jerry
Date: 2007-02-19 17:19:25 + (Mon, 19 Feb 2007)
New Revision: 21452

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

Log:
Revert to tdb group_mapping implementation for 3.0.25 release.
No other changes here.


Removed:
   branches/SAMBA_3_0_25/source/groupdb/mapping_ldb.c
   branches/SAMBA_3_0_25/source/lib/ldb/
Modified:
   branches/SAMBA_3_0_25/source/Makefile.in
   branches/SAMBA_3_0_25/source/configure.in


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


svn commit: samba r21453 - in branches/SAMBA_3_0/source: .

2007-02-19 Thread jerry
Author: jerry
Date: 2007-02-19 17:21:21 + (Mon, 19 Feb 2007)
New Revision: 21453

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

Log:
use the tdb mapping file for groups by default for compatibility with the 
3.0.25 tree (for now)
Modified:
   branches/SAMBA_3_0/source/Makefile.in


Changeset:
Modified: branches/SAMBA_3_0/source/Makefile.in
===
--- branches/SAMBA_3_0/source/Makefile.in   2007-02-19 17:19:25 UTC (rev 
21452)
+++ branches/SAMBA_3_0/source/Makefile.in   2007-02-19 17:21:21 UTC (rev 
21453)
@@ -397,7 +397,7 @@
 CP437_OBJ = modules/CP437.o
 CHARSET_MACOSXFS_OBJ = modules/charset_macosxfs.o
 
-GROUPDB_OBJ = groupdb/mapping.o groupdb/mapping_ldb.o
+GROUPDB_OBJ = groupdb/mapping.o groupdb/mapping_tdb.o
 
 PROFILE_OBJ = profile/profile.o
 PROFILES_OBJ = utils/profiles.o \



svn commit: samba r21454 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_25/source/nsswitch

2007-02-19 Thread gd
Author: gd
Date: 2007-02-19 17:47:50 + (Mon, 19 Feb 2007)
New Revision: 21454

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

Log:
Fix debug typo.

Guenther

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
   branches/SAMBA_3_0_25/source/nsswitch/winbindd_cm.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c2007-02-19 17:21:21 UTC 
(rev 21453)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c2007-02-19 17:47:50 UTC 
(rev 21454)
@@ -363,7 +363,7 @@
domain-name ));
 
if (domain-internal) {
-   DEBUG(3,(set_domain_offline: domain %s is internal - logic 
error.\n,
+   DEBUG(3,(set_domain_online: domain %s is internal - logic 
error.\n,
domain-name ));
return;
}

Modified: branches/SAMBA_3_0_25/source/nsswitch/winbindd_cm.c
===
--- branches/SAMBA_3_0_25/source/nsswitch/winbindd_cm.c 2007-02-19 17:21:21 UTC 
(rev 21453)
+++ branches/SAMBA_3_0_25/source/nsswitch/winbindd_cm.c 2007-02-19 17:47:50 UTC 
(rev 21454)
@@ -363,7 +363,7 @@
domain-name ));
 
if (domain-internal) {
-   DEBUG(3,(set_domain_offline: domain %s is internal - logic 
error.\n,
+   DEBUG(3,(set_domain_online: domain %s is internal - logic 
error.\n,
domain-name ));
return;
}



svn commit: samba r21455 - in branches/SAMBA_4_0: . source/pidl/lib/Parse/Pidl/Samba4/NDR source/pidl/tests

2007-02-19 Thread jelmer
Author: jelmer
Date: 2007-02-19 19:42:51 + (Mon, 19 Feb 2007)
New Revision: 21455

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

Log:
Fix a bug in our handling of conformant arrays. The conformant array was 
always pushed, even if just the buffers part of a struct had to be pushed. 

Pull was not affected.

Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
   branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:merge
   - [EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

   + [EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]


Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
===
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm  
2007-02-19 17:47:50 UTC (rev 21454)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm  
2007-02-19 19:42:51 UTC (rev 21455)
@@ -12,7 +12,7 @@
 @EXPORT = qw(is_charset_array);
 @EXPORT_OK = qw(check_null_pointer GenerateFunctionInEnv 
GenerateFunctionOutEnv EnvSubstituteValue GenerateStructEnv NeededFunction
-   NeededElement NeededType);
+   NeededElement NeededType $res);
 
 use strict;
 use Parse::Pidl::Typelist qw(hasType getType mapTypeName);
@@ -110,7 +110,7 @@
}
 }
 
-my $res;
+our $res;
 my $deferred = [];
 my $tabs = ;
 
@@ -1194,6 +1194,34 @@
 {
my ($struct, $name, $varname, $env) = @_;
 
+   # see if the structure contains a conformant array. If it
+   # does, then it must be the last element of the structure, and
+   # we need to push the conformant length early, as it fits on
+   # the wire before the structure (and even before the structure
+   # alignment)
+   if (defined($struct-{SURROUNDING_ELEMENT})) {
+   my $e = $struct-{SURROUNDING_ELEMENT};
+
+   if (defined($e-{LEVELS}[0]) and 
+  

Rev 11540: Allow anonymous and non-anonymous nested structures/unions/enums/bitmaps to be in file:///home/jelmer/bzr.samba/SAMBA_4_0/

2007-02-19 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/SAMBA_4_0/


revno: 11540
revision-id: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Mon 2007-02-19 22:29:17 +0100
message:
  Allow anonymous and non-anonymous nested structures/unions/enums/bitmaps to 
be 
  used in the Samba 4 NDR parser.
  
  This doesn't actually work yet as Parse::Pidl::NDR doesn't handle nested 
  data structures yet, but it's a first step.
modified:
  source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm svn-v2:[EMAIL PROTECTED]
=== modified file 'source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm'
--- a/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm   2007-02-19 19:42:51 
+
+++ b/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm   2007-02-19 21:29:17 
+
@@ -752,6 +752,28 @@
}
 }
 
+sub ParseDataPrint($$$)
+{
+   my ($e, $l, $var_name) = @_;
+   
+   if (not ref($l-{DATA_TYPE}) or 
+   defined($l-{DATA_TYPE}-{NAME})) {
+   my $t;
+   if (ref($l-{DATA_TYPE})) {
+   $t = $l-{DATA_TYPE}-{TYPE}_$l-{DATA_TYPE}-{NAME};
+   } else {
+   $t = $l-{DATA_TYPE};
+   }
+   if (not Parse::Pidl::Typelist::is_scalar($t) or 
+   Parse::Pidl::Typelist::scalar_is_reference($t)) {
+   $var_name = get_pointer_to($var_name);
+   }
+   pidl ndr_print_$t(ndr, \$e-{NAME}\, $var_name);;
+   } else {
+   ParseTypePrint($l-{DATA_TYPE}, $var_name);
+   }
+}
+
 #
 # print scalars in a structure element
 sub ParseElementPrint($$$)
@@ -816,10 +838,7 @@
$var_name = $var_name . [$counter];
}
} elsif ($l-{TYPE} eq DATA) {
-   if (not 
Parse::Pidl::Typelist::is_scalar($l-{DATA_TYPE}) or 
Parse::Pidl::Typelist::scalar_is_reference($l-{DATA_TYPE})) {
-   $var_name = get_pointer_to($var_name);
-   }
-   pidl ndr_print_$l-{DATA_TYPE}(ndr, \$e-{NAME}\, 
$var_name);;
+   ParseDataPrint($e, $l, $var_name);
} elsif ($l-{TYPE} eq SWITCH) {
my $switch_var = ParseExprExt($l-{SWITCH_IS}, $env, 
$e-{ORIGINAL}, 
check_null_pointer($e, $env, 
\pidl, return;), check_fully_dereferenced($e, $env));
@@ -875,20 +894,32 @@
 {
my ($e,$l,$ndr,$var_name,$ndr_flags) = @_;
 
-   if (Parse::Pidl::Typelist::scalar_is_reference($l-{DATA_TYPE})) {
+   if (not ref($l-{DATA_TYPE}) or 
+   defined($l-{DATA_TYPE}-{NAME})) {
+   my $t;
+   if (ref($l-{DATA_TYPE}) eq HASH) {
+   $t = $l-{DATA_TYPE}-{TYPE}_$l-{DATA_TYPE}-{NAME};
+   } else {
+   $t = $l-{DATA_TYPE};
+   }
+
+   if (Parse::Pidl::Typelist::scalar_is_reference($t)) {
+   $var_name = get_pointer_to($var_name);
+   }
+
$var_name = get_pointer_to($var_name);
-   }
-
-   $var_name = get_pointer_to($var_name);
-
-   pidl NDR_CHECK(ndr_pull_$l-{DATA_TYPE}($ndr, $ndr_flags, 
$var_name));;
-
-   if (my $range = has_property($e, range)) {
-   $var_name = get_value_of($var_name);
-   my ($low, $high) = split(/ /, $range, 2);
-   pidl if ($var_name  $low || $var_name  $high) {;
-   pidl \treturn ndr_pull_error($ndr, NDR_ERR_RANGE, \value out 
of range\);;
-   pidl };
+
+   pidl NDR_CHECK(ndr_pull_$t($ndr, $ndr_flags, $var_name));;
+
+   if (my $range = has_property($e, range)) {
+   $var_name = get_value_of($var_name);
+   my ($low, $high) = split(/ /, $range, 2);
+   pidl if ($var_name  $low || $var_name  $high) {;
+   pidl \treturn ndr_pull_error($ndr, NDR_ERR_RANGE, 
\value out of range\);;
+   pidl };
+   }
+   } else {
+   ParseTypePull($l-{DATA_TYPE}, $var_name);
}
 }
 
@@ -896,12 +927,24 @@
 {
my ($e,$l,$ndr,$var_name,$ndr_flags) = @_;
 
-   # strings are passed by value rather than reference
-   if (not Parse::Pidl::Typelist::is_scalar($l-{DATA_TYPE}) or 
Parse::Pidl::Typelist::scalar_is_reference($l-{DATA_TYPE})) {
-   $var_name = get_pointer_to($var_name);
+   if (not ref($l-{DATA_TYPE}) or defined($l-{DATA_TYPE}-{NAME})) {
+   my $t;
+   if (ref($l-{DATA_TYPE}) eq HASH) {
+   $t = $l-{DATA_TYPE}-{TYPE}_$l-{DATA_TYPE}-{NAME};
+   } else {
+   $t = $l-{DATA_TYPE};
+

svn commit: samba r21456 - in branches/SAMBA_4_0: . source/pidl/lib/Parse/Pidl/Samba4/NDR

2007-02-19 Thread jelmer
Author: jelmer
Date: 2007-02-19 21:37:54 + (Mon, 19 Feb 2007)
New Revision: 21456

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

Log:
Allow anonymous and non-anonymous nested structures/unions/enums/bitmaps to be 
used in the Samba 4 NDR parser.

This doesn't actually work yet as Parse::Pidl::NDR doesn't handle nested 
data structures yet, but it's a first step.

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


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:merge
   - [EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

   + [EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]


Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
===
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm  
2007-02-19 19:42:51 UTC (rev 21455)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm  
2007-02-19 21:37:54 UTC (rev 21456)
@@ -752,6 +752,28 @@
}
 }
 
+sub ParseDataPrint($$$)
+{
+   my ($e, $l, $var_name) = @_;
+   
+   if (not ref($l-{DATA_TYPE}) or 
+   defined($l-{DATA_TYPE}-{NAME})) {
+   my $t;
+   if (ref($l-{DATA_TYPE})) {
+   $t = $l-{DATA_TYPE}-{TYPE}_$l-{DATA_TYPE}-{NAME};
+   } else {
+   $t = $l-{DATA_TYPE};
+   }
+   if (not Parse::Pidl::Typelist::is_scalar($t) or 
+   Parse::Pidl::Typelist::scalar_is_reference($t)) {
+   $var_name = get_pointer_to($var_name);
+   }
+   pidl ndr_print_$t(ndr, \$e-{NAME}\, $var_name);;
+   } else {
+   ParseTypePrint($l-{DATA_TYPE}, $var_name);
+   }
+}
+
 #
 # print scalars in a structure element
 sub 

Rev 11541: Cope with anonymous nested types in the NDR layer. This doesn't handled in file:///home/jelmer/bzr.samba/SAMBA_4_0/

2007-02-19 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/SAMBA_4_0/


revno: 11541
revision-id: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Mon 2007-02-19 23:06:07 +0100
message:
  Cope with anonymous nested types in the NDR layer. This doesn't handled 
  named nested types yet, as these have to be registered.
modified:
  source/pidl/lib/Parse/Pidl/NDR.pm svn-v2:[EMAIL PROTECTED]
  source/pidl/tests/ndr.pl   svn-v2:[EMAIL PROTECTED]
=== modified file 'source/pidl/lib/Parse/Pidl/NDR.pm'
--- a/source/pidl/lib/Parse/Pidl/NDR.pm 2007-02-18 16:21:28 +
+++ b/source/pidl/lib/Parse/Pidl/NDR.pm 2007-02-19 22:06:07 +
@@ -257,8 +257,6 @@
 
push (@$order, {
TYPE = DATA,
-   CONVERT_TO = has_property($e, ),
-   CONVERT_FROM = has_property($e, ),
DATA_TYPE = $e-{TYPE},
IS_DEFERRED = $is_deferred,
CONTAINS_DEFERRED = can_contain_deferred($e),
@@ -360,12 +358,16 @@
die(Unknown data type type $dt-{TYPE});
 }
 
-sub ParseElement($)
+sub ParseElement($$)
 {
-   my $e = shift;
+   my ($e, $pointer_default) = @_;
 
$e-{TYPE} = expandAlias($e-{TYPE});
 
+   if (ref($e-{TYPE}) eq HASH) {
+   $e-{TYPE} = ParseType($e-{TYPE}, $pointer_default);
+   }
+
return {
NAME = $e-{NAME},
TYPE = $e-{TYPE},
@@ -379,14 +381,13 @@
 
 sub ParseStruct($$)
 {
-   my ($ndr,$struct) = @_;
+   my ($struct, $pointer_default) = @_;
my @elements = ();
my $surrounding = undef;
 
-
foreach my $x (@{$struct-{ELEMENTS}}) 
{
-   my $e = ParseElement($x);
+   my $e = ParseElement($x, $pointer_default);
if ($x != $struct-{ELEMENTS}[-1] and 
$e-{LEVELS}[0]-{IS_SURROUNDING}) {
fatal($x, conformant member not at end of struct);
@@ -423,7 +424,7 @@
 
 sub ParseUnion($$)
 {
-   my ($ndr,$e) = @_;
+   my ($e, $pointer_default) = @_;
my @elements = ();
my $switch_type = has_property($e, switch_type);
unless (defined($switch_type)) { $switch_type = uint32; }
@@ -437,7 +438,7 @@
if ($x-{TYPE} eq EMPTY) {
$t = { TYPE = EMPTY };
} else {
-   $t = ParseElement($x);
+   $t = ParseElement($x, $pointer_default);
}
if (has_property($x, default)) {
$t-{CASE} = default;
@@ -463,7 +464,7 @@
 
 sub ParseEnum($$)
 {
-   my ($ndr,$e) = @_;
+   my ($e, $pointer_default) = @_;
 
return {
TYPE = ENUM,
@@ -477,7 +478,7 @@
 
 sub ParseBitmap($$)
 {
-   my ($ndr,$e) = @_;
+   my ($e, $pointer_default) = @_;
 
return {
TYPE = BITMAP,
@@ -491,10 +492,10 @@
 
 sub ParseType($$)
 {
-   my ($ndr, $d) = @_;
+   my ($d, $pointer_default) = @_;
 
if ($d-{TYPE} eq STRUCT or $d-{TYPE} eq UNION) {
-   CheckPointerTypes($d, $ndr-{PROPERTIES}-{pointer_default});
+   CheckPointerTypes($d, $pointer_default);
}
 
my $data = {
@@ -503,20 +504,20 @@
ENUM = \ParseEnum,
BITMAP = \ParseBitmap,
TYPEDEF = \ParseTypedef,
-   }-{$d-{TYPE}}-($ndr, $d);
+   }-{$d-{TYPE}}-($d, $pointer_default);
 
return $data;
 }
 
 sub ParseTypedef($$)
 {
-   my ($ndr,$d) = @_;
+   my ($d, $pointer_default) = @_;
 
if (defined($d-{DATA}-{PROPERTIES})  !defined($d-{PROPERTIES})) {
$d-{PROPERTIES} = $d-{DATA}-{PROPERTIES};
}
 
-   my $data = ParseType($ndr, $d-{DATA});
+   my $data = ParseType($d-{DATA}, $pointer_default);
$data-{ALIGN} = align_type($d-{NAME});
 
return {
@@ -550,7 +551,7 @@
}
 
foreach my $x (@{$d-{ELEMENTS}}) {
-   my $e = ParseElement($x);
+   my $e = ParseElement($x, $ndr-{PROPERTIES}-{pointer_default});
push (@{$e-{DIRECTION}}, in) if (has_property($x, in));
push (@{$e-{DIRECTION}}, out) if (has_property($x, out));
 
@@ -618,7 +619,7 @@
} elsif ($d-{TYPE} eq CONST) {
push (@consts, ParseConst($idl, $d));
} else {
-   push (@types, ParseType($idl, $d));
+   push (@types, ParseType($d, 
$idl-{PROPERTIES}-{pointer_default}));
}
}
 

=== modified file 'source/pidl/tests/ndr.pl'
--- a/source/pidl/tests/ndr.pl  2007-02-18 13:44:01 +
+++ b/source/pidl/tests/ndr.pl  2007-02-19 22:06:07 +
@@ -27,15 +27,13 @@
'IS_DEFERRED' = 0,
'LEVEL_INDEX' = 0,
'DATA_TYPE' = 'uint8',
-   'CONVERT_FROM' = undef,
  

svn commit: samba r21457 - in branches/SAMBA_4_0: . source/pidl/lib/Parse/Pidl source/pidl/tests

2007-02-19 Thread jelmer
Author: jelmer
Date: 2007-02-19 22:10:23 + (Mon, 19 Feb 2007)
New Revision: 21457

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

Log:
Cope with anonymous nested types in the NDR layer. This doesn't handled 
named nested types yet, as these have to be registered.

Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
   branches/SAMBA_4_0/source/pidl/tests/ndr.pl


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:merge
   - [EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

   + [EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]


Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
===
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm2007-02-19 
21:37:54 UTC (rev 21456)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm2007-02-19 
22:10:23 UTC (rev 21457)
@@ -257,8 +257,6 @@
 
push (@$order, {
TYPE = DATA,
-   CONVERT_TO = has_property($e, ),
-   CONVERT_FROM = has_property($e, ),
DATA_TYPE = $e-{TYPE},
IS_DEFERRED = $is_deferred,
CONTAINS_DEFERRED = can_contain_deferred($e),
@@ -360,12 +358,16 @@
die(Unknown data type type $dt-{TYPE});
 }
 
-sub ParseElement($)
+sub ParseElement($$)
 {
-   my $e = shift;
+   my ($e, $pointer_default) = @_;
 
$e-{TYPE} = expandAlias($e-{TYPE});
 
+   if (ref($e-{TYPE}) eq HASH) {
+   $e-{TYPE} = ParseType($e-{TYPE}, $pointer_default);
+   }
+
return {
NAME = $e-{NAME},
TYPE = $e-{TYPE},
@@ -379,14 +381,13 @@
 
 sub ParseStruct($$)
 {
-   my ($ndr,$struct) = @_;
+   my ($struct, $pointer_default) = @_;
my @elements = ();
my $surrounding = undef;
 
-
foreach my $x (@{$struct-{ELEMENTS}}) 
 

Rev 11542: Prepare for generating separate primitives/deferred code. in file:///home/jelmer/bzr.samba/SAMBA_4_0/

2007-02-19 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/SAMBA_4_0/


revno: 11542
revision-id: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Tue 2007-02-20 00:08:25 +0100
message:
  Prepare for generating separate primitives/deferred code.
modified:
  source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm svn-v2:[EMAIL PROTECTED]
=== modified file 'source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm'
--- a/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm   2007-02-19 21:37:54 
+
+++ b/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm   2007-02-19 23:08:25 
+
@@ -643,9 +643,9 @@
return;
} 
} elsif ($l-{TYPE} eq SWITCH) {
-   ParseSwitchPush($e, $l, $ndr, $var_name, $ndr_flags, 
$env);
+   ParseSwitchPush($e, $l, $ndr, $var_name, $env);
} elsif ($l-{TYPE} eq DATA) {
-   ParseDataPush($e, $l, $ndr, $var_name, $ndr_flags);
+   ParseDataPush($e, $l, $ndr, $var_name, $primitives, 
$deferred);
}
}
 
@@ -868,9 +868,9 @@
 
 #
 # parse scalars in a structure element - pull size
-sub ParseSwitchPull($$)
+sub ParseSwitchPull($)
 {
-   my($e,$l,$ndr,$var_name,$ndr_flags,$env) = @_;
+   my($e,$l,$ndr,$var_name,$env) = @_;
my $switch_var = ParseExprExt($l-{SWITCH_IS}, $env, $e-{ORIGINAL}, 
check_null_pointer($e, $env, \pidl, return 
NT_STATUS_INVALID_PARAMETER_MIX;), check_fully_dereferenced($e, $env));
 
@@ -880,9 +880,9 @@
 
 #
 # push switch element
-sub ParseSwitchPush($$)
+sub ParseSwitchPush($)
 {
-   my($e,$l,$ndr,$var_name,$ndr_flags,$env) = @_;
+   my($e,$l,$ndr,$var_name,$env) = @_;
my $switch_var = ParseExprExt($l-{SWITCH_IS}, $env, $e-{ORIGINAL}, 
check_null_pointer($e, $env, \pidl, return 
NT_STATUS_INVALID_PARAMETER_MIX;), check_fully_dereferenced($e, $env));
 
@@ -890,12 +890,14 @@
pidl NDR_CHECK(ndr_push_set_switch_value($ndr, $var_name, 
$switch_var));;
 }
 
-sub ParseDataPull($)
+sub ParseDataPull($$)
 {
-   my ($e,$l,$ndr,$var_name,$ndr_flags) = @_;
+   my ($e,$l,$ndr,$var_name,$primitives,$deferred) = @_;
 
if (not ref($l-{DATA_TYPE}) or 
defined($l-{DATA_TYPE}-{NAME})) {
+
+   my $ndr_flags = CalcNdrFlags($l, $primitives, $deferred);
my $t;
if (ref($l-{DATA_TYPE}) eq HASH) {
$t = $l-{DATA_TYPE}-{TYPE}_$l-{DATA_TYPE}-{NAME};
@@ -919,13 +921,13 @@
pidl };
}
} else {
-   ParseTypePull($l-{DATA_TYPE}, $var_name);
+   ParseTypePull($l-{DATA_TYPE}, $var_name, $primitives, 
$deferred);
}
 }
 
-sub ParseDataPush($)
+sub ParseDataPush($$)
 {
-   my ($e,$l,$ndr,$var_name,$ndr_flags) = @_;
+   my ($e,$l,$ndr,$var_name,$primitives,$deferred) = @_;
 
if (not ref($l-{DATA_TYPE}) or defined($l-{DATA_TYPE}-{NAME})) {
my $t;
@@ -941,9 +943,10 @@
$var_name = get_pointer_to($var_name);
}
 
+   my $ndr_flags = CalcNdrFlags($l, $primitives, $deferred);
pidl NDR_CHECK(ndr_push_$t($ndr, $ndr_flags, $var_name));;
} else {
-   ParseTypePush($l-{DATA_TYPE}, $var_name);
+   ParseTypePush($l-{DATA_TYPE}, $var_name, $primitives, 
$deferred);
}
 }
 
@@ -1069,9 +1072,9 @@
} elsif ($l-{TYPE} eq POINTER) {
ParsePtrPull($e, $l, $ndr, $var_name);
} elsif ($l-{TYPE} eq SWITCH) {
-   ParseSwitchPull($e, $l, $ndr, $var_name, $ndr_flags, 
$env);
+   ParseSwitchPull($e, $l, $ndr, $var_name, $env);
} elsif ($l-{TYPE} eq DATA) {
-   ParseDataPull($e, $l, $ndr, $var_name, $ndr_flags);
+   ParseDataPull($e, $l, $ndr, $var_name, $primitives, 
$deferred);
}
}
 
@@ -2419,9 +2422,9 @@
 
 }
 
-sub ParseTypePush($$)
+sub ParseTypePush()
 {
-   my ($e, $varname) = @_;
+   my ($e, $varname, $primitives, $deferred) = @_;
 
# save the old relative_base_offset
pidl uint32_t _save_relative_base_offset = 
ndr_push_get_relative_base_offset(ndr); if defined(has_property($e, 
relative_base));
@@ -2439,16 +2442,16 @@
 
pidl {;
indent;
-   ParseTypePush($e, $varname);
+   ParseTypePush($e, $varname, 1, 1);
pidl return NT_STATUS_OK;;
deindent;
pidl };
pidl ;;
 }
 
-sub ParseTypePull($$)
+sub ParseTypePull()
 {
-   my ($e, $varname) = @_;
+   my 

svn commit: samba r21458 - in branches/SAMBA_4_0: . source/pidl/lib/Parse/Pidl/Samba4/NDR

2007-02-19 Thread jelmer
Author: jelmer
Date: 2007-02-19 23:11:01 + (Mon, 19 Feb 2007)
New Revision: 21458

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

Log:
Prepare for generating separate primitives/deferred code.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:merge
   - [EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

   + [EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]


Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
===
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm  
2007-02-19 22:10:23 UTC (rev 21457)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm  
2007-02-19 23:11:01 UTC (rev 21458)
@@ -643,9 +643,9 @@
return;
} 
} elsif ($l-{TYPE} eq SWITCH) {
-   ParseSwitchPush($e, $l, $ndr, $var_name, $ndr_flags, 
$env);
+   ParseSwitchPush($e, $l, $ndr, $var_name, $env);
} elsif ($l-{TYPE} eq DATA) {
-   ParseDataPush($e, $l, $ndr, $var_name, $ndr_flags);
+   ParseDataPush($e, $l, $ndr, $var_name, $primitives, 
$deferred);
}
}
 
@@ -868,9 +868,9 @@
 
 #
 # parse scalars in a structure element - pull size
-sub ParseSwitchPull($$)
+sub ParseSwitchPull($)
 {
-   my($e,$l,$ndr,$var_name,$ndr_flags,$env) = @_;
+   my($e,$l,$ndr,$var_name,$env) = @_;
my $switch_var = ParseExprExt($l-{SWITCH_IS}, $env, $e-{ORIGINAL}, 
check_null_pointer($e, $env, \pidl, return 
NT_STATUS_INVALID_PARAMETER_MIX;), 

Build status as of Tue Feb 20 00:00:02 2007

2007-02-19 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2007-02-19 
00:02:44.0 +
+++ /home/build/master/cache/broken_results.txt 2007-02-20 00:00:36.0 
+
@@ -1,4 +1,4 @@
-Build status as of Mon Feb 19 00:00:02 2007
+Build status as of Tue Feb 20 00:00:02 2007
 
 Build counts:
 Tree Total  Broken Panic 
@@ -11,12 +11,12 @@
 libreplace   31 2  0 
 lorikeet-heimdal 30 17 0 
 ppp  16 0  0 
-rsync35 6  0 
+rsync35 7  0 
 samba0  0  0 
 samba-docs   0  0  0 
 samba4   39 26 0 
-samba_3_041 13 0 
+samba_3_041 15 1 
 smb-build32 32 0 
 talloc   35 1  0 
-tdb  33 2  0 
+tdb  33 3  0 
 


Rev 11543: Remove name argument, more refactoring. in file:///home/jelmer/bzr.samba/SAMBA_4_0/

2007-02-19 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/SAMBA_4_0/


revno: 11543
revision-id: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij [EMAIL PROTECTED]
branch nick: SAMBA_4_0
timestamp: Tue 2007-02-20 02:24:43 +0100
message:
  Remove name argument, more refactoring.
modified:
  source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm svn-v2:[EMAIL PROTECTED]
  source/pidl/tests/samba-ndr.pl svn-v2:[EMAIL PROTECTED]
=== modified file 'source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm'
--- a/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm   2007-02-19 23:11:01 
+
+++ b/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm   2007-02-20 01:24:43 
+
@@ -1236,9 +1236,9 @@
pidl };
 }
 
-sub ParseStructPushPrimitives()
+sub ParseStructPushPrimitives($$$)
 {
-   my ($struct, $name, $varname, $env) = @_;
+   my ($struct, $varname, $env) = @_;
 
# see if the structure contains a conformant array. If it
# does, then it must be the last element of the structure, and
@@ -1279,9 +1279,9 @@
ParseElementPush($_, ndr, $env, 1, 0) foreach 
(@{$struct-{ELEMENTS}});
 }
 
-sub ParseStructPushDeferred()
+sub ParseStructPushDeferred($$$)
 {
-   my ($struct, $name, $varname, $env) = @_;
+   my ($struct, $varname, $env) = @_;
if (defined($struct-{PROPERTIES}{relative_base})) {
# retrieve the current offset as base for relative pointers
# based on the toplevel struct/union
@@ -1292,9 +1292,9 @@
 
 #
 # parse a struct
-sub ParseStructPush($$$)
+sub ParseStructPush($$)
 {
-   my ($struct, $name, $varname) = @_;
+   my ($struct, $varname) = @_;

return unless defined($struct-{ELEMENTS});
 
@@ -1308,13 +1308,13 @@
 
pidl if (ndr_flags  NDR_SCALARS) {;
indent;
-   ParseStructPushPrimitives($struct, $name, $varname, $env);
+   ParseStructPushPrimitives($struct, $varname, $env);
deindent;
pidl };
 
pidl if (ndr_flags  NDR_BUFFERS) {;
indent;
-   ParseStructPushDeferred($struct, $name, $varname, $env);
+   ParseStructPushDeferred($struct, $varname, $env);
deindent;
pidl };
 
@@ -1323,9 +1323,9 @@
 
 #
 # generate a push function for an enum
-sub ParseEnumPush($$$)
+sub ParseEnumPush($$)
 {
-   my($enum,$name,$varname) = @_;
+   my($enum,$varname) = @_;
my($type_fn) = $enum-{BASE_TYPE};
 
start_flags($enum);
@@ -1335,9 +1335,9 @@
 
 #
 # generate a pull function for an enum
-sub ParseEnumPull($$$)
+sub ParseEnumPull($$)
 {
-   my($enum,$name,$varname) = @_;
+   my($enum,$varname) = @_;
my($type_fn) = $enum-{BASE_TYPE};
my($type_v_decl) = mapTypeName($type_fn);
 
@@ -1396,9 +1396,9 @@
 
 #
 # generate a push function for a bitmap
-sub ParseBitmapPush($$$)
+sub ParseBitmapPush($$)
 {
-   my($bitmap,$name,$varname) = @_;
+   my($bitmap,$varname) = @_;
my($type_fn) = $bitmap-{BASE_TYPE};
 
start_flags($bitmap);
@@ -1410,9 +1410,9 @@
 
 #
 # generate a pull function for an bitmap
-sub ParseBitmapPull($$$)
+sub ParseBitmapPull($$)
 {
-   my($bitmap,$name,$varname) = @_;
+   my($bitmap,$varname) = @_;
my $type_fn = $bitmap-{BASE_TYPE};
my($type_decl) = mapTypeName($bitmap-{BASE_TYPE});
 
@@ -1559,9 +1559,9 @@
}
 }
 
-sub ParseStructPullPrimitives()
+sub ParseStructPullPrimitives($$$)
 {
-   my($struct,$name,$varname,$env) = @_;
+   my($struct,$varname,$env) = @_;
 
if (defined $struct-{SURROUNDING_ELEMENT}) {
pidl NDR_CHECK(ndr_pull_array_size(ndr, 
$varname-$struct-{SURROUNDING_ELEMENT}-{NAME}));;
@@ -1580,9 +1580,9 @@
add_deferred();
 }
 
-sub ParseStructPullDeferred()
+sub ParseStructPullDeferred($$$)
 {
-   my ($struct,$name,$varname,$env) = @_;
+   my ($struct,$varname,$env) = @_;
 
if (defined($struct-{PROPERTIES}{relative_base})) {
# retrieve the current offset as base for relative pointers
@@ -1598,9 +1598,9 @@
 
 #
 # parse a struct - pull side
-sub ParseStructPull($$$)
+sub ParseStructPull($$)
 {
-   my($struct,$name,$varname) = @_;
+   my($struct,$varname) = @_;
 
return unless defined $struct-{ELEMENTS};
 
@@ -1617,12 +1617,12 @@
 
pidl if (ndr_flags  NDR_SCALARS) {;
indent;
-   ParseStructPullPrimitives($struct,$name,$varname,$env);
+   ParseStructPullPrimitives($struct,$varname,$env);
deindent;
pidl };
pidl if (ndr_flags  

svn commit: samba r21459 - in branches/SAMBA_4_0: . source/pidl/lib/Parse/Pidl/Samba4/NDR source/pidl/tests

2007-02-19 Thread jelmer
Author: jelmer
Date: 2007-02-20 01:27:48 + (Tue, 20 Feb 2007)
New Revision: 21459

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

Log:
Remove name argument, more refactoring.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
   branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl


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


Rev 64: added rest of tdb (missed in earlier commit) in http://samba.org/~tridge/ctdb

2007-02-19 Thread tridge

revno: 64
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Tue 2007-02-20 13:24:45 +1100
message:
  added rest of tdb (missed in earlier commit)
added:
  lib/tdb/common/common-20070220022425-m1wibgjq7n5hahs6-1
  lib/tdb/common/dump.c  dump.c-20070220022425-m1wibgjq7n5hahs6-2
  lib/tdb/common/error.c error.c-20070220022425-m1wibgjq7n5hahs6-3
  lib/tdb/common/freelist.c  freelist.c-20070220022425-m1wibgjq7n5hahs6-4
  lib/tdb/common/freelistcheck.c 
freelistcheck.c-20070220022425-m1wibgjq7n5hahs6-5
  lib/tdb/common/io.cio.c-20070220022425-m1wibgjq7n5hahs6-6
  lib/tdb/common/lock.c  lock.c-20070220022425-m1wibgjq7n5hahs6-7
  lib/tdb/common/open.c  open.c-20070220022425-m1wibgjq7n5hahs6-8
  lib/tdb/common/tdb.c   tdb.c-20070220022425-m1wibgjq7n5hahs6-9
  lib/tdb/common/tdb_private.h   
tdb_private.h-20070220022425-m1wibgjq7n5hahs6-10
  lib/tdb/common/transaction.c   
transaction.c-20070220022425-m1wibgjq7n5hahs6-11
  lib/tdb/common/traverse.c  traverse.c-20070220022425-m1wibgjq7n5hahs6-12

Diff too large for email (3917, the limit is 200).


Rev 61: support hostnames for node names in http://samba.org/~tridge/ctdb

2007-02-19 Thread tridge

revno: 61
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Tue 2007-02-20 13:22:18 +1100
message:
  support hostnames for node names
modified:
  tcp/tcp_connect.c  tcp_connect.c-20061128004937-x70q1cu5xzg5g2tm-1
=== modified file 'tcp/tcp_connect.c'
--- a/tcp/tcp_connect.c 2007-01-23 00:38:45 +
+++ b/tcp/tcp_connect.c 2007-02-20 02:22:18 +
@@ -69,6 +69,22 @@
}
 }
 
+
+static int ctdb_tcp_get_address(struct ctdb_context *ctdb,
+   const char *address, struct in_addr *addr)
+{
+   if (inet_pton(AF_INET, address, addr) = 0) {
+   struct hostent *he = gethostbyname(address);
+   if (he == NULL || he-h_length  sizeof(*addr)) {
+   ctdb_set_error(ctdb, invalid nework address '%s'\n, 
+  address);
+   return -1;
+   }
+   memcpy(addr, he-h_addr, he-h_length);
+   }
+   return 0;
+}
+
 /*
   called when we should try and establish a tcp connection to a node
 */
@@ -85,7 +101,9 @@
 
set_nonblocking(tnode-fd);
 
-   inet_pton(AF_INET, node-address.address, sock_out.sin_addr);
+   if (ctdb_tcp_get_address(ctdb, node-address.address, 
sock_out.sin_addr) != 0) {
+   return;
+   }
sock_out.sin_port = htons(node-address.port);
sock_out.sin_family = PF_INET;

@@ -159,7 +177,9 @@
 
 sock.sin_port = htons(ctdb-address.port);
 sock.sin_family = PF_INET;
-   inet_pton(AF_INET, ctdb-address.address, sock.sin_addr);
+   if (ctdb_tcp_get_address(ctdb, ctdb-address.address, sock.sin_addr) 
!= 0) {
+   return -1;
+   }
 
 ctcp-listen_fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
 if (ctcp-listen_fd == -1) {



Rev 63: ignored some files in http://samba.org/~tridge/ctdb

2007-02-19 Thread tridge

revno: 63
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Tue 2007-02-20 13:23:43 +1100
message:
  ignored some files
modified:
  .bzrignore bzrignore-20061117235536-slq8jlz2b5161dfm-1
=== modified file '.bzrignore'
--- a/.bzrignore2007-02-08 22:54:21 +
+++ b/.bzrignore2007-02-20 02:23:43 +
@@ -8,3 +8,5 @@
 configure
 config.h
 config.h.in
+nodes-ssh.txt
+TAGS



Rev 62: added a benchmark script that launches via ssh in http://samba.org/~tridge/ctdb

2007-02-19 Thread tridge

revno: 62
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Tue 2007-02-20 13:23:01 +1100
message:
  added a benchmark script that launches via ssh
added:
  tests/bench-ssh.sh benchssh.sh-20070220022243-k2evfudau0j1bwmn-1
=== added file 'tests/bench-ssh.sh'
--- a/tests/bench-ssh.sh1970-01-01 00:00:00 +
+++ b/tests/bench-ssh.sh2007-02-20 02:23:01 +
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+if [ $# -lt 1 ]; then
+echo Usage: bench-ssh.sh NODES OPTIONS
+exit 1
+fi
+
+while :; do
+if [ `echo $1 | cut -c1` = - -o $# -eq 0 ]; then break; fi
+nodes=$nodes $1;
+shift;
+done
+
+options=$*
+dir=`pwd`
+
+echo Creating nodes-ssh.txt
+rm -f nodes-ssh.txt
+count=0
+for h in $nodes; do
+echo $h:9001  nodes-ssh.txt
+count=`expr $count + 1`
+done
+
+
+echo Killing old processes
+for h in $nodes; do
+scp -q nodes-ssh.txt $h:$dir
+ssh $h killall -q ctdb_bench
+done
+
+echo Starting nodes
+i=0
+for h in $nodes; do
+if [ $i -eq `expr $count - 1` ]; then
+   ssh $h $dir/bin/ctdb_bench --nlist $dir/nodes-ssh.txt --listen $h:9001 
$options
+else
+   ssh -f $h $dir/bin/ctdb_bench --nlist $dir/nodes-ssh.txt --listen 
$h:9001 $options
+fi
+i=`expr $i + 1`
+done
+
+wait



Rev 65: added --num-msgs option in http://samba.org/~tridge/ctdb

2007-02-19 Thread tridge

revno: 65
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Tue 2007-02-20 14:57:13 +1100
message:
  added --num-msgs option 
  added TCP_NODELAY on tcp sockets
modified:
  ctdb_bench.c   ctdb_bench.c-20061219052637-2liagoglohxb6p7s-1
  tcp/tcp_connect.c  tcp_connect.c-20061128004937-x70q1cu5xzg5g2tm-1
=== modified file 'ctdb_bench.c'
--- a/ctdb_bench.c  2007-02-16 03:48:27 +
+++ b/ctdb_bench.c  2007-02-20 03:57:13 +
@@ -43,6 +43,7 @@
 
 static int timelimit = 10;
 static int num_records = 10;
+static int num_msgs = 1;
 static int num_repeats = 100;
 
 enum my_functions {FUNC_INCR=1, FUNC_FETCH=2};
@@ -152,6 +153,7 @@
int vnn=ctdb_get_vnn(ctdb);
 
if (vnn == 0) {
+   int i;
/* two messages are injected into the ring, moving
   in opposite directions */
int dest, incr;
@@ -160,18 +162,21 @@
data.dptr = (uint8_t *)incr;
data.dsize = sizeof(incr);
 
-   incr = 1;
-   dest = (ctdb_get_vnn(ctdb) + incr) % ctdb_get_num_nodes(ctdb);
-   ctdb_send_message(ctdb, dest, 0, data);
-   incr = -1;
-   dest = (ctdb_get_vnn(ctdb) + incr) % ctdb_get_num_nodes(ctdb);
-   ctdb_send_message(ctdb, dest, 0, data);
+   for (i=0;inum_msgs;i++) {
+   incr = 1;
+   dest = (ctdb_get_vnn(ctdb) + incr) % 
ctdb_get_num_nodes(ctdb);
+   ctdb_send_message(ctdb, dest, 0, data);
+
+   incr = -1;
+   dest = (ctdb_get_vnn(ctdb) + incr) % 
ctdb_get_num_nodes(ctdb);
+   ctdb_send_message(ctdb, dest, 0, data);
+   }
}

start_timer();
 
while (end_timer()  timelimit) {
-   if (vnn == 0  msg_count % 1000 == 0) {
+   if (vnn == 0  msg_count % 1 == 0) {
printf(Ring: %.2f msgs/sec (+ve=%d -ve=%d)\r, 
   msg_count/end_timer(), msg_plus, msg_minus);
fflush(stdout);
@@ -203,6 +208,7 @@
{ self-connect, 0, POPT_ARG_NONE, self_connect, 0, enable 
self connect, boolean },
{ timelimit, 't', POPT_ARG_INT, timelimit, 0, timelimit, 
integer },
{ num-records, 'r', POPT_ARG_INT, num_records, 0, 
num_records, integer },
+   { num-msgs, 'n', POPT_ARG_INT, num_msgs, 0, num_msgs, 
integer },
POPT_TABLEEND
};
int opt;

=== modified file 'tcp/tcp_connect.c'
--- a/tcp/tcp_connect.c 2007-02-20 02:22:18 +
+++ b/tcp/tcp_connect.c 2007-02-20 03:57:13 +
@@ -46,6 +46,7 @@
struct ctdb_context *ctdb = node-ctdb;
int error = 0;
socklen_t len = sizeof(error);
+   int one = 1;
 
if (getsockopt(tnode-fd, SOL_SOCKET, SO_ERROR, error, len) != 0 ||
error != 0) {
@@ -64,6 +65,8 @@
/* tell the ctdb layer we are connected */
node-ctdb-upcalls-node_connected(node);
 
+setsockopt(tnode-fd,IPPROTO_TCP,TCP_NODELAY,(char *)one,sizeof(one));
+
if (tnode-queue) {
EVENT_FD_WRITEABLE(tnode-fde); 
}



svn commit: samba r21460 - in branches: SAMBA_3_0/source/include SAMBA_3_0/source/libsmb SAMBA_3_0/source/smbd SAMBA_3_0_25/source/include SAMBA_3_0_25/source/libsmb SAMBA_3_0_25/source/smbd

2007-02-19 Thread jra
Author: jra
Date: 2007-02-20 06:22:20 + (Tue, 20 Feb 2007)
New Revision: 21460

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

Log:
Fix for server-side processing of SPNEGO auth
fragmented into max xmit size security blob
chunks. Bug #4400. Needs limits adding, and also
a client-side version.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/include/smb.h
   branches/SAMBA_3_0/source/libsmb/asn1.c
   branches/SAMBA_3_0/source/smbd/password.c
   branches/SAMBA_3_0/source/smbd/sesssetup.c
   branches/SAMBA_3_0_25/source/include/smb.h
   branches/SAMBA_3_0_25/source/libsmb/asn1.c
   branches/SAMBA_3_0_25/source/smbd/password.c
   branches/SAMBA_3_0_25/source/smbd/sesssetup.c


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