[Samba] Re: Fatal Samba bug? Why can't anyone answer this question?

2007-03-12 Thread Akemi Yagi
On Mon, 12 Mar 2007 16:00:23 +1000, Ron House wrote:

 A few more facts: the user attempting to mount the share has the same uid
 and password on all machines, so unless there is some other password
 somewhere in the samba system, it _is_ getting the right password.
 Furthermore, all machines can ssh and scp to/from all others.

Have you looked at the /etc/samba/passwd file?  It could be
/etc/samba/smbpasswd depending on the distro.

 BTW, when changing smb.conf, what is the recommended way to restart the
 samba server with the new settings? The man pages aren't too clear on
 that.

/etc/init.d/samba restart
(or /etc/init.d/smb restart -- check the /etc/init.d directory)

HTH,
Akemi

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


Re: [Samba] Fatal Samba bug? Why can't anyone answer this question?

2007-03-12 Thread Michael Heydon

Ron House wrote:
Perhaps this is this a fatal bug in samba if no one knows how to fix 
it. Below is my original question:
In general people (developers especially) aren't terribly likely to 
respond to anything that blames a a bug and then proceeds to describe a 
problem that sounds more like a configuration error than anything else


The problem: Machines B and C allow users to mount samba shares, but 
machines A and D don't. I get:


smbmount //spk/homes ~/mnt
Password:
3573: tree connect failed: ERRSRV - ERRbadpw (Bad password - 
name/password pair in a Tree Connect or Session Setup are invalid.)

SMB connection failed
From this I assume all 4 machines are attempting to mount the same 
share off a single server? First off, afaik smb is depreciated, use 
cifs. Don't call smbmount directly, use mount -t smb (or mount -t cifs). 
Neither of those are likely to cause your problem but thats how its done



client use spnego=no
This could be your problem. Why do you have this line? Do you really 
need it?


Alot of the settings in your config file are contraditory, depreciated, 
or just plain wrong. Since you only talk about these machines as being 
clients I won't go into the details since they aren't really important, 
however I would suggest that for the most part samba has pretty good 
defaults and you should only be defining something in the config file if 
you understand it and know that you need it.


Aside from the line above the config file you posted doesn't appear to 
have much info related to acting as a client. Is the server a samba box? 
can you provide the config from that?
A few more facts: the user attempting to mount the share has the same 
uid and password on all machines, so unless there is some other 
password somewhere in the samba system, it _is_ getting the right 
password. Furthermore, all machines can ssh and scp to/from all others.
Samba doesn't use the unix password database, it uses its own storage 
which in your case is set to a tdbsam database. SSH and scp are not 
valid tests since they only test the unix passwords. Based on the error 
returned my guess is that it _isn't_ getting the right password.


To make matters worse, I can't find any error logs. A recursive grep 
on /var/log for samba only finds the startup messages from when the 
machine is turned on.
Your log files are stored as per the log file setting in your 
smb.conf, you may have to create the directory. Samba rarely (if ever) 
writes it's own name to it's log files (who is going to be writing to a 
samba log file but samba?) try searching for smb as samba will record 
which daemon (smbd or nmbd) is producing the errors.
BTW, when changing smb.conf, what is the recommended way to restart 
the samba server with the new settings? The man pages aren't too clear 
on that.


  The  configuration  file, and any files that it includes, are 
automati-
  cally reloaded every minute, if they change. You can force a 
reload  by
  sending  a  SIGHUP to the server. Reloading the configuration 
file will
  not affect connections to any  service  that  is  already  
established.
  Either  the  user  will  have  to  disconnect from the service, 
or smbd

  killed and restarted.

Which bit is unclear? The user has to disconnect using for example net 
use * /delete and reconnect or you have to kill the smbd process on the 
server. Different distros will have their own way of doing this or you 
can use a combination of smbstatus, ps, kill and killall.


Basically if you can provide the config file from the server it would go 
along way towards solving your problems.


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


[Samba] %M resolve to IP (only)

2007-03-12 Thread Robert Smol
Hi,

I would like to have [backup] service hosted on samba machine, resolving
each client to different directory (/srv/backup/prod001,
or /srv/bacjup/prod001.domain.com). Is this possible? By reading man to
smb.conf I see there is %M variable.

I have defined following service

## backup share
[backup]
   path = /srv/backups/machines/%M
   read only = No
   public = no
   writable = yes
   printable = no


Still samba resolve this to /srv/backups/machines/192.168.10.11

Reverse DNS is working fine on machine:

node001 ~ # host 192.168.10.11
11.10.168.192.in-addr.arpa domain name pointer dmz001.domain.com.

Am I doing something wrong?

Best regards

Robert Smol


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


[Samba] queue windows client not emtpying

2007-03-12 Thread Lutieri G.

i'm having this problem:

https://bugzilla.samba.org/show_bug.cgi?id=2220

but in bugzilla this is reported in version 3.0.11. I'm having same
problem in samba 3.0.24.

[EMAIL PROTECTED] ~]# smbd -b
Build environment:
  Built by:[EMAIL PROTECTED]
  Built on:Wed Feb  7 23:52:44 EST 2007
  Built using: gcc
  Build host:  Linux hs20-bc1-7.build.redhat.com 2.6.9-34.ELsmp #1
SMP Fri Feb 24 16:56:28 EST 2006 i686 i686 i386 GNU/Linux
  SRCDIR:  /builddir/build/BUILD/samba-3.0.24/source
  BUILDDIR:/builddir/build/BUILD/samba-3.0.24/source


CUPS 1.2.5.

I don't know what to do. Can you help me?!

tanxs

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


Re: [Samba] samba+Ldap+smbldap-tools

2007-03-12 Thread Asier Baranguán

Chechu escribió:

I have  aproblem with the smbldap-tools...when I try to change the
passwd fron a user in win...I get the error , and I know that the
script of smbldap-tools fails when try to execute the next line:


[ ... ]

This looks mostly an ACL problem in your LDAP server (OpenLDAP?).


[global]

   workgroup = IRONMAN
   netbios name = SHOGUN
   server string = SAMBA-LDAP PDC server
;  wins support = no
;  wins server = w.x.y.z


Hmmm... ¿domain without WINS Server? If you have windows clients a wins server is not 
strictly neccesary, but it's strongly adviced.



   security = user
   encrypt passwords = true
   passdb backend = ldapsam:ldaps://shogun.ironman.es:636
;  guest account = guest
   invalid users = root
   unix password sync = no
;   ldap passwd sync = yes


With this settings I assume that your samba users don't need to be recognized as regular 
users.



   passwd program = /usr/sbin/changepasswd.atc   -o %u


Emmm... ¿this script calls smbldap-passwd?

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

Re: [Samba] Is anything special needed for connecting two linux computers?

2007-03-12 Thread Felipe Augusto van de Wiel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/11/2007 04:19 PM, Tomáš Hnyk wrote:
 Oops, yeah, I know about that, I did not realize this 
 difference in smb.conf. Sorry for the misinformation.
 The files are actually as follows (so they have unique
 names):

Have you tried to use smbclient?

And what about LinNeighborhood?


Using 'security = share' should be quite simples, once you
have the shares, you only need access them. Have you checked the
Samba 3 By Example, the first scenario is quite simples to implement
and use.

Kind regards,

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

iD8DBQFF9U2CCj65ZxU4gPQRAsGtAJ958C0m6KQQ7lU5yM2QVAERCsY2KQCgrN9x
NBqguCRv1Pjfi8816EzjPjI=
=4Yyn
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] I cannot see the network in the PDC server but yes in xp stations, any idea?

2007-03-12 Thread Felipe Augusto van de Wiel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/11/2007 12:58 PM, Ferran Martínez wrote:
 I have set samba server as PDC and I can see the network in others
 computers
 but not in the server, any idea?

The first idea is that you don't really need to send the
same message three times with minutes of difference. :-)


 thx for advance
 my smb.cnf:
 
 # Samba config file created using SWAT
 # from 0.0.0.0 (0.0.0.0)
 # Date: 2007/03/09 22:38:36
 
 [global]

When you say that you can't the network, what exactly do
you mean? You can't ping them? They didn't appear on the smbtree?
You can connect using smbclient?

Do you have a firewall on the server?

Kind regards,

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

iD8DBQFF9U5TCj65ZxU4gPQRAp7mAKDBrQMIsFf64Zsa5kcM5lo9wQyqCgCeNnpd
jPuTJU7YkDHGieNS1a6sRFw=
=ut6+
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Samba PDC - upgrading from winxp clients to linux (OpenSUSE) clients

2007-03-12 Thread Felipe Augusto van de Wiel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/11/2007 12:51 PM, Lake-Wind wrote:
[...]
 My question is this: How do I set up the OpenSUSE clients to
 have the same behavior as the Windows XP clients. They need to
 store their profiles both locally on the client and on the
 server in the existing users home directory. Authentication
 for the existing PDC is smbpasswd.

My first idea would be: NFS. If it is not possible, you
should try pam_mount, you would be able to mount the home once
the logon happens and that should solve the problem.

The real problem will come up if you need to have a HOT
copy of local $HOME and $SERVERHOME, that could be tricky to
implement and you would probably need to use a distributed file
system, but I'm not really sure what would be the best solution
in that case.


 Any help with this matter would be greatly appreciated.
 Thank you in advance!

Kind regards,

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

iD8DBQFF9U/CCj65ZxU4gPQRAjupAKDAQXhLB3svFSKnplJBuA927jUKhgCgjYVg
OC13H9qr+quYvhIt4rVSA+Y=
=Jo0g
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Users Read/Write/Delete Permission

2007-03-12 Thread Felipe Augusto van de Wiel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/09/2007 03:03 PM, Bruce Olds wrote:
 Hi, is there any possible way to configure access for a user 
 that could be able to create/modify files on a shared directory
 but can't delete them or any other file?

Kind of, you can use the unix stick bit or POSIX ACLs to
achieve such behaviour, but, what would stop the user to open the
file and erase its entire content? :)


For things like sockets and pipes and makes sense since
there is nothing inside the file, but if you are trying to
protect documents from being deleted by bad-users then it would
not solve your problem.

In such scenarios, audit of the filesystem with backups
would be very helpful.


 Thanks

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

iD8DBQFF9VH5Cj65ZxU4gPQRAjRgAJ9VMaV5PEEJ7piMy/w92YqrlLTuSACguZI3
RktQl0uwha4mjm38+I/TV4M=
=KaRF
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] pdc root password

2007-03-12 Thread Felipe Augusto van de Wiel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/09/2007 01:51 PM, Mateus wrote:
 Hello,
 
 i'm doing a PDC samba server. It's working fine, but i have a question.
 
 When i configure winxp to enter in a domain, i need to put the root
 password, after reboot the machine, i  put the passwords that i created
 with smbpasswd, in this way works.
 
 but i would not like to put the root password to enter in the domain.
 all the others passwords is wrong in this case. just the root works. how
 can i do this?

