[Samba] Problem with network drives

2007-10-15 Thread Vincent Zakofski
Hi,

I have a Windows Xp station where a network drive is mapped. The
username and password for this network drive are the same as those of my
Windows session.
I want to access to another share on this server with another name and
login than those of the mapped network drive. When I try to access to
this share it tries with the username and password from my Windows
session. I can see it in the samba log file (
NT_STATUS_NETWORK_ACCESS_DENIED).
It doesn't work because this share is not accessible for my user. When I
try to log with a valid username and login for this share it doesn't
work and I have nothing in the samba log file.
This share is accessible with another username and login when I dont
have network drives mappped on the same samba server.
Can somebody explain me why it doesn't work and why I don't see anything
in my log file.


Thanks


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


[Samba] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread KLEIN Stéphane
Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a écrit :

 On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:
  
 I use samba to share some files between some clients. I would like than
 these files are always view with -rw-rw-rw- rights by all clients event
 if someone change file access permissions.
  
 Can I configure smb.conf to do that ?
  
 I don't think that you can force Samba to have them viewed that way,
 as the permissions in Samba are dependent upon the permissions on the
 files themselves (on the server).
 
 But you can force the permissions to be set in a given way by Samba when
 files are created or modified.  Look at 'force create mode' in the
 smb.conf man page.

I know force create mode, force directory mode parameters but how can I 
force permission when one user launch chmod ?

Thanks,
Stephane


-- 
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-How to promote Administrator with all priviliges?

2007-10-15 Thread Torsten

Adam Tauno Williams schrieb:


Add them to the domain administrators group.

  
if you have read my initial posting, you would have noticed that this is 
the problem.  the user administrator is member of domain admins but 
still can't perform administrative tasks.

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


Re: [Samba] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread Greg Byshenk
On Mon, Oct 15, 2007 at 07:25:08AM +, KLEIN St?phane wrote:
 Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a ??crit??:
  On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:

  I use samba to share some files between some clients. I would like than
  these files are always view with -rw-rw-rw- rights by all clients event
  if someone change file access permissions.
   
  Can I configure smb.conf to do that ?

  I don't think that you can force Samba to have them viewed that way,
  as the permissions in Samba are dependent upon the permissions on the
  files themselves (on the server).

  But you can force the permissions to be set in a given way by Samba when
  files are created or modified.  Look at 'force create mode' in the
  smb.conf man page.
 
 I know force create mode, force directory mode parameters but how can I 
 force permission when one user launch chmod ?

I'm not sure what you are asking when you refer to 'launch chmod'.

If you mean 'change permissions from windows', then 'force create mode' 
should do what you want.

   force create mode (S)
  This  parameter  specifies  a  set of UNIX mode bit permissions that
  will always be set on a file created by Samba. This is done by  bit-
  wise  'OR'ing  these bits onto the mode bits of a file that is being
  created or having its permissions  changed.  The  default  for  this
  parameter is (in octal) 000. The modes in this parameter are bitwise
  'OR'ed onto the file mode after the mask  set  in  the  create  mask
  parameter is applied. 

Note the is being created *or having its permissions changed*...

If you mean 'actually running chmod on the server', then there is nothing
that Samba can do about that, as that is something that is occurring on the
server itself, below the level of Samba. 

What might work to allow full access to everythign in the share-- regardless of
permissions -- would be to assign 'admin users' to the share in question... but
read the warnings about this.


-- 
greg byshenk  -  [EMAIL PROTECTED]  -  Leiden, NL

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


Re: [Samba] Re: default kerberos realm??

2007-10-15 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Frank,

 #net ads join -U administrator
 administrator's password:
 [2007/10/12 12:04:19, 0]  libsmb/cliconnect.c:cli_session_setup_spnego(785)
  Kinit failed: Configuration file does not specify default realm
 Failed to join domain!


Set the default realm  in /etc/krb5.conf




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

iD8DBQFHE1etIR7qMdg1EfYRAvmuAJ9d1CfzD1NjFFDjFMIAnoETg7kC+QCfQejA
DBA6KvvQzH2uoC/I8K5M6YM=
=sFBV
-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] Profile Location Best Practice

2007-10-15 Thread Adam Tauno Williams
  Wasn't it the case a while back that if there were older clients on the
  network (Win95-Win98, etc.) that the Samba profile HAD to be inside the
  home directory?  Probably many Samba installations still have them there
  from those days if they've been using Samba long enough, and IF that was
  the case.  (?)
  I am not aware of any documentation that said that the Win9X profile HAD to 
  be 
  stored in the users' home directory.  I'd appreciate a pointer to where 
  this 
  is stated so ti can be fixed.
  Also, regarding where profiles should be stored, I wrote to this list a
  while back (5/17/07) regarding an Office 2007 read-only issue that was
  fixed by setting profile acls = no on the user's home directory. Well,
  it fixed the Office 2007 read-only problem but *broke* the roaming
  profiles.  Is the ONLY solution to this issue likely to be moving our
  hundreds of Samba profiles scattered across many servers into seperate
  directories?  OR, can/should this particular item be considered a Samba
  bug?

Sounds to be like you have answered your own question;  do *not* put
profiles in user's home directories.   The 'default' behavior for
windows is to not store user's profiles in any share the user explicitly
maps, so don't do that.  The user shouldn't be diddling around in their
profile folders so putting them somewhere the user is going to
inevitably diddle is a bad idea anyway.

  How can it be a Samba bug, when it is the Windows client that can 
  disconnect 
  its connections to network shares before the profile has been written to 
  the 
  server?
 You misunderstand me. I was not referring to the disconnection issue but 
 rather another issue related to where roaming profiles are stored. 
 Please read the second paragraph above regarding Office 2007 read-only 
 issue. THAT is what I asked about.  Sorry if I confused you.
 Having the profile inside the users home directory (and apparently some 
 people *do* have Samba configured that way),  

Sure,  I've seen Samba configured in some pretty mind boggling ways.
That never implies that doing so is right, proper, accepted, or
even useful.

 When the profile is in the user's home directory and profile acls = yes 
 is set, Office 2007 will save files to the home directory as read-only, 
 causing the user to be unable to modify them after that. Setting profile 
 acls = no fixes that problem - but breaks the roaming profile. I asked 
 if the only solution to this is moving the roaming profiles out of home 
 directories in this case?

I'm willing to go on record with Yes.  Change your configuration and
the problem goes away - indicates the problem was your configuration.

-- 
Adam Tauno Williams, Network  Systems Administrator
Consultant - http://www.whitemiceconsulting.com
Developer - http://www.opengroupware.org

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


[Samba] How to report successfull and unseccessful login attempts

2007-10-15 Thread Valerio Daelli
Hi
we use samba 3.0.25a on FreeBSD 6.2 and we would like to have in the logs
only the successfull and unsuccessfull login attempts.
We would like to read in the log file:

Authentication for user [%s] - [%s] - [%s] succeeded

or

Authentication for user [%s] - [%s] FAILED with error

We have tried with log level 1 and we get only the successfull logins.
We have tried with log level 2 and we get the unsuccessfull as well but
with those a million of other irrelevant (for us) events are logged.
We know we could patch the source code (I think we should patch
source/auth/auth.c) but we prefer taking a simpler approach.
Any suggestions?
Thanks

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


[Samba] Samba as PDC with XP Client - Logon requires reboot - Help Please

2007-10-15 Thread Ron Segal
Hi, I'm running the latest version of Samba with a tdbsam backend,
configured not to use roaming profiles. Two different XP clients (SP2)
are joined to the domain ok but users can only logon by rebooting before
entering their logon details.  When users logoff and try to logon again
(or logon as a different user on the same machine) they get the standard
message 'windows cannot connect to the domain either because the domain
controller is down or because your computer account was not found.
Please try again later .. ' etc.  Have tried fiddling with registry
entries and permissions but can't get this problem to go away.  Any
ideas on this would be appreciated. Cheers.



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


Re: [Samba] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread Greg Byshenk
On Mon, Oct 15, 2007 at 07:25:08AM +, KLEIN St?phane wrote:
 Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a ??crit??:
  On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:

  I use samba to share some files between some clients. I would like than
  these files are always view with -rw-rw-rw- rights by all clients event
  if someone change file access permissions.
   
  Can I configure smb.conf to do that ?

  I don't think that you can force Samba to have them viewed that way,
  as the permissions in Samba are dependent upon the permissions on the
  files themselves (on the server).

  But you can force the permissions to be set in a given way by Samba when
  files are created or modified.  Look at 'force create mode' in the
  smb.conf man page.
 
 I know force create mode, force directory mode parameters but how can I 
 force permission when one user launch chmod ?

I'm not sure what you are asking when you refer to 'launch chmod'.

If you mean 'change permissions from windows', then 'force create mode' 
should do what you want.

   force create mode (S)
  This  parameter  specifies  a  set of UNIX mode bit permissions that
  will always be set on a file created by Samba. This is done by  bit-
  wise  'OR'ing  these bits onto the mode bits of a file that is being
  created or having its permissions  changed.  The  default  for  this
  parameter is (in octal) 000. The modes in this parameter are bitwise
  'OR'ed onto the file mode after the mask  set  in  the  create  mask
  parameter is applied. 

Note the is being created *or having its permissions changed*...

If you mean 'actually running chmod on the server', then there is nothing
that Samba can do about that, as that is something that is occurring on the
server itself, below the level of Samba. 

What might work to allow full access to everythign in the share-- regardless of
permissions -- would be to assign 'admin users' to the share in question... but
read the warnings about this.


-- 
greg byshenk  -  [EMAIL PROTECTED]  -  Leiden, NL

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


Re: [Samba] How to report successfull and unseccessful login attempts

2007-10-15 Thread Willy Offermans
Hello Valerio,

On Mon, Oct 15, 2007 at 02:22:04PM +0200, Valerio Daelli wrote:
 Hi
 we use samba 3.0.25a on FreeBSD 6.2 and we would like to have in the logs
 only the successfull and unsuccessfull login attempts.
 We would like to read in the log file:
 
 Authentication for user [%s] - [%s] - [%s] succeeded
 
 or
 
 Authentication for user [%s] - [%s] FAILED with error
 
 We have tried with log level 1 and we get only the successfull logins.
 We have tried with log level 2 and we get the unsuccessfull as well but
 with those a million of other irrelevant (for us) events are logged.
 We know we could patch the source code (I think we should patch
 source/auth/auth.c) but we prefer taking a simpler approach.
 Any suggestions?
 Thanks
 
 Valerio Daelli
 -- 
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/listinfo/samba


Maybe ``grep'' can help you?

-- 
Met vriendelijke groeten,
With kind regards,
Mit freundlichen Gruessen,
De jrus wah,

Willy

*
W.K. Offermans
Home:   +31 45 544 49 44
Mobile: +31 653 27 16 23
e-mail: [EMAIL PROTECTED]

   Powered by 

(__)
 \\\'',)
   \/  \ ^
   .\._/_)

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


Re: [Samba] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread Greg Byshenk
On Mon, Oct 15, 2007 at 07:25:08AM +, KLEIN St?phane wrote:
 Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a ??crit??:
  On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:

  I use samba to share some files between some clients. I would like than
  these files are always view with -rw-rw-rw- rights by all clients event
  if someone change file access permissions.
   
  Can I configure smb.conf to do that ?

  I don't think that you can force Samba to have them viewed that way,
  as the permissions in Samba are dependent upon the permissions on the
  files themselves (on the server).

  But you can force the permissions to be set in a given way by Samba when
  files are created or modified.  Look at 'force create mode' in the
  smb.conf man page.
 
 I know force create mode, force directory mode parameters but how can I 
 force permission when one user launch chmod ?

I'm not sure what you are asking when you refer to 'launch chmod'.

If you mean 'change permissions from windows', then 'force create mode' 
should do what you want.

   force create mode (S)
  This  parameter  specifies  a  set of UNIX mode bit permissions that
  will always be set on a file created by Samba. This is done by  bit-
  wise  'OR'ing  these bits onto the mode bits of a file that is being
  created or having its permissions  changed.  The  default  for  this
  parameter is (in octal) 000. The modes in this parameter are bitwise
  'OR'ed onto the file mode after the mask  set  in  the  create  mask
  parameter is applied. 

Note the is being created *or having its permissions changed*...

If you mean 'actually running chmod on the server', then there is nothing
that Samba can do about that, as that is something that is occurring on the
server itself, below the level of Samba. 

What might work to allow full access to everythign in the share-- regardless of
permissions -- would be to assign 'admin users' to the share in question... but
read the warnings about this.


-- 
greg byshenk  -  [EMAIL PROTECTED]  -  Leiden, NL

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


[Samba] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread KLEIN Stéphane
Le Mon, 15 Oct 2007 11:31:12 +0200, Greg Byshenk a écrit :

 On Mon, Oct 15, 2007 at 07:25:08AM +, KLEIN St?phane wrote:
 Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a ??crit??:
  On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:
 
  I use samba to share some files between some clients. I would like
  than these files are always view with -rw-rw-rw- rights by all
  clients event if someone change file access permissions.
   
  Can I configure smb.conf to do that ?
 
  I don't think that you can force Samba to have them viewed that
  way, as the permissions in Samba are dependent upon the permissions
  on the files themselves (on the server).
 
  But you can force the permissions to be set in a given way by Samba
  when files are created or modified.  Look at 'force create mode' in
  the smb.conf man page.
  
 I know force create mode, force directory mode parameters but how can I
 force permission when one user launch chmod ?

 If you mean 'change permissions from windows', then 'force create mode'
 should do what you want.

I mean 'change permissions from GNU/Linux samba client'. I don't mean 
: 'actually running chmod on the server'.

In this instance, 'force create mode' work also ?

Thanks,
Stephane


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


Re: [Samba] How to report successfull and unseccessful login attempts

2007-10-15 Thread Valerio Daelli
Hello

On 10/15/07, Willy Offermans [EMAIL PROTECTED] wrote:
 Hello Valerio,

 Maybe ``grep'' can help you?


Thanks for your suggestion.
We were looking for something like a good patch already
approved by the core developers of samba or something similar.
Bye

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


[Samba] remove machine account automatically

2007-10-15 Thread Marcus Sobchak [EMAIL PROTECTED]
Hi,

is there a way to remove a machine account (passwd and tdbsam)
automatically like adding a machine using

add machine script = /usr/sbin/useradd -g machines -c Machine
-d /dev/null -s /bin/false %u

Thanks,
Marcus


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


Re: [Samba] Profile Location Best Practice

2007-10-15 Thread Server Gremlin

Eric J. Feldhusen wrote:

Charles Marcus wrote:
  

The key advantage is that if the profile is stored within the user's
home directory, the Windows workstations will sometimes discconnect the
user's home directory network drive mapping during logout before the
profile has finished synchronizing between the workstation and the
server, and your users may have broken profile problems.
  

Wow... maybe this explains the mysterious problems I've been having...

Currently, user profiles are stored in:

\\server\home\user\system\profile

system is a hidden folder in the users home dir, so they don't even
'see' it (unless they enable 'Show hidden files and folders').

Home folder is mapped to H:, target = \\server\home\user

'My Documents' folder is mapped to H:

It has worked very well - with the OCCASIONAL exception of mysterious
problems with deleted icons from the desktop reappearing, and OCCASIONAL
corrupted files in the users profile

Are you saying that this could be causing these problems? I thought it
would be ok, since the Profile path is an UNC path, not a mapped drive
letter?



That is what I used to think as well, but after 5+ years of Samba
experience on about 19-20 Linux servers, a lot of reading of the Samba
Official How-to and Official By-Example and samba email lists, my
experience is that a separate profile share not under the user's home
directory works best.

From the Samba Official How-to, check out the Note section just a few
paragraphs down from the top of this link that explains why a separate
profile share

http://us1.samba.org/samba/docs/man/Samba-HOWTO-Collection/ProfileMgmt.html#id418314

Also, I can't recommend the Samba Official How-to and Official
By-Example enough.  They both take time to read through, but each is
well written, easy to read, and real glue together understanding how
Samba and Windows clients interact.

