[Samba] Performance on a home fileserver

2006-09-23 Thread David Dyer-Bennet

Very early in my fileserver setup.  I'm building a home fileserver
running Solaris on an Opteron processor, 2GB ECC memory, motherboard
SATA, two 400GB drives mirrored in a ZFS pool.  Gigabit ethernet.

My client system is my long-standing desktop box, windows XP Pro with
2GB non-ECC memory, 300GB SATA data drive, gigabit ethernet.  The two
systems are on a shelf next to each other, connected by a cheap
gigabit switch (no management interface, no configuration).

Samba was configured with SWAT.   Workgroup, no domains.  User-level
authorization, encrypted passwords, no ldap, radius, or other outside
directory services.

I'm copying my user directory from the 300GB drive on the desktop
system to my home directory in a ZFS filesystem in the mirrored pool
on the server.  I'm not committed to keeping this copy, I'm just
playing around.

The data is various, but includes a lot of big files, camera original
files from 1MB to 15MB, bigger photoshop files, some much bigger audio
files, and the usual number of smaller files.

The benchmarking is extremely informal; I'm the only user on the
server, but I'm also playing MP3 streams on my desktop from the server
at the same time as this copy.  These two systems should be the only
switch activity, and neither is doing any significant to any
destination; all the traffic is between these two systems.  The copy
is a drag-and-drop of my entire documents directory,  comprising over
200GB.

Disk activity lights indicate that disk activity on the server is
*very* light -- disk lights up for well under 50% of the time.  The
sending side shows constant disk activity (some visible blinking,
little dark time).

zpool iostat shows a peak of 27MB written per 5 seconds, and many
times much less than that; but the disk IO lights suggest that disk
bandwidth isn't the limit (so does donig local disk operations, and
doing a scrub where ZFS reads every used block in the pool and
verifies the checksum).  But I see 1 or more 5-second periods in every
24 under 1MB.

Yikes; now for a minute or so it's been in the small hundreds of K per
seconds (perhaps because it's going through small files).

Um, this performance seems to me to suck dead diseased rats through a
straw.  I don't even know where I should be pointing the finger right
now.  Copying within my desktop system isn't apparently this bad (and
that's reading and writing a single disk, whereas the network test is
all read on one side, all write on the other).  The server system
doesn't have a high CPU load or disk load.  The network isn't
saturated (by a few orders of magnitude).  Nothing is wrong.  But
this performance really sucks.

Frankly even the peak performance seen (27MB per 5 seconds), on the
big files (several hundred MB), is pitiful.

Once the copy is done, I'll have things like big photoshop files on
both systems, and I can open them in photoshop and compare the time,
and copying them around some more, and so forth; not as controlled as
synthetic benchmarks, but directly measuring the things I do where
I'll notice disk performance most.

Am I seeing inherent limitations in Windows?  Problems with
drag-and-drop copies?  Any suggestions?  These observations are very
crude, and can't really be considered measurements; but I'm feeling
they aren't even in the right *order of magnitude*.
--
David Dyer-Bennet, mailto:[EMAIL PROTECTED], http://www.dd-b.net/dd-b/
RKBA: http://www.dd-b.net/carry/
Pics: http://www.dd-b.net/dd-b/SnapshotAlbum/
Dragaera/Steven Brust: http://dragaera.info/
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Excel Save Problem

2006-09-23 Thread Christian Nekola

Jeremy Allison schrieb:

On Fri, Sep 22, 2006 at 11:23:44AM +0200, Christian Nekola wrote:
  

Yesterday i compile a new samba version (3.0.23a)
unfortunately the same problem.

If i save a excel (or a pdf) doc on my smaba share, then all hangs. (90%
iowait 0,2% cpu)
I make sundries tests: samba tunning with socket options,... Oplock disable
on client, antivirus disable on client. Las service pack installtion on
client, Nothing change.

Very weird: i have two samba shares. A small share with 250 gb and a large
share with 750 (raid 5, drbd). Only on the large share hang samba when i
save a dokument on windows 2000. with windows xp are running all ok.
.i don't know why :(



Does it hang when you're not using drbd ? If it only hangs
with drbd I suspect a kernel problem.

Jeremy.
  

No :-(
hangs also without drbd
a kernel problem? I don't use the last redhat kernel. perhaps my problem?

thx, Chris

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


Re: [Samba] unable to change passwd from win XP

2006-09-23 Thread Rory Vieira

Steve,

On 9/22/06, Steve Glasser [EMAIL PROTECTED] wrote:

Hi list,

  # sync smb passwords with linux passwords
  unix password sync = yes

Ok, I have this line...


  passwd program = /usr/bin/passwd %u
  passwd chat = *new*password* %n\n*Re-enter*new*password* %n\n
*Password*changed*
  passwd chat debug = yes

I don't have this stuff though,
I DO have an additional line:

pam password change = yes

which works for me :)

Hope this helps,
--
Rory Vieira
rory dot vieira at gmail dot com
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Dissapearing printer drivers with 3.0.23c

2006-09-23 Thread Bostjan Müller

Hi,

we have been using Samba as PDC, netlogon and printing server for some
time now, but after upgrading to Samba version 3.0.23c the printer
drivers seem to dissapear. It has happened multiple times now, and I
have set up a script to be run every five minutes and check the diff
between all the printer drivers. Tonight at 00:35 AM _ALL_ the printer
drivers have dissapeared - yes each and every one of them was gone.
There is no error in the logs at that time (at least nothing I could
find), but we only have logging level of 0 set, because otherwise we
have too much logs at the same time.

Can anyone recomend a procedure, how am I at least to debug this sort
of problem, what can I check, to try to get to the bottom of this, and
not have drivers dissapear any more.


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


Re: [Samba] Finding Accounts inside Trusted Domains

2006-09-23 Thread Michael Gasch

hi,

if the trust has correctly been set up this should work. your 
workstation will contact your DC supplying the creds you gave it 
(MATH\user incl. pw). the DC will then forward this to its trusted DC 
(MATH DC). this should reply with OK and your DC should allow login.


are you running winbindd on both DCs?

greez

Matt Hyclak wrote:

I'm still fighting with interdomain relationships and have a couple of
more specific questions than in my post yesterday:

1. Is it possible to log into a machine which is associated with one domain
   with credentials in another domain?

2. If so, is there extra configuration that needs to happen to find the
   account?   


The reason I ask 2. above is the following:

I have a workstation which is a member of the SOCIALWORK domain,
morton315f-vm2. Trust relationships are established both directions between
SOCIALWORK and MATH. I am attempting to log in to morton315f-vm2 with
credentials from an account in MATH (on the windows login screen, I have
used my username and password from math, as well as set the Log On To field
to MATH). I have log level set to 5. On the SOCIALWORK server, I see the
login attempt during which it searches for the user, first in
/etc/samba/smbusers, next in the socialwork ldap backend, finally it
searches as a group. Am I mistaken that selecting the MATH domain to log in
to would query the MATH PDC?
   
Any help with this would be much appreciated.


Thanks,
Matt



--
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.23 integrating with Active Directory + Failed to set ServicePrincipalNames

2006-09-23 Thread mallapadi niranjan

Hi all

I have a linux server with RHEL 4.0 ES with Samba 3.0.23c . I am trying to
integrate it with our Windows 2003 Active directory.
our Windows domain is EXAMPLE.COM and netbios name of the server is
EXAMPLE. The hostname of our Active directory is lesl-dom.
when we are joining to the domain we are getting the following error.
##
[EMAIL PROTECTED] samba-3c]# /usr/local/samba-3c/bin/net ads join
-UAdministrator
Administrator's password:
Using short domain name -- EXAMPLE
Failed to set servicePrincipalNames. Please ensure that
the DNS domain of this server matches the AD domain,
Or rejoin with using Domain Admin credentials.
Disabled account for 'LINUXADS' in realm 'EXAMPLE.COM'
##

linuxads is the hostname of the linux machine where samba-3.0.23c is
installed.

my krb5.conf is

[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log

[libdefaults]
default_realm = EXAMPLE.COM
dns_lookup_realm = false
dns_lookup_kdc = false
ticket_lifetime = 24h
forwardable = yes

[realms]
EXAMPLE.COM = {
 kdc = 10.129.149.4
 admin_server = 10.129.149.4
 default_domain = EXAMPLE.COM
}

EXAMPLE.COM = {
kdc = 10.129.149.4
}

[domain_realm]
.example.com = EXAMPLE.COM
.example.com = EXAMPLE.COM

[kdc]
profile = /var/kerberos/krb5kdc/kdc.conf

[appdefaults]
pam = {
  debug = false
  ticket_lifetime = 36000
  renew_lifetime = 36000
  forwardable = true
  krb4_convert = false
}


my smb.conf is
##
[global]
   workgroup = LOCUZHYD
   realm = LOCUZHYD.COM
   server string = Linux Additional Domain Controller
   security = ADS
   log level = 10
   log file = /usr/local/samba-3c/var/smbd.log
   max log size = 50
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   printcap name = /etc/printcap
   preferred master = No
   dns proxy = No
   template shell = /bin/bash
   cups options = raw

[homes]
   comment = Home Directories
   read only = No
   browseable = No

[printers]
   comment = All Printers
   path = /var/spool/samba
   printable = Yes
   browseable = No
##

please guide me

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


[Samba] can't add computer to domain LDAP SAMBA

2006-09-23 Thread Peter Collins Wasenda


I know this may not necessarily be a samba question but am sure  
someone might have come across this problem before.


i follows the  
http://en.opensuse.org/Howto_setup_SUSE_10.1_as_Samba_PDC document to  
setup my PDC


everything went fine right until i tried to join a computer to the domain !

It says, username or password is wrong.

i googled and found out that i have to have a user with samba user and  
group id 0 in my ldap backend.


i have created a root user with these specs but still to no avail.

what is the correct way to create the domain admin ? i Tried putting  
the machine account first in the database. when i try join without  
password i get something like failed creating workstation account no  
rights !


by the way what algorithm should i be using to encrypt passwords in  
ldap ? ssha or md5 ?



--


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


Re: [Samba] Linux Samba to Mac OSX: resource fork lock problems?

2006-09-23 Thread William Yang

Jeremy Allison wrote:

On Fri, Sep 22, 2006 at 10:47:49AM -0400, William Yang wrote:

I am seeking a better workaround than I currently have for the problem.

Using OS X 10.3.x and 10.4.x (and possibly other versions) as workstations, 
and Gentoo Linux (kernel 2.6.16) with Samba 3.0.22, I have the following 
sequence of events.  The symptom is most prevalent when dealing with multi 
MB files:


1.  Resource fork (._ file) gets locked
2.  File associated with resource fork also gets locked.
3.  File gets unlocked
4.  Resource fork never gets unlocked.

Because the resource fork never gets unlocked, this causes problems with 
migration of data off the Mac to the server and occasionally results in a 
file being deleted unexpectedly.


Is this a bug in the Mac client ? Are they forgetting to unlock
their resource forks ? A network sniff would be useful.


I think my prior message may have mentioned that the best hypothesis to
date is that it's an OS bug on Mac, having to do with the multi-threaded
nature of the gui and a race condition between it and the smb process.

I do believe it to be a bug in the Mac client, though I feel little hope in
getting my Mac-side support counterparts to pursue the issue.  I routinely
see locks that persist for hours, days, even weeks on end (until I started
restarting the samba daemon on weekends to clear them).

Would the following test be appropriate to give you what you need:

1)  sniff traffic on ports 139 between a given host and the samba server,
using 'tcpdump -s 1508 -i eth0 -w out.pcap port 139'
2)  reproduce the problem from that host to server
3)  send you the dump

