Re: [Samba] Change Domain SID

2006-02-27 Thread dbm0572
El dom, 26-02-2006 a las 09:45 -0500, Charles Marcus escribió:

 M P wrote:
  Is there a way to change SAMBA Domain SID?
   
  My SAMBA PDC Server hard drive crashed. I have created a new install
  with new Samba PDC Server. I know my old Domain SID. Is there a way to


Take a look to this thread at the samba list archives. May be will help
you

http://lists.samba.org/archive/samba/2005-November/114140.html

Regards,

David Ballester

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


[Samba] unable to connect to CUPS server localhost - Connection refused

2006-02-27 Thread Thomas Paul
Hello,

 

I'm using Debian Sarge, Samba 3.0.14a and the stable cups included on the
sarge dvds.

 

And if I start the server and the printer in the same time on Monday morning
I will get following error message in the /var/log/samba/log.smbd

 

[2006/02/27 08:22:32, 0] printing/print_cups.c:cups_cache_reload(85)

  Unable to connect to CUPS server localhost - Connection refused

[2006/02/27 09:32:39, 0] smbd/server.c:main(798)

  smbd version 3.0.14a-Debian started.

  Copyright Andrew Tridgell and the Samba Team 1992-2004

[2006/02/27 09:32:53, 0] lib/util_sock.c:get_peer_addr(1150)

  getpeername failed. Error was Der Socket ist nicht verbunden

 

 

 

After some samba and cups restarts and some /usr/bin/enable Laserjet5 all is
running until the next restart.

 

 

   via nova communications KEG
  
  marillengasse 16, 7400 oberwart
  phone:   +43 3352 328 60
  fax: +43 3352 329 94
  email:BLOCKED::mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
   BLOCKED::http://www.vnc.at http://www.vnc.at

 

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


Re: [Samba] Add printer driver difficulty

2006-02-27 Thread Martin Zielinski

Mark Rutherford wrote:

Hi everyone.

I am trying to upload the printer drivers to the Samba domain controller.
I an logging in as root, and I browse to the printer, select 
properties.. etc.
I get as far as seeing the files upload and then I am returned to the 
printer dialog.
If I hit either 'Ok' or 'Apply' I get an access denied or 'the operation 
could not be completed'


Try the add printer driver wizard. Go into the printers and faxes 
folder - right click - server properties - drivers - add driver.




I then check the logs for the machine that I am using (in this case 
log.mark) I do not see anything about it

I do see the file uploads in the log.
log.smbd and log.nmbd do not yield any clues either.

configuratiuon settings:

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
admin users = root, Administrator


Try the printer admin setting in the global section (even, if it's 
deprecated) - I've never seen the admin users directive in the 
print$ section...

But this should not fix the problem, as root is allways admin.


write list = root, @ntadmin
force group = root
create mask = 0664
directory mask = 0775

and the directory is ..
drwxr-xr-x  2 root root  48 Feb 24 11:54 drivers


What's with the W32x86 subdirectory? And why's the path to the printer 
drivers (in smb.conf) /var/lib/samba/printers? That's the directory 
the driver are written to.





I also have these set for logging:
log level = 2
log file = /var/log/samba/log.%m
max log size = 5

Ideas anyone? Thanks!



The access denied error message doesn't explain too much. Several 
errors result in this message.


Bye,

Martin

--
Martin Zielinski [EMAIL PROTECTED]
Software Development
SEH Computertechnik GmbH www.seh.de
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Uploading driver to Samba

2006-02-27 Thread Martin Zielinski

Hi!

Please provide some more information:
Samba Version, relevant smb.conf parts, samba log snippets, which 
account your using (access rights), driver directory access settings and

which drivers you are trying to upload.

Bye,

Martin

Pierre Dumaresq wrote:
Hi 


I'm replacing my actual print server by a Linux server and I have everything
else working except the following

When I try to uplad tme printer drivers to the special Samba print$, I
receive the following error
Samba unable to install Windows 2000, intel driver

I read an reread the how to an d differents books, without success

Is it working to upload like they say in the How To ?
(many others seems to have the same problem)

If yes, where can I found a solution to fix it?

My Linux server is a Domain members of a Windows NT4 Servers

I realy need help to fix it
Thank's to anyone who can help me

Pierre Dumaresq
Mis Director
Prestige Telecom
575 Morgan Blvd, Baie d'Urfe, Quebec, H9X 3T6
Tel (514) 457-4488 x269
Fax (514) 457-4517
Cel (514) 409-5882
Email: [EMAIL PROTECTED]




--
Martin Zielinski [EMAIL PROTECTED]
Software Development
SEH Computertechnik GmbH www.seh.de
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Solaris nsswitch.conf with winbind

2006-02-27 Thread Mike
Hi,

I have the exact same problem (described in this archived mail below) but 
couldn't find any solution in the archives or on google.

So far, I have tried renaming one of the allowed libraries like ldap and then 
creating a symlink named nss_ldap.so.1 to point to nss_winbind.so.1 and also 
tried renaming in different versions of the /etc/nsswitch.conf file before and 
after starting winbindd but none of these work.

Can any Solaris admin who also uses Winbind with password aging let me know of 
any workarounds for this problem ?

thanks,
Mike

(the exact problem is described below)

From David.Legge at dier.tas.gov.au  Sun Jan  4 23:49:02 2004
From: David.Legge at dier.tas.gov.au (David Legge)
Date: Sun Jan  4 23:49:26 2004
Subject: [Samba] Problem with winbind and nsswitch.conf on Solaris 8 server
Message-ID: [EMAIL PROTECTED]

Hello,

I'm having some problems using winbind on Samba 3.0.1 with /etc/nsswitch.conf 
on a Solaris 8 server. The Solaris 8 release is 10/00.

The basic problem that I have is that there are restrictions on what 
nsswitch.conf can contain if password ageing is used. 

My setup is that users connecting to shares on the Solaris samba server are 
authenticated against a accounts on a Windows Active Directory Domain. (That 
is, smb.conf is configured to use security = ADS). I am using winbind on the 
Solaris samba server to enumerate Active Directory Domain users and groups as 
standard unix groups and users.

I have installed the winbind libraries thus:

cp libnss_winbind.so /lib
ln -s /usr/lib/libnss_winbind.so /usr/lib/libnss_winbind.so.1
ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.1
ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.2

I have also edited /etc/nsswitch.conf from using 

passwd: files
group:  files

to

passwd: files winbind
group:  files winbind


The problem that I have is that there are restrictions on what nsswitch.conf 
can contain if password ageing is used.

This is indicated in the Solaris 8 man page for nsswitch.conf(4), which says:

  Interaction with Password Aging
 When password aging is turned on, only a limited set of pos-
 sible  name  services are permitted for the passwd: database
 in the /etc/nsswitch.conf file:

  passwd:
files

  passwd:
files nis

  passwd:
files nisplus

  passwd:
files ldap

  passwd:
compat

  passwd_compat:
nisplus

  passwd_compat:

ldap

 Any other settings will cause the passwd(1) command to  fail
 when it attempts to change the password after expiration and
 will prevent the user from logging in. These  are  the  only
 permitted  settings  when password aging has been turned on.
 Otherwise, you can work around incorrect  passwd:  lines  by
 using  the  -r  repository argument to the passwd(1) command
 and using passwd -r repository to override the nsswitch.conf
 settings  and  specify  in  which  name  service you want to
 modify your password.


So, using winbind like this forces me to use `passwd -r files` to do operations 
using the passwd command.

If I don't use the -r switch on the password command, an error is produced 
due to the presense of winbind in the nsswitch.conf file. The error is

passwd: Unsupported nsswitch entry for passwd:. Use -r repository .


We have some applications that will break because of this and we have to use 
password ageing because of our security policy.

Is there any way of overcoming this limitation with nsswitch.conf and winbind 
on Solaris 8?

Thanks,

David Legge


David Legge Ph.D.
Corporate Applications Server Support Officer
Information Management Branch
Department of Infrastructure, Energy and Resources

10 Murray Street, Hobart

GPO Box 936, Hobart, 7001
Tasmania, Australia

Telephone:  (03) 62337148
Facsimile:  (03) 62332573
===
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Two PDCs Samba trustrealtionship -- winbind configuration

2006-02-27 Thread Bojidar Penchev
  Greetings!  
  
I have the following configuration:  
  Two PDCs (Samba 3.0.21b) with Fedora Core 4: PDC1 and PDC2.  
  
PDC1 trusts  PDC2, respectively PDC2 is trusted to PDC1.  
I join an XP workstation to PDC2. After restart i can see both domains  
 in the login screen domain combo box.  
  I can logon to PDC2 , but not to PDC1, since the PDC2's /etc/passwd  lacks 
the username from PDC1 i am trying to log in with. To correct  this i edit 
smb.conf adding this line: 
  
add user script = /usr/sbin/useradd %u -g users -s /bin/false -d 
/dev/null  
  
  After another unsuccessful login to PDC1 (with username ivan for  example) in 
the PDC2's log (/var/log/samba/winxp.log) can be seen the  following lines: 
  
useradd: unable to lock password file  
useradd gave 1  
  
  When i try to access a share on PDC2 with a PDC1 user (ivan for  example), 
useradd is executed successfully, and user ivan is added to  /etc/passwd. 
  
 I found out that during login add  user script = /usr/sbin/useradd %u .. 
is executed with user  nobody, and this user has no right to execute useradd, 
hence an error  occurs.
  
  This is a bug, wich will be never fixed :( , 
https://bugzilla.samba.org/show_bug.cgi?id=2282
  
  For that reason I tryed use a winbind, but without success. I read  about 
winbind, but I couldn't configured it. Pls help me, give to me  any example 
winbind configuration for my case (two PDC's Samba  trustralationship), when, 
where, what I must do?
  
  Thanks in advance;)
  
  
  PS: Will be  fixed this samba's bug(nobody run add user script) in future? 
If it will be not fixed, why?




-
Yahoo! Mail
Bring photos to life! New PhotoMail  makes sharing a breeze. 
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] nmbd shutdown

2006-02-27 Thread Beschorner Daniel
For many samba releases (maybe for longer than 3.0) I see that the nmbd (PDC
 WINS) doesn't shutdown on the first kill signal but on the second.
Any idea?

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


Re: [Samba] Building 3.0.21x on AIX 5.2

2006-02-27 Thread William Jojo


- Original Message - 
From: Tim Evans [EMAIL PROTECTED]
To: samba@lists.samba.org; [EMAIL PROTECTED]
Sent: Friday, February 24, 2006 8:09 PM
Subject: [Samba] Building 3.0.21x on AIX 5.2


 I've followed the instructions in the README at
 http://us4.samba.org/samba/ftp/Binary_Packages/AIX/ for building 3.0.21x
on AIX
 5.2 ('oslevel -r' reports '5200-07').

 The last version I was able to build on the system was 3.0.14a.

 3.0.21c's configure completes with no errors, but the make immediately