I can imagine at least two ways to solve that problem.

1) You could give privileges to other users to allow them to join
   workstations into the domain.

2) You can configure the 'add machine script' parameter in your
   smb.conf to automagically join new machines into the domain.

For both scenarios, you can find more details in the
Samba Official HOWTO and in the Samba By Example.

Kind regards,

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

iD8DBQFF9VK2Cj65ZxU4gPQRApUiAKCIeR6QkrPyO/rgDtz7Xv80fB69xQCgsZgi
LDaUXK4xmPv8gVebepcaMY0=
=Vcjo
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] problem adding machine to a samba domain

2007-03-12 Thread Felipe Augusto van de Wiel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/09/2007 07:51 AM, Arnaud Bougeard wrote:
 Hello,
 I 've just upgrade my samba server from 2.2.12 version to 3.0.24 (to
 accept windows vista machines)
 The machines already recorded on domain are connected without
 difficulty, on the other hand I have problem to add a machine to the field.
 It is necessary that I put twice.

By put twice you mean try to join the machine twice
to the network?

A migration from 2.2.x series to 3.0.x would need a
small checklist, new group behaviour, new groupmap, changes in
privileges, SID mapping and others listed in WHATSNEW.

It seems that you are not using LDAP, so apparently I
would say that it is something related to the configuration of
your smb.conf or your machine account, but without any info
would be hard to guess.


 Here the example of file of log of a machine added to the field obtained
 after the first attempt
 
 cat /var/log/samba/log.pcvista
 [2007/02/28 13:19:12, 0] lib/util_sock.c:write_data(561)
  write_data: write failure in writing to client 0.0.0.0. Error Connexion
 ré-initialisée par le correspondant
 [2007/02/28 13:19:13, 0] lib/util_sock.c:send_smb(768)
  Error writing 4 bytes to client. -1. (Connexion ré-initialisée par le
 correspondant)
 
 No error at the second attemp.

 PS:   vista machines work with samba 3 domain.

Try to increase the log level to get more info.

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

iD8DBQFF9VQzCj65ZxU4gPQRAqvDAJ9VTFbnjDxtF7ZFZkRPPj/jkmqaEwCgqGL6
/7GUX8Uzdv/K2Pco/i4bo5I=
=3OuV
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] samba reporting wrong space

2007-03-12 Thread Felipe Augusto van de Wiel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/09/2007 07:11 AM, Alexander HUEMER wrote:
 hello everybody!
 
 i have a samba (3.0.24) running on a gentoo (alpha) box.
 i connect to a share using cifs and when i then run df -h, i get the
 following
 
 [EMAIL PROTECTED] distfiles % df -h
 FilesystemSize  Used Avail Use% Mounted on
 /dev/sda1  34G   31G  3.3G  91% /
 udev  759M  2.8M  756M   1% /dev
 shm   759M   20K  759M   1% /dev/shm
 //axp/export  226E -240E  456E   -  /mnt/axp
 [EMAIL PROTECTED] distfiles %
 
 which would be great indeed (except the minus of course...), but that's
 simply totally wrong.
 
 when connecting with smbfs i get
 
 [EMAIL PROTECTED] ~ % df -h
 FilesystemSize  Used Avail Use% Mounted on
 /dev/sda1  34G   31G  3.2G  91% /
 udev  759M  2.8M  756M   1% /dev
 shm   759M   20K  759M   1% /dev/shm
 //axp/export  2.0T 0  2.0T   0% /mnt/test
 [EMAIL PROTECTED] ~ %
 
 that's wrong too.
 the sizes should be about 153G used and about 45G available.
 samba works normally, i use it since 1,5 years.
 i first experienced this behavior some months ago, i had a lower version
 then.
 since it does not really cause any trouble i forgot about it.
 does anybody have a idea why this happens or were i could have a look?

If it smells like a BUG you should report it to bugzilla.

https://bugzilla.samba.org


Kind regards,

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

iD8DBQFF9VVJCj65ZxU4gPQRAvMHAJ43p3K5l5lGaxZTXcVDi9HxOd2whgCeILee
hZIA0wFsYdrxnVnnW7/hjx8=
=6kJh
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] samba problems. accounts expire after a hour, but work after reset

2007-03-12 Thread Collen Blijenberg
Hi Edmundo, the main problem we have here, is that all out of the blue, 
the samba PDC and BDC

are giving error's.
like TRUST DOMAIN FAILED, or USER AUTH FAILED, MACHINE HAS NO ACCOUNT. 
things like that.
but the funny part is, there is no reason for the servers to do that, 
they run for a few hours (sometimes a day)

and then start spitting out these error's.

after resetting the PDC, all turns back to normal. and those error's go 
away, and samba function as it should be.

but then after a while, it's back to the error's again.

we do use however the pdb-sql backend for storing the usernames and all...
in that period, of error's the sql get queried. so the backend does work.
and i can't find anny error's generated from the sql backend. also the 
sql server is accessible in those error times.

(we use it for nss-mysql aswell)

so either the migration part went wrong (the sid  uid part +1000), or 
samba has a serious bug in the passwd plugin backend ??

the winbindd part are for some other servers in the domain.

our domain is only accessible for domain accounts, so no guests or other 
accounts here. also all machines have registered to the domain

no anonymously accounts and all.
it's really driving me crazy this bug.  


cheers

Collen



Edmundo Valle Neto wrote:

Collen Blijenberg escreveu:

Hmm.. just a few last questions.

the bug came back the other day, after i fired up some machine that 
uses winbindd for apache authentication.
(no smb processes here). downside is that it's winbindd from samba 
3.0.11.
winbindd from samba 3.0.24 has some strange issues with that machine, 
for every page it starts re authing again
resulting in asking username and password again, and again and again 
and .

i think the problem might be there.


Sorry, I don't use winbind.



the part i don't get is the 'resolve unmapped account' ??
how can you have unmapped accounts ?? isn't it so that all
account that don't have entries in the user database (or machine)
are rejected ?? so don't need anny auth at all ?


I ever used LDAP, so, for me the scripts ever creates all needed 
stuff. But some parts of the documentation makes mention of the 
algorithmic rid being used on groups that wasn't mapped by net 
groupmap for example.




so basically, i can leave the old sid's and posix uid alone, but need 
to monitor the sid and uid
when creating new users and machines, coz they can collide with the 
existing not standard uid and sid's .


If you changed the ids as you said in the last e-mail that collisions 
must not happens.



great, back to debuging again... thx for da input.

Collen


I didn't understood very well whats your problem, you said in the 
first e-mail that accounts keep expiring. All them? Clients get some 
estrange return error after some time? When that happens listing 
shares in the server shell with an user smbclient -L \\servername 
-Usomeuser%password or anonymously smbclient -L localhost -U% at 
least works?



Regards.

Edmundo Valle Neto



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


[Samba] problem writing files

2007-03-12 Thread Doug Tucker
I have 2 samba servers, both joined and authenticating against AD.  One
is a redhat box with the stock latest up2date rpm, the 2nd, and
problematic one, is a debian with the latest .deb in the sarge tree.
The first one works flawlessly, the 2nd one, anytime a windows user
tries to write a file, it denies them access and this is in the logs:

[2007/03/12 09:27:48, 3] smbd/process.c:switch_message(914)
  switch message SMBntcreateX (pid 2854) conn 0x847f7b8
[2007/03/12 09:27:48, 3] smbd/msdfs.c:dfs_redirect(435)
  dfs_redirect: Not redirecting
cifs4/gary/purchase/Misc/PR-cdw2-sample1.xls.
[2007/03/12 09:27:48, 3] smbd/msdfs.c:dfs_redirect(439)
  dfs_redirect: Path converted to non-dfs path
purchase/Misc/PR-cdw2-sample1.xls
[2007/03/12 09:27:48, 3] smbd/dosmode.c:unix_mode(147)
  unix_mode(purchase/Misc/PR-cdw2-sample1.xls) returning 0744
[2007/03/12 09:27:48, 2] smbd/open.c:open_file(352)
  gary opened file purchase/Misc/PR-cdw2-sample1.xls read=No write=Yes
(numopen=3)
[2007/03/12 09:27:48, 3]
smbd/oplock_linux.c:linux_set_kernel_oplock(162)
  linux_set_kernel_oplock: Refused oplock on file
purchase/Misc/PR-cdw2-sample1.xls, fd = 29, dev = 57, inode = 28709.
(Resource temporarily unavailable)
[2007/03/12 09:27:48, 3] smbd/process.c:process_smb(1110)
  Transaction 5093 of length 76[2007/03/12 09:27:51, 3]
smbd/msdfs.c:dfs_redirect(435)
  dfs_redirect: Not redirecting
cifs4/gary/purchase/Misc/PR-cdw2-sample.xls.
[2007/03/12 09:27:51, 3] smbd/msdfs.c:dfs_redirect(439)
  dfs_redirect: Path converted to non-dfs path
purchase/Misc/PR-cdw2-sample.xls
[2007/03/12 09:27:51, 3] smbd/dir.c:dptr_create(512)
  creating new dirptr 256 for path purchase/Misc, expect_close = 1
[2007/03/12 09:27:51, 3] smbd/error.c:error_packet(146)
  error packet at smbd/trans2.c(1844) cmd=50 (SMBtrans2)
NT_STATUS_NO_SUCH_FILE
[2007/03/12 09:27:51, 3] smbd/process.c:process_smb(1110)
  Transaction 5165 of length 174
[2007/03/12 09:27:51, 3] smbd/process.c:switch_message(914)
  switch message SMBtrans2 (pid 2854) conn 0x847f7b8
[2007/03/12 09:27:51, 3] smbd/trans2.c:call_trans2findfirst(1662)
  call_trans2findfirst: dirtype = 16, maxentries = 1366,
close_after_first=1, close_if_end = 2 requires_resume_key = 4 level =
0x104, max_data_bytes = 16384
[2007/03/12 09:27:51, 3] smbd/msdfs.c:dfs_redirect(435)
  dfs_redirect: Not redirecting
cifs4/gary/purchase/Misc/PR-cdw2-sample.xls.
[2007/03/12 09:27:51, 3] smbd/msdfs.c:dfs_redirect(439)
  dfs_redirect: Path converted to non-dfs path
purchase/Misc/PR-cdw2-sample.xls
[2007/03/12 09:27:51, 3] smbd/dir.c:dptr_create(512)
  creating new dirptr 256 for path purchase/Misc, expect_close = 1
[2007/03/12 09:27:51, 3] smbd/error.c:error_packet(146)

[2007/03/12 09:27:48, 3] smbd/process.c:switch_message(914)
  switch message SMBtrans2 (pid 2854) conn 0x847f7b8