I may need a few days to get that -- I'm remote from the customer's site,
and there may be some difficulty with getting it to happen.







Jeremy.




--
William Yang
[EMAIL PROTECTED]

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


Re: [Samba] Transfer rates faster than 23MBps?

2006-09-23 Thread Doug VanLeuven

Mark Smith wrote:

I also tried your values, with the tcp_window_scaling, with no luck.
It's enable by default, but I explicitly set options other options 
depend on.


I set up my test rig again.
Host server
2.6.12-1.1376_FC3, samba 3.0.23
Broadcom Nextreme BCM5702X Gigabit, tg3 driver default config
Client
2.6.12-1.1381_FC3, samba 3.0.21pre3-SVN-build-11739
Intel Pro/1000, 82546GB Gigabit, e1000 driver default config
HD Drives on both are 45-50MBps

smbclient 26.7-27.2MBps
ftp 25.4 MBps (small window size)

Interestingly enough, downloading in the opposite direction, where the 
Intel card was doing the serving was slightly faster, so hardware does 
make a difference.

smbclient 28.8MBps

client win2000 sp4, Intel Pro/1000
ftp 31.2-34.4MBps
explorer 26.2-27.0MBps (wall clock on 2Gig transfers)

FWIW - I'm used to seeing CIFS performance numbers 5-10% slower than ftp.

Using ethereal to capture the start of the transfers, I'm seeing windows 
ftp negotiate a 256960 window size, which is what I have specified in 
HKLM/system/currcontrolset/services/tcpip/parameters/TcpWindowSize, but 
linux samba establishes a window size of whatever is specified for 
SO_SNDBUF in socket options or by default 8K.  So I set SO_SNDBUF=256960 
and it gave me the extra large window and raised the speed up to 
27.3MBps (1048576 Megs) - not enough to really address your concerns.  
Maybe it would be different on your system.  That's an issue for samba 
because it should allow for autonegotiation of the window size and I 
don't know how to set that other than ipv4.tcp_window_scaling=1 (the 
default).  SO_SNDBUF  SO_RCVBUF are only limited by the /proc/sys 
values* *net.core.rmem_max and net.core.wmem_max which you altered after 
the earlier post.


Comparing the linux ftp to linux samba transfer speeds, I don't think 
the answer lies in samba per se other than how the socket gets set up.  
And it's not a linux issue either if you're getting those http numbers 
(I never see anything like that here).  Your Redhat is obviously tuned 
for those types of packets.  Maybe you using the in-kernel optimized 
apache they offer.  If so, try a user space apache for comparison.


I smacked up against these numbers 2 years ago.  Nothing much seems to 
have changed.  The numbers end up in the low to mid 200Mbps on copper 
Gigabit for user space applications.  If you ever fix it, pop me an 
email please.  I figured the answer would be pci-x and 64 bit pci.  
Higher front side bus speeds.


Best of luck, Doug

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


Re: [Samba] Transfer rates faster than 23MBps?

2006-09-23 Thread Guenter Kukkukk
On Saturday 23 September 2006 17:13, Doug VanLeuven wrote:
 Mark Smith wrote:
  I also tried your values, with the tcp_window_scaling, with no luck.

 It's enable by default, but I explicitly set options other options
 depend on.

 I set up my test rig again.
 Host server
 2.6.12-1.1376_FC3, samba 3.0.23
 Broadcom Nextreme BCM5702X Gigabit, tg3 driver default config
 Client
 2.6.12-1.1381_FC3, samba 3.0.21pre3-SVN-build-11739
 Intel Pro/1000, 82546GB Gigabit, e1000 driver default config
 HD Drives on both are 45-50MBps
...snip

Hi Doug,

have you ever tried netio to check for raw needwork speed?
http://www.ars.de/ars/ars.nsf/docs/netio
It does not add any overhead caused by file operations - so it
can help to tune raw parameters.
The source is included - so it can be tuned, too.
When sniffing such traffic, also have a look, how tcpi/ip ACK
packets are used and whether they are send immediately
or with some delay.

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


[Samba] Apache problem accesing SMB Symlink - OS X 10.4.7

2006-09-23 Thread Michael Hogan

I'm having trouble accessing shared music with Apache.

I'm running Apple OS X 10.4.7 with Apache 1.3.3.

I can connect via SMB to my Windows XP Pro box. I can browse, read,
and write without any problems using Finder.

So in WebServer/Documents I have a symbolic link to that SMB
connection called DATA.

In a web browser, if I go to:

file:///library/webserver/documents/data/songx.mp3

It plays no problem.

However, if I do:

http://localhost/data/songx.mp3

I get:

403 Forbidden. You don't have permission to access /Data/songx.mp3 on
this server.

I thought to change permissions, I could do:

chmod -R -L 777 Data

But that has no effect.

What's going on here?? What can I do to resolve this?
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


svn commit: samba r18841 - in branches/SAMBA_3_0/source/nsswitch: .

2006-09-23 Thread gd
Author: gd
Date: 2006-09-23 06:36:22 + (Sat, 23 Sep 2006)
New Revision: 18841

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

Log:
Protect against potential event loop when someone is using winbind
cache time = 0.

Guenther

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c2006-09-23 
04:36:30 UTC (rev 18840)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c2006-09-23 
06:36:22 UTC (rev 18841)
@@ -1,7 +1,7 @@
 /*
Unix SMB/CIFS implementation.
 
-   Winbind daemon - krb5 credential cache funcions
+   Winbind daemon - krb5 credential cache functions
and in-memory cache functions.
 
Copyright (C) Guenther Deschner 2005-2006
@@ -136,7 +136,7 @@
 * seconds when the KDC was not available right now. */
 
if (ret == KRB5_KDC_UNREACH) {
-   new_start = time(NULL) + lp_winbind_cache_time();
+   new_start = time(NULL) + MAX(30, 
lp_winbind_cache_time());
goto done;
}
 



svn commit: samba r18842 - in branches/SAMBA_3_0/source/nsswitch: .

2006-09-23 Thread gd
Author: gd
Date: 2006-09-23 06:42:28 + (Sat, 23 Sep 2006)
New Revision: 18842

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

Log:
Protect against winbind cache time = 0 on two other occasions.

Guenther

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c2006-09-23 
06:36:22 UTC (rev 18841)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c2006-09-23 
06:42:28 UTC (rev 18842)
@@ -221,7 +221,7 @@
   retry_later:
 
