[Samba] access denied to printer after changing the dns-domain

2006-09-09 Thread Olav Rogall
Guten Tag ,


  I'm  running  here  a  self-compiled samba 2.2.12 on an old suse 8.0
  server   as  a  domain  controller  with  w2ksp2-  and  sp4-clients.
  The server also services cups, squid, postfix, bind etc.
  
  Everything works fine fopr year's.

  Last  week  i've  changed  the dns-system in my private network from
  *.privatnet to *.bla.dyndns.org.

  After  the dns-change some accesses to my printer (hp photosmart 1000
  , raw-printing with cups on the same machine) didn't work. If I open
  the printer-dialog on w2k (Start/settings/printers), the status of the
  printer  is  reported as ready to service print-jobs, but if I try
  to   acccess   the   printer-properties,  I  receive  the  famous
  error-message  error  at  adress  0x6062c92f code 0xc005 - some
  property-pages could not be displayed

  This  error  is  on  all w2k-machines on the network, and for domain
  users and domain admins.

  After  raising  the  smb-loglevel,  I see this in my logfile, but it
  doesn't tell me anything (the marked line is interesting):

 [2006/04/25 20:03:35, 3] smbd/ipc.c:reply_trans(520)
   trans \PIPE\ data=182 params=0 setup=2
 [2006/04/25 20:03:35, 3] smbd/ipc.c:named_pipe(334)
   named pipe command on  name
 [2006/04/25 20:03:35, 3] smbd/ipc.c:api_fd_reply(296)
   Got API command 0x26 on pipe spoolss (pnum 7546)free_pipe_context: 
destroying talloc pool of size 0
 [2006/04/25 20:03:35, 3] rpc_server/srv_pipe.c:api_pipe_request(1183)
   Doing \PIPE\spoolss
 [2006/04/25 20:03:35, 3] rpc_server/srv_pipe.c:api_rpcTNP(1215)
   api_rpcTNP: pipe 30022 rpc command: SPOOLSS_OPENPRINTEREX
   checking name: \\potenzia\HP
 [2006/04/25 20:03:35, 3] 
rpc_server/srv_spoolss_nt.c:set_printer_hnd_printertype(394)
   Setting printer type=\\potenzia\HP
 [2006/04/25 20:03:35, 3] lib/util_seaccess.c:se_access_check(269)
   se_access_check: user sid is S-1-5-21-1655514155-2700837326-2153537488-2000
 [2006/04/25 20:03:35, 3] lib/util_seaccess.c:se_access_check(273)
   se_access_check: also S-1-5-21-1655514155-2700837326-2153537488-2003
 [2006/04/25 20:03:35, 3] lib/util_seaccess.c:se_access_check(273)
   se_access_check: also S-1-5-21-1655514155-2700837326-2153537488-1201
 [2006/04/25 20:03:35, 3] lib/util_seaccess.c:se_access_check(273)
   se_access_check: also S-1-1-0
 [2006/04/25 20:03:35, 3] lib/util_seaccess.c:se_access_check(273)
   se_access_check: also S-1-5-2
 [2006/04/25 20:03:35, 3] lib/util_seaccess.c:se_access_check(273)
   se_access_check: also S-1-5-11
 [2006/04/25 20:03:35, 3] 
 rpc_server/srv_spoolss_nt.c:_spoolss_open_printer_ex(1181)
   access DENIED for printer open
 [2006/04/25 20:03:35, 3] rpc_server/srv_lsa_hnd.c:close_policy_hnd(197)
   Closed policy
 [2006/04/25 20:03:35, 3] rpc_server/srv_pipe_hnd.c:free_pipe_context(444)
   free_pipe_context: destroying talloc pool of size 60


Deleting  and  re-installing  the printer over the network-neighborhood
was without success.

Asking  mother  Google  ;-) for errcode 0x6062 I read the I should
set  default  devmode  =  no  in  the printer-share-definition in my
smb.conf. This also didn't solve my printer-problem.


Has anybody here an idea, how I could re-get access to my printer?



Here's my smb.conf:

[global]
encrypt passwords   = yes
guest account   = Nobody
interfaces  = 192.168.10.100/255.255.255.0
local master= yes
log file= /var/log/samba/%m
log level   = 3
map to guest= Bad User
os level= 65
protocol= NT1
security= user
socket options  = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
time server = yes
username map= /etc/samba/smbusers
veto files  = /*.eml/*.nws/*.{*}/
wins support= no
workgroup   = wuerggrub

#
# Drucker-Ansteuerung
#

print command   = /usr/bin/lp -d%p -oraw %s; rm %s
printing= cups
printcap name   = /etc/printcap
load printers   = yes

#
# Zeichensaetze und Names-Konventionen
#

case sensitive  = no
character set   = ISO8859-15
client code page= 850
default case= lower
mangle case = yes
mangled names   = yes
preserve case   = yes
short preserve case = yes

#
# PDC-Stuff
#

add user script = /usr/sbin/useradd -d /dev/null -g smbpc -c 
'Maschinenkonto' -s /bin/false -M %m$
domain admin group  = domadmin @domadmin
domain logons   = Yes
domain master   = Yes
logon drive = H:
logon home  = \\%L\%U
logon path  = \\%L\Profiles\%m-%U
logon script= %U.cmd
logon 

[Samba] PDC config asking for double AUTH

2006-09-09 Thread daniel parkes

Hy,

I have set up a samba PDC with tdbsam, for a office, everything seems to be
ok, users logon to the pcs with their user domains, the policies are working
ok, but once they login, when they try to access a share in the samba pdc
server, it asks againg for user and passwd, Any idea why its doing this?,
you cant access also the netlog on share, so no scripts are working :**.


Another doubdt i have is if i dont want roaming profiles, i just want to the
users to use their profile in their pc how can i do it?


my config is like this:

#=== Global Settings ===

[global]


workgroup = liquid.zz
netbiosname = liquidsbox
server string = LiquidDs Samba Fuck U server
time server = Yes
wins support = yes
passdb backend = tdbsam
os level = 64
preferred master = auto
domain master = yes
local master = yes
preferred master = Yes
security = user
domain logons = yes
;logon path = \\%N\profiles\%U
;mapeaelhomealaletraH
logon drive = H:
logon home = \\liquidsbox\home\%u
logon script = logon.cmd
add user script = /usr/sbin/useradd -d /dev/null -g smbusers -s /bin/false
-m %u
add machine script = /usr/sbin/useradd -d /dev/null -g machines -s
/bin/false -m %u
delete user script = /usr/sbin/userdel -r '%u'
add group script = /usr/sbin/groupadd '%g'
delete group script = /usr/sbin/groupdel '%g'
add user to group script = /usr/sbin/usermod -G '%g' '%u'

[netlogon]
path = /var/lib/samba/netlogon
guest ok = Yes
share modes = no
public = no
read only = no
write list = root
browseable = no


 Debugging/Accounting 
log file = /var/log/samba/%m
 log level = 2
 syslog = 0

#=== Share Definitions ===

[homes]
  comment = Home Directories
  browseable = yes
  writable = yes
  create mask = 0700
  directory mask = 0700

[samba]
  comment = Carpeta compartida
  locking = no
  path = /samba
  browseable = yes
  writable = yes
  create mask = 0700
  directory mask = 0700
  valid users = @users


Also when i list a user the ouput gives me as the domain the netbios name of
the pdc server not the name of the domain:

[EMAIL PROTECTED]:~ # pdbedit -Lv -u prueba
Unix username:prueba
NT username:
Account Flags:[U  ]
User SID: S-1-5-21-2639249364-3457876577-3313450608-3006
Primary Group SID:S-1-5-21-2639249364-3457876577-3313450608-1201
Full Name:prueba de samba
Home Directory:   \\liquidsbox\home\%u
HomeDir Drive:F:
Logon Script: logon.cmd
Profile Path:
Domain:   LIQUIDSBOX -- when the domain name is
LIQUID.ZZ
Account desc:
Workstations:
Munged dial:
Logon time:   0
Logoff time:  Sun, 07 Feb 2106 07:28:15 CET
Kickoff time: Sun, 07 Feb 2106 07:28:15 CET
Password last set:Sat, 09 Sep 2006 09:35:42 CEST
Password can change:  Sat, 09 Sep 2006 09:35:49 CEST
Password must change: Sat, 09 Sep 2006 09:37:12 CEST
Last bad password   : 0
Bad password count  : 0
Logon hours : FF


could have to do with this?



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


Re: [Samba] fam error

2006-09-09 Thread Willy Offermans
On Mon, Sep 04, 2006 at 10:27:35PM +1000, James Peach wrote:
 On 04/09/06, Willy Offermans [EMAIL PROTECTED] wrote:
 Dear Samba Friends,
 
 I got the following error again and again:
 
 snip
 .
 Sep  4 10:58:18 sun smbd[94479]: [2006/09/04 10:58:18, 0] 
 smbd/notify_fam.c:fam_check_reconnect(136)
 Sep  4 10:58:18 sun smbd[94479]:   failed to connect to FAM service
 Sep  4 10:58:23 sun smbd[94479]: [2006/09/04 10:58:23, 0] 
 smbd/notify_fam.c:fam_check_reconnect(136)
 Sep  4 10:58:23 sun smbd[94479]:   failed to connect to FAM service
 Sep  4 10:58:24 sun smbd[94479]: [2006/09/04 10:58:24, 0] 
 smbd/notify_fam.c:fam_check_reconnect(136)
 Sep  4 10:58:24 sun smbd[94479]:   failed to connect to FAM service
 Sep  4 10:58:25 sun smbd[94479]: [2006/09/04 10:58:25, 0] 
 smbd/notify_fam.c:fam_check_reconnect(136)
 Sep  4 10:58:25 sun smbd[94479]:   failed to connect to FAM service
 Sep  4 10:58:25 sun smbd[94479]: [2006/09/04 10:58:25, 0] 
 smbd/notify_fam.c:fam_check_reconnect(136)
 Sep  4 10:58:25 sun smbd[94479]:   failed to connect to FAM service
 Sep  4 11:23:22 sun smbd[94479]: [2006/09/04 11:23:22, 0] 
 smbd/notify_fam.c:fam_check_reconnect(136)
 Sep  4 11:23:22 sun smbd[94479]:   failed to connect to FAM service
 .
 /snip
 
 I'm using samba-3.0.23b,1 on FreeBSD 6.1
 
 I've only ever tested the FAM support on IRIX. smbd will automatically
 attempt to use FAM if it appears to be available, but it shouldn't
 
 I did not specify anything with respect to fam in my
 /usr/local/etc/smb.conf file.
 
 I have only noticed that a new directory has been created in /tmp/
 
 drwx--  2 root  wheel  512 Sep  4 08:45 /tmp/fam-root/
 
 This directory is empty and updated once and a while. I mean the
 directory is recreated at a later time. Attributes and owner do not
 change.
 
 In the clients log files I find the following:
 
 snip
 
 [2006/09/04 11:36:41, 0] smbd/notify_fam.c:fam_check_reconnect(136)
   failed to connect to FAM service
   Socket directory /tmp/fam-root has different owner
   Failed to remove unsafe path /tmp/fam-root
 ...
 /snip
 
 It seems that the client tries to access /tmp/fam-root but has not the
 right user priviliges.
 
 Can someone help me out and explain what is going on? How can I solve
 the problem?
 
 You can disable FAM support by setting fam change notify = no in
 smb.conf. This
 will get rid of the messages, but obviously you won't get FAM support.
 I'd have to dig
 into the FAM implementation on FreeBSD to be more helpful, and I won't
 be able to
 do that for a couple of weeks.
 
 -- 
 James Peach | [EMAIL PROTECTED]

Well, since the error message is only annoying and __not__ critical at
the moment, I will just be patient then. I do not know how fam is
implemented into samba and if calling the fam function in FreeBSD needs
special considerations. I expected that the samba developer, responsible
for the fam implementation, would have a look. I do not know if I reach
that person via this mailing list.


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

Willy

*
W.K. Offermans
Eindhoven University of Technology
Department of Chemical Engineering
Laboratory of Catalysis (SKA)
building ST-W 4.27, PO Box 513
5600 MB  Eindhoven, Netherlands
Tel:+31 40 247 37 81
Fax:+31 40 245 50 54
Home:   +31 45 544 49 44
Mobile: +31 650 697 837
e-mail: [EMAIL PROTECTED]
http://www.catalysis.nl

   Powered by 

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

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


Re: [Samba] fam error

2006-09-09 Thread James Peach

On 09/09/06, Willy Offermans [EMAIL PROTECTED] wrote:

On Mon, Sep 04, 2006 at 10:27:35PM +1000, James Peach wrote:
 On 04/09/06, Willy Offermans [EMAIL PROTECTED] wrote:
 Dear Samba Friends,
 
 I got the following error again and again:
 
 snip
 .
 Sep  4 10:58:18 sun smbd[94479]: [2006/09/04 10:58:18, 0]
 smbd/notify_fam.c:fam_check_reconnect(136)
 Sep  4 10:58:18 sun smbd[94479]:   failed to connect to FAM service
 Sep  4 10:58:23 sun smbd[94479]: [2006/09/04 10:58:23, 0]
 smbd/notify_fam.c:fam_check_reconnect(136)
 Sep  4 10:58:23 sun smbd[94479]:   failed to connect to FAM service
 Sep  4 10:58:24 sun smbd[94479]: [2006/09/04 10:58:24, 0]
 smbd/notify_fam.c:fam_check_reconnect(136)
 Sep  4 10:58:24 sun smbd[94479]:   failed to connect to FAM service
 Sep  4 10:58:25 sun smbd[94479]: [2006/09/04 10:58:25, 0]
 smbd/notify_fam.c:fam_check_reconnect(136)
 Sep  4 10:58:25 sun smbd[94479]:   failed to connect to FAM service
 Sep  4 10:58:25 sun smbd[94479]: [2006/09/04 10:58:25, 0]
 smbd/notify_fam.c:fam_check_reconnect(136)
 Sep  4 10:58:25 sun smbd[94479]:   failed to connect to FAM service
 Sep  4 11:23:22 sun smbd[94479]: [2006/09/04 11:23:22, 0]
 smbd/notify_fam.c:fam_check_reconnect(136)
 Sep  4 11:23:22 sun smbd[94479]:   failed to connect to FAM service
 .
 /snip
 
 I'm using samba-3.0.23b,1 on FreeBSD 6.1

 I've only ever tested the FAM support on IRIX. smbd will automatically
 attempt to use FAM if it appears to be available, but it shouldn't

 I did not specify anything with respect to fam in my
 /usr/local/etc/smb.conf file.
 
 I have only noticed that a new directory has been created in /tmp/
 
 drwx--  2 root  wheel  512 Sep  4 08:45 /tmp/fam-root/
 
 This directory is empty and updated once and a while. I mean the
 directory is recreated at a later time. Attributes and owner do not
 change.
 
 In the clients log files I find the following:
 
 snip
 
 [2006/09/04 11:36:41, 0] smbd/notify_fam.c:fam_check_reconnect(136)
   failed to connect to FAM service
   Socket directory /tmp/fam-root has different owner
   Failed to remove unsafe path /tmp/fam-root
 ...
 /snip
 
 It seems that the client tries to access /tmp/fam-root but has not the
 right user priviliges.
 
 Can someone help me out and explain what is going on? How can I solve
 the problem?

 You can disable FAM support by setting fam change notify = no in
 smb.conf. This
 will get rid of the messages, but obviously you won't get FAM support.
 I'd have to dig
 into the FAM implementation on FreeBSD to be more helpful, and I won't
 be able to
 do that for a couple of weeks.

 --
 James Peach | [EMAIL PROTECTED]

Well, since the error message is only annoying and __not__ critical at
the moment, I will just be patient then.


Yes, FAM can be disabled without losing any functionality. It is merely a
performance optimisation.


I do not know how fam is
implemented into samba and if calling the fam function in FreeBSD needs
special considerations. I expected that the samba developer, responsible
for the fam implementation, would have a look. I do not know if I reach
that person via this mailing list.


Yes, that's me. I just don't have the facility to do anything about this for
couple of weeks.

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


[Samba] Automount Windows home directory

2006-09-09 Thread Leon Stringer
Hi,

Is there a way to connect to the Windows user home directory share from a Samba 
client automatically?

At the moment I can manually connect to the share using mount -t smb using 
the usual hidden/protected credentials file. Obviously this needs editing every 
time my domain password changes (as enforced by policy).

However, since getting the workstation to authenticate me from the domain 
controllers (i.e. via Samba), manually mounting my home directory (with an 
independent password setting) seems very cumbersome.

It's also complicates the scenario of multiple users using one workstation.

Ideally one could log into the Samba workstation with their domain credentials 
and their UNIX home directory be connected to the Windows home directory.

Has anyone found a slick way of doing this? Or at least any way of improving 
the situation.

(NT4 domain, Fedora Core 5 workstation, GNOME desktop).

Thanks,

Leon...

-
Email sent from www.ntlworld.com
Virus-checked using McAfee(R) Software 
Visit www.ntlworld.com/security for more information

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


Re: [Samba] Automount Windows home directory

2006-09-09 Thread Cybionet

Greeting Leon,

For the mount, use pam_mount, it work great. Pam_mount will mount share 
dynamiquely for earch user on the Linux client.
http://pam-mount.sourceforge.net or oldest files 
http://www.flyn.org/projects/pam_mount/.


Robert

Hi,

Is there a way to connect to the Windows user home directory share from a Samba 
client automatically?

At the moment I can manually connect to the share using mount -t smb using 
the usual hidden/protected credentials file. Obviously this needs editing every time my 
domain password changes (as enforced by policy).

However, since getting the workstation to authenticate me from the domain 
controllers (i.e. via Samba), manually mounting my home directory (with an 
independent password setting) seems very cumbersome.

It's also complicates the scenario of multiple users using one workstation.

Ideally one could log into the Samba workstation with their domain credentials 
and their UNIX home directory be connected to the Windows home directory.

Has anyone found a slick way of doing this? Or at least any way of improving 
the situation.

(NT4 domain, Fedora Core 5 workstation, GNOME desktop).

Thanks,

Leon...

-
Email sent from www.ntlworld.com
Virus-checked using McAfee(R) Software 
Visit www.ntlworld.com/security for more information


  


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


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

2006-09-09 Thread tridge
Author: tridge
Date: 2006-09-09 06:22:57 + (Sat, 09 Sep 2006)
New Revision: 18288

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

Log:

autoconf already has a C99 test builtin!

If this works well, we can remove our own test

Modified:
   branches/SAMBA_4_0/source/lib/replace/libreplace.m4


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/libreplace.m4
===
--- branches/SAMBA_4_0/source/lib/replace/libreplace.m4 2006-09-09 03:45:04 UTC 
(rev 18287)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace.m4 2006-09-09 06:22:57 UTC 
(rev 18288)
@@ -15,6 +15,7 @@
 AC_ISC_POSIX
 AC_USE_SYSTEM_EXTENSIONS
 AC_C_INLINE
+AC_PROG_CC_C99
 AC_PROG_CC
 AC_PROG_INSTALL
 



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

2006-09-09 Thread tridge
Author: tridge
Date: 2006-09-09 06:24:13 + (Sat, 09 Sep 2006)
New Revision: 18289

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

Log:

don't check for inline till we've worked out the main compiler flags

Modified:
   branches/SAMBA_4_0/source/lib/replace/libreplace.m4


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/libreplace.m4
===
--- branches/SAMBA_4_0/source/lib/replace/libreplace.m4 2006-09-09 06:22:57 UTC 
(rev 18288)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace.m4 2006-09-09 06:24:13 UTC 
(rev 18289)
@@ -14,9 +14,9 @@
 dnl needed before AC_TRY_COMPILE
 AC_ISC_POSIX
 AC_USE_SYSTEM_EXTENSIONS
-AC_C_INLINE
 AC_PROG_CC_C99
 AC_PROG_CC
+AC_C_INLINE
 AC_PROG_INSTALL
 
 AH_VERBATIM([_XOPEN_SOURCE_EXTENDED],



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

2006-09-09 Thread tridge
Author: tridge
Date: 2006-09-09 07:51:30 + (Sat, 09 Sep 2006)
New Revision: 18290

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

Log:

finally worked out why we were failing tests on solaris. It has
kerberos on port 750 in /etc/services! Work around this by using
127.0.0.1:88 in the krb5.conf

Modified:
   branches/SAMBA_4_0/source/script/tests/mktestsetup.sh


Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/mktestsetup.sh
===
--- branches/SAMBA_4_0/source/script/tests/mktestsetup.sh   2006-09-09 
06:24:13 UTC (rev 18289)
+++ branches/SAMBA_4_0/source/script/tests/mktestsetup.sh   2006-09-09 
07:51:30 UTC (rev 18290)
@@ -199,8 +199,8 @@
 
 [realms]
  SAMBA.EXAMPLE.COM = {
-  kdc = 127.0.0.1
-  admin_server = 127.0.0.1
+  kdc = 127.0.0.1:88
+  admin_server = 127.0.0.1:88
   default_domain = samba.example.com
  }
 [domain_realm]



svn commit: samba r18291 - in branches/SAMBA_4_0/source/build/smb_build: .

2006-09-09 Thread metze
Author: metze
Date: 2006-09-09 08:17:48 + (Sat, 09 Sep 2006)
New Revision: 18291

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

Log:
don't add ./ for files in the top dir '.'

metze
Modified:
   branches/SAMBA_4_0/source/build/smb_build/output.pm


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/output.pm
===
--- branches/SAMBA_4_0/source/build/smb_build/output.pm 2006-09-09 07:51:30 UTC 
(rev 18290)
+++ branches/SAMBA_4_0/source/build/smb_build/output.pm 2006-09-09 08:17:48 UTC 
(rev 18291)
@@ -12,12 +12,16 @@
 {
my ($dir,$files) = @_;
my @ret = ();
+   my $dirsep = /;
 
+   $dir =~ s/^\.$//g;
$dir =~ s/^\.\///g;
+
+   $dirsep =  if ($dir eq );

foreach (@$files) {
if (substr($_, 0, 1) ne \$) {
-   $_ = $dir/$_;
+   $_ = $dir$dirsep$_;
s/([^\/\.]+)\/\.\.\///g;
s/([^\/\.]+)\/\.\.\///g;
}



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

2006-09-09 Thread metze
Author: metze
Date: 2006-09-09 08:34:48 + (Sat, 09 Sep 2006)
New Revision: 18292

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

Log:
import some autoconf 2.60 specific macros,
so that older autoconf versions still work

metze
Added:
   branches/SAMBA_4_0/source/lib/replace/autoconf-2.60.m4
Modified:
   branches/SAMBA_4_0/source/lib/replace/libreplace_macros.m4


Changeset:
Added: branches/SAMBA_4_0/source/lib/replace/autoconf-2.60.m4
===
--- branches/SAMBA_4_0/source/lib/replace/autoconf-2.60.m4  2006-09-09 
08:17:48 UTC (rev 18291)
+++ branches/SAMBA_4_0/source/lib/replace/autoconf-2.60.m4  2006-09-09 
08:34:48 UTC (rev 18292)
@@ -0,0 +1,197 @@
+# _AC_C_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST,
+#  ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE)
+# --
+# Check whether the C compiler accepts features of STANDARD (e.g `c89', `c99')
+# by trying to compile a program of TEST-PROLOGUE and TEST-BODY.  If this 
fails,
+# try again with each compiler option in the space-separated OPTION-LIST; if 
one
+# helps, append it to CC.  If eventually successful, run ACTION-IF-AVAILABLE,
+# else ACTION-IF-UNAVAILABLE.
+AC_DEFUN([_AC_C_STD_TRY],
+[AC_MSG_CHECKING([for $CC option to accept ISO ]m4_translit($1, [c], [C]))
+AC_CACHE_VAL(ac_cv_prog_cc_$1,
+[ac_cv_prog_cc_$1=no
+ac_save_CC=$CC
+AC_LANG_CONFTEST([AC_LANG_PROGRAM([$2], [$3])])
+for ac_arg in '' $4
+do
+  CC=$ac_save_CC $ac_arg
+  _AC_COMPILE_IFELSE([], [ac_cv_prog_cc_$1=$ac_arg])
+  test x$ac_cv_prog_cc_$1 != xno  break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+])# AC_CACHE_VAL
+case x$ac_cv_prog_cc_$1 in
+  x)
+AC_MSG_RESULT([none needed]) ;;
+  xno)
+AC_MSG_RESULT([unsupported]) ;;
+  *)
+CC=$CC $ac_cv_prog_cc_$1
+AC_MSG_RESULT([$ac_cv_prog_cc_$1]) ;;
+esac
+AS_IF([test x$ac_cv_prog_cc_$1 != xno], [$5], [$6])
+])# _AC_C_STD_TRY
+
+# _AC_PROG_CC_C99 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE])
+# 
+# If the C compiler is not in ISO C99 mode by default, try to add an
+# option to output variable CC to make it so.  This macro tries
+# various options that select ISO C99 on some system or another.  It
+# considers the compiler to be in ISO C99 mode if it handles mixed
+# code and declarations, _Bool, inline and restrict.
+AC_DEFUN([_AC_PROG_CC_C99],
+[_AC_C_STD_TRY([c99],
+[[#include stdarg.h
+#include stdbool.h
+#include stdlib.h
+#include wchar.h
+#include stdio.h
+
+struct incomplete_array
+{
+  int datasize;
+  double data[];
+};
+
+struct named_init {
+  int number;
+  const wchar_t *name;
+  double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict(ccp restrict text)
+{
+  // See if C++-style comments work.
+  // Iterate through items via the restricted pointer.
+  // Also check for declarations in for loops.
+  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+continue;
+  return 0;
+}
+
+// Check varargs and va_copy work.
+static void
+test_varargs(const char *format, ...)
+{
+  va_list args;
+  va_start(args, format);
+  va_list args_copy;
+  va_copy(args_copy, args);
+
+  const char *str;
+  int number;
+  float fnumber;
+
+  while (*format)
+{
+  switch (*format++)
+   {
+   case 's': // string
+ str = va_arg(args_copy, const char *);
+ break;
+   case 'd': // int
+ number = va_arg(args_copy, int);
+ break;
+   case 'f': // float
+ fnumber = (float) va_arg(args_copy, double);
+ break;
+   default:
+ break;
+   }
+}
+  va_end(args_copy);
+  va_end(args);
+}
+]],
+[[
+  // Check bool and long long datatypes.
+  _Bool success = false;
+  long long int bignum = -1234567890LL;
+  unsigned long long int ubignum = 1234567890uLL;
+
+  // Check restrict.
+  if (test_restrict(String literal) != 0)
+success = true;
+  char *restrict newvar = Another string;
+
+  // Check varargs.
+  test_varargs(s, d' f ., string, 65, 34.234);
+
+  // Check incomplete arrays work.
+  struct incomplete_array *ia =
+malloc(sizeof(struct incomplete_array) + (sizeof(double) * 10));
+  ia-datasize = 10;
+  for (int i = 0; i  ia-datasize; ++i)
+ia-data[i] = (double) i * 1.234;
+
+  // Check named initialisers.
+  struct named_init ni = {
+.number = 34,
+.name = LTest wide string,
+.average = 543.34343,
+  };
+
+  ni.number = 58;
+
+  int dynamic_array[ni.number];
+  dynamic_array[43] = 543;
+
+  // work around unused variable warnings
+  return  bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x';
+]],
+dnl Try
+dnl GCC-std=gnu99 (unused restrictive modes: -std=c99 
-std=iso9899:1999)
+dnl AIX-qlanglvl=extc99 (unused restrictive mode: 
-qlanglvl=stdc99)
+dnl Intel ICC  -c99
+dnl IRIX   -c99
+dnl Solaris(unused because it 

svn commit: samba r18293 - in branches/SAMBA_4_0/source/build/smb_build: .

2006-09-09 Thread metze
Author: metze
Date: 2006-09-09 08:46:25 + (Sat, 09 Sep 2006)
New Revision: 18293

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

Log:
use the correct name it's not always under $srcdir...

metze
Modified:
   branches/SAMBA_4_0/source/build/smb_build/config_mk.pm


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/config_mk.pm
===
--- branches/SAMBA_4_0/source/build/smb_build/config_mk.pm  2006-09-09 
08:34:48 UTC (rev 18292)
+++ branches/SAMBA_4_0/source/build/smb_build/config_mk.pm  2006-09-09 
08:46:25 UTC (rev 18293)
@@ -201,7 +201,7 @@
next;
}
 
-   die($srcdir./.$filename:$linenum: Bad line while parsing 
$srcdir./.$filename);
+   die($parsing_file:$linenum: Bad line while parsing 
$parsing_file);
}
 
foreach my $section (keys %{$result}) {
@@ -209,19 +209,19 @@
 
my $sectype = $section_types-{$type};
if (not defined($sectype)) {
-   die($srcdir./.$filename.:[.$section.] unknown 
section type \.$type.\!);
+   die($parsing_file.:[.$section.] unknown section type 
\.$type.\!);
}
 
$input-{$name}{NAME} = $name;
$input-{$name}{TYPE} = $type;
-   $input-{$name}{MK_FILE} = $srcdir./.$filename;
+   $input-{$name}{MK_FILE} = $parsing_file;
$input-{$name}{BASEDIR} = dirname($filename);
 
foreach my $key (values %{$result-{$section}}) {
$key-{VAL} = smb_build::input::strtrim($key-{VAL});
my $vartype = $sectype-{$key-{KEY}};
if (not defined($vartype)) {
-   die($srcdir./.$filename.:[.$section.]: 
unknown attribute type \$key-{KEY}\!);
+   die($parsing_file.:[.$section.]: unknown 
attribute type \$key-{KEY}\!);
}
if ($vartype eq string) {
$input-{$name}{$key-{KEY}} = $key-{VAL};



svn commit: samba r18294 - in branches/SAMBA_4_0/source/build/smb_build: .

2006-09-09 Thread metze
Author: metze
Date: 2006-09-09 09:05:39 + (Sat, 09 Sep 2006)
New Revision: 18294

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

Log:
remove leading ././ from .mk files

metze
Modified:
   branches/SAMBA_4_0/source/build/smb_build/config_mk.pm


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/config_mk.pm
===
--- branches/SAMBA_4_0/source/build/smb_build/config_mk.pm  2006-09-09 
08:46:25 UTC (rev 18293)
+++ branches/SAMBA_4_0/source/build/smb_build/config_mk.pm  2006-09-09 
09:05:39 UTC (rev 18294)
@@ -130,17 +130,32 @@
my $section = GLOBAL;
my $makefile = ;
 
-   my $parsing_file = $builddir./.$filename;
+   my $parsing_file = $filename;
+   my $retry_parsing_file = undef;
 
$ENV{samba_builddir} = $builddir;
$ENV{samba_srcdir} = $srcdir;
-   
-   if (!open(CONFIG_MK, $parsing_file)) { 
-   $parsing_file = $srcdir./.$filename;
-   open(CONFIG_MK, $parsing_file) or 
-   die(Can't open neither `$builddir./.$filename' nor 
`$srcdir/$filename'\n);
+
+   if (($srcdir ne .) or ($builddir ne .)) {
+   $parsing_file = $builddir./.$filename;
+   $retry_parsing_file = $srcdir./.$filename;
}
-   
+
+   if (open(CONFIG_MK, $parsing_file)) {
+   $retry_parsing_file = undef;
+   } else {
+   die(Can't open $parsing_file) unless 
defined($retry_parsing_file);
+   }
+
+   if (defined($retry_parsing_file)) {
+   if (open(CONFIG_MK, $parsing_file)) {
+   $parsing_file = $retry_parsing_file;
+   $retry_parsing_file = undef;
+   } else {
+   die(Can't open neither '$parsing_file' nor 
'$retry_parsing_file'\n);
+   }
+   }
+
push (@parsed_files, $parsing_file);


@@ -173,7 +188,12 @@
 
# include
if ($line =~ /^include (.*)$/) {
-   $makefile .= run_config_mk($input, $srcdir, $builddir, 
dirname($filename)./$1);
+   my $subfile= $1;
+   my $subdir = dirname($filename);
+   $subdir =~ s/^\.$//g;
+   $subdir =~ s/^\.\///g;
+   $subdir .= / if ($subdir ne );
+   $makefile .= run_config_mk($input, $srcdir, $builddir, 
$subdir.$subfile);
next;
}
 



svn commit: samba r18295 - in branches/SAMBA_4_0/source/auth/gensec: .

2006-09-09 Thread tridge
Author: tridge
Date: 2006-09-09 09:06:20 + (Sat, 09 Sep 2006)
New Revision: 18295

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

Log:

pass write type for packet_size

this fixes a crash on IA_64 systems

Modified:
   branches/SAMBA_4_0/source/auth/gensec/socket.c


Changeset:
Modified: branches/SAMBA_4_0/source/auth/gensec/socket.c
===
--- branches/SAMBA_4_0/source/auth/gensec/socket.c  2006-09-09 09:05:39 UTC 
(rev 18294)
+++ branches/SAMBA_4_0/source/auth/gensec/socket.c  2006-09-09 09:06:20 UTC 
(rev 18295)
@@ -295,7 +295,7 @@
DATA_BLOB unwrapped;
NTSTATUS nt_status;
TALLOC_CTX *mem_ctx;
-   uint32_t packet_size;
+   size_t packet_size;
 
mem_ctx = talloc_new(gensec_socket);
if (!mem_ctx) {



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

2006-09-09 Thread metze
Author: metze
Date: 2006-09-09 09:08:29 + (Sat, 09 Sep 2006)
New Revision: 18296

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

Log:
this isn't needed anymore

metze
Modified:
   branches/SAMBA_4_0/source/script/cflags.pl


Changeset:
Modified: branches/SAMBA_4_0/source/script/cflags.pl
===
--- branches/SAMBA_4_0/source/script/cflags.pl  2006-09-09 09:06:20 UTC (rev 
18295)
+++ branches/SAMBA_4_0/source/script/cflags.pl  2006-09-09 09:08:29 UTC (rev 
18296)
@@ -7,15 +7,13 @@
 use strict;
 
 my $target = shift;
-my $target2 = ./$target;
 
 sub check_flags($)
 {
-my ($name)[EMAIL PROTECTED];
+   my ($name)[EMAIL PROTECTED];
open (IN, extra_cflags.txt);
-while (IN =~ /^([^:]+): (.*)$/) {
-   next unless (grep(/^$target$/, (split / /, $1)) ||
-grep(/^$target2$/, (split / /, $1)));
+   while (IN =~ /^([^:]+): (.*)$/) {
+   next unless (grep(/^$target$/, (split / /, $1)));
$_ = $2;
s/^CFLAGS\+=//;
print $_ ;



svn commit: samba r18297 - in branches/SAMBA_4_0/source: .

2006-09-09 Thread metze
Author: metze
Date: 2006-09-09 09:16:53 + (Sat, 09 Sep 2006)
New Revision: 18297

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

Log:
- remove leading ./
- add CFLAGS to the dynconfig-devel.o rule

metze
Modified:
   branches/SAMBA_4_0/source/dynconfig.mk


Changeset:
Modified: branches/SAMBA_4_0/source/dynconfig.mk
===
--- branches/SAMBA_4_0/source/dynconfig.mk  2006-09-09 09:08:29 UTC (rev 
18296)
+++ branches/SAMBA_4_0/source/dynconfig.mk  2006-09-09 09:16:53 UTC (rev 
18297)
@@ -12,7 +12,7 @@
 -DMODULESDIR=\$(MODULESDIR)\ -DJSDIR=\$(JSDIR)\ \
 -DSETUPDIR=\$(SETUPDIR)\ 
-DWINBINDD_SOCKET_DIR=\$(WINBINDD_SOCKET_DIR)\
 
-./dynconfig.o: dynconfig.c Makefile
+dynconfig.o: dynconfig.c Makefile
@echo Compiling $
@$(CC) `$(PERL) $(srcdir)/script/cflags.pl [EMAIL PROTECTED] $(CFLAGS) 
$(PICFLAG) $(PATH_FLAGS) -c $ -o $@
 
@@ -30,6 +30,6 @@
 -DSETUPDIR=\$(srcdir)/setup\ \
 -DWINBINDD_SOCKET_DIR=\$(WINBINDD_SOCKET_DIR)\
 
-./dynconfig-devel.o: dynconfig.c Makefile
+dynconfig-devel.o: dynconfig.c Makefile
@echo Compiling $
-   @$(CC) $(CFLAGS) $(PICFLAG) $(DEVEL_PATH_FLAGS) -c $ -o $@
+   @$(CC) `$(PERL) $(srcdir)/script/cflags.pl [EMAIL PROTECTED] $(CFLAGS) 
$(PICFLAG) $(DEVEL_PATH_FLAGS) -c $ -o $@



svn commit: samba r18298 - in branches/SAMBA_4_0/source/lib/registry: .

2006-09-09 Thread tridge
Author: tridge
Date: 2006-09-09 09:20:26 + (Sat, 09 Sep 2006)
New Revision: 18298

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

Log:

fixed mmap failure test

Modified:
   branches/SAMBA_4_0/source/lib/registry/reg_backend_w95.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/registry/reg_backend_w95.c
===
--- branches/SAMBA_4_0/source/lib/registry/reg_backend_w95.c2006-09-09 
09:16:53 UTC (rev 18297)
+++ branches/SAMBA_4_0/source/lib/registry/reg_backend_w95.c2006-09-09 
09:20:26 UTC (rev 18298)
@@ -204,7 +204,7 @@
 
 creg-base = mmap(0, creg-sbuf.st_size, PROT_READ, MAP_SHARED, creg-fd, 
0);

   
-if ((int)creg-base == 1) {
+if (creg-base == (void *)-1) {
DEBUG(0,(Could not mmap file: %s, %s\n, h-location, 
strerror(errno)));
 return WERR_FOOBAR;
 }



svn commit: samba r18299 - in branches/SAMBA_4_0/source/lib/cmdline: .

2006-09-09 Thread tridge
Author: tridge
Date: 2006-09-09 10:00:35 + (Sat, 09 Sep 2006)
New Revision: 18299

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

Log:

POPT_CREDENTIALS should depend on LIBPOPT

Modified:
   branches/SAMBA_4_0/source/lib/cmdline/config.mk


Changeset:
Modified: branches/SAMBA_4_0/source/lib/cmdline/config.mk
===
--- branches/SAMBA_4_0/source/lib/cmdline/config.mk 2006-09-09 09:20:26 UTC 
(rev 18298)
+++ branches/SAMBA_4_0/source/lib/cmdline/config.mk 2006-09-09 10:00:35 UTC 
(rev 18299)
@@ -11,4 +11,5 @@
 [SUBSYSTEM::POPT_CREDENTIALS]
 PRIVATE_PROTO_HEADER = popt_credentials.h
 OBJ_FILES = popt_credentials.o
-PUBLIC_DEPENDENCIES = CREDENTIALS LIBCMDLINE_CREDENTIALS 
+PUBLIC_DEPENDENCIES = CREDENTIALS LIBCMDLINE_CREDENTIALS LIBPOPT
+



svn commit: samba r18300 - in branches/SAMBA_4_0/source/heimdal/lib/gssapi: .

2006-09-09 Thread tridge
Author: tridge
Date: 2006-09-09 10:01:17 + (Sat, 09 Sep 2006)
New Revision: 18300

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

Log:

fixed a type bug in heimdal - lha, you happy with this upstream? It
showed up on ia_64 systems

Modified:
   branches/SAMBA_4_0/source/heimdal/lib/gssapi/cfx.c


Changeset:
Modified: branches/SAMBA_4_0/source/heimdal/lib/gssapi/cfx.c
===
--- branches/SAMBA_4_0/source/heimdal/lib/gssapi/cfx.c  2006-09-09 10:00:35 UTC 
(rev 18299)
+++ branches/SAMBA_4_0/source/heimdal/lib/gssapi/cfx.c  2006-09-09 10:01:17 UTC 
(rev 18300)
@@ -199,7 +199,7 @@
 size_t wrapped_len, cksumsize;
 uint16_t padlength, rrc = 0;
 int32_t seq_number;
-OM_uint32 padsize;
+uint16_t padsize;
 u_char *p;
 
 ret = krb5_crypto_init(gssapi_krb5_context, key, 0, crypto);



svn commit: samba r18301 - in branches/SAMBA_4_0/source: auth/gensec dsdb/samdb/ldb_modules ldap_server lib/appweb/mpr lib/ldb/modules lib/tdb/common lib/tls libcli/raw libcli/smb2 libcli/wrepl librpc

2006-09-09 Thread tridge
Author: tridge
Date: 2006-09-09 10:05:58 + (Sat, 09 Sep 2006)
New Revision: 18301

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

Log:

I discovered how to load the warnings from a build farm build into
emacs compile mode (hint, paste to a file, and compile as cat
filename).

This allowed me to fix nearly all the warnings for a IA_64 SuSE build
very quickly.

Modified:
   branches/SAMBA_4_0/source/auth/gensec/gensec_gssapi.c
   branches/SAMBA_4_0/source/auth/gensec/socket.c
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/rootdse.c
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/schema.c
   branches/SAMBA_4_0/source/ldap_server/ldap_backend.c
   branches/SAMBA_4_0/source/ldap_server/ldap_bind.c
   branches/SAMBA_4_0/source/lib/appweb/mpr/var.c
   branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map_outbound.c
   branches/SAMBA_4_0/source/lib/ldb/modules/operational.c
   branches/SAMBA_4_0/source/lib/tdb/common/io.c
   branches/SAMBA_4_0/source/lib/tdb/common/lock.c
   branches/SAMBA_4_0/source/lib/tls/tls.c
   branches/SAMBA_4_0/source/libcli/raw/rawfile.c
   branches/SAMBA_4_0/source/libcli/smb2/smb2.h
   branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c
   branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c
   branches/SAMBA_4_0/source/librpc/ndr/ndr_spoolss_buf.c
   branches/SAMBA_4_0/source/ntvfs/nbench/vfs_nbench.c
   branches/SAMBA_4_0/source/smb_server/smb/receive.c
   branches/SAMBA_4_0/source/smb_server/smb2/smb2_server.h
   branches/SAMBA_4_0/source/torture/basic/base.c
   branches/SAMBA_4_0/source/torture/raw/acls.c
   branches/SAMBA_4_0/source/torture/raw/qfileinfo.c
   branches/SAMBA_4_0/source/torture/raw/read.c
   branches/SAMBA_4_0/source/torture/smb2/util.c
   branches/SAMBA_4_0/source/wrepl_server/wrepl_in_connection.c
   branches/SAMBA_4_0/source/wrepl_server/wrepl_scavenging.c
   branches/SAMBA_4_0/source/wrepl_server/wrepl_server.c


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


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

2006-09-09 Thread tridge
Author: tridge
Date: 2006-09-09 10:22:47 + (Sat, 09 Sep 2006)
New Revision: 18302

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

Log:

fixed test_cifsdd.sh - the unnecessary sum operations were breaking on
solaris

Modified:
   branches/SAMBA_4_0/source/script/tests/test_cifsdd.sh


Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/test_cifsdd.sh
===
--- branches/SAMBA_4_0/source/script/tests/test_cifsdd.sh   2006-09-09 
10:05:58 UTC (rev 18301)
+++ branches/SAMBA_4_0/source/script/tests/test_cifsdd.sh   2006-09-09 
10:22:47 UTC (rev 18302)
@@ -34,13 +34,7 @@
 }
 
 compare() {
-   if [ -r $1 -a -r $2 ] ; then
-   sum1=`sum $1`
-   sum2=`sum $2`
-   test $sum1 = $sum2
-   else
-   false
-   fi
+cmp $1 $2
 }
 
 incdir=`dirname $0`



svn commit: samba r18303 - in branches/SAMBA_4_0/source/lib/popt: .

2006-09-09 Thread metze
Author: metze
Date: 2006-09-09 10:24:42 + (Sat, 09 Sep 2006)
New Revision: 18303

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

Log:
we should just use -Ilib/popt as in all other places

metze
Modified:
   branches/SAMBA_4_0/source/lib/popt/samba.m4


Changeset:
Modified: branches/SAMBA_4_0/source/lib/popt/samba.m4
===
--- branches/SAMBA_4_0/source/lib/popt/samba.m4 2006-09-09 10:22:47 UTC (rev 
18302)
+++ branches/SAMBA_4_0/source/lib/popt/samba.m4 2006-09-09 10:24:42 UTC (rev 
18303)
@@ -5,6 +5,6 @@
SMB_ENABLE(LIBPOPT,YES)
 else
SMB_SUBSYSTEM(LIBPOPT,
-   [lib/popt/findme.o lib/popt/popt.o lib/popt/poptconfig.o 
lib/popt/popthelp.o lib/popt/poptparse.o], [], [-I$srcdir/lib/popt])
+   [lib/popt/findme.o lib/popt/popt.o lib/popt/poptconfig.o 
lib/popt/popthelp.o lib/popt/poptparse.o], [], [-Ilib/popt])
 fi
 



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

2006-09-09 Thread tridge
Author: tridge
Date: 2006-09-09 10:29:13 + (Sat, 09 Sep 2006)
New Revision: 18304

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

Log:

fixed misuse of size_t in dopr()

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


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/snprintf.c
===
--- branches/SAMBA_4_0/source/lib/replace/snprintf.c2006-09-09 10:24:42 UTC 
(rev 18303)
+++ branches/SAMBA_4_0/source/lib/replace/snprintf.c2006-09-09 10:29:13 UTC 
(rev 18304)
@@ -224,7 +224,7 @@
int num;
 };
 
-static size_t dopr(char *buffer, size_t maxlen, const char *format, 
+static int dopr(char *buffer, size_t maxlen, const char *format, 
   va_list args_in);
 static void fmtstr(char *buffer, size_t *currlen, size_t maxlen,
char *value, int flags, int min, int max);
@@ -237,7 +237,7 @@
 static int add_cnk_list_entry(struct pr_chunk_x **list,
int max_num, struct pr_chunk *chunk);
 
-static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list 
args_in)
+static int dopr(char *buffer, size_t maxlen, const char *format, va_list 
args_in)
 {
char ch;
int state;
@@ -251,7 +251,7 @@
struct pr_chunk *cnk = NULL;
struct pr_chunk_x *clist = NULL;
int max_pos;
-   size_t ret = -1;
+   int ret = -1;
 
VA_COPY(args, args_in);
 



svn commit: samba r18305 - in branches/SAMBA_4_0/source/lib/popt: .

2006-09-09 Thread metze
Author: metze
Date: 2006-09-09 11:03:12 + (Sat, 09 Sep 2006)
New Revision: 18305

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

Log:
get some more debug output to fix the build on sambajail

metze
Modified:
   branches/SAMBA_4_0/source/lib/popt/samba.m4


Changeset:
Modified: branches/SAMBA_4_0/source/lib/popt/samba.m4
===
--- branches/SAMBA_4_0/source/lib/popt/samba.m4 2006-09-09 10:29:13 UTC (rev 
18304)
+++ branches/SAMBA_4_0/source/lib/popt/samba.m4 2006-09-09 11:03:12 UTC (rev 
18305)
@@ -1,9 +1,11 @@
 m4_include(lib/popt/libpopt.m4)
 
 if test x$POPTOBJ = x; then
+   echo LIBPOPT as SMB_EXT_LIB 
SMB_EXT_LIB(LIBPOPT, [${POPT_LIBS}])
SMB_ENABLE(LIBPOPT,YES)
 else
+   echo LIBPOPT as SMB_SUBSYSTEM 
SMB_SUBSYSTEM(LIBPOPT,
[lib/popt/findme.o lib/popt/popt.o lib/popt/poptconfig.o 
lib/popt/popthelp.o lib/popt/poptparse.o], [], [-Ilib/popt])
 fi



svn commit: samba r18306 - in branches/SAMBA_4_0/source/lib/popt: .

2006-09-09 Thread metze
Author: metze
Date: 2006-09-09 11:07:39 + (Sat, 09 Sep 2006)
New Revision: 18306

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

Log:
I hope that works better...

metze
Modified:
   branches/SAMBA_4_0/source/lib/popt/samba.m4


Changeset:
Modified: branches/SAMBA_4_0/source/lib/popt/samba.m4
===
--- branches/SAMBA_4_0/source/lib/popt/samba.m4 2006-09-09 11:03:12 UTC (rev 
18305)
+++ branches/SAMBA_4_0/source/lib/popt/samba.m4 2006-09-09 11:07:39 UTC (rev 
18306)
@@ -1,11 +1,11 @@
 m4_include(lib/popt/libpopt.m4)
 
 if test x$POPTOBJ = x; then
-   echo LIBPOPT as SMB_EXT_LIB 
+   echo LIBPOPT as EXT_LIB 
SMB_EXT_LIB(LIBPOPT, [${POPT_LIBS}])
SMB_ENABLE(LIBPOPT,YES)
 else
-   echo LIBPOPT as SMB_SUBSYSTEM 
+   echo LIBPOPT as SUBSYSTEM 
SMB_SUBSYSTEM(LIBPOPT,
[lib/popt/findme.o lib/popt/popt.o lib/popt/poptconfig.o 
lib/popt/popthelp.o lib/popt/poptparse.o], [], [-Ilib/popt])
 fi



svn commit: samba r18307 - in branches/SAMBA_4_0/source/torture/basic: .

2006-09-09 Thread tridge
Author: tridge
Date: 2006-09-09 11:46:38 + (Sat, 09 Sep 2006)
New Revision: 18307

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

Log:

fixed a warning

Modified:
   branches/SAMBA_4_0/source/torture/basic/base.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/basic/base.c
===
--- branches/SAMBA_4_0/source/torture/basic/base.c  2006-09-09 11:07:39 UTC 
(rev 18306)
+++ branches/SAMBA_4_0/source/torture/basic/base.c  2006-09-09 11:46:38 UTC 
(rev 18307)
@@ -766,7 +766,7 @@
return False;
}
 
-   printf(pid %u open %d\n, getpid(), i);
+   printf(pid %u open %d\n, (unsigned)getpid(), i);
 
sleep(10);
i++;



svn commit: samba r18308 - in branches/SAMBA_4_0/source/heimdal/lib/gssapi: .

2006-09-09 Thread tridge
Author: tridge
Date: 2006-09-09 12:51:32 + (Sat, 09 Sep 2006)
New Revision: 18308

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

Log:

get this right 

Modified:
   branches/SAMBA_4_0/source/heimdal/lib/gssapi/cfx.c


Changeset:
Modified: branches/SAMBA_4_0/source/heimdal/lib/gssapi/cfx.c
===
--- branches/SAMBA_4_0/source/heimdal/lib/gssapi/cfx.c  2006-09-09 11:46:38 UTC 
(rev 18307)
+++ branches/SAMBA_4_0/source/heimdal/lib/gssapi/cfx.c  2006-09-09 12:51:32 UTC 
(rev 18308)
@@ -199,7 +199,7 @@
 size_t wrapped_len, cksumsize;
 uint16_t padlength, rrc = 0;
 int32_t seq_number;
-uint16_t padsize;
+size_t padsize;
 u_char *p;
 
 ret = krb5_crypto_init(gssapi_krb5_context, key, 0, crypto);



svn commit: samba r18309 - in branches/SAMBA_4_0/source: lib/ldb/ldb_ildap libcli/ldap torture/ldap winbind

2006-09-09 Thread tridge
Author: tridge
Date: 2006-09-09 12:57:45 + (Sat, 09 Sep 2006)
New Revision: 18309

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

Log:

FreeBSD 6.1 has a symbol ldap_new_connection() in the system ldap
library. Even though we don't like to that library, it gets loaded via
nss-ldap, which means nss-ldap calls into the samba ldap lib with the
wrong parameters, and crashes.

We really need to use a completely different namespace in libcli/ldap/

Modified:
   branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c
   branches/SAMBA_4_0/source/libcli/ldap/ldap_client.c
   branches/SAMBA_4_0/source/torture/ldap/common.c
   branches/SAMBA_4_0/source/winbind/wb_init_domain.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-09-09 
12:51:32 UTC (rev 18308)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c 2006-09-09 
12:57:45 UTC (rev 18309)
@@ -755,7 +755,7 @@
 
ildb-ldb = ldb;
 
-   ildb-ldap = ldap_new_connection(ildb, ldb_get_opaque(ldb, 
EventContext));
+   ildb-ldap = ldap4_new_connection(ildb, ldb_get_opaque(ldb, 
EventContext));
if (!ildb-ldap) {
ldb_oom(ldb);
goto failed;

Modified: branches/SAMBA_4_0/source/libcli/ldap/ldap_client.c
===
--- branches/SAMBA_4_0/source/libcli/ldap/ldap_client.c 2006-09-09 12:51:32 UTC 
(rev 18308)
+++ branches/SAMBA_4_0/source/libcli/ldap/ldap_client.c 2006-09-09 12:57:45 UTC 
(rev 18309)
@@ -40,7 +40,7 @@
 /*
   create a new ldap_connection stucture. The event context is optional
 */