Also, you can download the latest versions of each document from
http://www.samba.org ,but I've purchased one edition of each once to
support the authors, because both books are that good.

  
I have the exact same setup as what Charles Marcus described, with user 
profiles in the home directory (save that my path is 
\\server\share\username\profile, and it's not hidden), and the exact 
same strange OCCASIONAL problems he described.  Desktop icons 
mysteriously reappear on the desktop over and over, the user can't 
permanently delete them.  File corruption seems to be less of an issue, 
but it has happened.


Eric Feldhusen, you've pretty much convinced me that best practice is 
having profiles stored in one place, and home folders in another.  But 
I'm still curious if you have also experienced these problems even with 
such a configuration.  Either way, I think the merits of such a 
configuration are clear; I just wonder if I can expect even these 
problems to go away, or if I shouldn't get my hopes up quite that much.


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


Re: [Samba] Profile Location Best Practice

2007-10-15 Thread deann corum

Adam Tauno Williams wrote:

Wasn't it the case a while back that if there were older clients on the
network (Win95-Win98, etc.) that the Samba profile HAD to be inside the
home directory?  Probably many Samba installations still have them there
from those days if they've been using Samba long enough, and IF that was
the case.  (?)

I am not aware of any documentation that said that the Win9X profile HAD to be 
stored in the users' home directory.  I'd appreciate a pointer to where this 
is stated so ti can be fixed.
  

Also, regarding where profiles should be stored, I wrote to this list a
while back (5/17/07) regarding an Office 2007 read-only issue that was
fixed by setting profile acls = no on the user's home directory. Well,
it fixed the Office 2007 read-only problem but *broke* the roaming
profiles.  Is the ONLY solution to this issue likely to be moving our
hundreds of Samba profiles scattered across many servers into seperate
directories?  OR, can/should this particular item be considered a Samba
bug?



Sounds to be like you have answered your own question;  do *not* put
profiles in user's home directories.   The 'default' behavior for
windows is to not store user's profiles in any share the user explicitly
maps, so don't do that.  The user shouldn't be diddling around in their
profile folders so putting them somewhere the user is going to
inevitably diddle is a bad idea anyway.

  
Not really. I asked if that was the ONLY solution. It likely isn't, but 
it is the only one *possible* at this time. It appears that the default 
config of Samba when first installed according to other posts here, same 
subject, is to put the profiles in the user's home directory in 
smb.conf.  If that is so, maybe that ought to be changed as it is 
apparently misleading to Samba users - regardless what the docs say.


It also appears that a few people are possibly misled by a belief that 
older versions of Windows (See Server Gremlin original post) may have 
required just such a configuration. In the environment I'm in, for 
instance I inherited this config and was also told that it was due to 
older versions of Windows clients requiring it.  While the documentation 
may not state that anywhere, that doesn't mean it *wasn't* the case (or 
that it was). 

Documentation can't possibly cover all assumptions erroneous or 
otherwise, but default configs when Samba is loaded can endeavor to 
follow whatever the 'best practice' might be and if that is to place 
profiles in a separate share than home directories, and that is not how 
a  fresh install is configured, maybe that should be changed?  Just a 
suggestion.


Anyway, thanks for answering this question.

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


[Samba] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread KLEIN Stéphane
Le Mon, 15 Oct 2007 13:51:57 +, KLEIN Stéphane a écrit :

 Le Mon, 15 Oct 2007 11:31:12 +0200, Greg Byshenk a écrit :
 
 On Mon, Oct 15, 2007 at 07:25:08AM +, KLEIN St?phane wrote:
 Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a ??crit??:
  On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:
 
  I use samba to share some files between some clients. I would like
  than these files are always view with -rw-rw-rw- rights by all
  clients event if someone change file access permissions.
   
  Can I configure smb.conf to do that ?
 
  I don't think that you can force Samba to have them viewed that
  way, as the permissions in Samba are dependent upon the permissions
  on the files themselves (on the server).
 
  But you can force the permissions to be set in a given way by Samba
  when files are created or modified.  Look at 'force create mode' in
  the smb.conf man page.
  
 I know force create mode, force directory mode parameters but how can
 I force permission when one user launch chmod ?
 
 If you mean 'change permissions from windows', then 'force create mode'
 should do what you want.
 
 I mean 'change permissions from GNU/Linux samba client'. I don't mean :
 'actually running chmod on the server'.
 
 In this instance, 'force create mode' work also ?

Well, it's work !


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


Re: [Samba] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread Greg Byshenk
On Mon, Oct 15, 2007 at 07:25:08AM +, KLEIN St?phane wrote:
 Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a ??crit??:
  On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:

  I use samba to share some files between some clients. I would like than
  these files are always view with -rw-rw-rw- rights by all clients event
  if someone change file access permissions.
   
  Can I configure smb.conf to do that ?

  I don't think that you can force Samba to have them viewed that way,
  as the permissions in Samba are dependent upon the permissions on the
  files themselves (on the server).

  But you can force the permissions to be set in a given way by Samba when
  files are created or modified.  Look at 'force create mode' in the
  smb.conf man page.
 
 I know force create mode, force directory mode parameters but how can I 
 force permission when one user launch chmod ?

I'm not sure what you are asking when you refer to 'launch chmod'.

If you mean 'change permissions from windows', then 'force create mode' 
should do what you want.

   force create mode (S)
  This  parameter  specifies  a  set of UNIX mode bit permissions that
  will always be set on a file created by Samba. This is done by  bit-
  wise  'OR'ing  these bits onto the mode bits of a file that is being
  created or having its permissions  changed.  The  default  for  this
  parameter is (in octal) 000. The modes in this parameter are bitwise
  'OR'ed onto the file mode after the mask  set  in  the  create  mask
  parameter is applied. 

Note the is being created *or having its permissions changed*...

If you mean 'actually running chmod on the server', then there is nothing
that Samba can do about that, as that is something that is occurring on the
server itself, below the level of Samba. 

What might work to allow full access to everythign in the share-- regardless of
permissions -- would be to assign 'admin users' to the share in question... but
read the warnings about this.


-- 
greg byshenk  -  [EMAIL PROTECTED]  -  Leiden, NL

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


Re: [Samba] using cifs to access posix acl from a linux client

2007-10-15 Thread Chuck Kollars
 We would like to mount a Linux server running samba 
 using a cifs mount from a linux client (linux- 
 linux) and still be able to access the
 extended attributes. 

 Acl's work on the native filesystem, however when we
 mount the samba server on the Linux client using
 mount -t cifs //localhost/test test -o username=xxx

 Then the extended attributes are no longer visible,
 only the default posix rights. Any idea's?

My experience over the last year in probing deeply
into the interaction of Linux ACLs with Samba (but I'm
not a Samba expert and coult be wrong:-) is you can't
get there from here. 

While you can get Samba to pretty much use the Linux
ACLs on the _server_ side, Linux ACLs will never
behave _exactly_ the same way they do for a user who's
directly logged on nor will they be visible to the
_client_. 

I found the implementation of Linux ACLs to still be a
little more off the beaten path than I assumed naively
at first. It interacts weirdly with quotas; I can
crash it (admittedly my kernel is now out of date). I
had to get a special version of `rsync` that
understood and propagated Linux ACLs (the regular one
doesn't). And I'm even a little doubtful about full
support in NFS.

good luck!


-Chuck Kollars


   

Be a better Globetrotter. Get better travel answers from someone who knows. 
Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=listsid=396545469
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Profile Location Best Practice

2007-10-15 Thread Eric J. Feldhusen
Server Gremlin wrote:
 Eric Feldhusen, you've pretty much convinced me that best practice is
 having profiles stored in one place, and home folders in another.  But
 I'm still curious if you have also experienced these problems even with
 such a configuration.  Either way, I think the merits of such a
 configuration are clear; I just wonder if I can expect even these
 problems to go away, or if I shouldn't get my hopes up quite that much.

At the moment, I'd have to say I'm just channeling the advice of the
Samba team and their postings on the email lists roaming profiles, since
their advice is straightforward, it's just the listening part I've had
to work for.

Yes, with the profiles stored under a Profiles share, I have problems
with broken profiles, but much less, and of the times I'm working
through my head to remember, I think most of those were problems with
the workstation configuration, bad Windows XP install, user assisted us
by installing spyware/virii, wrong network drivers detected and
installed from Windows update, etc...

I've been going back through our RT system and I had forgot we have 4
types of samba file/print doing PDC control.  We have RHEL4 servers,
and there's two types of file system's, those with acl and user
attribute and those with no acl or user attributes on.  Then, each of
those groups are split again with profiles in user home and profiles in
profile share.

Looking at our support tickets, our least problems go from the systems
with acl/user attribute and profiles shares to systems with acl/user
attributes and profiles in home directories to systems with no acl/user
attributes and profiles to finally, systems with no acl/user attributes
and no profile shares.

So, to make an executive summary at the end, basically I've done what
has been documented in the official documentation and suggested on the
email lists by Samba team members.

Off-topic, the question on why aren't all our systems quite the same?  I
had to sneak file system acl's, user attribute's and profiles shares
onto a couple of servers, because I was adamant from what I had read on
the samba lists was that separate profile shares, and acl/user attribute
would give us the best ability to support our windows clients.  Not
quite professional to sneak around my co-worker's back, but...

Eric

-- 
Eric Feldhusen
Network Administratorhttp://www.remc1.org
[EMAIL PROTECTED]
PO Box 270  (906) 482-4520  x239
809 Hecla St(906) 482-5031 fax
Hancock, MI  49930  (906) 370 6202 mobile

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


Re: [Samba] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread Greg Byshenk
On Mon, Oct 15, 2007 at 07:25:08AM +, KLEIN St?phane wrote:
 Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a ??crit??:
  On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:

  I use samba to share some files between some clients. I would like than
  these files are always view with -rw-rw-rw- rights by all clients event
  if someone change file access permissions.
   
  Can I configure smb.conf to do that ?

  I don't think that you can force Samba to have them viewed that way,
  as the permissions in Samba are dependent upon the permissions on the
  files themselves (on the server).

  But you can force the permissions to be set in a given way by Samba when
  files are created or modified.  Look at 'force create mode' in the
  smb.conf man page.
 
 I know force create mode, force directory mode parameters but how can I 
 force permission when one user launch chmod ?

I'm not sure what you are asking when you refer to 'launch chmod'.

If you mean 'change permissions from windows', then 'force create mode' 
should do what you want.

   force create mode (S)
  This  parameter  specifies  a  set of UNIX mode bit permissions that
  will always be set on a file created by Samba. This is done by  bit-
  wise  'OR'ing  these bits onto the mode bits of a file that is being
  created or having its permissions  changed.  The  default  for  this
  parameter is (in octal) 000. The modes in this parameter are bitwise
  'OR'ed onto the file mode after the mask  set  in  the  create  mask
  parameter is applied. 

Note the is being created *or having its permissions changed*...

If you mean 'actually running chmod on the server', then there is nothing
that Samba can do about that, as that is something that is occurring on the
server itself, below the level of Samba. 

What might work to allow full access to everythign in the share-- regardless of
permissions -- would be to assign 'admin users' to the share in question... but
read the warnings about this.


-- 
greg byshenk  -  [EMAIL PROTECTED]  -  Leiden, NL

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

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba
...
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba
..
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba
.
-- 
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 network drives

2007-10-15 Thread Dennis McLeod
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Vincent Zakofski
Sent: Sunday, October 14, 2007 11:22 PM
To: samba@lists.samba.org
Subject: [Samba] Problem with network drives

Hi,

I have a Windows Xp station where a network drive is mapped. The username
and password for this network drive are the same as those of my Windows
session.
I want to access to another share on this server with another name and login
than those of the mapped network drive. When I try to access to this share
it tries with the username and password from my Windows session. I can see
it in the samba log file ( NT_STATUS_NETWORK_ACCESS_DENIED).
It doesn't work because this share is not accessible for my user. When I try
to log with a valid username and login for this share it doesn't work and I
have nothing in the samba log file.
This share is accessible with another username and login when I dont have
network drives mappped on the same samba server.
Can somebody explain me why it doesn't work and why I don't see anything in
my log file.


Thanks


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






It's not a problem, and I don't think it's a Samba issue. It's a function of
XP/2000/2003. This would happen on a Windows Network too.
Multiple connections to a server or shared resource by the same user using
more than one user name are not allowed.
That's the reason. I'm not enough of a Samba guru to tell you why it's not
in your logs. It may show up in your XP event logs, depending on your XP
Event log settings, though.
You can make the second connection to the server using its IP address (I.E.
\\192.168.1.10\share) as a work around.
Why would you want to connect as someone else, though, rather than give
yourself (actually a group you belong to) access to the share?
If it's just for testing, then the method above will be fine
Dennis

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


[Samba] samba migration 3.x - 3.x

2007-10-15 Thread Jan Falkenhagen
hi, i am currently searching for a samba howto that covers the migration
of a Samba 3 PDC to another piece of hardware (with changing
distributions from a discontinued SUSE 9.2 to CentOS 5 parallely). 

Until now i converted the smbpasswd backend to tdbsam, let the new
machine join the domain, and executed net rpc getsid. The i copied the
secrets.tdb and the passwd.tdb to the new machine. Unfortunately user
login doesn't work for the new one. In the end I am planing to turn off
the old one and to make the new machine the domain master.

Is there anything left that has to be done? Do i have to set new
passwords?
-- 
best regards
jan

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


Re: [Samba] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread Greg Byshenk
On Mon, Oct 15, 2007 at 07:25:08AM +, KLEIN St?phane wrote:
 Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a ??crit??:
  On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:

  I use samba to share some files between some clients. I would like than
  these files are always view with -rw-rw-rw- rights by all clients event
  if someone change file access permissions.
   
  Can I configure smb.conf to do that ?

  I don't think that you can force Samba to have them viewed that way,
  as the permissions in Samba are dependent upon the permissions on the
  files themselves (on the server).

  But you can force the permissions to be set in a given way by Samba when
  files are created or modified.  Look at 'force create mode' in the
  smb.conf man page.
 
 I know force create mode, force directory mode parameters but how can I 
 force permission when one user launch chmod ?

I'm not sure what you are asking when you refer to 'launch chmod'.

If you mean 'change permissions from windows', then 'force create mode' 
should do what you want.

   force create mode (S)
  This  parameter  specifies  a  set of UNIX mode bit permissions that
  will always be set on a file created by Samba. This is done by  bit-
  wise  'OR'ing  these bits onto the mode bits of a file that is being
  created or having its permissions  changed.  The  default  for  this
  parameter is (in octal) 000. The modes in this parameter are bitwise
  'OR'ed onto the file mode after the mask  set  in  the  create  mask
  parameter is applied. 

Note the is being created *or having its permissions changed*...

If you mean 'actually running chmod on the server', then there is nothing
that Samba can do about that, as that is something that is occurring on the
server itself, below the level of Samba. 

What might work to allow full access to everythign in the share-- regardless of
permissions -- would be to assign 'admin users' to the share in question... but
read the warnings about this.


-- 
greg byshenk  -  [EMAIL PROTECTED]  -  Leiden, NL

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

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


Re: [Samba] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread Greg Byshenk
On Mon, Oct 15, 2007 at 07:25:08AM +, KLEIN St?phane wrote:
 Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a ??crit??:
  On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:

  I use samba to share some files between some clients. I would like than
  these files are always view with -rw-rw-rw- rights by all clients event
  if someone change file access permissions.
   
  Can I configure smb.conf to do that ?

  I don't think that you can force Samba to have them viewed that way,
  as the permissions in Samba are dependent upon the permissions on the
  files themselves (on the server).

  But you can force the permissions to be set in a given way by Samba when
  files are created or modified.  Look at 'force create mode' in the
  smb.conf man page.
 
 I know force create mode, force directory mode parameters but how can I 
 force permission when one user launch chmod ?

I'm not sure what you are asking when you refer to 'launch chmod'.

If you mean 'change permissions from windows', then 'force create mode' 
should do what you want.

   force create mode (S)
  This  parameter  specifies  a  set of UNIX mode bit permissions that
  will always be set on a file created by Samba. This is done by  bit-
  wise  'OR'ing  these bits onto the mode bits of a file that is being
  created or having its permissions  changed.  The  default  for  this
  parameter is (in octal) 000. The modes in this parameter are bitwise
  'OR'ed onto the file mode after the mask  set  in  the  create  mask
  parameter is applied. 

Note the is being created *or having its permissions changed*...

If you mean 'actually running chmod on the server', then there is nothing
that Samba can do about that, as that is something that is occurring on the
server itself, below the level of Samba. 

What might work to allow full access to everythign in the share-- regardless of
permissions -- would be to assign 'admin users' to the share in question... but
read the warnings about this.


-- 
greg byshenk  -  [EMAIL PROTECTED]  -  Leiden, NL

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

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


[Samba] Access denied error on Samba mount

2007-10-15 Thread bhoomikasc

Hi,

I am trying to mount a samba share on to a Windows 2003 server. 

When I do,
devdb001:/ # mount -t cifs -o username=mysql,password=pass
//10.141.52.15/linuxbak/mysql_db/devdb /media/devdb/
retrying with upper case share name
mount error 6 = No such device or address
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

My smb.conf is,
[global]
workgroup = MY.COM
map to guest = Bad User
usershare allow guests = Yes
valid users = root, mysql
force user = mysql

[homes]
comment = Home Directories
valid users = %S, %D%w%S
read only = No
inherit acls = Yes
browseable = No

[profiles]
comment = Network Profiles Service
path = %H
read only = No
create mask = 0600
directory mask = 0700
store dos attributes = Yes

[users]
comment = All users
path = /home
read only = No
inherit acls = Yes

[groups]
comment = All groups
path = /home/groups
read only = No
inherit acls = Yes

[devdb]
comment = Share for devdb001 on backup server
path = /media/devdb
write list = root, mysql
read only = No
create mask = 0600
directory mask = 0700
inherit acls = Yes

The user mysql is added to the smbpasswd file.

Also, 
devdb001:/ # smbclient -L 10.141.55.66 -U mysql
Password:
Domain=[DEVDB001] OS=[Unix] Server=[Samba 3.0.22-13.30-1290-SUSE-SLES10]

Sharename   Type  Comment
-     ---
profilesDisk  Network Profiles Service
users   Disk  All users
groups  Disk  All groups
devdb   Disk  Share for devdb001 on backup server
IPC$IPC   IPC Service (Samba
3.0.22-13.30-1290-SUSE-SLES10)
ADMIN$  IPC   IPC Service (Samba
3.0.22-13.30-1290-SUSE-SLES10)
mysql   Disk  Home Directories
Domain=[DEVDB001] OS=[Unix] Server=[Samba 3.0.22-13.30-1290-SUSE-SLES10]

Server   Comment
----

WorkgroupMaster
----
OVE-VICKIOVE-DC01
OVE.COM  DEVDB001
OVE.LOCALAMANDABACKUP

Can someone tell me what I am doing wrong?

Thanks.
-- 
View this message in context: 
http://www.nabble.com/%22Access-denied%22-error-on-Samba-mount-tf4629545.html#a13219213
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


Re: [Samba] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread Greg Byshenk
On Mon, Oct 15, 2007 at 07:25:08AM +, KLEIN St?phane wrote:
 Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a ??crit??:
  On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:

  I use samba to share some files between some clients. I would like than
  these files are always view with -rw-rw-rw- rights by all clients event
  if someone change file access permissions.
   
  Can I configure smb.conf to do that ?

  I don't think that you can force Samba to have them viewed that way,
  as the permissions in Samba are dependent upon the permissions on the
  files themselves (on the server).

  But you can force the permissions to be set in a given way by Samba when
  files are created or modified.  Look at 'force create mode' in the
  smb.conf man page.
 
 I know force create mode, force directory mode parameters but how can I 
 force permission when one user launch chmod ?

I'm not sure what you are asking when you refer to 'launch chmod'.

If you mean 'change permissions from windows', then 'force create mode' 
should do what you want.

   force create mode (S)
  This  parameter  specifies  a  set of UNIX mode bit permissions that
  will always be set on a file created by Samba. This is done by  bit-
  wise  'OR'ing  these bits onto the mode bits of a file that is being
  created or having its permissions  changed.  The  default  for  this
  parameter is (in octal) 000. The modes in this parameter are bitwise
  'OR'ed onto the file mode after the mask  set  in  the  create  mask
  parameter is applied. 

Note the is being created *or having its permissions changed*...

If you mean 'actually running chmod on the server', then there is nothing
that Samba can do about that, as that is something that is occurring on the
server itself, below the level of Samba. 

What might work to allow full access to everythign in the share-- regardless of
permissions -- would be to assign 'admin users' to the share in question... but
read the warnings about this.


-- 
greg byshenk  -  [EMAIL PROTECTED]  -  Leiden, NL

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

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


Re: [Samba] Profile Location Best Practice

2007-10-15 Thread Adam Tauno Williams
 Eric Feldhusen, you've pretty much convinced me that best practice is 
 having profiles stored in one place, and home folders in another.  But 
 I'm still curious if you have also experienced these problems even with 
 such a configuration.  Either way, I think the merits of such a 
 configuration are clear; I just wonder if I can expect even these 
 problems to go away, or if I shouldn't get my hopes up quite that much.

Yes;  I've got about 200 users who sign on and off every day.  PDC is
Samba;  profiles in one share, home directory its own share.  No issues.
Has worked well for a very long time.
-- 
  Consonance: an Open Source .NET OpenGroupware client.
  http://code.google.com/p/consonance/ - Searching for a bored Cairo# hacker.
   Contact:[EMAIL PROTECTED]   http://www.opengroupware.org

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


Re: [Samba] Profile Location Best Practice

2007-10-15 Thread Charles Marcus
Eric Feldhusen, you've pretty much convinced me that best practice is 
having profiles stored in one place, and home folders in another.  
But I'm still curious if you have also experienced these problems 
even with such a configuration.  Either way, I think the merits of 
such a configuration are clear; I just wonder if I can expect even 
these problems to go away, or if I shouldn't get my hopes up quite 
that much. 


Well... I created a new directory structure:

home directory = \server\home\username (unchanged)
profile directory = \server\home\profiles\username (new)

I've already switched one user over who was having a weird problem with 
a printer not appearing on the receptionist computer (she covers for the 
receptionist when she goes to lunch, etc). That problem is now resolved, 
while nothing else I tried worked.


So, I'm hopeful that this will indeed fix these other mysterious 
problems. After some reading on  this, I'm embarrassed that I never 
encountered this 'best practice' knowledge before...


Many thanks to Eric for the whack upside the head...

--

Best regards,

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


Re: [Samba] Profile Location Best Practice

2007-10-15 Thread Steve Thompson

On Mon, 15 Oct 2007, Adam Tauno Williams wrote:


Yes;  I've got about 200 users who sign on and off every day.  PDC is
Samba;  profiles in one share, home directory its own share.  No issues.


Likewise.

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


Re: [Samba] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread Greg Byshenk
On Mon, Oct 15, 2007 at 07:25:08AM +, KLEIN St?phane wrote:
 Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a ??crit??:
  On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:

  I use samba to share some files between some clients. I would like than
  these files are always view with -rw-rw-rw- rights by all clients event
  if someone change file access permissions.
   
  Can I configure smb.conf to do that ?

  I don't think that you can force Samba to have them viewed that way,
  as the permissions in Samba are dependent upon the permissions on the
  files themselves (on the server).

  But you can force the permissions to be set in a given way by Samba when
  files are created or modified.  Look at 'force create mode' in the
  smb.conf man page.
 
 I know force create mode, force directory mode parameters but how can I 
 force permission when one user launch chmod ?

I'm not sure what you are asking when you refer to 'launch chmod'.

If you mean 'change permissions from windows', then 'force create mode' 
should do what you want.

   force create mode (S)
  This  parameter  specifies  a  set of UNIX mode bit permissions that
  will always be set on a file created by Samba. This is done by  bit-
  wise  'OR'ing  these bits onto the mode bits of a file that is being
  created or having its permissions  changed.  The  default  for  this
  parameter is (in octal) 000. The modes in this parameter are bitwise
  'OR'ed onto the file mode after the mask  set  in  the  create  mask
  parameter is applied. 

Note the is being created *or having its permissions changed*...

If you mean 'actually running chmod on the server', then there is nothing
that Samba can do about that, as that is something that is occurring on the
server itself, below the level of Samba. 

What might work to allow full access to everythign in the share-- regardless of
permissions -- would be to assign 'admin users' to the share in question... but
read the warnings about this.


-- 
greg byshenk  -  [EMAIL PROTECTED]  -  Leiden, NL

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

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

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


Re: [Samba] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread Greg Byshenk
On Mon, Oct 15, 2007 at 07:25:08AM +, KLEIN St?phane wrote:
 Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a ??crit??:
  On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:

  I use samba to share some files between some clients. I would like than
  these files are always view with -rw-rw-rw- rights by all clients event
  if someone change file access permissions.
   
  Can I configure smb.conf to do that ?

  I don't think that you can force Samba to have them viewed that way,
  as the permissions in Samba are dependent upon the permissions on the
  files themselves (on the server).

  But you can force the permissions to be set in a given way by Samba when
  files are created or modified.  Look at 'force create mode' in the
  smb.conf man page.
 
 I know force create mode, force directory mode parameters but how can I 
 force permission when one user launch chmod ?

I'm not sure what you are asking when you refer to 'launch chmod'.

If you mean 'change permissions from windows', then 'force create mode' 
should do what you want.

   force create mode (S)
  This  parameter  specifies  a  set of UNIX mode bit permissions that
  will always be set on a file created by Samba. This is done by  bit-
  wise  'OR'ing  these bits onto the mode bits of a file that is being
  created or having its permissions  changed.  The  default  for  this
  parameter is (in octal) 000. The modes in this parameter are bitwise
  'OR'ed onto the file mode after the mask  set  in  the  create  mask
  parameter is applied. 

Note the is being created *or having its permissions changed*...

If you mean 'actually running chmod on the server', then there is nothing
that Samba can do about that, as that is something that is occurring on the
server itself, below the level of Samba. 

What might work to allow full access to everythign in the share-- regardless of
permissions -- would be to assign 'admin users' to the share in question... but
read the warnings about this.


-- 
greg byshenk  -  [EMAIL PROTECTED]  -  Leiden, NL

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

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

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


Re: [Samba] Samba as PDC with XP Client - Logon requires reboot - Help Please

2007-10-15 Thread Gary Dale

Ron Segal wrote:

Hi, I'm running the latest version of Samba with a tdbsam backend,
configured not to use roaming profiles. Two different XP clients (SP2)
are joined to the domain ok but users can only logon by rebooting before
entering their logon details.  When users logoff and try to logon again
(or logon as a different user on the same machine) they get the standard
message 'windows cannot connect to the domain either because the domain
controller is down or because your computer account was not found.
Please try again later .. ' etc.  Have tried fiddling with registry
entries and permissions but can't get this problem to go away.  Any
ideas on this would be appreciated. Cheers.
  
Have you checked your netlogon and/or profiles Unix permissions? You 
generally need to set them very, very loose and let Samba handle the 
security.

--
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 - now with ldapsam extensions

2007-10-15 Thread Daniel L. Miller

John H Terpstra wrote:

On Thursday 11 October 2007 22:57, Daniel L. Miller wrote:
  

Are the IDEALX tools necessary for complete integration with LDAP?  Or
is the built-in support sufficiently advanced now?

Daniel


What does complete integration with LDAP mean to you?

You are not the first person to ask questions like these.  It would help me to 
write more useful documentation if I could better understand what is behind 
the questions.
  
Do the ldapsam:trusted: and ldapsam:editposix extensions provide - 
(pause whilst I search for the correct word) - equivalent 
functionality to the IDEALX tools?  Or are they solutions for different 
applications?  For typical applications, with a PDC, mixed Unix and 
Windows workstations, file and print sharing - are the extensions a 
simpler way to achieve the - (wait, need to substitute word again) - 
equivalent level of LDAP integration?


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


Re: [Samba] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread Greg Byshenk
On Mon, Oct 15, 2007 at 07:25:08AM +, KLEIN St?phane wrote:
 Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a ??crit??:
  On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:

  I use samba to share some files between some clients. I would like than
  these files are always view with -rw-rw-rw- rights by all clients event
  if someone change file access permissions.
   
  Can I configure smb.conf to do that ?

  I don't think that you can force Samba to have them viewed that way,
  as the permissions in Samba are dependent upon the permissions on the
  files themselves (on the server).

  But you can force the permissions to be set in a given way by Samba when
  files are created or modified.  Look at 'force create mode' in the
  smb.conf man page.
 
 I know force create mode, force directory mode parameters but how can I 
 force permission when one user launch chmod ?

I'm not sure what you are asking when you refer to 'launch chmod'.

If you mean 'change permissions from windows', then 'force create mode' 
should do what you want.

   force create mode (S)
  This  parameter  specifies  a  set of UNIX mode bit permissions that
  will always be set on a file created by Samba. This is done by  bit-
  wise  'OR'ing  these bits onto the mode bits of a file that is being
  created or having its permissions  changed.  The  default  for  this
  parameter is (in octal) 000. The modes in this parameter are bitwise
  'OR'ed onto the file mode after the mask  set  in  the  create  mask
  parameter is applied. 

Note the is being created *or having its permissions changed*...

If you mean 'actually running chmod on the server', then there is nothing
that Samba can do about that, as that is something that is occurring on the
server itself, below the level of Samba. 

What might work to allow full access to everythign in the share-- regardless of
permissions -- would be to assign 'admin users' to the share in question... but
read the warnings about this.


-- 
greg byshenk  -  [EMAIL PROTECTED]  -  Leiden, NL

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

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

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


Re: [Samba] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread Greg Byshenk
On Mon, Oct 15, 2007 at 07:25:08AM +, KLEIN St?phane wrote:
 Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a ??crit??:
  On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:

  I use samba to share some files between some clients. I would like than
  these files are always view with -rw-rw-rw- rights by all clients event
  if someone change file access permissions.
   
  Can I configure smb.conf to do that ?

  I don't think that you can force Samba to have them viewed that way,
  as the permissions in Samba are dependent upon the permissions on the
  files themselves (on the server).

  But you can force the permissions to be set in a given way by Samba when
  files are created or modified.  Look at 'force create mode' in the
  smb.conf man page.
 
 I know force create mode, force directory mode parameters but how can I 
 force permission when one user launch chmod ?

I'm not sure what you are asking when you refer to 'launch chmod'.

If you mean 'change permissions from windows', then 'force create mode' 
should do what you want.

   force create mode (S)
  This  parameter  specifies  a  set of UNIX mode bit permissions that
  will always be set on a file created by Samba. This is done by  bit-
  wise  'OR'ing  these bits onto the mode bits of a file that is being
  created or having its permissions  changed.  The  default  for  this
  parameter is (in octal) 000. The modes in this parameter are bitwise
  'OR'ed onto the file mode after the mask  set  in  the  create  mask
  parameter is applied. 

Note the is being created *or having its permissions changed*...

If you mean 'actually running chmod on the server', then there is nothing
that Samba can do about that, as that is something that is occurring on the
server itself, below the level of Samba. 

What might work to allow full access to everythign in the share-- regardless of
permissions -- would be to assign 'admin users' to the share in question... but
read the warnings about this.


-- 
greg byshenk  -  [EMAIL PROTECTED]  -  Leiden, NL

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

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

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


Re: [Samba] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread Greg Byshenk
On Mon, Oct 15, 2007 at 07:25:08AM +, KLEIN St?phane wrote:
 Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a ??crit??:
  On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:

  I use samba to share some files between some clients. I would like than
  these files are always view with -rw-rw-rw- rights by all clients event
  if someone change file access permissions.
   
  Can I configure smb.conf to do that ?

  I don't think that you can force Samba to have them viewed that way,
  as the permissions in Samba are dependent upon the permissions on the
  files themselves (on the server).

  But you can force the permissions to be set in a given way by Samba when
  files are created or modified.  Look at 'force create mode' in the
  smb.conf man page.
 
 I know force create mode, force directory mode parameters but how can I 
 force permission when one user launch chmod ?

I'm not sure what you are asking when you refer to 'launch chmod'.

If you mean 'change permissions from windows', then 'force create mode' 
should do what you want.

   force create mode (S)
  This  parameter  specifies  a  set of UNIX mode bit permissions that
  will always be set on a file created by Samba. This is done by  bit-
  wise  'OR'ing  these bits onto the mode bits of a file that is being
  created or having its permissions  changed.  The  default  for  this
  parameter is (in octal) 000. The modes in this parameter are bitwise
  'OR'ed onto the file mode after the mask  set  in  the  create  mask
  parameter is applied. 

Note the is being created *or having its permissions changed*...

If you mean 'actually running chmod on the server', then there is nothing
that Samba can do about that, as that is something that is occurring on the
server itself, below the level of Samba. 

What might work to allow full access to everythign in the share-- regardless of
permissions -- would be to assign 'admin users' to the share in question... but
read the warnings about this.


-- 
greg byshenk  -  [EMAIL PROTECTED]  -  Leiden, NL

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

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

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

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


Re: [Samba] Samba as PDC with XP Client - Logon requires reboot - Help Please

2007-10-15 Thread Edmundo Valle Neto

Ron Segal escreveu:

Hi, I'm running the latest version of Samba with a tdbsam backend,
configured not to use roaming profiles. Two different XP clients (SP2)
are joined to the domain ok but users can only logon by rebooting before
entering their logon details.  When users logoff and try to logon again
(or logon as a different user on the same machine) they get the standard
message 'windows cannot connect to the domain either because the domain
controller is down or because your computer account was not found.
Please try again later .. ' etc.  Have tried fiddling with registry
entries and permissions but can't get this problem to go away.  Any
ideas on this would be appreciated. Cheers.


Would help if you post your smb.conf and give a little more information 
about your network (if it is really only these 3 machines and you want 
the samba server be a PDC of a little domain), and about how did you 
joined the workstations.



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] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread Greg Byshenk
On Mon, Oct 15, 2007 at 07:25:08AM +, KLEIN St?phane wrote:
 Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a ??crit??:
  On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:

  I use samba to share some files between some clients. I would like than
  these files are always view with -rw-rw-rw- rights by all clients event
  if someone change file access permissions.
   
  Can I configure smb.conf to do that ?

  I don't think that you can force Samba to have them viewed that way,
  as the permissions in Samba are dependent upon the permissions on the
  files themselves (on the server).

  But you can force the permissions to be set in a given way by Samba when
  files are created or modified.  Look at 'force create mode' in the
  smb.conf man page.
 
 I know force create mode, force directory mode parameters but how can I 
 force permission when one user launch chmod ?

I'm not sure what you are asking when you refer to 'launch chmod'.

If you mean 'change permissions from windows', then 'force create mode' 
should do what you want.

   force create mode (S)
  This  parameter  specifies  a  set of UNIX mode bit permissions that
  will always be set on a file created by Samba. This is done by  bit-
  wise  'OR'ing  these bits onto the mode bits of a file that is being
  created or having its permissions  changed.  The  default  for  this
  parameter is (in octal) 000. The modes in this parameter are bitwise
  'OR'ed onto the file mode after the mask  set  in  the  create  mask
  parameter is applied. 

Note the is being created *or having its permissions changed*...

If you mean 'actually running chmod on the server', then there is nothing
that Samba can do about that, as that is something that is occurring on the
server itself, below the level of Samba. 

What might work to allow full access to everythign in the share-- regardless of
permissions -- would be to assign 'admin users' to the share in question... but
read the warnings about this.


-- 
greg byshenk  -  [EMAIL PROTECTED]  -  Leiden, NL

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

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

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

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


[Samba] Winbind and Samba - Renaming an Active Directory Domain

2007-10-15 Thread Thompson, Scott (WA)
 
Hi
Has anyone been thru the renaming of a domain (Win2k3) with a linux box
running Samba and Winbind?
Any info would be most appreciated


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


Re: [Samba] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread Greg Byshenk
On Mon, Oct 15, 2007 at 07:25:08AM +, KLEIN St?phane wrote:
 Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a ??crit??:
  On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:

  I use samba to share some files between some clients. I would like than
  these files are always view with -rw-rw-rw- rights by all clients event
  if someone change file access permissions.
   
  Can I configure smb.conf to do that ?

  I don't think that you can force Samba to have them viewed that way,
  as the permissions in Samba are dependent upon the permissions on the
  files themselves (on the server).

  But you can force the permissions to be set in a given way by Samba when
  files are created or modified.  Look at 'force create mode' in the
  smb.conf man page.
 
 I know force create mode, force directory mode parameters but how can I 
 force permission when one user launch chmod ?

I'm not sure what you are asking when you refer to 'launch chmod'.

If you mean 'change permissions from windows', then 'force create mode' 
should do what you want.

   force create mode (S)
  This  parameter  specifies  a  set of UNIX mode bit permissions that
  will always be set on a file created by Samba. This is done by  bit-
  wise  'OR'ing  these bits onto the mode bits of a file that is being
  created or having its permissions  changed.  The  default  for  this
  parameter is (in octal) 000. The modes in this parameter are bitwise
  'OR'ed onto the file mode after the mask  set  in  the  create  mask
  parameter is applied. 

Note the is being created *or having its permissions changed*...

If you mean 'actually running chmod on the server', then there is nothing
that Samba can do about that, as that is something that is occurring on the
server itself, below the level of Samba. 

What might work to allow full access to everythign in the share-- regardless of
permissions -- would be to assign 'admin users' to the share in question... but
read the warnings about this.


-- 
greg byshenk  -  [EMAIL PROTECTED]  -  Leiden, NL

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

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

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

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


Re: [Samba] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread Greg Byshenk
On Mon, Oct 15, 2007 at 07:25:08AM +, KLEIN St?phane wrote:
 Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a ??crit??:
  On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:

  I use samba to share some files between some clients. I would like than
  these files are always view with -rw-rw-rw- rights by all clients event
  if someone change file access permissions.
   
  Can I configure smb.conf to do that ?

  I don't think that you can force Samba to have them viewed that way,
  as the permissions in Samba are dependent upon the permissions on the
  files themselves (on the server).

  But you can force the permissions to be set in a given way by Samba when
  files are created or modified.  Look at 'force create mode' in the
  smb.conf man page.
 
 I know force create mode, force directory mode parameters but how can I 
 force permission when one user launch chmod ?

I'm not sure what you are asking when you refer to 'launch chmod'.

If you mean 'change permissions from windows', then 'force create mode' 
should do what you want.

   force create mode (S)
  This  parameter  specifies  a  set of UNIX mode bit permissions that
  will always be set on a file created by Samba. This is done by  bit-
  wise  'OR'ing  these bits onto the mode bits of a file that is being
  created or having its permissions  changed.  The  default  for  this
  parameter is (in octal) 000. The modes in this parameter are bitwise
  'OR'ed onto the file mode after the mask  set  in  the  create  mask
  parameter is applied. 

Note the is being created *or having its permissions changed*...

If you mean 'actually running chmod on the server', then there is nothing
that Samba can do about that, as that is something that is occurring on the
server itself, below the level of Samba. 

What might work to allow full access to everythign in the share-- regardless of
permissions -- would be to assign 'admin users' to the share in question... but
read the warnings about this.


-- 
greg byshenk  -  [EMAIL PROTECTED]  -  Leiden, NL

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

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

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

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


[Samba] Problem with Net join

2007-10-15 Thread Ramadevu, Ramkumar
Team,

 

Can any one help me on the below?

 

 

[global]
   domain master = no
   local master = no
   preferred master = no

   workgroup = TOKYO
   client code page = 932
   codingsystem = EUC
   encrypt passwords = yes
   socket options = SO_REUSEADDR SO_KEEPALIVE TCP_NODELAY
   security = domain
   password server = Server1,Serve2,Server3
   server string =
   wins proxy = no
   wins support = no
   preferred master = no
   browse list = no
   public = no
   status = yes
   hide dot files = no
   mangled names = yes
   case sensitive = yes
   postscript = true
   browseable = yes
   log level = 1
   debug level = 1
   password level = 0
   mangled stack = 1
   log file = /var/opt/samba/log.%m
   lock directory = /var/opt/samba/locks
   auto services = homes
   username map = /etc/opt/samba/users.map
   client ntlmv2 auth = yes
   client lanman auth = no
   client plaintext auth = no
   lanman auth = no

 
 

===

 

bash-2.01# /etc/init.d/samba stop


bash-2.01# /opt/samba/bin/net join -S Server1 -s /etc/opt/samba/smb.conf
-Uuser1
[2007/09/05 19:53:12, 0] param/loadparm.c:(2762)
  Unknown parameter encountered: client code page
[2007/09/05 19:53:12, 0] param/loadparm.c:(3496)
  Ignoring unknown parameter client code page
[2007/09/05 19:53:12, 0] param/loadparm.c:(2762)
  Unknown parameter encountered: codingsystem
[2007/09/05 19:53:12, 0] param/loadparm.c:(3496)
  Ignoring unknown parameter codingsystem
[2007/09/05 19:53:12, 0] param/loadparm.c:(2762)
  Unknown parameter encountered: status
[2007/09/05 19:53:12, 0] param/loadparm.c:(3496)
  Ignoring unknown parameter status
[2007/09/05 19:53:12, 0] param/loadparm.c:(2762)
  Unknown parameter encountered: postscript
[2007/09/05 19:53:12, 0] param/loadparm.c:(3496)
  Ignoring unknown parameter postscript
[2007/09/05 19:53:12, 0] param/loadparm.c:(2762)
  Unknown parameter encountered: mangled stack
[2007/09/05 19:53:12, 0] param/loadparm.c:(3496)
  Ignoring unknown parameter mangled stack
Password:
Could not connect to server Server1
The username or password was not correct.
Connection failed: NT_STATUS_LOGON_FAILURE
 

 

 

And the error log having following errors

 

 

2007/09/05 19:51:26, 0] rpc_client/cli_pipe.c:(2679)

  cli_rpc_pipe_open_schannel: failed to get schannel session key from