entry-event = add_timed_event(entry,
-   
timeval_current_ofs(lp_winbind_cache_time(), 0),
+   timeval_current_ofs(MAX(30, 
lp_winbind_cache_time()), 0),
krb5_ticket_gain_handler,
krb5_ticket_gain_handler,
entry);
@@ -351,7 +351,7 @@
if (schedule_refresh_event  renew_until  0) {
if (postponed_request) {
entry-event = add_timed_event(entry,
-   
timeval_current_ofs(lp_winbind_cache_time(), 0),
+   timeval_current_ofs(MAX(30, 
lp_winbind_cache_time()), 0),
krb5_ticket_gain_handler,
krb5_ticket_gain_handler,
entry);



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

2006-09-23 Thread gd
Author: gd
Date: 2006-09-23 08:17:14 + (Sat, 23 Sep 2006)
New Revision: 18843

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

Log:
Got DFS_MANAGER_VERSION_NT4 wrong.

Guenther

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


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/dfs.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/dfs.idl2006-09-23 06:42:28 UTC 
(rev 18842)
+++ branches/SAMBA_4_0/source/librpc/idl/dfs.idl2006-09-23 08:17:14 UTC 
(rev 18843)
@@ -11,7 +11,7 @@
/**/
/* Function: 0x00 */
typedef [v1_enum] enum {
-   DFS_MANAGER_VERSION_NT4 = 0,
+   DFS_MANAGER_VERSION_NT4 = 1,
DFS_MANAGER_VERSION_W2K = 2,
DFS_MANAGER_VERSION_W2K3= 4
} dfs_ManagerVersion;



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

2006-09-23 Thread gd
Author: gd
Date: 2006-09-23 09:13:48 + (Sat, 23 Sep 2006)
New Revision: 18844

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

Log:
Workaround win2k behaviour (which returns WERR_NO_MORE_ITEMS instead of
WERR_OK) in the dfs torture test.

Guenther

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


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/dfs.c
===
--- branches/SAMBA_4_0/source/torture/rpc/dfs.c 2006-09-23 08:17:14 UTC (rev 
18843)
+++ branches/SAMBA_4_0/source/torture/rpc/dfs.c 2006-09-23 09:13:48 UTC (rev 
18844)
@@ -200,7 +200,8 @@
if (!NT_STATUS_IS_OK(status)) {
printf(GetInfo failed - %s\n, nt_errstr(status));
return False;
-   } else if (!W_ERROR_IS_OK(r.out.result)) {
+   } else if (!W_ERROR_IS_OK(r.out.result)  
+  !W_ERROR_EQUAL(WERR_NO_MORE_ITEMS, r.out.result)) {
printf(dfs_GetInfo failed - %s\n, win_errstr(r.out.result));
return False;
}
@@ -212,7 +213,7 @@
 {
BOOL ret = True;
/* 103, 104, 105, 106 is only available on Set */
-   uint16_t levels[] = {1, 2, 3, 4, 5, 6, 7, 100, 101, 102, 103, 104, 105, 
106, 200, 300};
+   uint16_t levels[] = {1, 2, 3, 4, 5, 6, 7, 100, 101, 102, 103, 104, 105, 
106};
int i;
 
for (i=0;iARRAY_SIZE(levels);i++) {
@@ -310,7 +311,8 @@
if (!NT_STATUS_IS_OK(status)) {
printf(Enum failed - %s\n, nt_errstr(status));
return False;
-   } else if (!W_ERROR_IS_OK(r.out.result)) {
+   } else if (!W_ERROR_IS_OK(r.out.result)  
+  !W_ERROR_EQUAL(WERR_NO_MORE_ITEMS, r.out.result)) {
printf(dfs_Enum failed - %s\n, win_errstr(r.out.result));
return False;
}



svn commit: samba r18845 - in branches/SAMBA_3_0/source/rpc_parse: .

2006-09-23 Thread vlendec
Author: vlendec
Date: 2006-09-23 17:59:52 + (Sat, 23 Sep 2006)
New Revision: 18845

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

Log:
Fix a type-punned warning that turned out to be a real bug: The secdesc
revision is now an enum that might be represented as anything, in particular
as an int. It's definitely not a uint16 :-)

Volker

Modified:
   branches/SAMBA_3_0/source/rpc_parse/parse_sec.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_parse/parse_sec.c
===
--- branches/SAMBA_3_0/source/rpc_parse/parse_sec.c 2006-09-23 09:13:48 UTC 
(rev 18844)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_sec.c 2006-09-23 17:59:52 UTC 
(rev 18845)
@@ -128,6 +128,7 @@
uint32 old_offset;
uint32 offset_acl_size;
SEC_ACL *psa;
+   uint16 revision;
 
/*
 * Note that the size is always a multiple of 4 bytes due to the
@@ -155,9 +156,17 @@

old_offset = prs_offset(ps);
 
-   if(!prs_uint16(revision, ps, depth, (uint16 *)psa-revision))
+   if (MARSHALLING(ps)) {
+   revision = (uint16)psa-revision;
+   }
+
+   if(!prs_uint16(revision, ps, depth, revision))
return False;
 
+   if (UNMARSHALLING(ps)) {
+   psa-revision = (enum security_acl_revision)revision;
+   }
+
if(!prs_uint16_pre(size , ps, depth, psa-size, 
offset_acl_size))
return False;
 
@@ -212,6 +221,7 @@
uint32 max_offset = 0; /* after we're done, move offset to end */
uint32 tmp_offset = 0;
uint32 off_sacl, off_dacl, off_owner_sid, off_grp_sid;
+   uint16 revision;
 
SEC_DESC *psd;
 
@@ -237,9 +247,17 @@
/* start of security descriptor stored for back-calc offset purposes */
old_offset = prs_offset(ps);
 
-   if(!prs_uint16(revision , ps, depth, (uint16*)psd-revision))
+   if (MARSHALLING(ps)) {
+   revision = (uint16)psd-revision;
+   }
+
+   if(!prs_uint16(revision, ps, depth, revision))
return False;
 
+   if (UNMARSHALLING(ps)) {
+   psd-revision = (enum security_acl_revision)revision;
+   }
+
if(!prs_uint16(type , ps, depth, psd-type))
return False;
 



svn commit: samba r18846 - in branches/SAMBA_3_0/source/rpc_parse: .

2006-09-23 Thread jra
Author: jra
Date: 2006-09-23 18:24:03 + (Sat, 23 Sep 2006)
New Revision: 18846

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

Log:
Fix the same bug Volker noticed when marshalling/unmarshalling
SEC_ACE. type is also an enum that may be any size. Treat as
a uint8.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/rpc_parse/parse_sec.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_parse/parse_sec.c
===
--- branches/SAMBA_3_0/source/rpc_parse/parse_sec.c 2006-09-23 17:59:52 UTC 
(rev 18845)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_sec.c 2006-09-23 18:24:03 UTC 
(rev 18846)
@@ -53,6 +53,7 @@
 {
uint32 old_offset;
uint32 offset_ace_size;
+   uint8 type;
 
if (psa == NULL)
return False;
@@ -62,9 +63,17 @@

old_offset = prs_offset(ps);
 
-   if(!prs_uint8(type , ps, depth, (uint8*)psa-type))
+   if (MARSHALLING(ps)) {
+   type = (uint8)psa-type;
+   }
+
+   if(!prs_uint8(type , ps, depth, type))
return False;
 
+   if (UNMARSHALLING(ps)) {
+   psa-type = (enum security_ace_type)type;
+   }
+
if(!prs_uint8(flags, ps, depth, psa-flags))
return False;
 



svn commit: samba r18847 - in branches/SAMBA_4_0/source/libcli/util: .

2006-09-23 Thread gd
Author: gd
Date: 2006-09-23 19:04:39 + (Sat, 23 Sep 2006)
New Revision: 18847

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

Log:
Add WERR_NO_SYSTEM_RESOURCES showing up in dfs torture testing.

Guenther

Modified:
   branches/SAMBA_4_0/source/libcli/util/doserr.c
   branches/SAMBA_4_0/source/libcli/util/doserr.h


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/util/doserr.c
===
--- branches/SAMBA_4_0/source/libcli/util/doserr.c  2006-09-23 18:24:03 UTC 
(rev 18846)
+++ branches/SAMBA_4_0/source/libcli/util/doserr.c  2006-09-23 19:04:39 UTC 
(rev 18847)
@@ -82,6 +82,7 @@
{ WERR_PRIVILEGE_NOT_HELD, WERR_PRIVILEGE_NOT_HELD },
{ WERR_NO_SUCH_USER, WERR_NO_SUCH_USER },
{ WERR_NO_SUCH_DOMAIN, WERR_NO_SUCH_DOMAIN },
+   { WERR_NO_SYSTEM_RESOURCES, WERR_NO_SYSTEM_RESOURCES },
{ WERR_DS_SERVICE_BUSY, WERR_DS_SERVICE_BUSY },
{ WERR_DS_SERVICE_UNAVAILABLE, WERR_DS_SERVICE_UNAVAILABLE },
{ WERR_DS_NO_SUCH_OBJECT, WERR_DS_NO_SUCH_OBJECT },

Modified: branches/SAMBA_4_0/source/libcli/util/doserr.h
===
--- branches/SAMBA_4_0/source/libcli/util/doserr.h  2006-09-23 18:24:03 UTC 
(rev 18846)
+++ branches/SAMBA_4_0/source/libcli/util/doserr.h  2006-09-23 19:04:39 UTC 
(rev 18847)
@@ -200,6 +200,7 @@
 #define WERR_NO_SUCH_USER W_ERROR(1317)
 #define WERR_INVALID_SECURITY_DESCRIPTOR W_ERROR(1338)
 #define WERR_NO_SUCH_DOMAIN W_ERROR(1355)
+#define WERR_NO_SYSTEM_RESOURCES W_ERROR(1450)
 #define WERR_SERVER_UNAVAILABLE W_ERROR(1722)
 #define WERR_INVALID_FORM_NAME W_ERROR(1902)
 #define WERR_INVALID_FORM_SIZE W_ERROR(1903)



svn commit: samba r18848 - in branches/SAMBA_4_0/source/lib: . json

2006-09-23 Thread derrell
Author: derrell
Date: 2006-09-23 19:15:27 + (Sat, 23 Sep 2006)
New Revision: 18848

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

Log:
Save the json library before I start hacking on it.  I'm going to be
converting it to natively use ejs objects, instead of its own internal
format.

Added:
   branches/SAMBA_4_0/source/lib/json/
   branches/SAMBA_4_0/source/lib/json/AUTHORS
   branches/SAMBA_4_0/source/lib/json/COPYING
   branches/SAMBA_4_0/source/lib/json/ChangeLog
   branches/SAMBA_4_0/source/lib/json/Doxyfile
   branches/SAMBA_4_0/source/lib/json/INSTALL
   branches/SAMBA_4_0/source/lib/json/Makefile.am
   branches/SAMBA_4_0/source/lib/json/Makefile.in
   branches/SAMBA_4_0/source/lib/json/NEWS
   branches/SAMBA_4_0/source/lib/json/README
   branches/SAMBA_4_0/source/lib/json/README-WIN32.html
   branches/SAMBA_4_0/source/lib/json/README.html
   branches/SAMBA_4_0/source/lib/json/aclocal.m4
   branches/SAMBA_4_0/source/lib/json/arraylist.c
   branches/SAMBA_4_0/source/lib/json/arraylist.h
   branches/SAMBA_4_0/source/lib/json/autogen.sh
   branches/SAMBA_4_0/source/lib/json/bits.h
   branches/SAMBA_4_0/source/lib/json/config.guess
   branches/SAMBA_4_0/source/lib/json/config.h.in
   branches/SAMBA_4_0/source/lib/json/config.h.win32
   branches/SAMBA_4_0/source/lib/json/config.sub
   branches/SAMBA_4_0/source/lib/json/configure
   branches/SAMBA_4_0/source/lib/json/configure.in
   branches/SAMBA_4_0/source/lib/json/debug.c
   branches/SAMBA_4_0/source/lib/json/debug.h
   branches/SAMBA_4_0/source/lib/json/depcomp
   branches/SAMBA_4_0/source/lib/json/install-sh
   branches/SAMBA_4_0/source/lib/json/json-c.vcproj
   branches/SAMBA_4_0/source/lib/json/json.h
   branches/SAMBA_4_0/source/lib/json/json.pc.in
   branches/SAMBA_4_0/source/lib/json/json_object.c
   branches/SAMBA_4_0/source/lib/json/json_object.h
   branches/SAMBA_4_0/source/lib/json/json_object_private.h
   branches/SAMBA_4_0/source/lib/json/json_tokener.c
   branches/SAMBA_4_0/source/lib/json/json_tokener.h
   branches/SAMBA_4_0/source/lib/json/json_util.c
   branches/SAMBA_4_0/source/lib/json/json_util.h
   branches/SAMBA_4_0/source/lib/json/linkhash.c
   branches/SAMBA_4_0/source/lib/json/linkhash.h
   branches/SAMBA_4_0/source/lib/json/ltmain.sh
   branches/SAMBA_4_0/source/lib/json/missing
   branches/SAMBA_4_0/source/lib/json/mkinstalldirs
   branches/SAMBA_4_0/source/lib/json/printbuf.c
   branches/SAMBA_4_0/source/lib/json/printbuf.h
   branches/SAMBA_4_0/source/lib/json/stamp-h.in
   branches/SAMBA_4_0/source/lib/json/test1.c
   branches/SAMBA_4_0/source/lib/json/test2.c


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


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

2006-09-23 Thread derrell
Author: derrell
Date: 2006-09-23 19:16:42 + (Sat, 23 Sep 2006)
New Revision: 18849

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

Log:
a bit of help for the new user, to figure out how to do initial setup
Modified:
   branches/SAMBA_4_0/howto.txt


Changeset:
Modified: branches/SAMBA_4_0/howto.txt
===
--- branches/SAMBA_4_0/howto.txt2006-09-23 19:15:27 UTC (rev 18848)
+++ branches/SAMBA_4_0/howto.txt2006-09-23 19:16:42 UTC (rev 18849)
@@ -73,6 +73,10 @@
   # cd source
   # ./setup/provision --realm=YOUR.REALM --domain=YOURDOM 
--adminpass=SOMEPASSWORD
 
+REMINDER: Add the bin directory of the path you installed to
+  (e.g. /usr/local/samba/bin) to your path, or the provision command
+  will not work.
+
 'YOURDOM' is the NT4 style domain name. 'YOUR.REALM' is your kerberos
 realm, which is typically your DNS domain name.
 



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

2006-09-23 Thread derrell
Author: derrell
Date: 2006-09-23 19:17:50 + (Sat, 23 Sep 2006)
New Revision: 18850

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

Log:
add strspn() function i ejs
Modified:
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_string.c


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_string.c
===
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_string.c   2006-09-23 
19:16:42 UTC (rev 18849)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_string.c   2006-09-23 
19:17:50 UTC (rev 18850)
@@ -91,6 +91,22 @@
 
 /*
   usage:
+  var s = strspn(string, legal_chars_string);
+*/
+static int ejs_strspn(MprVarHandle eid, int argc, char **argv)
+{
+int len;
+   if (argc != 2) {
+   ejsSetErrorMsg(eid, strspn invalid arguments);
+   return -1;
+   }
+   len = strspn(argv[0], argv[1]);
+   mpr_Return(eid, mprCreateIntegerVar(len));
+   return 0;
+}
+
+/*
+  usage:
  list = split(., a.foo.bar);
  list = split(., a.foo.bar, count);
 
@@ -493,6 +509,7 @@
mprSetStringCFunction(obj, strlower, ejs_strlower);
mprSetStringCFunction(obj, strupper, ejs_strupper);
mprSetStringCFunction(obj, strstr, ejs_strstr);
+   mprSetStringCFunction(obj, strspn, ejs_strspn);
mprSetCFunction(obj, split, ejs_split);
mprSetCFunction(obj, join, ejs_join);
mprSetCFunction(obj, sprintf, ejs_sprintf);



svn commit: samba r18851 - in branches/SAMBA_4_0/source/lib/ldb/tools: .

2006-09-23 Thread vlendec
Author: vlendec
Date: 2006-09-23 20:29:54 + (Sat, 23 Sep 2006)
New Revision: 18851

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

Log:
Some C++ warnings
Modified:
   branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c
===
--- branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c   2006-09-23 19:17:50 UTC 
(rev 18850)
+++ branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c   2006-09-23 20:29:54 UTC 
(rev 18851)
@@ -285,7 +285,7 @@
}
if (ctxid[0]) {
control-ctxid_len = ldb_base64_decode(ctxid);
-   control-contextId = talloc_memdup(control, 
ctxid, control-ctxid_len);
+   control-contextId = (char 
*)talloc_memdup(control, ctxid, control-ctxid_len);
} else {
control-ctxid_len = 0;
control-contextId = NULL;
@@ -327,7 +327,7 @@
control-max_attributes = max_attrs;
if (*cookie) {
control-cookie_len = ldb_base64_decode(cookie);
-   control-cookie = talloc_memdup(control, 
cookie, control-cookie_len);
+   control-cookie = (char 
*)talloc_memdup(control, cookie, control-cookie_len);
} else {
control-cookie = NULL;
control-cookie_len = 0;
@@ -671,9 +671,9 @@
 
if (req_control-cookie)
talloc_free(req_control-cookie);
-   req_control-cookie = talloc_memdup(req_control,
-   rep_control-cookie,
-   
rep_control-cookie_len);
+   req_control-cookie = (char *)talloc_memdup(
+   req_control, rep_control-cookie,
+   rep_control-cookie_len);
req_control-cookie_len = rep_control-cookie_len;
 
ret = 1;
@@ -727,9 +727,9 @@
 
if (req_control-cookie)
talloc_free(req_control-cookie);
-   req_control-cookie = talloc_memdup(req_control, 
-   rep_control-cookie,
-   
rep_control-cookie_len);
+   req_control-cookie = (char *)talloc_memdup(
+   req_control, rep_control-cookie,
+   rep_control-cookie_len);
req_control-cookie_len = rep_control-cookie_len;
 
cookie = ldb_base64_encode(req_control, 
rep_control-cookie, rep_control-cookie_len);



svn commit: samba r18852 - in branches/SAMBA_3_0/source/utils: .

2006-09-23 Thread gd
Author: gd
Date: 2006-09-23 20:53:45 + (Sat, 23 Sep 2006)
New Revision: 18852

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

Log:
Fix compiler warning (thanks Volker).

Guenther

Modified:
   branches/SAMBA_3_0/source/utils/net_ads_gpo.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_ads_gpo.c
===
--- branches/SAMBA_3_0/source/utils/net_ads_gpo.c   2006-09-23 20:29:54 UTC 
(rev 18851)
+++ branches/SAMBA_3_0/source/utils/net_ads_gpo.c   2006-09-23 20:53:45 UTC 
(rev 18852)
@@ -173,15 +173,15 @@
 
if (!ADS_ERR_OK(status)) {
d_printf(parse failed: %s\n, ads_errstr(status));
+   ads_memfree(ads, dn);
goto out;
}   
 
dump_gpo(mem_ctx, gpo);
-
+   ads_memfree(ads, dn);
}
 
 out:
-   ads_memfree(ads, dn);
ads_msgfree(ads, res);
 
talloc_destroy(mem_ctx);



svn commit: samba r18853 - in branches/SAMBA_3_0/source: libads utils

2006-09-23 Thread gd
Author: gd
Date: 2006-09-23 21:06:33 + (Sat, 23 Sep 2006)
New Revision: 18853

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

Log:
Fix remaining warnings. Volker, should be fine now.

Guenther

Modified:
   branches/SAMBA_3_0/source/libads/gpo.c
   branches/SAMBA_3_0/source/utils/net_ads_gpo.c


Changeset:
Modified: branches/SAMBA_3_0/source/libads/gpo.c
===
--- branches/SAMBA_3_0/source/libads/gpo.c  2006-09-23 20:53:45 UTC (rev 
18852)
+++ branches/SAMBA_3_0/source/libads/gpo.c  2006-09-23 21:06:33 UTC (rev 
18853)
@@ -364,7 +364,7 @@
 
 ADS_STATUS ads_parse_gpo(ADS_STRUCT *ads,
 TALLOC_CTX *mem_ctx,
-void *res,
+LDAPMessage *res,
 const char *gpo_dn,
 struct GROUP_POLICY_OBJECT *gpo)
 {

Modified: branches/SAMBA_3_0/source/utils/net_ads_gpo.c
===
--- branches/SAMBA_3_0/source/utils/net_ads_gpo.c   2006-09-23 20:53:45 UTC 
(rev 18852)
+++ branches/SAMBA_3_0/source/utils/net_ads_gpo.c   2006-09-23 21:06:33 UTC 
(rev 18853)
@@ -135,7 +135,7 @@
ADS_STATUS status;
LDAPMessage *res = NULL;
int num_reply = 0;
-   void *msg = NULL;
+   LDAPMessage *msg = NULL;
struct GROUP_POLICY_OBJECT gpo;
TALLOC_CTX *mem_ctx;
char *dn;



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

2006-09-23 Thread vlendec
Author: vlendec
Date: 2006-09-23 21:23:48 + (Sat, 23 Sep 2006)
New Revision: 18854

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

Log:
Disable the AC_LIBREPLACE_CC_CHECKS, this breaks the HAVE_IMMEDIATE_STRUCTURES
test with gcc 4.1.0. As the build farm is not in the best state right now,
this should not matter.

Stefan, is there any chance we get the IMMEDIATE_STRUCTURES back and have
libreplace at the same time?

Volker

Modified:
   branches/SAMBA_3_0/source/configure.in


Changeset:
Modified: branches/SAMBA_3_0/source/configure.in
===
--- branches/SAMBA_3_0/source/configure.in  2006-09-23 21:06:33 UTC (rev 
18853)
+++ branches/SAMBA_3_0/source/configure.in  2006-09-23 21:23:48 UTC (rev 
18854)
@@ -326,7 +326,7 @@
 
 CFLAGS=${CFLAGS} -D_SAMBA_BUILD_
 
-AC_LIBREPLACE_CC_CHECKS
+# AC_LIBREPLACE_CC_CHECKS
 
 # Set defaults
 PIE_CFLAGS=



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

2006-09-23 Thread vlendec
Author: vlendec
Date: 2006-09-23 21:27:48 + (Sat, 23 Sep 2006)
New Revision: 18855

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

Log:
Tell the diff between WERROR and NTSTATUS

Volker

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


Changeset:
Modified: branches/SAMBA_3_0/source/include/nt_status.h
===
--- branches/SAMBA_3_0/source/include/nt_status.h   2006-09-23 21:23:48 UTC 
(rev 18854)
+++ branches/SAMBA_3_0/source/include/nt_status.h   2006-09-23 21:27:48 UTC 
(rev 18855)
@@ -45,9 +45,9 @@
 #endif
 
 #if defined(HAVE_IMMEDIATE_STRUCTURES)
-typedef struct {uint32 v;} WERROR;
+typedef struct {uint32 w;} WERROR;
 #define W_ERROR(x) ((WERROR) { x })
-#define W_ERROR_V(x) ((x).v)
+#define W_ERROR_V(x) ((x).w)
 #else
 typedef uint32 WERROR;
 #define W_ERROR(x) (x)



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

2006-09-23 Thread tridge
Author: tridge
Date: 2006-09-23 21:29:51 + (Sat, 23 Sep 2006)
New Revision: 18856

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

Log:

fixed HAVE_IMMEDIATE_STRUCTURES and thus checking of NTSTATUS/BOOL
mixups

Modified:
   branches/SAMBA_3_0/source/configure.in


Changeset:
Modified: branches/SAMBA_3_0/source/configure.in
===
--- branches/SAMBA_3_0/source/configure.in  2006-09-23 21:27:48 UTC (rev 
18855)
+++ branches/SAMBA_3_0/source/configure.in  2006-09-23 21:29:51 UTC (rev 
18856)
@@ -1001,7 +1001,7 @@
#define X_FOOBAR(x) ((FOOBAR) { x })
#define FOO_ONE X_FOOBAR(1)
FOOBAR f = FOO_ONE;   
-   static struct {
+   struct {
FOOBAR y; 
} f2[] = {
{FOO_ONE}



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

2006-09-23 Thread vlendec
Author: vlendec
Date: 2006-09-23 21:35:25 + (Sat, 23 Sep 2006)
New Revision: 18857

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

Log:
Re-enable the CC checks from libreplace after Tridge's fix. Thanks for that!

Volker

Modified:
   branches/SAMBA_3_0/source/configure.in


Changeset:
Modified: branches/SAMBA_3_0/source/configure.in
===
--- branches/SAMBA_3_0/source/configure.in  2006-09-23 21:29:51 UTC (rev 
18856)
+++ branches/SAMBA_3_0/source/configure.in  2006-09-23 21:35:25 UTC (rev 
18857)
@@ -326,7 +326,7 @@
 
 CFLAGS=${CFLAGS} -D_SAMBA_BUILD_
 
-# AC_LIBREPLACE_CC_CHECKS
+AC_LIBREPLACE_CC_CHECKS
 
 # Set defaults
 PIE_CFLAGS=



svn commit: samba r18858 - in branches/SAMBA_3_0/source: include libaddns libsmb

2006-09-23 Thread tridge
Author: tridge
Date: 2006-09-23 21:41:41 + (Sat, 23 Sep 2006)
New Revision: 18858

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

Log:

arrgh! - since HAVE_IMMEDIATE_STRUCTURES were last enabled the code
can no longer handle it (at least with gcc 4.1.2). Disable it until
investigated and fixed properly.

Modified:
   branches/SAMBA_3_0/source/include/nt_status.h
   branches/SAMBA_3_0/source/libaddns/dnserr.h
   branches/SAMBA_3_0/source/libsmb/clierror.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/nt_status.h
===
--- branches/SAMBA_3_0/source/include/nt_status.h   2006-09-23 21:35:25 UTC 
(rev 18857)
+++ branches/SAMBA_3_0/source/include/nt_status.h   2006-09-23 21:41:41 UTC 
(rev 18858)
@@ -34,7 +34,7 @@
from using BOOL for internal functions 
 */
 
-#if defined(HAVE_IMMEDIATE_STRUCTURES)
+#if defined(HAVE_IMMEDIATE_STRUCTURES_XX_DISABLED)
 typedef struct {uint32 v;} NTSTATUS;
 #define NT_STATUS(x) ((NTSTATUS) { x })
 #define NT_STATUS_V(x) ((x).v)
@@ -44,7 +44,7 @@
 #define NT_STATUS_V(x) (x)
 #endif
 
-#if defined(HAVE_IMMEDIATE_STRUCTURES)
+#if defined(HAVE_IMMEDIATE_STRUCTURES_XX_DISABLED)
 typedef struct {uint32 w;} WERROR;
 #define W_ERROR(x) ((WERROR) { x })
 #define W_ERROR_V(x) ((x).w)

Modified: branches/SAMBA_3_0/source/libaddns/dnserr.h
===
--- branches/SAMBA_3_0/source/libaddns/dnserr.h 2006-09-23 21:35:25 UTC (rev 
18857)
+++ branches/SAMBA_3_0/source/libaddns/dnserr.h 2006-09-23 21:41:41 UTC (rev 
18858)
@@ -37,7 +37,7 @@
 
 /* Setup the DNS_ERROR typedef.  Technique takes from nt_status.h */
 
-#if defined(HAVE_IMMEDIATE_STRUCTURES)
+#if defined(HAVE_IMMEDIATE_STRUCTURES_XX_DISABLED)
 typedef struct {uint32 v;} DNS_ERROR;
 #define ERROR_DNS(x) ((DNS_ERROR) { x })
 #define ERROR_DNS_V(x) ((x).v)

Modified: branches/SAMBA_3_0/source/libsmb/clierror.c
===
--- branches/SAMBA_3_0/source/libsmb/clierror.c 2006-09-23 21:35:25 UTC (rev 
18857)
+++ branches/SAMBA_3_0/source/libsmb/clierror.c 2006-09-23 21:41:41 UTC (rev 
18858)
@@ -226,7 +226,7 @@
 }
 
 /* Return a UNIX errno from a NT status code */
-static struct {
+struct {
NTSTATUS status;
int error;
 } nt_errno_map[] = {



Build status as of Sun Sep 24 00:00:01 2006

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

--- /home/build/master/cache/broken_results.txt.old 2006-09-23 
00:00:38.0 +
+++ /home/build/master/cache/broken_results.txt 2006-09-24 00:00:04.0 
+
@@ -1,21 +1,21 @@
-Build status as of Sat Sep 23 00:00:02 2006
+Build status as of Sun Sep 24 00:00:01 2006
 
 Build counts:
 Tree Total  Broken Panic 
 SOC  0  0  0 
 build_farm   0  0  0 
-ccache   46 7  0 
-distcc   46 6  0 
-ldb  43 10 0 
-libreplace   42 2  0 
+ccache   45 7  0 
+distcc   45 6  0 
+ldb  42 8  0 
+libreplace   41 1  0 
 lorikeet-heimdal 0  0  0 
-ppp  18 0  0 
-rsync46 4  0 
+ppp  17 0  0 
+rsync45 4  0 
 samba0  0  0 
 samba-docs   0  0  0 
-samba4   44 22 1 
-samba_3_043 38 1 
-smb-build29 4  0 
-talloc   44 4  0 
-tdb  44 7  0 
+samba4   43 13 1 
+samba_3_042 38 1 
+smb-build28 4  0 
+talloc   43 3  0 
+tdb  43 5  0 
 


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

2006-09-23 Thread tridge
Author: tridge
Date: 2006-09-24 01:52:20 + (Sun, 24 Sep 2006)
New Revision: 18859

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

Log:

finally worked out what is going wrong with immediate structures. The
problem is that the AC_PROG_CC_C99 macro ends up selecting either
-std=std99 or -std=gnu99 for gcc. Ironically enough, that breaks
constant structure initialisers!

So, simplest solution is to not try that configure test if we know we
are using gcc

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


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/libreplace_cc.m4
===
--- branches/SAMBA_4_0/source/lib/replace/libreplace_cc.m4  2006-09-23 
21:41:41 UTC (rev 18858)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace_cc.m4  2006-09-24 
01:52:20 UTC (rev 18859)
@@ -28,7 +28,13 @@
 savedCFLAGS=$CFLAGS
 AC_PROG_CC
 CFLAGS=$savedCFLAGS
+
+dnl don't try for C99 if we are using gcc, as otherwise we 
+dnl lose immediate structure constants
+if test x$GCC = xno ; then
 AC_PROG_CC_C99
+fi
+
 if test x$GCC = xyes ; then
AC_MSG_CHECKING([for version of gcc])
GCC_VERSION=`$CC -dumpversion`
@@ -122,5 +128,26 @@
AC_MSG_ERROR([LIBREPLACE needs sizeof(long long) = 8])
 fi
 
+
+# check if the compiler can do immediate structures
+AC_CACHE_CHECK([for immediate structures],samba_cv_immediate_structures, [
+AC_TRY_COMPILE([
+#include stdio.h],
+[
+   typedef struct {unsigned x;} FOOBAR;
+   #define X_FOOBAR(x) ((FOOBAR) { x })
+   #define FOO_ONE X_FOOBAR(1)
+   FOOBAR f = FOO_ONE;   
+   static const struct {
+   FOOBAR y; 
+   } f2[] = {
+   {FOO_ONE}
+   };   
+],
+   samba_cv_immediate_structures=yes,samba_cv_immediate_structures=no)])
+if test x$samba_cv_immediate_structures = xyes; then
+   AC_DEFINE(HAVE_IMMEDIATE_STRUCTURES,1,[Whether the compiler supports 
immediate structures])
+fi
+
 AC__LIBREPLACE_ONLY_CC_CHECKS_END
 ]) dnl end AC_LIBREPLACE_CC_CHECKS



svn commit: samba r18860 - in branches/SAMBA_4_0/source: rpc_server/srvsvc rpc_server/winreg torture/rpc

2006-09-23 Thread tridge
Author: tridge
Date: 2006-09-24 02:05:37 + (Sun, 24 Sep 2006)
New Revision: 18860

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

Log:

fixed some code that bitrotted while we didn't have the safety check
with NTSTATUS, WERROR etc.

Modified:
   branches/SAMBA_4_0/source/rpc_server/srvsvc/dcesrv_srvsvc.c
   branches/SAMBA_4_0/source/rpc_server/winreg/rpc_winreg.c
   branches/SAMBA_4_0/source/torture/rpc/oxidresolve.c


Changeset:
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-24 
01:52:20 UTC (rev 18859)
+++ branches/SAMBA_4_0/source/rpc_server/srvsvc/dcesrv_srvsvc.c 2006-09-24 
02:05:37 UTC (rev 18860)
@@ -1255,7 +1255,7 @@
0,
0,
NULL);
-   if (status != WERR_OK) {
+   if (W_ERROR_EQUAL(status, WERR_OK)) {
return status;
}
break;
@@ -1272,7 +1272,7 @@
0,
0,
NULL);
-   if (status != WERR_OK) {
+   if (W_ERROR_EQUAL(status, WERR_OK)) {
return status;
}
break;
@@ -1289,7 +1289,7 @@
r-in.info.info2-max_users,
0,
NULL);
-   if (status != WERR_OK) {
+   if (W_ERROR_EQUAL(status, WERR_OK)) {
return status;
}
break;
@@ -1306,7 +1306,7 @@
0,
r-in.info.info501-csc_policy,
NULL);
-   if (status != WERR_OK) {
+   if (W_ERROR_EQUAL(status, WERR_OK)) {
return status;
}
break;
@@ -1323,7 +1323,7 @@
r-in.info.info502-max_users,
0,
r-in.info.info502-sd);
-   if (status != WERR_OK) {
+   if (W_ERROR_EQUAL(status, WERR_OK)) {
return status;
}
break;
@@ -1340,7 +1340,7 @@
0,
0,
NULL);
-   if (status != WERR_OK) {
+   if (W_ERROR_EQUAL(status, WERR_OK)) {
return status;
}
break;

Modified: branches/SAMBA_4_0/source/rpc_server/winreg/rpc_winreg.c
===
--- branches/SAMBA_4_0/source/rpc_server/winreg/rpc_winreg.c2006-09-24 
01:52:20 UTC (rev 18859)
+++ branches/SAMBA_4_0/source/rpc_server/winreg/rpc_winreg.c2006-09-24 
02:05:37 UTC (rev 18860)
@@ -527,7 +527,7 @@
DCESRV_PULL_HANDLE_FAULT(h, r-in.handle, HTYPE_REGKEY);
 
r-out.version = talloc(mem_ctx, uint32_t);
-   NT_STATUS_HAVE_NO_MEMORY(r-out.version);
+   W_ERROR_HAVE_NO_MEMORY(r-out.version);
 
*r-out.version = 5;
 

Modified: branches/SAMBA_4_0/source/torture/rpc/oxidresolve.c
===
--- branches/SAMBA_4_0/source/torture/rpc/oxidresolve.c 2006-09-24 01:52:20 UTC 
(rev 18859)
+++ branches/SAMBA_4_0/source/torture/rpc/oxidresolve.c 2006-09-24 02:05:37 UTC 
(rev 18860)
@@ -61,7 +61,7 @@
return 0;
}
 
-   if(!W_ERROR_IS_OK(r.out.hr)) {
+   if(!W_ERROR_IS_OK(*r.out.hr)) {
fprintf(stderr, RemoteActivation: %s\n, 
win_errstr(*r.out.hr));
return 0;
}



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

2006-09-23 Thread tridge
Author: tridge
Date: 2006-09-24 02:06:05 + (Sun, 24 Sep 2006)
New Revision: 18861

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

Log:

merge from samba3

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


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/replace.h
===
--- branches/SAMBA_4_0/source/lib/replace/replace.h 2006-09-24 02:05:37 UTC 
(rev 18860)
+++ branches/SAMBA_4_0/source/lib/replace/replace.h 2006-09-24 02:06:05 UTC 
(rev 18861)
@@ -333,6 +333,7 @@
  *
  * IRIX, HPUX, MacOS 10 and Solaris need BOOL_DEFINED
  * Tru64 needs _BOOL_EXISTS
+ * AIX needs _BOOL,_TRUE,_FALSE
  */
 #ifndef BOOL_DEFINED
 #define BOOL_DEFINED
@@ -340,6 +341,9 @@
 #ifndef _BOOL_EXISTS
 #define _BOOL_EXISTS
 #endif
+#ifndef _BOOL
+#define _BOOL
+#endif
 
 #ifndef __bool_true_false_are_defined
 #define __bool_true_false_are_defined
@@ -352,6 +356,13 @@
 #define false (0)
 #endif
 
+#ifndef _TRUE
+#define _TRUE
+#endif
+#ifndef _FALSE
+#define _FALSE
+#endif
+
 #ifndef HAVE_FUNCTION_MACRO
 #ifdef HAVE_func_MACRO
 #define __FUNCTION__ __func__



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

2006-09-23 Thread tridge
Author: tridge
Date: 2006-09-24 02:13:52 + (Sun, 24 Sep 2006)
New Revision: 18862

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

Log:

as andrew pointed our on irc, if we are going to define _TRUE, then
better make it be true :)

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


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/replace.h
===
--- branches/SAMBA_4_0/source/lib/replace/replace.h 2006-09-24 02:06:05 UTC 
(rev 18861)
+++ branches/SAMBA_4_0/source/lib/replace/replace.h 2006-09-24 02:13:52 UTC 
(rev 18862)
@@ -357,10 +357,10 @@
 #endif
 
 #ifndef _TRUE
-#define _TRUE
+#define _TRUE true
 #endif
 #ifndef _FALSE
-#define _FALSE
+#define _FALSE false
 #endif
 
 #ifndef HAVE_FUNCTION_MACRO



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

2006-09-23 Thread tridge
Author: tridge
Date: 2006-09-24 02:28:28 + (Sun, 24 Sep 2006)
New Revision: 18863

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

Log:

the test for immediate structures has moved to lib/replace/

Modified:
   branches/SAMBA_3_0/source/configure.in


Changeset:
Modified: branches/SAMBA_3_0/source/configure.in
===
--- branches/SAMBA_3_0/source/configure.in  2006-09-24 02:13:52 UTC (rev 
18862)
+++ branches/SAMBA_3_0/source/configure.in  2006-09-24 02:28:28 UTC (rev 
18863)
@@ -324,7 +324,7 @@
   CFLAGS=-O
 fi
 
-CFLAGS=${CFLAGS} -D_SAMBA_BUILD_
+CFLAGS=${CFLAGS} -D_SAMBA_BUILD_=3
 
 AC_LIBREPLACE_CC_CHECKS
 
@@ -993,27 +993,6 @@
 
 
 # check if the compiler can do immediate structures
-AC_CACHE_CHECK([for immediate structures],samba_cv_immediate_structures, [
-AC_TRY_COMPILE([
-#include stdio.h],
-[
-   typedef struct {unsigned x;} FOOBAR;
-   #define X_FOOBAR(x) ((FOOBAR) { x })
-   #define FOO_ONE X_FOOBAR(1)
-   FOOBAR f = FOO_ONE;   
-   struct {
-   FOOBAR y; 
-   } f2[] = {
-   {FOO_ONE}
-   };   
-],
-   samba_cv_immediate_structures=yes,samba_cv_immediate_structures=no)])
-if test x$samba_cv_immediate_structures = xyes; then
-   AC_DEFINE(HAVE_IMMEDIATE_STRUCTURES,1,[Whether the compiler supports 
immediate structures])
-fi
-
-
-# check if the compiler can do immediate structures
 AC_CACHE_CHECK([if the compiler will optimize out function 
calls],samba_cv_optimize_out_funcation_calls, [
 AC_TRY_LINK([
 #include stdio.h],



svn commit: samba r18864 - in branches/SAMBA_3_0/source/lib/replace: .

2006-09-23 Thread tridge
Author: tridge
Date: 2006-09-24 02:29:12 + (Sun, 24 Sep 2006)
New Revision: 18864

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

Log:

merge lib/replace changes from samba4

Modified:
   branches/SAMBA_3_0/source/lib/replace/README
   branches/SAMBA_3_0/source/lib/replace/libreplace.m4
   branches/SAMBA_3_0/source/lib/replace/libreplace_cc.m4
   branches/SAMBA_3_0/source/lib/replace/replace.h


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/README
===
--- branches/SAMBA_3_0/source/lib/replace/README2006-09-24 02:28:28 UTC 
(rev 18863)
+++ branches/SAMBA_3_0/source/lib/replace/README2006-09-24 02:29:12 UTC 
(rev 18864)
@@ -65,6 +65,12 @@
 PATH_NAME_MAX
 UINT{16,32,64}_MAX
 INT32_MAX
+RTLD_LAZY
+HOST_NAME_MAX
+UINT16_MAX
+UINT32_MAX
+UINT64_MAX
+CHAR_BIT
 
 Macros:
 va_copy
@@ -72,6 +78,7 @@
 __STRING
 MIN
 MAX
+QSORT_CAST
 
 Prerequisites:
 memset (for bzero)

Modified: branches/SAMBA_3_0/source/lib/replace/libreplace.m4
===
--- branches/SAMBA_3_0/source/lib/replace/libreplace.m4 2006-09-24 02:28:28 UTC 
(rev 18863)
+++ branches/SAMBA_3_0/source/lib/replace/libreplace.m4 2006-09-24 02:29:12 UTC 
(rev 18864)
@@ -267,10 +267,10 @@
 AC_CHECK_FUNCS(strtoull __strtoull strtouq strtoll __strtoll strtoq)
 
 # this test disabled as we don't actually need __VA_ARGS__ yet
-# AC_TRY_CPP([
-# #define eprintf(...) fprintf(stderr, __VA_ARGS__)
-# eprintf(bla, bar);
-# ], [], [AC_MSG_ERROR([__VA_ARGS__ is required])])
+AC_TRY_CPP([
+#define eprintf(...) fprintf(stderr, __VA_ARGS__)
+eprintf(bla, bar);
+], AC_DEFINE(HAVE__VA_ARGS__MACRO, 1, [Whether the __VA_ARGS__ macro is 
available]))
 
 # Check prerequisites
 AC_CHECK_FUNCS([memset printf syslog], [], 

Modified: branches/SAMBA_3_0/source/lib/replace/libreplace_cc.m4
===
--- branches/SAMBA_3_0/source/lib/replace/libreplace_cc.m4  2006-09-24 
02:28:28 UTC (rev 18863)
+++ branches/SAMBA_3_0/source/lib/replace/libreplace_cc.m4  2006-09-24 
02:29:12 UTC (rev 18864)
@@ -28,7 +28,13 @@
 savedCFLAGS=$CFLAGS
 AC_PROG_CC
 CFLAGS=$savedCFLAGS
+
+dnl don't try for C99 if we are using gcc, as otherwise we 
+dnl lose immediate structure constants
+if test x$GCC = xno ; then
 AC_PROG_CC_C99
+fi
+
 if test x$GCC = xyes ; then
AC_MSG_CHECKING([for version of gcc])
GCC_VERSION=`$CC -dumpversion`
@@ -122,5 +128,26 @@
AC_MSG_ERROR([LIBREPLACE needs sizeof(long long) = 8])
 fi
 
+
+# check if the compiler can do immediate structures
+AC_CACHE_CHECK([for immediate structures],samba_cv_immediate_structures, [
+AC_TRY_COMPILE([
+#include stdio.h],
+[
+   typedef struct {unsigned x;} FOOBAR;
+   #define X_FOOBAR(x) ((FOOBAR) { x })
+   #define FOO_ONE X_FOOBAR(1)
+   FOOBAR f = FOO_ONE;   
+   static const struct {
+   FOOBAR y; 
+   } f2[] = {
+   {FOO_ONE}
+   };   
+],
+   samba_cv_immediate_structures=yes,samba_cv_immediate_structures=no)])
+if test x$samba_cv_immediate_structures = xyes; then
+   AC_DEFINE(HAVE_IMMEDIATE_STRUCTURES,1,[Whether the compiler supports 
immediate structures])
+fi
+
 AC__LIBREPLACE_ONLY_CC_CHECKS_END
 ]) dnl end AC_LIBREPLACE_CC_CHECKS

Modified: branches/SAMBA_3_0/source/lib/replace/replace.h
===
--- branches/SAMBA_3_0/source/lib/replace/replace.h 2006-09-24 02:28:28 UTC 
(rev 18863)
+++ branches/SAMBA_3_0/source/lib/replace/replace.h 2006-09-24 02:29:12 UTC 
(rev 18864)
@@ -357,10 +357,10 @@
 #endif
 
 #ifndef _TRUE
-#define _TRUE
+#define _TRUE true
 #endif
 #ifndef _FALSE
-#define _FALSE
+#define _FALSE false
 #endif
 
 #ifndef HAVE_FUNCTION_MACRO



svn commit: samba r18865 - in branches/SAMBA_3_0/source: libsmb rpcclient utils

2006-09-23 Thread tridge
Author: tridge
Date: 2006-09-24 02:32:34 + (Sun, 24 Sep 2006)
New Revision: 18865

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

Log:

fixed some of the most obvious NTSTATUS/WERROR mixups in Samba3. It
still doesn't compile with immediate structures and the
NTSTATUS/WERROR separation, as there are still several places where
the two error types are mixed up. I haven't fixed those as they
require decisions about the rpcclient code that I really don't want to
get into (the error handling there is a mess)

So samba3 compiles now, but only becaise HAVE_IMMEDIATE_STRUCTURES is
not used (look for HAVE_IMMEDIATE_STRUCTURES_XX_DISABLED)

Modified:
   branches/SAMBA_3_0/source/libsmb/clierror.c
   branches/SAMBA_3_0/source/libsmb/libsmbclient.c
   branches/SAMBA_3_0/source/libsmb/nterr.c
   branches/SAMBA_3_0/source/rpcclient/cmd_srvsvc.c
   branches/SAMBA_3_0/source/utils/net_rpc.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/clierror.c
===
--- branches/SAMBA_3_0/source/libsmb/clierror.c 2006-09-24 02:29:12 UTC (rev 
18864)
+++ branches/SAMBA_3_0/source/libsmb/clierror.c 2006-09-24 02:32:34 UTC (rev 
18865)
@@ -226,7 +226,7 @@
 }
 
 /* Return a UNIX errno from a NT status code */
-struct {
+static const struct {
NTSTATUS status;
int error;
 } nt_errno_map[] = {

Modified: branches/SAMBA_3_0/source/libsmb/libsmbclient.c
===
--- branches/SAMBA_3_0/source/libsmb/libsmbclient.c 2006-09-24 02:29:12 UTC 
(rev 18864)
+++ branches/SAMBA_3_0/source/libsmb/libsmbclient.c 2006-09-24 02:32:34 UTC 
(rev 18865)
@@ -2472,7 +2472,7 @@
void *state)
 {
 int i;
-   WERROR result;
+   NTSTATUS result;
uint32 enum_hnd;
 uint32 info_level = 1;
uint32 preferred_len = 0x;
@@ -2509,7 +2509,7 @@
   enum_hnd);
 
 /* Was it successful? */
-   if (!W_ERROR_IS_OK(result) || numentries == 0) {
+   if (!NT_STATUS_IS_OK(result) || numentries == 0) {
 /*  Nope.  Go clean up. */
goto done;
 }
@@ -2531,7 +2531,7 @@
 TALLOC_FREE(mem_ctx);
 
 /* Tell 'em if it worked */
-return W_ERROR_IS_OK(result) ? 0 : -1;
+return NT_STATUS_IS_OK(result) ? 0 : -1;
 }
 
 

Modified: branches/SAMBA_3_0/source/libsmb/nterr.c
===
--- branches/SAMBA_3_0/source/libsmb/nterr.c2006-09-24 02:29:12 UTC (rev 
18864)
+++ branches/SAMBA_3_0/source/libsmb/nterr.c2006-09-24 02:32:34 UTC (rev 
18865)
@@ -28,7 +28,7 @@
NTSTATUS nt_errcode;
 } nt_err_code_struct;
 
-static nt_err_code_struct nt_errs[] =
+static const nt_err_code_struct nt_errs[] =
 {
{ NT_STATUS_OK, NT_STATUS_OK },
{ NT_STATUS_UNSUCCESSFUL, NT_STATUS_UNSUCCESSFUL },

Modified: branches/SAMBA_3_0/source/rpcclient/cmd_srvsvc.c
===
--- branches/SAMBA_3_0/source/rpcclient/cmd_srvsvc.c2006-09-24 02:29:12 UTC 
(rev 18864)
+++ branches/SAMBA_3_0/source/rpcclient/cmd_srvsvc.c2006-09-24 02:32:34 UTC 
(rev 18865)
@@ -172,7 +172,7 @@
 {
uint32 info_level = 101;
union srvsvc_NetSrvInfo ctr;
-   WERROR result;
+   NTSTATUS result;
 
if (argc  2) {
printf(Usage: %s [infolevel]\n, argv[0]);

Modified: branches/SAMBA_3_0/source/utils/net_rpc.c
===
--- branches/SAMBA_3_0/source/utils/net_rpc.c   2006-09-24 02:29:12 UTC (rev 
18864)
+++ branches/SAMBA_3_0/source/utils/net_rpc.c   2006-09-24 02:32:34 UTC (rev 
18865)
@@ -3014,7 +3014,7 @@
TALLOC_CTX *mem_ctx,int argc,
const char **argv)
 {
-   WERROR result;
+   NTSTATUS result;
char *sharename;
char *path;
uint32 type = STYPE_DISKTREE; /* only allow disk shares to be added */
@@ -3047,7 +3047,7 @@
 
result = rpccli_srvsvc_NetShareAdd(pipe_hnd, mem_ctx, NULL, level, 
   
info, parm_error);
-   return werror_to_ntstatus(result);
+   return result;
 }
 
 static int rpc_share_add(int argc, const char **argv)
@@ -3084,10 +3084,10 @@
int argc,
const char **argv)
 {
-   WERROR result;
+   NTSTATUS result;
 
result = rpccli_srvsvc_NetShareDel(pipe_hnd, mem_ctx, NULL, argv[0], 0);
-   return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
+   return NT_STATUS_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
 }
 
 /** 
@@ -3128,7 +3128,7 @@
 
 }
 
-static WERROR get_share_info(struct rpc_pipe_client 

svn commit: samba r18866 - in branches/SAMBA_3_0/source/lib: .

2006-09-23 Thread tridge
Author: tridge
Date: 2006-09-24 02:49:04 + (Sun, 24 Sep 2006)
New Revision: 18866

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

Log:
Jeremy and Volker have given the go-ahead on the group mapping ldb
code. Yay!

This first commit copies lib/ldb/ from Samba4. A huge congratulations
should go to Simo on this - he has put an enormous amount of work into
ldb, and it's great to see it go into the Samba3 tree.

Added:
   branches/SAMBA_3_0/source/lib/ldb/


Changeset:
Copied: branches/SAMBA_3_0/source/lib/ldb (from rev 18865, 
branches/SAMBA_4_0/source/lib/ldb)



svn commit: samba r18867 - in branches/SAMBA_3_0/source: . groupdb script/tests

2006-09-23 Thread tridge
Author: tridge
Date: 2006-09-24 02:52:25 + (Sun, 24 Sep 2006)
New Revision: 18867

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

Log:

change the group mapping code to use ldb instead of tdb

See the discussion of this on the samba-technical list

Added:
   branches/SAMBA_3_0/source/groupdb/mapping.h
   branches/SAMBA_3_0/source/groupdb/mapping_ldb.c
   branches/SAMBA_3_0/source/groupdb/mapping_tdb.c
   branches/SAMBA_3_0/source/script/tests/test_groupmap.sh
Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/aclocal.m4
   branches/SAMBA_3_0/source/groupdb/mapping.c


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


svn commit: samba r18868 - in branches/SAMBA_3_0/source/groupdb: .

2006-09-23 Thread tridge
Author: tridge
Date: 2006-09-24 02:58:58 + (Sun, 24 Sep 2006)
New Revision: 18868

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

Log:

just in case there is a disaster (with our code? never ...) use a
rename to group_mapping.tdb.upgraded rather than an unlink when
upgrading. So if we absolutely have to go back to the tdb, we can
change mapping_ldb.o to mapping_tdb.o in Makefile.in and recover
peoples group mappings.

We could go one step futher and make the backend configurable. Any
opinions on that?

Modified:
   branches/SAMBA_3_0/source/groupdb/mapping_ldb.c


Changeset:
Modified: branches/SAMBA_3_0/source/groupdb/mapping_ldb.c
===
--- branches/SAMBA_3_0/source/groupdb/mapping_ldb.c 2006-09-24 02:52:25 UTC 
(rev 18867)
+++ branches/SAMBA_3_0/source/groupdb/mapping_ldb.c 2006-09-24 02:58:58 UTC 
(rev 18868)
@@ -643,6 +643,8 @@
 {
static TDB_CONTEXT *tdb;
int ret, status=0;
+   pstring old_path;
+   pstring new_path;
 
tdb = tdb_open_log(tdb_path, 0, TDB_DEFAULT, O_RDWR, 0600);
if (tdb == NULL) goto failed;
@@ -657,8 +659,11 @@
 
if (tdb) tdb_close(tdb);
 
-   if (unlink(tdb_path) != 0) {
-   DEBUG(0,(Failed to delete old group mapping database\n));
+   pstrcpy(old_path, tdb_path);
+   pstrcpy(new_path, lock_path(group_mapping.tdb.upgraded));
+
+   if (rename(old_path, new_path) != 0) {
+   DEBUG(0,(Failed to rename old group mapping database\n));
goto failed;
}
return True;



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

2006-09-23 Thread tridge
Author: tridge
Date: 2006-09-24 03:15:58 + (Sun, 24 Sep 2006)
New Revision: 18869

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

Log:

two build fixes for systems without ldap

the first is to not enable the ldap ldb backend just yet. This will
need configure tests to conditionally include. We should be able to
use the m4 files from lib/ldb/

The 2nd is to fix libads/gpo.o not to publicly prototype a function
that needs ldap.h

Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/include/ads_protos.h
   branches/SAMBA_3_0/source/libads/gpo.c


Changeset:
Modified: branches/SAMBA_3_0/source/Makefile.in
===
--- branches/SAMBA_3_0/source/Makefile.in   2006-09-24 02:58:58 UTC (rev 
18868)
+++ branches/SAMBA_3_0/source/Makefile.in   2006-09-24 03:15:58 UTC (rev 
18869)
@@ -789,7 +789,8 @@
   lib/ldb/modules/objectclass.o \
   lib/ldb/modules/paged_results.o lib/ldb/modules/sort.o 
lib/ldb/modules/asq.o
 
-LDB_LDAP_OBJ=lib/ldb/ldb_ldap/ldb_ldap.o
+# disabled until build issues sorted out
+# LDB_LDAP_OBJ=lib/ldb/ldb_ldap/ldb_ldap.o
 
 LDB_OBJ = ${LDB_COMMON_OBJ} ${LDB_TDB_OBJ} ${LDB_LDAP_OBJ} ${LDB_MODULES_OBJ}
 

Modified: branches/SAMBA_3_0/source/include/ads_protos.h
===
--- branches/SAMBA_3_0/source/include/ads_protos.h  2006-09-24 02:58:58 UTC 
(rev 18868)
+++ branches/SAMBA_3_0/source/include/ads_protos.h  2006-09-24 03:15:58 UTC 
(rev 18869)
@@ -87,3 +87,9 @@
 BOOL(*fn)(char *, void **, void *),
 void *data_area);
 void ads_dump(ADS_STRUCT *ads, LDAPMessage *res);
+
+ADS_STATUS ads_parse_gpo(ADS_STRUCT *ads,
+TALLOC_CTX *mem_ctx,
+LDAPMessage *res,
+const char *gpo_dn,
+struct GROUP_POLICY_OBJECT *gpo);

Modified: branches/SAMBA_3_0/source/libads/gpo.c
===
--- branches/SAMBA_3_0/source/libads/gpo.c  2006-09-24 02:58:58 UTC (rev 
18868)
+++ branches/SAMBA_3_0/source/libads/gpo.c  2006-09-24 03:15:58 UTC (rev 
18869)
@@ -362,11 +362,11 @@
return ads_gen_mod(ads, link_dn, mods); 
 }
 
-ADS_STATUS ads_parse_gpo(ADS_STRUCT *ads,
-TALLOC_CTX *mem_ctx,
-LDAPMessage *res,
-const char *gpo_dn,
-struct GROUP_POLICY_OBJECT *gpo)
+ ADS_STATUS ads_parse_gpo(ADS_STRUCT *ads,
+ TALLOC_CTX *mem_ctx,
+ LDAPMessage *res,
+ const char *gpo_dn,
+ struct GROUP_POLICY_OBJECT *gpo)
 {
ZERO_STRUCTP(gpo);
 



svn commit: samba-web r1041 - in trunk: .

2006-09-23 Thread sfrench
Author: sfrench
Date: 2006-09-24 04:13:50 + (Sun, 24 Sep 2006)
New Revision: 1041

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

Log:
Check in scratch version of CIFS POSIX Extensions protocol reference page

Added:
   trunk/CIFS_POSIX_extensions.html


Changeset:
Added: trunk/CIFS_POSIX_extensions.html
===
--- trunk/CIFS_POSIX_extensions.html2006-09-22 18:19:54 UTC (rev 1040)
+++ trunk/CIFS_POSIX_extensions.html2006-09-24 04:13:50 UTC (rev 1041)
@@ -0,0 +1,63 @@
+!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
+!-- saved from url=(0049)http://www.samba.org/samba/Linux_CIFS_client.html --
+HTMLHEAD
+TITLELinux CIFS Client/TITLE
+META http-equiv=Content-Type content=text/html; charset=iso-8859-1
+META content=IBM WebSphere Studio Homepage Builder V6.0.2 for Windows 
name=GENERATOR
+META http-equiv=Content-Style-Type content=text/css
+/HEAD
+BODY onload=document.mirrorForm.mirrorLocation.selectedIndex=0BR
+BR
+nbsp;
+PLATEST UPDATES - CIFS POSIX Extensions presented at the 2006 Storage 
Developer Conference hosted by SNIA./P
+TABLE cellSpacing=2 cellPadding=2 width=100% border=0
+  CAPTION
+  /CAPTION
+  TBODY
+TR
+  TD bgColor=#ee colSpan=2!-- Title Bar --
+  CENTER
+  H1CIFS VFS -nbsp;/H1
+  /CENTER
+  CENTER
+  H1Protocol extensions to the Common Internet File System for better 
POSIX file i/o semantics
+  nbsp;/H1
+  /CENTER
+  /TD
+/TR
+TR
+  TD vAlign=top width=20% bgColor=#ee!-- Menu (Left Column) 
--!-- Menu --
+  CENTERIMG alt=http://us1.samba.org/samba/images/penguin.gif; 
src=samba/images/penguin.gif/CENTER
+  A 
+  href=mailto:[EMAIL PROTECTED]@us.ibm.comQuestions to 
developers/Anbsp;
+  UL
+LIA 
href=https://bugzilla.samba.org/buglist.cgi?query_format=specificorder=relevance+descbug_status=__open__product=CifsVFScontent=;Search
 for open bugs in bugzilla /A
+LIOlder Specifications
+   LIPresentations
+LIA 
href=http://www.snia.org/tech_activities/CIFS/CIFS-TR-1p00_FINAL.pdf;SNIA 
+CIFS Specification/Anbsp;
+
href=http://oss.software.ibm.com/developer/opensource/linux/presentations/samba/ut_cifs.pdf;r/A
+  /UL
+  /TD
+  TD vAlign=top bgColor=#ff!-- Main Contents --
+  PThe CIFS POSIX Extensions are protocol extensions to enable POSIX 
compliant
+  operating systems to better interoperate with CIFS servers 
+  and storage appliances by extending the SNIA CIFS Specification version
+  1.0.nbsp;nbsp;nbsp; Popular servers such as Samba, Windows
+  2000, Windows XP and many others support CIFS by default.nbsp;nbsp; 
These
+  extensions are already implemented in multiple clients and servers.
+  BR
+  nbsp;
+  /TD
+/TR
+TR
+  TD vAlign=top/TD
+  TD vAlign=topThanks to SNIA, IBM and the Samba TeamBR
+  nbsp;IMG src=samba/images/samba_banner.gif 
alt=http://us1.samba.org/samba/images/samba_banner.gif; BR
+  for their assistance 
+  and support./TD
+/TR
+  /TBODY
+/TABLE
+/BODY
+/HTML


Property changes on: trunk/CIFS_POSIX_extensions.html
___
Name: svn:executable
   + *