[2007/03/12 09:27:48, 3] smbd/trans2.c:call_trans2qfilepathinfo(2852)
  call_trans2qfilepathinfo: TRANSACT2_QFILEINFO: level = 1005
[2007/03/12 09:27:48, 3] smbd/trans2.c:call_trans2qfilepathinfo(2959)
  call_trans2qfilepathinfo purchase/Misc/PR-cdw2-sample1.xls (fnum =
10880) level=1005 call=7 total_data=0
[2007/03/12 09:27:48, 3] smbd/process.c:process_smb(1110)
  Transaction 5094 of length 45
[2007/03/12 09:27:48, 3] smbd/process.c:switch_message(914)
  switch message SMBclose (pid 2854) conn 0x847f7b8
[2007/03/12 09:27:48, 3] smbd/reply.c:reply_close(3312)
  close fd=29 fnum=10880 (numopen=3)


However, mounting the smb volume from a linux client, the user can
read/write just fine to the same server.  Anyone have any ideas on this?
Thanks in advance for the assistance.

Sincerely,

Doug

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


Re: [Samba] Samba PDC - upgrading from winxp clients to linux (OpenSUSE) clients

2007-03-12 Thread Lake-Wind
Felipe Augusto van de Wiel wrote:
 On 03/11/2007 12:51 PM, Lake-Wind wrote:
 [...]
 My question is this: How do I set up the OpenSUSE clients to
 have the same behavior as the Windows XP clients. They need to
 store their profiles both locally on the client and on the
 server in the existing users home directory. Authentication
 for the existing PDC is smbpasswd.
 
   My first idea would be: NFS. If it is not possible, you
 should try pam_mount, you would be able to mount the home once
 the logon happens and that should solve the problem.
 
   The real problem will come up if you need to have a HOT
 copy of local $HOME and $SERVERHOME, that could be tricky to
 implement and you would probably need to use a distributed file
 system, but I'm not really sure what would be the best solution
 in that case.
 
 
 Any help with this matter would be greatly appreciated.
 Thank you in advance!
 
   Kind regards,
 
Thank you for responding to my question. After reading your
response, I have come up with a possible solution but I need
help in implementing it. At this point, the only reason for
the server is login authentication and centralized backups for
all home directories and the shared directory.

Here's my plan: I'll share the home directories on the server
with NFS, mount the respective home directory on the client
computer in a directory OTHER than home. Then create a shell
script that would sync the local home directory (hidden files
and all) on the client with the respective home directory on
the server during log out.

I believe that is what happens when Windows XP logs out or
shuts down. That's when the profile data is copied from the
local machine to the server. If I can replicate that with a
shell script, I'll be all set.

Is it possible to have a shell script run automatically that
would overwrite the users home directory on the server when
logging out of KDE  on the local machine? If so, this might be
the solution I am looking for.

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


Re: [Samba] %M resolve to IP (only)

2007-03-12 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Robert Smol wrote:

 [backup]
path = /srv/backups/machines/%M
read only = No
public = no
writable = yes
printable = no
 
 Still samba resolve this to /srv/backups/machines/192.168.10.11
 
 Reverse DNS is working fine on machine:
 
 node001 ~ # host 192.168.10.11
 11.10.168.192.in-addr.arpa domain name pointer dmz001.domain.com.
 
 Am I doing something wrong?

No.  Probably not.  But on port 445 we often don't get the machine
name until after the NTLM authentication stage or never if
using krb5.  I'd have to double check some traces to be sure.
We've discussed this quite a lot in the past on list.  Trying
searching the ml archives.




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

iD8DBQFF9XRcIR7qMdg1EfYRAjr6AJ9CSbvyJ3Z4vRxOM85t+FF9ItSVSwCgxgQc
kawL2yaHjlf12KltC3Tuvyg=
=IZ7j
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] write list doesn't override read only paramater

2007-03-12 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jason M. Kusar wrote:
 Hi all,
 
 I'm trying to set up a share that is readable by 
 everyone, but writable by only a few.  From
 my understanding, this should work:
 
 [audio]
path = /tank/media/Audio
comment = Audio Files
write list = sound, @Domain Admins, @Associate Admins
force user = data
force group = other
read only = Yes

First thing is to fully qualify the domain names.  This has been
a software requirement since 3.0.8 and a hard requirement
since 3.0.23.






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

iD8DBQFF9XS2IR7qMdg1EfYRAr0uAJwPSsyw0GqKe/KMRU8lJnJ/Ri7mqACg1EEi
CSL+gVsOqDZ9HYSM6PVMpdA=
=dW8o
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] net ads join error in debug mode when joining Windows 2003 AD

2007-03-12 Thread Luke Skywalker

Hi!
I'm having the following issue: Linux Box with RedHat 3 joining a windows 
2003 AD.


When doing net ads join the system reports

[2007/03/12 17:27:36, 5] libads/kerberos.c:get_service_ticket(367)
 get_service_ticket: krb5_get_credentials for [EMAIL PROTECTED] enctype 16 
failed: KDC has no support for encryption type
[2007/03/12 17:27:36, 3] 
libads/kerberos.c:kerberos_derive_salting_principal_for_enctype(552)
 verify_service_password: get_service_ticket failed: KDC has no support for 
encryption type

[2007/03/12 17:27:36, 10] libads/kerberos.c:verify_service_password(465)
 verify_service_password: decrypted message with enctype 1 salt 
HOST/[EMAIL PROTECTED]

[2007/03/12 17:27:36, 10] libads/kerberos.c:verify_service_password(465)
 verify_service_password: decrypted message with enctype 3 salt 
HOST/[EMAIL PROTECTED]

[2007/03/12 17:27:36, 5] libads/kerberos.c:get_service_ticket(367)

but then it ends with

Joined 'SAENET01' to realm 'ABC.COM'
[2007/03/12 17:27:36, 2] utils/net.c:main(897)
 return code = 0

and in the windows 2003 the server appears as registered.

However, when launching samba, I get the following errors

[2007/03/12 17:32:49, 3] libsmb/clikrb5.c:ads_krb5_mk_req(381)
 ads_krb5_mk_req: krb5_cc_get_principal failed (No credentials cache found)

and when trying to authenticate with a user


check_ntlm_password:  Authentication for user [e0045146] - [e0045146] 
FAILED with error NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE

[2007/03/12 17:34:08, 3] smbd/error.c:error_packet(129)

krb5.conf and smb.conf are standard as taken from several post on internet 
which refers to
Windows 2003 AD and Samba: I pretty sure there must be some details in the 
krb5.conf for

encryption that I'm missing, but still don't know what.

Any help will be much appreciate!

Arcetrax

_
Telefona con Messenger...Le chiamate ai PC sono Gratis! 
http://get.live.com/messenger/features


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


Re: [Samba] samba problems. accounts expire after a hour, but work after reset

2007-03-12 Thread Edmundo Valle Neto

Collen Blijenberg escreveu:
Hi Edmundo, the main problem we have here, is that all out of the 
blue, the samba PDC and BDC

are giving error's.
like TRUST DOMAIN FAILED, or USER AUTH FAILED, MACHINE HAS NO ACCOUNT. 
things like that.
but the funny part is, there is no reason for the servers to do that, 
they run for a few hours (sometimes a day)

and then start spitting out these error's.

after resetting the PDC, all turns back to normal. and those error's 
go away, and samba function as it should be.

but then after a while, it's back to the error's again.

we do use however the pdb-sql backend for storing the usernames and 
all...

in that period, of error's the sql get queried. so the backend does work.
and i can't find anny error's generated from the sql backend. also the 
sql server is accessible in those error times.

(we use it for nss-mysql aswell)


The only similar problem that happened to me once was a problem with an 
unconfigured network (that was deactivated) in the dhcp server that was 
running in the same samba server, and I dont remember why it happened.


You said resetting, restarting samba doesn't make it work? Have you 
sure that the problem is in samba?


so either the migration part went wrong (the sid  uid part +1000), 
or samba has a serious bug in the passwd plugin backend ??

the winbindd part are for some other servers in the domain.


Where is your winbindd daemon running? In that same server?
Just a guess, are you using nscd?

our domain is only accessible for domain accounts, so no guests or 
other accounts here. also all machines have registered to the domain

no anonymously accounts and all.
it's really driving me crazy this bug. 
cheers


Collen


Regards.

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


Re: [Samba] Is anything special needed for connecting two linux computers?

2007-03-12 Thread Tomáš Hnyk

Hello,
so I figured out what the problem was in. I am connected to a NAT router  
(a very cheap embedded device with no linux support whatsoever, so it is  
almost unconfigurable) through an another embeded wifi AP that is in a  
bridge mode and cannot be accesed from the network (i.e. it is not  
assigned and IP address and so on). This device runs linux so it can be  
configured, which is where my hope is (I hope I can setup some kind of  
routing instead of bridging in there that will solve the problem). For  
when I tried to connect my laptop directly to the NAT router with a cable,  
it suddenly started to work. So the problem somehow lies in the bridge,  
but I have no idea how it can be related to it, I thought the  
communication was as if the bridge (the AP) were not there.

Tomas Hnyk
On Mon, 12 Mar 2007 13:54:26 +0100, Felipe Augusto van de Wiel  
[EMAIL PROTECTED] wrote:



-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/11/2007 04:19 PM, Tomáš Hnyk wrote:

Oops, yeah, I know about that, I did not realize this
difference in smb.conf. Sorry for the misinformation.
The files are actually as follows (so they have unique
names):


Have you tried to use smbclient?

And what about LinNeighborhood?


Using 'security = share' should be quite simples, once you
have the shares, you only need access them. Have you checked the
Samba 3 By Example, the first scenario is quite simples to implement
and use.

Kind regards,

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

iD8DBQFF9U2CCj65ZxU4gPQRAsGtAJ958C0m6KQQ7lU5yM2QVAERCsY2KQCgrN9x
NBqguCRv1Pjfi8816EzjPjI=
=4Yyn
-END PGP SIGNATURE-



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


[Samba] Print queues not emptying

2007-03-12 Thread Lutieri G.

i'm having this problem:

https://bugzilla.samba.org/show_bug.cgi?id=2220

But. i'm running samba 3.0.24 not 3.0.11 as in bug page.

take a look:
# smbd  -b
Build environment:
  Built by:[EMAIL PROTECTED]
  Built on:Wed Feb  7 23:52:44 EST 2007
  Built using: gcc
  Build host:  Linux hs20-bc1-7.build.redhat.com 2.6.9-34.ELsmp #1
SMP Fri Feb 24 16:56:28 EST 2006 i686 i686 i386 GNU/Linux
  SRCDIR:  /builddir/build/BUILD/samba-3.0.24/source
  BUILDDIR:/builddir/build/BUILD/samba-3.0.24/source
...

Some printers, not all, keep the jobs in queue when viewing from
windows client. Cups(1.2.5) has no jobs in queue.