server Server1 for domain TOKYO.

[2007/09/05 19:51:26, 0] auth/auth_domain.c:(119)

  connect_to_domain_password_server: unable to open the domain client
session to machine Server1. Error was : NT_STATUS_ACCESS_DENIED.

[2007/09/05 19:51:26, 0] auth/auth_domain.c:(217)

 

==

 

Samba version : VERSION:  3.0.23_A0

 

Regards

Ram.

 

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


Re: [Samba] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread Greg Byshenk
On Mon, Oct 15, 2007 at 07:25:08AM +, KLEIN St?phane wrote:
 Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a ??crit??:
  On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:

  I use samba to share some files between some clients. I would like than
  these files are always view with -rw-rw-rw- rights by all clients event
  if someone change file access permissions.
   
  Can I configure smb.conf to do that ?

  I don't think that you can force Samba to have them viewed that way,
  as the permissions in Samba are dependent upon the permissions on the
  files themselves (on the server).

  But you can force the permissions to be set in a given way by Samba when
  files are created or modified.  Look at 'force create mode' in the
  smb.conf man page.
 
 I know force create mode, force directory mode parameters but how can I 
 force permission when one user launch chmod ?

I'm not sure what you are asking when you refer to 'launch chmod'.

If you mean 'change permissions from windows', then 'force create mode' 
should do what you want.

   force create mode (S)
  This  parameter  specifies  a  set of UNIX mode bit permissions that
  will always be set on a file created by Samba. This is done by  bit-
  wise  'OR'ing  these bits onto the mode bits of a file that is being
  created or having its permissions  changed.  The  default  for  this
  parameter is (in octal) 000. The modes in this parameter are bitwise
  'OR'ed onto the file mode after the mask  set  in  the  create  mask
  parameter is applied. 