bombs
 with:

 # make
 Using FLAGS =  -O -D_SAMBA_BUILD_ -I./popt -Iinclude
 -I/usr/local/SRC/samba-3.0.21c/source/include
 -I/usr/local/SRC/samba-3.0.21c/source/ubiqx
 -I/usr/local/SRC/samba-3.0.21c/source/tdb  -I.
 -I/usr/local/SRC/samba-3.0.21c/source -D_SAMBA_BUILD_
   LIBS =
   LDSHFLAGS = -Wl,-bexpall,-bM:SRE,-bnoentry,-berok
   LDFLAGS =
   PIE_CFLAGS =
   PIE_LDFLAGS =
 Generating smbd/build_options.c
 Building include/proto.h
 creating /usr/local/SRC/samba-3.0.21c/source/include/proto.h
 Building include/wrepld_proto.h
 creating /usr/local/SRC/samba-3.0.21c/source/include/wrepld_proto.h
 Building include/build_env.h
 creating /usr/local/SRC/samba-3.0.21c/source/nsswitch/winbindd_proto.h
 creating /usr/local/SRC/samba-3.0.21c/source/web/swat_proto.h
 creating /usr/local/SRC/samba-3.0.21c/source/client/client_proto.h
 creating /usr/local/SRC/samba-3.0.21c/source/utils/net_proto.h
 creating /usr/local/SRC/samba-3.0.21c/source/utils/ntlm_auth_proto.h
 Compiling dynconfig.c
 In file included from /usr/local/SRC/samba-3.0.21c/source/dynconfig.c:21:
 include/includes.h:841: error: redefinition of `struct timespec'
 make: 1254-004 The error code from the last command is 1.


I'm not able to create this on my 5.2 box, but I'm using gcc 3.4.4. Can you
tell me more about your installation? Compiler, additional products?


Cheers,

Bill


 --
 Tim Evans, TKEvans.com, Inc. |5 Chestnut Court
 [EMAIL PROTECTED] |Owings Mills, MD 21117
 http://www.tkevans.com/ |443-394-3864
 http://www.come-here.com/News/ |

 -- 
 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] Building 3.0.21x on AIX 5.2

2006-02-27 Thread Tim Evans
On Mon, 27 Feb 2006 07:18:25 -0500, William Jojo wrote

 I'm not able to create this on my 5.2 box, but I'm using gcc 3.4.4. 
 Can you tell me more about your installation? Compiler, additional products?

Thanks for your reply.

gcc is 3.3.2, as delivered in IBM's /opt/freeware directory.

lslpp -L | grep -i gcc
  gcc3.3.2-3C RGNU Compiler Collection


configure options:

configured by ./configure, generated by GNU Autoconf 2.59,
  with options \'--with-acl-support' '--with-utmp' '--with-sendfile-support' '-
-with-syslog' '--with-quotas' 'CC=gcc -D_LINUX_SOURCE_COMPAT'\

Do you want the config.log?


--
Tim Evans, TKEvans.com, Inc.|5 Chestnut Court
[EMAIL PROTECTED] |Owings Mills, MD 21117
http://www.tkevans.com/ |443-394-3864
http://www.come-here.com/News/  |

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


Re: [Samba] Building 3.0.21x on AIX 5.2

2006-02-27 Thread David Shapiro
 
Note: do not use binutils
 
#!/bin/ksh -x
 
export LIBPATH=/usr/lib:/usr/local/lib:/opt/freeware/lib
 
env CC=gcc \
CFLAGS=-DPAM_AUTHTOK_RECOVER_ERR=PAM_AUTHTOK_RECOVERY_ERR
-DPAM_EXTERN=extern -D_LINUX_SOURCE_
COMPAT \
CPPFLAGS=-I/usr/local/bdb/include -I/usr/local/ssl/include
-I/usr/local/include -I/usr/include
 \
LDFLAGS=-L/usr/local/bdb/lib -L/usr/local/cyrus-sasl/lib
-L/usr/local/ssl/lib -L/usr/local/ope
nldap/lib -L/usr/lib -L/usr/local/lib \
../configure --prefix=/usr/local/samba
--with-shared-modules=idmap_ad,idmap_rid --with-ads --with-ldap
--with-pam --with-krb5=/usr/local/heimdal-krb5 --with-winbind
--with-acl-support --with-utmp --with-quotas --with-sendfile-support
--with-aio-support --enable-shared=yes --disable-static
 
/usr/local/bin/gmake
/usr/local/bin/gmake install
 
for i in WINBIND pam_winbind.so; do
if [ -f /usr/lib/security/$i ]; then
mv /usr/lib/security/$i /usr/lib/security/$i.old
chmod 555 nsswitch/$i
cp nsswitch/$i /usr/lib/security
rm /usr/lib/security/$i.old
else
cp nsswitch/$i /usr/lib/security
fi
done
 
 
 
# Add to /usr/lib/security config file
WINBIND:
program = /usr/lib/security/WINBIND
options = authonly

 
David Shapiro
Unix Team Lead
919-765-2011

 Tim Evans [EMAIL PROTECTED] 2/27/2006 7:57:54 AM 

On Mon, 27 Feb 2006 07:18:25 -0500, William Jojo wrote

 I'm not able to create this on my 5.2 box, but I'm using gcc 3.4.4. 
 Can you tell me more about your installation? Compiler, additional
products?

Thanks for your reply.

gcc is 3.3.2, as delivered in IBM's /opt/freeware directory.

lslpp -L | grep -i gcc
  gcc3.3.2-3C RGNU Compiler
Collection


configure options:

configured by ./configure, generated by GNU Autoconf 2.59,
  with options \'--with-acl-support' '--with-utmp'
'--with-sendfile-support' '-
-with-syslog' '--with-quotas' 'CC=gcc -D_LINUX_SOURCE_COMPAT'\

Do you want the config.log?


--
Tim Evans, TKEvans.com, Inc.|5 Chestnut Court
[EMAIL PROTECTED] |Owings Mills, MD 21117
http://www.tkevans.com/ |443-394-3864
http://www.come-here.com/News/  |

-- 
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] Compiling Samba on AIX 5.3 with idmap_rid fails

2006-02-27 Thread David Shapiro
I have put a bug in for this a couple weeks ago.  I have the same issue
with 5.2.  I think it is somehow related to pthread support in our gcc
compilers.  I wonder if we would have better luck with ibm visualage... 
Do you have ibm's compiler to test this theory?
 
David
 
David Shapiro
Unix Team Lead
919-765-2011

 Jurjen Oskam [EMAIL PROTECTED] 2/25/2006 5:14:07 PM 

Hi everyone,

I'm trying to use idmap_rid with Samba 3.0.21c on AIX 5.3. So far,
I've
not been successful.

I've followed the method from
http://us5.samba.org/samba/ftp/Binary_Packages/AIX/README to compile
Samba,
but added --with-static-modules=idmap_rid. Also, I used IBM's
compiler
and not gcc.

The compilation fails as follows:

[...]
Compiling sam/idmap.c
Compiling sam/idmap_util.c
Compiling sam/idmap_ldap.c
Compiling sam/idmap_tdb.c
Compiling sam/idmap_rid.c
Linking bin/winbindd
ld: 0711-317 ERROR: Undefined symbol: .idmap_rid_init
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
make: The error code from the last command is 8.


When I use gcc, it also fails at the same point. I also tried
--with-shared-modules=idmap_rid. The compilation then succeeds, but
winbindd then instantly crashes with a signal 11.

What can I do to properly diagnose this problem? 

-- 
Jurjen Oskam
-- 
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] Authenticating to AD with usernames containing dots

2006-02-27 Thread John Boothe

Does *anyone* have info on how I can authenticate to Active Directory using 
dotted usernames from a Linux machine?  I'm running Fedora Core 4 with 
samba-3.0.14a-2, and when I mount a share using a normal (dot-free) username 
everything works fine.  My situation sounds pretty much exactly like the 
following, but there's no response:
 
 http://lists.samba.org/archive/samba/2002-November/055397.html
 
 I'll post logs and such if needed, but it's pretty much the standard error of 
7721: session setup failed: ERRDOS - ERRnoaccess (Access denied.)  I've tried 
the syntax {DOMAIN}+{username} and commenting out the dot, both to no avail.
 
Seems I wouldn't be the only person having this issue, but I can't find 
information *anywhere.*  HELP!
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Change Domain SID

2006-02-27 Thread Michael Gasch
what about stopping samba, deleting secrets.tdb, setting SID to old one, 
starting samba?


greez

M P wrote:

Is there a way to change SAMBA Domain SID?
 
 My SAMBA PDC Server hard drive crashed.  I have created a new install with new Samba PDC Server.  I know my old Domain SID.  Is there a way to change the New Domain SID to original SID?
 
 I have read losts of thread here.  I have tried net setlocalsid SID command on the SAMBA PDC Server.  But, that did not change the Domain SID.  I have tried other commands as well.
 
 Thanks much.
 
		

-
Yahoo! Mail
Bring photos to life! New PhotoMail  makes sharing a breeze. 


--
Michael Gasch
Max Planck Institute for Evolutionary Anthropology
Department of Human Evolution (IT Staff)
Deutscher Platz 6
D-04103 Leipzig
Germany

Phone: 49 (0)341 - 3550 137
   49 (0)341 - 3550 374

Fax:   49 (0)341 - 3550 399

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


[Samba] wbinfo_group.pl / wbinfo -r not working!

2006-02-27 Thread Adam Bruncaj
Hello,

I have been using samba to authenticate my squid users to Active
Directory. Because of the amount of users, I would like to set up my
ACL's based on groups, rather than individual user accounts.

I have successfully joined my samba box to our windows domain (2k).
For some reason I had to enter the domain controller name instead of
the domain name when doing so. I am now having issues looking up user
groups using wbinfo_group and/or wbinfo -r username.

The following are some commands, conf files  logs (the parts that I
believe are relevant). I have a feeling I have more than one issue
going on here. Please let me know if you need more info.

I doubt there are limitations, but we are in a somewhat large
environment (about 4,000 users accounts) with multiple sub domains.

-
# I compiled squid with...
./configure --enable-external-acl-helpers=unix_group,wbinfo_group
--
[EMAIL PROTECTED] squid]# rpm -q samba
samba-3.0.21c-1
--
[EMAIL PROTECTED] squid]# wbinfo -a domainuser1%hispass
plaintext password authentication succeeded
challenge/response password authentication succeeded
---
[EMAIL PROTECTED] squid]# wbinfo -t
checking the trust secret via RPC calls succeeded
---
[EMAIL PROTECTED] squid]# wbinfo -u |more
SUBDOMAIN1\exemployees
SUBDOMAIN1\installservice
...
..
SUBDOMAIN2\exch
SUBDOMAIN2\adcsv
SUBDOMAIN2\administrator
..
..
domainuser1  #These are the accounts that I would be working with and
would need lookup there groups. note that
domainuser2
domainuser2
..
..

[EMAIL PROTECTED] samba]# wbinfo -n domainuser1
S-1-5-21-954140891-1229348589-1136263860-10879 User (1)

[EMAIL PROTECTED] squid]# ./wbinfo_group.pl
user1 domain users
Could not lookup name domain users
Could not convert sid  to gid
Could not get groups for user user1
OK
# also tried domain\\user domain\\group
--
[EMAIL PROTECTED] samba]# wbinfo -r domainuser1
Could not get groups for user domainuser1
#also tried with domain\\domainuser1
---
[EMAIL PROTECTED] samba]# wbinfo --sequence
SubDomain1 : DISCONNECTED
SubDomain2 : DISCONNECTED
Subdomain3 : 2576451
LIONS : 1
BUILTIN : 1
MyDomain : DISCONNECTED # it states disconnected, but I am able to
view users and groups?


My conf files

(smb.conf) # note that this is the while conf file. I read that this
is all I need

[global]
workgroup = MyDomain
netbios name = lions
password server = 10.20.250.2
security = domain
winbind uid = 1-2
winbind gid = 1-2
winbind use default domain = yes

(nsswitch.conf)
#
# /etc/nsswitch.conf
#
# To use db, put the db in front of files for entries you want to be
# looked up first in the databases
#
# Example:
#passwd:db files nisplus nis
#shadow:db files nisplus nis
#group: db files nisplus nis
passwd: files winbind
shadow: files winbind
group:  files winbind
#hosts: db files nisplus nis dns
hosts:  files winbind dns
# Example - obey only what nisplus tells us...
#services:   nisplus [NOTFOUND=return] files
#networks:   nisplus [NOTFOUND=return] files
#protocols:  nisplus [NOTFOUND=return] files
#rpc:nisplus [NOTFOUND=return] files
#ethers: nisplus [NOTFOUND=return] files
#netmasks:   nisplus [NOTFOUND=return] files
bootparams: nisplus [NOTFOUND=return] files
ethers: db files
netmasks:   files
networks:   files dns
protocols:  files winbind
rpc:db files
services:   files winbind
netgroup:   files winbind
publickey:  nisplus
automount:  files winbind
aliases:files nisplus
-
(krb5.conf)

[libdefaults]
 default_realm = Mydomain.domain.com

 dns_lookup_realm = true
 dns_lookup_kdc = true
[realms]
MY = {
  kdc = domaincontroller1.mydomain.domain.com
  admin_server = domaincontroller1
  kdc = domaincontroller1
}

[domain_realm]
.kerberos.server = MYDOMAIN.DOMAIN.COM
---

Log files:

[EMAIL PROTECTED] samba]# vi winbindd.log
[2006/02/27 08:02:32, 1] nsswitch/winbindd_ads.c:ads_cached_connection(109)
  ads_connect for domain SUBDOMAIN2 failed: No such file or directory
[2006/02/27 08:04:08, 1] nsswitch/winbindd_sid.c:winbindd_sid_to_gid(221)
  Could not get convert sid  from string
[2006/02/27 08:04:27, 1] nsswitch/winbindd_sid.c:winbindd_sid_to_gid(221)
  Could not get convert sid  from string
[2006/02/27 08:05:06, 1] nsswitch/winbindd_sid.c:winbindd_sid_to_gid(221)
  Could not get convert sid  from string
[2006/02/27 08:06:29, 1] nsswitch/winbindd_sid.c:winbindd_sid_to_gid(221)
  Could not get convert sid  from string
[2006/02/27 08:17:00, 1] nsswitch/winbindd_ads.c:ads_cached_connection(109)
  ads_connect for domain SUBDOMAIN2 failed: No such file or directory
[2006/02/27 08:21:16, 1] 

[Samba] acl and winbindd woes

2006-02-27 Thread Robert Gehr
Hello 

We have got a samba PDC and BDC running openldap as a backend and it works 
pretty well.

I set up another samba File-Server and joined the domain all right. 
Also set up winbindd using the idmap facility via ldap.

On the File-Server when I do a

wbinfo -n joe I get 
S-1-5-21-1133090748-3639176701-2116357234-1062 User (1)

wbinfo -s S-1-5-21-1133090748-3639176701-2116357234-1062 gives me

My-Domain\joe

wbinfo -S S-1-5-21-1133090748-3639176701-2116357234-1062 gives

10329

So far so good.

Setting acls using the the explorer in Windows I add joe to directory temp 
works also but when I run the command

getfacl temp I get

# file: temp
# owner: jack
# group: Domain_Users
user::rwx
user:10329:rwx
group::---
mask::rwx
other::---
default:user::rwx
default:user:10329:rwx
default:group::---
default:mask::rwx
default:other::---

User joe does not get listed by name, but only via its idmap ID.
Now the problem is, user joe has no access to directory temp even though he 
should. 


What have I done wrong??

Anyone any ideas??

Thanks for helping.


-- 
Best Regards
Robert Gehr


We make a living by what we get, but we make a life by what we give.

~ Winston Churchill


 o
  /\ /_  o__
o*  ~(_) ,/'_  o__
Robert Gehr (_)\(_) ,/'_   o__   o__
Baumann GmbH, 92224 Amberg (_)\(_)  ,/'_ ,/'
visit: http://www.baumann-gmbh.de  (_)\(_)   (_)\(_)
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Authenticating users via samba to an active directory

2006-02-27 Thread Alex Sharaz
Chaps, 
Got a small problem here that I could do with some help with.

I am looking at implementing 802.1X wired based network authentication
here and am using a RADIUS server called Radiator as the primary
authentication mechanism. Radiator has an authentication module that'll
allow  user auth to an active directory via components of the samba
suite. The requirement is that the host samba server be a member of the
active directory. 
And the config mechanism uses 
/usr/bin/ntlm_auth  --helper-protocol=ntlm-server-1

The smb.conf file being used is

[global]
   workgroup = 
   security = domain
   password server = p.q.r.s
   realm = ADIR.HULL.AC.UK
   preferred master = no
   server string = Hull Comms support server
   security = ADS
   use spnego = yes
   encrypt passwords = yes
   log level = 3
   log file = /var/log/samba/%m
   max log size = 50
   winbind separator = +
   idmap uid = 1-2
   idmap gid = 1-2 
   bind interfaces only =yes
   interfaces =a.b.c.d 127.0.0.1
   client NTLMv2 auth=yes

and with this I can use ntlm_auth --username=
--domain=adir.hull.ac.uk 
--password=fred, or ntlm_auth --username=xxx --password=fred

At an 802.1X supplicant I can now authenticate via Radiator/Samba/AD by
specifying a userid, password (I'm using eap-ttls and an inner auth type
of MSCHAPV2)

However, what I'd like to do is have the user authenticate using a
domain of hull.ac.uk. At this point things do not work.

If I use the above example ntlm_auth --username= --domain=
hull.ac.uk --password=fred what I get is an NT_STATUS_NO_SUCH_USER: No
such user (0xc064) message.

From our Desktop services team here is a description of what we do
there.

In an Active Directory tree, the names of both a child domain and the
root domain are available as default UPN suffixes.

To simplify logon, we use the root domain names the primary UPN suffix,
that is, hull.ac.uk. Any user can also log on as
[EMAIL PROTECTED]

For security purposes, we could make any number of other UPN suffixes,
for example hull.internal

UPN suffixes other than the current domain  name are generally linked
with a user at the time of account creation

We need to know how to logon with the root domain as the UPN suffix
rather than the child name


Any help appreciated
Alex


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


[Samba] Samba 3.0.21b binaries on AIX 5.2 ML4, fails to run after install

2006-02-27 Thread mark . cuthbert
After installing the prbuilt binaries from samba.org for AIX 5.2, and
installing, I get the following running testparm or smbstatus :-

[WMSTRAIN:root]/opt/Samba/3.0.21b/bin smbstatus
exec(): 0509-036 Cannot load program smbstatus because of the following
errors:
0509-130 Symbol resolution failed for smbstatus because:
0509-136   Symbol statvfs64 (number 115) is not exported from
   dependent module /usr/lib/libc.a(shr.o).
0509-136   Symbol opendir64 (number 145) is not exported from
   dependent module /usr/lib/libc.a(shr.o).
0509-136   Symbol closedir64 (number 146) is not exported from
   dependent module /usr/lib/libc.a(shr.o).
0509-136   Symbol readdir64 (number 147) is not exported from
   dependent module /usr/lib/libc.a(shr.o).
0509-136   Symbol seekdir64 (number 150) is not exported from
   dependent module /usr/lib/libc.a(shr.o).
0509-136   Symbol telldir64 (number 187) is not exported from
   dependent module /usr/lib/libc.a(shr.o).
0509-192 Examine .loader section symbols with the
 'dump -Tv' command.

Can anyone suggest a solution?

Regards

Mark



Find out how to protect your home from frost this winter at 
www.yorkshirewater.com

YORKSHIRE WATER - WINNER OF THE UTILITY OF THE YEAR AWARD 2004 AND 2005

The information in this e-mail is confidential and may also be legally
privileged. The contents are intended for recipient only and are subject 
to the legal notice available at http://www.keldagroup.com/email.htm
Yorkshire Water Services Limited
Registered Office Western House Halifax Road Bradford BD6 2SZ
Registered in England and Wales No 2366682

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


[Samba] specifying groups: @ vs. +

2006-02-27 Thread Thomas Limoncelli
In *non-NIS* environments: is there *any* difference in specifying 
@mygroup vs. +mygroup in smb.conf?


smb.conf(5) from 3.0.21c says:

  A  name  starting with a '@' is interpreted as an NIS net-
  group first (if your system supports NIS), and then  as  a
  UNIX  group  if the name was not found in the NIS netgroup
  database.

  A name starting with '+' is interpreted only by looking in
  the  UNIX  group  database.

which suggests that they should work equally in non-NIS environments. 
Still, to double-check: is there any (even slight) overhead imposed by 
one vs. the other?



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


[Samba] ls uids

2006-02-27 Thread John Halfpenny

hey everyone,

is it by design to show the winbind uids rather than the windows usernames when 
i do an ls -l command to show who owns which folder?

if it is i'll stop trying to fix it. :0)

thanks for any guidance

john

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


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


Re: [Samba] Samba 3.0.21b binaries on AIX 5.2 ML4, fails to run after install

2006-02-27 Thread William Jojo

- Original Message - 
From: [EMAIL PROTECTED]
To: samba@lists.samba.org
Sent: Monday, February 27, 2006 11:16 AM
Subject: [Samba] Samba 3.0.21b binaries on AIX 5.2 ML4,fails to run after
install


 After installing the prbuilt binaries from samba.org for AIX 5.2, and
 installing, I get the following running testparm or smbstatus :-


Please see the README file in the dir where you got the binary. You've
got -04, but I think these symbols appeared in -05. (Presently 08-1 is
available).


Cheers,

Bill


 [WMSTRAIN:root]/opt/Samba/3.0.21b/bin smbstatus
 exec(): 0509-036 Cannot load program smbstatus because of the following
 errors:
 0509-130 Symbol resolution failed for smbstatus because:
 0509-136   Symbol statvfs64 (number 115) is not exported from
dependent module /usr/lib/libc.a(shr.o).
 0509-136   Symbol opendir64 (number 145) is not exported from
dependent module /usr/lib/libc.a(shr.o).
 0509-136   Symbol closedir64 (number 146) is not exported from
dependent module /usr/lib/libc.a(shr.o).
 0509-136   Symbol readdir64 (number 147) is not exported from
dependent module /usr/lib/libc.a(shr.o).
 0509-136   Symbol seekdir64 (number 150) is not exported from
dependent module /usr/lib/libc.a(shr.o).
 0509-136   Symbol telldir64 (number 187) is not exported from
dependent module /usr/lib/libc.a(shr.o).
 0509-192 Examine .loader section symbols with the
  'dump -Tv' command.

 Can anyone suggest a solution?

 Regards

 Mark



 Find out how to protect your home from frost this winter at
www.yorkshirewater.com

 YORKSHIRE WATER - WINNER OF THE UTILITY OF THE YEAR AWARD 2004 AND 2005

 The information in this e-mail is confidential and may also be legally
 privileged. The contents are intended for recipient only and are subject
 to the legal notice available at http://www.keldagroup.com/email.htm
 Yorkshire Water Services Limited
 Registered Office Western House Halifax Road Bradford BD6 2SZ
 Registered in England and Wales No 2366682

 -- 
 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] Building 3.0.21x on AIX 5.2

2006-02-27 Thread Tim Evans
On Mon, 27 Feb 2006 08:51:16 -0500, David Shapiro wrote
 Note: do not use binutils

Could you be more specific here, please?

 #!/bin/ksh -x
  
 export LIBPATH=/usr/lib:/usr/local/lib:/opt/freeware/lib
  
 env CC=gcc \
 CFLAGS=-DPAM_AUTHTOK_RECOVER_ERR=PAM_AUTHTOK_RECOVERY_ERR
 -DPAM_EXTERN=extern -D_LINUX_SOURCE_
 COMPAT \
 CPPFLAGS=-I/usr/local/bdb/include -I/usr/local/ssl/include
 -I/usr/local/include -I/usr/include
  \
 LDFLAGS=-L/usr/local/bdb/lib -L/usr/local/cyrus-sasl/lib
 -L/usr/local/ssl/lib -L/usr/local/ope
 nldap/lib -L/usr/lib -L/usr/local/lib \
 ../configure --prefix=/usr/local/samba
 --with-shared-modules=idmap_ad,idmap_rid --with-ads --with-ldap
 --with-pam --with-krb5=/usr/local/heimdal-krb5 --with-winbind
 --with-acl-support --with-utmp --with-quotas --with-sendfile-support
 --with-aio-support --enable-shared=yes --disable-static

I really only need the default configuration.  The configure script used to
work properly by itself, with no arguments.  Much, if not most, of the above
is stuff I either don't need, directories I don't have/use, or what I think
are normal defaults.
--
Tim Evans, TKEvans.com, Inc.|5 Chestnut Court
[EMAIL PROTECTED] |Owings Mills, MD 21117
http://www.tkevans.com/ |443-394-3864
http://www.come-here.com/News/  |

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


[Samba] link error in libmsrpc

2006-02-27 Thread Amir Goldor
Hi,

I was trying to use libmsrpc that comes with release 3.0.21b
and the example programs regkey* that come with it.

first of all, in the link stage I get an error that smbc_attr_server
is an unresolved symbol in libmsrpc.c, which is true, because its a
static function in libsmbclient.c.

after I chaged smbc_attr_server function to be non-static everything links.

besides the link error, the function call always fails in my tests
(errno==ENOTSUP) and I am wandering if this has anything to do with
the changes I made.

the remote XP machine I am connecting to shows successful login
entries in the event viewer.

I'll appreciate some help,
thanks,
Amir.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Building 3.0.21x on AIX 5.2

2006-02-27 Thread William Jojo

- Original Message - 
From: Tim Evans [EMAIL PROTECTED]
To: David Shapiro [EMAIL PROTECTED]; William Jojo
[EMAIL PROTECTED]; samba@lists.samba.org; [EMAIL PROTECTED]; Tim
Evans [EMAIL PROTECTED]
Sent: Monday, February 27, 2006 12:02 PM
Subject: Re: [Samba] Building 3.0.21x on AIX 5.2


 On Mon, 27 Feb 2006 08:51:16 -0500, David Shapiro wrote
  Note: do not use binutils

 Could you be more specific here, please?

  #!/bin/ksh -x
 
  export LIBPATH=/usr/lib:/usr/local/lib:/opt/freeware/lib
 
  env CC=gcc \
  CFLAGS=-DPAM_AUTHTOK_RECOVER_ERR=PAM_AUTHTOK_RECOVERY_ERR
  -DPAM_EXTERN=extern -D_LINUX_SOURCE_
  COMPAT \
  CPPFLAGS=-I/usr/local/bdb/include -I/usr/local/ssl/include
  -I/usr/local/include -I/usr/include
   \
  LDFLAGS=-L/usr/local/bdb/lib -L/usr/local/cyrus-sasl/lib
  -L/usr/local/ssl/lib -L/usr/local/ope
  nldap/lib -L/usr/lib -L/usr/local/lib \
  ../configure --prefix=/usr/local/samba
  --with-shared-modules=idmap_ad,idmap_rid --with-ads --with-ldap
  --with-pam --with-krb5=/usr/local/heimdal-krb5 --with-winbind
  --with-acl-support --with-utmp --with-quotas --with-sendfile-support
  --with-aio-support --enable-shared=yes --disable-static

 I really only need the default configuration.  The configure script used
to
 work properly by itself, with no arguments.  Much, if not most, of the
above
 is stuff I either don't need, directories I don't have/use, or what I
think
 are normal defaults.

This could be the crux. The notes you are following are simply the notes I
used to build the binaries. As such, they provide a means for others to
build as I did with as few dependencies at runtime as possible.

However, this may not be ideal for *you*.

Try something simpler like:

env CC=gcc -g -D_LINUX_SOURCE_COMPAT \
CPPFLAGS=-I/usr/local/include -I/usr/local/BerkeleyDB.4.3/include \
LDFLAGS=-L/usr/local/lib -L/usr/local/BerkeleyDB.4.3/lib \
./configure --with-acl-support --with-utmp \
--with-ldap --with-ads=no --with-aio=yes \
--with-libiconv=/usr/local --with-sendfile-support \
--prefix=/samba/3.0.21c --with-quotas


If you don't want to use LDAP and BerkeleyDB, just remove them. You can
safely turn off AIO and sendfile support as they are performance enhancers.


Cheers,

Bill



 --
 Tim Evans, TKEvans.com, Inc.|5 Chestnut Court
 [EMAIL PROTECTED] |Owings Mills, MD 21117
 http://www.tkevans.com/ |443-394-3864
 http://www.come-here.com/News/  |



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


Re: [Samba] specifying groups: @ vs. +

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

Thomas Limoncelli wrote:

 which suggests that they should work equally in non-NIS 
 environments. Still, to double-check: is there any
 (even slight) overhead imposed by one vs. the other?

If not compiled with netgroup support, there is a
only the overhead of a single function call which
immediately returns.





cheers, jerry
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEAzKtIR7qMdg1EfYRAgTeAKC1txa68VtnfP8iXKz2FKlegHPpuwCdEa4e
+Id3f8lVjLLweO2e/9+h7+Y=
=dcV/
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] NTUSER.DAT, user's settings

2006-02-27 Thread Ludwig Meyerhoff

Hallo!

I have reinstalled the server, specially the Samba PDC.
I copied all the data back and the system seemed to work. People were
able to log on and had the drives mapped.

Now, at the day 0 after reinstall, the users cannot work. The user's
settings on the Windows 2k Professional machines are not adopted. They
all have their desktops and own documents, but the keyboard settings and
outlook-express settings are not taken from the profile.

I think it has to do with the users having new SIDs (as the PDC and the
domain itself have changed).

I am now DESPERATELY trying to get the user settings to work ...any
hint?



Saluti!

Ludwig

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


[Samba] NTUSER.DAT, user's settings

2006-02-27 Thread Ludwig Meyerhoff

Hallo!

I have reinstalled the server, specially the Samba PDC.
I copied all the data back and the system seemed to work. People were 
able to log on and had the drives mapped.


Now, at the day 0 after reinstall, the users cannot work. The user's 
settings on the Windows 2k Professional machines are not adopted. They 
all have their desktops and own documents, but the keyboard settings and 
outlook-express settings are not taken from the profile.


I think it has to do with the users having new SIDs (as the PDC and the 
domain itself have changed).


I am now DESPERATELY trying to get the user settings to work ...any 
hint?




Saluti!

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


Re: [Samba] Building 3.0.21x on AIX 5.2

2006-02-27 Thread Tim Evans
On Mon, 27 Feb 2006 12:08:49 -0500, William Jojo wrote


 Try something simpler like:
 
 env CC=gcc -g -D_LINUX_SOURCE_COMPAT \
 CPPFLAGS=-I/usr/local/include -I/usr/local/BerkeleyDB.4.3/include \
 LDFLAGS=-L/usr/local/lib -L/usr/local/BerkeleyDB.4.3/lib \
 ./configure --with-acl-support --with-utmp \
 --with-ldap --with-ads=no --with-aio=yes \
 --with-libiconv=/usr/local --with-sendfile-support \
 --prefix=/samba/3.0.21c --with-quotas
 
 If you don't want to use LDAP and BerkeleyDB, just remove them. You can
 safely turn off AIO and sendfile support as they are performance enhancers.

Thanks, again:

env CC=gcc -g -D_LINUX_SOURCE_COMPAT \
CPPFLAGS=-I/usr/local/include \
LDFLAGS=-L/usr/local/lib \
./configure --with-acl-support --with-utmp \
--with-libiconv=/usr/local --with-quotas --with-ads=no


# make
Using FLAGS =  -O -D_SAMBA_BUILD_ -I./popt -Iinclude
-I/usr/local/SRC/samba-3.0.21c/source/include
-I/usr/local/SRC/samba-3.0.21c/source/ubiqx
-I/usr/local/SRC/samba-3.0.21c/source/tdb  -I. -I/usr/local/include
-I/usr/local/SRC/samba-3.0.21c/source -D_SAMBA_BUILD_
  LIBS =
  LDSHFLAGS = -Wl,-bexpall,-bM:SRE,-bnoentry,-berok  -L/usr/local/lib
  LDFLAGS = -L/usr/local/lib
  PIE_CFLAGS =
  PIE_LDFLAGS =
Generating smbd/build_options.c
Building include/proto.h
creating /usr/local/SRC/samba-3.0.21c/source/include/proto.h
Building include/wrepld_proto.h
creating /usr/local/SRC/samba-3.0.21c/source/include/wrepld_proto.h
Building include/build_env.h
creating /usr/local/SRC/samba-3.0.21c/source/nsswitch/winbindd_proto.h
creating /usr/local/SRC/samba-3.0.21c/source/web/swat_proto.h
creating /usr/local/SRC/samba-3.0.21c/source/client/client_proto.h
creating /usr/local/SRC/samba-3.0.21c/source/utils/net_proto.h
Compiling dynconfig.c
In file included from /usr/local/SRC/samba-3.0.21c/source/dynconfig.c:21:
include/includes.h:841: error: redefinition of `struct timespec'
make: 1254-004 The error code from the last command is 1.

Same error as I originally posted.

--
Tim Evans, TKEvans.com, Inc.|5 Chestnut Court
[EMAIL PROTECTED] |Owings Mills, MD 21117
http://www.tkevans.com/ |443-394-3864
http://www.come-here.com/News/  |

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


[Samba] klist reports no tickets cached

2006-02-27 Thread Richard Santiago
Hi,

 

I'm a newbie with Samba but believe me prior to posting to the list I have read 
almost everything out there and still don't get my issue solved.  I have also 
re-installed Samba but still no luck.

 

I have Samba 3.0.21b installed and had it working for a day.  I've installed it 
using security = ads with winbind and everything was smooth except when I 
started configuring PAM so that I can automatically create the user's info on 
the Linux box running Samba when he uses the Samba share for the first time.  
This is going to be a file server with the home directories of the AD users [ 
/home/DOMAIN/user].  As recommended, I backed up the /etc/pam.d directory prior 
to modifying some files in it so I restored it but still doesn't work.

 

These are the errors I get when testing the connection to the AD:

 

[EMAIL PROTECTED] samba]# klist

Ticket cache: FILE:/tmp/krb5cc_0

Default principal: [EMAIL PROTECTED]

 

Valid starting ExpiresService principal

02/23/06 16:21:00  02/24/06 02:21:03  krbtgt/[EMAIL PROTECTED]

renew until 02/24/06 16:21:00

 

Kerberos 4 ticket cache: /tmp/tkt0

klist: You have no tickets cached

 

[EMAIL PROTECTED] samba]# wbinfo -u

Error looking up domain users

 

[EMAIL PROTECTED] samba]# wbinfo -g

Error looking up domain groups

 

[EMAIL PROTECTED] samba]# wbinfo -t

checking the trust secret via RPC calls failed

error code was NT_STATUS_ACCESS_DENIED (0xc022)

Could not check secret

 

The following works fine:

 

[EMAIL PROTECTED] samba]# net ads info

LDAP server: 10.50.0.190

LDAP server name: rcmroot1

Realm: RCM.UPR.EDU

Bind Path: dc=RCM,dc=UPR,dc=EDU

LDAP port: 389

Server time: Mon, 27 Feb 2006 13:56:33 VET

KDC server: 10.50.0.190

Server time offset: 0

 

[EMAIL PROTECTED] samba]# net rpc info

Domain Name: MYDOMAIN

Domain SID: S-1-5-21-4214176146-1751683361-2990660170

Sequence number: 1345

Num users: 4786

Num domain groups: 56

Num local groups: 274

 

Do you have any ideas on how I can solve my issue?.

 

Thanks for your help.

 

Regards,

 

Richard Santiago

OSI - Administración de Sistemas

UPR - Recinto de Ciencias Médicas

phone: 787.758.2525 x. 2934

e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 

 

 

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


[Samba] printer admin still working in 3.0.21c?

2006-02-27 Thread Thomas Limoncelli
While I'm able to successfully upload printer drivers with APW to my 
Samba 3.0.21c DMS server with CUPS, I have a hard time changing printer 
properties afterwards which always ends up with access denied, 
although the AD account used to connect is listed in [global] printer 
admin =.


I noticed that printer admin is marked deprecated in 3.0.21c, but 
isn't it still supposed to work? FWIW, TOSHARG and S3bE still suggest 
printer admin at various places.