What can I do?!


tanx


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


Re: [Samba] write list doesn't override read only paramater

2007-03-12 Thread Jason M. Kusar

Gerald (Jerry) Carter wrote:

Jason M. Kusar wrote:
  

Hi all,

I'm trying to set up a share that is readable by 
everyone, but writable by only a few.  From

my understanding, this should work:

[audio]
   path = /tank/media/Audio
   comment = Audio Files
   write list = sound, @Domain Admins, @Associate Admins
   force user = data
   force group = other
   read only = Yes



First thing is to fully qualify the domain names.  This has been
a software requirement since 3.0.8 and a hard requirement
since 3.0.23.

  
Thanks!  That did it.  Funny, I thought I'd tried that, but I must have 
had something wrong.  Or maybe I forgot to HUP the process.  Oh well, at 
least it works now.


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


[Samba] Resolution of Groups on Mac OS X 10.4.8...

2007-03-12 Thread Peter

Hi,

my Problem:

I tried to limit the disk usage for certain samba users by means of  
group quotas. But when looking at the disk free space from the client  
the quota is not honoured. So I wrote a little script trying to find  
out the quota left using the dfree command setting. So far  
everything is fine, but now, as soon as the script is called (I  
placed some debug output there) the groups, the user signing on via  
samba is member of, are not recognised. Calling id for this  
purpose, I got for my user a:


uid=1001(a) gid=1099(dummy) groups=1099(dummy)

but called from the commend line (after su s2) I got:

uid=1001(a) gid=1099(dummy) groups=1099(dummy), 1098(tmp), 1002(x),  
1001(y)


So my questions are:
How are those groups are resolved in Mac OS X? Which mechanism is  
used by samba (the default installation provided by apple) to resolve  
this???


Maybe I should ask this at apple as well, but maybe you are so kind  
to help...


Thakns a lot in advance,
Peter

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


Re: [Samba] Resolution of Groups on Mac OS X 10.4.8...

2007-03-12 Thread James Peach

On 12/03/07, Peter [EMAIL PROTECTED] wrote:

Hi,

my Problem:

I tried to limit the disk usage for certain samba users by means of
group quotas. But when looking at the disk free space from the client
the quota is not honoured. So I wrote a little script trying to find
out the quota left using the dfree command setting. So far
everything is fine, but now, as soon as the script is called (I
placed some debug output there) the groups, the user signing on via
samba is member of, are not recognised. Calling id for this
purpose, I got for my user a:

uid=1001(a) gid=1099(dummy) groups=1099(dummy)

but called from the commend line (after su s2) I got:

uid=1001(a) gid=1099(dummy) groups=1099(dummy), 1098(tmp), 1002(x),
1001(y)

So my questions are:
How are those groups are resolved in Mac OS X?


The standard unix group APIs call into libc, which eventually ends up
in Directory Services and memberd. There are at least 2 layers of
caching involved, so it is probably possible to see stale group
membership information if you are unlucky.

id(1) will only ever show you up to 15 supplementary groups. Also, Mac
OS X supports nested groups, which can be surprising sometimes.

You can check group memberships with dseditgroup(8):

http://developer.apple.com/documentation/Darwin/Reference/ManPages/man8/dseditgroup.8.html


Which mechanism is
used by samba (the default installation provided by apple) to resolve
this???


IIRC, Samba uses getgroups/setgroups on 10.4.

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


[Samba] Samba kerberos more time sensitive that Windows?

2007-03-12 Thread Jason Haar
Hi there

We just had a problem where a user couldn't connect to a Samba server
that is a full ADS member. The same user could successfully connect to
Windows2K3 servers.

The problem was obvious - their clock was 5 hours out, and Samba
rejected their connections with a Failed to verify incoming ticket.
Correcting the time fixed the fault. However, it remains that Samba
rejected them when Windows servers didn't.

Is that an option that can be enabled? Anything that makes Samba look
more like Windows is a Good Thing (even if it violates the entire point
of Kerberos! ;-)

-- 
Cheers

Jason Haar
Information Security Manager, Trimble Navigation Ltd.
Phone: +64 3 9635 377 Fax: +64 3 9635 417
PGP Fingerprint: 7A2E 0407 C9A6 CAF6 2B9F 8422 C063 5EBB FE1D 66D1

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


Re: [Samba] Samba kerberos more time sensitive that Windows?

2007-03-12 Thread Jeremy Allison
On Tue, Mar 13, 2007 at 11:50:14AM +1300, Jason Haar wrote:
 Hi there
 
 We just had a problem where a user couldn't connect to a Samba server
 that is a full ADS member. The same user could successfully connect to
 Windows2K3 servers.
 
 The problem was obvious - their clock was 5 hours out, and Samba
 rejected their connections with a Failed to verify incoming ticket.
 Correcting the time fixed the fault. However, it remains that Samba
 rejected them when Windows servers didn't.
 
 Is that an option that can be enabled? Anything that makes Samba look
 more like Windows is a Good Thing (even if it violates the entire point
 of Kerberos! ;-)

We need to know what the Windows server did in this case ?

Did it give an error message that caused the client to
fall back to an NTLM auth ? A capture trace would help
here

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


Re: [Samba] Users Read/Write/Delete Permission

2007-03-12 Thread Michael Heydon


Hi, is there any possible way to configure access for a user 
that could be able to create/modify files on a shared directory

but can't delete them or any other file?


For things like sockets and pipes and makes sense since
there is nothing inside the file, but if you are trying to
protect documents from being deleted by bad-users then it would
not solve your problem.
  
Also when word or excel (as well as various other programs) save a file, 
they first write to a temporary file, then delete the original, then 
rename the temporary file. So if the user can't delete, they can't save 
a word document.


As Felipe said, if you're looking to protect documents, this isn't the 
solution. In that situation I personally like keeping rsync snapshots on 
a seperate hard drive of server. Using hard links you can store a LOT of 
snapshots using relatively little storage space. Also the recycle vfs 
module might be useful.



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


Re: [Samba] Samba PDC - upgrading from winxp clients to linux (OpenSUSE) clients

2007-03-12 Thread Michael Heydon



My question is this: How do I set up the OpenSUSE clients to
have the same behavior as the Windows XP clients. They need to
store their profiles both locally on the client and on the
server in the existing users home directory. Authentication
for the existing PDC is smbpasswd.
  

My first idea would be: NFS. If it is not possible, you
should try pam_mount, you would be able to mount the home once
the logon happens and that should solve the problem.

The real problem will come up if you need to have a HOT
copy of local $HOME and $SERVERHOME, that could be tricky to
implement and you would probably need to use a distributed file
system, but I'm not really sure what would be the best solution
in that case.


Here's my plan: I'll share the home directories on the server
with NFS, mount the respective home directory on the client
computer in a directory OTHER than home. Then create a shell
script that would sync the local home directory (hidden files
and all) on the client with the respective home directory on
the server during log out.

  
Yes this would work, if you wanted to use something like rsync you could 
achieve the same thing much more efficiently and without any mounting. 
Regardless of how you do the sync'ing you are going to have a few 
hurdles to get over (What happens if a user logs into multiple machines 
simultaneously?).


Why do you need a copy of the profile locally? It would greatly simplify 
things if you just put /home on nfs.


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


[Samba] samba access

2007-03-12 Thread HariHaraPuthran Madabhushi Raghu

Hi!
I have a problem using samba.
My samba configuration is ADS type.
I recently discovered that form my domain clients. All my domain clients are 
windows XP.
I am Unable to access the samba share by typing \\sambaservername, but able 
to with \\192.168.x.x.
When i type \\servername, it prompts me for username and password, when i 
enter the correct one it prompts the same, no error message. I am unable to 
view by my network places. Is there soluition for this.


Regards

hhpmr

_
Get Married in 2007. Join Shaadi.com 
http://www.shaadi.com/ptnr.php?ptnr=mhottag


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


Re: [Samba] Fatal Samba bug? Why can't anyone answer this question?

2007-03-12 Thread Michael Heydon


All four machines are at verious times both servers and clients, as 
they are all equivalent. I just want to be able to mount drives from 
any machine on any other. But two of the four refuse to accept remote 
mounts as servers, but they all can access a remote mount as a client. 
That is why I am so puzzled. The conf file I posted is from one of the 
working (as a server) machines, but the exact same file on one of the 
other machines doesn't work. That is what is so confusing.

In this case, would there be any problems with standardizing the
configuration between all the machines? In your first email you
mentioned two older debian boxes, have they been updated to v3.x of
samba? Personally I would be tempted to make one clean, efficient config
file and use that as a base modifying just share definitions, tweaks,
etc for each machine.

One of the non-working machines is a kubuntu oct 2006 version with the 
straight conf file resulting from turning on samba shares in the gui, 
and it doesn't work.

I tend to shy away from the GUI tools, they have a bit of a history of
making a mess of things.

We get a few users a week coming into the irc channel with msdfs proxy
= no in their config files, this is inserted by (I believe) the KDE
configuration tool and infact means this share is a dfs proxy pointed
to the share called 'no'. Since the share 'no' doesn't exist the config
doesn't work. This is just the one example that springs to mind, there
are others.

If they were my machines I would trim my config down to the absolute
minimum required for samba to start, add options one at a time until it
was doing what I wanted, then copy that config to all the machines. I
would also switch to security=user rather than security=share but maybe
thats just me.

If you need help getting the config how you want it send it through or
come chat to us in #samba on irc.freenode.org

Also depending on how these machines are used as well as standardizing
the config you might think about setting up an ldap backend, you could
share users and passwords between samba and *nix on all systems.

-- Michael Heydon

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


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

2007-03-12 Thread metze
Author: metze
Date: 2007-03-12 09:59:06 + (Mon, 12 Mar 2007)
New Revision: 21793

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

Log:
add replacement for unsetenv()

metze
Modified:
   branches/SAMBA_4_0/source/lib/replace/README
   branches/SAMBA_4_0/source/lib/replace/libreplace.m4
   branches/SAMBA_4_0/source/lib/replace/replace.c
   branches/SAMBA_4_0/source/lib/replace/replace.h


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/README
===
--- branches/SAMBA_4_0/source/lib/replace/README2007-03-12 05:54:14 UTC 
(rev 21792)
+++ branches/SAMBA_4_0/source/lib/replace/README2007-03-12 09:59:06 UTC 
(rev 21793)
@@ -21,6 +21,7 @@
 vsyslog
 timegm
 setenv
+unsetenv
 strndup
 strnlen
 waitpid

Modified: branches/SAMBA_4_0/source/lib/replace/libreplace.m4
===
--- branches/SAMBA_4_0/source/lib/replace/libreplace.m4 2007-03-12 05:54:14 UTC 
(rev 21792)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace.m4 2007-03-12 09:59:06 UTC 
(rev 21793)
@@ -263,7 +263,8 @@
 AC_CHECK_TYPE(comparison_fn_t, 
 [AC_DEFINE(HAVE_COMPARISON_FN_T, 1,[Whether or not we have comparison_fn_t])])
 