Note the is being created *or having its permissions changed*...

If you mean 'actually running chmod on the server', then there is nothing
that Samba can do about that, as that is something that is occurring on the
server itself, below the level of Samba. 

What might work to allow full access to everythign in the share-- regardless of
permissions -- would be to assign 'admin users' to the share in question... but
read the warnings about this.


-- 
greg byshenk  -  [EMAIL PROTECTED]  -  Leiden, NL

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

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

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

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

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


[Samba] samba PDC and lan printer

2007-10-15 Thread satish patel
Dear all
   
I have configured samba with print services and my printer is 
LAN printer Ethernet jack and my PDC on another subnet so is it possible share 
printer from other subnet ??
   
   
  Regards
   
  satish patel


$ cat ~/satish/url.txt  

http://www.linuxbug.org
_

   
-
 Travelling to a new city? Search for ATMs in that city. Click here.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Re: can I configure smb.conf to always publish share files with -rw-rw-rw- permission ?

2007-10-15 Thread Greg Byshenk
On Mon, Oct 15, 2007 at 07:25:08AM +, KLEIN St?phane wrote:
 Le Mon, 15 Oct 2007 00:03:25 +0200, Greg Byshenk a ??crit??:
  On Sun, Oct 14, 2007 at 09:30:19PM +, KLEIN Stephane wrote:

  I use samba to share some files between some clients. I would like than
  these files are always view with -rw-rw-rw- rights by all clients event
  if someone change file access permissions.
   
  Can I configure smb.conf to do that ?

  I don't think that you can force Samba to have them viewed that way,
  as the permissions in Samba are dependent upon the permissions on the
  files themselves (on the server).

  But you can force the permissions to be set in a given way by Samba when
  files are created or modified.  Look at 'force create mode' in the
  smb.conf man page.
 
 I know force create mode, force directory mode parameters but how can I 
 force permission when one user launch chmod ?

I'm not sure what you are asking when you refer to 'launch chmod'.

If you mean 'change permissions from windows', then 'force create mode' 
should do what you want.

   force create mode (S)
  This  parameter  specifies  a  set of UNIX mode bit permissions that
  will always be set on a file created by Samba. This is done by  bit-
  wise  'OR'ing  these bits onto the mode bits of a file that is being
  created or having its permissions  changed.  The  default  for  this
  parameter is (in octal) 000. The modes in this parameter are bitwise
  'OR'ed onto the file mode after the mask  set  in  the  create  mask
  parameter is applied. 

Note the is being created *or having its permissions changed*...

If you mean 'actually running chmod on the server', then there is nothing
that Samba can do about that, as that is something that is occurring on the
server itself, below the level of Samba. 

What might work to allow full access to everythign in the share-- regardless of
permissions -- would be to assign 'admin users' to the share in question... but
read the warnings about this.


-- 
greg byshenk  -  [EMAIL PROTECTED]  -  Leiden, NL

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

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

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

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

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


RE: [Samba] How to make Add permission for folder in system with ntacl support?

2007-10-15 Thread Necos Secon

Yes, it is possible to do this in Samba with Linux ACL support.

You have to look at setfacl. There are two types of permissions that you can 
set using setfacl. The first are permissions on the directory or file itself. 
For example, this sets the group ntadmins to read/write/execute on the 
directory /home/ntadmins:

setfacl -m g:ntadmins:rwx -R /home/ntadmins

Now, the second type of permissions apply to any file (or directory) that is 
created in /home/ntadmins:

setfacl -m d:g:ntusers:--- -R /home/ntadmins

The effect of the second setfacl command says that the group ntusers will be 
explicitly given no access to any file or directory created in /home/ntadmins.

So, if you're trying to create a dropbox for a group staff, it would look 
something like this:

setfacl -m g:staff:rwx -R /home/dropbox
setfacl -m d:g:staff:--- -R /home/dropbox

What this does is allow them to add files to the directory, but immediately 
strip their permissions once the file is uploaded. Try this out. I hope it does 
what you want.

 From: [EMAIL PROTECTED]
 To: samba@lists.samba.org
 Subject: Fw: [Samba] How to make Add permission for folder in system with   
 ntacl support?
 Date: Sun, 14 Oct 2007 22:49:34 +0300
 
 Is it too simple and therefore noone will answer? :) Or it is not possible 
 with Samba on Linux?
 
 Thanks,
 G.
 
 
 
 - Original Message - 
 From: Georgy Goshin [EMAIL PROTECTED]
 To: samba@lists.samba.org
 Sent: Thursday, October 11, 2007 6:34 PM
 Subject: [Samba] How to make Add permission for folder in system with 
 ntacl support?
 
 
  Hi,
 
  On windows nt is possible to configure permission when users can add files 
  to share or folder but can't read and even list files in this share or 
  filder. Is it possible to make this with samba fileserver?
 
 
  Thanks,
  G.
  -- 
  To unsubscribe from this list go to the following URL and read the
  instructions:  https://lists.samba.org/mailman/listinfo/samba
  
 
 -- 
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/listinfo/samba

_
Climb to the top of the charts!  Play Star Shuffle:  the word scramble 
challenge with star power.
http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_oct--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Rev 651: sync flags between nodes in monitor loop in recmaster in http://samba.org/~tridge/ctdb

2007-10-15 Thread tridge

revno: 651
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Mon 2007-10-15 14:28:51 +1000
message:
  sync flags between nodes in monitor loop in recmaster
modified:
  server/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1
=== modified file 'server/ctdb_recoverd.c'
--- a/server/ctdb_recoverd.c2007-10-15 04:17:49 +
+++ b/server/ctdb_recoverd.c2007-10-15 04:28:51 +
@@ -713,6 +713,50 @@
}
 }
 
+
+/*
+  update our local flags from all remote connected nodes. 
+ */
+static int update_local_flags(struct ctdb_context *ctdb, struct ctdb_node_map 
*nodemap)
+{
+   int j;
+   TALLOC_CTX *mem_ctx = talloc_new(ctdb);
+
+   /* get the nodemap for all active remote nodes and verify
+  they are the same as for this node
+*/
+   for (j=0; jnodemap-num; j++) {
+   struct ctdb_node_map *remote_nodemap=NULL;
+   int ret;
+
+   if (nodemap-nodes[j].flags  NODE_FLAGS_DISCONNECTED) {
+   continue;
+   }
+   if (nodemap-nodes[j].pnn == ctdb-pnn) {
+   continue;
+   }
+
+   ret = ctdb_ctrl_getnodemap(ctdb, CONTROL_TIMEOUT(), 
nodemap-nodes[j].pnn, 
+  mem_ctx, remote_nodemap);
+   if (ret != 0) {
+   DEBUG(0, (__location__  Unable to get nodemap from 
remote node %u\n, 
+ nodemap-nodes[j].pnn));
+   talloc_free(mem_ctx);
+   return -1;
+   }
+   if (nodemap-nodes[j].flags != remote_nodemap-nodes[j].flags) {
+   DEBUG(0,(Remote node %u had flags 0x%x, local had 0x%x 
- updating local\n,
+nodemap-nodes[j].pnn, nodemap-nodes[j].flags,
+remote_nodemap-nodes[j].flags));
+   nodemap-nodes[j].flags = 
remote_nodemap-nodes[j].flags;
+   }
+   talloc_free(remote_nodemap);
+   }
+   talloc_free(mem_ctx);
+   return 0;
+}
+
+
 /* Create a new random generation ip. 
The generation id can not be the INVALID_GENERATION id
 */
