[Samba] Printing; privileges separation

2007-11-08 Thread Roel van Meer

Hi list,

I'm using samba 3.0.26a with cups as printing backend, which are both 
working fine. However, I would like to grant all users access to all print 
jobs, but without granting them the right to add or modify printers and 
printer settings.


When I grant users the SePrintOperatorPrivilege privilege, they can indeed 
cancel other people's jobs, but then they can also rename printers on the 
server (which breaks things).


Does anyone know if it is possible to separate access to these two 
operations, or to grant normal users the right to remove other people's jobs 
without them having the SePrintOperatorPrivilege priv?


Thanks in advance for any input,

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


Re: [Samba] net rpc join -U root error

2007-11-08 Thread Adam Williams
Thanks, I figured it out.  looking at /var/log/samba/smbd it was trying 
to connect to openldap but couldn't.  I had to rerun smbpasswd -w xx 
and then it was ok, and then I ran:


[EMAIL PROTECTED] ~]# net rpc join -D ADMIN -U root
Password:
Joined domain ADMIN.
[EMAIL PROTECTED] ~]# net rpc join -U root
Password:
Joined domain ADMIN.
[EMAIL PROTECTED] ~]# net rpc testjoin -S GOMER -U root
Join to 'ADMIN' is OK


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


[Samba] hide unreadable files

2007-11-08 Thread Diego Alejandro Cheda

Hi all!
 
I have a problem with the hide unreadable = yes option. In windows xp 
professional sp2 with explorer, or ssh or smbclient, either directories and 
files does not hide. 
 
I'm using debian 4.0 with XFS file system, ACL, kernel 2.6.18-5-amd64, and 
samba 3.0.24. 
 
Any idea? It is a bug?
 
Thanks!
 
--
Diego
_
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Samba and Cups AllowUser - not working.

2007-11-08 Thread Dean Montgomery
Windows98 -to- samba print share -to- cups does not obey cups' 
[EMAIL PROTECTED] protocol.   Where teachers is the primary group for the 
user.  The cups log shows - client-error-not-possible.  When we disable 
AllowUser then printing works.  Printing from Linux workstation obeys the 
AllowUser protocol - it is just win98 through samba.  We suspect cups/samba 
is not looking up primary groups only secondary groups or cups/samba is not 
looking up groups at all.

running debian etch:
* cupsys 1.2.7-4
* samba 3.0.24-6etch4 
-- 
Dean Montgomery
Network Support Tech./Programmer
School District #73
-- 
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 problems

2007-11-08 Thread Marcelo Mogrovejo

Hello...

Edmundo Valle Neto wrote:

Marcelo Mogrovejo escreveu:

Hello Edmundo


(...)


So, yes, i have configured this file already:
passwd: compat ldap
shadow: compat ldap
group:   compat ldap

I have downloaded the libnss-ldap file too but it's the same...


Yes, this package must be installed too, nsswitch.conf says where to 
read and libnss-ldap says how to do it when using LDAP. Normally 
answering debconf properly when installing the package is enough to 
make it work and messing with /etc/libnss-ldap.conf isn't needed.



I can't make it to work...

If i try to create a posixAccount in phpLDAPadmin it show me the error:
Could not add the object to the LDAP server.

LDAP said: Object class violation
Error number: 0x41 (LDAP_OBJECT_CLASS_VIOLATION)
Description: You tried to perform an operation that would cause an 
undefined attribute to exist or that would remove a required 
attribute, given the current list of ObjectClasses. This can also 
occur if you do not specify a structural objectClass when creating an 
entry, or if you specify more than one structural objectClass.


Doesn't make much sense trying anything else if your NSS doesn't work, 
make it work isn't optional.
If you have populated LDAP successfully with smbldap-populate at least 
the administrator and nobody accounts (or whatever was inserted in the 
base) must appear with getent. (you can make sure what was inserted 
doing a slapcat).

Ok with slapcat i see the user testuser created... but i saw it in
phpldapadmin before.
Here i cut and paste a last section of slapcat out:

dn: uid=testuser,ou=Users,dc=skull-one,dc=com,dc=ar
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
cn: testuser
sn: testuser
givenName: testuser
uid: testuser
uidNumber: 1564
gidNumber: 513
homeDirectory: /home/testuser
loginShell: /bin/bash
gecos: System User
structuralObjectClass: inetOrgPerson
entryUUID: c1028b56-21df-102c-8a0d-63a789f5531c
creatorsName: cn=Manager,dc=skull-one,dc=com,dc=ar
createTimestamp: 20071108004614Z
userPassword:: e1NTSEF9KzM0SzNxejVOZnJLNTJzK3pkaGVYam11QWpSM1FYcE4=
shadowLastChange: 13825
shadowMax: 45
entryCSN: 20071108004653Z#00#00#00
modifiersName: cn=Manager,dc=skull-one,dc=com,dc=ar
modifyTimestamp: 20071108004653Z



And the rare is, when i create the account with smbldap-useradd -m 
testuser it create the home directory at /home/testuser but i don't 
know why it doesn't create a uid


Ok, -m makes the home directory, but what do you mean by doesn't 
create a uid? Its only a perl script that inserts something in the 
base directly, it doesn't fail when lacking NSS. A dump of the base 
with slapcat doesn't show the user? The command give any error? If the 
user isn't in the base your smbldap-tools install is broken too.



I mean that i don't know why the user linux is not created, why i don't
see him with getent passwd.
The command work fine without errors.

So all of this means smbldap-tools is broken ??

Regards.

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


[Samba] Windows bombarding Samba looking for share that does not exist

2007-11-08 Thread Andy Liebman
I have a strange problem and I'm hoping that somebody on the list 
recognizes what it is.


I am running Samba 3.0.23d on a Linux box with 2.6.20.15 kernel.
I am connecting from 5 or 6 Windows XP SP 2 boxes.

A share on the Linux box exists called Music (Note the UPPER CASE 
M). The share is accessible to all users who have smbpasswords on the 
Linux box.


Most Windows users are successfully connecting to the share and mapping 
it as a network drive. However, ONE Windows machine periodically hits 
the Linux server with thousands of requests to connect to service 
called music (note the lower case m) instead of Music.  There are 
thousands of error messages in the logs saying


Nov  8 02:45:13 fileserver smbd[8516]: [2007/11/08 02:45:13, 0] 
smbd/service.c:make_connection()
Nov  8 02:45:13 fileserver smbd[8516]:   johnpc (10.0.0.43) couldn't 
find service music


This occurs several times a day.

When other users try to connect to the share, the samba logs clearly 
show they are connecting to the service Music


Is there any way that Windows could have have been told at one point -- 
or thought it was told -- to connect to a share called music and that 
Windows is stubbornly continuing to try to connect? Even after rebooting 
the Windows box? Windows definitely never saw a shared called music by 
browsing because a share by that name has never existed on the Linux box.


Maybe another clue is that there are also some less frequent errors in 
the logs that say:


Nov  5 02:46:13 fileserver smbd[32209]:   make_connection: connection to 
Music denied due to security descriptor.
Nov  5 02:46:13 fileserver smbd[32209]: [2007/11/05 02:46:13, 0] 
smbd/service.c:make_connection_snum(782)


As I said, most users have no problem connecting to this share.

Hope this rings a bell for somebody out there...
Andy


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


[Samba] map user homes to a windows share

2007-11-08 Thread Elvar

Hello everyone,


I've been tasked with setting up several computer labs in a school with 
Ubuntu workstations. I have successfully joined those workstations to 
the windows domain and set it up so they authenticate to the windows 
domain as well. My problem is that I need to figure out how to have each 
user's home folder on the Ubuntu boxes map to the users home folder on 
the windows 2003 server. The share location of their home folders on the 
windows 2003 server is something like 
\\servername\docs$\students\%username%. I'm not even sure if I can map 
to a hidden share $ in samba and also specify the %username% variable.


Any help on this would be greatly appreciated.


Kind regards,
Elvar

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


Re: [Samba] hide unreadable files

2007-11-08 Thread Charles Marcus

On 11/8/2007, Diego Alejandro Cheda ([EMAIL PROTECTED]) wrote:
I have a problem with the hide unreadable = yes option. In windows 
xp professional sp2 with explorer, or ssh or smbclient, either 
directories and files does not hide. 


Do you have 'Tools  Folder options  View  Show hidden files and 
folders' enabled on the windows workstations?


--

Best regards,

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


[Samba] Windows bombarding Samba looking for share that does not exist

2007-11-08 Thread andyliebman
I have a strange problem and I'm hoping that somebody on the list 
recognizes what it is.


I am running Samba 3.0.23d on a Linux box with 2.6.20.15 kernel.
I am connecting from 5 or 6 Windows XP SP 2 boxes.

There is a share on the Linux box called Music (Note the UPPER CASE 
M). The share is accessible to all users who have smbpasswords on the 
Linux box.


Most Windows users are successfully connecting to the share and mapping 
it as a network drive. However, ONE Windows machine periodically hits 
the Linux server with thousands of requests to connect to service 
called music (note the lower case m) instead of Music.  There are 
thousands of error messages in the logs saying


Nov  8 02:45:13 fileserver smbd[8516]: [2007/11/08 02:45:13, 0] 
smbd/service.c:make_connection()
Nov  8 02:45:13 fileserver smbd[8516]:   johnpc (10.0.0.43) couldn't 
find service music


This occurs several times a day.

When other users try to connect to the share, the samba logs clearly 
show they are connecting to the service Music


2007/11/08 10:19:07, 1] smbd/service.c:make_connection_snum(950)
  office1 (10.0.0.63) connect to service Music initially as user john 
(uid=507, gid=529) (pid 17601)


Is there any way that the problematic Windows machine could have have 
been told at one point -- or thought it was told -- to connect to a 
share called music and that Windows is stubbornly continuing to try 
to connect? Even after rebooting the Windows box? Windows definitely 
never saw a share called music by browsing because a share by that 
name has never existed on the Linux box.


Maybe another clue is that there are also some less frequent errors in 
the logs that say:


Nov  5 02:46:13 fileserver smbd[32209]:   make_connection: connection 
to Music denied due to security descriptor.
Nov  5 02:46:13 fileserver smbd[32209]: [2007/11/05 02:46:13, 0] 
smbd/service.c:make_connection_snum(782)


As I said, most users have no problem connecting to this share.

Hope this rings a bell for somebody out there...
Andy



Email and AIM finally together. You've gotta check out free AOL Mail! - 
http://mail.aol.com

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