-struct ldap_connection *ldap_new_connection(TALLOC_CTX *mem_ctx, 
+struct ldap_connection *ldap4_new_connection(TALLOC_CTX *mem_ctx, 
struct event_context *ev)
 {
struct ldap_connection *conn;

Modified: branches/SAMBA_4_0/source/torture/ldap/common.c
===
--- branches/SAMBA_4_0/source/torture/ldap/common.c 2006-09-09 12:51:32 UTC 
(rev 18308)
+++ branches/SAMBA_4_0/source/torture/ldap/common.c 2006-09-09 12:57:45 UTC 
(rev 18309)
@@ -64,7 +64,7 @@
return NT_STATUS_INVALID_PARAMETER;
}
 
-   *conn = ldap_new_connection(mem_ctx, NULL);
+   *conn = ldap4_new_connection(mem_ctx, NULL);
 
status = ldap_connect(*conn, url);
if (!NT_STATUS_IS_OK(status)) {

Modified: branches/SAMBA_4_0/source/winbind/wb_init_domain.c
===
--- branches/SAMBA_4_0/source/winbind/wb_init_domain.c  2006-09-09 12:51:32 UTC 
(rev 18308)
+++ branches/SAMBA_4_0/source/winbind/wb_init_domain.c  2006-09-09 12:57:45 UTC 
(rev 18309)
@@ -293,7 +293,7 @@
}
 
state-domain-ldap_conn =
-   ldap_new_connection(state-domain, state-ctx-event_ctx);
+   ldap4_new_connection(state-domain, state-ctx-event_ctx);
composite_nomem(state-domain-ldap_conn, state-ctx);
 
ldap_url = talloc_asprintf(state, ldap://%s/;,



svn commit: samba r18310 - in branches/SAMBA_3_0/source: lib torture utils

2006-09-09 Thread vlendec
Author: vlendec
Date: 2006-09-09 21:05:51 + (Sat, 09 Sep 2006)
New Revision: 18310

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

Log:
Add a little test for some gencache routines
Remove unused gencache_set_only
Use CONST_DISCARD instead of SMB_STRDUP

Volker

Modified:
   branches/SAMBA_3_0/source/lib/gencache.c
   branches/SAMBA_3_0/source/torture/torture.c
   branches/SAMBA_3_0/source/utils/net_cache.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/gencache.c
===
--- branches/SAMBA_3_0/source/lib/gencache.c2006-09-09 12:57:45 UTC (rev 
18309)
+++ branches/SAMBA_3_0/source/lib/gencache.c2006-09-09 21:05:51 UTC (rev 
18310)
@@ -56,13 +56,13 @@
if (cache) return True;
 
asprintf(cache_fname, %s/%s, lp_lockdir(), gencache.tdb);
-   if (cache_fname)
-   DEBUG(5, (Opening cache file at %s\n, cache_fname));
-   else {
+   if (cache_fname == NULL) {
DEBUG(0, (Filename allocation failed.\n));
return False;
}
 
+   DEBUG(5, (Opening cache file at %s\n, cache_fname));
+
cache = tdb_open_log(cache_fname, 0, TDB_DEFAULT,
 O_RDWR|O_CREAT, 0644);
 
@@ -121,9 +121,9 @@
if (!valstr)
return False;
 
-   keybuf.dptr = SMB_STRDUP(keystr);
+   keybuf.dptr = CONST_DISCARD(char *, keystr);
keybuf.dsize = strlen(keystr)+1;
-   databuf.dptr = SMB_STRDUP(valstr);
+   databuf.dptr = valstr;
databuf.dsize = strlen(valstr)+1;
DEBUG(10, (Adding cache entry with key = %s; value = %s and timeout =
%s (%d seconds %s)\n, keybuf.dptr, value,ctime(timeout),
@@ -132,69 +132,11 @@
 
ret = tdb_store(cache, keybuf, databuf, 0);
SAFE_FREE(valstr);
-   SAFE_FREE(keybuf.dptr);
-   SAFE_FREE(databuf.dptr);

return ret == 0;
 }
 
-
 /**
- * Set existing entry to the cache file.
- *
- * @param keystr string that represents a key of this entry
- * @param valstr text representation value being cached
- * @param timeout time when the value is expired
- *
- * @retval true when entry is successfuly set
- * @retval false on failure
- **/
-
-BOOL gencache_set_only(const char *keystr, const char *valstr, time_t timeout)
-{
-   int ret = -1;
-   TDB_DATA keybuf, databuf;
-   char *old_valstr, *datastr;
-   time_t old_timeout;
-   
-   /* fail completely if get null pointers passed */
-   SMB_ASSERT(keystr  valstr);
-
-   if (!gencache_init()) return False;
-   
-   /* 
-* Check whether entry exists in the cache
-* Don't verify gencache_get exit code, since the entry may be expired
-*/ 
-   gencache_get(keystr, old_valstr, old_timeout);
-   
-   if (!(old_valstr  old_timeout)) return False;
-   
-   DEBUG(10, (Setting cache entry with key = %s; old value = %s and old 
timeout \
-  = %s\n, keystr, old_valstr, ctime(old_timeout)));
-
-   asprintf(datastr, CACHE_DATA_FMT, (int)timeout, valstr);
-   keybuf.dptr = SMB_STRDUP(keystr);
-   keybuf.dsize = strlen(keystr)+1;
-   databuf.dptr = SMB_STRDUP(datastr);
-   databuf.dsize = strlen(datastr)+1;
-   DEBUGADD(10, (New value = %s, new timeout = %s (%d seconds %s), 
valstr,
- ctime(timeout), (int)(timeout - time(NULL)),
- timeout  time(NULL) ? ahead : in the past));
-
-   
-   ret = tdb_store(cache, keybuf, databuf, TDB_REPLACE);
-
-   SAFE_FREE(datastr);
-   SAFE_FREE(old_valstr);
-   SAFE_FREE(keybuf.dptr);
-   SAFE_FREE(databuf.dptr);
-   
-   return ret == 0;
-}
- 
-
-/**
  * Delete one entry from the cache file.
  *
  * @param keystr string that represents a key of this entry
@@ -213,12 +155,11 @@
 
if (!gencache_init()) return False; 

-   keybuf.dptr = SMB_STRDUP(keystr);
+   keybuf.dptr = CONST_DISCARD(char *, keystr);
keybuf.dsize = strlen(keystr)+1;
DEBUG(10, (Deleting cache entry (key = %s)\n, keystr));
ret = tdb_delete(cache, keybuf);

-   SAFE_FREE(keybuf.dptr);
return ret == 0;
 }
 
@@ -247,10 +188,9 @@
return False;
}

-   keybuf.dptr = SMB_STRDUP(keystr);
+   keybuf.dptr = CONST_DISCARD(char *, keystr);
keybuf.dsize = strlen(keystr)+1;
databuf = tdb_fetch(cache, keybuf);
-   SAFE_FREE(keybuf.dptr);

if (databuf.dptr  databuf.dsize  TIMEOUT_LEN) {
char* entry_buf = SMB_STRNDUP(databuf.dptr, databuf.dsize);

Modified: branches/SAMBA_3_0/source/torture/torture.c
===
--- branches/SAMBA_3_0/source/torture/torture.c 2006-09-09 12:57:45 UTC (rev 
18309)
+++ 

svn commit: samba r18312 - in branches/SAMBA_3_0/source: lib libsmb

2006-09-09 Thread vlendec
Author: vlendec
Date: 2006-09-09 21:40:47 + (Sat, 09 Sep 2006)
New Revision: 18312

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

Log:
Change gencache_get slightly: Delete expired keys, and only strdup the value
if a valid entry was found. The newer calls got the latter one wrong, change
the older calls.

Volker

Modified:
   branches/SAMBA_3_0/source/lib/gencache.c
   branches/SAMBA_3_0/source/libsmb/namecache.c
   branches/SAMBA_3_0/source/libsmb/trustdom_cache.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/gencache.c
===
--- branches/SAMBA_3_0/source/lib/gencache.c2006-09-09 21:31:56 UTC (rev 
18311)
+++ branches/SAMBA_3_0/source/lib/gencache.c2006-09-09 21:40:47 UTC (rev 
18312)
@@ -212,6 +212,15 @@
   timeout = %s, t  time(NULL) ? valid :
   expired, keystr, endptr+1, ctime(t)));
 
+   if (t = time(NULL)) {
+
+   /* We're expired, delete the entry */
+   tdb_delete(cache, keybuf);
+
+   SAFE_FREE(databuf.dptr);
+   return False;
+   }
+
if (valstr) {
*valstr = SMB_STRDUP(endptr+1);
if (*valstr == NULL) {
@@ -227,7 +236,7 @@
*timeout = t;
}
 
-   return t  time(NULL);
+   return True;
 } 
 
 

Modified: branches/SAMBA_3_0/source/libsmb/namecache.c
===
--- branches/SAMBA_3_0/source/libsmb/namecache.c2006-09-09 21:31:56 UTC 
(rev 18311)
+++ branches/SAMBA_3_0/source/libsmb/namecache.c2006-09-09 21:40:47 UTC 
(rev 18312)
@@ -201,9 +201,7 @@
 
if (!gencache_get(key, value, timeout)) {
DEBUG(5, (no entry for %s#%02X found.\n, name, name_type));
-   gencache_del(key);
SAFE_FREE(key);
-   SAFE_FREE(value);
return False;
} else {
DEBUG(5, (name %s#%02X found.\n, name, name_type));
@@ -314,9 +312,7 @@
 
if (!gencache_get(key, value, timeout)) {
DEBUG(5, (namecache_status_fetch: no entry for %s found.\n, 
key));
-   gencache_del(key);
SAFE_FREE(key);
-   SAFE_FREE(value);
return False;
} else {
DEBUG(5, (namecache_status_fetch: key %s - %s\n, key, value 
));

Modified: branches/SAMBA_3_0/source/libsmb/trustdom_cache.c
===
--- branches/SAMBA_3_0/source/libsmb/trustdom_cache.c   2006-09-09 21:31:56 UTC 
(rev 18311)
+++ branches/SAMBA_3_0/source/libsmb/trustdom_cache.c   2006-09-09 21:40:47 UTC 
(rev 18312)
@@ -183,7 +183,6 @@
if (!gencache_get(key, value, timeout)) {
DEBUG(5, (no entry for trusted domain %s found.\n, name));
SAFE_FREE(key);
-   SAFE_FREE(value);
return False;
} else {
SAFE_FREE(key);



svn commit: samba r18313 - in branches/SAMBA_3_0/source: lib passdb utils

2006-09-09 Thread vlendec
Author: vlendec
Date: 2006-09-09 22:27:06 + (Sat, 09 Sep 2006)
New Revision: 18313

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

Log:
Nobody said no (yet gd?), so commit it:

Remove the account_policy_migrated() thingy, and make cache_account_policy_set
use gencache. Account policies are now handled like groups and users are with
respect to passdb backend.

Volker

Modified:
   branches/SAMBA_3_0/source/lib/account_pol.c
   branches/SAMBA_3_0/source/passdb/pdb_ldap.c
   branches/SAMBA_3_0/source/utils/pdbedit.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/account_pol.c
===
--- branches/SAMBA_3_0/source/lib/account_pol.c 2006-09-09 21:40:47 UTC (rev 
18312)
+++ branches/SAMBA_3_0/source/lib/account_pol.c 2006-09-09 22:27:06 UTC (rev 
18313)
@@ -28,7 +28,6 @@
  * ldap directly) - gd */
 
 #define DATABASE_VERSION   3
-#define AP_LASTSET LAST_CACHE_UPDATE
 #define AP_TTL 60
 
 
@@ -169,50 +168,6 @@
 }
 
 /*
-Update LAST-Set counter inside the cache
-*/
-
-static BOOL account_policy_cache_timestamp(uint32 *value, BOOL update, 
-  const char *ap_name)
-{
-   pstring key;
-   uint32 val = 0;
-   time_t now;
-
-   if (ap_name == NULL)
-   return False;
-   
-   slprintf(key, sizeof(key)-1, %s/%s, ap_name, AP_LASTSET);
-
-   if (!init_account_policy()) {
-   return False;
-   }
-
-   if (!tdb_fetch_uint32(tdb, key, val)  !update) {
-   DEBUG(10,(failed to get last set timestamp of cache\n));
-   return False;
-   }
-
-   *value = val;
-
-   DEBUG(10, (account policy cache lastset was: %s\n, 
http_timestring(val)));
-
-   if (update) {
-
-   now = time(NULL);
-
-   if (!tdb_store_uint32(tdb, key, (uint32)now)) {
-   DEBUG(1, (tdb_store_uint32 failed for %s\n, key));
-   return False;
-   }
-   DEBUG(10, (account policy cache lastset now: %s\n, 
http_timestring(now)));
-   *value = now;
-   }
-
-   return True;
-}
-
-/*
 Get default value for account policy
 */
 
@@ -269,11 +224,6 @@
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 */
@@ -319,7 +269,7 @@
 
 BOOL account_policy_get(int field, uint32 *value)
 {
-   fstring name;
+   const char *name;
uint32 regval;
 
if (!init_account_policy()) {
@@ -330,8 +280,8 @@
*value = 0;
}
 
-   fstrcpy(name, decode_account_policy_name(field));
-   if (!*name) {
+   name = decode_account_policy_name(field);
+   if (name == NULL) {
DEBUG(1, (account_policy_get: Field %d is not a valid account 
policy type!  Cannot get, returning 0.\n, field));
return False;
}
@@ -356,14 +306,14 @@
 
 BOOL account_policy_set(int field, uint32 value)
 {
-   fstring name;
+   const char *name;
 
if (!init_account_policy()) {
return False;
}
 
-   fstrcpy(name, decode_account_policy_name(field));
-   if (!*name) {
+   name = decode_account_policy_name(field);
+   if (name == NULL) {
DEBUG(1, (Field %d is not a valid account policy type!  Cannot 
set.\n, field));
return False;
}
@@ -384,8 +334,10 @@
 
 BOOL cache_account_policy_set(int field, uint32 value)
 {
-   uint32 lastset;
const char *policy_name = NULL;
+   char *cache_key = NULL;
+   char *cache_value = NULL;
+   BOOL ret = False;
 
policy_name = decode_account_policy_name(field);
if (policy_name == NULL) {
@@ -393,95 +345,60 @@
return False;
}
 
-   DEBUG(10,(cache_account_policy_set: updating account pol cache\n));
-
-   if (!account_policy_set(field, value)) {
-   return False;
+   if (asprintf(cache_key, ACCT_POL/%s, policy_name)  0) {
+   DEBUG(0, (asprintf failed\n));
+   goto done;
}
 
-   if (!account_policy_cache_timestamp(lastset, True, policy_name)) 
-   {
-   

svn commit: samba r18314 - in branches/SAMBA_4_0/source/ntvfs/posix: .

2006-09-09 Thread idra
Author: idra
Date: 2006-09-09 23:50:44 + (Sat, 09 Sep 2006)
New Revision: 18314

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

Log:

Handle the case where a dir has the sticky bit set and the OS gives back
EPERM when trying to access user xattrs. Just pretend no attributes are set.

Simo.


Modified:
   branches/SAMBA_4_0/source/ntvfs/posix/xattr_system.c


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/posix/xattr_system.c
===
--- branches/SAMBA_4_0/source/ntvfs/posix/xattr_system.c2006-09-09 
22:27:06 UTC (rev 18313)
+++ branches/SAMBA_4_0/source/ntvfs/posix/xattr_system.c2006-09-09 
23:50:44 UTC (rev 18314)
@@ -58,7 +58,31 @@
blob-length = estimated_size;
goto again;
}
+   if (ret == -1  errno == EPERM) {
+   struct stat statbuf;
 
+   if (fd != -1) {
+   ret = fstat(fd, statbuf);
+   } else {
+   ret = stat(fname, statbuf);
+   }
+   if (ret == 0) {
+   /* check if this is a directory and the sticky bit is 
set */
+   if (S_ISDIR(statbuf.st_mode)  (statbuf.st_mode  
S_ISVTX)) {
+   /* pretend we could not find the xattr */
+
+   data_blob_free(blob);
+   return NT_STATUS_NOT_FOUND;
+
+   } else {
+   /* if not this was probably a legittimate error
+* reset ret and errno to the correct values */
+   errno = EPERM;
+   ret = -1;
+   }
+   }
+   }
+
if (ret == -1) {
data_blob_free(blob);
return pvfs_map_errno(pvfs, errno);



Build status as of Sun Sep 10 00:00:02 2006

2006-09-09 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2006-09-09 
00:00:21.0 +
+++ /home/build/master/cache/broken_results.txt 2006-09-10 00:00:26.0 
+
@@ -1,4 +1,4 @@
-Build status as of Sat Sep  9 00:00:02 2006
+Build status as of Sun Sep 10 00:00:02 2006
 
 Build counts:
 Tree Total  Broken Panic 
@@ -6,16 +6,16 @@
 build_farm   0  0  0 
 ccache   42 9  0 
 distcc   42 7  0 
-ldb  38 8  0 
-libreplace   37 3  0 
-lorikeet-heimdal 3  1  0 
+ldb  39 9  0 
+libreplace   37 4  0 
+lorikeet-heimdal 4  1  0 
 ppp  19 0  0 
 rsync40 5  0 
 samba1  0  0 
 samba-docs   0  0  0 
-samba4   44 25 7 
-samba_3_043 17 0 
-smb-build30 3  0 
-talloc   42 4  0 
-tdb  39 7  0 
+samba4   46 23 6 
+samba_3_043 14 0 
+smb-build31 4  0 
+talloc   42 5  0 
+tdb  40 7  0 
 


svn commit: samba r18315 - in branches/SAMBA_4_0/source: librpc/idl rpc_server/common rpc_server/srvsvc

2006-09-09 Thread idra
Author: idra
Date: 2006-09-10 00:41:15 + (Sun, 10 Sep 2006)
New Revision: 18315

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

Log:

Implement netSrvGetInfo level 102
fix names to be consistent between level 101 and 102 and typo in idl


Modified:
   branches/SAMBA_4_0/source/librpc/idl/srvsvc.idl
   branches/SAMBA_4_0/source/rpc_server/common/server_info.c
   branches/SAMBA_4_0/source/rpc_server/srvsvc/dcesrv_srvsvc.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/srvsvc.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/srvsvc.idl 2006-09-09 23:50:44 UTC 
(rev 18314)
+++ branches/SAMBA_4_0/source/librpc/idl/srvsvc.idl 2006-09-10 00:41:15 UTC 
(rev 18315)
@@ -626,8 +626,8 @@
typedef struct {
srvsvc_PlatformId platform_id;
[string,charset(UTF16)] uint16 *server_name;
-   uint32 ver_major;
-   uint32 ver_minor;
+   uint32 version_major;
+   uint32 version_minor;
svcctl_ServerType server_type;
[string,charset(UTF16)] uint16 *comment;
uint32 users;
@@ -635,7 +635,7 @@
uint32 hidden;
uint32 announce;
uint32 anndelta;
-   uint32 licences;
+   uint32 licenses;
[string,charset(UTF16)] uint16 *userpath;
} srvsvc_NetSrvInfo102;
 

Modified: branches/SAMBA_4_0/source/rpc_server/common/server_info.c
===
--- branches/SAMBA_4_0/source/rpc_server/common/server_info.c   2006-09-09 
23:50:44 UTC (rev 18314)
+++ branches/SAMBA_4_0/source/rpc_server/common/server_info.c   2006-09-10 
00:41:15 UTC (rev 18315)
@@ -89,3 +89,47 @@
 {
return talloc_strdup(mem_ctx, );
 }
+
+/* This hardcoded value should go into a ldb database! */
+_PUBLIC_ uint32_t dcesrv_common_get_users(TALLOC_CTX *mem_ctx, struct 
dcesrv_context *dce_ctx)
+{
+   return -1;
+}
+
+/* This hardcoded value should go into a ldb database! */
+_PUBLIC_ uint32_t dcesrv_common_get_disc(TALLOC_CTX *mem_ctx, struct 
dcesrv_context *dce_ctx)
+{
+   return 15;
+}
+
+/* This hardcoded value should go into a ldb database! */
+_PUBLIC_ uint32_t dcesrv_common_get_hidden(TALLOC_CTX *mem_ctx, struct 
dcesrv_context *dce_ctx)
+{
+   return 0;
+}
+
+/* This hardcoded value should go into a ldb database! */
+_PUBLIC_ uint32_t dcesrv_common_get_announce(TALLOC_CTX *mem_ctx, struct 
dcesrv_context *dce_ctx)
+{
+   return 240;
+}
+
+/* This hardcoded value should go into a ldb database! */
+_PUBLIC_ uint32_t dcesrv_common_get_anndelta(TALLOC_CTX *mem_ctx, struct 
dcesrv_context *dce_ctx)
+{
+   return 3000;
+}
+
+/* This hardcoded value should go into a ldb database! */
+_PUBLIC_ uint32_t dcesrv_common_get_licenses(TALLOC_CTX *mem_ctx, struct 
dcesrv_context *dce_ctx)
+{
+   return 0;
+}
+
+/* This hardcoded value should go into a ldb database! */
+_PUBLIC_ const char *dcesrv_common_get_userpath(TALLOC_CTX *mem_ctx, struct 
dcesrv_context *dce_ctx)
+{
+   return talloc_strdup(mem_ctx, c:\\);
+}
+
+

Modified: branches/SAMBA_4_0/source/rpc_server/srvsvc/dcesrv_srvsvc.c
===
--- branches/SAMBA_4_0/source/rpc_server/srvsvc/dcesrv_srvsvc.c 2006-09-09 
23:50:44 UTC (rev 18314)
+++ branches/SAMBA_4_0/source/rpc_server/srvsvc/dcesrv_srvsvc.c 2006-09-10 
00:41:15 UTC (rev 18315)
@@ -1025,6 +1025,35 @@
r-out.info.info101 = info101;
return WERR_OK;
}
+   case 102:
+   {
+   struct srvsvc_NetSrvInfo102 *info102;
+
+   info102 = talloc(mem_ctx, struct srvsvc_NetSrvInfo102);
+   W_ERROR_HAVE_NO_MEMORY(info102);
+
+   info102-platform_id= 
dcesrv_common_get_platform_id(mem_ctx, dce_ctx);
+   info102-server_name= 
dcesrv_common_get_server_name(mem_ctx, dce_ctx, r-in.server_unc);
+   W_ERROR_HAVE_NO_MEMORY(info102-server_name);
+
+   info102-version_major  = 
dcesrv_common_get_version_major(mem_ctx, dce_ctx);
+   info102-version_minor  = 
dcesrv_common_get_version_minor(mem_ctx, dce_ctx);
+   info102-server_type= 
dcesrv_common_get_server_type(mem_ctx, dce_ctx);
+   info102-comment= talloc_strdup(mem_ctx, 
lp_serverstring());
+   W_ERROR_HAVE_NO_MEMORY(info102-comment);
+
+   info102-users  = dcesrv_common_get_users(mem_ctx, 
dce_ctx);
+   info102-disc   = dcesrv_common_get_disc(mem_ctx, 
dce_ctx);
+   info102-hidden = dcesrv_common_get_hidden(mem_ctx, 
dce_ctx);
+   info102-announce   = dcesrv_common_get_announce(mem_ctx, 
dce_ctx);
+   info102-anndelta   = dcesrv_common_get_anndelta(mem_ctx, 
dce_ctx);

svn commit: samba r18316 - in branches/SAMBA_4_0/source/setup: .

2006-09-09 Thread idra
Author: idra
Date: 2006-09-10 02:46:17 + (Sun, 10 Sep 2006)
New Revision: 18316

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

Log:

Build the parent too


Modified:
   branches/SAMBA_4_0/source/setup/display_specifiers.ldif


Changeset:
Modified: branches/SAMBA_4_0/source/setup/display_specifiers.ldif
===
--- branches/SAMBA_4_0/source/setup/display_specifiers.ldif 2006-09-10 
00:41:15 UTC (rev 18315)
+++ branches/SAMBA_4_0/source/setup/display_specifiers.ldif 2006-09-10 
02:46:17 UTC (rev 18316)
@@ -1,3 +1,12 @@
+dn: CN=409,CN=DisplaySpecifiers,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: container
+cn: 409
+name: 409
+instanceType: 4
+showInAdvancedViewOnly: TRUE
+objectCategory: CN=Container,CN=Schema,CN=Configuration,${BASEDN}
+
 dn: CN=user-Display,CN=409,CN=DisplaySpecifiers,CN=Configuration,${BASEDN}
 objectClass: top
 objectClass: displaySpecifier



svn commit: samba r18317 - in branches/SAMBA_4_0/source/lib/ldb/modules: .

2006-09-09 Thread idra
Author: idra
Date: 2006-09-10 03:11:03 + (Sun, 10 Sep 2006)
New Revision: 18317

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

Log:

Make sure we actually have a valid reply or fail


Modified:
   branches/SAMBA_4_0/source/lib/ldb/modules/asq.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/modules/asq.c
===
--- branches/SAMBA_4_0/source/lib/ldb/modules/asq.c 2006-09-10 02:46:17 UTC 
(rev 18316)
+++ branches/SAMBA_4_0/source/lib/ldb/modules/asq.c 2006-09-10 03:11:03 UTC 
(rev 18317)
@@ -289,6 +289,9 @@
ac = talloc_get_type(handle-private_data, struct asq_context);
 
/* look up the DNs */
+   if (ac-base_res == NULL) {
+   return LDB_ERR_NO_SUCH_OBJECT;
+   }
el = ldb_msg_find_element(ac-base_res-message, ac-req_attribute);
/* no values found */
if (el == NULL) {



svn commit: samba r18318 - in branches/SAMBA_4_0/source: librpc/idl rpc_server/srvsvc

2006-09-09 Thread idra
Author: idra
Date: 2006-09-10 03:58:00 + (Sun, 10 Sep 2006)
New Revision: 18318

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

Log:

Implement DiskEnum
Fix spelling and consistencies issues in idl


Modified:
   branches/SAMBA_4_0/source/librpc/idl/srvsvc.idl
   branches/SAMBA_4_0/source/rpc_server/srvsvc/dcesrv_srvsvc.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/srvsvc.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/srvsvc.idl 2006-09-10 03:11:03 UTC 
(rev 18317)
+++ branches/SAMBA_4_0/source/librpc/idl/srvsvc.idl 2006-09-10 03:58:00 UTC 
(rev 18318)
@@ -1121,12 +1121,12 @@
 /* srvsvc_NetDisk */
 /**/
typedef struct {
-   [flag(STR_LEN4)] string disc;
+   [flag(STR_LEN4)] string disk;
} srvsvc_NetDiskInfo0;
 
typedef struct {
uint32 count;
-   [size_is(count), length_is(count)] srvsvc_NetDiskInfo0 *discs;
+   [size_is(count), length_is(count)] srvsvc_NetDiskInfo0 *disks;
} srvsvc_NetDiskInfo;
 
/**/
@@ -1134,7 +1134,7 @@
WERROR srvsvc_NetDiskEnum(
[in]  [string,charset(UTF16)] uint16 *server_unc,
[in]  uint32 level,
-   [in,out]  srvsvc_NetDiskInfo disks,
+   [in,out]  srvsvc_NetDiskInfo info,
[in]  uint32 maxlen,
[out] uint32 totalentries,
[in,out]  uint32 *resume_handle

Modified: branches/SAMBA_4_0/source/rpc_server/srvsvc/dcesrv_srvsvc.c
===
--- branches/SAMBA_4_0/source/rpc_server/srvsvc/dcesrv_srvsvc.c 2006-09-10 
03:11:03 UTC (rev 18317)
+++ branches/SAMBA_4_0/source/rpc_server/srvsvc/dcesrv_srvsvc.c 2006-09-10 
03:58:00 UTC (rev 18318)
@@ -1078,15 +1078,30 @@
 static WERROR srvsvc_NetDiskEnum(struct dcesrv_call_state *dce_call, 
TALLOC_CTX *mem_ctx,
   struct srvsvc_NetDiskEnum *r)
 {
-   r-out.disks.discs = NULL;
-   r-out.disks.count = 0;
+   r-out.info.disks = NULL;
+   r-out.info.count = 0;
r-out.totalentries = 0;
r-out.resume_handle = NULL;
 
switch (r-in.level) {
case 0:
{
-   return WERR_NOT_SUPPORTED;
+   /* we can safely hardcode the reply and report we have only one 
disk (C:) */
+   /* for some reason Windows wants 2 entries with the second 
being empty */
+   r-out.info.disks = talloc_array(mem_ctx, struct 
srvsvc_NetDiskInfo0, 2);
+   W_ERROR_HAVE_NO_MEMORY(r-out.info.disks);
+   r-out.info.count = 2;
+
+   r-out.info.disks[0].disk = talloc_strdup(mem_ctx, C:);
+   W_ERROR_HAVE_NO_MEMORY(r-out.info.disks[0].disk);
+
+   r-out.info.disks[1].disk = talloc_strdup(mem_ctx, );
+   W_ERROR_HAVE_NO_MEMORY(r-out.info.disks[1].disk);
+
+   r-out.totalentries = 1;
+   r-out.resume_handle = r-in.resume_handle;
+
+   return WERR_OK;
}
default:
return WERR_UNKNOWN_LEVEL;