@@ -1650,34 +1694,11 @@
}
 
 
-   /* we are recovery master, go through the list of all connected nodes
-  and get the nodeflags from them and update our copy of nodeflags
-*/
-   for (j=0; jnodemap-num; j++) {
-   if (nodemap-nodes[j].flags  NODE_FLAGS_DISCONNECTED) {
-   continue;
-   }
-   if (nodemap-nodes[j].pnn == pnn) {
-   continue;
-   }
-
-   ret = ctdb_ctrl_getnodemap(ctdb, CONTROL_TIMEOUT(), 
nodemap-nodes[j].pnn, 
-  mem_ctx, remote_nodemap);
-   if (ret != 0) {
-   DEBUG(0, (__location__  Unable to get nodemap from 
remote node %u\n, 
- nodemap-nodes[j].pnn));
-   goto again;
-   }
-
-   /* update our nodemap flags according to the other
-  server - this gets the NODE_FLAGS_DISABLED
-  flag. Note that the remote node is authoritative
-  for its flags (except CONNECTED, which we know
-  matches in this code) */
-   if (nodemap-nodes[j].flags != remote_nodemap-nodes[j].flags) {
-   nodemap-nodes[j].flags = 
remote_nodemap-nodes[j].flags;
-   rec-need_takeover_run = true;
-   }
+   /* ensure our local copies of flags are right */
+   ret = update_local_flags(ctdb, nodemap);
+   if (ret != 0) {
+   DEBUG(0,(Unable to update local flags\n));
+   goto again;
}
 
/* update the list of public ips that a node can handle for



Rev 654: only link to -lipq if needed in http://samba.org/~tridge/ctdb

2007-10-15 Thread tridge

revno: 654
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Mon 2007-10-15 14:44:06 +1000
message:
  only link to -lipq if needed
modified:
  Makefile.inmakefile.in-20061117234101-o3qt14umlg9en8z0-1
  configure.ac   configure.ac-20061117234101-o3qt14umlg9en8z0-10
=== modified file 'Makefile.in'
--- a/Makefile.in   2007-10-15 04:37:54 +
+++ b/Makefile.in   2007-10-15 04:44:06 +
@@ -23,6 +23,8 @@
 POPT_CFLAGS = @POPT_CFLAGS@
 POPT_OBJ = @POPT_OBJ@
 
+IPQ_LIBS = @IPQ_LIBS@
+
 CFLAGS=-g -I$(srcdir)/include -Iinclude -Ilib -Ilib/util -I$(srcdir) \
[EMAIL PROTECTED]@ [EMAIL PROTECTED]@/include [EMAIL PROTECTED]@ \
-DVARDIR=\$(localstatedir)\ -DETCDIR=\$(etcdir)\ \
@@ -86,7 +88,7 @@
 
 bin/ctdb_ipmux: $(CTDB_CLIENT_OBJ) utils/ipmux/ipmux.o 
@echo Linking $@
-   @$(CC) $(CFLAGS) -o $@ utils/ipmux/ipmux.o $(CTDB_CLIENT_OBJ) 
$(LIB_FLAGS) -lipq
+   @$(CC) $(CFLAGS) -o $@ utils/ipmux/ipmux.o $(CTDB_CLIENT_OBJ) 
$(LIB_FLAGS) $(IPQ_LIBS)
 
 bin/ctdb: $(CTDB_CLIENT_OBJ) tools/ctdb.o 
@echo Linking $@

=== modified file 'configure.ac'
--- a/configure.ac  2007-10-15 04:37:54 +
+++ b/configure.ac  2007-10-15 04:44:06 +
@@ -49,6 +49,12 @@
 
 AC_CHECK_HEADERS(libipq.h linux/netfilter.h)
 
+IPQ_LIBS=
+if test x$ac_cv_header_libipq_h = xyes; then
+   IPQ_LIBS=-lipq
+fi
+AC_SUBST(IPQ_LIBS)
+
 AC_CHECK_HEADERS(sched.h)
 AC_CHECK_FUNCS(sched_setscheduler)
 



Rev 652: disable ipmux code until we have a configure test in http://samba.org/~tridge/ctdb

2007-10-15 Thread tridge

revno: 652
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Mon 2007-10-15 14:29:47 +1000
message:
  disable ipmux code until we have a configure test
modified:
  Makefile.inmakefile.in-20061117234101-o3qt14umlg9en8z0-1
=== modified file 'Makefile.in'
--- a/Makefile.in   2007-10-08 04:05:22 +
+++ b/Makefile.in   2007-10-15 04:29:47 +
@@ -54,7 +54,7 @@
 TEST_BINS=bin/ctdb_bench bin/ctdb_fetch bin/ctdb_store bin/ctdb_persistent 
bin/rb_test \
@INFINIBAND_BINS@
 
-BINS = bin/ctdb @CTDB_SCSI_IO@ @CTDB_IPMUX@ bin/smnotify
+BINS = bin/ctdb @CTDB_SCSI_IO@ bin/smnotify
 SBINS = bin/ctdbd
 
 DIRS = lib bin



Rev 653: improved handling of systems without libipq.h in http://samba.org/~tridge/ctdb

2007-10-15 Thread tridge

revno: 653
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Mon 2007-10-15 14:37:54 +1000
message:
  improved handling of systems without libipq.h
modified:
  Makefile.inmakefile.in-20061117234101-o3qt14umlg9en8z0-1
  configure.ac   configure.ac-20061117234101-o3qt14umlg9en8z0-10
  utils/ipmux/ipmux.cipmux.c-20071008000130-dli3s00uaraama1y-2
=== modified file 'Makefile.in'
--- a/Makefile.in   2007-10-15 04:29:47 +
+++ b/Makefile.in   2007-10-15 04:37:54 +
@@ -54,7 +54,7 @@
 TEST_BINS=bin/ctdb_bench bin/ctdb_fetch bin/ctdb_store bin/ctdb_persistent 
bin/rb_test \
@INFINIBAND_BINS@
 
-BINS = bin/ctdb @CTDB_SCSI_IO@ bin/smnotify
+BINS = bin/ctdb @CTDB_SCSI_IO@ bin/ctdb_ipmux bin/smnotify
 SBINS = bin/ctdbd
 
 DIRS = lib bin

=== modified file 'configure.ac'
--- a/configure.ac  2007-10-08 04:05:22 +
+++ b/configure.ac  2007-10-15 04:37:54 +
@@ -18,13 +18,11 @@
   Linux*)
 CTDB_SYSTEM_OBJ=common/system_linux.o
 CTDB_SCSI_IO=bin/scsi_io
-CTDB_IPMUX=bin/ctdb_ipmux
 CTDB_PCAP_LDFLAGS=
 ;;
   AIX*)
 CTDB_SYSTEM_OBJ=common/system_aix.o
 CTDB_SCSI_IO=
-CTDB_IPMUX=
 CTDB_PCAP_LDFLAGS=-lpcap
 ;;
   *)
@@ -49,6 +47,8 @@
 m4_include(libevents.m4)
 m4_include(ib/config.m4)
 
+AC_CHECK_HEADERS(libipq.h linux/netfilter.h)
+
 AC_CHECK_HEADERS(sched.h)
 AC_CHECK_FUNCS(sched_setscheduler)
 
@@ -65,7 +65,6 @@
 AC_SUBST(EXTRA_OBJ)
 AC_SUBST(CTDB_SYSTEM_OBJ)
 AC_SUBST(CTDB_SCSI_IO)
-AC_SUBST(CTDB_IPMUX)
 AC_SUBST(CTDB_PCAP_LDFLAGS)
 
 AC_OUTPUT(Makefile)

=== modified file 'utils/ipmux/ipmux.c'
--- a/utils/ipmux/ipmux.c   2007-10-08 04:05:22 +
+++ b/utils/ipmux/ipmux.c   2007-10-15 04:37:54 +
@@ -25,6 +25,8 @@
 #include cmdline.h
 #include ctdb.h
 #include ctdb_private.h
+
+#if defined(HAVE_LINUX_NETFILTER_H)  defined(HAVE_LIBIPQ_H)
 #include linux/netfilter.h
 #include libipq.h
 
@@ -227,3 +229,11 @@
 
return 0;
 }
+
+#else
+int main(void)
+{
+   printf(ipmux tool disabled - lacking netfilter and libipq development 
libs\n);
+   return 1;
+}
+#endif



Rev 650: merge from ronnie in http://samba.org/~tridge/ctdb

2007-10-15 Thread tridge

revno: 650
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Mon 2007-10-15 14:17:49 +1000
message:
  merge from ronnie
added:
  config/events.d/90.ipmux   90.ipmux-20071008021847-vxcv0xkqd7kbgsez-1
  utils/ipmux/   ipmux-20071008000130-dli3s00uaraama1y-1
  utils/ipmux/ipmux.cipmux.c-20071008000130-dli3s00uaraama1y-2
modified:
  Makefile.inmakefile.in-20061117234101-o3qt14umlg9en8z0-1
  client/ctdb_client.c   ctdb_client.c-20070411010216-3kd8v37k61steeya-1
  config/ctdb.init   ctdb.init-20070527204758-biuh7znabuwan3zn-6
  config/ctdb.sysconfig  
ctdb.sysconfig-20070527204758-biuh7znabuwan3zn-7
  config/events.d/10.interface   10.interface-20070604050809-s21zslfirn07zjt8-1
  config/functions   functions-20070601105405-gajwirydr5a9zd6x-1
  configure.ac   configure.ac-20061117234101-o3qt14umlg9en8z0-10
  include/ctdb.h ctdb.h-20061117234101-o3qt14umlg9en8z0-11
  include/ctdb_private.h 
ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
  packaging/RPM/ctdb.specctdb.spec-20070527204758-biuh7znabuwan3zn-3
  server/ctdb_control.c  
ctdb_control.c-20070426122724-j6gkpiofhbwdin63-1
  server/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1
  server/ctdb_takeover.c 
ctdb_takeover.c-20070525071636-a5n1ihghjtppy08r-2
  server/ctdbd.c ctdbd.c-20070411085044-dqmhr6mfeexnyt4m-1
  tools/ctdb.c   
ctdb_control.c-20070426122705-9ehj1l5lu2gn9kuj-1

revno: 432.1.312
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Thu 2007-10-11 07:51:57 +1000
message:
  use $CTDB_BASE in 90.ipmux instead of hardcoding it to /etc/ctdb
modified:
  config/events.d/90.ipmux   90.ipmux-20071008021847-vxcv0xkqd7kbgsez-1

revno: 432.1.311
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Thu 2007-10-11 07:30:10 +1000
message:
  use kill_tcp_connections() to kill off all tcp connections to the 
  single public ip address when we do a recovery
modified:
  config/events.d/90.ipmux   90.ipmux-20071008021847-vxcv0xkqd7kbgsez-1

revno: 432.1.310
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Thu 2007-10-11 07:27:38 +1000
message:
  move the kill_tcp_connections() function from 10.interfaces to functions
modified:
  config/events.d/10.interface   
10.interface-20070604050809-s21zslfirn07zjt8-1
  config/functions   functions-20070601105405-gajwirydr5a9zd6x-1

revno: 432.1.309
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Thu 2007-10-11 07:10:17 +1000
message:
  first check that recovery master is connected (we know this from our own 
  flags)
  
  then pull the flags off recovery master before checking if it is banned
modified:
  server/ctdb_recoverd.c 
recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1

revno: 432.1.308
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Thu 2007-10-11 06:16:36 +1000
message:
  simplify election handling
  
  
  make sure we read and update the flags from all remote nodes before we 
  reach the first codepath that can call do_recovery()
  since during do_recovery() we need to know what the flags are.
modified:
  server/ctdb_recoverd.c 
recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1

revno: 432.1.307
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Wed 2007-10-10 10:49:55 +1000
message:
  merge from tridge
modified:
  server/ctdb_server.c   ctdb.c-20061127094323-t50f58d65iaao5of-2

revno: 432.1.306
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie 

Rev 649: disable optimisation for now, until we find a occasional segv in http://samba.org/~tridge/ctdb

2007-10-15 Thread tridge

revno: 649
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Mon 2007-10-15 13:31:09 +1000
message:
  disable optimisation for now, until we find a occasional segv
modified:
  packaging/RPM/ctdb.specctdb.spec-20070527204758-biuh7znabuwan3zn-3
=== modified file 'packaging/RPM/ctdb.spec'
--- a/packaging/RPM/ctdb.spec   2007-09-24 05:27:01 +
+++ b/packaging/RPM/ctdb.spec   2007-10-15 03:31:09 +
@@ -39,7 +39,7 @@
 ## always run autogen.sh
 ./autogen.sh
 
-CFLAGS=$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE ./configure \
+CFLAGS=$RPM_OPT_FLAGS $EXTRA -O0 -D_GNU_SOURCE ./configure \
--prefix=%{_prefix} \
--sysconfdir=%{_sysconfdir} \
--mandir=%{_mandir} \



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

2007-10-15 Thread kai
Author: kai
Date: 2007-10-15 08:35:24 + (Mon, 15 Oct 2007)
New Revision: 25642

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

Log:
Fix a small typo.

Modified:
   branches/SAMBA_4_0/source/torture/rpc/spoolss.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/spoolss.c
===
--- branches/SAMBA_4_0/source/torture/rpc/spoolss.c 2007-10-14 23:10:39 UTC 
(rev 25641)
+++ branches/SAMBA_4_0/source/torture/rpc/spoolss.c 2007-10-15 08:35:24 UTC 
(rev 25642)
@@ -1367,7 +1367,7 @@
torture_comment(tctx, Testing OpenPrinterEx(%s) with bad name\n, 
opEx.in.printername);
 
status = dcerpc_spoolss_OpenPrinterEx(p, tctx, opEx);
-   torture_assert_ntstatus_ok(tctx, status, OpenPrinter failed);
+   torture_assert_ntstatus_ok(tctx, status, OpenPrinterEx failed);
if (!W_ERROR_EQUAL(WERR_INVALID_PRINTER_NAME,opEx.out.result)) {
torture_comment(tctx, OpenPrinterEx(%s) unexpected result[%s] 
should be WERR_INVALID_PRINTER_NAME\n,
name, win_errstr(opEx.out.result));



[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-41-g29eb4d0

2007-10-15 Thread Volker Lendecke
The branch, v3-2-test has been updated
   via  29eb4d0e2d8ce4a0bd2a081265417684c8c69d6d (commit)
  from  add1294562b76c38d5e471f280ca1167b4d8a93d (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit 29eb4d0e2d8ce4a0bd2a081265417684c8c69d6d
Author: Günter Kukkukk [EMAIL PROTECTED]
Date:   Mon Oct 15 01:16:01 2007 +0200

Latest ipv6 changes broke (deprecated) smbmount, smbmnt and smbctool

In addition some cleanup has been done to avoid compiler warnings.

---

Summary of changes:
 source/client/smbctool.c |4 ++--
 source/client/smbmnt.c   |6 +++---
 source/client/smbmount.c |   10 +-
 3 files changed, 10 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/smbctool.c b/source/client/smbctool.c
index 28122d8..4390ee3 100644
--- a/source/client/smbctool.c
+++ b/source/client/smbctool.c
@@ -3485,7 +3485,7 @@ static int do_message_op(void)
snprintf(name_type_hex, sizeof(name_type_hex), #%X, name_type);
fstrcat(server_name, name_type_hex);
 
-   zero_ip(ip);
+   zero_ip_v4(ip);
if (have_ip) 
ip = dest_ip;
 
@@ -3596,7 +3596,7 @@ static int do_message_op(void)
case 'I':
{
dest_ip = *interpret_addr2(poptGetOptArg(pc));
-   if (is_zero_ip(dest_ip))
+   if (is_zero_ip_v4(dest_ip))
exit(1);
have_ip = True;
 
diff --git a/source/client/smbmnt.c b/source/client/smbmnt.c
index c9759f4..08dcac8 100644
--- a/source/client/smbmnt.c
+++ b/source/client/smbmnt.c
@@ -272,10 +272,10 @@ do_mount(char *share_name, unsigned int flags, struct 
smb_mount_data *data)
return -1;
}
 
-ment.mnt_fsname = share_name ? share_name : none;
+ment.mnt_fsname = share_name ? share_name : (char *)none;
 ment.mnt_dir = mount_point;
-ment.mnt_type = smbfs;
-ment.mnt_opts = ;
+ment.mnt_type = (char *)smbfs;
+ment.mnt_opts = (char *);
 ment.mnt_freq = 0;
 ment.mnt_passno= 0;
 
diff --git a/source/client/smbmount.c b/source/client/smbmount.c
index b68dbfe..d2a4b9a 100644
--- a/source/client/smbmount.c
+++ b/source/client/smbmount.c
@@ -146,7 +146,7 @@ static struct cli_state *do_connection(char *the_service)
make_nmb_name(called , server, 0x20);
 
  again:
-zero_ip(ip);
+zero_ip_v4(ip);
if (have_ip) ip = dest_ip;
 
/* have to open a new connection */
@@ -435,7 +435,7 @@ static void init_mount(void)
pstring tmp;
pstring svc2;
struct cli_state *c;
-   char *args[20];
+   const char *args[20];
int i, status;
 
if (realpath(mpoint, mount_point) == NULL) {
@@ -503,12 +503,12 @@ static void init_mount(void)
asprintf(smbmnt_path, %s/smbmnt, dyn_BINDIR);

if (file_exist(smbmnt_path, NULL)) {
-   execv(smbmnt_path, args);
+   execv(smbmnt_path, (char * const *)args);
fprintf(stderr,
smbfs/init_mount: execv of %s failed. Error 
was %s.,
smbmnt_path, strerror(errno));
} else {
-   execvp(smbmnt, args);
+   execvp(smbmnt, (char * const *)args);
fprintf(stderr,
smbfs/init_mount: execv of %s failed. Error 
was %s.,
smbmnt, strerror(errno));
@@ -799,7 +799,7 @@ static void parse_mount_smb(int argc, char **argv)
DEBUGLEVEL = val;
} else if(!strcmp(opts, ip)) {
dest_ip = *interpret_addr2(opteq+1);
-   if (is_zero_ip(dest_ip)) {
+   if (is_zero_ip_v4(dest_ip)) {
fprintf(stderr,Can't resolve address 
%s\n, opteq+1);
exit(1);
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-43-g0177158

2007-10-15 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  0177158d85797e0d22c81d88175a77d4ad5ed711 (commit)
   via  ec8e3f7f92522c65ec472058321db8a7ac30ec4c (commit)
  from  29eb4d0e2d8ce4a0bd2a081265417684c8c69d6d (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit 0177158d85797e0d22c81d88175a77d4ad5ed711
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Mon Oct 15 10:59:50 2007 +0200

missing stuff from samba4's libreplace

metze

commit ec8e3f7f92522c65ec472058321db8a7ac30ec4c
Author: metze [EMAIL PROTECTED]
Date:   Wed Oct 10 12:09:06 2007 +

don't imply system/network.h within replace.h,
as this brings in the socket_wrapper.h in unexpected
code and we endup with a missing 'swrap_close' while linking

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/[EMAIL 
PROTECTED] 0c0555d6-39d7-0310-84fc-f1cc0bd64818

---

Summary of changes:
 source/lib/replace/replace.h|   11 +++
 source/lib/replace/system/network.h |   16 +++-
 2 files changed, 22 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/replace/replace.h b/source/lib/replace/replace.h
index 3dc10db..e42d5ff 100644
--- a/source/lib/replace/replace.h
+++ b/source/lib/replace/replace.h
@@ -97,7 +97,6 @@ void *rep_memmove(void *dest,const void *src,int size);
 #endif
 
 #ifndef HAVE_TIMEGM
-struct tm;
 #define timegm rep_timegm
 /* prototype is in system/time.h */
 #endif
@@ -326,15 +325,19 @@ ssize_t rep_pread(int __fd, void *__buf, size_t __nbytes, 
off_t __offset);
 ssize_t rep_pwrite(int __fd, const void *__buf, size_t __nbytes, off_t 
__offset);
 #endif
 
+#ifdef REPLACE_INET_NTOA
+#define inet_ntoa rep_inet_ntoa
+/* prototype is in system/network.h */
+#endif
+
 #ifndef HAVE_INET_PTON
-int rep_inet_pton(int af, const char *src, void *dst);
 #define inet_pton rep_inet_pton
+/* prototype is in system/network.h */
 #endif
 
 #ifndef HAVE_INET_NTOP
-#include system/network.h
-const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size);
 #define inet_ntop rep_inet_ntop
+/* prototype is in system/network.h */
 #endif
 
 #ifdef HAVE_LIMITS_H
diff --git a/source/lib/replace/system/network.h 
b/source/lib/replace/system/network.h
index c2a5dec..0b0dbcb 100644
--- a/source/lib/replace/system/network.h
+++ b/source/lib/replace/system/network.h
@@ -49,6 +49,10 @@
 #include netinet/tcp.h
 #endif
 
+#if !defined(HAVE_GETADDRINFO)
+#include getaddrinfo.h
+#endif
+
 /*
  * The next three defines are needed to access the IPTOS_* options
  * on some systems.
@@ -86,8 +90,18 @@
 #endif
 
 #ifdef REPLACE_INET_NTOA
+/* define is in replace.h */
 char *rep_inet_ntoa(struct in_addr ip);
-#define inet_ntoa rep_inet_ntoa
+#endif
+
+#ifndef HAVE_INET_PTON
+/* define is in replace.h */
+int rep_inet_pton(int af, const char *src, void *dst);
+#endif
+
+#ifndef HAVE_INET_NTOP
+/* define is in replace.h */
+const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size);
 #endif
 
 /*


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-49-gf4c0961

2007-10-15 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  f4c0961a16a84dcdfe6e2faafb75c76983e6d466 (commit)
   via  33ee0cfb190a883229d0824d7194898fd8966ceb (commit)
   via  46c12de07fe6f44bcf58ca9de276e7932384843d (commit)
   via  0cd1ed0424ce87f60070d43caffda41be6706d59 (commit)
   via  d4ae42b1b2982dd786d6da16d7fa964d25fd3356 (commit)
   via  3e8f43e3cf97f10be4717978643ef3edca8650a5 (commit)
  from  0177158d85797e0d22c81d88175a77d4ad5ed711 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit f4c0961a16a84dcdfe6e2faafb75c76983e6d466
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Mon Oct 15 11:02:24 2007 +0200

fix the compilation of getpass.c and it's configure test

metze

commit 33ee0cfb190a883229d0824d7194898fd8966ceb
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Jun 16 23:07:42 2006 +

r16320: Ensure variable is not null before calling fclose. Klocwork #412. 
Jeremy.

commit 46c12de07fe6f44bcf58ca9de276e7932384843d
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Thu Jun 15 05:32:21 2006 +

r16245: Cope with string being zero len. Klocwork bug #410. Jeremy.

commit 0cd1ed0424ce87f60070d43caffda41be6706d59
Author: jmcd [EMAIL PROTECTED]
Date:   Thu Oct 23 13:47:17 2003 +

Volker's fix for bug #668. Change the \n after the password prompt to go to 
tty instead of stdout.

commit d4ae42b1b2982dd786d6da16d7fa964d25fd3356
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Fri Oct 5 16:20:38 2007 +0200

reapply: Allow ^C to interrupt smbpasswd if using our getpass. from Jeremy

metze

commit 3e8f43e3cf97f10be4717978643ef3edca8650a5
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Fri Oct 5 15:55:19 2007 +0200

reformat getpass() replacement code

metze

---

Summary of changes:
 source/lib/replace/getpass.c  |  161 +++--
 source/lib/replace/getpass.m4 |5 +-
 2 files changed, 91 insertions(+), 75 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/replace/getpass.c b/source/lib/replace/getpass.c
index f6a72ad..4b21849 100644
--- a/source/lib/replace/getpass.c
+++ b/source/lib/replace/getpass.c
@@ -49,8 +49,6 @@ typedef int sig_atomic_t;
 #define SIGNAL_CAST (RETSIGTYPE (*)(int))
 #endif
 
-#ifdef REPLACE_GETPASS
-
 #ifdef SYSV_TERMIO 
 
 /* SYSTEM V TERMIO HANDLING */
@@ -131,81 +129,102 @@ static void catch_signal(int signum,void (*handler)(int 
))
sigemptyset(act.sa_mask);
sigaddset(act.sa_mask,signum);
sigaction(signum,act,oldact);
-   return oldact.sa_handler;
 #else /* !HAVE_SIGACTION */
/* FIXME: need to handle sigvec and systems with broken signal() */
-   return signal(signum, handler);
+   signal(signum, handler);
 #endif
 }
 
+static sig_atomic_t gotintr;
+static int in_fd = -1;
+
+/***
+ Signal function to tell us were ^C'ed.
+/
+
+static void gotintr_sig(void)
+{
+   gotintr = 1;
+   if (in_fd != -1)
+   close(in_fd); /* Safe way to force a return. */
+   in_fd = -1;
+}
+
 char *getsmbpass(const char *prompt)
 {
-  FILE *in, *out;
-  int echo_off;
-  static char buf[256];
-  static size_t bufsize = sizeof(buf);
-  size_t nread;
-
-  /* Catch problematic signals */
-  catch_signal(SIGINT, SIGNAL_CAST SIG_IGN);
-
-  /* Try to write to and read from the terminal if we can.
- If we can't open the terminal, use stderr and stdin.  */
-
-  in = fopen (/dev/tty, w+);
-  if (in == NULL)
-{
-  in = stdin;
-  out = stderr;
-}
-  else
-out = in;
-
-  setvbuf(in, NULL, _IONBF, 0);
-
-  /* Turn echoing off if it is on now.  */
-
-  if (tcgetattr (fileno (in), t) == 0)
-{
- if (ECHO_IS_ON(t))
-   {
-   TURN_ECHO_OFF(t);
-   echo_off = tcsetattr (fileno (in), TCSAFLUSH, t) == 0;
-   TURN_ECHO_ON(t);
+   FILE *in, *out;
+   int echo_off;
+   static char buf[256];
+   static size_t bufsize = sizeof(buf);
+   size_t nread;
+
+   /* Catch problematic signals */
+   catch_signal(SIGINT, SIGNAL_CAST gotintr_sig);
+
+   /* Try to write to and read from the terminal if we can.
+   If we can't open the terminal, use stderr and stdin.  */
+
+   in = fopen (/dev/tty, w+);
+   if (in == NULL) {
+   in = stdin;
+   out = stderr;
+   } else {
+   out = in;
}
-  else
-   echo_off = 0;
-}
-  else
-echo_off = 0;
-
-  /* Write the prompt.  */
-  fputs (prompt, out);
-  fflush (out);
-
-  /* Read the password.  */
-  buf[0] = 0;
-  fgets(buf, bufsize, in);
-  nread = strlen(buf);
-  if (buf[nread - 1] == '\n')
-buf[nread - 1] = '\0';

svn commit: samba r25643 - in branches/4.0-python: . source/lib/tdb/swig

2007-10-15 Thread jelmer
Author: jelmer
Date: 2007-10-15 13:28:38 + (Mon, 15 Oct 2007)
New Revision: 25643

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

Log:
Merge Tdb.py into tdb.i.
Expand tdb.i a bit, supporting more functions.

Removed:
   branches/4.0-python/source/lib/tdb/swig/Tdb.py
   branches/4.0-python/source/lib/tdb/swig/tests/
Modified:
   branches/4.0-python/
   branches/4.0-python/source/lib/tdb/swig/tdb.i


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Deleted: branches/4.0-python/source/lib/tdb/swig/Tdb.py
===
--- branches/4.0-python/source/lib/tdb/swig/Tdb.py  2007-10-15 08:35:24 UTC 
(rev 25642)
+++ branches/4.0-python/source/lib/tdb/swig/Tdb.py  2007-10-15 13:28:38 UTC 
(rev 25643)
@@ -1,119 +0,0 @@
-Provide a more Pythonic and object-oriented interface to tdb.
-
-#
-# Swig interface to Samba
-#
-# Copyright (C) Tim Potter 2006
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#   
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#   
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see http://www.gnu.org/licenses/.
-#
-
-import os
-from tdb import *
-
-# Open flags
-
-DEFAULT= TDB_DEFAULT
-CLEAR_IF_FIRST = TDB_CLEAR_IF_FIRST
-INTERNAL   = TDB_INTERNAL
-NOLOCK = TDB_NOLOCK
-NOMMAP = TDB_NOMMAP
-
-# Class representing a TDB file
-
-class Tdb:
-
-# Create and destroy Tdb objects
-
-def __init__(self, name, hash_size = 0, flags = TDB_DEFAULT,
- open_flags = os.O_RDWR | os.O_CREAT, mode = 0600):
-self.tdb = tdb_open(name, hash_size, flags, open_flags, mode)
-if self.tdb is None:
-raise IOError, tdb_errorstr(self.tdb)
-
-def __del__(self):
-self.close()
-
-def close(self):
-if hasattr(self, 'tdb') and self.tdb is not None:
-if tdb_close(self.tdb) == -1:
-raise IOError, tdb_errorstr(self.tdb)
-self.tdb = None
-
-# Random access to keys, values
-
-def __getitem__(self, key):
-result = tdb_fetch(self.tdb, key)
-if result is None:
-raise KeyError, '%s: %s' % (key, tdb_errorstr(self.tdb))
-return result
-
-def __setitem__(self, key, item):
-if tdb_store(self.tdb, key, item) == -1:
-raise IOError, tdb_errorstr(self.tdb)
-
-def __delitem__(self, key):
-if not tdb_exists(self.tdb, key):
-raise KeyError, '%s: %s' % (key, tdb_errorstr(self.tdb))
-tdb_delete(self.tdb, key)
-
-def has_key(self, key):
-return tdb_exists(self.tdb, key) != 0
-
-# Tdb iterator
-
-class TdbIterator:
-def __init__(self, tdb):
-self.tdb = tdb
-self.key = None
-
-def __iter__(self):
-return self
-
-def next(self):
-if self.key is None:
-self.key = tdb_firstkey(self.tdb)
-if self.key is None:
-raise StopIteration
-return self.key
-else:
-self.key = tdb_nextkey(self.tdb, self.key)
-if self.key is None:
-raise StopIteration
-return self.key
-
-def __iter__(self):
-return Tdb.TdbIterator(self.tdb)
-
-# Implement other dict functions using TdbIterator
-
-def keys(self):
-return [k for k in iter(self)]
-
-def values(self):
-return [self[k] for k in iter(self)]
-
-def items(self):
-return [(k, self[k]) for k in iter(self)]
-
-def __len__(self):
-return len(self.keys())
-
-def clear(self):
-for k in iter(self):
-del(self[k])
-
-# TODO: iterkeys, itervalues, iteritems
-
-# TODO: any other missing methods for container types

Modified: branches/4.0-python/source/lib/tdb/swig/tdb.i
===
--- branches/4.0-python/source/lib/tdb/swig/tdb.i   2007-10-15 08:35:24 UTC 
(rev 25642)
+++ branches/4.0-python/source/lib/tdb/swig/tdb.i   2007-10-15 13:28:38 UTC 
(rev 25643)
@@ -3,7 +3,8 @@
 
Swig interface to tdb.
 
-   Copyright (C) 2004,2005 Tim Potter [EMAIL PROTECTED]
+   Copyright (C) 2004-2006 Tim Potter [EMAIL PROTECTED]
+   Copyright (C) 2007 Jelmer 

svn commit: samba r25644 - in branches/4.0-python: . source/lib/tdb/python/tests

2007-10-15 Thread jelmer
Author: jelmer
Date: 2007-10-15 13:28:42 + (Mon, 15 Oct 2007)
New Revision: 25644

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

Log:
Add some more tests.

Modified:
   branches/4.0-python/
   branches/4.0-python/source/lib/tdb/python/tests/simple.py


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/source/lib/tdb/python/tests/simple.py
===
--- branches/4.0-python/source/lib/tdb/python/tests/simple.py   2007-10-15 
13:28:38 UTC (rev 25643)
+++ branches/4.0-python/source/lib/tdb/python/tests/simple.py   2007-10-15 
13:28:42 UTC (rev 25644)
@@ -5,13 +5,16 @@
 #
 # Copyright (C) 2007 Jelmer Vernooij [EMAIL PROTECTED]
 # Published under the GNU LGPL
-from tdb import Tdb
+
+import tdb
 from unittest import TestCase
+import os
 
 class SimpleTdbTests(TestCase):
 def setUp(self):
 super(SimpleTdbTests, self).setUp()
-self.tdb = Tdb(sometempfile)
+self.tdb = tdb.Tdb(sometempfile.tdb, 0, tdb.DEFAULT, os.O_CREAT)
+self.assertNotEqual(None, self.tdb)
 
 def test_lockall(self):
 self.tdb.lockall()
@@ -36,6 +39,10 @@
 def test_get_logging_fn(self):
 self.tdb.log_fn
 
+def test_store(self):
+self.tdb.store(bar, bla)
+self.assertEquals(bla, self.tdb.fetch(foo))
+
 def test_fetch(self):
 self.tdb[bar] = foo
 self.tdb.reopen()
@@ -44,12 +51,15 @@
 def test_delete(self):
 self.tdb[bar] = foo
 del self.tdb[bar]
-self.assertIs(None, self.tdb[bar])
+self.assertRaises(KeyError, lambda: self.tdb[bar])
 
 def test_contains(self):
 self.tdb[bla] = bloe
 self.assertTrue(bla in self.tdb)
 
+def test_keyerror(self):
+self.assertRaises(KeyError, lambda: self.tdb[bla])
+
 def test_hash_size(self):
 self.tdb.hash_size
 
@@ -82,3 +92,11 @@
 self.tdb[bloe] = 1
 self.tdb.transaction_commit()
 self.assertEquals(1, self.tdb[bloe])
+
+def test_iterator(self):
+self.tdb[bloe] = 2
+self.tdb[bla] = hoi
+i = iter(self.tdb)
+self.assertEquals(2, i.next())
+self.assertEquals(hoi, i.next())
+self.assertRaises(StopIterator, i.next)



svn commit: samba r25645 - in branches/4.0-python: . source/lib/tdb

2007-10-15 Thread jelmer
Author: jelmer
Date: 2007-10-15 13:28:46 + (Mon, 15 Oct 2007)
New Revision: 25645

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

Log:
Add setup.py for tdb.

Added:
   branches/4.0-python/source/lib/tdb/setup.py
Modified:
   branches/4.0-python/


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Added: branches/4.0-python/source/lib/tdb/setup.py
===
--- branches/4.0-python/source/lib/tdb/setup.py 2007-10-15 13:28:42 UTC (rev 
25644)
+++ branches/4.0-python/source/lib/tdb/setup.py 2007-10-15 13:28:46 UTC (rev 
25645)
@@ -0,0 +1,8 @@
+#!/usr/bin/python
+from distutils.core import setup
+from distutils.extension import Extension
+setup(name='tdb',
+  version='1.0',
+  ext_modules=[Extension('_tdb', ['swig/tdb.i'], include_dirs=['include'],
+  libraries=['tdb'], swig_opts=[-noproxydel])],
+  )


Property changes on: branches/4.0-python/source/lib/tdb/setup.py
___
Name: svn:executable
   + *



svn commit: samba r25646 - in branches/4.0-python: . source/lib/tdb/python/tests source/lib/tdb/swig

2007-10-15 Thread jelmer
Author: jelmer
Date: 2007-10-15 13:28:49 + (Mon, 15 Oct 2007)
New Revision: 25646

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

Log:
Fix tests.
Modified:
   branches/4.0-python/
   branches/4.0-python/source/lib/tdb/python/tests/simple.py
   branches/4.0-python/source/lib/tdb/swig/tdb.i


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/source/lib/tdb/python/tests/simple.py
===
--- branches/4.0-python/source/lib/tdb/python/tests/simple.py   2007-10-15 
13:28:46 UTC (rev 25645)
+++ branches/4.0-python/source/lib/tdb/python/tests/simple.py   2007-10-15 
13:28:49 UTC (rev 25646)
@@ -13,11 +13,14 @@
 class SimpleTdbTests(TestCase):
 def setUp(self):
 super(SimpleTdbTests, self).setUp()
-self.tdb = tdb.Tdb(sometempfile.tdb, 0, tdb.DEFAULT, os.O_CREAT)
+self.tdb = tdb.Tdb(os.tmpnam(), 0, tdb.DEFAULT, os.O_CREAT|os.O_RDWR)
 self.assertNotEqual(None, self.tdb)
 
+def tearDown(self):
+del self.tdb
+
 def test_lockall(self):
-self.tdb.lockall()
+self.tdb.lock_all()
 
 def test_max_dead(self):
 self.tdb.max_dead = 20
@@ -33,15 +36,9 @@
 def test_reopen(self):
 self.tdb.reopen()
 
-def test_set_logging_fn(self):
-self.tdb.log_fn = lambda tdb, level, txt: 
-
-def test_get_logging_fn(self):
-self.tdb.log_fn
-
 def test_store(self):
 self.tdb.store(bar, bla)
-self.assertEquals(bla, self.tdb.fetch(foo))
+self.assertEquals(bla, self.tdb.fetch(bar))
 
 def test_fetch(self):
 self.tdb[bar] = foo
@@ -70,33 +67,31 @@
 self.tdb.name
 
 def test_iterator(self):
-self.tdb[bla] = 1
-self.tdb[brainslug] = 2
+self.tdb[bla] = 1
+self.tdb[brainslug] = 2
 self.assertEquals([bla, brainslug], list(self.tdb))
 
 def test_items(self):
-self.tdb[bla] = 1
-self.tdb[brainslug] = 2
-self.assertEquals([(bla, 1), (brainslug, 2)], self.tdb.items())
+self.tdb[bla] = 1
+self.tdb[brainslug] = 2
+self.assertEquals([(bla, 1), (brainslug, 2)], self.tdb.items())
 
 def test_transaction_cancel(self):
-self.tdb[bloe] = 2
+self.tdb[bloe] = 2
 self.tdb.transaction_start()
-self.tdb[bloe] = 1
+self.tdb[bloe] = 1
 self.tdb.transaction_cancel()
-self.assertEquals(2, self.tdb[bloe])
+self.assertEquals(2, self.tdb[bloe])
 
 def test_transaction_commit(self):
-self.tdb[bloe] = 2
+self.tdb[bloe] = 2
 self.tdb.transaction_start()
-self.tdb[bloe] = 1
+self.tdb[bloe] = 1
 self.tdb.transaction_commit()
-self.assertEquals(1, self.tdb[bloe])
+self.assertEquals(1, self.tdb[bloe])
 
 def test_iterator(self):
-self.tdb[bloe] = 2
+self.tdb[bloe] = 2
 self.tdb[bla] = hoi
 i = iter(self.tdb)
-self.assertEquals(2, i.next())
-self.assertEquals(hoi, i.next())
-self.assertRaises(StopIterator, i.next)
+self.assertEquals(set([bloe, bla]), set([i.next(), i.next()]))

Modified: branches/4.0-python/source/lib/tdb/swig/tdb.i
===
--- branches/4.0-python/source/lib/tdb/swig/tdb.i   2007-10-15 13:28:46 UTC 
(rev 25645)
+++ branches/4.0-python/source/lib/tdb/swig/tdb.i   2007-10-15 13:28:49 UTC 
(rev 25646)
@@ -107,7 +107,11 @@
 
 %rename(Tdb) tdb;
 %rename(lock_all) tdb_context::lockall;
+%rename(unlock_all) tdb_context::unlockall;
 
+%rename(read_lock_all) tdb_context::lockall_read;
+%rename(read_unlock_all) tdb_context::unlockall_read;
+
 %typemap(default) int tdb_flags {
 $1 = TDB_DEFAULT;
 }
@@ -159,6 +163,8 @@
 TDB_DATA nextkey(TDB_DATA key);
 int lockall();
 int unlockall();
+int lockall_read();
+int unlockall_read();
 int reopen();
 int transaction_start();
 int transaction_commit();
@@ -172,9 +178,6 @@
 }
 
 %pythoncode {
-def __del__(self):
-self.close()
-
 def __str__(self):
 return self.name()
 
@@ -194,6 +197,9 @@
 raise KeyError, '%s: %s' % (key, self.errorstr())
 self.delete(key)
 
+def __contains__(self, key):
+return self.exists(key) != 0
+
 def has_key(self, key):
 return self.exists(key) != 0
 
@@ -219,7 +225,7 @@
 return self.key
 
 def __iter__(self):
-return Tdb.TdbIterator(self.tdb)
+return self.TdbIterator(self)
 
 # Implement other dict functions using TdbIterator
 



svn commit: samba r25647 - in branches/4.0-python: . source

2007-10-15 Thread jelmer
Author: jelmer
Date: 2007-10-15 13:28:52 + (Mon, 15 Oct 2007)
New Revision: 25647

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

Log:
Add simple TODO file.
Added:
   branches/4.0-python/source/BRANCH.TODO
Modified:
   branches/4.0-python/


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Added: branches/4.0-python/source/BRANCH.TODO
===
--- branches/4.0-python/source/BRANCH.TODO  2007-10-15 13:28:49 UTC (rev 
25646)
+++ branches/4.0-python/source/BRANCH.TODO  2007-10-15 13:28:52 UTC (rev 
25647)
@@ -0,0 +1,2 @@
+- support kwargs (especially for constructors with a lot of arguments)
+- make sure exceptions are properly thrown everywhere



svn commit: samba r25648 - in branches/4.0-python: . source source/auth source/client source/lib/ldb/common source/lib/ldb/include source/lib/samba3 source/lib/socket source/lib/tdr source/lib/util so

2007-10-15 Thread jelmer
Author: jelmer
Date: 2007-10-15 13:28:55 + (Mon, 15 Oct 2007)
New Revision: 25648

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

Log:
Merge upstream.
Modified:
   branches/4.0-python/
   branches/4.0-python/source/auth/auth_server.c
   branches/4.0-python/source/client/mount.cifs.c
   branches/4.0-python/source/client/smbmount.c
   branches/4.0-python/source/lib/ldb/common/ldb_dn.c
   branches/4.0-python/source/lib/ldb/include/ldb.h
   branches/4.0-python/source/lib/samba3/samba3.h
   branches/4.0-python/source/lib/samba3/winsdb.c
   branches/4.0-python/source/lib/socket/interface.c
   branches/4.0-python/source/lib/socket/socket_ip.c
   branches/4.0-python/source/lib/tdr/tdr.c
   branches/4.0-python/source/lib/util/debug.h
   branches/4.0-python/source/lib/util/dprintf.c
   branches/4.0-python/source/lib/util/fault.c
   branches/4.0-python/source/lib/util/system.c
   branches/4.0-python/source/lib/util/util.c
   branches/4.0-python/source/lib/util/util.h
   branches/4.0-python/source/libcli/resolve/host.c
   branches/4.0-python/source/libcli/resolve/resolve.c
   branches/4.0-python/source/librpc/ndr/libndr.h
   branches/4.0-python/source/librpc/ndr/ndr_basic.c
   branches/4.0-python/source/librpc/ndr/ndr_misc.c
   branches/4.0-python/source/main.mk
   branches/4.0-python/source/nbt_server/interfaces.c
   branches/4.0-python/source/nbt_server/wins/winsserver.c
   branches/4.0-python/source/selftest/selftest.pl
   branches/4.0-python/source/torture/local/resolve.c


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


svn commit: samba r25649 - in branches/4.0-python: .

2007-10-15 Thread jelmer
Author: jelmer
Date: 2007-10-15 13:29:00 + (Mon, 15 Oct 2007)
New Revision: 25649

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

Log:
Ignore trial temporary directories.
Modified:
   branches/4.0-python/
   branches/4.0-python/.bzrignore


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/.bzrignore
===
--- branches/4.0-python/.bzrignore  2007-10-15 13:28:55 UTC (rev 25648)
+++ branches/4.0-python/.bzrignore  2007-10-15 13:29:00 UTC (rev 25649)
@@ -214,3 +214,4 @@
 source/scripting/python/talloc.h
 source/lib/ldb/swig/ldb_wrap.c
 source/scripting/swig/dcerpc.py
+_trial_temp



svn commit: samba r25650 - in branches/4.0-python: . source/lib/ldb/swig source/lib/ldb/tests/python

2007-10-15 Thread jelmer
Author: jelmer
Date: 2007-10-15 13:29:02 + (Mon, 15 Oct 2007)
New Revision: 25650

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

Log:
Add transaction functions.
Modified:
   branches/4.0-python/
   branches/4.0-python/source/lib/ldb/swig/ldb.i
   branches/4.0-python/source/lib/ldb/tests/python/api.py


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/source/lib/ldb/swig/ldb.i
===
--- branches/4.0-python/source/lib/ldb/swig/ldb.i   2007-10-15 13:29:00 UTC 
(rev 25649)
+++ branches/4.0-python/source/lib/ldb/swig/ldb.i   2007-10-15 13:29:02 UTC 
(rev 25650)
@@ -45,6 +45,7 @@
 typedef struct ldb_message ldb_msg;
 typedef struct ldb_context ldb;
 typedef struct ldb_dn ldb_dn;
+typedef struct ldb_ldif ldb_ldif;
 typedef int ldb_error;
 
 %}
@@ -296,9 +297,15 @@
 ldb_dn *get_root_basedn();
 ldb_dn *get_schema_basedn();
 ldb_dn *get_default_basedn();
+
+ldb_error transaction_start();
+ldb_error transaction_commit();
+ldb_error transaction_cancel();
 }
 } ldb;
 
 %nodefault ldb_message;
 %nodefault Ldb;
 %nodefault Dn;
+
+

Modified: branches/4.0-python/source/lib/ldb/tests/python/api.py
===
--- branches/4.0-python/source/lib/ldb/tests/python/api.py  2007-10-15 
13:29:00 UTC (rev 25649)
+++ branches/4.0-python/source/lib/ldb/tests/python/api.py  2007-10-15 
13:29:02 UTC (rev 25650)
@@ -69,6 +69,23 @@
 self.assertEquals(len(l.search()), 2)
 l.delete(ldb.Dn(l, dc=bar))
 
+def test_transaction_commit(self):
+l = ldb.Ldb(foo.tdb)
+l.transaction_start()
+m = ldb.Message(ldb.Dn(l, dc=foo))
+m[foo] = set([bar])
+l.add(m)
+l.transaction_commit()
+l.delete(m.dn)
+
+def test_transaction_cancel(self):
+l = ldb.Ldb(foo.tdb)
+l.transaction_start()
+m = ldb.Message(ldb.Dn(l, dc=foo))
+m[foo] = set([bar])
+l.add(m)
+l.transaction_cancel()
+
 class DnTests(unittest.TestCase):
 def setUp(self):
 self.ldb = ldb.Ldb(foo.tdb)



svn commit: samba r25651 - in branches/4.0-python: . source/lib/ldb/swig source/lib/ldb/tests/python

2007-10-15 Thread jelmer
Author: jelmer
Date: 2007-10-15 13:29:05 + (Mon, 15 Oct 2007)
New Revision: 25651

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

Log:
Support dn in ldb syntax.
Modified:
   branches/4.0-python/
   branches/4.0-python/source/lib/ldb/swig/ldb.i
   branches/4.0-python/source/lib/ldb/tests/python/api.py


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/source/lib/ldb/swig/ldb.i
===
--- branches/4.0-python/source/lib/ldb/swig/ldb.i   2007-10-15 13:29:02 UTC 
(rev 25650)
+++ branches/4.0-python/source/lib/ldb/swig/ldb.i   2007-10-15 13:29:05 UTC 
(rev 25651)
@@ -301,6 +301,20 @@
 ldb_error transaction_start();
 ldb_error transaction_commit();
 ldb_error transaction_cancel();
+
+#ifdef SWIGPYTHON
+bool __contains__(ldb_dn *dn)
+{
+struct ldb_result *result;
+
+int ret = ldb_search($self, dn, LDB_SCOPE_BASE, NULL, NULL, 
+ result);
+
+/* FIXME: Check ret and set exception if necessary */
+
+return result-count  0;
+}
+#endif
 }
 } ldb;
 