[Samba] Getting an error when joing a windows 2003 domain controller

2007-11-08 Thread David kacuba
Im getting an erro while joing my domain in AD windows 2003
   
  [EMAIL PROTECTED] etc]# net ads join -Uadministrator%password 
Using short domain name -- FAMILYENRICHMEN
Failed to set servicePrincipalNames. Please ensure that
the DNS domain of this server matches the AD domain,
Or rejoin with using Domain Admin credentials.
Deleted account for 'TESTSERVER' in realm 'FAMILYENRICHMENTNETWORK.LOCAL'
Failed to join domain: Type or value exists
   
   
   
   
  here is my /etc/hosts 
   
  192.168.0.1 server1.familyenrichmentnetwork.local server1
   
  here is my /etc/krb5.conf
  [logging]
 default = FILE:/var/log/krb5libs.log
 kdc = FILE:/var/log/krb5kdc.log
 admin_server = FILE:/var/log/kadmind.log
  [libdefaults]
 default_realm = FamilyEnrichmentNetwork.local
 dns_lookup_realm = NO
 default_etypes_des = des-cbc-crc des-cbc-md
 default_etypes_des = des-cbc-crc des-cbc-md5
 dns_lookup_kdc = NO
 ticket_lifetime = 2400
 forwardable = yes
  [realms]
  FamilyEnrichmentNetwork.local = {
  kdc = server1.FamilyEnrichmentNetwork.local
  default_domain = FamilyEnrichmentNetwork.local
  kdc = FamilyEnrichmentNetwork.local
  Kdc = 192.168.0.1
  admin_server = server1.FamilyEnrichmentNetwork.local
 }

  here is my smb.conf
   
  [global]
log file = /var/log/samba/log.%m
load printers = yes
idmap gid = 1-2
auth methods = winbind
ntlm auth = no
client use spnego = yes
winbind trusted domains only = yes
encrypt passwords = yes
realm = FamilyEnrichmentNetwork.local
winbind use default domain = yes
use kerberos keytab = yes
passdb backend = tdbsam
netbios aliases = TESTSERVER
cups options = raw
server string = test server
winbind enum users = yes
idmap uid = 1-2
password server = Server1.FamilyEnrichmentNetwork.local
remote announce = 192.168.0.1
workgroup = FamilyEnrichmen
client lanman auth = no
os level = 20
winbind enum groups = yes
server signing = auto
security = ads
max log size = 50
  # --- Domain Members Options 
#
# Security must be set to domain or ads
  # Use password server option only with security = server or if you can't
# use the DNS to locate Domain Controllers
# The argument list may include:
#   password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
# or to auto-locate the domain controller/s
#   password server = 
  
;   security = ads
;   passdb backend = tdbsam
;   realm = FamilyEnrichmentNetwork.local
  ;   password server = 192.168.0.1
   
   # --- Domain Controller Options 

#
# Security must be set to user for domain controllers
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
#
# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
#

  security = ads
;   passdb backend = tdbsam
  ;   domain master = no
;   domain logons = no
  # the login script name depends on the machine name
;   logon script = %m.bat
# the login script name depends on the unix user used
;   logon script = %u.bat
;   logon path = \\%L\Profiles\%u
# disables profiles support by specifing an empty path
;   logon path =
  ;   add user script = /usr/sbin/useradd %u -n -g users
;   add group script = /usr/sbin/groupadd %g
   
   
  Thnaks for your help
   
   
   

 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] map user homes to a windows share

2007-11-08 Thread Michael Heydon



Elvar wrote:
My problem is that I need to figure out how to have each user's home 
folder on the Ubuntu boxes map to the users home folder on the windows 
2003 server. The share location of their home folders on the windows 
2003 server is something like \\servername\docs$\students\%username%. 
I'm not even sure if I can map to a hidden share $ in samba and also 
specify the %username% variable.
The simplest solution would be to simply mount \\servername\docs$ or 
possibly \\servername\docs$\students\ (From memory, you can't mount a 
directory under linux, only a share). You could then setup symlinks or 
change the home directory for the users. This would be much simpler than 
having a seperate mount for every user.