-AC_CHECK_FUNCS(strnlen setenv)
+AC_CHECK_FUNCS(setenv unsetenv)
+AC_CHECK_FUNCS(strnlen)
 AC_CHECK_FUNCS(strtoull __strtoull strtouq strtoll __strtoll strtoq)
 
 # this test disabled as we don't actually need __VA_ARGS__ yet

Modified: branches/SAMBA_4_0/source/lib/replace/replace.c
===
--- branches/SAMBA_4_0/source/lib/replace/replace.c 2007-03-12 05:54:14 UTC 
(rev 21792)
+++ branches/SAMBA_4_0/source/lib/replace/replace.c 2007-03-12 09:59:06 UTC 
(rev 21793)
@@ -590,6 +590,40 @@
 }
 #endif
 
+#ifndef HAVE_UNSETENV
+int rep_unsetenv(const char *name)
+{
+   char *p;
+   size_t l1;
+   int ret;
+
+   if (!getenv(name)) {
+   return 0;
+   }
+
+   l1 = strlen(name);
+
+   p = malloc(l1+1);
+   if (p == NULL) {
+   return -1;
+   }
+   memcpy(p, name, l1);
+   p[l1] = 0;
+
+   /*
+* use using name here unsets the var
+*
+* name= would set it to an empty string..
+*/
+   ret = putenv(p);
+   if (ret != 0) {
+   free(p);
+   }
+
+   return ret;
+}
+#endif
+
 #ifndef HAVE_SOCKETPAIR
 int rep_socketpair(int d, int type, int protocol, int sv[2])
 {

Modified: branches/SAMBA_4_0/source/lib/replace/replace.h
===
--- branches/SAMBA_4_0/source/lib/replace/replace.h 2007-03-12 05:54:14 UTC 
(rev 21792)
+++ branches/SAMBA_4_0/source/lib/replace/replace.h 2007-03-12 09:59:06 UTC 
(rev 21793)
@@ -140,6 +140,11 @@
 int rep_setenv(const char *name, const char *value, int overwrite); 
 #endif
 
+#ifndef HAVE_UNSETENV
+#define unsetenv rep_unsetenv
+int rep_unsetenv(const char *name, const char *value, int overwrite); 
+#endif
+
 #ifndef HAVE_SETEUID
 #define seteuid rep_seteuid
 int rep_seteuid(uid_t);



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

2007-03-12 Thread metze
Author: metze
Date: 2007-03-12 09:59:48 + (Mon, 12 Mar 2007)
New Revision: 21794

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

Log:
add setenv()/unsetenv() testsuite

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


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_4_0/source/lib/replace/test/testsuite.c  2007-03-12 
09:59:06 UTC (rev 21793)
+++ branches/SAMBA_4_0/source/lib/replace/test/testsuite.c  2007-03-12 
09:59:48 UTC (rev 21794)
@@ -171,7 +171,67 @@
 
 static int test_setenv(void)
 {
-   /* FIXME */
+#define TEST_SETENV(key, value, overwrite, result) do { \
+   int _ret; \
+   char *_v; \
+   _ret = setenv(key, value, overwrite); \
+   if (_ret != 0) { \
+   printf(failure: setenv [\n \
+   setenv(%s, %s, %d) failed\n \
+   ]\n, \
+   key, value, overwrite); \
+   return false; \
+   } \
+   _v=getenv(key); \
+   if (!_v) { \
+   printf(failure: setenv [\n \
+   getenv(%s) returned NULL\n \
+   ]\n, \
+   key); \
+   return false; \
+   } \
+   if (strcmp(result, _v) != 0) { \
+   printf(failure: setenv [\n \
+   getenv(%s): '%s' != '%s'\n \
+   ]\n, \
+   key, result, _v); \
+   return false; \
+   } \
+} while(0)
+
+#define TEST_UNSETENV(key) do { \
+   int _ret; \
+   char *_v; \
+   _ret = unsetenv(key); \
+   if (_ret != 0) { \
+   printf(failure: setenv [\n \
+   unsetenv(%s) failed\n \
+   ]\n, \
+   key); \
+   return false; \
+   } \
+   _v=getenv(key); \
+   if (_v) { \
+   printf(failure: setenv [\n \
+   getenv(%s): NULL != '%s'\n \
+   ]\n, \
+   SETENVTEST_KEY, _v); \
+   return false; \
+   } \
+} while (0)
+
+#define SETENVTEST_KEY SETENVTESTKEY
+#define SETENVTEST_VAL SETENVTESTVAL
+
+   printf(test: setenv\n);
+   TEST_SETENV(SETENVTEST_KEY, SETENVTEST_VAL1, 0, SETENVTEST_VAL1);
+   TEST_SETENV(SETENVTEST_KEY, SETENVTEST_VAL2, 0, SETENVTEST_VAL1);
+   TEST_SETENV(SETENVTEST_KEY, SETENVTEST_VAL3, 1, SETENVTEST_VAL3);
+   TEST_SETENV(SETENVTEST_KEY, SETENVTEST_VAL4, 1, SETENVTEST_VAL4);
+   TEST_UNSETENV(SETENVTEST_KEY);
+   TEST_SETENV(SETENVTEST_KEY, SETENVTEST_VAL5, 0, SETENVTEST_VAL5);
+   TEST_UNSETENV(SETENVTEST_KEY);
+   printf(success: setenv\n);
return true;
 }
 



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

2007-03-12 Thread metze
Author: metze
Date: 2007-03-12 10:12:27 + (Mon, 12 Mar 2007)
New Revision: 21795

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

Log:
fix the prototype of unsetenv()...

metze
Modified:
   branches/SAMBA_4_0/source/lib/replace/replace.h


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/replace.h
===
--- branches/SAMBA_4_0/source/lib/replace/replace.h 2007-03-12 09:59:48 UTC 
(rev 21794)
+++ branches/SAMBA_4_0/source/lib/replace/replace.h 2007-03-12 10:12:27 UTC 
(rev 21795)
@@ -142,7 +142,7 @@
 
 #ifndef HAVE_UNSETENV
 #define unsetenv rep_unsetenv
-int rep_unsetenv(const char *name, const char *value, int overwrite); 
+int rep_unsetenv(const char *name); 
 #endif
 
 #ifndef HAVE_SETEUID



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

2007-03-12 Thread metze
Author: metze
Date: 2007-03-12 11:31:06 + (Mon, 12 Mar 2007)
New Revision: 21796

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

Log:
check if unsetenv() works on an non-existing key

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


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_4_0/source/lib/replace/test/testsuite.c  2007-03-12 
10:12:27 UTC (rev 21795)
+++ branches/SAMBA_4_0/source/lib/replace/test/testsuite.c  2007-03-12 
11:31:06 UTC (rev 21796)
@@ -229,8 +229,10 @@
TEST_SETENV(SETENVTEST_KEY, SETENVTEST_VAL3, 1, SETENVTEST_VAL3);
TEST_SETENV(SETENVTEST_KEY, SETENVTEST_VAL4, 1, SETENVTEST_VAL4);
TEST_UNSETENV(SETENVTEST_KEY);
+   TEST_UNSETENV(SETENVTEST_KEY);
TEST_SETENV(SETENVTEST_KEY, SETENVTEST_VAL5, 0, SETENVTEST_VAL5);
TEST_UNSETENV(SETENVTEST_KEY);
+   TEST_UNSETENV(SETENVTEST_KEY);
printf(success: setenv\n);
return true;
 }



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

2007-03-12 Thread metze
Author: metze
Date: 2007-03-12 11:32:19 + (Mon, 12 Mar 2007)
New Revision: 21797

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

Log:
remove the key directly from the environ array

inspired by:
http://cvs.linux-ha.org/viewcvs/viewcvs.cgi/linux-ha/replace/unsetenv.c?rev=1.4view=auto

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


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/replace.c
===
--- branches/SAMBA_4_0/source/lib/replace/replace.c 2007-03-12 11:31:06 UTC 
(rev 21796)
+++ branches/SAMBA_4_0/source/lib/replace/replace.c 2007-03-12 11:32:19 UTC 
(rev 21797)
@@ -593,34 +593,26 @@
 #ifndef HAVE_UNSETENV
 int rep_unsetenv(const char *name)
 {
-   char *p;
-   size_t l1;
-   int ret;
+   extern char **environ;
+   size_t len = strlen(name);
+   size_t i; 
+   int found = 0;
 
-   if (!getenv(name)) {
-   return 0;
-   }
+   for (i=0; (environ  environ[i]); i++) {
+   if (found) {
+   environ[i-1] = environ[i];
+   continue;
+   }
 
-   l1 = strlen(name);
-
-   p = malloc(l1+1);
-   if (p == NULL) {
-   return -1;
+   if (strncmp(environ[i], name, len) == 0  environ[i][len] == 
'=') {
+   free(environ[i]);
+   environ[i] = NULL;
+   found = 1;
+   continue;
+   }
}
-   memcpy(p, name, l1);
-   p[l1] = 0;
 
-   /*
-* use using name here unsets the var
-*
-* name= would set it to an empty string..
-*/
-   ret = putenv(p);
-   if (ret != 0) {
-   free(p);
-   }
-
-   return ret;
+   return 0;
 }
 #endif
 



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

2007-03-12 Thread metze
Author: metze
Date: 2007-03-12 11:37:12 + (Mon, 12 Mar 2007)
New Revision: 21798

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

Log:
unsetenv() returns void on some platforms (BSD)

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


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_4_0/source/lib/replace/test/testsuite.c  2007-03-12 
11:32:19 UTC (rev 21797)
+++ branches/SAMBA_4_0/source/lib/replace/test/testsuite.c  2007-03-12 
11:37:12 UTC (rev 21798)
@@ -200,16 +200,8 @@
 } while(0)
 
 #define TEST_UNSETENV(key) do { \