Modified: branches/4.0-python/source/lib/ldb/tests/python/api.py
===
--- branches/4.0-python/source/lib/ldb/tests/python/api.py  2007-10-15 
13:29:02 UTC (rev 25650)
+++ branches/4.0-python/source/lib/ldb/tests/python/api.py  2007-10-15 
13:29:05 UTC (rev 25651)
@@ -32,6 +32,17 @@
 l = ldb.Ldb(foo.tdb)
 self.assertRaises(RuntimeError, lambda: l.delete(ldb.Dn(l, dc=foo)))
 
+def test_contains(self):
+l = ldb.Ldb(foo.tdb)
+self.assertFalse(ldb.Dn(l, dc=foo) in l)
+l = ldb.Ldb(foo.tdb)
+m = ldb.Message()
+m.dn = ldb.Dn(l, dc=foo)
+m[b] = a
+l.add(m)
+self.assertTrue(ldb.Dn(l, dc=foo) in l)
+l.delete(m.dn)
+
 def test_get_config_basedn(self):
 l = ldb.Ldb(foo.tdb)
 self.assertEquals(None, l.get_config_basedn())



svn commit: samba r25652 - in branches/4.0-python: . source/lib/ldb/include source/lib/ldb/swig source/lib/ldb/tests/python

2007-10-15 Thread jelmer
Author: jelmer
Date: 2007-10-15 13:29:08 + (Mon, 15 Oct 2007)
New Revision: 25652

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

Log:
Support valid_attr_name.
Modified:
   branches/4.0-python/
   branches/4.0-python/source/lib/ldb/include/ldb.h
   branches/4.0-python/source/lib/ldb/swig/ldb.i
   branches/4.0-python/source/lib/ldb/tests/python/api.py


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/source/lib/ldb/include/ldb.h
===
--- branches/4.0-python/source/lib/ldb/include/ldb.h2007-10-15 13:29:05 UTC 
(rev 25651)
+++ branches/4.0-python/source/lib/ldb/include/ldb.h2007-10-15 13:29:08 UTC 
(rev 25652)
@@ -1217,7 +1217,7 @@
 
 /**
Check the attribute name is valid according to rfc2251
-   \param s tthe string to check
+   \param s the string to check
 
\return 1 if the name is ok
 */

Modified: branches/4.0-python/source/lib/ldb/swig/ldb.i
===
--- branches/4.0-python/source/lib/ldb/swig/ldb.i   2007-10-15 13:29:05 UTC 
(rev 25651)
+++ branches/4.0-python/source/lib/ldb/swig/ldb.i   2007-10-15 13:29:08 UTC 
(rev 25652)
@@ -54,10 +54,10 @@
 %include typemaps.i
 %include exception.i
 