I still have to find my way through the samba logs and Ethereal traces, 
but would be grateful for any advice in the meantime.


Here's the log.smbd snippet that *seems* to be the culprit:

[2006/02/27 18:21:24, 5] rpc_server/srv_spoolss_nt.c:check_printer_ok(5933)
  check_printer_ok: servername=\\myserver printername=\\myserver\HP 
Universal Printing PS sharename=myprinter01 portname=Samba Printer Port 
drivername=HP Universal Printing PS comment=myprinter01 location=

[2006/02/27 18:21:24, 3] rpc_server/srv_spoolss_nt.c:update_printer(6113)
  update_printer: printer property change denied by handle

Anyone?


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


[Samba] Security = Server and guest ok

2006-02-27 Thread Tapia, Felipe
Is it possible to have guest ok shares with Security = Server?

I have map to guest = Bad Password in Globals and guest ok = Yes
for my share. The user is nobody on a solaris box.

Setting debug to level 2 I get this output on connections (using tail on
the log file)
[2006/02/27 09:23:22, 1] auth/auth_server.c:(363)
  password server 1xx.2xx.3xx.4xx rejected the password
[2006/02/27 09:23:22, 2] auth/auth.c:(317)
  check_ntlm_password:  Authentication for user [0aadm1n] - [0aadm1n]
FAILED with error NT_STATUS_LOGON_FAILURE
[2006/02/27 09:23:31, 2] smbd/server.c:(612)
  Closing connections

I don't see it rolling over to the nobody user. In reading the manuals I
saw that it's using the User security model in which it can only make a
user/passwd decision and allow or reject. Have I read this properly or
is this still possible with another configuration?

Yes, I know Server is not the recommended way to go. I don't have the
choice right now and I need to get something working fairly quickly.

Any suggestions would be appreciated.




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


[Samba] users can't change file attributes

2006-02-27 Thread Toni Casueps
I want normal users to change read only attributes for files, at least for 
files they own.


I have read about the security mask and directory security mask options 
of smb.conf but it says that by default they allow to change all the 
permissions, however they always get permission denied


What am I doing wrong?


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


Re: [Samba] Building 3.0.21x on AIX 5.2

2006-02-27 Thread William Jojo

- Original Message - 
From: Tim Evans [EMAIL PROTECTED]
To: William Jojo [EMAIL PROTECTED]; [EMAIL PROTECTED]; David
Shapiro [EMAIL PROTECTED]; samba@lists.samba.org;
[EMAIL PROTECTED]
Sent: Monday, February 27, 2006 1:01 PM
Subject: Re: [Samba] Building 3.0.21x on AIX 5.2


 On Mon, 27 Feb 2006 12:08:49 -0500, William Jojo wrote

 
  Try something simpler like:
 
  env CC=gcc -g -D_LINUX_SOURCE_COMPAT \
  CPPFLAGS=-I/usr/local/include -I/usr/local/BerkeleyDB.4.3/include \
  LDFLAGS=-L/usr/local/lib -L/usr/local/BerkeleyDB.4.3/lib \
  ./configure --with-acl-support --with-utmp \
  --with-ldap --with-ads=no --with-aio=yes \
  --with-libiconv=/usr/local --with-sendfile-support \
  --prefix=/samba/3.0.21c --with-quotas
 
  If you don't want to use LDAP and BerkeleyDB, just remove them. You can
  safely turn off AIO and sendfile support as they are performance
enhancers.

 Thanks, again:

 env CC=gcc -g -D_LINUX_SOURCE_COMPAT \
 CPPFLAGS=-I/usr/local/include \
 LDFLAGS=-L/usr/local/lib \
 ./configure --with-acl-support --with-utmp \
 --with-libiconv=/usr/local --with-quotas --with-ads=no


 # make
 Using FLAGS =  -O -D_SAMBA_BUILD_ -I./popt -Iinclude
 -I/usr/local/SRC/samba-3.0.21c/source/include
 -I/usr/local/SRC/samba-3.0.21c/source/ubiqx
 -I/usr/local/SRC/samba-3.0.21c/source/tdb  -I. -I/usr/local/include
 -I/usr/local/SRC/samba-3.0.21c/source -D_SAMBA_BUILD_
   LIBS =
   LDSHFLAGS = -Wl,-bexpall,-bM:SRE,-bnoentry,-berok  -L/usr/local/lib
   LDFLAGS = -L/usr/local/lib
   PIE_CFLAGS =
   PIE_LDFLAGS =
 Generating smbd/build_options.c
 Building include/proto.h
 creating /usr/local/SRC/samba-3.0.21c/source/include/proto.h
 Building include/wrepld_proto.h
 creating /usr/local/SRC/samba-3.0.21c/source/include/wrepld_proto.h
 Building include/build_env.h
 creating /usr/local/SRC/samba-3.0.21c/source/nsswitch/winbindd_proto.h
 creating /usr/local/SRC/samba-3.0.21c/source/web/swat_proto.h
 creating /usr/local/SRC/samba-3.0.21c/source/client/client_proto.h
 creating /usr/local/SRC/samba-3.0.21c/source/utils/net_proto.h
 Compiling dynconfig.c
 In file included from /usr/local/SRC/samba-3.0.21c/source/dynconfig.c:21:
 include/includes.h:841: error: redefinition of `struct timespec'
 make: 1254-004 The error code from the last command is 1.

 Same error as I originally posted.

Ok, can you get me oslevel -r, config.log and the includes.h file? You
said 3.3.2 gcc? Was this from the IBM Linux toolset in rpm format?

Can you try something before you send those? in the /opt folder where the
freeware gcc will be, can you rename the include dir for gcc to something
like include.old? don't delete it, just rename it. part of that install has
some sketchy includes and i'm wondering if they are getting in the way (it
did on some initial 5.3 testing at one time). It'll be something like
/opt/freeware/gcc...-3.3.2.../include


Cheers,

Bill



 --
 Tim Evans, TKEvans.com, Inc.|5 Chestnut Court
 [EMAIL PROTECTED] |Owings Mills, MD 21117
 http://www.tkevans.com/ |443-394-3864
 http://www.come-here.com/News/  |



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


Re: [Samba] printer admin still working in 3.0.21c?

2006-02-27 Thread Thomas Limoncelli

Thomas Limoncelli wrote:

[2006/02/27 18:21:24, 3] rpc_server/srv_spoolss_nt.c:update_printer(6113)
  update_printer: printer property change denied by handle


Looking earlier into the log.smbd I see that I've been granted 
PRINTER_ACCESS_USE although I probably want PRINTER_ACCESS_ADMINISTER


[2006/02/27 18:19:15, 5] lib/util_seaccess.c:se_access_check(308)
  se_access_check: access (8) granted.
[2006/02/27 18:19:15, 4] printing/nt_printing.c:print_access_check(5334)
  access check was SUCCESS
[2006/02/27 18:19:15, 4] 
rpc_server/srv_spoolss_nt.c:_spoolss_open_printer_ex(1697)

  Setting printer access = PRINTER_ACCESS_USE

even though I do connect as the printer admin = user (a winbind AD 
DOMAIN\user, but I even tried root). Does anyone have a hint where to 
continue looking?



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


[Samba] Multiple domains served by a single LDAP tree

2006-02-27 Thread David B Harris
Good {morning,afternoon,evening} everybody,

A while ago I wrote to the list asking about whether the
uidNumber/gidNumber of the commonly-known SIDs had to match the RID of
the SID; the answer was no.

I asked because I intended to implement multiple NT4/Samba domains using
a single LDAP tree; each Samba PDC/BDC instance would only use the
relevant subset of the tree. Unix/Linux hosts would use the full LDAP
tree to resolve every possible UID/GID, but Windows hosts would use
DOMAIN\group and/or DOMAIN\user stuff.

I've read the documentation more, in particular those bits corresponding
to inter-Samba domain trusts, and the documentation quite clearly states
that this isn't particularly recommended given the fragility of SMB
trusts, and the availability of such scalable backends as LDAP.

My question, then, is do people here put together multiple NT4/Samba
domains using a single LDAP backend? I'm betting not. Assuming that's
the case, from Windows, how does one assign permissions and whatnot?
From a single large flatspace containing every user and group? If not,
how are they separated?

Part of this is a user-acceptance issue; I'd like it to be very clear
that a particular user belongs to a particular business group (ie:
DEVEL, EXEC, FINANCE).

I guess the crux of the question is, is there any way to have multiple
NT4/Samba domains served from a single multi-branch LDAP backend without
inter-domain trusts, or is there some better way to go about what I'm
trying to accomplish?

Thanks very much in advance.

-- 
 Arguing with an engineer is like wrestling with a pig in mud.
   After a while, you realise the pig is enjoying it.

   OpenPGP v4 key ID: 4096R/59DDCB9F
Fingerprint: CC53 F124 35C0 7BC2 58FE  7A3C 157D DFD9 59DD CB9F
 Retrieve from subkeys.pgp.net
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Need Advice

2006-02-27 Thread Travis Bullock
Greetings,

 

We are going to be expanding our operations to another city. I currently use
Samba and Winbind to provide shares and file access to my existing locations
users. The account information is kept on a NT4.0 PDC and BDC.

 

I have connected the new location via OpenVPN. I am wondering how I should
go about expanding my domain. Should I set up another NT4.0 BDC in the new
office and have a local Samba machine get account info from that via
Winbind? Or should I set up the Samba machine as a BDC itself? Is it
possible for a Samba BDC to receive account updates from a NT4.0 PDC?

 

Cheers,

 

Travis

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


RE: [Samba] Need Advice

2006-02-27 Thread James Taylor
Save yourself the costs of having to buy licensing and extra equipment and
run Samba as an NT4 BDC.  In my humble belief it would be easier for you to
maintain and less overhead at your remote location where you might have
limited IT support.

JT

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Travis Bullock
Sent: Monday, February 27, 2006 12:53 PM
To: Samba
Subject: [Samba] Need Advice

Greetings,

 

We are going to be expanding our operations to another city. I currently use
Samba and Winbind to provide shares and file access to my existing locations
users. The account information is kept on a NT4.0 PDC and BDC.

 

I have connected the new location via OpenVPN. I am wondering how I should
go about expanding my domain. Should I set up another NT4.0 BDC in the new
office and have a local Samba machine get account info from that via
Winbind? Or should I set up the Samba machine as a BDC itself? Is it
possible for a Samba BDC to receive account updates from a NT4.0 PDC?

 

Cheers,

 

Travis

-- 
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] Need Advice

2006-02-27 Thread Travis Bullock
Well that is what I was thinking as well, but I was unsure if Samba was able
to act as a BDC. How does the account replication work between my NT4.0 PDC
and the Samba BDC? I do not have the time right now to switch from MS to
Samba at my main site. I am trying to learn the ways of the force in regards
to OpenLDAP and Samba but have not mastered them yet.

With MS still acting as the PDC, will this negate the possibility of a Samba
BDC?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of James
Taylor
Sent: February 27, 2006 1:55 PM
To: [EMAIL PROTECTED]; 'Samba'
Subject: RE: [Samba] Need Advice

Save yourself the costs of having to buy licensing and extra equipment and
run Samba as an NT4 BDC.  In my humble belief it would be easier for you to
maintain and less overhead at your remote location where you might have
limited IT support.

JT

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Travis Bullock
Sent: Monday, February 27, 2006 12:53 PM
To: Samba
Subject: [Samba] Need Advice

Greetings,

 

We are going to be expanding our operations to another city. I currently use
Samba and Winbind to provide shares and file access to my existing locations
users. The account information is kept on a NT4.0 PDC and BDC.

 

I have connected the new location via OpenVPN. I am wondering how I should
go about expanding my domain. Should I set up another NT4.0 BDC in the new
office and have a local Samba machine get account info from that via
Winbind? Or should I set up the Samba machine as a BDC itself? Is it
possible for a Samba BDC to receive account updates from a NT4.0 PDC?

 

Cheers,

 

Travis

-- 
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] Need Advice

2006-02-27 Thread Travis Bullock
Alternatively, could I set up a knew Domain in the new location, have the
PDC be Samba but have a two-way trust between the new domain and my old
windows NT 4.0 domain?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Travis
Bullock
Sent: February 27, 2006 2:04 PM
To: 'James Taylor'; 'Samba'
Subject: RE: [Samba] Need Advice

Well that is what I was thinking as well, but I was unsure if Samba was able
to act as a BDC. How does the account replication work between my NT4.0 PDC
and the Samba BDC? I do not have the time right now to switch from MS to
Samba at my main site. I am trying to learn the ways of the force in regards
to OpenLDAP and Samba but have not mastered them yet.

With MS still acting as the PDC, will this negate the possibility of a Samba
BDC?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of James
Taylor
Sent: February 27, 2006 1:55 PM
To: [EMAIL PROTECTED]; 'Samba'
Subject: RE: [Samba] Need Advice

Save yourself the costs of having to buy licensing and extra equipment and
run Samba as an NT4 BDC.  In my humble belief it would be easier for you to
maintain and less overhead at your remote location where you might have
limited IT support.

JT

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Travis Bullock
Sent: Monday, February 27, 2006 12:53 PM
To: Samba
Subject: [Samba] Need Advice

Greetings,

 

We are going to be expanding our operations to another city. I currently use
Samba and Winbind to provide shares and file access to my existing locations
users. The account information is kept on a NT4.0 PDC and BDC.

 

I have connected the new location via OpenVPN. I am wondering how I should
go about expanding my domain. Should I set up another NT4.0 BDC in the new
office and have a local Samba machine get account info from that via
Winbind? Or should I set up the Samba machine as a BDC itself? Is it
possible for a Samba BDC to receive account updates from a NT4.0 PDC?

 

Cheers,

 

Travis

-- 
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] Need Advice

2006-02-27 Thread James Taylor
Yes you could do that as well, but I would figure it might be easier
administratively for you to just use samba as a BDC.  There are some great
documents @ www.samba.org 

http://www.samba.org/samba/docs/man/Samba-Guide/happy.html#sbehap-bldg1

JT

-Original Message-
From: Travis Bullock [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 27, 2006 1:23 PM
To: 'James Taylor'; 'Samba'
Subject: RE: [Samba] Need Advice

Alternatively, could I set up a knew Domain in the new location, have the
PDC be Samba but have a two-way trust between the new domain and my old
windows NT 4.0 domain?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Travis
Bullock
Sent: February 27, 2006 2:04 PM
To: 'James Taylor'; 'Samba'
Subject: RE: [Samba] Need Advice

Well that is what I was thinking as well, but I was unsure if Samba was able
to act as a BDC. How does the account replication work between my NT4.0 PDC
and the Samba BDC? I do not have the time right now to switch from MS to
Samba at my main site. I am trying to learn the ways of the force in regards
to OpenLDAP and Samba but have not mastered them yet.

With MS still acting as the PDC, will this negate the possibility of a Samba
BDC?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of James
Taylor
Sent: February 27, 2006 1:55 PM
To: [EMAIL PROTECTED]; 'Samba'
Subject: RE: [Samba] Need Advice

Save yourself the costs of having to buy licensing and extra equipment and
run Samba as an NT4 BDC.  In my humble belief it would be easier for you to
maintain and less overhead at your remote location where you might have
limited IT support.

JT

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Travis Bullock
Sent: Monday, February 27, 2006 12:53 PM
To: Samba
Subject: [Samba] Need Advice

Greetings,

 

We are going to be expanding our operations to another city. I currently use
Samba and Winbind to provide shares and file access to my existing locations
users. The account information is kept on a NT4.0 PDC and BDC.

 

I have connected the new location via OpenVPN. I am wondering how I should
go about expanding my domain. Should I set up another NT4.0 BDC in the new
office and have a local Samba machine get account info from that via
Winbind? Or should I set up the Samba machine as a BDC itself? Is it
possible for a Samba BDC to receive account updates from a NT4.0 PDC?

 

Cheers,

 

Travis

-- 
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] NTUSER.DAT, user's settings

2006-02-27 Thread Andi Limberger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ludwig Meyerhoff wrote:


 Now, at the day 0 after reinstall, the users cannot work. The
 user's settings on the Windows 2k Professional machines are not
 adopted. They all have their desktops and own documents, but the
 keyboard settings and outlook-express settings are not taken from
 the profile.

I had the same problem with a big installation.


 I think it has to do with the users having new SIDs (as the PDC and
 the domain itself have changed).

The SID has changed, that's right. I think the tool I found named
profiles. I guess it's part of Samba. You take the NTUSERS.DAT of the
users and change the SID with this tool. Then the keyboard mappings
and outlook settings should be alright again.

profiles -c old_SID -n new_SID path_to_ntusers.dat

You get new_SID from pdbedit -Lv username. I hope this works.

Greetings, Andi
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEA3Op6E2r941QJAcRAumtAJwI60cb5F3Ug76HMbfFjawOxkBmTQCgv1L1
qoSS+AD9exyEkgIsUPFFDCY=
=ESfw
-END PGP SIGNATURE-

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


[Samba] Permission denied after successful mount of Windows share

2006-02-27 Thread James Calfee
I have noticed the same thing.  RedHat's smbmount can mount a read/write 
a share just fine.  But the smbmount in SuSE 10 can not.  I get 
Permission denied when I try to look at the mount using 'df.'


# smbmount
Usage: mount.smbfs service mountpoint [-o options,...]
Version 3.0.20-4-SUSE
...

# smbmount //appsrv/rxs /mnt/rxs -o 
username=,password=,workgroup=accessrxs,fmask=777,debug=4  df; 
umount /mnt/rxs

mount.smbfs started (version 3.0.20-4-SUSE)
added interface ip=192.168.0.10 bcast=192.168.0.255 nmask=255.255.255.0
Connecting to 192.168.0.21 at port 445
27712: session request ok
Serverzone is 18000
27712: session setup ok
27712: tconx ok
Filesystem   1K-blocks  Used Available Use% Mounted on
/dev/hda2 38008564   5342608  32665956  15% /
tmpfs   517720 0517720   0% /dev/shm
df: `/mnt/rxs': Permission denied

From a higher debug level:
[000] 57 69 6E 64 6F 77 73 20  53 65 72 76 65 72 20 32  Windows  Server 2
[010] 30 30 33 20 33 37 39 30  20 53 65 72 76 69 63 65  003 3790  Service
[020] 20 50 61 63 6B 20 31 00  57 69 6E 64 6F 77 73 20   Pack 1. Windows
[030] 53 65 72 76 65 72 20 32  30 30 33 20 35 2E 32 00  Server 2 003 5.2.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Samba on top of NFS question

2006-02-27 Thread Ryan Taylor
I am sorry for the long *involved* post, however we are at wits end and
advice would be greatly appreciated.

Background: We have three servers in this example.  Two of the servers (we
will call Server A  B) each have a 2.7T raid 5 array that is mirrored with
DRBD and monitored for failover with Heartbeat.  NFS is running and
exporting the array on Heartbeats virtual IP.
Server C mounts the export, and is a Samba PDC.  The mount contains all
project data which samba hands out to ~250 windows boxes.  There are at
least ~1600 files open(locked) at any given time throughout the day.  It
works, kinda.  The users can work and everything is fine except we get
somewhat random, usually 2 freezes a day.  The windows boxes freeze up for a
few minutes then resume working like nothing happened.  The servers go idle
during this freeze, and sometimes we get the  lock.d can't reach server
then ok messages in dmesg, but other times not.

The post is long enough without telling you all that we have tried. (long
list including network drivers, nfs mount options, samba locking options,
etc..).  We now have data on Server C and Samba hosting it off it's local
drives.. It's only been one day so far, but so far (knock on wood) no
freezes.  In addition samba runs much smoother on the clients end, such as
(*right-click*properties boxes etc...) Segue to question...

Question(s):  Does Samba not work on top of NFS? Is there any better way for
Samba to access the data on the failover pair of servers than NFS?  Is it
locking that is causing us problems? What is the correct 'Samba' way to get
remote data shared to multiple samba front ends?  I guess my ultimate
question and why I am posting, is because I have tried TONS of things and am
curious if anyone else has this particular setup working?

Please let me know if I can provide any information!

Thank you for your time,


--
Ryan Taylor
Micro Consultants
770-789-2072
[EMAIL PROTECTED]
Until I see everything working right, I will be apprehensive.  Pamela
Klabbers
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Solaris9 + samba-3.0.10 UIDs and ProcessIDs

2006-02-27 Thread Wayne Rasmussen
We are running SAMBA-3.0.10 under Solaris9 in an environment which is using
windows2000/2003 AD servers.

 

Our lead developer is asking why when he runs ps -ef the UID numbers are
given as numbers rather than the descriptive output for accounts which are
in the AD?  A user who is in the local password file will show the login in
the UID field bur will only have a number in the case of and AD user.  Is
his settings in the nsswitch.conf file wrong?

 

His nsswitch.conf file is set as:

passwd: files winbind

group:  files winbind

hosts:  files dns winbind

 

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


[Samba] Errors after building 3.0.21b on AIX 5.2

2006-02-27 Thread Ray Gebbie

I have seen a lot of recent posts about  building on AIX 5.2, 5.3, etc.
but none showed the same problems I am having.

After building Samba 3.0.21b on AIX 5.2, I get this error when running a
number of the binaries:

  ./testparm
exec(): 0509-036 Cannot load program ./testparm because of the following
errors:
0509-130 Symbol resolution failed for /usr/lib/libc.a(posix_aio.o)
because:
0509-136   Symbol _posix_kaio_rdwr (number 2) is not exported from
   dependent module /unix.
0509-136   Symbol _posix_listio (number 3) is not exported from
   dependent module /unix.
0509-136   Symbol _posix_acancel (number 4) is not exported from
   dependent module /unix.
0509-136   Symbol _posix_iosuspend (number 5) is not exported from
   dependent module /unix.
0509-136   Symbol _posix_aio_nwait (number 6) is not exported from
   dependent module /unix.
0509-136   Symbol _posix_iofsync (number 7) is not exported from
   dependent module /unix.
0509-192 Examine .loader section symbols with the
 'dump -Tv' command.

I have not built C programs in a long time, so I am very rusty at debugging
these kind of problems.  It is obvious that I did not do something right
when I ran 'configure'.  Here is the command line I used:

./configure --with-acl-support --with-utmp --with-ldap --with-ads
--with-pam --with-winbind  --with-aio=yes --with-libconf=/usr/local
--with-sendfile-support --prefix=/ccase/dist/build/samba --with-quotas
--with-krb5=/usr/local --with-shared-modules=idmap_ad,idmap_rid
--enable-shared=yes --disable-static

What did I do wrong?  I am using gcc 4.0.2.

Thank you.

Ray Gebbie
Federated Systems Group
San Francisco, CA 94102
415-422-1662

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


Re: [Samba] Samba on top of NFS question

2006-02-27 Thread Fermin Molina
On Mon, 2006-02-27 at 15:11 -0500, Ryan Taylor wrote:
 I am sorry for the long *involved* post, however we are at wits end and
 advice would be greatly appreciated.
 
 Background: We have three servers in this example.  Two of the servers (we
 will call Server A  B) each have a 2.7T raid 5 array that is mirrored with
 DRBD and monitored for failover with Heartbeat.  NFS is running and
 exporting the array on Heartbeats virtual IP.
 Server C mounts the export, and is a Samba PDC.  The mount contains all
 project data which samba hands out to ~250 windows boxes.  There are at
 least ~1600 files open(locked) at any given time throughout the day.  It
 works, kinda.  The users can work and everything is fine except we get
 somewhat random, usually 2 freezes a day.  The windows boxes freeze up for a
 few minutes then resume working like nothing happened.  The servers go idle
 during this freeze, and sometimes we get the  lock.d can't reach server
 then ok messages in dmesg, but other times not.