-   int _ret; \
char *_v; \
-   _ret = unsetenv(key); \
-   if (_ret != 0) { \
-   printf(failure: setenv [\n \
-   unsetenv(%s) failed\n \
-   ]\n, \
-   key); \
-   return false; \
-   } \
+   unsetenv(key); \
_v=getenv(key); \
if (_v) { \
printf(failure: setenv [\n \



svn commit: samba r21799 - in branches/SAMBA_4_0/source/heimdal_build: .

2007-03-12 Thread metze
Author: metze
Date: 2007-03-12 16:05:57 + (Mon, 12 Mar 2007)
New Revision: 21799

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

Log:
tell roken.h.in to not generate prototypes for setenv() and unsetenv()

metze
Modified:
   branches/SAMBA_4_0/source/heimdal_build/roken.h


Changeset:
Modified: branches/SAMBA_4_0/source/heimdal_build/roken.h
===
--- branches/SAMBA_4_0/source/heimdal_build/roken.h 2007-03-12 11:37:12 UTC 
(rev 21798)
+++ branches/SAMBA_4_0/source/heimdal_build/roken.h 2007-03-12 16:05:57 UTC 
(rev 21799)
@@ -41,6 +41,14 @@
 #define HAVE_STRNDUP
 #endif
 
+#ifndef HAVE_SETENV
+#define HAVE_SETENV
+#endif
+
+#ifndef HAVE_UNSETENV
+#define HAVE_UNSETENV
+#endif
+
 #ifndef HAVE_VSYSLOG
 #define HAVE_VSYSLOG
 #endif



svn commit: samba r21800 - in branches: SAMBA_3_0/source/include SAMBA_3_0/source/lib SAMBA_3_0/source/libsmb SAMBA_3_0/source/rpc_server SAMBA_3_0/source/smbd SAMBA_3_0_25/source/include SAMBA_3_0_25

2007-03-12 Thread jra
Author: jra
Date: 2007-03-12 17:55:24 + (Mon, 12 Mar 2007)
New Revision: 21800

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

Log:
Check-in the DFS rewrite. I am still testing this but it
works from smbclient and Windows, and I am promising to
support and fix both client and server code moving forward.
Still need to test the RPC admin support but I haven't
changed that code.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/include/msdfs.h
   branches/SAMBA_3_0/source/lib/util.c
   branches/SAMBA_3_0/source/libsmb/clidfs.c
   branches/SAMBA_3_0/source/rpc_server/srv_dfs_nt.c
   branches/SAMBA_3_0/source/smbd/dir.c
   branches/SAMBA_3_0/source/smbd/msdfs.c
   branches/SAMBA_3_0/source/smbd/nttrans.c
   branches/SAMBA_3_0/source/smbd/reply.c
   branches/SAMBA_3_0/source/smbd/trans2.c
   branches/SAMBA_3_0_25/source/include/msdfs.h
   branches/SAMBA_3_0_25/source/lib/util.c
   branches/SAMBA_3_0_25/source/libsmb/clidfs.c
   branches/SAMBA_3_0_25/source/rpc_server/srv_dfs_nt.c
   branches/SAMBA_3_0_25/source/smbd/dir.c
   branches/SAMBA_3_0_25/source/smbd/msdfs.c
   branches/SAMBA_3_0_25/source/smbd/nttrans.c
   branches/SAMBA_3_0_25/source/smbd/reply.c
   branches/SAMBA_3_0_25/source/smbd/trans2.c


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


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

2007-03-12 Thread vlendec
Author: vlendec
Date: 2007-03-12 18:19:48 + (Mon, 12 Mar 2007)
New Revision: 21801

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

Log:
Fix Coverity ID # 342
Modified:
   branches/SAMBA_3_0/source/smbd/reply.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/reply.c
===
--- branches/SAMBA_3_0/source/smbd/reply.c  2007-03-12 17:55:24 UTC (rev 
21800)
+++ branches/SAMBA_3_0/source/smbd/reply.c  2007-03-12 18:19:48 UTC (rev 
21801)
@@ -2029,6 +2029,7 @@
 
status = check_name(conn, fname);
if (!NT_STATUS_IS_OK(status)) {
+   CloseDir(dir_hnd);
return status;
}
 



svn commit: samba r21802 - in branches/SAMBA_3_0_25/source/smbd: .

2007-03-12 Thread jra
Author: jra
Date: 2007-03-12 18:33:22 + (Mon, 12 Mar 2007)
New Revision: 21802

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

Log:
From 3.0 - Fix Coverity ID # 342 (thanks Volker).
Jeremy.

Modified:
   branches/SAMBA_3_0_25/source/smbd/reply.c


Changeset:
Modified: branches/SAMBA_3_0_25/source/smbd/reply.c
===
--- branches/SAMBA_3_0_25/source/smbd/reply.c   2007-03-12 18:19:48 UTC (rev 
21801)
+++ branches/SAMBA_3_0_25/source/smbd/reply.c   2007-03-12 18:33:22 UTC (rev 
21802)
@@ -2028,6 +2028,7 @@
 
status = check_name(conn, fname);
if (!NT_STATUS_IS_OK(status)) {
+   CloseDir(dir_hnd);
return status;
}
 



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

2007-03-12 Thread jra
Author: jra
Date: 2007-03-12 20:10:12 + (Mon, 12 Mar 2007)
New Revision: 21803

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

Log:
Missed part of patch to make self-referrals work.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/msdfs.c
   branches/SAMBA_3_0_25/source/smbd/msdfs.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/msdfs.c
===
--- branches/SAMBA_3_0/source/smbd/msdfs.c  2007-03-12 18:33:22 UTC (rev 
21802)
+++ branches/SAMBA_3_0/source/smbd/msdfs.c  2007-03-12 20:10:12 UTC (rev 
21803)
@@ -483,6 +483,7 @@
}
 
if (dp.reqpath[0] == '\0') {
+   pstrcpy(dfs_path, dp.reqpath);
DEBUG(5,(dfs_redirect: self-referral.\n));
return NT_STATUS_OK;
}

Modified: branches/SAMBA_3_0_25/source/smbd/msdfs.c
===
--- branches/SAMBA_3_0_25/source/smbd/msdfs.c   2007-03-12 18:33:22 UTC (rev 
21802)
+++ branches/SAMBA_3_0_25/source/smbd/msdfs.c   2007-03-12 20:10:12 UTC (rev 
21803)
@@ -483,6 +483,7 @@
}
 
if (dp.reqpath[0] == '\0') {
+   pstrcpy(dfs_path, dp.reqpath);
DEBUG(5,(dfs_redirect: self-referral.\n));
return NT_STATUS_OK;
}



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

2007-03-12 Thread lmuelle
Author: lmuelle
Date: 2007-03-12 20:57:49 + (Mon, 12 Mar 2007)
New Revision: 21804

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

Log:
Create a reference after proto_exits was called once.  Else we link the
binaries again with each make.  Thx Volker to point my chesty at this.

Modified:
   branches/SAMBA_3_0/source/
   branches/SAMBA_3_0/source/Makefile.in


Changeset:

Property changes on: branches/SAMBA_3_0/source
___
Name: svn:ignore
   - tags
*.po
*.po32
.headers.stamp
.inslog2
.ix*
.proto.check
.proto.stamp
autom4te.cache
autom4te-2.53.cache
ID
Makefile
bin
build
config.cache
config.log
config.status
configure.tridge
cvs.log
diffs
dmalloc.log
dmallog.log
dox
libtool
so_locations
tca.log
testdir
testtmp
trace.out
typescript*
configure
smbadduser
.gdbinit
TAGS
t_dir

   + tags
*.po
*.po32
.headers.stamp
.inslog2
.ix*
.proto.check
.proto.stamp
autom4te.cache
autom4te-2.53.cache
ID
Makefile
bin
build
config.cache
config.log
config.status
configure.tridge
cvs.log
diffs
dmalloc.log
dmallog.log
dox
libtool
proto_exists
so_locations
tca.log
testdir
testtmp
trace.out
typescript*
configure
smbadduser
.gdbinit
TAGS
t_dir


Modified: branches/SAMBA_3_0/source/Makefile.in
===
--- branches/SAMBA_3_0/source/Makefile.in   2007-03-12 20:10:12 UTC (rev 
21803)
+++ branches/SAMBA_3_0/source/Makefile.in   2007-03-12 20:57:49 UTC (rev 
21804)
@@ -1837,7 +1837,7 @@
$(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) $(ROOT_SBIN_PROGS) \
$(MODULES) $(TORTURE_PROGS) $(LIBSMBCLIENT) $(LIBADDNS) \
$(LIBSMBSHAREMODES) $(EVERYTHING_PROGS) $(LIBMSRPC) \
-   .headers.stamp */src/*.o
+   .headers.stamp */src/*.o proto_exists
-rm -rf t_dir
 
 # Making this target will just make sure that the prototype files
@@ -1847,6 +1847,7 @@
 proto_exists: include/proto.h include/build_env.h \
nsswitch/winbindd_proto.h web/swat_proto.h \
client/client_proto.h utils/net_proto.h utils/ntlm_auth_proto.h 
smbd/build_options.c
+   @touch proto_exists
 
 delheaders:
@echo Removing prototype headers



svn commit: samba r21805 - in branches/SAMBA_4_0/source/librpc/idl: .

2007-03-12 Thread abartlet
Author: abartlet
Date: 2007-03-12 23:39:00 + (Mon, 12 Mar 2007)
New Revision: 21805

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

Log:
Add PAC_TYPE_CONSTRAINED_DELEGATION to the PAC_TYPE enum.

Modified:
   branches/SAMBA_4_0/source/librpc/idl/krb5pac.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/krb5pac.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/krb5pac.idl2007-03-12 20:57:49 UTC 
(rev 21804)
+++ branches/SAMBA_4_0/source/librpc/idl/krb5pac.idl2007-03-12 23:39:00 UTC 
(rev 21805)
@@ -42,7 +42,8 @@
PAC_TYPE_LOGON_INFO = 1,
PAC_TYPE_SRV_CHECKSUM = 6,
PAC_TYPE_KDC_CHECKSUM = 7,
-   PAC_TYPE_LOGON_NAME = 10
+   PAC_TYPE_LOGON_NAME = 10,
+   PAC_TYPE_CONSTRAINED_DELEGATION = 11
} PAC_TYPE;
 
typedef [public,nodiscriminant,gensize] union {



Build status as of Tue Mar 13 00:00:02 2007

2007-03-12 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2007-03-12 
00:00:47.0 +
+++ /home/build/master/cache/broken_results.txt 2007-03-13 00:01:17.0 
+
@@ -1,4 +1,4 @@
-Build status as of Mon Mar 12 00:00:02 2007
+Build status as of Tue Mar 13 00:00:02 2007
 
 Build counts:
 Tree Total  Broken Panic 
@@ -6,19 +6,19 @@
 build_farm   0  0  0 
 ccache   33 8  0 
 ctdb 0  0  0 
-distcc   4  1  0 
-ldb  32 6  0 
+distcc   3  1  0 
+ldb  31 6  0 
 libreplace   29 2  0 
-lorikeet-heimdal 29 15 0 
+lorikeet-heimdal 28 15 0 
 pidl 20 2  0 
 ppp  13 0  0 
-rsync33 9  0 
+rsync32 9  0 
 samba0  0  0 
 samba-docs   0  0  0 
 samba-gtk4  4  0 
-samba4   38 15 0 
-samba_3_040 17 1 
+samba4   37 12 0 
+samba_3_039 16 1 
 smb-build29 29 0 
-talloc   34 1  0 
-tdb  32 3  0 
+talloc   33 1  0 
+tdb  31 3  0 
 


svn commit: samba r21806 - in branches/SAMBA_4_0/source: dsdb/samdb/ldb_modules ldap_server libcli/cldap libcli/ldap

2007-03-12 Thread abartlet
Author: abartlet
Date: 2007-03-13 00:59:06 + (Tue, 13 Mar 2007)
New Revision: 21806

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

Log:
I've been working over the last week to fix up the LDAP backend for
Samba4.  This only broke on global catalog queries, which turned out to
be due to changes in the partitions module that metze needed for his
DRSUAPI work.

I've reworked partitions.c to always include the 'problematic' control,
and therefore demonstrated that this is the issue.  This ensures
consistency, and should help with finding issues like this in future. 

As this control (DSDB_CONTROL_CURRENT_PARTITION_OID) is not intended to
be linearised, I've added logic to allow it to be skipped when creating
network packets.

I've likewise make our LDAP server skip unknown controls, when marked
'not critical' on it's input, rather than just dropping the entire
request.  I need some help to generate a correct error packet when it is
marked critical.

Further work could perhaps be to have the ldap_encode routine return a
textual description of what failed to encode, as that would have saved
me a lot of time...

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/partition.c
   branches/SAMBA_4_0/source/ldap_server/ldap_server.c
   branches/SAMBA_4_0/source/libcli/cldap/cldap.c
   branches/SAMBA_4_0/source/libcli/ldap/ldap.c
   branches/SAMBA_4_0/source/libcli/ldap/ldap_client.c
   branches/SAMBA_4_0/source/libcli/ldap/ldap_controls.c


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


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

2007-03-12 Thread tridge
Author: tridge
Date: 2007-03-13 01:47:04 + (Tue, 13 Mar 2007)
New Revision: 21807

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

Log:

modularise the opendb code, so different backends can be
implemented. This will allow for a ctdb opendb backend.

Added:
   branches/SAMBA_4_0/source/ntvfs/common/opendb.h
   branches/SAMBA_4_0/source/ntvfs/common/opendb_tdb.c
Modified:
   branches/SAMBA_4_0/source/ntvfs/common/config.mk
   branches/SAMBA_4_0/source/ntvfs/common/ntvfs_common.h
   branches/SAMBA_4_0/source/ntvfs/common/opendb.c


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


svn commit: samba r21808 - in branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/util/fsm: .

2007-03-12 Thread derrell
Author: derrell
Date: 2007-03-13 02:51:49 + (Tue, 13 Mar 2007)
New Revision: 21808

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

Log:

- Fix a nasty bug in the finite state machine that allowed an event from a
  non-handled widget to be processed as if the event originated from a handled
  widget.  This was allowing the appear event for the module's canvas in
  Mimir's Net Manager (an event which was not handled) to load the tree,
  followed by the tree appear event (intended to be handled, albeit
  incorrectly -- see subsequent check-in of Mimir's Fsm.js) to again load the
  tree, thus the double entry.

  Wow, the above paragraph is really hard to read. :-)

Modified:
   
branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/util/fsm/FiniteStateMachine.js


Changeset:
Modified: 
branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/util/fsm/FiniteStateMachine.js
===
--- 
branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/util/fsm/FiniteStateMachine.js
  2007-03-13 01:47:04 UTC (rev 21807)
+++ 
branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/util/fsm/FiniteStateMachine.js
  2007-03-13 02:51:49 UTC (rev 21808)
@@ -220,6 +220,13 @@
   // Save the old state object, so we can return it to be disposed
   var oldState = this._states[stateName];
 
+  // Ensure the old state exists.  Otherwise, shouldn't be using replaceState()
+  if (! oldState)
+  {
+throw new Error(Can not replace state  + stateName + :  +
+no existing state of that name.);
+  }
+
   // Replace the old state with the new state object.
   this._states[stateName] = state;
 
@@ -227,7 +234,7 @@
   if (bDispose)
   {
 // Yup.  Mark it to be disposed.
-oldState._needDispose;
+oldState._bNeedDispose = true;
   }
 
   return oldState;
@@ -787,6 +794,18 @@
 }
 
 action = e[friendly];
+
+// Do we handle this event type for the widget from which it originated?
+if (! action)
+{
+  // Nope.
+  if (debugEvents)
+  {
+this.debug(this.getName() + : Event ' + event.getType() + ' +
+not handled for target  + friendly + .  Ignoring.);
+  }
+  return true;
+}
   }
   else
   {
@@ -946,7 +965,7 @@
 currentState.getAutoActionsAfterOnexit()(this);
 
 // If this state has been replaced and we're supposed to dispose it...
-if (currentState._needDispose)
+if (currentState._bNeedDispose)
 {
   // ... then dispose it now that it's no longer in use
   currentState.dispose();



svn commit: samba r21809 - in branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr: .

2007-03-12 Thread derrell
Author: derrell
Date: 2007-03-13 02:54:06 + (Tue, 13 Mar 2007)
New Revision: 21809

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

Log:

- If the canvas is never initialized with the tree, the tree will never
  appear.  Now that the finite state machine properly ignores events from
  widgets which are not handled, the initialization of the tree should be done
  when the module's canvas appears (i.e. just after the canvas has had the
  module's gui applied to it).

Modified:
   branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Fsm.js


Changeset:
Modified: branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Fsm.js
===
--- branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Fsm.js  
2007-03-13 02:51:49 UTC (rev 21808)
+++ branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Fsm.js  
2007-03-13 02:54:06 UTC (rev 21809)
@@ -61,8 +61,8 @@
 {
   appear :
   {
-tree :
-  Transition_Idle_to_AwaitRpcResult_via_tree_appear
+swat.main.canvas :
+  Transition_Idle_to_AwaitRpcResult_via_canvas_appear
   }
 }
 });
@@ -71,7 +71,7 @@
   fsm.replaceState(state, true);
 
   var trans = new qx.util.fsm.Transition(
-Transition_Idle_to_AwaitRpcResult_via_tree_appear,
+Transition_Idle_to_AwaitRpcResult_via_canvas_appear,
 {
   nextState : State_AwaitRpcResult,




svn commit: samba r21810 - in branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr: .

2007-03-12 Thread derrell
Author: derrell
Date: 2007-03-13 02:58:05 + (Tue, 13 Mar 2007)
New Revision: 21810

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

Log:

- The height of a widget is in relation to its enclosing widget.  Specifying a
  height of 100% means that if the enclosing widget is 100 pixels high, this
  widget should be 100 pixels high.  If this widget is then placed someplace
  other than at the top of the enclosing widget, e.g. with top:20, the bottom
  of this widget will fall off the bottom of the enclosing widget.

  The normal way to solve this is to specify top and bottom attributes rather
  than top and height attributes.  Also, since widgets often look better if
  they don't extend all the way to the very bottom, specifying a bottom
  attribute equal to the top attribute typically has an appealing appearance.

  I've fixed the tree widget so it no longer falls off the bottom of the page.

Modified:
   branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Gui.js


Changeset:
Modified: branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Gui.js
===
--- branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Gui.js  
2007-03-13 02:54:06 UTC (rev 21809)
+++ branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Gui.js  
2007-03-13 02:58:05 UTC (rev 21810)
@@ -24,7 +24,7 @@
   top: 20,
   left: 20,
   right: 20,
-  height: 100%
+  bottom: 20
   });
   
   // Create a hosts tree



svn commit: samba r21811 - in branches/SAMBA_4_0/source/librpc/rpc: .

2007-03-12 Thread tridge
Author: tridge
Date: 2007-03-13 03:43:16 + (Tue, 13 Mar 2007)
New Revision: 21811

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

Log:

fixed a queueing error in the dcerpc client code. WHen the
dcerpc_ship_next_request() logic was added the penidng queue was split
in two, but we also needed to update the code which removes requests
from the queue to know about the two queues. Following the pattern
used in other client libs, I based which queue to remove from on
req-state, and added a new state RPC_REQUEST_QUEUED. This fixes a
crash that happens when rpc requests time out.

This patch also fixes the handling of timed out bind requests, and the
talloc_reference handling in dcerpc_ndr_request_recv().

Modified:
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc.c
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc.h


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc.c
===
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc.c   2007-03-13 02:58:05 UTC 
(rev 21810)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc.c   2007-03-13 03:43:16 UTC 
(rev 21811)
@@ -530,6 +530,25 @@
 }
 
 /*
+  remove requests from the pending or queued queues
+ */
+static int dcerpc_req_dequeue(struct rpc_request *req)
+{
+   switch (req-state) {
+   case RPC_REQUEST_QUEUED:
+   DLIST_REMOVE(req-p-conn-request_queue, req);
+   break;
+   case RPC_REQUEST_PENDING:
+   DLIST_REMOVE(req-p-conn-pending, req);
+   break;
+   case RPC_REQUEST_DONE:
+   break;
+   }
+   return 0;
+}
+
+
+/*
   mark the dcerpc connection dead. All outstanding requests get an error
 */
 static void dcerpc_connection_dead(struct dcerpc_connection *conn, NTSTATUS 
status)
@@ -537,9 +556,9 @@
/* all pending requests get the error */
while (conn-pending) {
struct rpc_request *req = conn-pending;
+   dcerpc_req_dequeue(req);
req-state = RPC_REQUEST_DONE;
req-status = status;
-   DLIST_REMOVE(conn-pending, req);
if (req-async.callback) {
req-async.callback(req);
}
@@ -639,13 +658,14 @@
 {
struct rpc_request *req = talloc_get_type(private, struct rpc_request);
 
-   if (req-state != RPC_REQUEST_PENDING) {
+   if (req-state == RPC_REQUEST_DONE) {
return;
}
 
+   dcerpc_req_dequeue(req);
+
req-status = NT_STATUS_IO_TIMEOUT;
req-state = RPC_REQUEST_DONE;
-   DLIST_REMOVE(req-p-conn-pending, req);
if (req-async.callback) {
req-async.callback(req);
}
@@ -716,6 +736,7 @@
req-p = p;
req-recv_handler = dcerpc_bind_recv_handler;
DLIST_ADD_END(p-conn-pending, req, struct rpc_request *);
+   talloc_set_destructor(req, dcerpc_req_dequeue);
 
c-status = p-conn-transport.send_request(p-conn, blob,
True);
@@ -821,8 +842,8 @@
talloc_steal(req, raw_packet-data);
 
if (req-recv_handler != NULL) {
+   dcerpc_req_dequeue(req);
req-state = RPC_REQUEST_DONE;
-   DLIST_REMOVE(c-pending, req);
req-recv_handler(req, raw_packet, pkt);
return;
}
@@ -894,15 +915,6 @@
 }
 
 /*
-  make sure requests are cleaned up 
- */
-static int dcerpc_req_destructor(struct rpc_request *req)
-{
-   DLIST_REMOVE(req-p-conn-pending, req);
-   return 0;
-}
-
-/*
   perform the send side of a async dcerpc request
 */
 static struct rpc_request *dcerpc_request_send(struct dcerpc_pipe *p, 
@@ -923,7 +935,7 @@
req-p = p;
req-call_id = next_call_id(p-conn);
req-status = NT_STATUS_OK;
-   req-state = RPC_REQUEST_PENDING;
+   req-state = RPC_REQUEST_QUEUED;
req-payload = data_blob(NULL, 0);
req-flags = 0;
req-fault_code = 0;
@@ -950,6 +962,7 @@
}
 
DLIST_ADD_END(p-conn-request_queue, req, struct rpc_request *);
+   talloc_set_destructor(req, dcerpc_req_dequeue);
 
dcerpc_ship_next_request(p-conn);
 
@@ -959,7 +972,6 @@
dcerpc_timeout_handler, req);
}
 
-   talloc_set_destructor(req, dcerpc_req_destructor);
return req;
 }
 