-enum ldb_scope {LDB_SCOPE_DEFAULT=-1, 
-   LDB_SCOPE_BASE=0, 
-   LDB_SCOPE_ONELEVEL=1,
-   LDB_SCOPE_SUBTREE=2};
+%constant int SCOPE_DEFAULT = LDB_SCOPE_DEFAULT;
+%constant int SCOPE_BASE = LDB_SCOPE_BASE;
+%constant int SCOPE_ONELEVEL = LDB_SCOPE_ONELEVEL;
+%constant int SCOPE_SUBTREE = LDB_SCOPE_SUBTREE;
 
 /* 
  * Wrap struct ldb_context
@@ -322,4 +322,6 @@
 %nodefault Ldb;
 %nodefault Dn;
 
+%rename(valid_attr_name) ldb_valid_attr_name;
+int ldb_valid_attr_name(const char *s);
 

Modified: branches/4.0-python/source/lib/ldb/tests/python/api.py
===
--- branches/4.0-python/source/lib/ldb/tests/python/api.py  2007-10-15 
13:29:05 UTC (rev 25651)
+++ branches/4.0-python/source/lib/ldb/tests/python/api.py  2007-10-15 
13:29:08 UTC (rev 25652)
@@ -8,6 +8,11 @@
 
 import ldb
 
+class NoContextTests(unittest.TestCase):
+def test_valid_attr_name(self):
+self.assertTrue(ldb.valid_attr_name(foo))
+self.assertFalse(ldb.valid_attr_name(24foo))
+
 class SimpleLdb(unittest.TestCase):
 def test_connect(self):
 ldb.Ldb(foo.tdb)
@@ -26,7 +31,7 @@
 def test_search_scope_base(self):
 l = ldb.Ldb(foo.tdb)
 self.assertEquals(len(l.search(ldb.Dn(l, dc=foo), 
-  ldb.LDB_SCOPE_ONELEVEL)), 0)
+  ldb.SCOPE_ONELEVEL)), 0)
 
 def test_delete(self):
 l = ldb.Ldb(foo.tdb)



svn commit: samba r25653 - in branches/4.0-python: . source/lib/ldb/swig source/lib/ldb/tests/python

2007-10-15 Thread jelmer
Author: jelmer
Date: 2007-10-15 13:29:11 + (Mon, 15 Oct 2007)
New Revision: 25653

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

Log:
Support passing in arrays of attribute names.
Modified:
   branches/4.0-python/
   branches/4.0-python/source/lib/ldb/swig/ldb.i
   branches/4.0-python/source/lib/ldb/tests/python/api.py


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/source/lib/ldb/swig/ldb.i
===
--- branches/4.0-python/source/lib/ldb/swig/ldb.i   2007-10-15 13:29:08 UTC 
(rev 25652)
+++ branches/4.0-python/source/lib/ldb/swig/ldb.i   2007-10-15 13:29:11 UTC 
(rev 25653)
@@ -112,6 +112,24 @@
 );
 }
 }
+
+%typemap(in, numinputs=1) const char * const *attrs {
+/* FIXME: read $input and convert to $1 */
+if ($input == Py_None) {
+$1 = NULL;
+} else if (PySequence_Check($input)) {
+int i;
+$1 = talloc_array(NULL, const char *, PySequence_Size($input));
+for(i = 0; i  PySequence_Size($input); i++)
+$1[i] = PyString_AsString(PySequence_GetItem($input, i));
+} else {
+SWIG_exception(SWIG_TypeError, expected sequence);
+}
+}
+
+%typemap(freearg) const char * const *attrs {
+talloc_free($1);
+}
 #endif
 
 %types(struct ldb_result *);

Modified: branches/4.0-python/source/lib/ldb/tests/python/api.py
===
--- branches/4.0-python/source/lib/ldb/tests/python/api.py  2007-10-15 
13:29:08 UTC (rev 25652)
+++ branches/4.0-python/source/lib/ldb/tests/python/api.py  2007-10-15 
13:29:11 UTC (rev 25653)
@@ -28,6 +28,10 @@
 l = ldb.Ldb(foo.tdb)
 self.assertEquals(len(l.search()), 1)
 