Look the thread Samba daemons hang trying to lock locking.tdb, about
Jan 25 in this list.


 The post is long enough without telling you all that we have tried. (long
 list including network drivers, nfs mount options, samba locking options,
 etc..).  We now have data on Server C and Samba hosting it off it's local
 drives.. It's only been one day so far, but so far (knock on wood) no
 freezes.  In addition samba runs much smoother on the clients end, such as
 (*right-click*properties boxes etc...) Segue to question...


I've solved the problem reducing the amount of data shared with NFS
(making it local to the machine I run samba).

It's a problem (I think) with linux kernel and file looking. Have a look
to the thread kernel BUG at fs/locks.c:1932! of linux-kernel list,
about Fri, 17 Feb 2006.

I use latest kernels from FC4. Can you try the patch to linux kernel
from Trond Myklebust? I cannot try it, because my server is in
production.

I will post to this list my conclusions when I finish the investigations
about this behaviour.


 Question(s):  Does Samba not work on top of NFS? Is there any better way for
 Samba to access the data on the failover pair of servers than NFS?  Is it
 locking that is causing us problems? What is the correct 'Samba' way to get
 remote data shared to multiple samba front ends?  I guess my ultimate
 question and why I am posting, is because I have tried TONS of things and am
 curious if anyone else has this particular setup working?


I have used FC3 (with latest updates) with samba 3.0.14a, and the same
configuration (NFS, etc) and all was working ok. When I changed the
server and begin to use the latest FC4 with last versions of linux
kernel and samba, all goes very very bad.

Cheers,

-- 
Fermin Molina Ibarz
Tècnic sistemes - ASIC
Universitat de Lleida
Tel: +34 973 702151
GPG: 0x060F857A


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


Re: [Samba] printer admin still working in 3.0.21c?

2006-02-27 Thread Thomas Limoncelli

Thomas Limoncelli wrote:

rpc_server/srv_spoolss_nt.c:_spoolss_open_printer_ex(1697)
  Setting printer access = PRINTER_ACCESS_USE


Correlating with the source code this seems to become interesting:

DEBUG(4,(Setting printer access = %s\n, 
(printer_default-access_required == PRINTER_ACCESS_ADMINISTER)
? PRINTER_ACCESS_ADMINISTER : 
PRINTER_ACCESS_USE ));


}

Printer-access_granted = printer_default-access_required;

i.e. Printer-access_granted is set to PRINTER_ACCESS_USE  here, but 
later (rpc_server/srv_spoolss_nt.c:update_printer(6113)) compared to 
PRINTER_ACCESS_ADMINISTER:


if (Printer-access_granted != PRINTER_ACCESS_ADMINISTER) {
DEBUG(3, (update_printer: printer property change 
denied by handle\n));

result = WERR_ACCESS_DENIED;
goto done;
}

which fails. How's this supposed to work? What am I missing here?


-TL

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


Re: [Samba] Building 3.0.21x on AIX 5.2

2006-02-27 Thread Tim Evans

Can you try something before you send those? in the /opt folder where the
freeware gcc will be, can you rename the include dir for gcc to something
like include.old? don't delete it, just rename it. part of that install has
some sketchy includes and i'm wondering if they are getting in the way (it
did on some initial 5.3 testing at one time). It'll be something like
/opt/freeware/gcc...-3.3.2.../include

This did it.  (Did have to re-run configure after renaming the directory.)

Thanks.

# pwd
/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.2
# ls -l
total 7776
drwxr-xr-x   7 root system  512 May 13 2005  include.old
--
Tim Evans, TKEvans.com, Inc.|5 Chestnut Court
[EMAIL PROTECTED]   |Owings Mills, MD 21117
http://www.tkevans.com/ |443-394-3864
http://www.come-here.com/News/  |

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


Re: [Samba] Samba on top of NFS question

2006-02-27 Thread Ryan Taylor
Thank you for the reply, its nice to know someone else is in the same boat.

Unfortunately our servers are also in production and therefore we can't try
the patch.  We also have not found a good way to reproduce without throwing
all the users on the system.

One interesting fact I have noticed since we have moved our data to the
local samba machine: netstat -s -u returns
# netstat -s -u
Udp:
50898 packets received
16 packets to unknown port received.
0 packet receive errors
17163 packets sent
#
Where as before when on NFS we had 50%-75% of the number of packets
received in packet receive errors

I am beginning to believe you are right, NFS cannot handle the locking
required by Samba?

I am confused in two directions.  We use Whitebox4 and have noticed a
newer version of nfs.utils.el4 rpm released but requires (because of two
many dependencies) for use to upgrade to CentOS4... 2) We are using AMD X2's
so are running the SMP kernel as well.  Could it be just a SMP issue? Which
is why I am curious if anyone else had samba working in an environment
similar to ours.


On 2/27/06, Fermin Molina [EMAIL PROTECTED] wrote:

 On Mon, 2006-02-27 at 15:11 -0500, Ryan Taylor wrote:
  I am sorry for the long *involved* post, however we are at wits end and
  advice would be greatly appreciated.
 
  Background: We have three servers in this example.  Two of the servers
 (we
  will call Server A  B) each have a 2.7T raid 5 array that is mirrored
 with
  DRBD and monitored for failover with Heartbeat.  NFS is running and
  exporting the array on Heartbeats virtual IP.
  Server C mounts the export, and is a Samba PDC.  The mount contains
 all
  project data which samba hands out to ~250 windows boxes.  There are at
  least ~1600 files open(locked) at any given time throughout the day.  It
  works, kinda.  The users can work and everything is fine except we get
  somewhat random, usually 2 freezes a day.  The windows boxes freeze up
 for a
  few minutes then resume working like nothing happened.  The servers go
 idle
  during this freeze, and sometimes we get the  lock.d can't reach
 server
  then ok messages in dmesg, but other times not.


 Look the thread Samba daemons hang trying to lock locking.tdb, about
 Jan 25 in this list.


  The post is long enough without telling you all that we have tried.
 (long
  list including network drivers, nfs mount options, samba locking
 options,
  etc..).  We now have data on Server C and Samba hosting it off it's
 local
  drives.. It's only been one day so far, but so far (knock on wood) no
  freezes.  In addition samba runs much smoother on the clients end, such
 as
  (*right-click*properties boxes etc...) Segue to question...


 I've solved the problem reducing the amount of data shared with NFS
 (making it local to the machine I run samba).

 It's a problem (I think) with linux kernel and file looking. Have a look
 to the thread kernel BUG at fs/locks.c:1932! of linux-kernel list,
 about Fri, 17 Feb 2006.

 I use latest kernels from FC4. Can you try the patch to linux kernel
 from Trond Myklebust? I cannot try it, because my server is in
 production.

 I will post to this list my conclusions when I finish the investigations
 about this behaviour.


  Question(s):  Does Samba not work on top of NFS? Is there any better way
 for
  Samba to access the data on the failover pair of servers than NFS?  Is
 it
  locking that is causing us problems? What is the correct 'Samba' way to
 get
  remote data shared to multiple samba front ends?  I guess my ultimate
  question and why I am posting, is because I have tried TONS of things
 and am
  curious if anyone else has this particular setup working?


 I have used FC3 (with latest updates) with samba 3.0.14a, and the same
 configuration (NFS, etc) and all was working ok. When I changed the
 server and begin to use the latest FC4 with last versions of linux
 kernel and samba, all goes very very bad.

 Cheers,

 --
 Fermin Molina Ibarz
 Tècnic sistemes - ASIC
 Universitat de Lleida
 Tel: +34 973 702151
 GPG: 0x060F857A





--
Ryan Taylor
Micro Consultants
770-789-2072
[EMAIL PROTECTED]
Until I see everything working right, I will be apprehensive.  Pamela
Klabbers
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Windows XP Home and samb a share

2006-02-27 Thread Louis E Garcia II
I am trying to connect to a samba share from winxp home and the username
is grayed out. I remember reading how to fix this, may be a registry
key. Anyone give a clue?

-Louis

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


[Samba] Moving samba PDC to new machine (same name?)

2006-02-27 Thread Paul Smith
I'm using a tdbsam database with Samba 3.0.11 on a machine that's
getting a little long in the tooth.  I'd like to move the whole deal to
a new machine without any reconfiguring on the clients - I'm happy with
a little downtime - out of office hours the system is hardly used
anyway.  I'd like to upgrade to 3.0.21c at the same time.

I'm thinking:
1. backup domain data on old server
2. shut down old server
3. build new server with same name as old one
4. restore domain data to new server

I'm having trouble with steps 1 and 4.  What exactly do I need to
backup, and how?

Is this possible or do I have to make a new domain and rejoin the users
all over?

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


Re: [Samba] Windows XP Home and samb a share

2006-02-27 Thread Chris Lamb
I had similar issues and it was due to SELinux running on my Redhat box.
I haven't fine tuned SELinux yet but disabling it altogether made it
work for now.

On Mon, 2006-02-27 at 21:24 -0500, Louis E Garcia II wrote:
 I am trying to connect to a samba share from winxp home and the username
 is grayed out. I remember reading how to fix this, may be a registry
 key. Anyone give a clue?
 
 -Louis
 

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


Re: [Samba] Windows XP Home and samb a share

2006-02-27 Thread Louis E Garcia II
This is not a samba of linux issue. It's a win XP thing.

-Louis

On Mon, 2006-02-27 at 20:54 -0600, Chris Lamb wrote:
 I had similar issues and it was due to SELinux running on my Redhat box.
 I haven't fine tuned SELinux yet but disabling it altogether made it
 work for now.
 
 On Mon, 2006-02-27 at 21:24 -0500, Louis E Garcia II wrote:
  I am trying to connect to a samba share from winxp home and the username
  is grayed out. I remember reading how to fix this, may be a registry
  key. Anyone give a clue?
  
  -Louis
  
 

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


[Samba] Kerberos errors...

2006-02-27 Thread Trimble, Ronald D
I am having issues getting my other domains working on our samba server.
They always show up as disconnected when doing a wbinfo -sequence
command.  If I set up the default realm in krb5.conf to be NA (short for
North America), I can authenticate users in NA.  If I set is to be EU
(Europe) I can authenticate users from Europe.  The strange thing is
that in either case, I get the following error for the non-default
domain: (Cannot contact any KDC for requested realm).  This makes no
sense to me as I can get it to work as the default realm with the exact
same settings.  There are no firewalls or anything like that on our
domain controllers. Can anyone point me to what I may be doing wrong?
This error is absolutely driving me nuts and I would be forever grateful
for any assistance.

 

Thanks,
Ron

 

 

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


[Samba] Re: Moving samba PDC to new machine (same name?)

2006-02-27 Thread Mark Nienberg

Paul Smith wrote:

I'm using a tdbsam database with Samba 3.0.11 on a machine that's
getting a little long in the tooth.  I'd like to move the whole deal to
a new machine without any reconfiguring on the clients - I'm happy with
a little downtime - out of office hours the system is hardly used
anyway.  I'd like to upgrade to 3.0.21c at the same time.

I'm thinking:
1. backup domain data on old server
2. shut down old server
3. build new server with same name as old one
4. restore domain data to new server

I'm having trouble with steps 1 and 4.  What exactly do I need to
backup, and how?

Is this possible or do I have to make a new domain and rejoin the users
all over?



You can do this with no changes to the clients.  they will be able to 
log on to the new PDC just fine if you do it right.  The process is 
explained here:


http://us4.samba.org/samba/docs/man/Samba-Guide/upgrades.html

Read the whole chapter and pay particular attention to the section 
Migrating Samba 3 to a new server, Replacing a domain controller.


I did it about a week ago with no difficulties.

Mark Nienberg

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


Re: svn commit: samba r13700 - in branches/SAMBA_4_0/source: dsdb/samdb/ldb_modules lib/ldb/include lib/ldb/ldb_tdb lib/ldb/modules

2006-02-27 Thread Stefan (metze) Metzmacher
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[EMAIL PROTECTED] schrieb:
 Author: tridge
 
 added highestCommittedUSN, uSNChanged and uSNCreated support, using
 the @BASEINFO sequenceNumber

Hi tridge,

don't we need to add a '+1' to the uSNChanged and uSNCreated,
as the seqeunceNumber is updated later...?

metze

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

iD8DBQFEAsi3m70gjA5TCD8RAj/gAJ9NaFh4Oq2v600E8KbZD6SVAHl3cQCfUOL4
hMbroZShZwHa39CLL1PmJz4=
=RGPq
-END PGP SIGNATURE-


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

2006-02-27 Thread metze
Author: metze
Date: 2006-02-27 09:57:14 + (Mon, 27 Feb 2006)
New Revision: 13708

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

Log:
fix compiler warnings

metze
Modified:
   branches/SAMBA_4_0/source/ntvfs/common/opendb.c


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/common/opendb.c
===
--- branches/SAMBA_4_0/source/ntvfs/common/opendb.c 2006-02-27 03:23:28 UTC 
(rev 13707)
+++ branches/SAMBA_4_0/source/ntvfs/common/opendb.c 2006-02-27 09:57:14 UTC 
(rev 13708)
@@ -258,7 +258,7 @@
return NT_STATUS_NO_MEMORY;
}
 
-   dbuf.dptr = (char *)elist;
+   dbuf.dptr = (uint8_t *)elist;
dbuf.dsize = (count+1) * sizeof(struct odb_entry);
 
memcpy(dbuf.dptr + (count*sizeof(struct odb_entry)),
@@ -307,7 +307,7 @@
return NT_STATUS_NO_MEMORY;
}
 
-   dbuf.dptr = (char *)elist;
+   dbuf.dptr = (uint8_t *)elist;
dbuf.dsize = (count+1) * sizeof(struct odb_entry);
 