@@ -991,6 +1003,7 @@
 
DLIST_REMOVE(c-request_queue, req);
DLIST_ADD(c-pending, req);
+   req-state = RPC_REQUEST_PENDING;
 
init_ncacn_hdr(p-conn, pkt);
 
@@ -1072,7 +1085,7 @@
 {
NTSTATUS status;
 
-   while (req-state == RPC_REQUEST_PENDING) {
+   while (req-state != RPC_REQUEST_DONE) {
struct event_context *ctx = dcerpc_event_context(req-p);
if (event_loop_once(ctx) != 0) {
return NT_STATUS_CONNECTION_DISCONNECTED;
@@ -1366,10 +1379,13 @@
 

svn commit: samba r21812 - in branches/SAMBA_4_0/source/librpc/ndr: .

2007-03-12 Thread tridge
Author: tridge
Date: 2007-03-13 04:18:07 + (Tue, 13 Mar 2007)
New Revision: 21812

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

Log:

fixed an integer overflow error in the ndr push code. 

This needs to be fixed in Samba3 as well. It might be exploitable (I
haven't confirmed one way or the other), so I think this should be
fixed for 3.0.25

Modified:
   branches/SAMBA_4_0/source/librpc/ndr/libndr.h
   branches/SAMBA_4_0/source/librpc/ndr/ndr.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/ndr/libndr.h
===
--- branches/SAMBA_4_0/source/librpc/ndr/libndr.h   2007-03-13 03:43:16 UTC 
(rev 21811)
+++ branches/SAMBA_4_0/source/librpc/ndr/libndr.h   2007-03-13 04:18:07 UTC 
(rev 21812)
@@ -219,7 +219,7 @@
} \
 } while(0)
 
-#define NDR_PUSH_NEED_BYTES(ndr, n) NDR_CHECK(ndr_push_expand(ndr, 
ndr-offset+(n)))
+#define NDR_PUSH_NEED_BYTES(ndr, n) NDR_CHECK(ndr_push_expand(ndr, n))
 
 #define NDR_PUSH_ALIGN(ndr, n) do { \
if (!(ndr-flags  LIBNDR_FLAG_NOALIGN)) { \

Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c
===
--- branches/SAMBA_4_0/source/librpc/ndr/ndr.c  2007-03-13 03:43:16 UTC (rev 
21811)
+++ branches/SAMBA_4_0/source/librpc/ndr/ndr.c  2007-03-13 04:18:07 UTC (rev 
21812)
@@ -148,10 +148,17 @@
 
 
 /*
-  expand the available space in the buffer to 'size'
+  expand the available space in the buffer to ndr-offset + extra_size
 */
-_PUBLIC_ NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32_t size)
+_PUBLIC_ NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32_t extra_size)
 {
+   uint32_t size = extra_size + ndr-offset;
+
+   if (size  ndr-offset) {
+   /* extra_size overflowed the offset */
+   return NT_STATUS_NO_MEMORY;
+   }
+
if (ndr-alloc_size  size) {
return NT_STATUS_OK;
}



svn commit: samba r21813 - in branches/SAMBA_3_0/source/librpc/ndr: .

2007-03-12 Thread tridge
Author: tridge
Date: 2007-03-13 04:37:09 + (Tue, 13 Mar 2007)
New Revision: 21813

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

Log:

fixed an integer overflow error in the ndr push code. 

Jerry, you might like to consider this for 3.0.25

Modified:
   branches/SAMBA_3_0/source/librpc/ndr/libndr.h
   branches/SAMBA_3_0/source/librpc/ndr/ndr.c


Changeset:
Modified: branches/SAMBA_3_0/source/librpc/ndr/libndr.h
===
--- branches/SAMBA_3_0/source/librpc/ndr/libndr.h   2007-03-13 04:18:07 UTC 
(rev 21812)
+++ branches/SAMBA_3_0/source/librpc/ndr/libndr.h   2007-03-13 04:37:09 UTC 
(rev 21813)
@@ -224,7 +224,7 @@
} \
 } while(0)
 