+def test_search_attrs(self):
+l = ldb.Ldb(foo.tdb)
+self.assertEquals(len(l.search(ldb.Dn(l, ), ldb.SCOPE_SUBTREE, 
(dc=*), [dc])), 0)
+
 def test_search_scope_base(self):
 l = ldb.Ldb(foo.tdb)
 self.assertEquals(len(l.search(ldb.Dn(l, dc=foo), 



[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-51-g96820f8

2007-10-15 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  96820f8d8f6522fc264efda0f069e2f6a420ac2e (commit)
   via  d20c2fa274297e9577ed28b8ed04806a425bdc57 (commit)
  from  f4c0961a16a84dcdfe6e2faafb75c76983e6d466 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit 96820f8d8f6522fc264efda0f069e2f6a420ac2e
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Mon Oct 15 15:42:13 2007 +0200

rename getsmbpass - rep_getpass and provide the function prototype

metze

commit d20c2fa274297e9577ed28b8ed04806a425bdc57
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Mon Oct 15 15:41:06 2007 +0200

use system/*.h to get the system includes

metze

---

Summary of changes:
 source/lib/replace/getpass.c   |   20 
 source/lib/replace/system/passwd.h |3 ++-
 2 files changed, 6 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/replace/getpass.c b/source/lib/replace/getpass.c
index 4b21849..1d13461 100644
--- a/source/lib/replace/getpass.c
+++ b/source/lib/replace/getpass.c
@@ -18,21 +18,9 @@ not, see http://www.gnu.org/licenses/.  */
 /* Modified to use with samba by Jeremy Allison, 8th July 1995. */
 
 #include replace.h
-
-#if defined(HAVE_TERMIOS_H)
-/* POSIX terminal handling. */
-#include termios.h
-#elif defined(HAVE_TERMIO_H)
-/* Older SYSV terminal handling - don't use if we can avoid it. */
-#include termio.h
-#elif defined(HAVE_SYS_TERMIO_H)
-/* Older SYSV terminal handling - don't use if we can avoid it. */
-#include sys/termio.h
-#endif
-
-#ifdef HAVE_SYS_WAIT_H
-#include sys/wait.h
-#endif
+#include system/filesys.h
+#include system/wait.h
+#include system/terminal.h
 
 /*
  * Define additional missing types
@@ -150,7 +138,7 @@ static void gotintr_sig(void)
in_fd = -1;
 }
 
-char *getsmbpass(const char *prompt)
+char *rep_getpass(const char *prompt)
 {
FILE *in, *out;
int echo_off;
diff --git a/source/lib/replace/system/passwd.h 
b/source/lib/replace/system/passwd.h
index 4e858fc..53d35e7 100644
--- a/source/lib/replace/system/passwd.h
+++ b/source/lib/replace/system/passwd.h
@@ -65,7 +65,8 @@
 #endif
 
 #ifdef REPLACE_GETPASS
-#define getpass(prompt) getsmbpass((prompt))
+#define getpass(prompt) rep_getpass(prompt)
+char *rep_getpass(const char *prompt);
 #endif
 
 #ifndef NGROUPS_MAX


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-52-g357f003

2007-10-15 Thread Günther Deschner
The branch, v3-2-test has been updated
   via  357f00384994946485a5190b6a9c493aeee53cd2 (commit)
  from  96820f8d8f6522fc264efda0f069e2f6a420ac2e (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit 357f00384994946485a5190b6a9c493aeee53cd2
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Mon Oct 15 19:10:19 2007 +0200

Add WERR_SERVICE_ALREADY_RUNNING.

Guenther

---

Summary of changes:
 source/include/doserr.h |1 +
 source/libsmb/doserr.c  |1 +
 2 files changed, 2 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/doserr.h b/source/include/doserr.h
index 2f2861a..6e29faf 100644
--- a/source/include/doserr.h
+++ b/source/include/doserr.h
@@ -199,6 +199,7 @@
 #define WERR_REG_FILE_INVALID W_ERROR(1017)
 #define WERR_NO_SUCH_SERVICE W_ERROR(1060)
 #define WERR_INVALID_SERVICE_CONTROL W_ERROR(1052)
+#define WERR_SERVICE_ALREADY_RUNNING W_ERROR(1056)
 #define WERR_SERVICE_DISABLED W_ERROR(1058)
 #define WERR_SERVICE_NEVER_STARTED W_ERROR(1077)
 #define WERR_MACHINE_LOCKED W_ERROR(1271)
diff --git a/source/libsmb/doserr.c b/source/libsmb/doserr.c
index 23214e8..52afb0d 100644
--- a/source/libsmb/doserr.c
+++ b/source/libsmb/doserr.c
@@ -77,6 +77,7 @@ werror_code_struct dos_errs[] =
{ WERR_SERVER_UNAVAILABLE, WERR_SERVER_UNAVAILABLE },
{ WERR_IO_PENDING, WERR_IO_PENDING },
{ WERR_INVALID_SERVICE_CONTROL, WERR_INVALID_SERVICE_CONTROL },
+   { WERR_SERVICE_ALREADY_RUNNING, WERR_SERVICE_ALREADY_RUNNING },
{ WERR_NET_NAME_NOT_FOUND, WERR_NET_NAME_NOT_FOUND },
{ WERR_REG_CORRUPT, WERR_REG_CORRUPT },
{ WERR_REG_IO_FAILURE, WERR_REG_IO_FAILURE },


-- 
Samba Shared Repository


svn commit: samba r25654 - in branches/4.0-python: . source/lib/ldb/swig source/lib/ldb/tests/python source/scripting/python/samba source/selftest source/selftest/env source/setup

2007-10-15 Thread jelmer
Author: jelmer
Date: 2007-10-15 20:18:38 + (Mon, 15 Oct 2007)
New Revision: 25654

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

Log:
More work towards a working provision.
Removed:
   branches/4.0-python/source/scripting/python/samba/ldb.py
Modified:
   branches/4.0-python/
   branches/4.0-python/source/lib/ldb/swig/ldb.i
   branches/4.0-python/source/lib/ldb/tests/python/api.py
   branches/4.0-python/source/scripting/python/samba/__init__.py
   branches/4.0-python/source/scripting/python/samba/provision.py
   branches/4.0-python/source/scripting/python/samba/upgrade.py
   branches/4.0-python/source/selftest/env/Samba4.pm
   branches/4.0-python/source/selftest/tests_quick.sh
   branches/4.0-python/source/setup/provision


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


svn commit: samba r25655 - in branches/4.0-python: . source/lib/ldb/swig source/lib/ldb/tests/python

2007-10-15 Thread jelmer
Author: jelmer
Date: 2007-10-15 20:18:47 + (Mon, 15 Oct 2007)
New Revision: 25655

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

Log:
Add parse_ldif function.
Modified:
   branches/4.0-python/
   branches/4.0-python/source/lib/ldb/swig/ldb.i
   branches/4.0-python/source/lib/ldb/tests/python/api.py


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/source/lib/ldb/swig/ldb.i
===
--- branches/4.0-python/source/lib/ldb/swig/ldb.i   2007-10-15 20:18:38 UTC 
(rev 25654)
+++ branches/4.0-python/source/lib/ldb/swig/ldb.i   2007-10-15 20:18:47 UTC 
(rev 25655)
@@ -259,12 +259,6 @@
 unsigned int __len__() { return $self-num_elements; }
 #endif
 void remove_attr(const char *name);
-ldb_msg *parse_ldif(const char *s)
-{
-struct ldb_ldif *ret = ldb_ldif_read_string($self, s);
-
-return ret-msg;
-}
 }
 } ldb_msg;
 
@@ -339,6 +333,12 @@
 return result-count  0;
 }
 #endif
+   ldb_msg *parse_ldif(const char *s)
+{
+struct ldb_ldif *ret = ldb_ldif_read_string($self, s);
+
+return ret-msg;
+}
 }
 } ldb;
 

Modified: branches/4.0-python/source/lib/ldb/tests/python/api.py
===
--- branches/4.0-python/source/lib/ldb/tests/python/api.py  2007-10-15 
20:18:38 UTC (rev 25654)
+++ branches/4.0-python/source/lib/ldb/tests/python/api.py  2007-10-15 
20:18:47 UTC (rev 25655)
@@ -175,7 +175,9 @@
 self.assertEquals(dc=foo,bar=bla, str(y + x))
 
 def test_parse_ldif(self):
-self.assertIsInstance(ldb.Message, ldb.parse_ldif(dn: foo=bar\n))
+msg = self.ldb.parse_ldif(dn: foo=bar\n)
+self.assertEquals(foo=bar, str(msg.dn))
+self.assertTrue(isinstance(msg, ldb.Message))
 
 def test_canonical_string(self):
 x = ldb.Dn(self.ldb, dc=foo,bar=bloe)



svn commit: samba r25656 - in branches/4.0-python: . source source/build/smb_build source/lib/ldb/swig source/param source/scripting/python/samba source/setup

2007-10-15 Thread jelmer
Author: jelmer
Date: 2007-10-15 20:18:54 + (Mon, 15 Oct 2007)
New Revision: 25656

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

Log:
Get rid of lp_setupdir() - it's only used by the provision script now, which 
allows overriding the path on the command line.
Modified:
   branches/4.0-python/
   branches/4.0-python/source/BRANCH.TODO
   branches/4.0-python/source/build/smb_build/makefile.pm
   branches/4.0-python/source/dynconfig.c
   branches/4.0-python/source/dynconfig.mk
   branches/4.0-python/source/lib/ldb/swig/ldb.i
   branches/4.0-python/source/param/loadparm.c
   branches/4.0-python/source/scripting/python/samba/provision.py
   branches/4.0-python/source/setup/provision


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


svn commit: samba r25657 - in branches/4.0-python: . source source/build/smb_build source/param

2007-10-15 Thread jelmer
Author: jelmer
Date: 2007-10-15 20:19:06 + (Mon, 15 Oct 2007)
New Revision: 25657

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

Log:
Remove js related parameters.
Modified:
   branches/4.0-python/
   branches/4.0-python/source/build/smb_build/makefile.pm
   branches/4.0-python/source/dynconfig.c
   branches/4.0-python/source/dynconfig.mk
   branches/4.0-python/source/param/loadparm.c


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/source/build/smb_build/makefile.pm
===
--- branches/4.0-python/source/build/smb_build/makefile.pm  2007-10-15 
20:18:54 UTC (rev 25656)
+++ branches/4.0-python/source/build/smb_build/makefile.pm  2007-10-15 
20:19:06 UTC (rev 25657)
@@ -90,7 +90,6 @@
 CONFIGDIR = $self-{config}-{sysconfdir}
 DATADIR = $self-{config}-{datadir}
 SWATDIR = \$(DATADIR)/swat
-JSDIR = \$(DATADIR)/js
 VARDIR = $self-{config}-{localstatedir}
 LOGFILEBASE = $self-{config}-{logfilebase}
 NCALRPCDIR = $self-{config}-{localstatedir}/ncalrpc

Modified: branches/4.0-python/source/dynconfig.c
===
--- branches/4.0-python/source/dynconfig.c  2007-10-15 20:18:54 UTC (rev 
25656)
+++ branches/4.0-python/source/dynconfig.c  2007-10-15 20:19:06 UTC (rev 
25657)
@@ -76,8 +76,5 @@
 /** SWAT  directory */
 _PUBLIC_ const char *dyn_SWATDIR = SWATDIR;
 
-/** EJS Javascript library includes */
-_PUBLIC_ const char *dyn_JSDIR = JSDIR;
-
 /** Where to find the winbindd socket */
 _PUBLIC_ const char *dyn_WINBINDD_SOCKET_DIR = WINBINDD_SOCKET_DIR;

Modified: branches/4.0-python/source/dynconfig.mk
===
--- branches/4.0-python/source/dynconfig.mk 2007-10-15 20:18:54 UTC (rev 
25656)
+++ branches/4.0-python/source/dynconfig.mk 2007-10-15 20:19:06 UTC (rev 
25657)
@@ -13,10 +13,8 @@
 -DLOCKDIR=\$(LOCKDIR)\ -DPIDDIR=\$(PIDDIR)\ 
-DDATADIR=\$(DATADIR)\ \
 -DLOGFILEBASE=\$(LOGFILEBASE)\ \
 -DCONFIGDIR=\$(CONFIGDIR)\ -DNCALRPCDIR=\$(NCALRPCDIR)\ \
--DSWATDIR=\$(SWATDIR)\ \
--DPRIVATE_DIR=\$(PRIVATEDIR)\ \
--DMODULESDIR=\$(MODULESDIR)\ -DJSDIR=\$(JSDIR)\ \
--DTORTUREDIR=\$(TORTUREDIR)\ \
+-DSWATDIR=\$(SWATDIR)\ -DPRIVATE_DIR=\$(PRIVATEDIR)\ \
+-DMODULESDIR=\$(MODULESDIR)\ -DTORTUREDIR=\$(TORTUREDIR)\ \
 -DWINBINDD_SOCKET_DIR=\$(WINBINDD_SOCKET_DIR)\
 
 dynconfig.o: dynconfig.c Makefile

Modified: branches/4.0-python/source/param/loadparm.c
===
--- branches/4.0-python/source/param/loadparm.c 2007-10-15 20:18:54 UTC (rev 
25656)
+++ branches/4.0-python/source/param/loadparm.c 2007-10-15 20:19:06 UTC (rev 
25657)
@@ -97,8 +97,6 @@
char *szWINS_CONFIG_URL;
char *szWINS_URL;
char *szPrivateDir;
-   const char **jsInclude;
-   char *jsonrpcServicesDir;
const char **szPasswordServers;
char *szSocketOptions;
char *szRealm;
@@ -515,7 +513,6 @@
{lock directory, P_STRING, P_GLOBAL, GLOBAL_VAR(szLockDir), NULL, 
NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
{modules dir, P_STRING, P_GLOBAL, GLOBAL_VAR(szModulesDir), NULL, 
NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
{pid directory, P_STRING, P_GLOBAL, GLOBAL_VAR(szPidDir), NULL, NULL, 
FLAG_ADVANCED | FLAG_DEVELOPER}, 
-   {js include, P_LIST, P_GLOBAL, GLOBAL_VAR(jsInclude), NULL, NULL, 
FLAG_ADVANCED | FLAG_DEVELOPER},

{socket address, P_STRING, P_GLOBAL, GLOBAL_VAR(szSocketAddress), 
NULL, NULL, FLAG_DEVELOPER},
{copy, P_STRING, P_LOCAL, LOCAL_VAR(szCopy), handle_copy, NULL, 
FLAG_HIDE},
@@ -729,7 +726,6 @@
 _PUBLIC_ FN_GLOBAL_INTEGER(lp_security, security)
 _PUBLIC_ FN_GLOBAL_BOOL(lp_paranoid_server_security, paranoid_server_security)
 _PUBLIC_ FN_GLOBAL_INTEGER(lp_announce_as, announce_as)
-_PUBLIC_ FN_GLOBAL_LIST(lp_js_include, jsInclude)
 _PUBLIC_ FN_LOCAL_STRING(lp_servicename, szService)
 _PUBLIC_ FN_LOCAL_CONST_STRING(lp_const_servicename, szService)
 _PUBLIC_ FN_LOCAL_STRING(lp_pathname, szPath)
@@ -2389,7 +2385,6 @@
lp_do_global_parameter(lp_ctx, tls keyfile, tls/key.pem);
lp_do_global_parameter(lp_ctx, tls certfile, tls/cert.pem);
lp_do_global_parameter(lp_ctx, tls cafile, tls/ca.pem);
-   lp_do_global_parameter_var(lp_ctx, js include, %s, dyn_JSDIR);
 
for (i = 0; parm_table[i].label; i++) {
if (!(parm_table[i].flags  FLAG_CMDLINE)) {



svn commit: samba r25658 - in branches/4.0-python: . source source/scripting/python/samba

2007-10-15 Thread jelmer
Author: jelmer
Date: 2007-10-15 20:19:13 + (Mon, 15 Oct 2007)
New Revision: 25658

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

Log:
Remove spurious newlines.
Modified:
   branches/4.0-python/
   branches/4.0-python/source/BRANCH.TODO
   branches/4.0-python/source/scripting/python/samba/provision.py
   branches/4.0-python/source/scripting/python/samba/upgrade.py


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/source/BRANCH.TODO
===
--- branches/4.0-python/source/BRANCH.TODO  2007-10-15 20:19:06 UTC (rev 
25657)
+++ branches/4.0-python/source/BRANCH.TODO  2007-10-15 20:19:13 UTC (rev 
25658)
@@ -1,3 +1,5 @@
 - support kwargs (especially for constructors with a lot of arguments)
 - make sure exceptions are properly thrown everywhere
 - hook setup.py into the build system
+- fix provisioning of registry
+- fix web server

Modified: branches/4.0-python/source/scripting/python/samba/provision.py
===
--- branches/4.0-python/source/scripting/python/samba/provision.py  
2007-10-15 20:19:06 UTC (rev 25657)
+++ branches/4.0-python/source/scripting/python/samba/provision.py  
2007-10-15 20:19:13 UTC (rev 25658)
@@ -234,7 +234,7 @@
 try:
 res2 = ldb.search(anything, basedn, SCOPE_SUBTREE, [dn])
 except LdbError, e:
-message(ldb search failed: %s\n % e)
+message(ldb search failed: %s % e)
 continue
 previous_remaining = current_remaining
 current_remaining = len(res2)
@@ -244,11 +244,11 @@
 try:
 res3 = ldb.search(anything, basedn, SCOPE_SUBTREE, [dn])
 except LdbError, e:
-message(ldb search failed: %s\n % e)
+message(ldb search failed: %s % e)
 continue
 
 if len(res3) != 0:
-message(Failed to delete all records under %s, %d records 
remaining\n % (basedn, len(res3)))
+message(Failed to delete all records under %s, %d records 
remaining % (basedn, len(res3)))
 
 def open_ldb(session_info, credentials, dbname):
 try:
@@ -379,26 +379,26 @@
 subobj.fix(paths)
 
 # Also wipes the database
-message(Setting up %s partitions\n % paths.samdb)
+message(Setting up %s partitions % paths.samdb)
 setup_ldb(setup_dir, provision_partitions.ldif, session_info, 
   credentials, subobj, paths.samdb)
 
 samdb = open_ldb(session_info, credentials, paths.samdb)
 ldb.transaction_start()
 try:
-message(Setting up %s attributes\n % paths.samdb)
+message(Setting up %s attributes % paths.samdb)
 setup_add_ldif(setup_dir, provision_init.ldif, subobj, samdb)
 
-message(Setting up %s rootDSE\n % paths.samdb)
+message(Setting up %s rootDSE % paths.samdb)
 setup_add_ldif(setup_dir, provision_rootdse_add.ldif, subobj, samdb)
 
-message(Erasing data from partitions\n)
+message(Erasing data from partitions)
 ldb_erase_partitions(subobj, message, samdb, undefined)
 
-message(Setting up %s indexes\n % paths.samdb)
+message(Setting up %s indexes % paths.samdb)
 setup_add_ldif(setup_dir, provision_index.ldif, subobj, samdb)
 
-message(Setting up %s templates\n % paths.samdb)
+message(Setting up %s templates % paths.samdb)
 setup_add_ldif(setup_dir, provision_templates.ldif, subobj, samdb)
 except:
 samdb.transaction_cancel()
@@ -406,7 +406,7 @@
 
 samdb.transaction_commit()
 
-message(Setting up %s\n % paths.secrets)
+message(Setting up %s % paths.secrets)
 setup_ldb(setup_dir, secrets_init.ldif, session_info, credentials, 
subobj, paths.secrets)
 
 setup_ldb(setup_dir, secrets.ldif, session_info, credentials, subobj, 
paths.secrets, False)
@@ -414,8 +414,7 @@
 #
 # provision samba4 - caution, this wipes all existing data!
 #
-def provision(lp, setup_dir, subobj, message, blank, paths, session_info, 
credentials, 
-  ldapbackend):
+def provision(lp, setup_dir, subobj, message, blank, paths, session_info, 
credentials, ldapbackend):
 subobj.fix(paths)
 
 if subobj.domain_guid is not None:
@@ -432,23 +431,23 @@
 
 # only install a new smb.conf if there isn't one there already
 if not os.path.exists(paths.smbconf):
-message(Setting up smb.conf\n)
+message(Setting up smb.conf)
 setup_file(setup_dir, provision.smb.conf, message, paths.smbconf, 
subobj)
 lp.reload()
 
 # only install a new shares config db if there is none
 if not os.path.exists(paths.shareconf):
-message(Setting 

svn commit: samba r25659 - in branches/4.0-python: . source/pidl/tests source/scripting source/scripting/bin source/scripting/python/samba source/setup

2007-10-15 Thread jelmer
Author: jelmer
Date: 2007-10-15 20:19:20 + (Mon, 15 Oct 2007)
New Revision: 25659

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

Log:
More fixes.
Removed:
   branches/4.0-python/source/pidl/tests/samba-ejs.pl
   branches/4.0-python/source/scripting/ejs/
Modified:
   branches/4.0-python/
   branches/4.0-python/source/scripting/bin/smbstatus
   branches/4.0-python/source/scripting/bin/winreg
   branches/4.0-python/source/scripting/python/samba/__init__.py
   branches/4.0-python/source/scripting/python/samba/provision.py
   branches/4.0-python/source/setup/provision
   branches/4.0-python/source/setup/setpassword
   branches/4.0-python/source/setup/upgrade


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


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-53-g97f9a90

2007-10-15 Thread Gerald (Jerry) Carter
The branch, v3-2-test has been updated
   via  97f9a90b823887e808cca96eca7a041f121e6111 (commit)
  from  357f00384994946485a5190b6a9c493aeee53cd2 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit 97f9a90b823887e808cca96eca7a041f121e6111
Author: Alexander Bokovoy [EMAIL PROTECTED]
Date:   Mon Oct 15 07:24:44 2007 +0400

Correctly free memory in regfio paths

---

Summary of changes:
 source/registry/regfio.c |4 
 source/utils/profiles.c  |5 -
 2 files changed, 8 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/registry/regfio.c b/source/registry/regfio.c
index 6dca0ba..93a2770 100644
--- a/source/registry/regfio.c
+++ b/source/registry/regfio.c
@@ -1171,6 +1171,7 @@ out:

if ( !(rb-mem_ctx = talloc_init( read_regf_block )) ) {
regfio_close( rb );
+   SAFE_FREE(rb);
return NULL;
}
 
@@ -1181,6 +1182,7 @@ out:
if ( (rb-fd = open(filename, flags, mode)) == -1 ) {
DEBUG(0,(regfio_open: failure to open %s (%s)\n, filename, 
strerror(errno)));
regfio_close( rb );
+   SAFE_FREE(rb);
return NULL;
}

@@ -1190,6 +1192,7 @@ out:
if ( !init_regf_block( rb ) ) {
DEBUG(0,(regfio_open: Failed to read initial REGF 
block\n));
regfio_close( rb );
+   SAFE_FREE(rb);
return NULL;
}

@@ -1202,6 +1205,7 @@ out:
if ( !read_regf_block( rb ) ) {
DEBUG(0,(regfio_open: Failed to read initial REGF block\n));
regfio_close( rb );
+   SAFE_FREE(rb);
return NULL;
}

diff --git a/source/utils/profiles.c b/source/utils/profiles.c
index 7c7b91a..921af56 100644
--- a/source/utils/profiles.c
+++ b/source/utils/profiles.c
@@ -138,6 +138,7 @@ static BOOL copy_registry_tree( REGF_FILE *infile, 
REGF_NK_REC *nk,
}
 
if ( !(values = TALLOC_ZERO_P( subkeys, REGVAL_CTR )) ) {
+   TALLOC_FREE( subkeys );
DEBUG(0,(copy_registry_tree: talloc() failure!\n));
return False;
}
@@ -163,8 +164,10 @@ static BOOL copy_registry_tree( REGF_FILE *infile, 
REGF_NK_REC *nk,

nk-subkey_index = 0;
while ( (subkey = regfio_fetch_subkey( infile, nk )) ) {
-   if ( !copy_registry_tree( infile, subkey, key, outfile, path ) )
+   if ( !copy_registry_tree( infile, subkey, key, outfile, path ) 
) {
+   TALLOC_FREE( subkeys );
return False;
+   }
}
 
/* values is a talloc()'d child of subkeys here so just throw it all 
away */


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-56-g5c8adce

2007-10-15 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  5c8adce3f368d51a67d74ae168a0f59a20e1d64c (commit)
   via  4a56b697b6adcf095e25895c4a9ba3192ed34124 (commit)
   via  406737cd9a34ac498e5823b380e1768d41e16c1b (commit)
  from  97f9a90b823887e808cca96eca7a041f121e6111 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -
commit 5c8adce3f368d51a67d74ae168a0f59a20e1d64c
Merge: 4a56b697b6adcf095e25895c4a9ba3192ed34124 
97f9a90b823887e808cca96eca7a041f121e6111
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Mon Oct 15 16:12:01 2007 -0700

Merge branch 'v3-2-test' of ssh://[EMAIL PROTECTED]/data/git/samba into 
v3-2-test

commit 4a56b697b6adcf095e25895c4a9ba3192ed34124
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Mon Oct 15 16:11:48 2007 -0700

Move to protocol independent code in most of lib/util_sock.c
We don't use gethostbyname any more except in one case where
we're looking for host aliases (I don't know how to do that
with getaddrinfo yet). New function should be getaddrinfo().
Next step will be fixing lib/access.c, and then changing
libsmb/namequery.c to cope with IPv6 address returns.
Jeremy.

commit 406737cd9a34ac498e5823b380e1768d41e16c1b
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Mon Oct 15 15:52:30 2007 -0700

Fix warning messages for unused variables.
Jeremy.

---

Summary of changes:
 source/lib/interface.c |6 +-
 source/lib/system.c|   43 
 source/lib/util.c  |  105 ---
 source/lib/util_sock.c |  337 +---
 source/lib/version.c   |4 +-
 source/libsmb/namequery.c  |   60 +-
 source/nsswitch/winbind_krb5_locator.c |3 +-
 7 files changed, 317 insertions(+), 241 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/interface.c b/source/lib/interface.c
index ded7068..d2aa69a 100644
--- a/source/lib/interface.c
+++ b/source/lib/interface.c
@@ -461,7 +461,7 @@ static void interpret_interface(char *token)
/* maybe it is a DNS name */
p = strchr_m(token,'/');
if (p == NULL) {
-   if (!interpret_string_addr(ss, token)) {
+   if (!interpret_string_addr(ss, token, 0)) {
DEBUG(2, (interpret_interface: Can't find address 
  for %s\n, token));
return;
@@ -481,7 +481,7 @@ static void interpret_interface(char *token)
 
/* parse it into an IP address/netmasklength pair */
*p = 0;
-   goodaddr = interpret_string_addr(ss, token);
+   goodaddr = interpret_string_addr(ss, token, 0);
*p++ = '/';
 
if (!goodaddr) {
@@ -492,7 +492,7 @@ static void interpret_interface(char *token)
}
 
if (strlen(p)  2) {
-   goodaddr = interpret_string_addr(ss_mask, p);
+   goodaddr = interpret_string_addr(ss_mask, p, 0);
if (!goodaddr) {
DEBUG(2,(interpret_interface: 
can't determine netmask from %s\n,
diff --git a/source/lib/system.c b/source/lib/system.c
index bc7de84..bf35722 100644
--- a/source/lib/system.c
+++ b/source/lib/system.c
@@ -682,49 +682,6 @@ int sys_chroot(const char *dname)
 #endif
 }
 
-/**
-A wrapper for gethostbyname() that tries avoids looking up hostnames
-in the root domain, which can cause dial-on-demand links to come up for no
-apparent reason.
-/
-
-struct hostent *sys_gethostbyname(const char *name)
-{
-#ifdef REDUCE_ROOT_DNS_LOOKUPS
-   char query[HOST_NAME_MAX], hostname[HOST_NAME_MAX];
-   char *domain;
-
-   /* Does this name have any dots in it? If so, make no change */
-
-   if (strchr_m(name, '.'))
-   return(gethostbyname(name));
-
-   /* Get my hostname, which should have domain name
-   attached. If not, just do the gethostname on the
-   original string.
-   */
-
-   gethostname(hostname, sizeof(hostname) - 1);
-   hostname[sizeof(hostname) - 1] = 0;
-   if ((domain = strchr_m(hostname, '.')) == NULL)
-   return(gethostbyname(name));
-
-   /* Attach domain name to query and do modified query.
-   If names too large, just do gethostname on the
-   original string.
-   */
-
-   if((strlen(name) + strlen(domain)) = sizeof(query))
-   return(gethostbyname(name));
-
-   slprintf(query, sizeof(query)-1, %s%s, name, domain);
-   return(gethostbyname(query));
-#else /* REDUCE_ROOT_DNS_LOOKUPS */
-   return(gethostbyname(name));
-#endif /* REDUCE_ROOT_DNS_LOOKUPS 

Build status as of Tue Oct 16 00:00:01 2007

2007-10-15 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2007-10-15 
00:01:01.0 +
+++ /home/build/master/cache/broken_results.txt 2007-10-16 00:01:03.0 
+
@@ -1,25 +1,25 @@
-Build status as of Mon Oct 15 00:00:02 2007
+Build status as of Tue Oct 16 00:00:01 2007
 
 Build counts:
 Tree Total  Broken Panic 
 SOC  0  0  0 
 build_farm   0  0  0 
-ccache   30 10 0 
+ccache   28 10 0 
 ctdb 0  0  0 
 distcc   1  0  0 
-ldb  30 6  0 
-libreplace   29 10 0 
-lorikeet-heimdal 23 14 0 
-pidl 17 4  0 
-ppp  10 7  0 
+ldb  28 6  0 
+libreplace   27 10 0 
+lorikeet-heimdal 21 14 0 
+pidl 15 2  0 
+ppp  8  7  0 
 python   0  0  0 
-rsync30 13 0 
+rsync28 13 0 
 samba-docs   0  0  0 
 samba-gtk2  2  0 
-samba4   27 19 4 
-samba_3_229 28 2 
-samba_3_2_test 26 26 0 
-smb-build29 29 0 
-talloc   30 1  0 
-tdb  30 3  0 
+samba4   25 17 4 
+samba_3_22  2  0 
+samba_3_2_test 26 25 0 
+smb-build27 27 0 
+talloc   28 1  0 
+tdb  28 3  0 
 


svn commit: samba r25660 - in branches/SAMBA_4_0/source: auth/ntlmssp lib/util

2007-10-15 Thread abartlet
Author: abartlet
Date: 2007-10-16 01:27:15 + (Tue, 16 Oct 2007)
New Revision: 25660

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

Log:
Add a new interface 'generate_secret_buffer()', to be used when we
require top-quality entropy.  We don't want to waste system enropy
generating challenges (which simply need to be unpredictable, not
secret) or when generating UUIDs.

Rework generate_random_buffer() to use /dev/urandom less often, only
to seed the existing RC4 based PRNG.  (With an exception to ensure we
don't waste this setup cost for very small entropy requests).

Perhaps we should be using heimdal's code for this instead?

This should drasticly reduce our entropy use, particularly in the
build farm (automated Samba build on hosts without much other source
of entropy).

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp_client.c
   branches/SAMBA_4_0/source/lib/util/genrand.c
   branches/SAMBA_4_0/source/lib/util/util.h


Changeset:
Modified: branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp_client.c
===
--- branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp_client.c 2007-10-15 
20:19:20 UTC (rev 25659)
+++ branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp_client.c 2007-10-16 
01:27:15 UTC (rev 25660)
@@ -226,7 +226,7 @@
if (gensec_ntlmssp_state-neg_flags  NTLMSSP_NEGOTIATE_KEY_EXCH) {
/* Make up a new session key */
uint8_t client_session_key[16];
-   generate_random_buffer(client_session_key, 
sizeof(client_session_key));
+   generate_secret_buffer(client_session_key, 
sizeof(client_session_key));
 
/* Encrypt the new session key with the old one */
encrypted_session_key = data_blob_talloc(gensec_ntlmssp_state, 

Modified: branches/SAMBA_4_0/source/lib/util/genrand.c
===
--- branches/SAMBA_4_0/source/lib/util/genrand.c2007-10-15 20:19:20 UTC 
(rev 25659)
+++ branches/SAMBA_4_0/source/lib/util/genrand.c2007-10-16 01:27:15 UTC 
(rev 25660)
@@ -33,6 +33,10 @@
 static uint32_t counter;
 
 static bool done_reseed = false;
+static unsigned int bytes_since_reseed = 0;
+
+static int urand_fd = -1;
+
 static void (*reseed_callback)(int *newseed);
 
 /**
@@ -51,6 +55,7 @@
 _PUBLIC_ void set_need_random_reseed(void)
 {
done_reseed = false;
+   bytes_since_reseed = 0;
 }
 
 static void get_rand_reseed_data(int *reseed_data)
@@ -163,12 +168,16 @@
int reseed_data = 0;
 
if (use_fd) {
-   if (fd != -1)
+   if (fd == -1) {
+   fd = open( /dev/urandom, O_RDONLY,0);
+   }
+   if (fd != -1
+(read(fd, seed_inbuf, sizeof(seed_inbuf)) == 
sizeof(seed_inbuf))) {
+   DEBUG(0, (do_reseed: need %d\n, sizeof(seed_inbuf)));
+   call_backtrace();
+   seed_random_stream(seed_inbuf, sizeof(seed_inbuf));
return fd;
-
-   fd = open( /dev/urandom, O_RDONLY,0);
-   if(fd = 0)
-   return fd;
+   }
}
 
/* Add in some secret file contents */
@@ -205,31 +214,36 @@
 
 /**
  Interface to the (hopefully) good crypto random number generator.
+ Will use our internal PRNG if more than 40 bytes of random generation
+ has been requested, otherwise tries to read from /dev/random
 **/
 _PUBLIC_ void generate_random_buffer(uint8_t *out, int len)
 {
-   static int urand_fd = -1;
unsigned char md4_buf[64];
unsigned char tmp_buf[16];
unsigned char *p;
 
if(!done_reseed) {
+   bytes_since_reseed += len;
+   
+   /* Magic constant to try and avoid reading 40 bytes
+* and setting up the PRNG if the app only ever wants
+* a few bytes */
+   if (bytes_since_reseed  40) {
+   if (urand_fd == -1) {
+   urand_fd = open( /dev/urandom, O_RDONLY,0);
+   }
+   DEBUG(0, (generate_random_buffer: need %d\n, len));
+   call_backtrace();
+   if(urand_fd != -1  (read(urand_fd, out, len) == len)) 
{
+   return;
+   }
+   }
+
urand_fd = do_reseed(true, urand_fd);
done_reseed = true;
}
 
-   if (urand_fd != -1  len  0) {
-
-   if (read(urand_fd, out, len) == len)
-   return; /* len bytes of random data read from urandom. 
*/
-
-   /* Read of urand error, drop back to non urand method. */
-   close(urand_fd);
-   urand_fd = -1;
-   do_reseed(false, -1);
-   done_reseed = true;
- 

svn commit: samba r25661 - in branches/SAMBA_4_0/source/lib/util: .

2007-10-15 Thread abartlet
Author: abartlet
Date: 2007-10-16 05:26:15 + (Tue, 16 Oct 2007)
New Revision: 25661

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

Log:
We don't actually need to know with DEBUG(0, ... every time we ask for
some random bytes.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/lib/util/genrand.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/util/genrand.c
===
--- branches/SAMBA_4_0/source/lib/util/genrand.c2007-10-16 01:27:15 UTC 
(rev 25660)
+++ branches/SAMBA_4_0/source/lib/util/genrand.c2007-10-16 05:26:15 UTC 
(rev 25661)
@@ -173,8 +173,6 @@
}
if (fd != -1
 (read(fd, seed_inbuf, sizeof(seed_inbuf)) == 
sizeof(seed_inbuf))) {
-   DEBUG(0, (do_reseed: need %d\n, sizeof(seed_inbuf)));
-   call_backtrace();
seed_random_stream(seed_inbuf, sizeof(seed_inbuf));
return fd;
}
@@ -233,8 +231,6 @@
if (urand_fd == -1) {
urand_fd = open( /dev/urandom, O_RDONLY,0);
}
-   DEBUG(0, (generate_random_buffer: need %d\n, len));
-   call_backtrace();
if(urand_fd != -1  (read(urand_fd, out, len) == len)) 
{
return;
}
@@ -272,8 +268,6 @@
if (urand_fd == -1) {
urand_fd = open( /dev/urandom, O_RDONLY,0);
}
-   DEBUG(0, (generate_random_buffer: need %d\n, len));
-   call_backtrace();
if(urand_fd != -1  (read(urand_fd, out, len) == len)) {
return;
}