memcpy(dbuf.dptr + (count*sizeof(struct odb_entry)),
@@ -495,7 +495,7 @@
int i, count;
struct odb_entry e;
 
-   kbuf.dptr = (char *)key-data;
+   kbuf.dptr = key-data;
kbuf.dsize = key-length;
 
dbuf = tdb_fetch(odb-w-tdb, kbuf);



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

2006-02-27 Thread metze
Author: metze
Date: 2006-02-27 10:14:11 + (Mon, 27 Feb 2006)
New Revision: 13709

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

Log:
fix compiler warnings

metze
Modified:
   branches/SAMBA_4_0/source/torture/rpc/samlogon.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/samlogon.c
===
--- branches/SAMBA_4_0/source/torture/rpc/samlogon.c2006-02-27 09:57:14 UTC 
(rev 13708)
+++ branches/SAMBA_4_0/source/torture/rpc/samlogon.c2006-02-27 10:14:11 UTC 
(rev 13709)
@@ -861,7 +861,7 @@
pass = False;
}
} else {
-   static const char zeros[8];
+   static const uint8_t zeros[8];
if (memcmp(zeros, lm_session_key, 
   sizeof(lm_session_key)) != 0) {
printf(LM Session Key does not match 
expectations (zeros)!\n);
@@ -,7 +,7 @@
pass = False;
}
} else {
-   static const char zeros[8];
+   static const uint8_t zeros[8];
if (memcmp(zeros, lm_key, 
   sizeof(lm_key)) != 0) {
printf(LM Session Key does not match expectations 
(zeros)!\n);



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

2006-02-27 Thread metze
Author: metze
Date: 2006-02-27 10:23:59 + (Mon, 27 Feb 2006)
New Revision: 13710

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

Log:
fix compiler warnings

metze
Modified:
   branches/SAMBA_4_0/source/scripting/ejs/mprutil.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_cli.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_data.c


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/ejs/mprutil.c
===
--- branches/SAMBA_4_0/source/scripting/ejs/mprutil.c   2006-02-27 10:14:11 UTC 
(rev 13709)
+++ branches/SAMBA_4_0/source/scripting/ejs/mprutil.c   2006-02-27 10:23:59 UTC 
(rev 13710)
@@ -143,7 +143,7 @@
 struct MprVar mprData(const uint8_t *p, size_t length)
 {
struct MprVar var;
-   char *s = talloc_strndup(mprMemCtx(), p, length);
+   char *s = talloc_strndup(mprMemCtx(), (const char *)p, length);
if (s == NULL) {
return mprCreateUndefinedVar();
}
@@ -229,7 +229,7 @@
 /*
   turn a MprVar string variable into a const char *
  */
-const char *mprToString(const struct MprVar *v)
+const char *mprToString(struct MprVar *v)
 {
if (v-trigger) {
mprReadProperty(v, 0);
@@ -241,7 +241,7 @@
 /*
   turn a MprVar integer variable into an int
  */
-int mprToInt(const struct MprVar *v)
+int mprToInt(struct MprVar *v)
 {
if (v-trigger) {
mprReadProperty(v, 0);

Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_cli.c
===
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_cli.c  2006-02-27 
10:14:11 UTC (rev 13709)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_cli.c  2006-02-27 
10:23:59 UTC (rev 13710)
@@ -413,7 +413,7 @@
struct cli_credentials *creds;
struct smb_composite_connect io;
struct smbcli_tree *tree;
-   const char *hostname, *sharename;
+   char *hostname, *sharename;
NTSTATUS result;
TALLOC_CTX *mem_ctx;
 

Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_data.c
===
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_data.c 2006-02-27 
10:14:11 UTC (rev 13709)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_data.c 2006-02-27 
10:23:59 UTC (rev 13710)
@@ -179,7 +179,7 @@
char *s;
ssize_t len;
len = convert_string_talloc(mprMemCtx(), CH_UTF16, CH_UNIX, 
-   blob-data, blob-length, s);
+   blob-data, blob-length, (void 
**)s);
if (len == -1) {
ejsSetErrorMsg(eid, regToVar invalid REG_SZ string);
return -1;
@@ -218,7 +218,7 @@
 
case REG_MULTI_SZ: {
DATA_BLOB b = *blob;
-   char **list = NULL;
+   const char **list = NULL;
while (b.length  0) {
char *s;
ssize_t len;
@@ -227,7 +227,7 @@
break;
}
len = convert_string_talloc(mprMemCtx(), CH_UTF16, 
CH_UNIX, 
-   b.data, slen, s);
+   b.data, slen, (void **)s);
if (len == -1) {
ejsSetErrorMsg(eid, regToVar invalid 
REG_MULTI_SZ string);
return -1;



svn commit: samba r13711 - branches/SAMBA_3_0/examples/libmsrpc/test/sam branches/SAMBA_3_0/examples/pdb branches/SAMBA_3_0/source/auth branches/SAMBA_3_0/source/include branches/SAMBA_3_0/source/liba

2006-02-27 Thread gd
Author: gd
Date: 2006-02-27 10:32:45 + (Mon, 27 Feb 2006)
New Revision: 13711

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

Log:
* Correctly handle acb_info/acct_flags as uint32 not as uint16. 
* Fix a couple of related parsing issues.
* in the info3 reply in a samlogon, return the ACB-flags (instead of
  returning zero)

Guenther


Modified:
   branches/SAMBA_3_0/examples/libmsrpc/test/sam/samenum.c
   branches/SAMBA_3_0/examples/pdb/test.c
   branches/SAMBA_3_0/source/auth/auth_sam.c
   branches/SAMBA_3_0/source/auth/auth_util.c
   branches/SAMBA_3_0/source/include/libmsrpc.h
   branches/SAMBA_3_0/source/include/passdb.h
   branches/SAMBA_3_0/source/include/rpc_samr.h
   branches/SAMBA_3_0/source/include/smb.h
   branches/SAMBA_3_0/source/libads/ads_utils.c
   branches/SAMBA_3_0/source/passdb/passdb.c
   branches/SAMBA_3_0/source/passdb/pdb_get_set.c
   branches/SAMBA_3_0/source/passdb/pdb_interface.c
   branches/SAMBA_3_0/source/passdb/pdb_ldap.c
   branches/SAMBA_3_0/source/passdb/pdb_smbpasswd.c
   branches/SAMBA_3_0/source/passdb/pdb_tdb.c
   branches/SAMBA_3_0/source/python/py_samr.c
   branches/SAMBA_3_0/source/rpc_client/cli_samr.c
   branches/SAMBA_3_0/source/rpc_parse/parse_net.c
   branches/SAMBA_3_0/source/rpc_parse/parse_samr.c
   branches/SAMBA_3_0/source/rpc_server/srv_netlog_nt.c
   branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c
   branches/SAMBA_3_0/source/rpcclient/cmd_samr.c
   branches/SAMBA_3_0/source/smbd/chgpasswd.c
   branches/SAMBA_3_0/source/utils/net_rpc.c
   trunk/examples/libmsrpc/test/sam/samenum.c
   trunk/examples/pdb/test.c
   trunk/source/auth/auth_sam.c
   trunk/source/auth/auth_util.c
   trunk/source/include/libmsrpc.h
   trunk/source/include/passdb.h
   trunk/source/include/rpc_samr.h
   trunk/source/include/smb.h
   trunk/source/libads/ads_utils.c
   trunk/source/passdb/passdb.c
   trunk/source/passdb/pdb_get_set.c
   trunk/source/passdb/pdb_interface.c
   trunk/source/passdb/pdb_ldap.c
   trunk/source/passdb/pdb_smbpasswd.c
   trunk/source/passdb/pdb_tdb.c
   trunk/source/python/py_samr.c
   trunk/source/rpc_client/cli_samr.c
   trunk/source/rpc_parse/parse_net.c
   trunk/source/rpc_parse/parse_samr.c
   trunk/source/rpc_server/srv_netlog_nt.c
   trunk/source/rpc_server/srv_samr_nt.c
   trunk/source/rpcclient/cmd_samr.c
   trunk/source/smbd/chgpasswd.c
   trunk/source/utils/net_rpc.c


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


svn commit: samba r13712 - in branches/SAMBA_3_0/source/bin: .

2006-02-27 Thread lmuelle
Author: lmuelle
Date: 2006-02-27 12:37:18 + (Mon, 27 Feb 2006)
New Revision: 13712

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

Log:
Make the prop svn:ignore as simple (= *) as in trunk.

Modified:
   branches/SAMBA_3_0/source/bin/


Changeset:

Property changes on: branches/SAMBA_3_0/source/bin
___
Name: svn:ignore
   - *.so
*.a
.dummy
.libs
debug2html
editreg
locktest
locktest2
log2pcap
make_printerdef
make_smbcodepage
make_unicodemap
masktest
msgtest
net
nmbd
nmblookup
nsstest
ntlm_auth
pdbedit
profiles
rpcclient
samsync
samtest
smbcacls
smbcacls
smbclient
smbcontrol
smbcquotas
smbd
smbfilter
smbget
smbgroupedit
smbiconv
smbmnt
smbmount
smbpasswd
smbsh
smbspool
smbstatus
smbtorture
smbtree
smbumount
swat
t_push_ucs2
t_snprintf
t_strcmp
t_stringoverflow
talloctort
tdbbackup
tdbdump
tdbtool
testparm
testprns
vfstest
wbinfo
winbindd
wrepld
eventlogadm

   + *




svn commit: samba r13713 - branches/SAMBA_3_0/source trunk/source

2006-02-27 Thread lmuelle
Author: lmuelle
Date: 2006-02-27 14:10:14 + (Mon, 27 Feb 2006)
New Revision: 13713

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

Log:
Added installcifsmount and uninstallcifsmount rules for mount.cifs and
unmount.cifs.  This is controlled via CIFSMOUNT_PROGS which is set by
configure by default to yes on linux systems only.  It's possible to 
disable with --without-cifsmount anyhow.

Added ROOTSBINDIR to the Makefile to allow us an install to /sbin and
not $prefix/sbin.  Configurable with --with-rootsbindir.

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


Changeset:
Modified: branches/SAMBA_3_0/source/Makefile.in
===
--- branches/SAMBA_3_0/source/Makefile.in   2006-02-27 12:37:18 UTC (rev 
13712)
+++ branches/SAMBA_3_0/source/Makefile.in   2006-02-27 14:10:14 UTC (rev 
13713)
@@ -59,6 +59,7 @@
 BINDIR = @bindir@
 # sbindir is mapped to bindir when compiling SAMBA in 2.0.x compatibility mode.
 SBINDIR = @sbindir@
+ROOTSBINDIR = @rootsbindir@
 LIBDIR = @libdir@
 VFSLIBDIR = $(LIBDIR)/vfs
 PDBLIBDIR = $(LIBDIR)/pdb
@@ -130,6 +131,8 @@
 
 SBIN_PROGS = bin/[EMAIL PROTECTED]@ bin/[EMAIL PROTECTED]@ bin/[EMAIL 
PROTECTED]@ @EXTRA_SBIN_PROGS@
 
+ROOT_SBIN_PROGS = @CIFSMOUNT_PROGS@
+
 BIN_PROGS1 = bin/[EMAIL PROTECTED]@ bin/[EMAIL PROTECTED]@ bin/[EMAIL 
PROTECTED]@ \
bin/[EMAIL PROTECTED]@ bin/[EMAIL PROTECTED]@ bin/[EMAIL PROTECTED]@
 BIN_PROGS2 = bin/[EMAIL PROTECTED]@ bin/[EMAIL PROTECTED]@ bin/[EMAIL 
PROTECTED]@ \
@@ -582,6 +585,10 @@
 
 UMOUNT_OBJ = client/smbumount.o
 
+CIFS_MOUNT_OBJ = client/mount.cifs.o
+
+CIFS_UMOUNT_OBJ = client/umount.cifs.o
+
 NMBLOOKUP_OBJ = utils/nmblookup.o $(PARAM_OBJ) $(LIBNMB_OBJ) $(RPC_PARSE_OBJ1) 
$(DOSERR_OBJ) \
$(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) $(SECRETS_OBJ) 
$(LIBSAMBA_OBJ) 
 
@@ -742,8 +749,8 @@
 ##
 # now the rules...
 ##
-all : SHOWFLAGS proto_exists $(SBIN_PROGS) $(BIN_PROGS) $(SHLIBS) \
-   $(MODULES) @EXTRA_ALL_TARGETS@
+all : SHOWFLAGS proto_exists $(SBIN_PROGS) $(BIN_PROGS) $(ROOT_SBIN_PROGS) \
+   $(SHLIBS) $(MODULES) @EXTRA_ALL_TARGETS@
 
 pam_smbpass : SHOWFLAGS bin/[EMAIL PROTECTED]@
 
@@ -812,7 +819,7 @@
@if (:  $@ || :  $@) /dev/null 21; then rm -f $@; else \
 dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
@echo Compiling $*.c
-   @$(CC) -I. -I$(srcdir) $(FLAGS) @PIE_CFLAGS@ -c $ \
+   @$(CC) -I. -I$(srcdir) $(FLAGS) $(MY_FLAGS) @PIE_CFLAGS@ -c $ \
  -o $@ 
 @BROKEN_CC@-mv `echo $@ | sed 's%^.*/%%g'` $@
 
@@ -931,6 +938,14 @@
@echo Linking $@
@$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(UMOUNT_OBJ) $(DYNEXP) $(LDFLAGS)
 
+bin/[EMAIL PROTECTED]@: $(CIFS_MOUNT_OBJ) bin/.dummy
+   @echo Linking $@
+   @$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(CIFS_MOUNT_OBJ) $(DYNEXP) 
$(LDFLAGS)
+
+bin/[EMAIL PROTECTED]@: $(CIFS_UMOUNT_OBJ) bin/.dummy
+   @echo Linking $@
+   @$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(CIFS_UMOUNT_OBJ) $(DYNEXP) 
$(LDFLAGS)
+
 bin/[EMAIL PROTECTED]@: $(TESTPARM_OBJ) @BUILD_POPT@ bin/.dummy
@echo Linking $@
@$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(TESTPARM_OBJ) $(LDFLAGS) 
$(DYNEXP) $(LIBS) @POPTLIBS@
@@ -1372,7 +1387,7 @@
 
 bin/[EMAIL PROTECTED]@: lib/snprintf.c
$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(DYNEXP) -DTEST_SNPRINTF 
lib/snprintf.c -lm
-install: installservers installbin installman installscripts installdat 
installswat installmodules @INSTALL_LIBSMBCLIENT@ @INSTALL_LIBMSRPC@
+install: installservers installbin @INSTALL_CIFSMOUNT@ installman 
installscripts installdat installswat installmodules @INSTALL_LIBSMBCLIENT@ 
@INSTALL_LIBMSRPC@
 
 install-everything: install installmodules
 
@@ -1393,6 +1408,9 @@
 installbin: all installdirs
@$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR) 
$(BINDIR) $(BIN_PROGS)
 
+installcifsmount: @CIFSMOUNT_PROGS@
+   @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS) $(DESTDIR) 
$(ROOTSBINDIR)
+   @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR) 
$(ROOTSBINDIR) @CIFSMOUNT_PROGS@
 
 # Some symlinks are required for the 'probing' of modules. 
 # This mechanism should go at some point..
@@ -1491,7 +1509,7 @@
@echo   swatdir: $(SWATDIR)
 
 
-uninstall: uninstallman uninstallservers uninstallbin uninstallscripts 
uninstalldat uninstallswat uninstallmodules @UNINSTALL_LIBSMBCLIENT@ 
@UNINSTALL_LIBMSRPC@
+uninstall: uninstallman uninstallservers uninstallbin @UNINSTALL_CIFSMOUNT@ 
uninstallscripts uninstalldat uninstallswat uninstallmodules 
@UNINSTALL_LIBSMBCLIENT@ @UNINSTALL_LIBMSRPC@
 
 uninstallman:
@$(SHELL) $(srcdir)/script/uninstallman.sh 

svn commit: samba r13714 - branches/SAMBA_3_0/source/client trunk/source/client

2006-02-27 Thread lmuelle
Author: lmuelle
Date: 2006-02-27 14:18:52 + (Mon, 27 Feb 2006)
New Revision: 13714

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

Log:
Set MOUNT_CIFS_VENDOR_SUFFIX if _SAMBA_BUILD_ is set to
-SAMBA_VERSION_OFFICIAL_STRING-SAMBA_VERSION_VENDOR_SUFFIX if
SAMBA_VERSION_VENDOR_SUFFIX is set or -SAMBA_VERSION_OFFICIAL_STRING
only if MOUNT_CIFS_VENDOR_SUFFIX is undefined.

This results in: mount.cifs -V
mount.cifs version: 1.10-3.1.2pre1-SVN-build-13706-foovendor
or
mount.cifs version: 1.10-3.1.2pre1-SVN-build-13706

Steve: If this is to long or you do not like it, we might add something
lile -VV to report the added part.

Modified:
   branches/SAMBA_3_0/source/client/mount.cifs.c
   branches/SAMBA_3_0/source/client/umount.cifs.c
   trunk/source/client/mount.cifs.c
   trunk/source/client/umount.cifs.c


Changeset:
Modified: branches/SAMBA_3_0/source/client/mount.cifs.c
===
--- branches/SAMBA_3_0/source/client/mount.cifs.c   2006-02-27 14:10:14 UTC 
(rev 13713)
+++ branches/SAMBA_3_0/source/client/mount.cifs.c   2006-02-27 14:18:52 UTC 
(rev 13714)
@@ -43,8 +43,17 @@
 #define MOUNT_CIFS_VERSION_MINOR 10
 
 #ifndef MOUNT_CIFS_VENDOR_SUFFIX
-#define MOUNT_CIFS_VENDOR_SUFFIX 
-#endif
+ #ifdef _SAMBA_BUILD_
+  #include include/version.h
+  #ifdef SAMBA_VERSION_VENDOR_SUFFIX
+   #define MOUNT_CIFS_VENDOR_SUFFIX 
-SAMBA_VERSION_OFFICIAL_STRING-SAMBA_VERSION_VENDOR_SUFFIX
+  #else
+   #define MOUNT_CIFS_VENDOR_SUFFIX -SAMBA_VERSION_OFFICIAL_STRING
+  #endif /* SAMBA_VERSION_OFFICIAL_STRING and SAMBA_VERSION_VENDOR_SUFFIX */
+ #else
+   #define MOUNT_CIFS_VENDOR_SUFFIX 
+ #endif /* _SAMBA_BUILD_ */
+#endif /* MOUNT_CIFS_VENDOR_SUFFIX */
 
 #ifndef MS_MOVE 
 #define MS_MOVE 8192 

Modified: branches/SAMBA_3_0/source/client/umount.cifs.c
===
--- branches/SAMBA_3_0/source/client/umount.cifs.c  2006-02-27 14:10:14 UTC 
(rev 13713)
+++ branches/SAMBA_3_0/source/client/umount.cifs.c  2006-02-27 14:18:52 UTC 
(rev 13714)
@@ -39,8 +39,17 @@
 #define UNMOUNT_CIFS_VERSION_MINOR 5
 
 #ifndef UNMOUNT_CIFS_VENDOR_SUFFIX
-#define UNMOUNT_CIFS_VENDOR_SUFFIX 
-#endif
+ #ifdef _SAMBA_BUILD_
+  #include include/version.h
+  #ifdef SAMBA_VERSION_VENDOR_SUFFIX
+   #define UNMOUNT_CIFS_VENDOR_SUFFIX 
-SAMBA_VERSION_OFFICIAL_STRING-SAMBA_VERSION_VENDOR_SUFFIX
+  #else
+   #define UNMOUNT_CIFS_VENDOR_SUFFIX -SAMBA_VERSION_OFFICIAL_STRING
+  #endif /* SAMBA_VERSION_OFFICIAL_STRING and SAMBA_VERSION_VENDOR_SUFFIX */
+ #else
+  #define UNMOUNT_CIFS_VENDOR_SUFFIX 
+ #endif /* _SAMBA_BUILD_ */
+#endif /* UNMOUNT_CIFS_VENDOR_SUFFIX */
 
 #ifndef MNT_DETACH
 #define MNT_DETACH 0x02

Modified: trunk/source/client/mount.cifs.c
===
--- trunk/source/client/mount.cifs.c2006-02-27 14:10:14 UTC (rev 13713)
+++ trunk/source/client/mount.cifs.c2006-02-27 14:18:52 UTC (rev 13714)
@@ -43,8 +43,17 @@
 #define MOUNT_CIFS_VERSION_MINOR 10
 
 #ifndef MOUNT_CIFS_VENDOR_SUFFIX
-#define MOUNT_CIFS_VENDOR_SUFFIX 
-#endif
+ #ifdef _SAMBA_BUILD_
+  #include include/version.h
+  #ifdef SAMBA_VERSION_VENDOR_SUFFIX
+   #define MOUNT_CIFS_VENDOR_SUFFIX 
-SAMBA_VERSION_OFFICIAL_STRING-SAMBA_VERSION_VENDOR_SUFFIX
+  #else
+   #define MOUNT_CIFS_VENDOR_SUFFIX -SAMBA_VERSION_OFFICIAL_STRING
+  #endif /* SAMBA_VERSION_OFFICIAL_STRING and SAMBA_VERSION_VENDOR_SUFFIX */
+ #else
+   #define MOUNT_CIFS_VENDOR_SUFFIX 
+ #endif /* _SAMBA_BUILD_ */
+#endif /* MOUNT_CIFS_VENDOR_SUFFIX */
 
 #ifndef MS_MOVE 
 #define MS_MOVE 8192 

Modified: trunk/source/client/umount.cifs.c
===
--- trunk/source/client/umount.cifs.c   2006-02-27 14:10:14 UTC (rev 13713)
+++ trunk/source/client/umount.cifs.c   2006-02-27 14:18:52 UTC (rev 13714)
@@ -39,8 +39,17 @@
 #define UNMOUNT_CIFS_VERSION_MINOR 5
 
 #ifndef UNMOUNT_CIFS_VENDOR_SUFFIX
-#define UNMOUNT_CIFS_VENDOR_SUFFIX 
-#endif
+ #ifdef _SAMBA_BUILD_
+  #include include/version.h
+  #ifdef SAMBA_VERSION_VENDOR_SUFFIX
+   #define UNMOUNT_CIFS_VENDOR_SUFFIX 
-SAMBA_VERSION_OFFICIAL_STRING-SAMBA_VERSION_VENDOR_SUFFIX
+  #else
+   #define UNMOUNT_CIFS_VENDOR_SUFFIX -SAMBA_VERSION_OFFICIAL_STRING
+  #endif /* SAMBA_VERSION_OFFICIAL_STRING and SAMBA_VERSION_VENDOR_SUFFIX */
+ #else
+  #define UNMOUNT_CIFS_VENDOR_SUFFIX 
+ #endif /* _SAMBA_BUILD_ */
+#endif /* UNMOUNT_CIFS_VENDOR_SUFFIX */
 
 #ifndef MNT_DETACH
 #define MNT_DETACH 0x02



svn commit: samba r13715 - branches/SAMBA_3_0/source/rpc_server trunk/source/rpc_server

2006-02-27 Thread idra
Author: idra
Date: 2006-02-27 14:45:27 + (Mon, 27 Feb 2006)
New Revision: 13715

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

Log:


Put back the code that actually modify the account,
removed, I presume by mistake, by Jerry in the recent
patch the removes the primary group SID stuff.

set_user_info_21 is called to update many other things
like the description of a user for example (that's what
failed on me).

Jerry, please review this one.


Modified:
   branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c
   trunk/source/rpc_server/srv_samr_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c
===
--- branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c  2006-02-27 14:18:52 UTC 
(rev 13714)
+++ branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c  2006-02-27 14:45:27 UTC 
(rev 13715)
@@ -3132,6 +3132,12 @@
   primary group SID is generated solely from the user's Unix 
   primary group. */
 
+   /* write the change out */
+   if(!NT_STATUS_IS_OK(status = pdb_update_sam_account(pwd))) {
+   TALLOC_FREE(pwd);
+   return status;
+   }
+
TALLOC_FREE(pwd);
 
return NT_STATUS_OK;

Modified: trunk/source/rpc_server/srv_samr_nt.c
===
--- trunk/source/rpc_server/srv_samr_nt.c   2006-02-27 14:18:52 UTC (rev 
13714)
+++ trunk/source/rpc_server/srv_samr_nt.c   2006-02-27 14:45:27 UTC (rev 
13715)
@@ -3132,6 +3132,12 @@
   primary group SID is generated solely from the user's Unix 
   primary group. */
 
+   /* write the change out */
+   if(!NT_STATUS_IS_OK(status = pdb_update_sam_account(pwd))) {
+   TALLOC_FREE(pwd);
+   return status;
+   }
+
TALLOC_FREE(pwd);
 
return NT_STATUS_OK;



svn commit: samba r13716 - in trunk/source/passdb: .

2006-02-27 Thread idra
Author: idra
Date: 2006-02-27 15:25:51 + (Mon, 27 Feb 2006)
New Revision: 13716

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

Log:

Use smbldap_make_mod as Volker suggested


Modified:
   trunk/source/passdb/pdb_ldap.c


Changeset:
Modified: trunk/source/passdb/pdb_ldap.c
===
--- trunk/source/passdb/pdb_ldap.c  2006-02-27 14:45:27 UTC (rev 13715)
+++ trunk/source/passdb/pdb_ldap.c  2006-02-27 15:25:51 UTC (rev 13716)
@@ -5223,7 +5223,6 @@
LDAPMod **mods = NULL;
char *filter;
char *gidstr;
-   char *newgidstr;
const char *dn = NULL;
gid_t gid;
int rc;
@@ -5234,8 +5233,8 @@
DEBUG(0,(ldapsam_set_primary_group: failed to retieve gid from 
user's group SID!\n));
return NT_STATUS_UNSUCCESSFUL;
}
-   newgidstr = talloc_asprintf(mem_ctx, %d, gid);
-   if (!newgidstr) {
+   gidstr = talloc_asprintf(mem_ctx, %d, gid);
+   if (!gidstr) {
DEBUG(0,(ldapsam_set_primary_group: Out of Memory!\n));
return NT_STATUS_NO_MEMORY;
}
@@ -5277,22 +5276,14 @@
return NT_STATUS_NO_MEMORY;
}
 
-   /* retrieve the current gid */
-   gidstr = smbldap_talloc_single_attribute(priv2ld(ldap_state), entry, 
gidNumber, mem_ctx);
-   if (!gidstr) {
-   DEBUG (0, (ldapsam_set_primary_group: Unable to find the 
user's gid!\n));
-   return NT_STATUS_INTERNAL_DB_CORRUPTION;
-   }
-
/* remove the old one, and add the new one, this way we do not risk 
races */
-   smbldap_set_mod(mods, LDAP_MOD_DELETE, gidNumber, gidstr);
-   smbldap_set_mod(mods, LDAP_MOD_ADD, gidNumber, newgidstr);
+   smbldap_make_mod(priv2ld(ldap_state), entry, mods, gidNumber, 
gidstr);
 
rc = smbldap_modify(ldap_state-smbldap_state, dn, mods);
 
if (rc != LDAP_SUCCESS) {
-   DEBUG(0,(ldapsam_set_primary_group: failed to modify [%s] 
primary group [%s] - [%s]\n,
-pdb_get_username(sampass), gidstr, newgidstr));
+   DEBUG(0,(ldapsam_set_primary_group: failed to modify [%s] 
primary group to [%s]\n,
+pdb_get_username(sampass), gidstr));
return NT_STATUS_UNSUCCESSFUL;
}
 



svn commit: samba r13717 - branches/SAMBA_3_0/source trunk/source

2006-02-27 Thread lmuelle
Author: lmuelle
Date: 2006-02-27 15:33:19 + (Mon, 27 Feb 2006)
New Revision: 13717

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

Log:
Use AC_MSG_WARN if we did not called --with-cifsmount on a non Linux
system to report we're not on Linux.

Modified:
   branches/SAMBA_3_0/source/configure.in
   trunk/source/configure.in


Changeset:
Modified: branches/SAMBA_3_0/source/configure.in
===
--- branches/SAMBA_3_0/source/configure.in  2006-02-27 15:25:51 UTC (rev 
13716)
+++ branches/SAMBA_3_0/source/configure.in  2006-02-27 15:33:19 UTC (rev 
13717)
@@ -3624,7 +3624,7 @@
UNINSTALL_CIFSMOUNT=uninstallcifsmount
;;
   *)
-   AC_MSG_ERROR(not on a linux system!)
+   AC_MSG_WARN(not on a linux system!)
;;
   esac ]
 )

Modified: trunk/source/configure.in
===
--- trunk/source/configure.in   2006-02-27 15:25:51 UTC (rev 13716)
+++ trunk/source/configure.in   2006-02-27 15:33:19 UTC (rev 13717)
@@ -3624,7 +3624,7 @@
UNINSTALL_CIFSMOUNT=uninstallcifsmount
;;
   *)
-   AC_MSG_ERROR(not on a linux system!)
+   AC_MSG_WARN(not on a linux system!)
;;
   esac ]
 )



svn commit: samba r13718 - branches/SAMBA_3_0/source trunk/source

2006-02-27 Thread lmuelle
Author: lmuelle
Date: 2006-02-27 16:18:32 + (Mon, 27 Feb 2006)
New Revision: 13718

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

Log:
There is even no need to use AC_MSG_WARN in the case the user did not
request to build mount.cifs/ umount.cifs and we're not on Linux.

Modified:
   branches/SAMBA_3_0/source/configure.in
   trunk/source/configure.in


Changeset:
Modified: branches/SAMBA_3_0/source/configure.in
===
--- branches/SAMBA_3_0/source/configure.in  2006-02-27 15:33:19 UTC (rev 
13717)
+++ branches/SAMBA_3_0/source/configure.in  2006-02-27 16:18:32 UTC (rev 
13718)
@@ -3624,7 +3624,7 @@
UNINSTALL_CIFSMOUNT=uninstallcifsmount
;;
   *)
-   AC_MSG_WARN(not on a linux system!)
+   AC_MSG_RESULT(no)
;;
   esac ]
 )

Modified: trunk/source/configure.in
===
--- trunk/source/configure.in   2006-02-27 15:33:19 UTC (rev 13717)
+++ trunk/source/configure.in   2006-02-27 16:18:32 UTC (rev 13718)
@@ -3624,7 +3624,7 @@
UNINSTALL_CIFSMOUNT=uninstallcifsmount
;;
   *)
-   AC_MSG_WARN(not on a linux system!)
+   AC_MSG_RESULT(no)
;;
   esac ]
 )



svn commit: samba r13719 - in trunk/source/lib: .

2006-02-27 Thread idra
Author: idra
Date: 2006-02-27 16:26:19 + (Mon, 27 Feb 2006)
New Revision: 13719

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

Log:

Make it so that a brand new server does not need to migrate
policies if you chose the ldapsam backend.
Make it also easy to move to ldapsam by removing the account_policy.tdb
file if you don't have any good policy set there.

I think the right thing would be also to migrate automatically to ldap
policies if an old file is found.

Simo.


Modified:
   trunk/source/lib/account_pol.c


Changeset:
Modified: trunk/source/lib/account_pol.c
===
--- trunk/source/lib/account_pol.c  2006-02-27 16:18:32 UTC (rev 13718)
+++ trunk/source/lib/account_pol.c  2006-02-27 16:26:19 UTC (rev 13719)
@@ -262,10 +262,18 @@
return True;
}
 
-   tdb = tdb_open_log(lock_path(account_policy.tdb), 0, TDB_DEFAULT, 
O_RDWR|O_CREAT, 0600);
-   if (!tdb) {
-   DEBUG(0,(Failed to open account policy database\n));
-   return False;
+   tdb = tdb_open_log(lock_path(account_policy.tdb), 0, TDB_DEFAULT, 
O_RDWR, 0600);
+   if (!tdb) { /* the account policies files does not exist or open 
failed, try to create a new one */
+   tdb = tdb_open_log(lock_path(account_policy.tdb), 0, 
TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
+   if (!tdb) {
+   DEBUG(0,(Failed to open account policy database\n));
+   return False;
+   }
+   /* creation was successful */
+   /* add AP_MIGRATED_TO_PASSDB speacial key */
+   /* so that you do not need to migrate policies */
+   /* on brand new servers as it does not make sense */
+   account_policy_migrated(True);
}
 
/* handle a Samba upgrade */



svn commit: samba r13720 - branches/SAMBA_3_0/source/nsswitch trunk/source/nsswitch

2006-02-27 Thread gd
Author: gd
Date: 2006-02-27 16:39:56 + (Mon, 27 Feb 2006)
New Revision: 13720

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

Log:
Only lockout Administrator after x bad password attempts in offline-mode
when we are told to do so by the password_properties.

Guenther

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c
   trunk/source/nsswitch/winbindd_pam.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c   2006-02-27 16:26:19 UTC 
(rev 13719)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c   2006-02-27 16:39:56 UTC 
(rev 13720)
@@ -298,7 +298,28 @@
return NT_STATUS_OK;
 }
 
+static NTSTATUS get_pwd_properties(struct winbindd_domain *domain, 
+  TALLOC_CTX *mem_ctx, 
+  uint32 *password_properties)
+{
+   struct winbindd_methods *methods;
+   NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
+   SAM_UNK_INFO_1 password_policy;
 
+   *password_properties = 0;
+
+   methods = domain-methods;
+
+   status = methods-password_policy(domain, mem_ctx, password_policy);
+   if (NT_STATUS_IS_ERR(status)) {
+   return status;
+   }
+
+   *password_properties = password_policy.password_properties;
+
+   return NT_STATUS_OK;
+}
+
 static const char *generate_krb5_ccache(TALLOC_CTX *mem_ctx, 
const char *type,
uid_t uid,
@@ -789,22 +810,30 @@
  Won't be able to honour account lockout 
policies\n));
}
 