If you really want to do it your way, it may be possible using a mixture 
of sudo, backticks (`) and the whoami command. I really don't see any 
benefit though.


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


Re: [Samba] smbpasswd and 8 character limit

2007-11-08 Thread Ryan Novosielski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

This is the most current, I would think, source of information on
Solaris (since it is newer than Solaris 10, even). There would be a
rather large implication here that larger than 8 character names will
present a problem:

http://www.opensolaris.org/os/community/security/library/long_usernames/

Gaiseric Vandal wrote:
 The problem is with passwords that exceed 8 characters, not usernames.
  Solaris (at least Solaris 9 ) will let you create usernames with more
 than 8 characters-  (although it complains about.)  Most of the
 usernames are 8 characters or less, including the test account.And
 I would think that the unix password store is usually irrelevant to
 samba anyway (with the exception of password syncing.)
 
 Older versions of Solaris did have an issue with unix passwd length
 (basically any characters beyond 8 were ignored.)Switching from
 DES to MD5 password encryption seems to have fixed this.
 
 
 I will try compiling 3.026a on a linux box  (or 3.024 on solaris) and
 see if it really is Solaris specific.
 
 
 
 On Nov 7, 2007 4:14 PM, Ryan Novosielski [EMAIL PROTECTED] wrote:
 I can confirm that Solaris only allows 8 character usernames (just
 looked this up last week). As such, your usage of /etc/passwd (or
 whatever other PAM backend) is likely the problem.
 
 Eric Diven wrote:
 I'm pretty sure it's Solaris specific, I didn't have problems on my
 CentOS box I've been using as a reference machine.  See this bug in
 bugzilla: https://bugzilla.samba.org/show_bug.cgi?id=4863

 ~Eric

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf
 Of Gaiseric Vandal
 Sent: Friday, November 02, 2007 5:04 PM
 To: Samba
 Subject: [Samba] smbpasswd and 8 character limit

 The smbpasswd on my PDC (Solaris 9, Samba 3.026a) will truncate or
 corrupt passwords over 8 chars.

 The smbpasswd command on the linux clients (Samba 3.024a) is OK.
 Anyone know if this is a samba version issue or something solaris
 specific.

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

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


- --
  _  _ _  _ ___  _  _  _
 |Y#| |  | |\/| |  \ |\ |  | |Ryan Novosielski - Systems Programmer II
 |$| |__| |  | |__/ | \| _| |[EMAIL PROTECTED] - 973/972.0922 (2-0922)
 \__/ Univ. of Med. and Dent.|IST/AST - NJMS Medical Science Bldg - C630
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHM427mb+gadEcsb4RAsK9AJ9ZY/kE5OjI4A1qrbW1wxXkHxiVbwCeL8Hp
o1D3lKlSH4Lqa5r7ELl85cU=
=WMed
-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] smbpasswd and 8 character limit

2007-11-08 Thread Gaiseric Vandal
The problem is with passwords that exceed 8 characters, not usernames.
 Solaris (at least Solaris 9 ) will let you create usernames with more
than 8 characters-  (although it complains about.)  Most of the
usernames are 8 characters or less, including the test account.And
I would think that the unix password store is usually irrelevant to
samba anyway (with the exception of password syncing.)

Older versions of Solaris did have an issue with unix passwd length
(basically any characters beyond 8 were ignored.)Switching from
DES to MD5 password encryption seems to have fixed this.


I will try compiling 3.026a on a linux box  (or 3.024 on solaris) and
see if it really is Solaris specific.



On Nov 7, 2007 4:14 PM, Ryan Novosielski [EMAIL PROTECTED] wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 I can confirm that Solaris only allows 8 character usernames (just
 looked this up last week). As such, your usage of /etc/passwd (or
 whatever other PAM backend) is likely the problem.

 Eric Diven wrote:
  I'm pretty sure it's Solaris specific, I didn't have problems on my
  CentOS box I've been using as a reference machine.  See this bug in
  bugzilla: https://bugzilla.samba.org/show_bug.cgi?id=4863
 
  ~Eric
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf
  Of Gaiseric Vandal
  Sent: Friday, November 02, 2007 5:04 PM
  To: Samba
  Subject: [Samba] smbpasswd and 8 character limit
 
  The smbpasswd on my PDC (Solaris 9, Samba 3.026a) will truncate or
  corrupt passwords over 8 chars.
 
  The smbpasswd command on the linux clients (Samba 3.024a) is OK.
  Anyone know if this is a samba version issue or something solaris
  specific.
 
  Thanks
  --
  To unsubscribe from this list go to the following URL and read the
  instructions:  https://lists.samba.org/mailman/listinfo/samba
  o/samba

 - --
   _  _ _  _ ___  _  _  _
  |Y#| |  | |\/| |  \ |\ |  | |Ryan Novosielski - Systems Programmer II
  |$| |__| |  | |__/ | \| _| |[EMAIL PROTECTED] - 973/972.0922 (2-0922)
  \__/ Univ. of Med. and Dent.|IST/AST - NJMS Medical Science Bldg - C630
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.5 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

 iD8DBQFHMirImb+gadEcsb4RAm8sAKCigwww8tI4yJ/t0zeeXolrfcOLLwCfSOtt
 YXa2QVJTSMAnuGUzhtetbrc=
 =9KWD
 -END PGP SIGNATURE-
 --

 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] Getting an error when joing a windows 2003 domain controller

2007-11-08 Thread Howard Wilkinson

David kacuba wrote:

Im getting an erro while joing my domain in AD windows 2003
   
  [EMAIL PROTECTED] etc]# net ads join -Uadministrator%password Using short domain name -- FAMILYENRICHMEN

Failed to set servicePrincipalNames. Please ensure that
the DNS domain of this server matches the AD domain,
Or rejoin with using Domain Admin credentials.
Deleted account for 'TESTSERVER' in realm 'FAMILYENRICHMENTNETWORK.LOCAL'
Failed to join domain: Type or value exists
   
   
   
   
  here is my /etc/hosts 
   
  192.168.0.1 server1.familyenrichmentnetwork.local server1
  
This is your problem! The DOMAIN name is limited to 15 characters (so 
are the host names but that includes a terminating $) so only use 14.
   
  here is my /etc/krb5.conf

  [logging]
 default = FILE:/var/log/krb5libs.log
 kdc = FILE:/var/log/krb5kdc.log
 admin_server = FILE:/var/log/kadmind.log
  [libdefaults]
 default_realm = FamilyEnrichmentNetwork.local
 dns_lookup_realm = NO
 default_etypes_des = des-cbc-crc des-cbc-md
 default_etypes_des = des-cbc-crc des-cbc-md5
 dns_lookup_kdc = NO
 ticket_lifetime = 2400
 forwardable = yes
  [realms]
  FamilyEnrichmentNetwork.local = {
  kdc = server1.FamilyEnrichmentNetwork.local
  default_domain = FamilyEnrichmentNetwork.local
  kdc = FamilyEnrichmentNetwork.local
  Kdc = 192.168.0.1
  admin_server = server1.FamilyEnrichmentNetwork.local
 }

  here is my smb.conf
   
  [global]

log file = /var/log/samba/log.%m
load printers = yes
idmap gid = 1-2
auth methods = winbind
ntlm auth = no
client use spnego = yes
winbind trusted domains only = yes
encrypt passwords = yes
realm = FamilyEnrichmentNetwork.local
winbind use default domain = yes
use kerberos keytab = yes
passdb backend = tdbsam
netbios aliases = TESTSERVER
cups options = raw
server string = test server
winbind enum users = yes
idmap uid = 1-2
password server = Server1.FamilyEnrichmentNetwork.local
remote announce = 192.168.0.1
workgroup = FamilyEnrichmen
client lanman auth = no
os level = 20
winbind enum groups = yes
server signing = auto
security = ads
max log size = 50
  # --- Domain Members Options 
#
# Security must be set to domain or ads
  # Use password server option only with security = server or if you can't
# use the DNS to locate Domain Controllers
# The argument list may include:
#   password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
# or to auto-locate the domain controller/s
#   password server = 
  
;   security = ads

;   passdb backend = tdbsam
;   realm = FamilyEnrichmentNetwork.local
  ;   password server = 192.168.0.1
   
   # --- Domain Controller Options 

#
# Security must be set to user for domain controllers
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
#
# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
#

  security = ads
;   passdb backend = tdbsam
  ;   domain master = no
;   domain logons = no
  # the login script name depends on the machine name
;   logon script = %m.bat
# the login script name depends on the unix user used
;   logon script = %u.bat
;   logon path = \\%L\Profiles\%u
# disables profiles support by specifing an empty path
;   logon path =
  ;   add user script = /usr/sbin/useradd %u -n -g users
;   add group script = /usr/sbin/groupadd %g
   
   
  Thnaks for your help
   
   
   


 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
  



--

Howard Wilkinson



Phone:



+44(20)76907075

Coherent Technology Limited



Fax:





23 Northampton Square,



Mobile:



+44(7980)639379

United Kingdom, EC1V 0HL



Email:



[EMAIL PROTECTED]



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


Re: [Samba] Samba+LDAP problems

2007-11-08 Thread Marcelo Mogrovejo

Hi John...

John H Terpstra wrote:

On Wednesday 07 November 2007 19:00, Marcelo Mogrovejo wrote:
  

Hello...

Edmundo Valle Neto wrote:


Marcelo Mogrovejo escreveu:
  

Hello Edmundo


(...)

  

So, yes, i have configured this file already:
passwd: compat ldap
shadow: compat ldap
group:   compat ldap

I have downloaded the libnss-ldap file too but it's the same...


Yes, this package must be installed too, nsswitch.conf says where to
read and libnss-ldap says how to do it when using LDAP. Normally
answering debconf properly when installing the package is enough to
make it work and messing with /etc/libnss-ldap.conf isn't needed.

  

I can't make it to work...

If i try to create a posixAccount in phpLDAPadmin it show me the error:
Could not add the object to the LDAP server.

LDAP said: Object class violation
Error number: 0x41 (LDAP_OBJECT_CLASS_VIOLATION)
Description: You tried to perform an operation that would cause an
undefined attribute to exist or that would remove a required
attribute, given the current list of ObjectClasses. This can also
occur if you do not specify a structural objectClass when creating an
entry, or if you specify more than one structural objectClass.


Doesn't make much sense trying anything else if your NSS doesn't work,
make it work isn't optional.
If you have populated LDAP successfully with smbldap-populate at least
the administrator and nobody accounts (or whatever was inserted in the
base) must appear with getent. (you can make sure what was inserted
doing a slapcat).
  

Ok with slapcat i see the user testuser created... but i saw it in
phpldapadmin before.
Here i cut and paste a last section of slapcat out:

dn: uid=testuser,ou=Users,dc=skull-one,dc=com,dc=ar
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
cn: testuser
sn: testuser
givenName: testuser
uid: testuser
uidNumber: 1564
gidNumber: 513
homeDirectory: /home/testuser
loginShell: /bin/bash
gecos: System User
structuralObjectClass: inetOrgPerson
entryUUID: c1028b56-21df-102c-8a0d-63a789f5531c
creatorsName: cn=Manager,dc=skull-one,dc=com,dc=ar
createTimestamp: 20071108004614Z
userPassword:: e1NTSEF9KzM0SzNxejVOZnJLNTJzK3pkaGVYam11QWpSM1FYcE4=
shadowLastChange: 13825
shadowMax: 45
entryCSN: 20071108004653Z#00#00#00
modifiersName: cn=Manager,dc=skull-one,dc=com,dc=ar
modifyTimestamp: 20071108004653Z



And the rare is, when i create the account with smbldap-useradd -m
testuser it create the home directory at /home/testuser but i don't
know why it doesn't create a uid


Ok, -m makes the home directory, but what do you mean by doesn't
create a uid? Its only a perl script that inserts something in the
base directly, it doesn't fail when lacking NSS. A dump of the base
with slapcat doesn't show the user? The command give any error? If the
user isn't in the base your smbldap-tools install is broken too.
  

I mean that i don't know why the user linux is not created, why i don't
see him with getent passwd.
The command work fine without errors.

So all of this means smbldap-tools is broken ??



No, it means your NSS is either not configured correctly, or is broken.  How 
have you configured /etc/nsswitch.conf and /etc/ldap.conf?
  

here i show you my /etc/nsswitch.conf and /etc/ldap/ldap.conf

http://pastebin.com/mf74cf2


thanks.

regards


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


[Samba] hide unreadable files

2007-11-08 Thread Diego Alejandro Cheda




Sorry, perhaps I don't explain my problem correctly. Suppose that I have a 
directory dir in a groups share directory. groups and dir has the 
following ACL permissions: groups|   |--- dir # file: groups/# owner: lisa# 
group: adminuser::rwxgroup::r-xgroup:staff:r-x
mask:rwxother:---default:user::rwxdefault:group::r-xdefault:mask:rwxdefault:other:---
 # file: dir/# owner: lisa# group: adminuser::rwxgroup::r-x
mask:rwxother:---default:user::rwxdefault:group::r-xdefault:mask:rwxdefault:other:---
 Then, another user joe (that belongs to staff group) access to the share 
directory groups. I think that joe shouldn't see the directory dir if the 
option hide unreadable is setted to yes. But I this behavior don't occurr 
in my samba 3. joe can see dir. I don't know if this is the correct 
behavior. I hoped that hide unreadable hides that files/directories that 
don't has r flag for the user/group that try to access it. Thanks.
  Diego PD: I try with client windows option  'Tools  Folder options  View  
Show hidden files and folders' disabled. But the incorrect behavior occurrs 
also with linux smbclient.Date: Thu, 8 Nov 2007 12:45:53 -0500 From: 
[EMAIL PROTECTED] To: samba@lists.samba.org Subject: Re: [Samba] hide 
unreadable files  On 11/8/2007, Diego Alejandro Cheda ([EMAIL PROTECTED]) 
wrote:  I have a problem with the hide unreadable = yes option. In windows 
  xp professional sp2 with explorer, or ssh or smbclient, either   
directories and files does not hide.   Do you have 'Tools  Folder options  
View  Show hidden files and  folders' enabled on the windows workstations?  
--   Best regards,  Charles --  To unsubscribe from this list go to the 
following URL and read the instructions: 
https://lists.samba.org/mailman/listinfo/samba

Express yourself instantly with MSN Messenger! MSN Messenger 
_
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] nmbd keeps trying to contact IP Address on wrong network

2007-11-08 Thread Ray Anderson

[EMAIL PROTECTED] wrote:
Looking for a solution to this problem. I have Googled all over the 
place but haven't found a definitive answer.


I have a Samba Server that ONCE was on a network where there was 
SECOND Samba Server with IP Address 192.168.20.3. Today, the FIRST 
server is on a network with an address range 10.0.0.0/255.255.255.0 
and it has no way of finding that SECOND Server 192.168.20.3.  
However, /var/log/messages is full of errors that say:


Nov  4 04:07:29 fileserver nmbd[5248]: [2007/11/04 04:07:29, 0] 
libsmb/nmblib.c:send_udp(791)
Nov  4 04:07:29 fileserver nmbd[5248]:   Packet send failed to 
192.168.20.3(137) ERRNO=Network is unreachable
Nov  4 04:07:29 fileserver nmbd[5248]: [2007/11/04 04:07:29, 0] 
nmbd/nmbd_packets.c:send_netbios_packet(163)
Nov  4 04:07:29 fileserver nmbd[5248]:   send_netbios_packet: 
send_packet() to IP 192.168.20.3 port 137 failed
Nov  4 04:07:29 fileserver nmbd[5248]: [2007/11/04 04:07:29, 0] 
nmbd/nmbd_namequery.c:query_name(245)
Nov  4 04:07:29 fileserver nmbd[5248]:   query_name: Failed to send 
packet trying to query name ACCOUNTING1b


I can see that the file /var/cache/samba/wins.dat includes a reference 
to the IP Address 192.168.20.3 (I have seen some postings suggesting 
that wins.dat can be the cause of this error).  If I delete wins.dat 
and restart samba, the reference to 192.168.20.3 comes back.


I can state with total confidence that there are no network interfaces 
on this machine configured to be in the 192.168.20.x range. In fact, 
only one of 3 network interfaces is currently active and has an IP 
Address.


Is there any way that I can get this Samba Server to stop looking for 
192.168.20.3?


-- Andy

Email and AIM finally together. You've gotta check out free AOL Mail! 
- http://mail.aol.com


I had a similar problem -- deleted wins.dat and forced the entry in 
smb.conf:


interfaces = eth0

restarting the service wasn't enough -- had to STOP the service(s) and 
then restart.


That fixed it.

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


[Samba] nmbd keeps trying to contact IP Address on wrong network

2007-11-08 Thread andyliebman
Looking for a solution to this problem. I have Googled all over the 
place but haven't found a definitive answer.


I have a Samba Server that ONCE was on a network where there was SECOND 
Samba Server with IP Address 192.168.20.3. Today, the FIRST server is 
on a network with an address range 10.0.0.0/255.255.255.0 and it has no 
way of finding that SECOND Server 192.168.20.3.  However, 
/var/log/messages is full of errors that say:


Nov  4 04:07:29 fileserver nmbd[5248]: [2007/11/04 04:07:29, 0] 
libsmb/nmblib.c:send_udp(791)
Nov  4 04:07:29 fileserver nmbd[5248]:   Packet send failed to 
192.168.20.3(137) ERRNO=Network is unreachable
Nov  4 04:07:29 fileserver nmbd[5248]: [2007/11/04 04:07:29, 0] 
nmbd/nmbd_packets.c:send_netbios_packet(163)
Nov  4 04:07:29 fileserver nmbd[5248]:   send_netbios_packet: 
send_packet() to IP 192.168.20.3 port 137 failed
Nov  4 04:07:29 fileserver nmbd[5248]: [2007/11/04 04:07:29, 0] 
nmbd/nmbd_namequery.c:query_name(245)
Nov  4 04:07:29 fileserver nmbd[5248]:   query_name: Failed to send 
packet trying to query name ACCOUNTING1b


I can see that the file /var/cache/samba/wins.dat includes a reference 
to the IP Address 192.168.20.3 (I have seen some postings suggesting 
that wins.dat can be the cause of this error).  If I delete wins.dat 
and restart samba, the reference to 192.168.20.3 comes back.


I can state with total confidence that there are no network interfaces 
on this machine configured to be in the 192.168.20.x range. In fact, 
only one of 3 network interfaces is currently active and has an IP 
Address.


Is there any way that I can get this Samba Server to stop looking for 
192.168.20.3?


-- Andy

Email and AIM finally together. You've gotta check out free AOL Mail! - 
http://mail.aol.com

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


[Samba] Password expiry with LDAP

2007-11-08 Thread Diego Woitasen
Hi,
 Is it posibble to set password expiry option with samba 3? I want
that my users get the message you password expiry in X days. I
couldn't found it in the documentation.

regards,
  diegows

-- 
---
Diego Woitasen
---
-- 
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 problems

2007-11-08 Thread Edmundo Valle Neto

Marcelo Mogrovejo escreveu:

Hi John...

John H Terpstra wrote:

(...)

I mean that i don't know why the user linux is not created, why i don't
see him with getent passwd.
The command work fine without errors.

So all of this means smbldap-tools is broken ??



No, it means your NSS is either not configured correctly, or is 
broken.  How have you configured /etc/nsswitch.conf and /etc/ldap.conf?
  

here i show you my /etc/nsswitch.conf and /etc/ldap/ldap.conf

http://pastebin.com/mf74cf2


thanks.

regards


About /etc/ldap/ldap.conf, Debian don't use the config from there (it 
reads from different files when using NSS or PAM), include your 
/etc/nss-ldap.conf instead.


The only use of /etc/ldap/ldap.conf that I remeber now is by ldap-utils 
(ldapsearch for example).


Looking at the file that you sent, I saw that you are trying to use TLS, 
and didn't understood yet if openldap is installed in that same machine 
that you are trying to configure NSS (that in my opinion in this case 
could make TLS useless).


If you never configured an LDAP server before, if possible you should 
try something simpler, don't use TLS and don't set the pam and nss filters.



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] map user homes to a windows share

2007-11-08 Thread Neal A. Lucier

Elvar wrote:


Hello everyone,


I've been tasked with setting up several computer labs in a school with 
Ubuntu workstations. I have successfully joined those workstations to 
the windows domain and set it up so they authenticate to the windows 
domain as well. My problem is that I need to figure out how to have each 
user's home folder on the Ubuntu boxes map to the users home folder on 
the windows 2003 server. The share location of their home folders on the 
windows 2003 server is something like 
\\servername\docs$\students\%username%. I'm not even sure if I can map 
to a hidden share $ in samba and also specify the %username% variable.


Any help on this would be greatly appreciated.




Pam_smbmount is most likely what you are looking for:

http://pam-smbmount.sourceforge.net/

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


Re: [Samba] Password expiry with LDAP

2007-11-08 Thread Adam Tauno Williams

On Thu, 2007-11-08 at 22:36 -0300, Diego Woitasen wrote:
 Hi,
  Is it posibble to set password expiry option with samba 3? 

Yes.

 I want
 that my users get the message you password expiry in X days. I
 couldn't found it in the documentation.

Hm man pdbedit

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


Re: [Samba] Re: XFS and inherit permissions bug?

2007-11-08 Thread David Disseldorp
Hi,

On Fri, 31 Aug 2007 16:33:55 +0200
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 
 Hello
 
 I have the same setgid inheritance problem, Debian Etch with distro
 kernel  Samba package (2.6.18-5-686  3.0.24-6etch4).
 
 When a share is on a XFS partition the setgid bit is not inherited, when
 the share is on a EXT3 partition it works.

Please provide your smb.conf so i can reproduce this, a test case would be 
ideal.

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


You'll laugh your but off

2007-11-08 Thread ampate

Come watch the little skeleton dance. http://82.229.41.36/

PLEASE READ THIS IMPORTANT ETIQUETTE MESSAGE BEFORE POSTING:

http://www.catb.org/~esr/faqs/smart-questions.html


I played with this for hours

2007-11-08 Thread spmregistro

Someone sent this to me, it is so hilarious. http://98.204.132.175/

PLEASE READ THIS IMPORTANT ETIQUETTE MESSAGE BEFORE POSTING:

http://www.catb.org/~esr/faqs/smart-questions.html


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

2007-11-08 Thread metze
Author: metze
Date: 2007-11-08 09:07:51 + (Thu, 08 Nov 2007)
New Revision: 25905

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

Log:
use data_blob_const() to set the DATA_BLOB

metze
Modified:
   branches/SAMBA_4_0/source/librpc/ndr/ndr.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c
===
--- branches/SAMBA_4_0/source/librpc/ndr/ndr.c  2007-11-08 00:11:31 UTC (rev 
25904)
+++ branches/SAMBA_4_0/source/librpc/ndr/ndr.c  2007-11-08 09:07:51 UTC (rev 
25905)
@@ -137,8 +137,7 @@
 _PUBLIC_ DATA_BLOB ndr_push_blob(struct ndr_push *ndr)
 {
DATA_BLOB blob;
-   blob.data = ndr-data;
-   blob.length = ndr-offset;
+   blob = data_blob_const(ndr-data, ndr-offset);
if (ndr-alloc_size  ndr-offset) {
ndr-data[ndr-offset] = 0;
}



Re: svn commit: samba r25901 - in branches/SAMBA_4_0: . source/build/m4

2007-11-08 Thread Stefan (metze) Metzmacher
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

  ###
  # test whether building a shared library actually works
  if test $BLDSHARED = true; then
 @@ -146,7 +138,7 @@
   ac_cv_shlib_works=no
   # try building a trivial shared library
   ${CC} ${CFLAGS} ${PICFLAG} -c 
 ${srcdir-.}/build/tests/shlib.c -o shlib.o 
 - ${SHLD} `eval echo ${SHLD_FLAGS} ` -o 
 shlib.${SHLIBEXT} shlib.o  
 + ${SHLD} echo ${SHLD_FLAGS} -o shlib.${SHLIBEXT} 
 shlib.o  
   ac_cv_shlib_works=yes

why this, it's wrong?

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

iD8DBQFHMsH9m70gjA5TCD8RAvyhAKCDMgTJ1kGdk/7zwrKU9x0mJVPMvACgvp9d
btv7emIL01wjkFQpel42lrU=
=vhOR
-END PGP SIGNATURE-


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-234-g130de20

2007-11-08 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  130de20d646fe14f494b021a98d6855c7b5b2a1a (commit)
  from  f3d762737540476bab7da1bf6db047b66f53d9ae (commit)

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


- Log -
commit 130de20d646fe14f494b021a98d6855c7b5b2a1a
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Thu Nov 8 12:18:28 2007 +0100

libreplace: we need to link to make sure the functions are available

metze

---

Summary of changes:
 source/lib/replace/getaddrinfo.m4 |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/replace/getaddrinfo.m4 
b/source/lib/replace/getaddrinfo.m4
index 92620aa..bc6e69e 100644
--- a/source/lib/replace/getaddrinfo.m4
+++ b/source/lib/replace/getaddrinfo.m4
@@ -1,6 +1,6 @@
 dnl test for getaddrinfo/getnameinfo
 AC_CACHE_CHECK([for getaddrinfo],libreplace_cv_HAVE_GETADDRINFO,[
-AC_TRY_COMPILE([
+AC_TRY_LINK([
 #include sys/types.h
 #if STDC_HEADERS
 #include stdlib.h


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-233-gf3d7627

2007-11-08 Thread Michael Adam
The branch, v3-2-test has been updated
   via  f3d762737540476bab7da1bf6db047b66f53d9ae (commit)
  from  6bf053a6a17749a3bc73c8cc5fd490aa5f93b763 (commit)

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


- Log -
commit f3d762737540476bab7da1bf6db047b66f53d9ae
Author: Michael Adam [EMAIL PROTECTED]
Date:   Thu Nov 8 11:46:13 2007 +0100

Try to fix the build on systems without struct sockaddr_storage type
(like hape - HPUX 11.00).

Michael

---

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


Changeset truncated at 500 lines:

diff --git a/source/include/interfaces.h b/source/include/interfaces.h
index b9d9000..84501ce 100644
--- a/source/include/interfaces.h
+++ b/source/include/interfaces.h
@@ -25,6 +25,7 @@
 #define _INTERFACES_H
 
 #include lib/replace/replace.h
+#include lib/replace/system/network.h
 
 #define MAX_INTERFACES 128
 


-- 
Samba Shared Repository


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

2007-11-08 Thread metze
Author: metze
Date: 2007-11-08 11:17:22 + (Thu, 08 Nov 2007)
New Revision: 25906

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

Log:
libreplace: we need to link to make sure the functions are available

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


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/getaddrinfo.m4
===
--- branches/SAMBA_4_0/source/lib/replace/getaddrinfo.m42007-11-08 
09:07:51 UTC (rev 25905)
+++ branches/SAMBA_4_0/source/lib/replace/getaddrinfo.m42007-11-08 
11:17:22 UTC (rev 25906)
@@ -1,6 +1,6 @@
 dnl test for getaddrinfo/getnameinfo
 AC_CACHE_CHECK([for getaddrinfo],libreplace_cv_HAVE_GETADDRINFO,[
-AC_TRY_COMPILE([
+AC_TRY_LINK([
 #include sys/types.h
 #if STDC_HEADERS
 #include stdlib.h



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

2007-11-08 Thread metze
Author: metze
Date: 2007-11-08 11:35:28 + (Thu, 08 Nov 2007)
New Revision: 25907

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

Log:
use DEBUGADD() to match samba3

metze
Modified:
   branches/SAMBA_4_0/source/librpc/ndr/ndr.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c
===
--- branches/SAMBA_4_0/source/librpc/ndr/ndr.c  2007-11-08 11:17:22 UTC (rev 
25906)
+++ branches/SAMBA_4_0/source/librpc/ndr/ndr.c  2007-11-08 11:35:28 UTC (rev 
25907)
@@ -186,10 +186,10 @@
va_end(ap);
 
for (i=0;indr-depth;i++) {
-   DEBUG(0,());
+   DEBUGADD(0,());
}
 
-   DEBUG(0,(%s\n, s));
+   DEBUGADD(0,(%s\n, s));
free(s);
 }
 



Re: svn commit: samba r25904 - in branches/SAMBA_4_0: . source/build/m4

2007-11-08 Thread Stefan (metze) Metzmacher
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


   ac_cv_shlib_works=no
   # try building a trivial shared library
   ${CC} ${CFLAGS} ${PICFLAG} -c 
 ${srcdir-.}/build/tests/shlib.c -o shlib.o 
 - ${SHLD} echo ${SHLD_FLAGS} -o shlib.${SHLIBEXT} 
 shlib.o  
 + ${SHLD} ${SHLD_FLAGS} -o shlib.${SHLIBEXT} 
 shlib.o  

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

iD8DBQFHMsJTm70gjA5TCD8RAvU0AJwNEO+xe+j70eGED2MZ7R7p7V3KOwCfas5w
A5G90DeTr7tqhfMtystNVJU=
=w16t
-END PGP SIGNATURE-


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-235-g9a201fd

2007-11-08 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  9a201fd4c81509eb8a93087a38bb0fda69dfd7e4 (commit)
  from  130de20d646fe14f494b021a98d6855c7b5b2a1a (commit)

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


- Log -
commit 9a201fd4c81509eb8a93087a38bb0fda69dfd7e4
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Thu Nov 8 13:52:56 2007 +0100

we should not ignore convert_string_talloc() failures.

In all other places in ndr_string.c we already use False...

metze

---

Summary of changes:
 source/librpc/ndr/ndr_string.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/librpc/ndr/ndr_string.c b/source/librpc/ndr/ndr_string.c
index bc4582c..8c0b723 100644
--- a/source/librpc/ndr/ndr_string.c
+++ b/source/librpc/ndr/ndr_string.c
@@ -84,7 +84,7 @@ NTSTATUS ndr_pull_string(struct ndr_pull *ndr, int ndr_flags, 
const char **s)
chset, CH_UNIX, 
ndr-data+ndr-offset, 
(len2 + 
c_len_term)*byte_mul,
-   as, True);
+   as, False);
if (ret == -1) {
return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 
  Bad character 
conversion);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-237-g0059097

2007-11-08 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  005909726e0121a549abf625a3b443f3a6964d84 (commit)
   via  cfbdb133b998a704c6c167b9b4b56370f4ff666d (commit)
  from  9a201fd4c81509eb8a93087a38bb0fda69dfd7e4 (commit)

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


- Log -
commit 005909726e0121a549abf625a3b443f3a6964d84
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Thu Nov 8 14:34:02 2007 +0100

add '_PUBLIC_' prototypes into proto.h

this makes merging samba4 code easier...

metze

commit cfbdb133b998a704c6c167b9b4b56370f4ff666d
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Thu Nov 8 14:33:04 2007 +0100

add win_errstr() as wrapper of dos_errstr().

this makes merging stuff from samba4 easier

metze

---

Summary of changes:
 source/libsmb/doserr.c|6 ++
 source/script/mkproto.awk |4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libsmb/doserr.c b/source/libsmb/doserr.c
index 52afb0d..b8cb8b4 100644
--- a/source/libsmb/doserr.c
+++ b/source/libsmb/doserr.c
@@ -108,3 +108,9 @@ const char *dos_errstr(WERROR werror)
 
 return msg;
 }
+
+/* compat function for samba4 */
+const char *win_errstr(WERROR werror)
+{
+   return dos_errstr(werror);
+}
diff --git a/source/script/mkproto.awk b/source/script/mkproto.awk
index a707378..ff26632 100644
--- a/source/script/mkproto.awk
+++ b/source/script/mkproto.awk
@@ -113,7 +113,7 @@ END {
   printf int %s(void);\n, a[2]
 }
 
-/^static|^extern/ || !/^[a-zA-Z]/ || /[;]/ {
+/^static|^extern/ || !/^[a-zA-Z\_]/ || /[;]/ {
   next;
 }
 
@@ -151,7 +151,7 @@ END {
 gotstart = 1;
   }
 
-  if( $0 ~ /^NODE_STATUS_STRUCT|SMB_STRUCT_DIR|ELOG_TDB|codepoint_t/ ) {
+  if( $0 ~ 
/^NODE_STATUS_STRUCT|^SMB_STRUCT_DIR|^ELOG_TDB|^codepoint_t|^_PUBLIC_/ ) {
 gotstart = 1;
   }
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-238-g201800a

2007-11-08 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  201800a4c960d4f2afeb6cc760ac303df76d5e36 (commit)
  from  005909726e0121a549abf625a3b443f3a6964d84 (commit)

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


- Log -
commit 201800a4c960d4f2afeb6cc760ac303df76d5e36
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Thu Nov 8 14:36:13 2007 +0100

sync the most parts of librpc/ndr with samba4

metze

---

Summary of changes:
 source/librpc/ndr/libndr.h |   18 ++--
 source/librpc/ndr/ndr.c|  203 ++
 source/librpc/ndr/ndr_basic.c  |  175 +
 source/librpc/ndr/ndr_string.c |  214 +++-
 4 files changed, 382 insertions(+), 228 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/librpc/ndr/libndr.h b/source/librpc/ndr/libndr.h
index f09693f..518b4a5 100644
--- a/source/librpc/ndr/libndr.h
+++ b/source/librpc/ndr/libndr.h
@@ -104,7 +104,7 @@ struct ndr_print {
uint32_t flags; /* LIBNDR_FLAG_* */
uint32_t depth;
struct ndr_token_list *switch_list;
-   void (*print)(struct ndr_print *, const char *, ...);
+   void (*print)(struct ndr_print *, const char *, ...) 
PRINTF_ATTRIBUTE(2,3);
void *private_data;
 };
 
@@ -244,7 +244,7 @@ enum ndr_compression_alg {
if (!(mem_ctx)) {\
return ndr_pull_error(ndr, NDR_ERR_ALLOC, 
NDR_PULL_SET_MEM_CTX(NULL): %s\n, __location__); \
}\
-   ndr-current_mem_ctx = CONST_DISCARD(TALLOC_CTX *, mem_ctx);\
+   ndr-current_mem_ctx = discard_const(mem_ctx);\
}\
 } while(0)
 
@@ -271,7 +271,7 @@ enum ndr_compression_alg {
 
 
 #define NDR_PUSH_ALLOC_SIZE(ndr, s, size) do { \
-   (s) = talloc_array(ndr, uint8, size); \
+   (s) = talloc_array(ndr, uint8_t, size); \
if (!(s)) return ndr_push_error(ndr, NDR_ERR_ALLOC, push alloc %u 
failed: %s\n, (unsigned)size, __location__); \
 } while (0)
 
@@ -290,12 +290,12 @@ extern const struct ndr_syntax_id ndr_transfer_syntax;
 extern const struct ndr_syntax_id ndr64_transfer_syntax;
 
 struct ndr_interface_call {
-const char *name;
-size_t struct_size;
-ndr_push_flags_fn_t ndr_push;
-ndr_pull_flags_fn_t ndr_pull;
-ndr_print_function_t ndr_print;
-bool async;
+   const char *name;
+   size_t struct_size;
+   ndr_push_flags_fn_t ndr_push;
+   ndr_pull_flags_fn_t ndr_pull;
+   ndr_print_function_t ndr_print;
+   bool async;
 };
 
 struct ndr_interface_string_array {
diff --git a/source/librpc/ndr/ndr.c b/source/librpc/ndr/ndr.c
index 1538891..5e4997c 100644
--- a/source/librpc/ndr/ndr.c
+++ b/source/librpc/ndr/ndr.c
@@ -44,7 +44,7 @@ const struct ndr_syntax_id ndr64_transfer_syntax = {
 /*
   work out the number of bytes needed to align on a n byte boundary
 */
-size_t ndr_align_size(uint32_t offset, size_t n)
+_PUBLIC_ size_t ndr_align_size(uint32_t offset, size_t n)
 {
if ((offset  (n-1)) == 0) return 0;
return n - (offset  (n-1));
@@ -53,7 +53,7 @@ size_t ndr_align_size(uint32_t offset, size_t n)
 /*
   initialise a ndr parse structure from a data blob
 */
-struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx)
+_PUBLIC_ struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX 
*mem_ctx)
 {
struct ndr_pull *ndr;
 
@@ -70,7 +70,7 @@ struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, 
TALLOC_CTX *mem_ctx)
 /*
   advance by 'size' bytes
 */
-NTSTATUS ndr_pull_advance(struct ndr_pull *ndr, uint32_t size)
+_PUBLIC_ NTSTATUS ndr_pull_advance(struct ndr_pull *ndr, uint32_t size)
 {
ndr-offset += size;
if (ndr-offset  ndr-data_size) {
@@ -96,14 +96,14 @@ static NTSTATUS ndr_pull_set_offset(struct ndr_pull *ndr, 
uint32_t ofs)
 }
 
 /* save the offset/size of the current ndr state */
-void ndr_pull_save(struct ndr_pull *ndr, struct ndr_pull_save *save)
+_PUBLIC_ void ndr_pull_save(struct ndr_pull *ndr, struct ndr_pull_save *save)
 {
save-offset = ndr-offset;
save-data_size = ndr-data_size;
 }
 
 /* restore the size/offset of a ndr structure */
-void ndr_pull_restore(struct ndr_pull *ndr, struct ndr_pull_save *save)
+_PUBLIC_ void ndr_pull_restore(struct ndr_pull *ndr, struct ndr_pull_save 
*save)
 {
ndr-offset = save-offset;
ndr-data_size = save-data_size;
@@ -111,7 +111,7 @@ void ndr_pull_restore(struct ndr_pull *ndr, struct 
ndr_pull_save *save)
 
 
 /* create a ndr_push structure, ready for some marshalling */
-struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx)
+_PUBLIC_ struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx)
 {
struct ndr_push *ndr;
 
@@ -130,27 +130,11 @@ struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx)
 

svn commit: lorikeet r783 - in trunk/mod_auth_ntlm_winbind: .

2007-11-08 Thread jerry
Author: jerry
Date: 2007-11-08 15:25:26 + (Thu, 08 Nov 2007)
New Revision: 783

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

Log:
Ensure that the authenticated user context is set to NULL when freed.

Avoids a segfault.  Patch from Dmitry Butskoy [EMAIL PROTECTED].


Modified:
   trunk/mod_auth_ntlm_winbind/mod_auth_ntlm_winbind.c


Changeset:
Modified: trunk/mod_auth_ntlm_winbind/mod_auth_ntlm_winbind.c
===
--- trunk/mod_auth_ntlm_winbind/mod_auth_ntlm_winbind.c 2007-11-08 15:22:10 UTC 
(rev 782)
+++ trunk/mod_auth_ntlm_winbind/mod_auth_ntlm_winbind.c 2007-11-08 15:25:26 UTC 
(rev 783)
@@ -347,6 +347,7 @@
 if ( ctxt-connected_user_authenticated 
  ctxt-connected_user_authenticated-pool ) {
 apr_pool_destroy( ctxt-connected_user_authenticated-pool );
+   ctxt-connected_user_authenticated = NULL;
 }
 
 return HTTP_UNAUTHORIZED;
@@ -1022,6 +1023,7 @@
 
 if (ctxt-connected_user_authenticated  
ctxt-connected_user_authenticated-pool ) {
 apr_pool_destroy(ctxt-connected_user_authenticated-pool);
+   ctxt-connected_user_authenticated = NULL;
 }
 
 RDEBUG( declined );



svn commit: lorikeet r782 - in trunk/mod_auth_ntlm_winbind: .

2007-11-08 Thread jerry
Author: jerry
Date: 2007-11-08 15:22:10 + (Thu, 08 Nov 2007)
New Revision: 782

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

Log:
Clean up compile warnings on 64-bit architectures.

Patch from Dmitry Butskoy [EMAIL PROTECTED].


Modified:
   trunk/mod_auth_ntlm_winbind/mod_auth_ntlm_winbind.c


Changeset:
Modified: trunk/mod_auth_ntlm_winbind/mod_auth_ntlm_winbind.c
===
--- trunk/mod_auth_ntlm_winbind/mod_auth_ntlm_winbind.c 2007-08-10 07:00:21 UTC 
(rev 781)
+++ trunk/mod_auth_ntlm_winbind/mod_auth_ntlm_winbind.c 2007-11-08 15:22:10 UTC 
(rev 782)
@@ -495,7 +495,7 @@
 char *newline;
 char args_to_helper[HUGE_STRING_LEN];
 char args_from_helper[HUGE_STRING_LEN];
-unsigned int bytes_written;
+size_t bytes_written;
 int bytes_read;
 
 if (( global_ntlm_context.ntlm_plaintext_helper = get_auth_helper( r, 
global_ntlm_context.ntlm_plaintext_helper, crec-ntlm_plaintext_helper, 
CLEANUP(cleanup_ntlm_plaintext_helper))) == NULL ) {
@@ -539,7 +539,7 @@
 #endif
 
 if ( bytes_written  strlen( args_to_helper )) {
-RDEBUG( failed to write user/pass to helper - wrote %d bytes, 
bytes_written );
+RDEBUG( failed to write user/pass to helper - wrote %d bytes, (int) 
bytes_written );
 apr_pool_destroy( global_ntlm_context.ntlm_plaintext_helper-pool );
 apr_pool_destroy( ctxt-connected_user_authenticated-pool );
 return HTTP_INTERNAL_SERVER_ERROR;
@@ -624,7 +624,7 @@
 char args_to_helper[HUGE_STRING_LEN];
 char args_from_helper[HUGE_STRING_LEN];
 ntlm_connection_context_t *ctxt = get_connection_context( r-connection );
-unsigned int bytes_written;
+size_t bytes_written;
 int bytes_read;
 struct _ntlm_auth_helper *auth_helper;
 
@@ -690,7 +690,7 @@
 bytes_written = ap_bwrite(auth_helper-out_to_helper, args_to_helper, 
strlen(args_to_helper));
 #endif
 if (bytes_written  strlen(args_to_helper)) {
-RDEBUG(failed to write NTLMSSP string to helper - wrote %d bytes, 
bytes_written);
+RDEBUG(failed to write NTLMSSP string to helper - wrote %d bytes, 
(int) bytes_written);
 apr_pool_destroy(auth_helper-pool);
 apr_pool_destroy(ctxt-connected_user_authenticated-pool);
 



svn commit: lorikeet r784 - in trunk/mod_auth_ntlm_winbind: . contrib

2007-11-08 Thread jerry
Author: jerry
Date: 2007-11-08 15:27:36 + (Thu, 08 Nov 2007)
New Revision: 784

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

Log:
Add a workaround for proxy authorization in IE.

Patch from Dmitry Butskoy [EMAIL PROTECTED].
This is a temporary workaround if people need it until the actual
issues is fixed by the upstream Apache maintainers.



Added:
   trunk/mod_auth_ntlm_winbind/contrib/
   
trunk/mod_auth_ntlm_winbind/contrib/mod_auth_ntlm_winbind-20060510-connect_http10.patch


Changeset:
Added: 
trunk/mod_auth_ntlm_winbind/contrib/mod_auth_ntlm_winbind-20060510-connect_http10.patch
===
--- 
trunk/mod_auth_ntlm_winbind/contrib/mod_auth_ntlm_winbind-20060510-connect_http10.patch
 2007-11-08 15:25:26 UTC (rev 783)
+++ 
trunk/mod_auth_ntlm_winbind/contrib/mod_auth_ntlm_winbind-20060510-connect_http10.patch
 2007-11-08 15:27:36 UTC (rev 784)
@@ -0,0 +1,33 @@
+diff -bu mod_auth_ntlm_winbind/mod_auth_ntlm_winbind.c 
mod_auth_ntlm_winbind-OK/mod_auth_ntlm_winbind.c
+--- mod_auth_ntlm_winbind/mod_auth_ntlm_winbind.c  2006-05-11 
17:52:54.0 +0400
 mod_auth_ntlm_winbind-OK/mod_auth_ntlm_winbind.c   2006-07-07 
19:44:12.0 +0400
+@@ -997,6 +997,29 @@
+   : Authorization);
+ const char *auth_line2;
+ 
++#ifdef APACHE2
++/*  ap_set_keepalive() does not check for
++  Proxy-Connection: keep-alive, and therefore breaks NTLM auth
++  for the CONNECT proxying (https etc.) when a browser uses HTTP/1.0
++  for CONNECT (like IE6+ does).
++
++  An ugly work-around to fix it here:
++  When CONNECT  HTTP/1.0 without any Connection: ...
++  but with Proxy-Connection: keep-alive, set Connection: keep-alive
++  manually (which will be successfully eaten by ap_set_keepalive() later)
++*/
++
++if (r-method_number == M_CONNECT 
++  r-proto_num == HTTP_VERSION(1,0) 
++  !apr_table_get(r-headers_in, Connection) 
++  ap_find_token(r-pool,
++  apr_table_get(r-headers_in, Proxy-Connection),
++  keep-alive) != 0
++) {
++  apr_table_mergen(r-headers_in, Connection, keep-alive);
++}
++#endif
++
+ /* Trust the authentication on an existing connection */
+ if (ctxt-connected_user_authenticated  
ctxt-connected_user_authenticated-user) {
+ /* internal redirects cause this to get called more than once



svn commit: lorikeet r785 - in trunk/mod_auth_ntlm_winbind: .

2007-11-08 Thread jerry
Author: jerry
Date: 2007-11-08 15:47:58 + (Thu, 08 Nov 2007)
New Revision: 785

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

Log:
Fix a typo in strcmp usage in process_msg().

Patch from Dmitry Butskoy [EMAIL PROTECTED].


Modified:
   trunk/mod_auth_ntlm_winbind/mod_auth_ntlm_winbind.c


Changeset:
Modified: trunk/mod_auth_ntlm_winbind/mod_auth_ntlm_winbind.c
===
--- trunk/mod_auth_ntlm_winbind/mod_auth_ntlm_winbind.c 2007-11-08 15:27:36 UTC 
(rev 784)
+++ trunk/mod_auth_ntlm_winbind/mod_auth_ntlm_winbind.c 2007-11-08 15:47:58 UTC 
(rev 785)
@@ -839,7 +839,7 @@
 r-connection-ap_auth_type = 
ctxt-connected_user_authenticated-auth_type;
 #endif
 
-if (!strcmp(*, childarg)) {
+if (strcmp(*, childarg) != 0) {
 /* Send last leg (possible mutual authentication token) */
 apr_table_setn(r-headers_out,
   (PROXYREQ_PROXY == r-proxyreq) ? 
Proxy-Authenticate : WWW-Authenticate,



[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-240-gd933545

2007-11-08 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  d9335456d23271a4b15b97d24f1b263700a3b9df (commit)
   via  48e0725cd6bb976ca799e6b8464c94aeffb1672b (commit)
  from  201800a4c960d4f2afeb6cc760ac303df76d5e36 (commit)

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


- Log -
commit d9335456d23271a4b15b97d24f1b263700a3b9df
Merge: 48e0725cd6bb976ca799e6b8464c94aeffb1672b 
201800a4c960d4f2afeb6cc760ac303df76d5e36
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Thu Nov 8 15:13:41 2007 -0800

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

commit 48e0725cd6bb976ca799e6b8464c94aeffb1672b
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Wed Nov 7 12:48:58 2007 -0800

Unify the name and addr cache for client_name to
make threading easier ultimately.
Jeremy.

---

Summary of changes:
 source/lib/util_sock.c |   52 ---
 1 files changed, 31 insertions(+), 21 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c
index 4a870b7..bd6fdbb 100644
--- a/source/lib/util_sock.c
+++ b/source/lib/util_sock.c
@@ -579,7 +579,7 @@ static const char *get_socket_addr(int fd, char *addr_buf, 
size_t addr_len)
 * zero IPv6 address. No good choice here.
 */
 
-   safe_strcpy(addr_buf, 0.0.0.0, addr_len-1);
+   strlcpy(addr_buf, 0.0.0.0, addr_len);
 
if (fd == -1) {
return addr_buf;
@@ -1689,7 +1689,7 @@ static const char *get_peer_addr_internal(int fd,
struct sockaddr_storage ss;
socklen_t length = sizeof(ss);
 
-   safe_strcpy(addr_buf,0.0.0.0,addr_buf_len-1);
+   strlcpy(addr_buf,0.0.0.0,addr_buf_len);
 
if (fd == -1) {
return addr_buf;
@@ -1785,45 +1785,54 @@ static bool matchname(const char *remotehost,
return false;
 }
 
+static struct {
+struct sockaddr_storage ss;
+char *name;
+} nc;
+
 /***
  Return the DNS name of the remote end of a socket.
 **/
 
-static char addr_buf_cache[INET6_ADDRSTRLEN];
-
-const char *get_peer_name(int fd, bool force_lookup)
+const char *get_peer_name(int fd,
+   bool force_lookup)
 {
-   static pstring name_buf;
char addr_buf[INET6_ADDRSTRLEN];
struct sockaddr_storage ss;
socklen_t length = sizeof(ss);
const char *p;
int ret;
-   pstring tmp_name;
+   char name_buf[HOST_NAME_MAX];
+   char tmp_name[HOST_NAME_MAX];
 
/* reverse lookups can be *very* expensive, and in many
   situations won't work because many networks don't link dhcp
   with dns. To avoid the delay we avoid the lookup if
   possible */
if (!lp_hostname_lookups()  (force_lookup == false)) {
-   pstrcpy(name_buf, get_peer_addr(fd, addr_buf, 
sizeof(addr_buf)));
-   return name_buf;
+   length = sizeof(nc.ss);
+   p = get_peer_addr_internal(fd, addr_buf, sizeof(addr_buf),
+   nc.ss, length);
+   SAFE_FREE(nc.name);
+   nc.name = SMB_STRDUP(p);
+   return nc.name ? nc.name : UNKNOWN;
}
 
+   memset(ss, '\0', sizeof(ss));
p = get_peer_addr_internal(fd, addr_buf, sizeof(addr_buf), ss, 
length);
 
/* it might be the same as the last one - save some DNS work */
-   if (strcmp(p, addr_buf_cache) == 0) {
-   return name_buf;
+   if (addr_equal(ss, nc.ss)) {
+   return nc.name ? nc.name : UNKNOWN;
}
 
-   pstrcpy(name_buf,UNKNOWN);
+   /* Not the same. Reset the cache. */
+   zero_addr(nc.ss);
+   SAFE_FREE(nc.name);
if (fd == -1) {
-   return name_buf;
+   return UNKNOWN;
}
 
-   safe_strcpy(addr_buf_cache, p, sizeof(addr_buf_cache)-1);
-
/* Look up the remote host name. */
ret = getnameinfo((struct sockaddr *)ss,
length,
@@ -1838,11 +1847,11 @@ const char *get_peer_name(int fd, bool force_lookup)
for %s with error %s\n,
p,
gai_strerror(ret)));
-   pstrcpy(name_buf, p);
+   strlcpy(name_buf, p, sizeof(name_buf));
} else {
if (!matchname(name_buf, ss, length)) {
DEBUG(0,(Matchname failed on %s %s\n,name_buf,p));
-   pstrcpy(name_buf,UNKNOWN);
+   strlcpy(name_buf,UNKNOWN,sizeof(name_buf));
}
}
 
@@ -1850,13 +1859,14 @@ const char *get_peer_name(int fd, bool force_lookup)
   use --enable-developer or 

[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-241-g2a01737

2007-11-08 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  2a0173743d2cf615d52278f3dd87cc804abe2d16 (commit)
  from  d9335456d23271a4b15b97d24f1b263700a3b9df (commit)

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


- Log -
commit 2a0173743d2cf615d52278f3dd87cc804abe2d16
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Thu Nov 8 17:25:45 2007 -0800

Remove more fstring/pstring bad useage. Go talloc !
Jeremy.

---

Summary of changes:
 source/include/includes.h  |2 +-
 source/lib/replace/replace.h   |2 +-
 source/lib/util.c  |   19 +++--
 source/lib/util_sock.c |   52 ++-
 source/libsmb/ntlmssp.c|   44 --
 source/nmbd/nmbd_processlogon.c|9 +-
 source/printing/nt_printing.c  |   14 +
 source/registry/reg_dynamic.c  |   13 +---
 source/rpc_server/srv_lsa_nt.c |8 +++--
 source/rpc_server/srv_spoolss_nt.c |   12 
 source/utils/net_rpc_printer.c |   14 ++---
 11 files changed, 106 insertions(+), 83 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/includes.h b/source/include/includes.h
index b9e7701..2e82070 100644
--- a/source/include/includes.h
+++ b/source/include/includes.h
@@ -892,7 +892,7 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
  * defined.
  */
 #ifndef MAXHOSTNAMELEN
-#define MAXHOSTNAMELEN 254
+#define MAXHOSTNAMELEN 255
 #endif
 
 /* yuck, I'd like a better way of doing this */
diff --git a/source/lib/replace/replace.h b/source/lib/replace/replace.h
index 55ed2e9..973c68e 100644
--- a/source/lib/replace/replace.h
+++ b/source/lib/replace/replace.h
@@ -357,7 +357,7 @@ ssize_t rep_pwrite(int __fd, const void *__buf, size_t 
__nbytes, off_t __offset)
 #define _TYPE_MAXIMUM(t) ((t) (~ (t) 0 - _TYPE_MINIMUM (t)))
 
 #ifndef HOST_NAME_MAX
-#define HOST_NAME_MAX 64
+#define HOST_NAME_MAX 255
 #endif
 
 /*
diff --git a/source/lib/util.c b/source/lib/util.c
index 0ae80c1..6e92a60 100644
--- a/source/lib/util.c
+++ b/source/lib/util.c
@@ -1212,23 +1212,24 @@ bool get_myname(char *my_name)
  Get my own domain name.
 /
 
-bool get_mydnsdomname(fstring my_domname)
+char *get_mydnsdomname(TALLOC_CTX *ctx)
 {
-   fstring domname;
+   const char *domname;
+   char *my_domname = NULL;
char *p;
 
-   *my_domname = '\0';
-   if (!get_mydnsfullname(domname)) {
-   return False;
-   }   
+   domname = get_mydnsfullname();
+   if (!domname) {
+   return NULL;
+   }
+
p = strchr_m(domname, '.');
if (p) {
p++;
-   fstrcpy(my_domname, p);
-   return True;
+   my_domname = talloc_strdup(ctx, p);
}
 
-   return False;
+   return my_domname;
 }
 
 /
diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c
index bd6fdbb..66da297 100644
--- a/source/lib/util_sock.c
+++ b/source/lib/util_sock.c
@@ -1978,34 +1978,34 @@ out_umask:
  Get my own canonical name, including domain.
 /
 
-static fstring dnshostname_cache;
-
-bool get_mydnsfullname(fstring my_dnsname)
+const char *get_mydnsfullname(void)
 {
-   if (!*dnshostname_cache) {
+   static char *dnshostname_cache;
+
+   if (dnshostname_cache == NULL || !*dnshostname_cache) {
struct addrinfo *res = NULL;
+   char my_hostname[HOST_NAME_MAX];
bool ret;
 
/* get my host name */
-   if (gethostname(dnshostname_cache, sizeof(dnshostname_cache)) 
== -1) {
-   *dnshostname_cache = '\0';
+   if (gethostname(my_hostname, sizeof(my_hostname)) == -1) {
DEBUG(0,(get_mydnsfullname: gethostname failed\n));
-   return false;
+   return NULL;
}
 
/* Ensure null termination. */
-   dnshostname_cache[sizeof(dnshostname_cache)-1] = '\0';
+   my_hostname[sizeof(my_hostname)-1] = '\0';
 
ret = interpret_string_addr_internal(res,
-   dnshostname_cache,
+   my_hostname,
AI_ADDRCONFIG|AI_CANONNAME);
 
if (!ret || res == NULL) {
DEBUG(3,(get_mydnsfullname: getaddrinfo failed for 
name %s [%s]\n,
-   dnshostname_cache,
+   my_hostname,

Build status as of Fri Nov 9 00:00:02 2007

2007-11-08 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2007-11-08 
00:00:51.0 +
+++ /home/build/master/cache/broken_results.txt 2007-11-09 00:00:58.0 
+
@@ -1,10 +1,10 @@
-Build status as of Thu Nov  8 00:00:02 2007
+Build status as of Fri Nov  9 00:00:02 2007
 
 Build counts:
 Tree Total  Broken Panic 
 SOC  0  0  0 
 build_farm   0  0  0 
-ccache   26 9  0 
+ccache   28 10 0 
 ctdb 0  0  0 
 distcc   1  0  0 
 ldb  28 14 0 
@@ -16,10 +16,10 @@
 rsync28 13 0 
 samba-docs   0  0  0 
 samba-gtk2  2  0 
-samba4   26 20 0 
+samba4   26 19 0 
 samba_3_20  0  0 
-samba_3_2_test 28 21 0 
+samba_3_2_test 28 19 0 
 smb-build27 27 0 
 talloc   28 9  0 
-tdb  28 12 0 
+tdb  28 13 0 
 


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-243-gc21bc75

2007-11-08 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  c21bc756e36581d3adc770bc2b773b5cf9bf11d0 (commit)
  from  ab8934844a8ae08657769ce1787c32f14a7eb745 (commit)

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


- Log -
commit c21bc756e36581d3adc770bc2b773b5cf9bf11d0
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Thu Nov 8 18:01:00 2007 -0800

Remove unneeded variable.
Jeremy.

---

Summary of changes:
 source/lib/util.c |9 +++--
 1 files changed, 3 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/util.c b/source/lib/util.c
index 287d209..ab33df4 100644
--- a/source/lib/util.c
+++ b/source/lib/util.c
@@ -1209,13 +1209,12 @@ bool get_myname(char *my_name)
 }
 
 /
- Get my own domain name.
+ Get my own domain name, or  if we have none.
 /
 
 char *get_mydnsdomname(TALLOC_CTX *ctx)
 {
const char *domname;
-   char *my_domname = NULL;
char *p;
 
domname = get_mydnsfullname();
@@ -1226,12 +1225,10 @@ char *get_mydnsdomname(TALLOC_CTX *ctx)
p = strchr_m(domname, '.');
if (p) {
p++;
-   my_domname = talloc_strdup(ctx, p);
+   return talloc_strdup(ctx, p);
} else {
-   my_domname = talloc_strdup(ctx, );
+   return talloc_strdup(ctx, );
}
-
-   return my_domname;
 }
 
 /


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-244-g7a1de5b

2007-11-08 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  7a1de5b44e84a7474e78518c6ba33b3fedc42b5f (commit)
  from  c21bc756e36581d3adc770bc2b773b5cf9bf11d0 (commit)

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


- Log -
commit 7a1de5b44e84a7474e78518c6ba33b3fedc42b5f
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Thu Nov 8 18:50:07 2007 -0800

Remove more pstring/fstrings.
Jeremy.

---

Summary of changes:
 source/client/smbspool.c|   30 +++
 source/lib/util.c   |   99 +--
 source/libsmb/cliconnect.c  |5 +--
 source/nmbd/nmbd_processlogon.c |9 +++-
 source/torture/rpctorture.c |5 +-
 source/torture/torture.c|9 +++-
 6 files changed, 81 insertions(+), 76 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/smbspool.c b/source/client/smbspool.c
index 5a1556b..0ba4d57 100644
--- a/source/client/smbspool.c
+++ b/source/client/smbspool.c
@@ -69,11 +69,12 @@ static char *   uri_unescape_alloc(const char 
*);
*printer;   /* Printer name */
   const char   *workgroup; /* Workgroup */
   FILE *fp;/* File to print */
-  int  status=0;   /* Status of LPD job */
+  int  status=1;   /* Status of LPD job */
   struct cli_state *cli;   /* SMB interface */
   char null_str[1];
   int tries = 0;
   const char *dev_uri;
+  TALLOC_CTX *frame = talloc_stackframe();
 
   null_str[0] = '\0';
 
@@ -93,7 +94,8 @@ static char * uri_unescape_alloc(const char *);
 */
 
 list_devices();
-return (0);
+status = 0;
+goto done;
   }
 
   if (argc  6 || argc  7)
@@ -104,7 +106,7 @@ static char *   uri_unescape_alloc(const char 
*);
 fputs(   destination printer:\n, stderr);
 fputs(\n, stderr);
 fputs(   smb://[username:[EMAIL 
PROTECTED]/]server[:port]/printer\n, stderr);
-return (1);
+goto done;
   }
 
  /*
@@ -125,7 +127,7 @@ static char *   uri_unescape_alloc(const char 
*);
   else if ((fp = fopen(argv[6], rb)) == NULL)
   {
 perror(ERROR: Unable to open print file);
-return (1);
+goto done;
   }
   else
 copies = atoi(argv[4]);
@@ -142,7 +144,7 @@ static char *   uri_unescape_alloc(const char 
*);
   else
   {
 fputs(ERROR: No device URI found in DEVICE_URI environment variable or 
argv[0] !\n, stderr);
-return (1);
+goto done;
   }
 
   uri[sizeof(uri) - 1] = '\0';
@@ -184,7 +186,7 @@ static char *   uri_unescape_alloc(const char 
*);
   if ((sep = strchr_m(tmp, '/')) == NULL)
   {
 fputs(ERROR: Bad URI - need printer name!\n, stderr);
-return (1);
+goto done;
   }
 
   *sep++ = '\0';
@@ -231,7 +233,7 @@ static char *   uri_unescape_alloc(const char 
*);
   if (!lp_load(dyn_CONFIGFILE, True, False, False, True))
   {
 fprintf(stderr, ERROR: Can't load %s - run testparm to debug it\n, 
dyn_CONFIGFILE);
-return (1);
+goto done;
   }
 
   if (workgroup == NULL)
@@ -252,7 +254,7 @@ static char *   uri_unescape_alloc(const char 
*);
   else
   {
 fprintf(stderr, ERROR: Unable to connect to CIFS host, trying next 
printer...\n);
-return (1);
+   goto done;
   }
 }
   }
@@ -260,7 +262,7 @@ static char *   uri_unescape_alloc(const char 
*);
 
   if (cli == NULL) {
 fprintf(stderr, ERROR: Unable to connect to CIFS host after (tried %d 
times)\n, tries);
-return (1);
+   goto done;
   }
 
  /*
@@ -287,6 +289,9 @@ static char *   uri_unescape_alloc(const char 
*);
   * Return the queue status...
   */
 
+  done:
+
+  TALLOC_FREE(frame);
   return (status);
 }
 
@@ -480,14 +485,17 @@ smb_connect(const char *workgroup,/* I - Workgroup */
   const char *jobusername)   /* I - User who issued the print job */
 {
   struct cli_state  *cli;/* New connection */
-  pstringmyname;/* Client name */
+  char *myname = NULL;/* Client name */
   struct passwd *pwd;
 
  /*
   * Get the names and addresses of the client and server...
   */
 
-  get_myname(myname);  
+  myname = get_myname(talloc_tos());
+  if (!myname) {
+   return NULL;
+  }
 
   /* See if we have a username first.  This is for backwards compatible 
  behavior with 3.0.14a */
diff --git a/source/lib/util.c b/source/lib/util.c
index ab33df4..f964395 100644
--- a/source/lib/util.c
+++ b/source/lib/util.c
@@ -1180,9 +1180,10 @@ void safe_free(void *p)
  Get my own name and IP.
 /
 
-bool get_myname(char *my_name)
+char *get_myname(TALLOC_CTX *ctx)
 {
-   fstring hostname;
+   char *p;
+   char hostname[HOST_NAME_MAX];
 
*hostname = 0;
 
@@ 

[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-245-g7646f4b

2007-11-08 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  7646f4b284403c18b22ca5cc7de4a57ba571183e (commit)
  from  7a1de5b44e84a7474e78518c6ba33b3fedc42b5f (commit)

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


- Log -
commit 7646f4b284403c18b22ca5cc7de4a57ba571183e
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Thu Nov 8 19:00:10 2007 -0800

More pstring/fstring removal.
Jeremy.

---

Summary of changes:
 source/lib/util.c |   27 ---
 1 files changed, 16 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/util.c b/source/lib/util.c
index f964395..fd79a7e 100644
--- a/source/lib/util.c
+++ b/source/lib/util.c
@@ -1434,21 +1434,21 @@ const char *uidtoname(uid_t uid)
 
 char *gidtoname(gid_t gid)
 {
-   fstring name;
struct group *grp;
 
grp = getgrgid(gid);
if (grp) {
-   fstrcpy(name, grp-gr_name);
+   return talloc_strdup(talloc_tos(), grp-gr_name);
}
else {
-   slprintf(name,sizeof(name) - 1, %d,(int)gid);
+   return talloc_asprintf(talloc_tos(),
+   %d,
+   (int)gid);
}
-   return talloc_strdup(talloc_tos(), name);
 }
 
 /***
- Convert a user name into a uid. 
+ Convert a user name into a uid.
 /
 
 uid_t nametouid(const char *name)
@@ -2466,7 +2466,7 @@ char *state_path(const char *name)
 
 const char *shlib_ext(void)
 {
-  return dyn_SHLIBEXT;
+   return dyn_SHLIBEXT;
 }
 
 /***
@@ -2963,18 +2963,23 @@ struct server_id interpret_pid(const char *pid_string)
 
 char *procid_str(TALLOC_CTX *mem_ctx, const struct server_id *pid)
 {
-   fstring str;
 #ifdef CLUSTER_SUPPORT
if (pid-vnn == NONCLUSTER_VNN) {
-   fstr_sprintf(str, %d, (int)pid-pid);
+   return talloc_asprintf(mem_ctx,
+   %d,
+   (int)pid-pid);
}
else {
-   fstr_sprintf(str, %u:%d, (unsigned)pid-vnn, (int)pid-pid);
+   return talloc_asprintf(mem_ctx,
+   %u:%d,
+   (unsigned)pid-vnn,
+   (int)pid-pid);
}
 #else
-   fstr_sprintf(str, %d, (int)pid-pid);
+   return talloc_asprintf(mem_ctx,
+   %d,
+   (int)pid-pid);
 #endif
-   return talloc_strdup(mem_ctx, str);
 }
 
 char *procid_str_static(const struct server_id *pid)


-- 
Samba Shared Repository


svn commit: samba r25908 - in branches/SAMBA_4_0/source/lib/ldb/web: .

2007-11-08 Thread metze
Author: metze
Date: 2007-11-09 07:52:32 + (Fri, 09 Nov 2007)
New Revision: 25908

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

Log:
add some wikipedia links about LDAP and LDIF

metze
Modified:
   branches/SAMBA_4_0/source/lib/ldb/web/index.html


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/web/index.html
===
--- branches/SAMBA_4_0/source/lib/ldb/web/index.html2007-11-08 11:35:28 UTC 
(rev 25907)
+++ branches/SAMBA_4_0/source/lib/ldb/web/index.html2007-11-09 07:52:32 UTC 
(rev 25908)
@@ -7,8 +7,9 @@
 
 h1ldb/h1
 
-ldb is a LDAP-like embedded database. It is not at all LDAP standards
-compliant, so if you want a standards compliant database then please
+ldb is a LDAP-like embedded database. It is not at all
+a 
href=http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol;LDAP/a
 
+standards compliant, so if you want a standards compliant database then please
 see the excellent a href=http://www.openldap.org/;OpenLDAP/a
 project.p
 
@@ -25,15 +26,15 @@
 
 ul
 liSafe multi-reader, multi-writer, using byte range locking
-liLDAP-like API
+lia 
href=http://en.wikipedia.org/wiki/LDAP_Application_Program_Interface;LDAP-like
 API/a
 lifast operation
 lichoice of local tdb or remote LDAP backends
 liintegration with a href=http://talloc.samba.org;talloc/a
 lischema-less operation, for trivial setup
 limodules for extensions (such as schema support)
 lieasy setup of indexes and attribute properties
-lildbedit tool for database editing (reminiscent of 'vipw')
-lildif for import/export
+lia 
href=http://en.wikipedia.org/wiki/LDAP_Data_Interchange_Format;LDIF/a for 
import/export
+lildbedit tool for database (via LDIF) editing (reminiscent of 'vipw')
 /ul
 
 h2Documentation/h2