-#define NDR_PUSH_NEED_BYTES(ndr, n) NDR_CHECK(ndr_push_expand(ndr, 
ndr-offset+(n)))
+#define NDR_PUSH_NEED_BYTES(ndr, n) NDR_CHECK(ndr_push_expand(ndr, n))
 
 #define NDR_PUSH_ALIGN(ndr, n) do { \
if (!(ndr-flags  LIBNDR_FLAG_NOALIGN)) { \

Modified: branches/SAMBA_3_0/source/librpc/ndr/ndr.c
===
--- branches/SAMBA_3_0/source/librpc/ndr/ndr.c  2007-03-13 04:18:07 UTC (rev 
21812)
+++ branches/SAMBA_3_0/source/librpc/ndr/ndr.c  2007-03-13 04:37:09 UTC (rev 
21813)
@@ -160,10 +160,17 @@
 
 
 /*
-  expand the available space in the buffer to 'size'
+  expand the available space in the buffer to ndr-offset + extra_size
 */
-NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32_t size)
+NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32_t extra_size)
 {
+   uint32_t size = extra_size + ndr-offset;
+
+   if (size  ndr-offset) {
+   /* extra_size overflowed the offset */
+   return NT_STATUS_NO_MEMORY;
+   }
+
if (ndr-alloc_size  size) {
return NT_STATUS_OK;
}



svn commit: samba r21814 - in branches: SAMBA_3_0/source/librpc/ndr SAMBA_4_0/source/librpc/ndr

2007-03-12 Thread tridge
Author: tridge
Date: 2007-03-13 04:42:49 + (Tue, 13 Mar 2007)
New Revision: 21814

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

Log:
use ndr_push_error in the ndr layer, not just a NTSTATUS failure
Modified:
   branches/SAMBA_3_0/source/librpc/ndr/ndr.c
   branches/SAMBA_4_0/source/librpc/ndr/ndr.c


Changeset:
Modified: branches/SAMBA_3_0/source/librpc/ndr/ndr.c
===
--- branches/SAMBA_3_0/source/librpc/ndr/ndr.c  2007-03-13 04:37:09 UTC (rev 
21813)
+++ branches/SAMBA_3_0/source/librpc/ndr/ndr.c  2007-03-13 04:42:49 UTC (rev 
21814)
@@ -168,7 +168,8 @@
 
if (size  ndr-offset) {
/* extra_size overflowed the offset */
-   return NT_STATUS_NO_MEMORY;
+   return ndr_push_error(ndr, NDR_ERR_BUFSIZE, Overflow in 
push_expand to %u,
+ size);
}
 
if (ndr-alloc_size  size) {

Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c
===
--- branches/SAMBA_4_0/source/librpc/ndr/ndr.c  2007-03-13 04:37:09 UTC (rev 
21813)
+++ branches/SAMBA_4_0/source/librpc/ndr/ndr.c  2007-03-13 04:42:49 UTC (rev 
21814)
@@ -156,7 +156,8 @@
 
if (size  ndr-offset) {
/* extra_size overflowed the offset */
-   return NT_STATUS_NO_MEMORY;
+   return ndr_push_error(ndr, NDR_ERR_BUFSIZE, Overflow in 
push_expand to %u,
+ size);
}
 
if (ndr-alloc_size  size) {



svn commit: samba r21815 - in branches/SAMBA_3_0_25/source/librpc/ndr: .

2007-03-12 Thread jra
Author: jra
Date: 2007-03-13 05:10:31 + (Tue, 13 Mar 2007)
New Revision: 21815

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

Log:
Security fixes from tridge :

fixed an integer overflow error in the ndr push code. r:21813
use ndr_push_error in the ndr layer, not just a NTSTATUS failure r:21814

Jeremy.

Modified:
   branches/SAMBA_3_0_25/source/librpc/ndr/libndr.h
   branches/SAMBA_3_0_25/source/librpc/ndr/ndr.c


Changeset:
Modified: branches/SAMBA_3_0_25/source/librpc/ndr/libndr.h
===
--- branches/SAMBA_3_0_25/source/librpc/ndr/libndr.h2007-03-13 04:42:49 UTC 
(rev 21814)
+++ branches/SAMBA_3_0_25/source/librpc/ndr/libndr.h2007-03-13 05:10:31 UTC 
(rev 21815)
@@ -223,7 +223,7 @@
} \
 } while(0)
 
-#define NDR_PUSH_NEED_BYTES(ndr, n) NDR_CHECK(ndr_push_expand(ndr, 
ndr-offset+(n)))
+#define NDR_PUSH_NEED_BYTES(ndr, n) NDR_CHECK(ndr_push_expand(ndr, n))
 
 #define NDR_PUSH_ALIGN(ndr, n) do { \
if (!(ndr-flags  LIBNDR_FLAG_NOALIGN)) { \

Modified: branches/SAMBA_3_0_25/source/librpc/ndr/ndr.c
===
--- branches/SAMBA_3_0_25/source/librpc/ndr/ndr.c   2007-03-13 04:42:49 UTC 
(rev 21814)
+++ branches/SAMBA_3_0_25/source/librpc/ndr/ndr.c   2007-03-13 05:10:31 UTC 
(rev 21815)
@@ -160,10 +160,18 @@
 
 
 /*
-  expand the available space in the buffer to 'size'
+  expand the available space in the buffer to ndr-offset + extra_size
 */
-NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32_t size)
+NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32_t extra_size)
 {
+   uint32_t size = extra_size + ndr-offset;
+
+   if (size  ndr-offset) {
+   /* extra_size overflowed the offset */
+   return ndr_push_error(ndr, NDR_ERR_BUFSIZE, Overflow in 
push_expand to %u,
+   size);
+   }
+
if (ndr-alloc_size  size) {
return NT_STATUS_OK;
}