+   /* increase counter */
+   my_info3-bad_pw_count++;
+
if (max_allowed_bad_attempts == 0) {
-   return NT_STATUS_WRONG_PASSWORD;
+   goto failed;
}
 
-   /* increase counter */
-   if (my_info3-bad_pw_count  max_allowed_bad_attempts) {
-   
-   my_info3-bad_pw_count++;
-   }
-
/* lockout user */
if (my_info3-bad_pw_count = max_allowed_bad_attempts) {
 
-   my_info3-acct_flags |= ACB_AUTOLOCK;
+   uint32 password_properties;
+
+   result = get_pwd_properties(domain, state-mem_ctx, 
password_properties);
+   if (!NT_STATUS_IS_OK(result)) {
+   DEBUG(10,(winbindd_dual_pam_auth_cached: failed to get 
password properties.\n));
+   }
+
+   if ((my_info3-user_rid != DOMAIN_USER_RID_ADMIN) || 
+   (password_properties  DOMAIN_LOCKOUT_ADMINS)) {
+   my_info3-acct_flags |= ACB_AUTOLOCK;
+   }
}
 
+failed:
result = winbindd_update_creds_by_info3(domain,
state-mem_ctx,
state-request.data.auth.user,

Modified: trunk/source/nsswitch/winbindd_pam.c
===
--- trunk/source/nsswitch/winbindd_pam.c2006-02-27 16:26:19 UTC (rev 
13719)
+++ trunk/source/nsswitch/winbindd_pam.c2006-02-27 16:39:56 UTC (rev 
13720)
@@ -298,7 +298,28 @@
return NT_STATUS_OK;
 }
 
+static NTSTATUS get_pwd_properties(struct winbindd_domain *domain, 
+  TALLOC_CTX *mem_ctx, 
+  uint32 *password_properties)
+{
+   struct winbindd_methods *methods;
+   NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
+   SAM_UNK_INFO_1 password_policy;
 
+   *password_properties = 0;
+
+   methods = domain-methods;
+
+   status = methods-password_policy(domain, mem_ctx, password_policy);
+   if (NT_STATUS_IS_ERR(status)) {
+   return status;
+   }
+
+   *password_properties = password_policy.password_properties;
+
+   return NT_STATUS_OK;
+}
+
 static const char *generate_krb5_ccache(TALLOC_CTX *mem_ctx, 
const char *type,
uid_t uid,
@@ -789,22 +810,30 @@
  Won't be able to honour account lockout 
policies\n));
}
 
+   /* increase counter */
+   my_info3-bad_pw_count++;
+
if (max_allowed_bad_attempts == 0) {
-   return NT_STATUS_WRONG_PASSWORD;
+   goto failed;
}
 
-   /* increase counter */
-   if (my_info3-bad_pw_count  max_allowed_bad_attempts) {
-   
-   my_info3-bad_pw_count++;
-   }
-
/* lockout user */
if (my_info3-bad_pw_count = max_allowed_bad_attempts) {
 
-   my_info3-acct_flags |= ACB_AUTOLOCK;
+   uint32 password_properties;
+
+   result = get_pwd_properties(domain, state-mem_ctx, 
password_properties);
+   if (!NT_STATUS_IS_OK(result)) {
+   

svn commit: samba r13721 - in trunk/source/rpc_server: .

2006-02-27 Thread idra
Author: idra
Date: 2006-02-27 16:40:00 + (Mon, 27 Feb 2006)
New Revision: 13721

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

Log:

Add some debugging so that admins might hopefully get a clue about what's 
happening


Modified:
   trunk/source/rpc_server/srv_lsa_nt.c


Changeset:
Modified: trunk/source/rpc_server/srv_lsa_nt.c
===
--- trunk/source/rpc_server/srv_lsa_nt.c2006-02-27 16:39:56 UTC (rev 
13720)
+++ trunk/source/rpc_server/srv_lsa_nt.c2006-02-27 16:40:00 UTC (rev 
13721)
@@ -1535,17 +1535,23 @@
 * I don't know if it's the right one. not documented.
 * but guessed with rpcclient.
 */
-   if (!(handle-access  POLICY_GET_PRIVATE_INFORMATION))
+   if (!(handle-access  POLICY_GET_PRIVATE_INFORMATION)) {
+   DEBUG(10, (_lsa_create_account: No 
POLICY_GET_PRIVATE_INFORMATION access right!\n));
return NT_STATUS_ACCESS_DENIED;
+   }
 
/* check to see if the pipe_user is a Domain Admin since 
   account_pol.tdb was already opened as root, this is all we have */
   
-   if ( !nt_token_check_domain_rid( p-pipe_user.nt_user_token, 
DOMAIN_GROUP_RID_ADMINS ) )
+   if ( !nt_token_check_domain_rid( p-pipe_user.nt_user_token, 
DOMAIN_GROUP_RID_ADMINS ) ) {
+   DEBUG(10, (_lsa_create_account: The use is not a Domain Admin, 
deny access!\n));
return NT_STATUS_ACCESS_DENIED;
+   }

-   if ( is_privileged_sid( q_u-sid.sid ) )
+   if ( is_privileged_sid( q_u-sid.sid ) ) {
+   DEBUG(10, (_lsa_create_account: Policy account already 
exists!\n));
return NT_STATUS_OBJECT_NAME_COLLISION;
+   }
 
/* associate the user/group SID with the (unique) handle. */

@@ -1560,6 +1566,7 @@
if (!create_policy_hnd(p, r_u-pol, free_lsa_info, (void *)info))
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
 
+   DEBUG(10, (_lsa_create_account: call privileges code to create an 
account\n));
return privilege_create_account( info-sid );
 }
 



svn commit: samba r13722 - in branches/SAMBA_3_0/source/rpc_client: .

2006-02-27 Thread jra
Author: jra
Date: 2006-02-27 18:45:44 + (Mon, 27 Feb 2006)
New Revision: 13722

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

Log:
Ensure we use the correct enumerated type. Bug #3558
from [EMAIL PROTECTED]
Jeremy.

Modified:
   branches/SAMBA_3_0/source/rpc_client/cli_pipe.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_client/cli_pipe.c
===
--- branches/SAMBA_3_0/source/rpc_client/cli_pipe.c 2006-02-27 16:40:00 UTC 
(rev 13721)
+++ branches/SAMBA_3_0/source/rpc_client/cli_pipe.c 2006-02-27 18:45:44 UTC 
(rev 13722)
@@ -1090,7 +1090,7 @@
  Creates the internals of a DCE/RPC bind request or alter context PDU.
  /
 
-static NTSTATUS create_bind_or_alt_ctx_internal(uint8 pkt_type,
+static NTSTATUS create_bind_or_alt_ctx_internal(enum RPC_PKT_TYPE pkt_type,
prs_struct *rpc_out, 
uint32 rpc_call_id,
RPC_IFACE *abstract,



svn commit: samba r13723 - in trunk/source/rpc_client: .

2006-02-27 Thread jra
Author: jra
Date: 2006-02-27 18:45:46 + (Mon, 27 Feb 2006)
New Revision: 13723

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

Log:
Ensure we use the correct enumerated type. Bug #3558
from [EMAIL PROTECTED]
Jeremy.

Modified:
   trunk/source/rpc_client/cli_pipe.c


Changeset:
Modified: trunk/source/rpc_client/cli_pipe.c
===
--- trunk/source/rpc_client/cli_pipe.c  2006-02-27 18:45:44 UTC (rev 13722)
+++ trunk/source/rpc_client/cli_pipe.c  2006-02-27 18:45:46 UTC (rev 13723)
@@ -1090,7 +1090,7 @@
  Creates the internals of a DCE/RPC bind request or alter context PDU.
  /
 
-static NTSTATUS create_bind_or_alt_ctx_internal(uint8 pkt_type,
+static NTSTATUS create_bind_or_alt_ctx_internal(enum RPC_PKT_TYPE pkt_type,
prs_struct *rpc_out, 
uint32 rpc_call_id,
RPC_IFACE *abstract,



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

2006-02-27 Thread jra
Author: jra
Date: 2006-02-27 18:48:33 + (Mon, 27 Feb 2006)
New Revision: 13724

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

Log:
Remove unused variable. Bug #3559 from
[EMAIL PROTECTED]
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/oplock_irix.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/oplock_irix.c
===
--- branches/SAMBA_3_0/source/smbd/oplock_irix.c2006-02-27 18:45:46 UTC 
(rev 13723)
+++ branches/SAMBA_3_0/source/smbd/oplock_irix.c2006-02-27 18:48:33 UTC 
(rev 13724)
@@ -206,13 +206,13 @@
 }
 
 /
- Set *maxfd to include oplock read pipe.
+ See if there is a message waiting in this fd set.
  Note that fds MAY BE NULL ! If so we must do our own select.
 /
 
 static BOOL irix_oplock_msg_waiting(fd_set *fds)
 {
-   int maxfd, selrtn;
+   int selrtn;
fd_set myfds;
struct timeval to;
 



svn commit: samba r13725 - in trunk/source/smbd: .

2006-02-27 Thread jra
Author: jra
Date: 2006-02-27 18:48:34 + (Mon, 27 Feb 2006)
New Revision: 13725

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

Log:
Remove unused variable. Bug #3559 from
[EMAIL PROTECTED]
Jeremy.

Modified:
   trunk/source/smbd/oplock_irix.c


Changeset:
Modified: trunk/source/smbd/oplock_irix.c
===
--- trunk/source/smbd/oplock_irix.c 2006-02-27 18:48:33 UTC (rev 13724)
+++ trunk/source/smbd/oplock_irix.c 2006-02-27 18:48:34 UTC (rev 13725)
@@ -206,13 +206,13 @@
 }
 
 /
- Set *maxfd to include oplock read pipe.
+ See if there is a message waiting in this fd set.
  Note that fds MAY BE NULL ! If so we must do our own select.
 /
 
 static BOOL irix_oplock_msg_waiting(fd_set *fds)
 {
-   int maxfd, selrtn;
+   int selrtn;
fd_set myfds;
struct timeval to;
 



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

2006-02-27 Thread mimir
Author: mimir
Date: 2006-02-27 19:55:21 + (Mon, 27 Feb 2006)
New Revision: 13726

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

Log:
Fix indentation.


rafal


Modified:
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c
===
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c  2006-02-27 18:48:34 UTC 
(rev 13725)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c  2006-02-27 19:55:21 UTC 
(rev 13726)
@@ -961,7 +961,7 @@
 NTSTATUS dcerpc_pipe_connect_b(TALLOC_CTX *parent_ctx, 
   struct dcerpc_pipe **pp, 
   struct dcerpc_binding *binding,
-  const struct dcerpc_interface_table *table,
+  const struct dcerpc_interface_table *table,
   struct cli_credentials *credentials,
   struct event_context *ev)
 {



svn commit: samba r13727 - branches/SAMBA_3_0/source/passdb trunk/source/passdb

2006-02-27 Thread vlendec
Author: vlendec
Date: 2006-02-27 21:19:58 + (Mon, 27 Feb 2006)
New Revision: 13727

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

Log:
Fix a segfault
Modified:
   branches/SAMBA_3_0/source/passdb/pdb_interface.c
   trunk/source/passdb/pdb_interface.c


Changeset:
Modified: branches/SAMBA_3_0/source/passdb/pdb_interface.c
===
--- branches/SAMBA_3_0/source/passdb/pdb_interface.c2006-02-27 19:55:21 UTC 
(rev 13726)
+++ branches/SAMBA_3_0/source/passdb/pdb_interface.c2006-02-27 21:19:58 UTC 
(rev 13727)
@@ -342,10 +342,14 @@
TALLOC_CTX *tmp_ctx, const char *name,
uint32 acb_info, uint32 *rid)
 {
-   struct samu *sam_pass = NULL;
+   struct samu *sam_pass;
NTSTATUS status;
struct passwd *pwd;
 
+   if ((sam_pass = TALLOC_ZERO_P(tmp_ctx, struct samu)) == NULL) {
+   return NT_STATUS_NO_MEMORY;
+   }
+
if ( !(pwd = Get_Pwnam_alloc(tmp_ctx, name)) ) {
pstring add_script;
int add_ret;

Modified: trunk/source/passdb/pdb_interface.c
===
--- trunk/source/passdb/pdb_interface.c 2006-02-27 19:55:21 UTC (rev 13726)
+++ trunk/source/passdb/pdb_interface.c 2006-02-27 21:19:58 UTC (rev 13727)
@@ -342,10 +342,14 @@
TALLOC_CTX *tmp_ctx, const char *name,
uint32 acb_info, uint32 *rid)
 {
-   struct samu *sam_pass = NULL;
+   struct samu *sam_pass;
NTSTATUS status;
struct passwd *pwd;
 
+   if ((sam_pass = TALLOC_ZERO_P(tmp_ctx, struct samu)) == NULL) {
+   return NT_STATUS_NO_MEMORY;
+   }
+
if ( !(pwd = Get_Pwnam_alloc(tmp_ctx, name)) ) {
pstring add_script;
int add_ret;



svn commit: samba r13728 - branches/SAMBA_3_0/source/passdb trunk/source/passdb

2006-02-27 Thread vlendec
Author: vlendec
Date: 2006-02-27 21:24:12 + (Mon, 27 Feb 2006)
New Revision: 13728

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

Log:
No, we have not talked about this on irc less than 24h ago... ;-)
Modified:
   branches/SAMBA_3_0/source/passdb/pdb_tdb.c
   trunk/source/passdb/pdb_tdb.c


Changeset:
Modified: branches/SAMBA_3_0/source/passdb/pdb_tdb.c
===
--- branches/SAMBA_3_0/source/passdb/pdb_tdb.c  2006-02-27 21:19:58 UTC (rev 
13727)
+++ branches/SAMBA_3_0/source/passdb/pdb_tdb.c  2006-02-27 21:24:12 UTC (rev 
13728)
@@ -1161,7 +1161,7 @@
   at module  initialization time */
   
if ( !tdbsam ) {
-   DEBUG(0,(tdbsam_getsampwrid: tdbsam not open!\n));
+   DEBUG(0,(tdbsam_delete_sam_account: tdbsam not open!\n));
return NT_STATUS_NO_SUCH_USER;
}
 
@@ -1179,7 +1179,7 @@
/* open the database */

if ( !tdbsam_open( tdbsam_filename ) ) {
-   DEBUG(0,(tdbsam_getsampwnam: failed to open %s!\n, 
tdbsam_filename));
+   DEBUG(0,(tdbsam_delete_sam_account: failed to open %s!\n, 
tdbsam_filename));
return NT_STATUS_ACCESS_DENIED;
}


Modified: trunk/source/passdb/pdb_tdb.c
===
--- trunk/source/passdb/pdb_tdb.c   2006-02-27 21:19:58 UTC (rev 13727)
+++ trunk/source/passdb/pdb_tdb.c   2006-02-27 21:24:12 UTC (rev 13728)
@@ -1161,7 +1161,7 @@
   at module  initialization time */
   
if ( !tdbsam ) {
-   DEBUG(0,(tdbsam_getsampwrid: tdbsam not open!\n));
+   DEBUG(0,(tdbsam_delete_sam_account: tdbsam not open!\n));
return NT_STATUS_NO_SUCH_USER;
}
 
@@ -1179,7 +1179,7 @@
/* open the database */

if ( !tdbsam_open( tdbsam_filename ) ) {
-   DEBUG(0,(tdbsam_getsampwnam: failed to open %s!\n, 
tdbsam_filename));
+   DEBUG(0,(tdbsam_delete_sam_account: failed to open %s!\n, 
tdbsam_filename));
return NT_STATUS_ACCESS_DENIED;
}




svn commit: samba r13729 - branches/SAMBA_3_0/source/passdb trunk/source/passdb

2006-02-27 Thread vlendec
Author: vlendec
Date: 2006-02-27 21:28:19 + (Mon, 27 Feb 2006)
New Revision: 13729

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

Log:
Fix smbpasswd -x
Modified:
   branches/SAMBA_3_0/source/passdb/pdb_tdb.c
   trunk/source/passdb/pdb_tdb.c


Changeset:
Modified: branches/SAMBA_3_0/source/passdb/pdb_tdb.c
===
--- branches/SAMBA_3_0/source/passdb/pdb_tdb.c  2006-02-27 21:24:12 UTC (rev 
13728)
+++ branches/SAMBA_3_0/source/passdb/pdb_tdb.c  2006-02-27 21:28:19 UTC (rev 
13729)
@@ -1157,12 +1157,12 @@
uint32  rid;
fstring name;

-   /* make sure we have an open handle to the tdb.  Should have happened 
-  at module  initialization time */
-  
-   if ( !tdbsam ) {
-   DEBUG(0,(tdbsam_delete_sam_account: tdbsam not open!\n));
-   return NT_STATUS_NO_SUCH_USER;
+   /* open the database */
+   
+   if ( !tdbsam_open( tdbsam_filename ) ) {
+   DEBUG(0,(tdbsam_delete_sam_account: failed to open %s!\n,
+tdbsam_filename));
+   return NT_STATUS_ACCESS_DENIED;
}
 
fstrcpy(name, pdb_get_username(sam_pass));
@@ -1176,13 +1176,6 @@

rid = pdb_get_user_rid(sam_pass);
 
-   /* open the database */
-   
-   if ( !tdbsam_open( tdbsam_filename ) ) {
-   DEBUG(0,(tdbsam_delete_sam_account: failed to open %s!\n, 
tdbsam_filename));
-   return NT_STATUS_ACCESS_DENIED;
-   }
-   
/* it's outaa here!  8^) */
 
if ( tdb_delete(tdbsam, key) != TDB_SUCCESS ) {

Modified: trunk/source/passdb/pdb_tdb.c
===
--- trunk/source/passdb/pdb_tdb.c   2006-02-27 21:24:12 UTC (rev 13728)
+++ trunk/source/passdb/pdb_tdb.c   2006-02-27 21:28:19 UTC (rev 13729)
@@ -1157,12 +1157,12 @@
uint32  rid;
fstring name;

-   /* make sure we have an open handle to the tdb.  Should have happened 
-  at module  initialization time */
-  
-   if ( !tdbsam ) {
-   DEBUG(0,(tdbsam_delete_sam_account: tdbsam not open!\n));
-   return NT_STATUS_NO_SUCH_USER;
+   /* open the database */
+   
+   if ( !tdbsam_open( tdbsam_filename ) ) {
+   DEBUG(0,(tdbsam_delete_sam_account: failed to open %s!\n,
+tdbsam_filename));
+   return NT_STATUS_ACCESS_DENIED;
}
 
fstrcpy(name, pdb_get_username(sam_pass));
@@ -1176,13 +1176,6 @@

rid = pdb_get_user_rid(sam_pass);
 
-   /* open the database */
-   
-   if ( !tdbsam_open( tdbsam_filename ) ) {
-   DEBUG(0,(tdbsam_delete_sam_account: failed to open %s!\n, 
tdbsam_filename));
-   return NT_STATUS_ACCESS_DENIED;
-   }
-   
/* it's outaa here!  8^) */
 
if ( tdb_delete(tdbsam, key) != TDB_SUCCESS ) {



svn commit: samba r13730 - in trunk/source/passdb: .

2006-02-27 Thread idra
Author: idra
Date: 2006-02-27 21:29:21 + (Mon, 27 Feb 2006)
New Revision: 13730

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

Log:

editposix is not suited for ldapsam_compat


Modified:
   trunk/source/passdb/pdb_ldap.c


Changeset:
Modified: trunk/source/passdb/pdb_ldap.c
===
--- trunk/source/passdb/pdb_ldap.c  2006-02-27 21:28:19 UTC (rev 13729)
+++ trunk/source/passdb/pdb_ldap.c  2006-02-27 21:29:21 UTC (rev 13730)
@@ -5357,16 +5357,6 @@
(*pdb_method)-rid_algorithm = ldapsam_rid_algorithm;
(*pdb_method)-new_rid = ldapsam_new_rid;
 
-   if (lp_parm_bool(-1, ldapsam, trusted, False) 
-   lp_parm_bool(-1, ldapsam, editposix, False)) {
-   (*pdb_method)-create_user = ldapsam_create_user;
-   (*pdb_method)-delete_user = ldapsam_delete_user;
-   (*pdb_method)-create_dom_group = ldapsam_create_dom_group;
-   (*pdb_method)-delete_dom_group = ldapsam_delete_dom_group;
-   (*pdb_method)-add_groupmem = ldapsam_add_groupmem;
-   (*pdb_method)-del_groupmem = ldapsam_del_groupmem;
-   (*pdb_method)-set_unix_primary_group = 
ldapsam_set_primary_group;
-   }
/* TODO: Setup private data and free */
 
if ( !(ldap_state = TALLOC_ZERO_P(*pdb_method, struct 
ldapsam_privates)) ) {
@@ -5475,6 +5465,16 @@
ldapsam_enum_group_memberships;
(*pdb_method)-lookup_rids = ldapsam_lookup_rids;
(*pdb_method)-sid_to_id = ldapsam_sid_to_id;
+   
+   if (lp_parm_bool(-1, ldapsam, editposix, False)) {
+   (*pdb_method)-create_user = ldapsam_create_user;
+   (*pdb_method)-delete_user = ldapsam_delete_user;
+   (*pdb_method)-create_dom_group = 
ldapsam_create_dom_group;
+   (*pdb_method)-delete_dom_group = 
ldapsam_delete_dom_group;
+   (*pdb_method)-add_groupmem = ldapsam_add_groupmem;
+   (*pdb_method)-del_groupmem = ldapsam_del_groupmem;
+   (*pdb_method)-set_unix_primary_group = 
ldapsam_set_primary_group;
+   }
}
 
ldap_state = (*pdb_method)-private_data;



svn commit: samba r13731 - in branches/tmp: . samba4-ldb-register/source/dsdb/samdb/ldb_modules samba4-ldb-register/source/ldap_server samba4-ldb-register/source/lib/ldb samba4-ldb-register/source/lib

2006-02-27 Thread jelmer
Author: jelmer
Date: 2006-02-27 22:30:44 + (Mon, 27 Feb 2006)
New Revision: 13731

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

Log:
Put my work-in-progress on a registration functions in LDB in a temporary 
branch. It is pretty much finished, though there are still some bugs that need 
to be fixed before it is ready to be merged. 

Comments on the implementation are welcome.


Added:
   branches/tmp/samba4-ldb-register/
Modified:
   branches/tmp/samba4-ldb-register/source/dsdb/samdb/ldb_modules/config.mk
   branches/tmp/samba4-ldb-register/source/dsdb/samdb/ldb_modules/extended_dn.c
   branches/tmp/samba4-ldb-register/source/dsdb/samdb/ldb_modules/kludge_acl.c
   branches/tmp/samba4-ldb-register/source/dsdb/samdb/ldb_modules/objectguid.c
   
branches/tmp/samba4-ldb-register/source/dsdb/samdb/ldb_modules/password_hash.c
   branches/tmp/samba4-ldb-register/source/dsdb/samdb/ldb_modules/proxy.c
   branches/tmp/samba4-ldb-register/source/dsdb/samdb/ldb_modules/rootdse.c
   branches/tmp/samba4-ldb-register/source/dsdb/samdb/ldb_modules/samba3sam.c
   branches/tmp/samba4-ldb-register/source/dsdb/samdb/ldb_modules/samldb.c
   branches/tmp/samba4-ldb-register/source/ldap_server/ldap_server.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/common/ldb.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/common/ldb_modules.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/config.mk
   branches/tmp/samba4-ldb-register/source/lib/ldb/include/includes.h
   branches/tmp/samba4-ldb-register/source/lib/ldb/include/ldb.h
   branches/tmp/samba4-ldb-register/source/lib/ldb/include/ldb_private.h
   branches/tmp/samba4-ldb-register/source/lib/ldb/ldb_ildap/ldb_ildap.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/ldb_ldap/ldb_ldap.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/ldb_tdb/ldb_tdb.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/modules/asq.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/modules/objectclass.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/modules/operational.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/modules/paged_results.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/modules/rdn_name.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/modules/schema.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/modules/skel.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/modules/sort.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/tools/cmdline.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/tools/ldbadd.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/tools/ldbdel.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/tools/ldbedit.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/tools/ldbmodify.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/tools/ldbrename.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/tools/ldbsearch.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/tools/ldbtest.c
   branches/tmp/samba4-ldb-register/source/lib/ldb/tools/oLschema2ldif.c
   branches/tmp/samba4-ldb-register/source/scripting/ejs/smbscript.c
   branches/tmp/samba4-ldb-register/source/smbd/process_thread.c


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


svn commit: samba r13732 - in branches/tmp: . samba4-named-pipes/include samba4-named-pipes/librpc/rpc samba4-named-pipes/ntvfs samba4-named-pipes/ntvfs/ipc samba4-named-pipes/rpc_server samba4-named-

2006-02-27 Thread jelmer
Author: jelmer
Date: 2006-02-27 22:37:34 + (Mon, 27 Feb 2006)
New Revision: 13732

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

Log:
Put my named pipe abstraction work in a seperate branch until it is ready to be 
merged

Added:
   branches/tmp/samba4-named-pipes/
   branches/tmp/samba4-named-pipes/torture/ipc/
   branches/tmp/samba4-named-pipes/torture/ipc/np_echo.c
   branches/tmp/samba4-named-pipes/torture/ipc/rap.c
Modified:
   branches/tmp/samba4-named-pipes/include/smb.h
   branches/tmp/samba4-named-pipes/include/structs.h
   branches/tmp/samba4-named-pipes/librpc/rpc/dcerpc_smb.c
   branches/tmp/samba4-named-pipes/ntvfs/config.mk
   branches/tmp/samba4-named-pipes/ntvfs/ipc/ipc.h
   branches/tmp/samba4-named-pipes/ntvfs/ipc/np_echo.c
   branches/tmp/samba4-named-pipes/ntvfs/ipc/vfs_ipc.c
   branches/tmp/samba4-named-pipes/rpc_server/config.mk
   branches/tmp/samba4-named-pipes/rpc_server/dcerpc_server.c
   branches/tmp/samba4-named-pipes/script/tests/test_quick.sh
   branches/tmp/samba4-named-pipes/torture/config.mk
   branches/tmp/samba4-named-pipes/torture/torture.c


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


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

2006-02-27 Thread jpeach
Author: jpeach
Date: 2006-02-27 23:45:49 + (Mon, 27 Feb 2006)
New Revision: 13733

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

Log:
Reorder so that locking and params declarations are not mingled.

Modified:
   branches/SAMBA_3_0/source/include/smb.h


Changeset:
Modified: branches/SAMBA_3_0/source/include/smb.h
===
--- branches/SAMBA_3_0/source/include/smb.h 2006-02-27 22:37:34 UTC (rev 
13732)
+++ branches/SAMBA_3_0/source/include/smb.h 2006-02-27 23:45:49 UTC (rev 
13733)
@@ -764,22 +764,11 @@
P_LOCAL,P_GLOBAL,P_SEPARATOR,P_NONE
 } parm_class;
 
-/* passed to br lock code */
-enum brl_type {READ_LOCK, WRITE_LOCK, PENDING_LOCK};
-
 struct enum_list {
int value;
const char *name;
 };
 
-#define BRLOCK_FN_CAST() \
-   void (*)(SMB_DEV_T dev, SMB_INO_T ino, struct process_id pid, \
-enum brl_type lock_type, \
-br_off start, br_off size)
-#define BRLOCK_FN(fn) \
-   void (*fn)(SMB_DEV_T dev, SMB_INO_T ino, struct process_id pid, \
-enum brl_type lock_type, \
-br_off start, br_off size)
 struct parm_struct {
const char *label;
parm_type type;
@@ -797,11 +786,6 @@
} def;
 };
 
-struct bitmap {
-   uint32 *b;
-   unsigned int n;
-};
-
 /* The following flags are used in SWAT */
 #define FLAG_BASIC 0x0001 /* Display only in BASIC view */
 #define FLAG_SHARE 0x0002 /* file sharing options */
@@ -814,11 +798,28 @@
 #define FLAG_HIDE  0x2000 /* options that should be hidden in SWAT */
 #define FLAG_DOS_STRING 0x4000 /* convert from UNIX to DOS codepage when 
reading this string. */
 
+/* passed to br lock code */
+enum brl_type {READ_LOCK, WRITE_LOCK, PENDING_LOCK};
+
+#define BRLOCK_FN_CAST() \
+   void (*)(SMB_DEV_T dev, SMB_INO_T ino, struct process_id pid, \
+enum brl_type lock_type, \
+br_off start, br_off size)
+
+#define BRLOCK_FN(fn) \
+   void (*fn)(SMB_DEV_T dev, SMB_INO_T ino, struct process_id pid, \
+enum brl_type lock_type, \
+br_off start, br_off size)
+
+struct bitmap {
+   uint32 *b;
+   unsigned int n;
+};
+
 #ifndef LOCKING_VERSION
 #define LOCKING_VERSION 4
 #endif /* LOCKING_VERSION */
 
-
 /* the basic packet size, assuming no words or bytes */
 #define smb_size 39
 



svn commit: samba r13734 - in trunk/source/include: .

2006-02-27 Thread jpeach
Author: jpeach
Date: 2006-02-27 23:53:23 + (Mon, 27 Feb 2006)
New Revision: 13734

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

Log:
svn merge -r13732:13733 ../branches/SAMBA_3_0

Modified:
   trunk/source/include/smb.h


Changeset:
Modified: trunk/source/include/smb.h
===
--- trunk/source/include/smb.h  2006-02-27 23:45:49 UTC (rev 13733)
+++ trunk/source/include/smb.h  2006-02-27 23:53:23 UTC (rev 13734)
@@ -766,22 +766,11 @@
P_LOCAL,P_GLOBAL,P_SEPARATOR,P_NONE
 } parm_class;
 
-/* passed to br lock code */
-enum brl_type {READ_LOCK, WRITE_LOCK, PENDING_LOCK};
-
 struct enum_list {
int value;
const char *name;
 };
 
-#define BRLOCK_FN_CAST() \
-   void (*)(SMB_DEV_T dev, SMB_INO_T ino, struct process_id pid, \
-enum brl_type lock_type, \
-br_off start, br_off size)
-#define BRLOCK_FN(fn) \
-   void (*fn)(SMB_DEV_T dev, SMB_INO_T ino, struct process_id pid, \
-enum brl_type lock_type, \
-br_off start, br_off size)
 struct parm_struct {
const char *label;
parm_type type;
@@ -799,11 +788,6 @@
} def;
 };
 
-struct bitmap {
-   uint32 *b;
-   unsigned int n;
-};
-
 /* The following flags are used in SWAT */
 #define FLAG_BASIC 0x0001 /* Display only in BASIC view */
 #define FLAG_SHARE 0x0002 /* file sharing options */
@@ -816,11 +800,28 @@
 #define FLAG_HIDE  0x2000 /* options that should be hidden in SWAT */
 #define FLAG_DOS_STRING 0x4000 /* convert from UNIX to DOS codepage when 
reading this string. */
 
+/* passed to br lock code */
+enum brl_type {READ_LOCK, WRITE_LOCK, PENDING_LOCK};
+
+#define BRLOCK_FN_CAST() \
+   void (*)(SMB_DEV_T dev, SMB_INO_T ino, struct process_id pid, \
+enum brl_type lock_type, \
+br_off start, br_off size)
+
+#define BRLOCK_FN(fn) \
+   void (*fn)(SMB_DEV_T dev, SMB_INO_T ino, struct process_id pid, \
+enum brl_type lock_type, \
+br_off start, br_off size)
+
+struct bitmap {
+   uint32 *b;
+   unsigned int n;
+};
+
 #ifndef LOCKING_VERSION
 #define LOCKING_VERSION 4
 #endif /* LOCKING_VERSION */
 
-
 /* the basic packet size, assuming no words or bytes */
 #define smb_size 39
 



Build status as of Tue Feb 28 00:00:02 2006

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

--- /home/build/master/cache/broken_results.txt.old 2006-02-27 
00:00:03.0 +
+++ /home/build/master/cache/broken_results.txt 2006-02-28 00:00:04.0 
+
@@ -1,17 +1,17 @@
-Build status as of Mon Feb 27 00:00:01 2006
+Build status as of Tue Feb 28 00:00:02 2006
 
 Build counts:
 Tree Total  Broken Panic 
-ccache   8  3  0 
-distcc   9  2  0 
-lorikeet-heimdal 15 15 0 
+ccache   9  3  0 
+distcc   10 2  0 
+lorikeet-heimdal 14 14 0 
 ppp  15 0  0 
 rsync31 2  0 
 samba2  0  0 
 samba-docs   0  0  0 
-samba4   33 20 2 
+samba4   33 21 2 
 samba_3_032 6  0 
-smb-build21 4  0 
-talloc   8  5  0 
-tdb  30 3  0 
+smb-build22 3  0 
+talloc   9  6  0 
+tdb  9  3  0 
 


svn commit: samba r13735 - in branches/SAMBA_4_0: .

2006-02-27 Thread jelmer
Author: jelmer
Date: 2006-02-28 00:01:04 + (Tue, 28 Feb 2006)
New Revision: 13735

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

Log:
Add summary of changes since the first TP so far. Please let me know 
if I've gotten details wrong or if there's something missing.

Modified:
   branches/SAMBA_4_0/WHATSNEW.txt


Changeset:
Modified: branches/SAMBA_4_0/WHATSNEW.txt
===
--- branches/SAMBA_4_0/WHATSNEW.txt 2006-02-27 23:53:23 UTC (rev 13734)
+++ branches/SAMBA_4_0/WHATSNEW.txt 2006-02-28 00:01:04 UTC (rev 13735)
@@ -8,5 +8,102 @@
 Release date: UNRELEASED
 
 
-FIXME
+ * Use HDB-LDB as the keytab (abartlet)
 
+ * Call the wins hook script again (metze)
+
+ * Make sure no more then 25 records are added in the WINS database (metze)
+ 
+ * Documentation updates (jelmer)
+
+ * Fix termination issue in winreg server (metze)
+
+ * AES fix for Samba 4 - Samba4 (abartlet)
+
+ * Better conformance to FHS (abartlet, jelmer)
+
+ * Improve internal API and code quality in smbclient (jelmer)
+
+ * Add testsuite for smbclient (jelmer)
+
+ * Remove support for password as an optional second parameter in 
+   smbclient (jelmer)
+
+ * Various warning fixes (metze)
+
+ * Several clarifications of comments (abartlet)
+
+ * Remove use of pstring in some places (jelmer)
+
+ * Re-add the global -k option to enable kerberos (abartlet)
+
+ * Various memory allocation fixes (abartlet)
+
+ * Add new cifsdd client (jpeach)
+
+ * Add tests for even more insane delete-on-close semantics (jra, tridge)
+ 
+ * Initial work on BASE-DELETE test passing (tridge)
+
+ * Optimizations in tdb (tridge)
+
+ * Improvements to ldb documentation (idra, Brad Hards)
+
+ * Check attribute names to obey rfc2251 (idra)
+
+ * Allow WINS replication with NT4SP6A (metze)
+
+ * Add ManageDSAIT control (Pete Rowley, idra)
+
+ * Add tests for LDB controls (idra)
+
+ * Various LDB crash fixes (idra)
+
+ * Initial work on vlv LDB control (idra)
+
+ * Add -p option to smbtorture (jpeach)
+
+ * Several improvements to the SMB URL and UNC parsing (jpeach)
+
+ * Make DCE/RPC connect functions work async (rafal)
+
+ * Fix invalid steal on supportedControls (closes: #3525) (abartlet)
+
+ * Initial work on making ldb async (idra)
+ 
+ * Start parsing saslauthd requests (metze)
+
+ * Split the NBT-WINSREPLICATION test into multiple tests (metze)
+
+ * Add new ACB-bits as seen in acct_flags in the PAC info3 (gd)
+
+ * Move header files out of include/ (jelmer)
+ 
+ * Create separate library for generic utility functions (jelmer)
+
+ * Add highestCommittedUSN, uSNChanged and uSNCreated support to LDB (tridge)
+
+ * Allow more control over the the winbindd socket location (abartlet)
+
+ * Allow messaging without a server messaging context (abartlet) 
+
+ * Make GSSAPI SASL mech work (abartlet)
+
+ * Write out Samba4 version when provisioning (idra)
+
+ * Allow servers to bind to non-broadcast interfaces (tridge, abartlet)
+
+ * Initialize some ASN.1 elements that are optional (metze)
+
+ * Various improvements to RPC-SCHANNEL (abartlet)
+
+ * Make Samba4 pass some of the newer schannel tests (abartlet)
+
+ * Better handling of connections without SPNEGO (abartlet)
+
+ * Improve NTLMSSP tests (abartlet, vl)
+
+ * A lot of small cleanups and typo fixes 
+   (metze, abartlet, idra, jpeach, tridge, jelmer)
+
+(up to date until revno 13732)



svn commit: samba r13736 - in branches/SAMBA_3_0/source/param: .

2006-02-27 Thread jpeach
Author: jpeach
Date: 2006-02-28 00:59:14 + (Tue, 28 Feb 2006)
New Revision: 13736

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

Log:
Don't assume that printf can handle string arguments being NULL. Tidy
up typing and tighten error checking a little.

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


Changeset:
Modified: branches/SAMBA_3_0/source/param/loadparm.c
===
--- branches/SAMBA_3_0/source/param/loadparm.c  2006-02-28 00:01:04 UTC (rev 
13735)
+++ branches/SAMBA_3_0/source/param/loadparm.c  2006-02-28 00:59:14 UTC (rev 
13736)
@@ -2152,14 +2152,17 @@
 }
 
 
+#define MISSING_PARAMETER(name) \
+DEBUG(0, (%s(): value is NULL or empty!\n, #name))
+
 /***
 convenience routine to return int parameters.
 /
 static int lp_int(const char *s)
 {
 
-   if (!s) {
-   DEBUG(0,(lp_int(%s): is called with NULL!\n,s));
+   if (!s || !*s) {
+   MISSING_PARAMETER(lp_int);
return (-1);
}
 
@@ -2169,12 +2172,12 @@
 /***
 convenience routine to return unsigned long parameters.
 /
-static int lp_ulong(const char *s)
+static unsigned long lp_ulong(const char *s)
 {
 
-   if (!s) {
-   DEBUG(0,(lp_int(%s): is called with NULL!\n,s));
-   return (-1);
+   if (!s || !*s) {
+   MISSING_PARAMETER(lp_ulong);
+   return (0);
}
 
return strtoul(s, NULL, 10);
@@ -2187,8 +2190,8 @@
 {
BOOL ret = False;
 
-   if (!s) {
-   DEBUG(0,(lp_bool(%s): is called with NULL!\n,s));
+   if (!s || !*s) {
+   MISSING_PARAMETER(lp_bool);
return False;
}

@@ -2207,8 +2210,8 @@
 {
int i;
 
-   if (!s || !_enum) {
-   DEBUG(0,(lp_enum(%s,enum): is called with NULL!\n,s));
+   if (!s || !*s || !_enum) {
+   MISSING_PARAMETER(lp_enum);
return (-1);
}

@@ -2221,6 +2224,7 @@
return (-1);
 }
 
+#undef MISSING_PARAMETER
 
 /* DO NOT USE lp_parm_string ANYMORE
  * use lp_parm_const_string or lp_parm_talloc_string
@@ -3485,16 +3489,15 @@
switch (parm_table[parmnum].type)
{
case P_BOOL:
-   set_boolean((BOOL *)parm_ptr, pszParmValue);
+   *(BOOL *)parm_ptr = lp_bool(pszParmValue);
break;
 
case P_BOOLREV:
-   set_boolean((BOOL *)parm_ptr, pszParmValue);
-   *(BOOL *)parm_ptr = !*(BOOL *)parm_ptr;
+   *(BOOL *)parm_ptr = !lp_bool(pszParmValue);
break;
 
case P_INTEGER:
-   *(int *)parm_ptr = atoi(pszParmValue);
+   *(int *)parm_ptr = lp_int(pszParmValue);
break;
 
case P_CHAR:



svn commit: samba r13737 - in trunk/source/param: .

2006-02-27 Thread jpeach
Author: jpeach
Date: 2006-02-28 01:00:37 + (Tue, 28 Feb 2006)
New Revision: 13737

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

Log:
svn merge -r13735:13736 ../branches/SAMBA_3_0

Modified:
   trunk/source/param/loadparm.c


Changeset:
Modified: trunk/source/param/loadparm.c
===
--- trunk/source/param/loadparm.c   2006-02-28 00:59:14 UTC (rev 13736)
+++ trunk/source/param/loadparm.c   2006-02-28 01:00:37 UTC (rev 13737)
@@ -2152,14 +2152,17 @@
 }
 
 
+#define MISSING_PARAMETER(name) \
+DEBUG(0, (%s(): value is NULL or empty!\n, #name))
+
 /***
 convenience routine to return int parameters.
 /
 static int lp_int(const char *s)
 {
 
-   if (!s) {
-   DEBUG(0,(lp_int(%s): is called with NULL!\n,s));
+   if (!s || !*s) {
+   MISSING_PARAMETER(lp_int);
return (-1);
}
 
@@ -2169,12 +2172,12 @@
 /***
 convenience routine to return unsigned long parameters.
 /
-static int lp_ulong(const char *s)
+static unsigned long lp_ulong(const char *s)
 {
 
-   if (!s) {
-   DEBUG(0,(lp_int(%s): is called with NULL!\n,s));
-   return (-1);
+   if (!s || !*s) {
+   MISSING_PARAMETER(lp_ulong);
+   return (0);
}
 
return strtoul(s, NULL, 10);
@@ -2187,8 +2190,8 @@
 {
BOOL ret = False;
 
-   if (!s) {
-   DEBUG(0,(lp_bool(%s): is called with NULL!\n,s));
+   if (!s || !*s) {
+   MISSING_PARAMETER(lp_bool);
return False;
}

@@ -2207,8 +2210,8 @@
 {
int i;
 
-   if (!s || !_enum) {
-   DEBUG(0,(lp_enum(%s,enum): is called with NULL!\n,s));
+   if (!s || !*s || !_enum) {
+   MISSING_PARAMETER(lp_enum);
return (-1);
}

@@ -2221,6 +2224,7 @@
return (-1);
 }
 
+#undef MISSING_PARAMETER
 
 /* DO NOT USE lp_parm_string ANYMORE
  * use lp_parm_const_string or lp_parm_talloc_string
@@ -3485,16 +3489,15 @@
switch (parm_table[parmnum].type)
{
case P_BOOL:
-   set_boolean((BOOL *)parm_ptr, pszParmValue);
+   *(BOOL *)parm_ptr = lp_bool(pszParmValue);
break;
 
case P_BOOLREV:
-   set_boolean((BOOL *)parm_ptr, pszParmValue);
-   *(BOOL *)parm_ptr = !*(BOOL *)parm_ptr;
+   *(BOOL *)parm_ptr = !lp_bool(pszParmValue);
break;
 
case P_INTEGER:
-   *(int *)parm_ptr = atoi(pszParmValue);
+   *(int *)parm_ptr = lp_int(pszParmValue);
break;
 
case P_CHAR:



svn commit: samba r13738 - in branches/SAMBA_4_0/source: librpc/ndr pidl/lib/Parse/Pidl

2006-02-27 Thread tridge
Author: tridge
Date: 2006-02-28 03:42:19 + (Tue, 28 Feb 2006)
New Revision: 13738

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

Log:

added support for a pointer type in pidl. This will be used in the
opendb work that will be committed shortly.

The pointer type assumes that pointers fit in 64 bits, which is
probably OK on all our supported architectures.


Modified:
   branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Typelist.pm


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c
===
--- branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c2006-02-28 01:00:37 UTC 
(rev 13737)
+++ branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c2006-02-28 03:42:19 UTC 
(rev 13738)
@@ -193,6 +193,19 @@
 }
 
 /*
+  parse a pointer
+*/
+NTSTATUS ndr_pull_pointer(struct ndr_pull *ndr, int ndr_flags, void* *v)
+{
+   uint64_t h;
+   NTSTATUS status;
+   NDR_PULL_ALIGN(ndr, 8);
+   status = ndr_pull_udlong(ndr, ndr_flags, h);
+   *v = (void *)((intptr_t)h);
+   return status;  
+}
+
+/*
   pull a NTSTATUS
 */
 NTSTATUS ndr_pull_NTSTATUS(struct ndr_pull *ndr, int ndr_flags, NTSTATUS 
*status)
@@ -375,6 +388,15 @@
return ndr_push_udlong(ndr, NDR_SCALARS, v);
 }
 
+/*
+  push a pointer
+*/
+NTSTATUS ndr_push_pointer(struct ndr_push *ndr, int ndr_flags, void* v)
+{
+   NDR_PUSH_ALIGN(ndr, 8);
+   return ndr_push_udlong(ndr, NDR_SCALARS, (intptr_t)v);
+}
+
 NTSTATUS ndr_push_align(struct ndr_push *ndr, size_t size)
 {
NDR_PUSH_ALIGN(ndr, size);
@@ -671,6 +693,11 @@
ndr_print_dlong(ndr, name, v);
 }
 
+void ndr_print_pointer(struct ndr_print *ndr, const char *name, void *v)
+{
+   ndr-print(ndr, %-25s: %p, name, v);
+}
+
 void ndr_print_ptr(struct ndr_print *ndr, const char *name, const void *p)
 {
if (p) {

Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
===
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm2006-02-28 
01:00:37 UTC (rev 13737)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm2006-02-28 
03:42:19 UTC (rev 13738)
@@ -51,6 +51,7 @@
'int32' = 4,
'uint32' = 4,
'hyper' = 8,
+   'pointer' = 8,
'dlong' = 4,
'udlong' = 4,
'udlongr' = 4,

Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Typelist.pm
===
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Typelist.pm   2006-02-28 
01:00:37 UTC (rev 13737)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Typelist.pm   2006-02-28 
03:42:19 UTC (rev 13738)
@@ -73,6 +73,11 @@
C_TYPE  = uint64_t,
IS_REFERENCE= 0,
},
+   # assume its a 8 byte type, but cope with either
+   pointer   = {
+   C_TYPE  = void*,
+   IS_REFERENCE= 0,
+   },
 
# DATA_BLOB types
DATA_BLOB = {



svn commit: samba r13739 - in branches/SAMBA_4_0/source: librpc librpc/idl ntvfs/common ntvfs/posix

2006-02-27 Thread tridge
Author: tridge
Date: 2006-02-28 03:47:02 + (Tue, 28 Feb 2006)
New Revision: 13739

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

Log:

a fairly major overhaul of the opendb code to allow the BASE-DELETE
test to pass. To try to make the code a bit more understandable, I
moved to using an IDL description of the opendb tdb record format.

One of the larger changes was to make directory opens and creates go
via the opendb code, so directory operations now obey all the share
mode restrictions, as well as delete on close semantics. I also
changed the period over which the opendb locks are held, to try to
minimise races due to two open operations happening at the same time.


Added:
   branches/SAMBA_4_0/source/librpc/idl/opendb.idl
Modified:
   branches/SAMBA_4_0/source/librpc/config.mk
   branches/SAMBA_4_0/source/ntvfs/common/opendb.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_fileinfo.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_qfileinfo.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_rename.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_setfileinfo.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_unlink.c


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


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

2006-02-27 Thread tridge
Author: tridge
Date: 2006-02-28 03:49:13 + (Tue, 28 Feb 2006)
New Revision: 13740

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

Log:

the BASE-DELETE test now passes, and is a quick test

Modified:
   branches/SAMBA_4_0/source/script/tests/test_posix.sh
   branches/SAMBA_4_0/source/script/tests/test_quick.sh


Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/test_posix.sh
===
--- branches/SAMBA_4_0/source/script/tests/test_posix.sh2006-02-28 
03:47:02 UTC (rev 13739)
+++ branches/SAMBA_4_0/source/script/tests/test_posix.sh2006-02-28 
03:49:13 UTC (rev 13740)
@@ -25,7 +25,7 @@
 tests=$tests BASE-DIR1 BASE-DIR2 BASE-VUID
 tests=$tests BASE-DENY1 BASE-DENY2 BASE-TCON BASE-TCONDEV BASE-RW1
 tests=$tests BASE-DENY3 BASE-XCOPY BASE-OPEN BASE-DENYDOS
-tests=$tests BASE-PROPERTIES BASE-MANGLE
+tests=$tests BASE-PROPERTIES BASE-MANGLE BASE-DELETE
 tests=$tests BASE-CHKPATH BASE-SECLEAK BASE-TRANS2
 tests=$tests BASE-NTDENY1 BASE-NTDENY2  BASE-RENAME BASE-OPENATTR 
BASE-DISCONNECT
 tests=$tests RAW-QFSINFO RAW-QFILEINFO RAW-SFILEINFO-BUG RAW-SFILEINFO
@@ -33,7 +33,7 @@
 tests=$tests RAW-UNLINK RAW-READ RAW-CLOSE RAW-IOCTL RAW-SEARCH RAW-CHKPATH 
RAW-RENAME
 tests=$tests RAW-EAS RAW-STREAMS RAW-ACLS
 
-soon=BASE-CHARSET RAW-OPLOCK RAW-NOTIFY BASE-DELAYWRITE BASE-DELETE 
BASE-NEGNOWAIT
+soon=BASE-CHARSET RAW-OPLOCK RAW-NOTIFY BASE-DELAYWRITE BASE-NEGNOWAIT
 
 echo WARNING: Skipping tests $soon
 

Modified: branches/SAMBA_4_0/source/script/tests/test_quick.sh
===
--- branches/SAMBA_4_0/source/script/tests/test_quick.sh2006-02-28 
03:47:02 UTC (rev 13739)
+++ branches/SAMBA_4_0/source/script/tests/test_quick.sh2006-02-28 
03:49:13 UTC (rev 13740)
@@ -18,7 +18,7 @@
 incdir=`dirname $0`
 . $incdir/test_functions.sh
 
-tests=BASE-UNLINK BASE-ATTR
+tests=BASE-UNLINK BASE-ATTR BASE-DELETE
 tests=$tests BASE-DIR2 BASE-TCON BASE-OPEN
 tests=$tests BASE-CHKPATH RAW-QFSINFO RAW-QFILEINFO RAW-SFILEINFO
 tests=$tests RAW-LOCK RAW-MKDIR RAW-SEEK RAW-OPEN RAW-WRITE



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

2006-02-27 Thread tridge
Author: tridge
Date: 2006-02-28 04:02:26 + (Tue, 28 Feb 2006)
New Revision: 13741

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

Log:

make the pointer type in pidl handle any size pointer, just in case we
have a 128 bit machine out there somewhere


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


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c
===
--- branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c2006-02-28 03:49:13 UTC 
(rev 13740)
+++ branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c2006-02-28 04:02:26 UTC 
(rev 13741)
@@ -197,12 +197,13 @@
 */
 NTSTATUS ndr_pull_pointer(struct ndr_pull *ndr, int ndr_flags, void* *v)
 {
-   uint64_t h;
-   NTSTATUS status;
-   NDR_PULL_ALIGN(ndr, 8);
-   status = ndr_pull_udlong(ndr, ndr_flags, h);
-   *v = (void *)((intptr_t)h);
-   return status;  
+   intptr_t h;
+   NDR_PULL_ALIGN(ndr, sizeof(h));
+   NDR_PULL_NEED_BYTES(ndr, sizeof(h));
+   memcpy(h, ndr-data+ndr-offset, sizeof(h));
+   ndr-offset += sizeof(h);
+   *v = (void *)h;
+   return NT_STATUS_OK;
 }
 
 /*
@@ -393,8 +394,12 @@
 */
 NTSTATUS ndr_push_pointer(struct ndr_push *ndr, int ndr_flags, void* v)
 {
-   NDR_PUSH_ALIGN(ndr, 8);
-   return ndr_push_udlong(ndr, NDR_SCALARS, (intptr_t)v);
+   intptr_t h = (intptr_t)v;
+   NDR_PUSH_ALIGN(ndr, sizeof(h));
+   NDR_PUSH_NEED_BYTES(ndr, sizeof(h));
+   memcpy(ndr-data+ndr-offset, h, sizeof(h));
+   ndr-offset += sizeof(h);
+   return NT_STATUS_OK;
 }
 
 NTSTATUS ndr_push_align(struct ndr_push *ndr, size_t size)



svn commit: samba r13742 - in branches/SAMBA_4_0/source/lib/ldb/tests: .

2006-02-27 Thread idra
Author: idra
Date: 2006-02-28 04:36:29 + (Tue, 28 Feb 2006)
New Revision: 13742

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

Log:

Fix tests to work better with ldap


Modified:
   branches/SAMBA_4_0/source/lib/ldb/tests/photo.ldif
   branches/SAMBA_4_0/source/lib/ldb/tests/slapd.conf
   branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh
   branches/SAMBA_4_0/source/lib/ldb/tests/test-wildcard.ldif
   branches/SAMBA_4_0/source/lib/ldb/tests/test.ldif


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/tests/photo.ldif
===
--- branches/SAMBA_4_0/source/lib/ldb/tests/photo.ldif  2006-02-28 04:02:26 UTC 
(rev 13741)
+++ branches/SAMBA_4_0/source/lib/ldb/tests/photo.ldif  2006-02-28 04:36:29 UTC 
(rev 13742)
@@ -1,5 +1,5 @@
 dn: cn=Hampster Ursula,ou=Alumni Association,ou=People,o=University of 
Michigan,c=TEST
 changetype: modify
-add: photo
-photo: tests/samba4.png
+add: jpegPhoto
+jpegPhoto: file:///tmp/samba4.png
 

Modified: branches/SAMBA_4_0/source/lib/ldb/tests/slapd.conf
===
--- branches/SAMBA_4_0/source/lib/ldb/tests/slapd.conf  2006-02-28 04:02:26 UTC 
(rev 13741)
+++ branches/SAMBA_4_0/source/lib/ldb/tests/slapd.conf  2006-02-28 04:36:29 UTC 
(rev 13742)
@@ -14,8 +14,8 @@
 
 allow update_anon bind_anon_dn
 
-#modulepath/usr/lib/ldap
-#moduleloadback_bdb
+modulepath /usr/lib/ldap
+moduleload back_bdb
 
 defaultsearchbase o=University of Michigan,c=TEST
 

Modified: branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh
===
--- branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh 2006-02-28 
04:02:26 UTC (rev 13741)
+++ branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh 2006-02-28 
04:36:29 UTC (rev 13742)
@@ -64,24 +64,26 @@
 exit 1
 fi
 
+echo Testing binary file attribute value
+cp tests/samba4.png /tmp/samba4.png
+$VALGRIND ldbmodify $LDBDIR/tests/photo.ldif || echo this seem to fail on 
ldap ...
+rm /tmp/samba4.png
+
+echo *TODO* Testing UTF8 upper lower case searches !!
+
 echo Testing compare
 count=`$VALGRIND ldbsearch '(cn=t)' cn | grep '^dn' | wc -l`
 if [ $count != 2 ]; then
 echo returned $count records - expected 2
-exit 1
+echo this fails on opsnLdap ...
 fi
 
 count=`$VALGRIND ldbsearch '(cn=t)' cn | grep '^dn' | wc -l`
 if [ $count != 13 ]; then
 echo returned $count records - expected 13
-exit 1
+echo this fails on opsnLdap ...
 fi
 
-echo Testing binary file attribute value
-$VALGRIND ldbmodify $LDBDIR/tests/photo.ldif || exit 1
-
-echo *TODO* Testing UTF8 upper lower case searches !!
-
 checkcount() {
 count=$1
 scope=$2

Modified: branches/SAMBA_4_0/source/lib/ldb/tests/test-wildcard.ldif
===
--- branches/SAMBA_4_0/source/lib/ldb/tests/test-wildcard.ldif  2006-02-28 
04:02:26 UTC (rev 13741)
+++ branches/SAMBA_4_0/source/lib/ldb/tests/test-wildcard.ldif  2006-02-28 
04:36:29 UTC (rev 13742)
@@ -1,4 +1,5 @@
 dn: cn=test_multi_test_multi_test_multi,o=University of Michigan,c=TEST
 objectclass: person
 cn: test_multi_test_multi_test_multi
+sn: multi_test
 description: test multi wildcards matching

Modified: branches/SAMBA_4_0/source/lib/ldb/tests/test.ldif
===
--- branches/SAMBA_4_0/source/lib/ldb/tests/test.ldif   2006-02-28 04:02:26 UTC 
(rev 13741)
+++ branches/SAMBA_4_0/source/lib/ldb/tests/test.ldif   2006-02-28 04:36:29 UTC 
(rev 13742)
@@ -374,7 +374,7 @@
 userpassword:: c2VjcmV0
 
 dn: cn=Mark Elliot,ou=Alumni Association,ou=People,o=University of Michigan,c=
- US
+ TEST
 objectclass: OpenLDAPperson
 cn: Mark Elliot
 cn: Mark A Elliot
@@ -413,3 +413,4 @@
 dn: ou=Ldb Test,ou=People,o=University of Michigan,c=TEST
 objectclass: organizationalUnit
 ou: Ldb Test
+



svn commit: samba r13743 - in branches/SAMBA_4_0/source/lib/ldb/ldb_ildap: .

2006-02-27 Thread idra
Author: idra
Date: 2006-02-28 04:37:47 + (Tue, 28 Feb 2006)
New Revision: 13743

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

Log:

Generic fixes and improvements


Modified:
   branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c
===
--- branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c 2006-02-28 
04:36:29 UTC (rev 13742)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c 2006-02-28 
04:37:47 UTC (rev 13743)
@@ -24,10 +24,22 @@
 */
 
 /*
-  This is a ldb backend for the internal ldap client library in
-  Samba4. By using this backend we are independent of a system ldap
-  library
-*/
+ *  Name: ldb_ildap
+ *
+ *  Component: ldb ildap backend
+ *
+ *  Description: This is a ldb backend for the internal ldap
+ *  client library in Samba4. By using this backend we are
+ *  independent of a system ldap library
+ *
+ *  Author: Andrew Tridgell
+ *
+ *  Modifications:
+ *
+ *  - description: make the module use asyncronous calls
+ *date: Feb 2006
+ *author: Simo Sorce
+ */
 
 
 #include includes.h
@@ -141,7 +153,7 @@
 {
struct ldb_async_handle *handle = 
talloc_get_type(req-async.private_data, struct ldb_async_handle);
struct ildb_async_context *ac = talloc_get_type(handle-private_data, 
struct ildb_async_context);
-   struct ildb_private *ildb = ac-module-private_data;
+   struct ildb_private *ildb = talloc_get_type(ac-module-private_data, 
struct ildb_private);
NTSTATUS status;
int i;
 
@@ -166,6 +178,10 @@
}
status = ldap_check_response(req-conn, 
req-replies[0]-r.GeneralResult);
handle-status = ildb_map_error(ildb, status);
+   if (ac-callback  handle-status == LDB_SUCCESS) {
+   /* FIXME: build a corresponding ares to pass on */
+   handle-status = ac-callback(ac-module-ldb, 
ac-context, NULL);
+   }
handle-state = LDB_ASYNC_DONE;
break;
 
@@ -176,6 +192,10 @@
}
status = ldap_check_response(req-conn, 
req-replies[0]-r.GeneralResult);
handle-status = ildb_map_error(ildb, status);
+   if (ac-callback  handle-status == LDB_SUCCESS) {
+   /* FIXME: build a corresponding ares to pass on */
+   handle-status = ac-callback(ac-module-ldb, 
ac-context, NULL);
+   }
handle-state = LDB_ASYNC_DONE;
break;
 
@@ -186,6 +206,10 @@
}
status = ldap_check_response(req-conn, 
req-replies[0]-r.GeneralResult);
handle-status = ildb_map_error(ildb, status);
+   if (ac-callback  handle-status == LDB_SUCCESS) {
+   /* FIXME: build a corresponding ares to pass on */
+   handle-status = ac-callback(ac-module-ldb, 
ac-context, NULL);
+   }
handle-state = LDB_ASYNC_DONE;
break;
 
@@ -196,6 +220,10 @@
}
status = ldap_check_response(req-conn, 
req-replies[0]-r.GeneralResult);
handle-status = ildb_map_error(ildb, status);
+   if (ac-callback  handle-status == LDB_SUCCESS) {
+   /* FIXME: build a corresponding ares to pass on */
+   handle-status = ac-callback(ac-module-ldb, 
ac-context, NULL);
+   }
handle-state = LDB_ASYNC_DONE;
break;
 
@@ -302,7 +330,7 @@
 int timeout,
 struct ldb_async_handle **handle)
 {
-   struct ildb_private *ildb = module-private_data;
+   struct ildb_private *ildb = talloc_get_type(module-private_data, 
struct ildb_private);
struct ildb_async_context *ildb_ac;
struct ldb_async_handle *h;
struct ldap_request *req;
@@ -362,7 +390,7 @@
  int timeout,
  struct ldb_async_handle **handle)
 {
-   struct ildb_private *ildb = module-private_data;
+   struct ildb_private *ildb = talloc_get_type(module-private_data, 
struct ildb_private);
struct ldap_message *msg;
int n;
 
@@ -422,12 +450,6 @@
return ildb_request_send(module, msg, context, callback, timeout, 
handle);
 }
 
-struct ildb_sync_context {
-   struct ldb_result *res;
-   int status;
-   int done;
-};
-
 static int ildb_search_sync_callback(struct ldb_context *ldb, void *context, 
struct ldb_async_result *ares)
 {
struct ldb_result *res;
@@ -476,12 +498,10 @@
res-refs[n + 1] = NULL;
}
 
-   if (ares-type == LDB_REPLY_DONE) {
-   if (ares-controls) {
-   res-controls = talloc_steal(res, 

svn commit: samba r13744 - in branches/SAMBA_4_0/source/lib/ldb: include ldb_ldap

2006-02-27 Thread idra
Author: idra
Date: 2006-02-28 04:38:53 + (Tue, 28 Feb 2006)
New Revision: 13744

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

Log:

Make ldb_ldap async


Removed:
   branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.h
Modified:
   branches/SAMBA_4_0/source/lib/ldb/include/ldb.h
   branches/SAMBA_4_0/source/lib/ldb/ldb_ldap/ldb_ldap.c


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


svn commit: samba r13747 - in branches/SAMBA_3_0/source/passdb: .

2006-02-27 Thread jra
Author: jra
Date: 2006-02-28 06:33:31 + (Tue, 28 Feb 2006)
New Revision: 13747

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

Log:
Fix the reference count for tdbsam_open() - on an
upgrade it calls tdbsam_convert() which calls tdbsam_open()
deep inside the init_sam_from_buffer_vX call.
If the ref count hasn't been set yet then we will close
the tdbsam reference in tdbsam_getsampwsid().
smbpasswd -a was core-dumping again :-).
Jeremy

Modified:
   branches/SAMBA_3_0/source/passdb/pdb_tdb.c


Changeset:
Modified: branches/SAMBA_3_0/source/passdb/pdb_tdb.c
===
--- branches/SAMBA_3_0/source/passdb/pdb_tdb.c  2006-02-28 06:33:28 UTC (rev 
13746)
+++ branches/SAMBA_3_0/source/passdb/pdb_tdb.c  2006-02-28 06:33:31 UTC (rev 
13747)
@@ -817,17 +817,24 @@
return False;
}
 
+   /* set the initial reference count - must be done before tdbsam_convert
+  as that calls tdbsam_open()/tdbsam_close(). */
+
+   ref_count = 1;
+
/* Check the version */
version = tdb_fetch_int32( tdbsam, TDBSAM_VERSION_STRING );

-   if (version == -1)
+   if (version == -1) {
version = 0;/* Version not found, assume version 0 */
+   }

/* Compare the version */
if (version  TDBSAM_VERSION) {
/* Version more recent than the latest known */ 
DEBUG(0, (tdbsam_open: unknown version = %d\n, version));
tdb_close( tdbsam );
+   ref_count = 0;
return False;
} 

@@ -839,16 +846,13 @@
if ( !tdbsam_convert(version) ) {
DEBUG(0, (tdbsam_open: Error when trying to convert 
tdbsam [%s]\n,name));
tdb_close(tdbsam);
+   ref_count = 0;
return False;
}

DEBUG(3, (TDBSAM converted successfully.\n));
}

-   /* set the initial reference count */
-
-   ref_count = 1;
-
DEBUG(4,(tdbsam_open: successfully opened %s\n, name ));  

return True;



svn commit: samba r13746 - in trunk/source/passdb: .

2006-02-27 Thread jra
Author: jra
Date: 2006-02-28 06:33:28 + (Tue, 28 Feb 2006)
New Revision: 13746

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

Log:
Fix the reference count for tdbsam_open() - on an
upgrade it calls tdbsam_convert() which calls tdbsam_open()
deep inside the init_sam_from_buffer_vX call.
If the ref count hasn't been set yet then we will close
the tdbsam reference in tdbsam_getsampwsid().
smbpasswd -a was core-dumping again :-).
Jeremy

Modified:
   trunk/source/passdb/pdb_tdb.c


Changeset:
Modified: trunk/source/passdb/pdb_tdb.c
===
--- trunk/source/passdb/pdb_tdb.c   2006-02-28 05:48:21 UTC (rev 13745)
+++ trunk/source/passdb/pdb_tdb.c   2006-02-28 06:33:28 UTC (rev 13746)
@@ -817,17 +817,24 @@
return False;
}
 
+   /* set the initial reference count - must be done before tdbsam_convert
+  as that calls tdbsam_open()/tdbsam_close(). */
+
+   ref_count = 1;
+
/* Check the version */
version = tdb_fetch_int32( tdbsam, TDBSAM_VERSION_STRING );

-   if (version == -1)
+   if (version == -1) {
version = 0;/* Version not found, assume version 0 */
+   }

/* Compare the version */
if (version  TDBSAM_VERSION) {
/* Version more recent than the latest known */ 
DEBUG(0, (tdbsam_open: unknown version = %d\n, version));
tdb_close( tdbsam );
+   ref_count = 0;
return False;
} 

@@ -839,16 +846,13 @@
if ( !tdbsam_convert(version) ) {
DEBUG(0, (tdbsam_open: Error when trying to convert 
tdbsam [%s]\n,name));
tdb_close(tdbsam);
+   ref_count = 0;
return False;
}

DEBUG(3, (TDBSAM converted successfully.\n));
}

-   /* set the initial reference count */
-
-   ref_count = 1;
-
DEBUG(4,(tdbsam_open: successfully opened %s\n, name ));  

return True;



svn commit: samba r13749 - in trunk/source/smbd: .

2006-02-27 Thread jra
Author: jra
Date: 2006-02-28 06:41:09 + (Tue, 28 Feb 2006)
New Revision: 13749

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

Log:
Don't reference memory after we just freed it (Doh!).
Thanks to tridge's changes to the directory delete on close tests
for catching this.
Jeremy.

Modified:
   trunk/source/smbd/close.c


Changeset:
Modified: trunk/source/smbd/close.c
===
--- trunk/source/smbd/close.c   2006-02-28 06:41:07 UTC (rev 13748)
+++ trunk/source/smbd/close.c   2006-02-28 06:41:09 UTC (rev 13749)
@@ -363,8 +363,6 @@
 
delete_dir = (lck-delete_on_close | lck-initial_delete_on_close);
 
-   TALLOC_FREE(lck);
-
if ((close_type == NORMAL_CLOSE || close_type == SHUTDOWN_CLOSE) 
delete_dir 
lck-delete_token) {
@@ -382,6 +380,8 @@
lck-delete_token-groups,
NULL);
 
+   TALLOC_FREE(lck);
+
ok = rmdir_internals(fsp-conn, fsp-fsp_name);
 
DEBUG(5,(close_directory: %s. Delete on close was set - 
deleting directory %s.\n,
@@ -402,6 +402,7 @@
}
process_pending_change_notify_queue((time_t)0);
} else {
+   TALLOC_FREE(lck);
remove_pending_change_notify_requests_by_fid(fsp, 
NT_STATUS_CANCELLED);
}
 



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

2006-02-27 Thread jra
Author: jra
Date: 2006-02-28 06:41:07 + (Tue, 28 Feb 2006)
New Revision: 13748

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

Log:
Don't reference memory after we just freed it (Doh!).
Thanks to tridge's changes to the directory delete on close tests
for catching this.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/close.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/close.c
===
--- branches/SAMBA_3_0/source/smbd/close.c  2006-02-28 06:33:31 UTC (rev 
13747)
+++ branches/SAMBA_3_0/source/smbd/close.c  2006-02-28 06:41:07 UTC (rev 
13748)
@@ -363,8 +363,6 @@
 
delete_dir = (lck-delete_on_close | lck-initial_delete_on_close);
 
-   TALLOC_FREE(lck);
-
if ((close_type == NORMAL_CLOSE || close_type == SHUTDOWN_CLOSE) 
delete_dir 
lck-delete_token) {
@@ -382,6 +380,8 @@
lck-delete_token-groups,
NULL);
 
+   TALLOC_FREE(lck);
+
ok = rmdir_internals(fsp-conn, fsp-fsp_name);
 
DEBUG(5,(close_directory: %s. Delete on close was set - 
deleting directory %s.\n,
@@ -402,6 +402,7 @@
}
process_pending_change_notify_queue((time_t)0);
} else {
+   TALLOC_FREE(lck);
remove_pending_change_notify_requests_by_fid(fsp, 
NT_STATUS_CANCELLED);
}