Re: [Samba] compiling 3.2.6 fails on fedora 10 i386

2008-12-23 Thread Karolin Seeger
Hi Adam,

On Mon, Dec 22, 2008 at 11:59:56AM -0600, Adam Williams wrote:
 I'm running samba-3.2.6/packaging/RHEL/makerpms.sh and get the following 
 error.  any ideas?
 
 make: Nothing to be done for `modules'.
 make: Nothing to be done for `pam_smbpass'.
 + cd client
 + gcc -o mount.cifs -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 
 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 
 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE 
 -Wall -D_GNU_SOURCE -D_LARGEFILE64_SOURCE mount.cifs.c
 /tmp/ccqZWMvv.o: In function `main':
 /root/rpmbuild/BUILD/samba-3.2.6/source/client/mount.cifs.c:1415: 
 undefined reference to `unlock_mtab'
 /root/rpmbuild/BUILD/samba-3.2.6/source/client/mount.cifs.c:1416: 
 undefined reference to `lock_mtab'
 /root/rpmbuild/BUILD/samba-3.2.6/source/client/mount.cifs.c:1462: 
 undefined reference to `unlock_mtab'
 /root/rpmbuild/BUILD/samba-3.2.6/source/client/mount.cifs.c:1424: 
 undefined reference to `unlock_mtab'
 collect2: ld returned 1 exit status
 error: Bad exit status from /var/tmp/rpm-tmp.hnGqfK (%build)
 
 
 RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.hnGqfK (%build)
 makerpms.sh: Done.

that's a relict in the spec file, I think.
We don't need to build [u]mount.cifs separatly any longer.
Please try the attached apcth and re-run makerps.sh. Does that solve the
problem?

Karolin
From 38049e2d470415ef691e2b6dc6f52fbb91ad849a Mon Sep 17 00:00:00 2001
From: Karolin Seeger ksee...@samba.org
Date: Tue, 23 Dec 2008 09:30:16 +0100
Subject: [PATCH] s3:samba.spec: Do not build mount.cifs separately.

That leads to linking errors.

Karolin
---
 packaging/RHEL/samba.spec.tmpl |5 -
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/packaging/RHEL/samba.spec.tmpl b/packaging/RHEL/samba.spec.tmpl
index 92030fc..3f6690a 100644
--- a/packaging/RHEL/samba.spec.tmpl
+++ b/packaging/RHEL/samba.spec.tmpl
@@ -178,11 +178,6 @@ fi
 make CFLAGS=$RPM_OPT_FLAGS -D_GNU_SOURCE %{?_smp_mflags} \
 	all modules pam_smbpass
 
-## build the cifs fs mount helper
-cd client
-gcc  -o mount.cifs $RPM_OPT_FLAGS  -D_GNU_SOURCE -Wall -D_GNU_SOURCE -D_LARGEFILE64_SOURCE mount.cifs.c
-gcc  -o umount.cifs $RPM_OPT_FLAGS  -D_GNU_SOURCE -Wall -D_GNU_SOURCE -D_LARGEFILE64_SOURCE umount.cifs.c
-cd ..
 
 # Remove some permission bits to avoid to many dependencies
 cd ..
-- 
1.6.0.2

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

Re: AW: [Samba] Run script ON SAMBA host - then client log in.

2008-12-23 Thread Proskurin Kirill

 Hello,
 in the [homes] section You need at fist
 root preexec= yourscript
 within this script you can handle smb vars

I try to add this in global settings and in [homes] - nothing work.

preexec = echo \%u connected to %S from %m (%I)\  /tmp/log


-- 
С уважением, Проскурин Кирилл.
Группа компаний Форекс Клуб
115093, Москва, ул. Щипок, 18
+7(495)727-06-26 доб. 1070
www.forexclub.ru

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


Re: [Samba] complete newbie sid problems

2008-12-23 Thread Graham Seaman

Rob Shinn wrote:

Do you have a complete sambaDomain record in your LDAP and is it at
the root level of the LDAP structure?

  

I have a sambaDomain record, whether it is complete, I don't know:

version: 1
dn: sambaDomainName=DHCP02,dc=theirorg,dc=ac,dc=uk
objectClass: top
objectClass: sambaDomain
objectClass: sambaUnixIdPool
gidNumber: 1000
sambaDomainName: DHCP02
sambaSID: S-1-5-21-1306896613-1613859276-828620297
uidNumber: 1001

Graham


On 12/19/08, Graham Seaman g.sea...@lse.ac.uk wrote:
  

Hi,

I'm trying to set up samba with ldap authorization on a windows network.
I have samba running on one linux host, and openldap on another. I have
used smbldap-tools to populate my directory and used smbldap-useradd to
create an initial testuser on the samba host. I can ssh in to the samba
host as the testuser ok, and get in to the testuser directory (ie. there
are no permission problems). But if I try to do `smbclient
//DOMAIN/testuser -U testuser` I get 'tree connect failed:
NT_STATUS_ACCESS_DENIED'. Looking at the samba log, I see:


[2008/12/19 17:08:30, 2] passdb/pdb_ldap.c:init_sam_from_ldap(545)
init_sam_from_ldap: Entry found for user: testuser
[2008/12/19 17:08:30, 2] passdb/pdb_ldap.c:init_group_from_ldap(2162)
init_group_from_ldap: Entry found for group: 513
[2008/12/19 17:08:30, 0] passdb/passdb.c:lookup_global_sam_name(596)
User testuser with invalid SID
S-1-5-21-1306896613-1613859276-828620297-3000 in passdb
[2008/12/19 17:08:30, 2] smbd/service.c:make_connection_snum(616)  user
'testuser' (from session setup) not permitted to access this share
(testuser)

net getlocalsid on the samba host gives:
SID for domain DOMAIN is: S-1-5-21-1306896613-1613859276-828620297

which matches the 'invalid SID' above. Looking in the ldap directory, I
see the uidNumber for testuser is 1000. The smbldap-tools documentation
say the algorithm to go from uid to sid is sid = 2 * uid + 1000, which
also matches the 'invalid SID'.

Any suggestions for what to do from here?

Thanks
Graham

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




  


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


Re: [Samba] Strange problem with samba-3.2.0-1

2008-12-23 Thread Adam Williams

u[grade to samba 3.2.6, there was some fixes to cups in 3.2.1 i think.

Jesper Langkjær wrote:

Hi

I'm new this group and normaly samba works like a charm, but not this time.

I have an fresh installed Fedora Core 9 with samba-3.2.0-1.pre3.9.fc9.i386.
For som reason we have LPRng 3.8 installed, but the problem are the same with 
Cups.

There are in fact two problems.
1. Can't see printers
We have load printers = yes and printing = lprng and the [printers] 
[printers]

comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = yes
writable = no
printable = yes
debug level = 10
But we can not see any printers.

Then we added
[prt1]
comment = Xerox printer
path = /var/spool/samba
printable = yes
public = yes
guest ok = yes
And now we have the seceond problem
When we print test print from XPpro it comes at once, the same if we use MS 
Office 2000/2003 and Open Office.
But If we use Wordpad, Notepad or Adobe Acrobat it hangs for 40 seconds or more.

And i'm stuck.
Any help for this chrismas problem ?

Kind regards

Jesper Langkjær




*
Denne e-mail er scannet for virus og spam
*
  

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


[Samba] Samba Transaction Implementation

2008-12-23 Thread Mahendran
Hi,


I am enhancing the Samba Server on our product (VxWorks on the box) to
support Long Name. So I started implementing the dialect LM1.2X002 (first
dialects that support Long Name, the current dialect that we support is PC
Network Program). I have implemented the Negotiation, Tree Connect AndX and
Open AndX command.



When I try access the shared drive of our product, after the Negotiation,
Tree Connect AndX and Open AndX, the Windows XP machine sends transaction2
command.



It first sends Trans2_Request, FIND_FIRST2 command with the level of
interest as SMB_INFO_QUERY_EA_SIZE. I send the response for this request. I
have totally 3 files (for implementation purpose I have only 3 files) in the
shared drive. I could form the packet and send response for this request. I
am sending all 3 files in the same packet. I am also sending 2 directories,
one for root and one for parent.


While forming the data block I set 2 bytes each for CreationDate,
CreationTime, LastAccessDate, LastAccessTime, LastWriteDate and
LastWriteTime. I set the values as 0 for now.



The client sends another transaction request Trans2_NEXT2 command with the
filename field as NULL string. I do not understand why this is being sent.



I am sending response for this packet as well with no files. (I assumed that
I had already sent all 3 files and this should be no files)



It opens the shared drive successfully and displays nothing.



According to me it should not send Trans2_NEXT2 command as there are only
3 files in the shared drive.



I have attached the ethereal capture (CaptureSMB1) for more information.



Look at the packet no 26 for Trans2_FIRST2 response.

Look at the packet no 31 for Trans2_NEXT2 response.



Could you please let me know where I am wrong? Your help will make me move
forward. Thank a lot.


Thank You


Regards,

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

Re: [Samba] compiling 3.2.6 fails on fedora 10 i386

2008-12-23 Thread Adam Williams

I applied the patch:

[r...@missioncontrol samba-3.2.6]# patch -p1  
0001-s3-samba.spec-Do-not-build-mount.cifs-separately.patch

(Stripping trailing CRs from patch.)
patching file packaging/RHEL/samba.spec.tmpl
Hunk #1 succeeded at 179 (offset 1 line).

But I still get the exact same error when running makerpms.sh.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Docu for Winbind using userprincipalName (UPN)

2008-12-23 Thread Carsten Witt
Hi Samba-Group,

my name is carsten from cologne. 

I would like to use samba/winbind in a Windows AD 2k3, 2k8  multi-domain 
environment as workstation.

All users from the AD should be able to logon via ssh for example.

It would great to use the MS userprincipalName  (UPN). I am using samba 
3.2.6.37 from sernet on a centos 5.2 system.

The normal authentication by domain+username works fine. 

Where can I find a howto configure using UPN for Winbind? 

thanks for any input
best
carsten
-- 
Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: 
http://www.gmx.net/de/go/multimessenger
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Re: sgid bit set on ordinary files mounted via smbfs

2008-12-23 Thread Ed Avis
Tom Van Deun tomvdeun at gmail.com writes:

The sgid bit is inherited from parent directories. Unmount the share and
look at the properties of the mount point folder.

It doesn't have any suid or sgid bit set:

# umount /mnt/shared/
# ls -ld /mnt/shared/
drwxr-xr-x+ 2 root root 4096 2007-11-28 16:21 /mnt/shared/

-- 
Ed Avis e...@waniasset.com

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


Re: [Samba] Docu for Winbind using userprincipalName (UPN)

2008-12-23 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Carsten Witt wrote:

 Where can I find a howto configure using UPN for Winbind? 

You don't need to do anything special for getent passwd u...@realm
to work (and hence user logins via pam_winbind as well.
But this is only supported in a native mode AD domain.





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

iD8DBQFJUR4KIR7qMdg1EfYRAllxAKCAGbzd7H0crNeBwO/Ct8q1Co/kDQCfZIbi
xK6yk5mW02GAtpfrl4FE2Fw=
=n5Np
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


RE: [Samba] Any Known Share limitations or performance issues with large file systems

2008-12-23 Thread Scott Elliott
I have user directories with thousands of files in multiple directories, just 
not single directories.  The file system is EXT3 managed by LVM.

-Original Message-
From: Volker Lendecke [mailto:volker.lende...@sernet.de]
Sent: Monday, December 22, 2008 10:32 PM
To: Scott Elliott
Cc: samba@lists.samba.org
Subject: Re: [Samba] Any Known Share limitations or performance issues with 
large file systems

On Mon, Dec 22, 2008 at 02:33:56PM -0800, Scott Elliott wrote:
 I am running samba-3.0.28-1.el5_2.1.x86_64.rpm on RHEL 5
 x64.  I am sharing out approximately 7TB via samba and a
 'few' of my users are complaining of latency when
 accessing their shares via Windows Explorer.  Mind you the
 disk is about 93% full which I am sure is a factor but
 before I go into battle I wanted  to make sure there were
 no known limitations or issues.

Do you have directories with many files in a single
directory? Many as in thousands? What file system is this?

Volker



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


Re: [Samba] Any Known Share limitations or performance issues with large file systems

2008-12-23 Thread Jeremy Allison
On Tue, Dec 23, 2008 at 09:34:06AM -0800, Scott Elliott wrote:
 I have user directories with thousands of files in multiple directories, just 
 not single directories.  The file system is EXT3 managed by LVM.

You might want to look at the experimental patch
I posted recently to deal with performance problems
on Linux+ext3 if people are complaining about write
speed.

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


Re: [Samba] Samba Transaction Implementation

2008-12-23 Thread Jeremy Allison
On Tue, Dec 23, 2008 at 08:05:41PM +0530, Mahendran wrote:
 Hi,
 
 
 I am enhancing the Samba Server on our product (VxWorks on the box) to
 support Long Name. So I started implementing the dialect LM1.2X002 (first
 dialects that support Long Name, the current dialect that we support is PC
 Network Program). I have implemented the Negotiation, Tree Connect AndX and
 Open AndX command.

What Samba version are you using ? We've supported these
dialects and trans2 for many many years ? How have you
cut Samba down so it doesn't include these commands ?

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


[Samba] Re: Authentication fails - 3.0.26a-0.9-1787-SUSE-SLES9

2008-12-23 Thread bdehn
 I recently brought up our fifth Samba domain member server with 
 3.0.26a-0.9-1787-SUSE-SLES9 against an NT4 domain on a new subnet. The 
 subnet also has an NT4 BDC that is working correctly. Wbinfo and getent 
 both work properly but users can not get to the [homes] service but can 
 get to another share that is on the same system. If I setup a share 
 definition in smb.conf for myself as a home share it fails with the same 

 error. All of our other Samba servers are working correctly. When a 
 connection is attempted they get the following:
 
 '/data2/home/OREILLY2/bdehn' does not exist or permission denied when 
 connecting to [bdehn] Error was Permission denied.
 
 I turned up the log level (5) and see that winbind show's me 
 authenticating correctly but still the Permission denied message. If I 
 stop and restart windbind I see the following in log.winbind:
 
 rpc_client/cli_pipe.c:cli_pipe_validate_current_pdu(625)
  cli_pipe_validate_current_pdu: RPC fault code DCERPC_FAULT_OP_RNG_ERROR 

 received from remote machine OREILLYTS6 pipe \lsarpc fnum 0x801!
 rpc_client/cli_pipe.c:cli_pipe_validate_current_pdu(601)
   cli_pipe_validate_current_pdu: Bind NACK received from remote machine 
 OREILLYTS6 pipe \samr fnum 0x802!
 rpc_client/cli_pipe.c:cli_rpc_pipe_open_ntlmssp_internal(2362)
   cli_rpc_pipe_open_ntlmssp_internal: cli_rpc_pipe_bind failed with 
error 
 NT_STATUS_NETWORK_ACCESS_DENIED
 
 I have re-joined the domain several times and deleted all tdb's. 
 
 Any help would be much appreciated!

 Bob Dehn

More info...

The [homes] section path had been defined as path = /data2/home/%D/%U/ 
which is identical to our other member servers. I changed the path 
statement to path = /data2/home/%U/ and moved the directories and it works 
fine. What could I have mis-configured that would cause the '%D' to not 
pickup the domain name? As I mentioned previously wbinfo and getent work 
great...

Thanks in advance for any help!

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


[Samba] [...@samba.org: Patch to improve Samba write speeds on Linux ext3 with 3.2.x]

2008-12-23 Thread Jeremy Allison
- Forwarded message from Jeremy Allison j...@samba.org -

From: Jeremy Allison j...@samba.org
To: samba-techni...@samba.org
Cc: j...@samba.org
Subject: Patch to improve Samba write speeds on Linux ext3 with 3.2.x
Reply-To: Jeremy Allison j...@samba.org

Hi all,

Intel recently did some research on Samba write speeds,
tested in Linux using ext3 resulting in the following
very interesting paper :

http://software.intel.com/en-us/articles/windows-client-cifs-behavior-can-slow-linux-nas-performance

This problem is only seen on Linux using the ext3
filesystem, not Linux with XFS or ext4. However Linux
with ext3 is one of our most popular platforms currently,
as it's what the major distros ship as default.

They subsequently sent me a paper including some simple
patches to Samba, which I've converted into a test patch
which should apply to any recent 3.2.x build.

I'd be interested to see if people can test this patch
to see if it improves Windows client write speed to Samba
in real-world cases (like the kind the people on this
list deal with every day :-).

I'm including this patch as an attachment. It is currently
experimental, and I need some feedback before we decide
if it's worth including in the mainline.

It alters the parameter strict allocate from a boolean
to a tri-state. To test, apply the patch and then add the
line :

strict allocate = partial

to the [global] section of your smb.conf and restart
smbd. I have one report so far of increased write performance
in IOZone benchmark tests from Windows, but I'd love
to get more data. Remember, this should only affect
write performance, not read.

The fix is simple enough that I could back-port it
to 3.0.x also if enough people demand it to test
(although I'm travelling between now + Sunday so
will only have intermittent email access).

Let me know how your tests go,

Thanks all !

Jeremy.

diff --git a/source/include/local.h b/source/include/local.h
index c125ded..b0fd7cb 100644
--- a/source/include/local.h
+++ b/source/include/local.h
@@ -253,4 +253,8 @@
 /* Windows minimum lock resolution timeout in ms */
 #define WINDOWS_MINIMUM_LOCK_TIMEOUT_MS 200
 
+/* When strict allocate = partial, define the limit on how far
+ * ahead we will write. */
+#define STRICT_ALLOCATE_PARTIAL_LIMIT 0x20
+
 #endif
diff --git a/source/include/smb.h b/source/include/smb.h
index bfada11..f1b6033 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -1966,4 +1966,10 @@ struct smb_extended_info {
char   samba_version_string[SAMBA_EXTENDED_INFO_VERSION_STRING_LENGTH];
 };
 
+enum smb_strict_allocate_options {
+   STRICT_ALLOCATE_OFF=0,
+   STRICT_ALLOCATE_ON=1,
+   STRICT_ALLOCATE_PARTIAL=2
+};
+
 #endif /* _SMB_H */
diff --git a/source/modules/vfs_default.c b/source/modules/vfs_default.c
index 88c7237..8a724ad 100644
--- a/source/modules/vfs_default.c
+++ b/source/modules/vfs_default.c
@@ -745,10 +745,14 @@ static int vfswrap_ftruncate(vfs_handle_struct *handle, 
files_struct *fsp, SMB_O
SMB_STRUCT_STAT st;
char c = 0;
SMB_OFF_T currpos;
+   enum smb_strict_allocate_options sa_options = 
lp_strict_allocate(SNUM(fsp-conn));
 
START_PROFILE(syscall_ftruncate);
 
-   if (lp_strict_allocate(SNUM(fsp-conn))) {
+   /* Only use allocation truncate if strict allocate
+* is set on, not off or partial.
+*/
+   if (sa_options == STRICT_ALLOCATE_ON) {
result = strict_allocate_ftruncate(handle, fsp, len);
END_PROFILE(syscall_ftruncate);
return result;
diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index 81a308e..f3878c2 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -445,7 +445,7 @@ struct service {
bool bWidelinks;
bool bSymlinks;
bool bSyncAlways;
-   bool bStrictAllocate;
+   int iStrictAllocate;
bool bStrictSync;
char magic_char;
struct bitmap *copymap;
@@ -588,7 +588,7 @@ static struct service sDefault = {
True,   /* bWidelinks */
True,   /* bSymlinks */
False,  /* bSyncAlways */
-   False,  /* bStrictAllocate */
+   STRICT_ALLOCATE_OFF,/* iStrictAllocate */
False,  /* bStrictSync */
'~',/* magic char */
NULL,   /* copymap */
@@ -861,6 +861,21 @@ static const struct enum_list enum_config_backend[] = {
{-1, NULL}
 };
 
+static const struct enum_list enum_strict_allocate[] = {
+   {STRICT_ALLOCATE_OFF, No},
+   {STRICT_ALLOCATE_OFF, False},
+   {STRICT_ALLOCATE_OFF, 0},
+   {STRICT_ALLOCATE_OFF, Off},
+   {STRICT_ALLOCATE_OFF, disabled},
+   {STRICT_ALLOCATE_ON, Yes},
+   {STRICT_ALLOCATE_ON, True},
+   {STRICT_ALLOCATE_ON, 1},
+   {STRICT_ALLOCATE_ON, On},
+   {STRICT_ALLOCATE_ON, enabled},
+   

Re: [Samba] Any Known Share limitations or performance issues with large file systems

2008-12-23 Thread Ryan Bair
You may want to try switching to the deadline I/O scheduler. I had
issues with slow directory listings using the CFQ scheduler when the
server was under even the slightest load. I tried tweaking some of the
CFQ settings but ultimately gave up as I could never beat the
responsiveness of the deadline scheduler.

On Mon, Dec 22, 2008 at 5:33 PM, Scott Elliott selli...@ata-e.com wrote:
 All,

 I am running samba-3.0.28-1.el5_2.1.x86_64.rpm on RHEL 5 x64.  I am sharing 
 out approximately 7TB via samba and a 'few' of my users are complaining of 
 latency when accessing their shares via Windows Explorer.  Mind you the disk 
 is about 93% full which I am sure is a factor but before I go into battle I 
 wanted  to make sure there were no known limitations or issues.



 Thanks in advance



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

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


[Samba] Samba share to use AD for authentication

2008-12-23 Thread James D. Parra
Hello,

I setup a Linux box to join an AD domain, which it did, and set up a share
on the Linux box, but I am not sure how to have the samba share authenticate
users via the AD.

Does anyone have any pointers on how to do this?

Thank you,

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


Re: [Samba] Samba share to use AD for authentication

2008-12-23 Thread Kums
James,

You need to use Winbind to enable Samba authenticate users via AD.

Please see the following link for more info:
http://technet.microsoft.com/en-au/magazine/dd228986.aspx

Also, you need to add AD info in smb.conf
workgroup = DOMAIN_NAME
realm = AD_REALM
security = ADS
auth methods = winbind
password server = AD_Server_IP

HTH,
-Kums

On Tue, Dec 23, 2008 at 5:03 PM, James D. Parra jam...@musicreports.comwrote:

 Hello,

 I setup a Linux box to join an AD domain, which it did, and set up a share
 on the Linux box, but I am not sure how to have the samba share
 authenticate
 users via the AD.

 Does anyone have any pointers on how to do this?

 Thank you,

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

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


[Samba] access denied message not the login prompt

2008-12-23 Thread joel valenzuela
hi all,

i have a samba server setup in workgroup(i.e standalone).running perfectly only 
that when a certain user is not allowed access to a share he gets a login 
prompt not the access denied message.can this be fix i mean  the other way 
around in which samba should display the access denied message not the login 
prompt. i am running samba 3.0.23d mandriva 2007 box.

Tnx and Happy Holidays everyone!

Joel



  Adding more friends is quick and easy.lt;/agt;lt;brgt;Import them 
over to Yahoo! Mail today! http://www.trueswitch.com/yahoo-sg
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Solved with samba-3.2.6: Resources hog, etc

2008-12-23 Thread FC Mario Patty
Hi people,

After upgraded samba from 3.0.32 to 3.2.6 in Dec 11, we've never had the
server hang problem again - thank to samba team. As with the win98/Me
users I added lanman auth = yes into smb.conf and mapped samba share in
windows. There is a little problem, though. The mapped directory dissapear
randomly. But if we refresh it, it will show up again. To handle this, I add
streams_xattr value in smb.conf:

vfs objects = full_audit streams_xattr

I'm monitoring it now and I will let you know the result. Many thanks for
every effort you've done.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Solaris 8 and Solaris 10

2008-12-23 Thread James Chavez
All,
Is there a mount.cifs utility or mount_smbfs for Solaris 8 and Solaris
10. I would like to map drives to my Windows servers from Solaris.
smbclient works great for accessing files but I want to map the drives.

Thank you
James

CONFIDENTIALITY
This e-mail message and any attachments thereto, is intended only for use by 
the addressee(s) named herein and may contain legally privileged and/or 
confidential information. If you are not the intended recipient of this e-mail 
message, you are hereby notified that any dissemination, distribution or 
copying of this e-mail message, and any attachments thereto, is strictly 
prohibited.  If you have received this e-mail message in error, please 
immediately notify the sender and permanently delete the original and any 
copies of this email and any prints thereof.
ABSENT AN EXPRESS STATEMENT TO THE CONTRARY HEREINABOVE, THIS E-MAIL IS NOT 
INTENDED AS A SUBSTITUTE FOR A WRITING.  Notwithstanding the Uniform Electronic 
Transactions Act or the applicability of any other law of similar substance and 
effect, absent an express statement to the contrary hereinabove, this e-mail 
message its contents, and any attachments hereto are not intended to represent 
an offer or acceptance to enter into a contract and are not otherwise intended 
to bind the sender, Sanmina-SCI Corporation (or any of its subsidiaries), or 
any other person or entity.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[SCM] Samba Shared Repository - branch master updated - 4d02bbbfb4d74367bde0f768c02ddb99910ef62d

2008-12-23 Thread Tim Prouty
The branch, master has been updated
   via  4d02bbbfb4d74367bde0f768c02ddb99910ef62d (commit)
  from  8ce77a57ccc4d5ff4a216d74c4fc58782fc9098c (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 4d02bbbfb4d74367bde0f768c02ddb99910ef62d
Author: Tim Prouty tpro...@samba.org
Date:   Mon Dec 22 22:35:24 2008 -0800

s3: Fix stream marshalling to return the correct streaminfo status

When there are enough streams on a file to fill up the max_data_count
when responding to a trans2 streaminfo, samba is returning
NT_STATUS_BUFFER_TOO_SMALL.  Windows handles this by returning
NT_STATUS_BUFFER_OVERFLOW while still sending as much of the data that
it can fit into the buffer.  When the windows client sees
BUFFER_OVERFLOW, it retries the streaminfo with a larger buffer (2x).
The windows client starts at 2K and will continue increasing the
buffer size by two until it reaches 64K.  If the streams don't fit in
64K the windows client seems to give up.

This patch fixes marshall_stream_info to overfill the buffer by 1
stream so that send_trans2_replies can properly detect the overflow
and return the correct status.

---

Summary of changes:
 source3/smbd/trans2.c |   11 +--
 1 files changed, 1 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 27e2951..1d724ba 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -3687,7 +3687,7 @@ static NTSTATUS marshall_stream_info(unsigned int 
num_streams,
unsigned int i;
unsigned int ofs = 0;
 
-   for (i=0; inum_streams; i++) {
+   for (i = 0; i  num_streams  ofs = max_data_bytes; i++) {
unsigned int next_offset;
size_t namelen;
smb_ucs2_t *namebuf;
@@ -3706,11 +3706,6 @@ static NTSTATUS marshall_stream_info(unsigned int 
num_streams,
 
namelen -= 2;
 
-   if (ofs + 24 + namelen  max_data_bytes) {
-   TALLOC_FREE(namebuf);
-   return NT_STATUS_BUFFER_TOO_SMALL;
-   }
-
SIVAL(data, ofs+4, namelen);
SOFF_T(data, ofs+8, streams[i].size);
SOFF_T(data, ofs+16, streams[i].alloc_size);
@@ -3725,10 +3720,6 @@ static NTSTATUS marshall_stream_info(unsigned int 
num_streams,
else {
unsigned int align = ndr_align_size(next_offset, 8);
 
-   if (next_offset + align  max_data_bytes) {
-   return NT_STATUS_BUFFER_TOO_SMALL;
-   }
-
memset(data+next_offset, 0, align);
next_offset += align;
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 00b61ff2cfa145f9c0bcf74a7a2672e1172fb9c1

2008-12-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  00b61ff2cfa145f9c0bcf74a7a2672e1172fb9c1 (commit)
  from  58cfb1a9e1470b86f664e489e20cde7af294d07b (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 00b61ff2cfa145f9c0bcf74a7a2672e1172fb9c1
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Dec 23 11:44:10 2008 +0100

samba.tests.samdb: Fix test after merger of samba.security and
samba.dcerpc.security

---

Summary of changes:
 source4/scripting/python/samba/tests/samdb.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/samba/tests/samdb.py 
b/source4/scripting/python/samba/tests/samdb.py
index 97be567..cce6ea8 100644
--- a/source4/scripting/python/samba/tests/samdb.py
+++ b/source4/scripting/python/samba/tests/samdb.py
@@ -22,7 +22,7 @@ import os
 from samba.provision import setup_samdb, guess_names, setup_templatesdb, 
make_smbconf
 from samba.samdb import SamDB
 from samba.tests import cmdline_loadparm, TestCaseInTempDir
-from samba import security
+from samba.dcerpc import security
 from unittest import TestCase
 import uuid
 from samba import param


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 4bbd2cbab73d46d0f8e8ba3fe164b6802b379b06

2008-12-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  4bbd2cbab73d46d0f8e8ba3fe164b6802b379b06 (commit)
  from  00b61ff2cfa145f9c0bcf74a7a2672e1172fb9c1 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 4bbd2cbab73d46d0f8e8ba3fe164b6802b379b06
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Dec 23 11:48:14 2008 +0100

pyldb: Provide replacement for sizeargfunc, not available before Python2.5.

---

Summary of changes:
 source4/lib/ldb/pyldb.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c
index f4f43a3..ed77add 100644
--- a/source4/lib/ldb/pyldb.c
+++ b/source4/lib/ldb/pyldb.c
@@ -32,6 +32,7 @@
 #if PY_MAJOR_VERSION == 2  PY_MINOR_VERSION  5
 typedef int Py_ssize_t;
 typedef inquiry lenfunc;
+typedef intargfunc sizeargfunc;
 #endif
 
 /* Picked out of thin air. To do this properly, we should probably have some 
part of the 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 58cfb1a9e1470b86f664e489e20cde7af294d07b

2008-12-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  58cfb1a9e1470b86f664e489e20cde7af294d07b (commit)
  from  4d02bbbfb4d74367bde0f768c02ddb99910ef62d (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 58cfb1a9e1470b86f664e489e20cde7af294d07b
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Dec 23 11:25:06 2008 +0100

python: Define Py_ssize_t if the Python library doesn't.

---

Summary of changes:
 source4/lib/ldb/pyldb.c |6 ++
 source4/param/pyparam.c |6 ++
 2 files changed, 12 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c
index a60307c..f4f43a3 100644
--- a/source4/lib/ldb/pyldb.c
+++ b/source4/lib/ldb/pyldb.c
@@ -28,6 +28,12 @@
 #include ldb_includes.h
 #include pyldb.h
 
+/* There's no Py_ssize_t in 2.4, apparently */
+#if PY_MAJOR_VERSION == 2  PY_MINOR_VERSION  5
+typedef int Py_ssize_t;
+typedef inquiry lenfunc;
+#endif
+
 /* Picked out of thin air. To do this properly, we should probably have some 
part of the 
  * errors in LDB be allocated to bindings ? */
 #define LDB_ERR_PYTHON_EXCEPTION   142
diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c
index acadcc0..69c2613 100644
--- a/source4/param/pyparam.c
+++ b/source4/param/pyparam.c
@@ -25,6 +25,12 @@
 #include param/loadparm.h
 #include pytalloc.h
 
+/* There's no Py_ssize_t in 2.4, apparently */
+#if PY_MAJOR_VERSION == 2  PY_MINOR_VERSION  5
+typedef int Py_ssize_t;
+typedef inquiry lenfunc;
+#endif
+
 #define PyLoadparmContext_AsLoadparmContext(obj) py_talloc_get_ptr(obj)
 
 PyAPI_DATA(PyTypeObject) PyLoadparmContext;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 227c8000dfee4248fc2d13104382542e449a1897

2008-12-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  227c8000dfee4248fc2d13104382542e449a1897 (commit)
  from  4bbd2cbab73d46d0f8e8ba3fe164b6802b379b06 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 227c8000dfee4248fc2d13104382542e449a1897
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Dec 23 12:14:25 2008 +0100

Fix silly typo.

---

Summary of changes:
 source4/lib/ldb/pyldb.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c
index ed77add..10b9691 100644
--- a/source4/lib/ldb/pyldb.c
+++ b/source4/lib/ldb/pyldb.c
@@ -32,7 +32,7 @@
 #if PY_MAJOR_VERSION == 2  PY_MINOR_VERSION  5
 typedef int Py_ssize_t;
 typedef inquiry lenfunc;
-typedef intargfunc sizeargfunc;
+typedef intargfunc ssizeargfunc;
 #endif
 
 /* Picked out of thin air. To do this properly, we should probably have some 
part of the 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3299-g7adf696

2008-12-23 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  7adf6961bfbbb3de07d40f397db5b5520d5f9d9f (commit)
  from  ccd63a202b7978af3d6fdb46d1c17f0e9ac0fef6 (commit)

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


- Log -
commit 7adf6961bfbbb3de07d40f397db5b5520d5f9d9f
Author: Tim Prouty tpro...@samba.org
Date:   Tue Dec 23 09:19:25 2008 -0800

s3: Fix stream marshalling to return the correct streaminfo status

When there are enough streams on a file to fill up the max_data_count
when responding to a trans2 streaminfo, samba is returning
NT_STATUS_BUFFER_TOO_SMALL.  Windows handles this by returning
NT_STATUS_BUFFER_OVERFLOW while still sending as much of the data that
it can fit into the buffer.  When the windows client sees
BUFFER_OVERFLOW, it retries the streaminfo with a larger buffer (2x).
The windows client starts at 2K and will continue increasing the
buffer size by two until it reaches 64K.  If the streams don't fit in
64K the windows client seems to give up.

This patch fixes marshall_stream_info to overfill the buffer by 1
stream so that send_trans2_replies can properly detect the overflow
and return the correct status.

---

Summary of changes:
 source/smbd/trans2.c |   11 +--
 1 files changed, 1 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index b6f4c34..a196802 100644
--- a/source/smbd/trans2.c
+++ b/source/smbd/trans2.c
@@ -3663,7 +3663,7 @@ static NTSTATUS marshall_stream_info(unsigned int 
num_streams,
unsigned int i;
unsigned int ofs = 0;
 
-   for (i=0; inum_streams; i++) {
+   for (i = 0; i  num_streams  ofs = max_data_bytes; i++) {
unsigned int next_offset;
size_t namelen;
smb_ucs2_t *namebuf;
@@ -3682,11 +3682,6 @@ static NTSTATUS marshall_stream_info(unsigned int 
num_streams,
 
namelen -= 2;
 
-   if (ofs + 24 + namelen  max_data_bytes) {
-   TALLOC_FREE(namebuf);
-   return NT_STATUS_BUFFER_TOO_SMALL;
-   }
-
SIVAL(data, ofs+4, namelen);
SOFF_T(data, ofs+8, streams[i].size);
SOFF_T(data, ofs+16, streams[i].alloc_size);
@@ -3701,10 +3696,6 @@ static NTSTATUS marshall_stream_info(unsigned int 
num_streams,
else {
unsigned int align = ndr_align_size(next_offset, 8);
 
-   if (next_offset + align  max_data_bytes) {
-   return NT_STATUS_BUFFER_TOO_SMALL;
-   }
-
memset(data+next_offset, 0, align);
next_offset += align;
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4728-g3643a11

2008-12-23 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  3643a1179df42d47c2913c7d5c6a4ec8d8b8eb9d (commit)
  from  dfd983881341bfbc811199901ae3d8fe973649c1 (commit)

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


- Log -
commit 3643a1179df42d47c2913c7d5c6a4ec8d8b8eb9d
Author: Tim Prouty tpro...@samba.org
Date:   Tue Dec 23 09:20:06 2008 -0800

s3: Fix stream marshalling to return the correct streaminfo status

When there are enough streams on a file to fill up the max_data_count
when responding to a trans2 streaminfo, samba is returning
NT_STATUS_BUFFER_TOO_SMALL.  Windows handles this by returning
NT_STATUS_BUFFER_OVERFLOW while still sending as much of the data that
it can fit into the buffer.  When the windows client sees
BUFFER_OVERFLOW, it retries the streaminfo with a larger buffer (2x).
The windows client starts at 2K and will continue increasing the
buffer size by two until it reaches 64K.  If the streams don't fit in
64K the windows client seems to give up.

This patch fixes marshall_stream_info to overfill the buffer by 1
stream so that send_trans2_replies can properly detect the overflow
and return the correct status.

---

Summary of changes:
 source/smbd/trans2.c |   11 +--
 1 files changed, 1 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index 406cc4e..c27464a 100644
--- a/source/smbd/trans2.c
+++ b/source/smbd/trans2.c
@@ -3679,7 +3679,7 @@ static NTSTATUS marshall_stream_info(unsigned int 
num_streams,
unsigned int i;
unsigned int ofs = 0;
 
-   for (i=0; inum_streams; i++) {
+   for (i = 0; i  num_streams  ofs = max_data_bytes; i++) {
unsigned int next_offset;
size_t namelen;
smb_ucs2_t *namebuf;
@@ -3698,11 +3698,6 @@ static NTSTATUS marshall_stream_info(unsigned int 
num_streams,
 
namelen -= 2;
 
-   if (ofs + 24 + namelen  max_data_bytes) {
-   TALLOC_FREE(namebuf);
-   return NT_STATUS_BUFFER_TOO_SMALL;
-   }
-
SIVAL(data, ofs+4, namelen);
SOFF_T(data, ofs+8, streams[i].size);
SOFF_T(data, ofs+16, streams[i].alloc_size);
@@ -3717,10 +3712,6 @@ static NTSTATUS marshall_stream_info(unsigned int 
num_streams,
else {
unsigned int align = ndr_align_size(next_offset, 8);
 
-   if (next_offset + align  max_data_bytes) {
-   return NT_STATUS_BUFFER_TOO_SMALL;
-   }
-
memset(data+next_offset, 0, align);
next_offset += align;
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - cb7d7beb99ab7952b5187c05b2660283d93e59fc

2008-12-23 Thread Jeremy Allison
The branch, master has been updated
   via  cb7d7beb99ab7952b5187c05b2660283d93e59fc (commit)
  from  227c8000dfee4248fc2d13104382542e449a1897 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit cb7d7beb99ab7952b5187c05b2660283d93e59fc
Author: Jeremy Allison jer...@jeremy-desktop.(none)
Date:   Tue Dec 23 09:50:10 2008 -0800

Fix another format not a string literal and no format arguments warning.
Jeremy

---

Summary of changes:
 source3/libnet/libnet_samsync_ldif.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libnet/libnet_samsync_ldif.c 
b/source3/libnet/libnet_samsync_ldif.c
index c72eadf..3068f8d 100644
--- a/source3/libnet/libnet_samsync_ldif.c
+++ b/source3/libnet/libnet_samsync_ldif.c
@@ -586,7 +586,7 @@ static NTSTATUS fetch_account_info_to_ldif(TALLOC_CTX 
*mem_ctx,
uchar zero_buf[16];
uint32 rid = 0, group_rid = 0, gidNumber = 0;
time_t unix_time;
-   int i;
+   int i, ret;
 
memset(zero_buf, '\0', sizeof(zero_buf));
 
@@ -660,7 +660,10 @@ static NTSTATUS fetch_account_info_to_ldif(TALLOC_CTX 
*mem_ctx,
return NT_STATUS_UNSUCCESSFUL;
}
gidNumber = groupmap[i].gidNumber;
-   snprintf(sambaSID, sizeof(sambaSID), groupmap[i].sambaSID);
+   ret = snprintf(sambaSID, sizeof(sambaSID), %s, groupmap[i].sambaSID);
+   if (ret  0 || ret == sizeof(sambaSID)) {
+   return NT_STATUS_UNSUCCESSFUL;
+   }
 
/* Set up sambaAcctFlags */
flags = pdb_encode_acct_ctrl(r-acct_flags,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4729-gfc04faf

2008-12-23 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  fc04faf9668bf0176ffd8d5c20e65aa83d63021b (commit)
  from  3643a1179df42d47c2913c7d5c6a4ec8d8b8eb9d (commit)

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


- Log -
commit fc04faf9668bf0176ffd8d5c20e65aa83d63021b
Author: Jeremy Allison jer...@jeremy-desktop.(none)
Date:   Tue Dec 23 09:49:47 2008 -0800

Fix another format not a string literal and no format arguments warning.
Jeremy

---

Summary of changes:
 source/libnet/libnet_samsync_ldif.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libnet/libnet_samsync_ldif.c 
b/source/libnet/libnet_samsync_ldif.c
index c72eadf..3068f8d 100644
--- a/source/libnet/libnet_samsync_ldif.c
+++ b/source/libnet/libnet_samsync_ldif.c
@@ -586,7 +586,7 @@ static NTSTATUS fetch_account_info_to_ldif(TALLOC_CTX 
*mem_ctx,
uchar zero_buf[16];
uint32 rid = 0, group_rid = 0, gidNumber = 0;
time_t unix_time;
-   int i;
+   int i, ret;
 
memset(zero_buf, '\0', sizeof(zero_buf));
 
@@ -660,7 +660,10 @@ static NTSTATUS fetch_account_info_to_ldif(TALLOC_CTX 
*mem_ctx,
return NT_STATUS_UNSUCCESSFUL;
}
gidNumber = groupmap[i].gidNumber;
-   snprintf(sambaSID, sizeof(sambaSID), groupmap[i].sambaSID);
+   ret = snprintf(sambaSID, sizeof(sambaSID), %s, groupmap[i].sambaSID);
+   if (ret  0 || ret == sizeof(sambaSID)) {
+   return NT_STATUS_UNSUCCESSFUL;
+   }
 
/* Set up sambaAcctFlags */
flags = pdb_encode_acct_ctrl(r-acct_flags,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4730-gf0c0f2b

2008-12-23 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  f0c0f2bee3bb874ba841a3b73c8677cd0ba67873 (commit)
  from  fc04faf9668bf0176ffd8d5c20e65aa83d63021b (commit)

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


- Log -
commit f0c0f2bee3bb874ba841a3b73c8677cd0ba67873
Author: Jeremy Allison jer...@jeremy-desktop.(none)
Date:   Tue Dec 23 10:27:37 2008 -0800

Fix more warning: ignoring return value of ‘asprintf’, declared with
attribute warn_unused_result
Jeremy.

---

Summary of changes:
 source/passdb/passdb.c |   85 +++-
 1 files changed, 62 insertions(+), 23 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/passdb/passdb.c b/source/passdb/passdb.c
index 16d5e0f..7b50093 100644
--- a/source/passdb/passdb.c
+++ b/source/passdb/passdb.c
@@ -686,12 +686,16 @@ NTSTATUS local_password_change(const char *user_name,
}
 
if (!NT_STATUS_IS_OK(result)) {
-   asprintf(pp_err_str, Failed to  initialize 
account for user %s: %s\n,
-   user_name, nt_errstr(result));
+   if (asprintf(pp_err_str, Failed to  
initialize account for user %s: %s\n,
+   user_name, nt_errstr(result))  
0) {
+   *pp_err_str = NULL;
+   }
return result;
}
} else {
-   asprintf(pp_err_str, Failed to find entry for user 
%s.\n, user_name);
+   if (asprintf(pp_err_str, Failed to find entry for user 
%s.\n, user_name)  0) {
+   *pp_err_str = NULL;
+   }
return NT_STATUS_NO_SUCH_USER;
}
} else {
@@ -704,19 +708,25 @@ NTSTATUS local_password_change(const char *user_name,
other_acb =  (pdb_get_acct_ctrl(sam_pass)  
(~(ACB_WSTRUST|ACB_DOMTRUST|ACB_SVRTRUST|ACB_NORMAL)));
if (local_flags  LOCAL_TRUST_ACCOUNT) {
if (!pdb_set_acct_ctrl(sam_pass, ACB_WSTRUST | other_acb, 
PDB_CHANGED) ) {
-   asprintf(pp_err_str, Failed to set 'trusted 
workstation account' flags for user %s.\n, user_name);
+   if (asprintf(pp_err_str, Failed to set 'trusted 
workstation account' flags for user %s.\n, user_name)  0) {
+   *pp_err_str = NULL;
+   }
TALLOC_FREE(sam_pass);
return NT_STATUS_UNSUCCESSFUL;
}
} else if (local_flags  LOCAL_INTERDOM_ACCOUNT) {
if (!pdb_set_acct_ctrl(sam_pass, ACB_DOMTRUST | other_acb, 
PDB_CHANGED)) {
-   asprintf(pp_err_str, Failed to set 'domain trust 
account' flags for user %s.\n, user_name);
+   if (asprintf(pp_err_str, Failed to set 'domain trust 
account' flags for user %s.\n, user_name)  0) {
+   *pp_err_str = NULL;
+   }
TALLOC_FREE(sam_pass);
return NT_STATUS_UNSUCCESSFUL;
}
} else {
if (!pdb_set_acct_ctrl(sam_pass, ACB_NORMAL | other_acb, 
PDB_CHANGED)) {
-   asprintf(pp_err_str, Failed to set 'normal account' 
flags for user %s.\n, user_name);
+   if (asprintf(pp_err_str, Failed to set 'normal 
account' flags for user %s.\n, user_name)  0) {
+   *pp_err_str = NULL;
+   }
TALLOC_FREE(sam_pass);
return NT_STATUS_UNSUCCESSFUL;
}
@@ -729,13 +739,17 @@ NTSTATUS local_password_change(const char *user_name,
 
if (local_flags  LOCAL_DISABLE_USER) {
if (!pdb_set_acct_ctrl (sam_pass, 
pdb_get_acct_ctrl(sam_pass)|ACB_DISABLED, PDB_CHANGED)) {
-   asprintf(pp_err_str, Failed to set 'disabled' flag for 
user %s.\n, user_name);
+   if (asprintf(pp_err_str, Failed to set 'disabled' flag 
for user %s.\n, user_name)  0) {
+   *pp_err_str = NULL;
+   }
TALLOC_FREE(sam_pass);
return NT_STATUS_UNSUCCESSFUL;
}
} else if (local_flags  LOCAL_ENABLE_USER) {
if (!pdb_set_acct_ctrl (sam_pass, 
pdb_get_acct_ctrl(sam_pass)(~ACB_DISABLED), PDB_CHANGED)) {
-   asprintf(pp_err_str, Failed to unset 'disabled' flag 
for user %s.\n, user_name);
+   if (asprintf(pp_err_str, Failed to unset 'disabled' 
flag for user %s.\n, user_name)  0) {
+ 

[SCM] Samba Shared Repository - branch master updated - 7fd114bab72e4cc9bdb7a0017055b68ea7523f0a

2008-12-23 Thread Jeremy Allison
The branch, master has been updated
   via  7fd114bab72e4cc9bdb7a0017055b68ea7523f0a (commit)
  from  cb7d7beb99ab7952b5187c05b2660283d93e59fc (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 7fd114bab72e4cc9bdb7a0017055b68ea7523f0a
Author: Jeremy Allison jer...@jeremy-desktop.(none)
Date:   Tue Dec 23 10:27:24 2008 -0800

Fix more warning: ignoring return value of ‘asprintf’, declared with
attribute warn_unused_result
Jeremy.

---

Summary of changes:
 source3/passdb/passdb.c |   85 ++-
 1 files changed, 62 insertions(+), 23 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index 8367d6a..bb0daaa 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -686,12 +686,16 @@ NTSTATUS local_password_change(const char *user_name,
}
 
if (!NT_STATUS_IS_OK(result)) {
-   asprintf(pp_err_str, Failed to  initialize 
account for user %s: %s\n,
-   user_name, nt_errstr(result));
+   if (asprintf(pp_err_str, Failed to  
initialize account for user %s: %s\n,
+   user_name, nt_errstr(result))  
0) {
+   *pp_err_str = NULL;
+   }
return result;
}
} else {
-   asprintf(pp_err_str, Failed to find entry for user 
%s.\n, user_name);
+   if (asprintf(pp_err_str, Failed to find entry for user 
%s.\n, user_name)  0) {
+   *pp_err_str = NULL;
+   }
return NT_STATUS_NO_SUCH_USER;
}
} else {
@@ -704,19 +708,25 @@ NTSTATUS local_password_change(const char *user_name,
other_acb =  (pdb_get_acct_ctrl(sam_pass)  
(~(ACB_WSTRUST|ACB_DOMTRUST|ACB_SVRTRUST|ACB_NORMAL)));
if (local_flags  LOCAL_TRUST_ACCOUNT) {
if (!pdb_set_acct_ctrl(sam_pass, ACB_WSTRUST | other_acb, 
PDB_CHANGED) ) {
-   asprintf(pp_err_str, Failed to set 'trusted 
workstation account' flags for user %s.\n, user_name);
+   if (asprintf(pp_err_str, Failed to set 'trusted 
workstation account' flags for user %s.\n, user_name)  0) {
+   *pp_err_str = NULL;
+   }
TALLOC_FREE(sam_pass);
return NT_STATUS_UNSUCCESSFUL;
}
} else if (local_flags  LOCAL_INTERDOM_ACCOUNT) {
if (!pdb_set_acct_ctrl(sam_pass, ACB_DOMTRUST | other_acb, 
PDB_CHANGED)) {
-   asprintf(pp_err_str, Failed to set 'domain trust 
account' flags for user %s.\n, user_name);
+   if (asprintf(pp_err_str, Failed to set 'domain trust 
account' flags for user %s.\n, user_name)  0) {
+   *pp_err_str = NULL;
+   }
TALLOC_FREE(sam_pass);
return NT_STATUS_UNSUCCESSFUL;
}
} else {
if (!pdb_set_acct_ctrl(sam_pass, ACB_NORMAL | other_acb, 
PDB_CHANGED)) {
-   asprintf(pp_err_str, Failed to set 'normal account' 
flags for user %s.\n, user_name);
+   if (asprintf(pp_err_str, Failed to set 'normal 
account' flags for user %s.\n, user_name)  0) {
+   *pp_err_str = NULL;
+   }
TALLOC_FREE(sam_pass);
return NT_STATUS_UNSUCCESSFUL;
}
@@ -729,13 +739,17 @@ NTSTATUS local_password_change(const char *user_name,
 
if (local_flags  LOCAL_DISABLE_USER) {
if (!pdb_set_acct_ctrl (sam_pass, 
pdb_get_acct_ctrl(sam_pass)|ACB_DISABLED, PDB_CHANGED)) {
-   asprintf(pp_err_str, Failed to set 'disabled' flag for 
user %s.\n, user_name);
+   if (asprintf(pp_err_str, Failed to set 'disabled' flag 
for user %s.\n, user_name)  0) {
+   *pp_err_str = NULL;
+   }
TALLOC_FREE(sam_pass);
return NT_STATUS_UNSUCCESSFUL;
}
} else if (local_flags  LOCAL_ENABLE_USER) {
if (!pdb_set_acct_ctrl (sam_pass, 
pdb_get_acct_ctrl(sam_pass)(~ACB_DISABLED), PDB_CHANGED)) {
-   asprintf(pp_err_str, Failed to unset 'disabled' flag 
for user %s.\n, user_name);
+   if (asprintf(pp_err_str, Failed to unset 'disabled' 
flag for user %s.\n, user_name)  0) {
+   

[SCM] Samba Shared Repository - branch master updated - 5dce4148a3d30cbc0ca434049761434c5cc8cb33

2008-12-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  5dce4148a3d30cbc0ca434049761434c5cc8cb33 (commit)
   via  465f78021e609719bf25b7d2933c47b7ab1b6940 (commit)
  from  7fd114bab72e4cc9bdb7a0017055b68ea7523f0a (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 5dce4148a3d30cbc0ca434049761434c5cc8cb33
Merge: 465f78021e609719bf25b7d2933c47b7ab1b6940 
7fd114bab72e4cc9bdb7a0017055b68ea7523f0a
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Dec 23 19:30:16 2008 +0100

Merge branch 'master' of ssh://git.samba.org/data/git/samba

commit 465f78021e609719bf25b7d2933c47b7ab1b6940
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Dec 23 19:28:22 2008 +0100

Move Samba4-specific file out of common libtevent.

---

Summary of changes:
 lib/tevent/config.mk   |2 +-
 source4/lib/basic.mk   |1 +
 source4/lib/events/config.mk   |2 +-
 source4/lib/events/events_dummy.c  |4 
 {lib/tevent = source4/lib/events}/tevent_s4.c |0 
 5 files changed, 3 insertions(+), 6 deletions(-)
 delete mode 100644 source4/lib/events/events_dummy.c
 rename {lib/tevent = source4/lib/events}/tevent_s4.c (100%)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/config.mk b/lib/tevent/config.mk
index bce92bb..01c628c 100644
--- a/lib/tevent/config.mk
+++ b/lib/tevent/config.mk
@@ -41,7 +41,7 @@ CFLAGS = -I../lib/tevent
 # End SUBSYSTEM LIBTEVENT
 
 
-LIBTEVENT_OBJ_FILES = $(addprefix $(libteventsrcdir)/, tevent.o tevent_timed.o 
tevent_signal.o tevent_debug.o tevent_util.o tevent_s4.o)
+LIBTEVENT_OBJ_FILES = $(addprefix $(libteventsrcdir)/, tevent.o tevent_timed.o 
tevent_signal.o tevent_debug.o tevent_util.o)
 
 PUBLIC_HEADERS += $(addprefix $(libteventsrcdir)/, tevent.h tevent_internal.h)
 
diff --git a/source4/lib/basic.mk b/source4/lib/basic.mk
index 4d07668..4b40ed4 100644
--- a/source4/lib/basic.mk
+++ b/source4/lib/basic.mk
@@ -23,3 +23,4 @@ TDB_WRAP_OBJ_FILES = $(libsrcdir)/tdb_wrap.o
 PUBLIC_HEADERS += $(libsrcdir)/tdb_wrap.h
 
 SMBREADLINE_OBJ_LIST = $(SMBREADLINE_OBJ_FILES)
+
diff --git a/source4/lib/events/config.mk b/source4/lib/events/config.mk
index b9d6879..a1b2cd2 100644
--- a/source4/lib/events/config.mk
+++ b/source4/lib/events/config.mk
@@ -2,6 +2,6 @@
 PUBLIC_DEPENDENCIES = LIBTEVENT
 CFLAGS = -Ilib/events
 
-LIBEVENTS_OBJ_FILES = $(addprefix $(libeventssrcdir)/, events_dummy.o)
+LIBEVENTS_OBJ_FILES = $(addprefix $(libeventssrcdir)/, tevent_s4.o)
 
 PUBLIC_HEADERS += $(addprefix $(libeventssrcdir)/, events.h events_internal.h)
diff --git a/source4/lib/events/events_dummy.c 
b/source4/lib/events/events_dummy.c
deleted file mode 100644
index 15bb25e..000
--- a/source4/lib/events/events_dummy.c
+++ /dev/null
@@ -1,4 +0,0 @@
-void __events_dummy(void)
-{
-}
-
diff --git a/lib/tevent/tevent_s4.c b/source4/lib/events/tevent_s4.c
similarity index 100%
rename from lib/tevent/tevent_s4.c
rename to source4/lib/events/tevent_s4.c


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4731-g9ebaf67

2008-12-23 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  9ebaf67d1dce717cafd5761b2f66296712a09957 (commit)
  from  f0c0f2bee3bb874ba841a3b73c8677cd0ba67873 (commit)

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


- Log -
commit 9ebaf67d1dce717cafd5761b2f66296712a09957
Author: Jeremy Allison jer...@jeremy-desktop.(none)
Date:   Tue Dec 23 10:42:38 2008 -0800

Fix more ‘asprintf’, declared with attribute warn_unused_result.
Jeremy.

---

Summary of changes:
 source/passdb/pdb_interface.c |   22 ++
 source/passdb/pdb_ldap.c  |7 ---
 2 files changed, 18 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/passdb/pdb_interface.c b/source/passdb/pdb_interface.c
index 5a79f09..b13644b 100644
--- a/source/passdb/pdb_interface.c
+++ b/source/passdb/pdb_interface.c
@@ -179,20 +179,26 @@ static struct pdb_methods *pdb_get_methods_reload( bool 
reload )
pdb-free_private_data( (pdb-private_data) );
if ( !NT_STATUS_IS_OK( make_pdb_method_name( pdb, 
lp_passdb_backend() ) ) ) {
char *msg = NULL;
-   asprintf(msg, pdb_get_methods_reload: 
-   failed to get pdb methods for backend %s\n,
-   lp_passdb_backend());
-   smb_panic(msg);
+   if (asprintf(msg, pdb_get_methods_reload: 
+   failed to get pdb methods for backend 
%s\n,
+   lp_passdb_backend())  0) {
+   smb_panic(msg);
+   } else {
+   smb_panic(pdb_get_methods_reload);
+   }
}
}
 
if ( !pdb ) {
if ( !NT_STATUS_IS_OK( make_pdb_method_name( pdb, 
lp_passdb_backend() ) ) ) {
char *msg = NULL;
-   asprintf(msg, pdb_get_methods_reload: 
-   failed to get pdb methods for backend %s\n,
-   lp_passdb_backend());
-   smb_panic(msg);
+   if (asprintf(msg, pdb_get_methods_reload: 
+   failed to get pdb methods for backend 
%s\n,
+   lp_passdb_backend())  0) {
+   smb_panic(msg);
+   } else {
+   smb_panic(pdb_get_methods_reload);
+   }
}
}
 
diff --git a/source/passdb/pdb_ldap.c b/source/passdb/pdb_ldap.c
index 95e9a01..f031483 100644
--- a/source/passdb/pdb_ldap.c
+++ b/source/passdb/pdb_ldap.c
@@ -4184,9 +4184,10 @@ static char *get_ldap_filter(TALLOC_CTX *mem_ctx, const 
char *username)
char *escaped = NULL;
char *result = NULL;
 
-   asprintf(filter, (%s(objectclass=%s)),
- (uid=%u), LDAP_OBJ_SAMBASAMACCOUNT);
-   if (filter == NULL) goto done;
+   if (asprintf(filter, (%s(objectclass=%s)),
+ (uid=%u), LDAP_OBJ_SAMBASAMACCOUNT)  0) {
+   goto done;
+   }
 
escaped = escape_ldap_string_alloc(username);
if (escaped == NULL) goto done;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 7e1f0e272ca2db577a929a2bbef651cf5759535e

2008-12-23 Thread Jeremy Allison
The branch, master has been updated
   via  7e1f0e272ca2db577a929a2bbef651cf5759535e (commit)
   via  aa4abac6b73db7be694bc9f6f097092271357d20 (commit)
  from  5dce4148a3d30cbc0ca434049761434c5cc8cb33 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 7e1f0e272ca2db577a929a2bbef651cf5759535e
Merge: aa4abac6b73db7be694bc9f6f097092271357d20 
5dce4148a3d30cbc0ca434049761434c5cc8cb33
Author: Jeremy Allison jer...@jeremy-desktop.(none)
Date:   Tue Dec 23 10:43:02 2008 -0800

Merge branch 'master' of ssh://j...@git.samba.org/data/git/samba

commit aa4abac6b73db7be694bc9f6f097092271357d20
Author: Jeremy Allison jer...@jeremy-desktop.(none)
Date:   Tue Dec 23 10:42:25 2008 -0800

Fix more ‘asprintf’, declared with attribute warn_unused_result.
Jeremy.

---

Summary of changes:
 source3/passdb/pdb_interface.c |   22 ++
 source3/passdb/pdb_ldap.c  |7 ---
 2 files changed, 18 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index 5a79f09..b13644b 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -179,20 +179,26 @@ static struct pdb_methods *pdb_get_methods_reload( bool 
reload )
pdb-free_private_data( (pdb-private_data) );
if ( !NT_STATUS_IS_OK( make_pdb_method_name( pdb, 
lp_passdb_backend() ) ) ) {
char *msg = NULL;
-   asprintf(msg, pdb_get_methods_reload: 
-   failed to get pdb methods for backend %s\n,
-   lp_passdb_backend());
-   smb_panic(msg);
+   if (asprintf(msg, pdb_get_methods_reload: 
+   failed to get pdb methods for backend 
%s\n,
+   lp_passdb_backend())  0) {
+   smb_panic(msg);
+   } else {
+   smb_panic(pdb_get_methods_reload);
+   }
}
}
 
if ( !pdb ) {
if ( !NT_STATUS_IS_OK( make_pdb_method_name( pdb, 
lp_passdb_backend() ) ) ) {
char *msg = NULL;
-   asprintf(msg, pdb_get_methods_reload: 
-   failed to get pdb methods for backend %s\n,
-   lp_passdb_backend());
-   smb_panic(msg);
+   if (asprintf(msg, pdb_get_methods_reload: 
+   failed to get pdb methods for backend 
%s\n,
+   lp_passdb_backend())  0) {
+   smb_panic(msg);
+   } else {
+   smb_panic(pdb_get_methods_reload);
+   }
}
}
 
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 95e9a01..f031483 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -4184,9 +4184,10 @@ static char *get_ldap_filter(TALLOC_CTX *mem_ctx, const 
char *username)
char *escaped = NULL;
char *result = NULL;
 
-   asprintf(filter, (%s(objectclass=%s)),
- (uid=%u), LDAP_OBJ_SAMBASAMACCOUNT);
-   if (filter == NULL) goto done;
+   if (asprintf(filter, (%s(objectclass=%s)),
+ (uid=%u), LDAP_OBJ_SAMBASAMACCOUNT)  0) {
+   goto done;
+   }
 
escaped = escape_ldap_string_alloc(username);
if (escaped == NULL) goto done;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 22703bf3ffc3692a719d6bd593d3705697045bea

2008-12-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  22703bf3ffc3692a719d6bd593d3705697045bea (commit)
  from  7e1f0e272ca2db577a929a2bbef651cf5759535e (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 22703bf3ffc3692a719d6bd593d3705697045bea
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Dec 23 19:39:52 2008 +0100

standalone: Use more variables, preparing to include these files from main
Samba 4 makefile.

---

Summary of changes:
 lib/talloc/talloc.mk |9 +
 lib/tdb/tdb.mk   |   11 ++-
 lib/tevent/tevent.mk |   11 ++-
 3 files changed, 17 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/talloc/talloc.mk b/lib/talloc/talloc.mk
index 7f0afed..ce7784c 100644
--- a/lib/talloc/talloc.mk
+++ b/lib/talloc/talloc.mk
@@ -2,20 +2,21 @@ TALLOC_OBJ = $(tallocdir)/talloc.o
 
 TALLOC_SOLIB = libtalloc.$(SHLIBEXT).$(PACKAGE_VERSION)
 TALLOC_SONAME = libtalloc.$(SHLIBEXT).1
+TALLOC_STLIB = libtalloc.a
 
-all:: libtalloc.a $(TALLOC_SOLIB) testsuite
+all:: $(TALLOC_STLIB) $(TALLOC_SOLIB) testsuite
 
 testsuite:: $(LIBOBJ) testsuite.o testsuite_main.o
$(CC) $(CFLAGS) -o testsuite testsuite.o testsuite_main.o $(LIBOBJ) 
$(LIBS)
 
-libtalloc.a: $(LIBOBJ)
+$(TALLOC_STLIB): $(LIBOBJ)
ar -rv $@ $(LIBOBJ)
@-ranlib $@
 
 install:: all 
${INSTALLCMD} -d $(DESTDIR)$(libdir)
${INSTALLCMD} -d $(DESTDIR)$(libdir)/pkgconfig
-   ${INSTALLCMD} -m 755 libtalloc.a $(DESTDIR)$(libdir)
+   ${INSTALLCMD} -m 755 $(TALLOC_STLIB) $(DESTDIR)$(libdir)
${INSTALLCMD} -m 755 $(TALLOC_SOLIB) $(DESTDIR)$(libdir)
${INSTALLCMD} -d $(DESTDIR)${includedir}
${INSTALLCMD} -m 644 $(srcdir)/talloc.h $(DESTDIR)$(includedir)
@@ -28,7 +29,7 @@ install:: all
 doc:: talloc.3 talloc.3.html
 
 clean::
-   rm -f *~ $(LIBOBJ) $(TALLOC_SOLIB) libtalloc.a testsuite testsuite.o 
testsuite_main.o *.gc?? talloc.3 talloc.3.html
+   rm -f *~ $(LIBOBJ) $(TALLOC_SOLIB) $(TALLOC_STLIB) testsuite 
testsuite.o testsuite_main.o *.gc?? talloc.3 talloc.3.html
 
 test:: testsuite
./testsuite
diff --git a/lib/tdb/tdb.mk b/lib/tdb/tdb.mk
index 72f44e7..b786bdb 100644
--- a/lib/tdb/tdb.mk
+++ b/lib/tdb/tdb.mk
@@ -7,8 +7,9 @@ ALL_PROGS = $(PROGS) $(PROGS_NOINSTALL)
 
 TDB_SONAME = libtdb.$(SHLIBEXT).1
 TDB_SOLIB = libtdb.$(SHLIBEXT).$(PACKAGE_VERSION)
+TDB_STLIB = libtdb.a
 
-TDB_LIB = libtdb.a
+TDB_LIB = $(TDB_STLIB) 
 
 bin/tdbtest$(EXEEXT): tools/tdbtest.o $(TDB_LIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb 
-lgdbm
@@ -30,7 +31,7 @@ test:: bin/tdbtorture$(EXEEXT) $(TDB_SONAME)
 
 clean:: 
rm -f test.db test.tdb torture.tdb test.gdbm
-   rm -f $(TDB_SONAME) $(TDB_SOLIB) libtdb.a libtdb.$(SHLIBEXT)
+   rm -f $(TDB_SONAME) $(TDB_SOLIB) $(TDB_STLIB) libtdb.$(SHLIBEXT)
rm -f $(ALL_PROGS) tdb.pc
 
 build-python:: tdb.$(SHLIBEXT) 
@@ -68,10 +69,10 @@ installheaders:: installdirs
 
 installlibs:: all installdirs
cp tdb.pc $(DESTDIR)$(libdir)/pkgconfig
-   cp libtdb.a $(TDB_SOLIB) $(DESTDIR)$(libdir)
+   cp $(TDB_STLIB) $(TDB_SOLIB) $(DESTDIR)$(libdir)
 
-libtdb.a: $(TDB_OBJ)
-   ar -rv libtdb.a $(TDB_OBJ)
+$(TDB_STLIB): $(TDB_OBJ)
+   ar -rv $(TDB_STLIB) $(TDB_OBJ)
 
 libtdb.$(SHLIBEXT): $(TDB_SOLIB)
ln -fs $ $@
diff --git a/lib/tevent/tevent.mk b/lib/tevent/tevent.mk
index 8b4c6ed..2e4d5a9 100644
--- a/lib/tevent/tevent.mk
+++ b/lib/tevent/tevent.mk
@@ -1,8 +1,9 @@
 TEVENT_SONAME = libtevent.$(SHLIBEXT).0
 TEVENT_SOLIB = libtevent.$(SHLIBEXT).$(PACKAGE_VERSION)
+TEVENT_STLIB = libtevent.a
 
-libtevent.a: $(TEVENT_OBJ)
-   ar -rv libtevent.a $(TEVENT_OBJ)
+$(TEVENT_STLIB): $(TEVENT_OBJ)
+   ar -rv $(TEVENT_STLIB) $(TEVENT_OBJ)
 
 libtevent.$(SHLIBEXT): $(TEVENT_SOLIB)
ln -fs $ $@
@@ -23,14 +24,14 @@ installheaders:: installdirs
 
 installlibs:: installdirs
cp tevent.pc $(DESTDIR)$(libdir)/pkgconfig
-   cp libtevent.a $(TEVENT_SOLIB) $(DESTDIR)$(libdir)
+   cp $(TEVENT_STLIB) $(TEVENT_SOLIB) $(DESTDIR)$(libdir)
 
 install:: all installdirs installheaders installlibs $(PYTHON_INSTALL_TARGET)
 
 clean::
-   rm -f $(TEVENT_SONAME) $(TEVENT_SOLIB) libtevent.a libtevent.$(SHLIBEXT)
+   rm -f $(TEVENT_SONAME) $(TEVENT_SOLIB) $(TEVENT_STLIB) 
libtevent.$(SHLIBEXT)
rm -f tevent.pc
-   rm -f _libtevent.$(SHLIBEXT)
+   rm -f tevent.$(SHLIBEXT)
 
 #python stuff
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 8b24da201b78ddda3738564f2d69c96ab4ed9919

2008-12-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  8b24da201b78ddda3738564f2d69c96ab4ed9919 (commit)
  from  22703bf3ffc3692a719d6bd593d3705697045bea (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 8b24da201b78ddda3738564f2d69c96ab4ed9919
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Dec 23 19:59:57 2008 +0100

Allow using external libtevent.

---

Summary of changes:
 lib/tevent/config.mk   |   11 ---
 source4/build/smb_build/summary.pm |1 +
 source4/configure.ac   |   13 +++--
 source4/main.mk|1 -
 4 files changed, 12 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/config.mk b/lib/tevent/config.mk
index 01c628c..e4fb9a8 100644
--- a/lib/tevent/config.mk
+++ b/lib/tevent/config.mk
@@ -44,14 +44,3 @@ CFLAGS = -I../lib/tevent
 LIBTEVENT_OBJ_FILES = $(addprefix $(libteventsrcdir)/, tevent.o tevent_timed.o 
tevent_signal.o tevent_debug.o tevent_util.o)
 
 PUBLIC_HEADERS += $(addprefix $(libteventsrcdir)/, tevent.h tevent_internal.h)
-
-# TODO: Change python stuff to tevent
-[PYTHON::swig_events]
-LIBRARY_REALNAME = tevent.$(SHLIBEXT)
-PRIVATE_DEPENDENCIES = LIBTEVENT PYTALLOC LIBSAMBA-UTIL
-
-swig_events_OBJ_FILES = $(libteventsrcdir)/pytevent.o
-
-$(swig_events_OBJ_FILES): CFLAGS+=$(CFLAG_NO_CAST_QUAL)
-
-PC_FILES += $(libteventsrcdir)/tevent.pc
diff --git a/source4/build/smb_build/summary.pm 
b/source4/build/smb_build/summary.pm
index f6c1c50..c791621 100644
--- a/source4/build/smb_build/summary.pm
+++ b/source4/build/smb_build/summary.pm
@@ -57,6 +57,7 @@ sub show($$)
showisexternal($output, popt, LIBPOPT);
showisexternal($output, talloc, LIBTALLOC);
showisexternal($output, tdb, LIBTDB);
+   showisexternal($output, tevent, LIBTEVENT);
showisexternal($output, ldb, LIBLDB);
print Developer mode: 
.(enabled($config-{developer})?yes:no).\n;
print Automatic dependencies: .
diff --git a/source4/configure.ac b/source4/configure.ac
index aa5a3f3..45154c8 100644
--- a/source4/configure.ac
+++ b/source4/configure.ac
@@ -34,7 +34,6 @@ m4_include(../nsswitch/nsstest.m4)
 m4_include(../pidl/config.m4)
 
 AC_CONFIG_FILES(lib/registry/registry.pc)
-AC_CONFIG_FILES(../lib/tevent/tevent.pc)
 AC_CONFIG_FILES(librpc/dcerpc.pc)
 AC_CONFIG_FILES(../librpc/ndr.pc)
 AC_CONFIG_FILES(../lib/torture/torture.pc)
@@ -61,6 +60,17 @@ SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb = 1.1.3,
 
 SMB_INCLUDE_MK(../lib/tdb/python.mk) 
 
+SMB_EXT_LIB_FROM_PKGCONFIG(LIBTEVENT, tevent = 1.0.0,
+   [],
+   [
+   m4_include(../lib/tevent/libtevent.m4)
+   SMB_INCLUDE_MK(../lib/tevent/config.mk)
+   AC_CONFIG_FILES(../lib/tevent/tevent.pc)
+   ]
+)
+
+SMB_INCLUDE_MK(../lib/tevent/python.mk) 
+
 SMB_EXT_LIB_FROM_PKGCONFIG(LIBLDB, ldb = 0.9.1,
[
SMB_INCLUDE_MK(lib/ldb/ldb_ildap/config.mk)
@@ -96,7 +106,6 @@ SMB_EXT_LIB_FROM_PKGCONFIG(LIBLDB, ldb = 0.9.1,
 SMB_INCLUDE_MK(lib/ldb/python.mk) 
 
 m4_include(lib/tls/config.m4)
-m4_include(../lib/tevent/libtevent.m4)
 
 dnl m4_include(auth/kerberos/config.m4)
 m4_include(auth/gensec/config.m4)
diff --git a/source4/main.mk b/source4/main.mk
index e54196a..1d4ffc5 100644
--- a/source4/main.mk
+++ b/source4/main.mk
@@ -14,7 +14,6 @@ mkinclude lib/ldb-samba/config.mk
 mkinclude lib/tls/config.mk
 mkinclude lib/registry/config.mk
 mkinclude lib/messaging/config.mk
-mkinclude ../lib/tevent/config.mk
 mkinclude lib/events/config.mk
 mkinclude lib/cmdline/config.mk
 mkinclude ../lib/socket_wrapper/config.mk


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 31dc07ee2868c99792e0f71239f79ba49062e7e2

2008-12-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  31dc07ee2868c99792e0f71239f79ba49062e7e2 (commit)
  from  8b24da201b78ddda3738564f2d69c96ab4ed9919 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 31dc07ee2868c99792e0f71239f79ba49062e7e2
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Dec 23 20:13:17 2008 +0100

pytevent: Add missing file.

---

Summary of changes:
 lib/tevent/python.mk |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)
 create mode 100644 lib/tevent/python.mk


Changeset truncated at 500 lines:

diff --git a/lib/tevent/python.mk b/lib/tevent/python.mk
new file mode 100644
index 000..d48c4f5
--- /dev/null
+++ b/lib/tevent/python.mk
@@ -0,0 +1,10 @@
+# TODO: Change python stuff to tevent
+[PYTHON::swig_events]
+LIBRARY_REALNAME = tevent.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = LIBTEVENT PYTALLOC LIBSAMBA-UTIL
+
+swig_events_OBJ_FILES = $(libteventsrcdir)/pytevent.o
+
+$(swig_events_OBJ_FILES): CFLAGS+=$(CFLAG_NO_CAST_QUAL)
+
+PC_FILES += $(libteventsrcdir)/tevent.pc


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated - 7c6a20a439e5e6e9b4149df77896eea57d931e73

2008-12-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  7c6a20a439e5e6e9b4149df77896eea57d931e73 (commit)
  from  31dc07ee2868c99792e0f71239f79ba49062e7e2 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 7c6a20a439e5e6e9b4149df77896eea57d931e73
Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
Date:   Tue Dec 23 20:17:59 2008 +0100

Add missing includes, required for use of gensec by 3rd-party
applications.

---

Summary of changes:
 source4/auth/gensec/gensec.h |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/gensec/gensec.h b/source4/auth/gensec/gensec.h
index 235d200..87c9b4d 100644
--- a/source4/auth/gensec/gensec.h
+++ b/source4/auth/gensec/gensec.h
@@ -23,6 +23,9 @@
 #ifndef __GENSEC_H__
 #define __GENSEC_H__
 
+#include ../lib/util/data_blob.h
+#include libcli/util/ntstatus.h
+
 #define GENSEC_OID_NTLMSSP 1.3.6.1.4.1.311.2.2.10
 #define GENSEC_OID_SPNEGO 1.3.6.1.5.5.2
 #define GENSEC_OID_KERBEROS5 1.2.840.113554.1.2.2


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4732-g0f02a16

2008-12-23 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  0f02a165e23d716dcf3791eeaa6a5afebe7a1f88 (commit)
  from  9ebaf67d1dce717cafd5761b2f66296712a09957 (commit)

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


- Log -
commit 0f02a165e23d716dcf3791eeaa6a5afebe7a1f88
Author: Jeremy Allison jer...@jeremy-desktop.(none)
Date:   Tue Dec 23 11:29:02 2008 -0800

Fix more asprintf errors and error code paths.
Jeremy.

---

Summary of changes:
 source/libads/ldap.c |   14 +-
 source/libads/ldap_printer.c |   26 ++
 2 files changed, 31 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libads/ldap.c b/source/libads/ldap.c
index 215a310..291932d 100644
--- a/source/libads/ldap.c
+++ b/source/libads/ldap.c
@@ -603,7 +603,10 @@ got_connection:
/* Must use the userPrincipalName value here or sAMAccountName
   and not servicePrincipalName; found by Guenther Deschner */
 
-   asprintf(ads-auth.user_name, %s$, global_myname() );
+   if (asprintf(ads-auth.user_name, %s$, global_myname() ) == 
-1) {
+   DEBUG(0,(ads_connect: asprintf fail.\n));
+   ads-auth.user_name = NULL;
+   }
}
 
if (!ads-auth.realm) {
@@ -619,10 +622,11 @@ got_connection:
/* this is a really nasty hack to avoid ADS DNS problems. It needs a 
patch
   to MIT kerberos to work (tridge) */
{
-   char *env;
-   asprintf(env, KRB5_KDC_ADDRESS_%s, ads-config.realm);
-   setenv(env, ads-auth.kdc_server, 1);
-   free(env);
+   char *env = NULL;
+   if (asprintf(env, KRB5_KDC_ADDRESS_%s, ads-config.realm)  
0) {
+   setenv(env, ads-auth.kdc_server, 1);
+   free(env);
+   }
}
 #endif
 
diff --git a/source/libads/ldap_printer.c b/source/libads/ldap_printer.c
index 9935e23..eb6e3d3 100644
--- a/source/libads/ldap_printer.c
+++ b/source/libads/ldap_printer.c
@@ -31,7 +31,7 @@
   const char *servername)
 {
ADS_STATUS status;
-   char *srv_dn, **srv_cn, *s;
+   char *srv_dn, **srv_cn, *s = NULL;
const char *attrs[] = {*, nTSecurityDescriptor, NULL};
 
status = ads_find_machine_acct(ads, res, servername);
@@ -41,25 +41,43 @@
return status;
}
if (ads_count_replies(ads, *res) != 1) {
+   if (res) {
+   ads_msgfree(ads, *res);
+   *res = NULL;
+   }
return ADS_ERROR(LDAP_NO_SUCH_OBJECT);
}
srv_dn = ldap_get_dn(ads-ldap.ld, *res);
if (srv_dn == NULL) {
+   if (res) {
+   ads_msgfree(ads, *res);
+   *res = NULL;
+   }
return ADS_ERROR(LDAP_NO_MEMORY);
}
srv_cn = ldap_explode_dn(srv_dn, 1);
if (srv_cn == NULL) {
ldap_memfree(srv_dn);
+   if (res) {
+   ads_msgfree(ads, *res);
+   *res = NULL;
+   }
return ADS_ERROR(LDAP_INVALID_DN_SYNTAX);
}
-   ads_msgfree(ads, *res);
+   if (res) {
+   ads_msgfree(ads, *res);
+   *res = NULL;
+   }
 
-   asprintf(s, (cn=%s-%s), srv_cn[0], printer);
+   if (asprintf(s, (cn=%s-%s), srv_cn[0], printer) == -1) {
+   ldap_memfree(srv_dn);
+   return ADS_ERROR(LDAP_NO_MEMORY);
+   }
status = ads_search(ads, res, s, attrs);
 
ldap_memfree(srv_dn);
ldap_value_free(srv_cn);
-   free(s);
+   SAFE_FREE(s);
return status;  
 }
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - b143938b8afaa7c7759e09228cc0d92ff97121d0

2008-12-23 Thread Jeremy Allison
The branch, master has been updated
   via  b143938b8afaa7c7759e09228cc0d92ff97121d0 (commit)
  from  7c6a20a439e5e6e9b4149df77896eea57d931e73 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit b143938b8afaa7c7759e09228cc0d92ff97121d0
Author: Jeremy Allison jer...@jeremy-desktop.(none)
Date:   Tue Dec 23 11:27:19 2008 -0800

Fix more asprintf errors and error code paths.
Jeremy.

---

Summary of changes:
 source3/libads/ldap.c  |   14 +-
 source3/libads/ldap_printer.c  |   26 ++
 source3/printing/nt_printing.c |8 +---
 3 files changed, 36 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index cf8a7eb..a598580 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -603,7 +603,10 @@ got_connection:
/* Must use the userPrincipalName value here or sAMAccountName
   and not servicePrincipalName; found by Guenther Deschner */
 
-   asprintf(ads-auth.user_name, %s$, global_myname() );
+   if (asprintf(ads-auth.user_name, %s$, global_myname() ) == 
-1) {
+   DEBUG(0,(ads_connect: asprintf fail.\n));
+   ads-auth.user_name = NULL;
+   }
}
 
if (!ads-auth.realm) {
@@ -619,10 +622,11 @@ got_connection:
/* this is a really nasty hack to avoid ADS DNS problems. It needs a 
patch
   to MIT kerberos to work (tridge) */
{
-   char *env;
-   asprintf(env, KRB5_KDC_ADDRESS_%s, ads-config.realm);
-   setenv(env, ads-auth.kdc_server, 1);
-   free(env);
+   char *env = NULL;
+   if (asprintf(env, KRB5_KDC_ADDRESS_%s, ads-config.realm)  
0) {
+   setenv(env, ads-auth.kdc_server, 1);
+   free(env);
+   }
}
 #endif
 
diff --git a/source3/libads/ldap_printer.c b/source3/libads/ldap_printer.c
index 0a42f00..169c3bb 100644
--- a/source3/libads/ldap_printer.c
+++ b/source3/libads/ldap_printer.c
@@ -31,7 +31,7 @@
   const char *servername)
 {
ADS_STATUS status;
-   char *srv_dn, **srv_cn, *s;
+   char *srv_dn, **srv_cn, *s = NULL;
const char *attrs[] = {*, nTSecurityDescriptor, NULL};
 
status = ads_find_machine_acct(ads, res, servername);
@@ -41,25 +41,43 @@
return status;
}
if (ads_count_replies(ads, *res) != 1) {
+   if (res) {
+   ads_msgfree(ads, *res);
+   *res = NULL;
+   }
return ADS_ERROR(LDAP_NO_SUCH_OBJECT);
}
srv_dn = ldap_get_dn(ads-ldap.ld, *res);
if (srv_dn == NULL) {
+   if (res) {
+   ads_msgfree(ads, *res);
+   *res = NULL;
+   }
return ADS_ERROR(LDAP_NO_MEMORY);
}
srv_cn = ldap_explode_dn(srv_dn, 1);
if (srv_cn == NULL) {
ldap_memfree(srv_dn);
+   if (res) {
+   ads_msgfree(ads, *res);
+   *res = NULL;
+   }
return ADS_ERROR(LDAP_INVALID_DN_SYNTAX);
}
-   ads_msgfree(ads, *res);
+   if (res) {
+   ads_msgfree(ads, *res);
+   *res = NULL;
+   }
 
-   asprintf(s, (cn=%s-%s), srv_cn[0], printer);
+   if (asprintf(s, (cn=%s-%s), srv_cn[0], printer) == -1) {
+   ldap_memfree(srv_dn);
+   return ADS_ERROR(LDAP_NO_MEMORY);
+   }
status = ads_search(ads, res, s, attrs);
 
ldap_memfree(srv_dn);
ldap_value_free(srv_cn);
-   free(s);
+   SAFE_FREE(s);
return status;  
 }
 
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index ba1fb43..2b24fdd 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -3381,7 +3381,7 @@ static WERROR nt_printer_unpublish_ads(ADS_STRUCT *ads,
NT_PRINTER_INFO_LEVEL *printer)
 {
ADS_STATUS ads_rc;
-   LDAPMessage *res;
+   LDAPMessage *res = NULL;
char *prt_dn = NULL;
 
DEBUG(5, (unpublishing printer %s\n, printer-info_2-printername));
@@ -3390,7 +3390,7 @@ static WERROR nt_printer_unpublish_ads(ADS_STRUCT *ads,
ads_rc = ads_find_printer_on_server(ads, res, 
printer-info_2-sharename, global_myname());
 
-   if (ADS_ERR_OK(ads_rc)  ads_count_replies(ads, res)) {
+   if (ADS_ERR_OK(ads_rc)  res  ads_count_replies(ads, res)) {
prt_dn = ads_get_dn(ads, res);
if (!prt_dn) {

[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4733-gbadf7dc

2008-12-23 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  badf7dc63fe96930700e7ea04d6d6f66a7a8c1f3 (commit)
  from  0f02a165e23d716dcf3791eeaa6a5afebe7a1f88 (commit)

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


- Log -
commit badf7dc63fe96930700e7ea04d6d6f66a7a8c1f3
Author: Jeremy Allison jer...@jeremy-desktop.(none)
Date:   Tue Dec 23 11:45:40 2008 -0800

More asprintf warning fixes.
Jeremy.

---

Summary of changes:
 source/libads/krb5_setpw.c  |   27 ++-
 source/passdb/login_cache.c |7 +++
 2 files changed, 21 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libads/krb5_setpw.c b/source/libads/krb5_setpw.c
index 719f3bd..be23f41 100644
--- a/source/libads/krb5_setpw.c
+++ b/source/libads/krb5_setpw.c
@@ -602,7 +602,13 @@ ADS_STATUS ads_krb5_set_password(const char *kdc_host, 
const char *princ,
}
realm++;
 
-   asprintf(princ_name, kadmin/chang...@%s, realm);
+   if (asprintf(princ_name, kadmin/chang...@%s, realm) == -1) {
+   krb5_cc_close(context, ccache);
+krb5_free_context(context);
+   DEBUG(1,(asprintf failed\n));
+   return ADS_ERROR_NT(NT_STATUS_NO_MEMORY);
+   }
+
ret = smb_krb5_parse_name(context, princ_name, creds.server);
if (ret) {
krb5_cc_close(context, ccache);
@@ -733,8 +739,13 @@ static ADS_STATUS ads_krb5_chg_password(const char 
*kdc_host,
 krb5_get_init_creds_opt_set_proxiable(opts, 0);
 
 /* We have to obtain an INITIAL changepw ticket for changing password */
-asprintf(chpw_princ, kadmin/chang...@%s,
-   (char *) krb5_princ_realm(context, princ));
+if (asprintf(chpw_princ, kadmin/chang...@%s,
+   (char *) krb5_princ_realm(context, princ)) == 
-1) {
+   krb5_free_context(context);
+   DEBUG(1,(ads_krb5_chg_password: asprintf fail\n));
+   return ADS_ERROR_NT(NT_STATUS_NO_MEMORY);
+}
+
 password = SMB_STRDUP(oldpw);
 ret = krb5_get_init_creds_password(context, creds, princ, password,
   kerb_prompter, NULL, 
@@ -804,16 +815,14 @@ ADS_STATUS ads_set_machine_password(ADS_STRUCT *ads,
  as otherwise the server might end up setting the password for a user
  instead
 */
-   asprintf(principal, %...@%s, machine_account, ads-config.realm);
+   if (asprintf(principal, %...@%s, machine_account, ads-config.realm) 
 0) {
+   return ADS_ERROR_NT(NT_STATUS_NO_MEMORY);
+   }

status = ads_krb5_set_password(ads-auth.kdc_server, principal, 
   password, ads-auth.time_offset);

-   free(principal);
-
+   SAFE_FREE(principal);
return status;
 }
-
-
-
 #endif
diff --git a/source/passdb/login_cache.c b/source/passdb/login_cache.c
index 8222f77..4e14293 100644
--- a/source/passdb/login_cache.c
+++ b/source/passdb/login_cache.c
@@ -35,14 +35,13 @@ bool login_cache_init(void)
/* skip file open if it's already opened */
if (cache) return True;
 
-   asprintf(cache_fname, %s/%s, lp_lockdir(), LOGIN_CACHE_FILE);
-   if (cache_fname)
-   DEBUG(5, (Opening cache file at %s\n, cache_fname));
-   else {
+   if (asprintf(cache_fname, %s/%s, lp_lockdir(), LOGIN_CACHE_FILE) == 
-1) {
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);
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 94df767f21003507f01b9b08d7c52b5b8819977f

2008-12-23 Thread Jeremy Allison
The branch, master has been updated
   via  94df767f21003507f01b9b08d7c52b5b8819977f (commit)
  from  b143938b8afaa7c7759e09228cc0d92ff97121d0 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 94df767f21003507f01b9b08d7c52b5b8819977f
Author: Jeremy Allison jer...@jeremy-desktop.(none)
Date:   Tue Dec 23 11:45:26 2008 -0800

More asprintf warning fixes.
Jeremy.

---

Summary of changes:
 source3/libads/krb5_setpw.c  |   27 ++-
 source3/passdb/login_cache.c |7 +++
 2 files changed, 21 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libads/krb5_setpw.c b/source3/libads/krb5_setpw.c
index 04ee6ee..5032ffd 100644
--- a/source3/libads/krb5_setpw.c
+++ b/source3/libads/krb5_setpw.c
@@ -605,7 +605,13 @@ ADS_STATUS ads_krb5_set_password(const char *kdc_host, 
const char *princ,
}
realm++;
 
-   asprintf(princ_name, kadmin/chang...@%s, realm);
+   if (asprintf(princ_name, kadmin/chang...@%s, realm) == -1) {
+   krb5_cc_close(context, ccache);
+krb5_free_context(context);
+   DEBUG(1,(asprintf failed\n));
+   return ADS_ERROR_NT(NT_STATUS_NO_MEMORY);
+   }
+
ret = smb_krb5_parse_name(context, princ_name, creds.server);
if (ret) {
krb5_cc_close(context, ccache);
@@ -736,8 +742,13 @@ static ADS_STATUS ads_krb5_chg_password(const char 
*kdc_host,
 krb5_get_init_creds_opt_set_proxiable(opts, 0);
 
 /* We have to obtain an INITIAL changepw ticket for changing password */
-asprintf(chpw_princ, kadmin/chang...@%s,
-   (char *) krb5_princ_realm(context, princ));
+if (asprintf(chpw_princ, kadmin/chang...@%s,
+   (char *) krb5_princ_realm(context, princ)) == 
-1) {
+   krb5_free_context(context);
+   DEBUG(1,(ads_krb5_chg_password: asprintf fail\n));
+   return ADS_ERROR_NT(NT_STATUS_NO_MEMORY);
+}
+
 password = SMB_STRDUP(oldpw);
 ret = krb5_get_init_creds_password(context, creds, princ, password,
   kerb_prompter, NULL, 
@@ -807,16 +818,14 @@ ADS_STATUS ads_set_machine_password(ADS_STRUCT *ads,
  as otherwise the server might end up setting the password for a user
  instead
 */
-   asprintf(principal, %...@%s, machine_account, ads-config.realm);
+   if (asprintf(principal, %...@%s, machine_account, ads-config.realm) 
 0) {
+   return ADS_ERROR_NT(NT_STATUS_NO_MEMORY);
+   }

status = ads_krb5_set_password(ads-auth.kdc_server, principal, 
   password, ads-auth.time_offset);

-   free(principal);
-
+   SAFE_FREE(principal);
return status;
 }
-
-
-
 #endif
diff --git a/source3/passdb/login_cache.c b/source3/passdb/login_cache.c
index 8222f77..4e14293 100644
--- a/source3/passdb/login_cache.c
+++ b/source3/passdb/login_cache.c
@@ -35,14 +35,13 @@ bool login_cache_init(void)
/* skip file open if it's already opened */
if (cache) return True;
 
-   asprintf(cache_fname, %s/%s, lp_lockdir(), LOGIN_CACHE_FILE);
-   if (cache_fname)
-   DEBUG(5, (Opening cache file at %s\n, cache_fname));
-   else {
+   if (asprintf(cache_fname, %s/%s, lp_lockdir(), LOGIN_CACHE_FILE) == 
-1) {
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);
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4734-gb37c96a

2008-12-23 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  b37c96a4fcf35ba2208078a53bf9484dcd31bd31 (commit)
  from  badf7dc63fe96930700e7ea04d6d6f66a7a8c1f3 (commit)

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


- Log -
commit b37c96a4fcf35ba2208078a53bf9484dcd31bd31
Author: Jeremy Allison jer...@jeremy-desktop.(none)
Date:   Tue Dec 23 11:57:03 2008 -0800

More asprintf warning fixes.
Jeremy.

---

Summary of changes:
 source/libads/ads_struct.c  |   11 ---
 source/libads/kerberos_keytab.c |   20 
 source/libads/ldap_user.c   |5 -
 3 files changed, 28 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libads/ads_struct.c b/source/libads/ads_struct.c
index 8cc2f12..aef35ad 100644
--- a/source/libads/ads_struct.c
+++ b/source/libads/ads_struct.c
@@ -57,12 +57,17 @@ char *ads_build_path(const char *realm, const char *sep, 
const char *field, int
strlcat(ret, p, len);

while ((p=strtok_r(NULL, sep, saveptr)) != NULL) {
-   char *s;
+   int retval;
+   char *s = NULL;
if (reverse)
-   asprintf(s, %s%s,%s, field, p, ret);
+   retval = asprintf(s, %s%s,%s, field, p, ret);
else
-   asprintf(s, %s,%s%s, ret, field, p);
+   retval = asprintf(s, %s,%s%s, ret, field, p);
free(ret);
+   if (retval == -1) {
+   free(r);
+   return NULL;
+   }
ret = SMB_STRDUP(s);
free(s);
}
diff --git a/source/libads/kerberos_keytab.c b/source/libads/kerberos_keytab.c
index c4e6709..7c028cb 100644
--- a/source/libads/kerberos_keytab.c
+++ b/source/libads/kerberos_keytab.c
@@ -299,17 +299,29 @@ int ads_keytab_add_entry(ADS_STRUCT *ads, const char 
*srvPrinc)
 
if (strchr_m(srvPrinc, '@')) {
/* It's a fully-named principal. */
-   asprintf(princ_s, %s, srvPrinc);
+   if (asprintf(princ_s, %s, srvPrinc) == -1) {
+   ret = -1;
+   goto out;
+   }
} else if (srvPrinc[strlen(srvPrinc)-1] == '$') {
/* It's the machine account, as used by smbclient clients. */
-   asprintf(princ_s, %...@%s, srvPrinc, lp_realm());
+   if (asprintf(princ_s, %...@%s, srvPrinc, lp_realm()) == -1) {
+   ret = -1;
+   goto out;
+   }
} else {
/* It's a normal service principal.  Add the SPN now so that we
 * can obtain credentials for it and double-check the salt value
 * used to generate the service's keys. */
 
-   asprintf(princ_s, %s/%...@%s, srvPrinc, my_fqdn, lp_realm());
-   asprintf(short_princ_s, %s/%...@%s, srvPrinc, machine_name, 
lp_realm());
+   if (asprintf(princ_s, %s/%...@%s, srvPrinc, my_fqdn, 
lp_realm()) == -1) {
+   ret = -1;
+   goto out;
+   }
+   if (asprintf(short_princ_s, %s/%...@%s, srvPrinc, 
machine_name, lp_realm()) == -1) {
+   ret = -1;
+   goto out;
+   }

/* According to http://support.microsoft.com/kb/326985/en-us, 
   certain principal names are automatically mapped to the 
host/...
diff --git a/source/libads/ldap_user.c b/source/libads/ldap_user.c
index bef2c91..eecd904 100644
--- a/source/libads/ldap_user.c
+++ b/source/libads/ldap_user.c
@@ -35,7 +35,10 @@
return ADS_ERROR(LDAP_NO_MEMORY);
}
 
-   asprintf(ldap_exp, (samAccountName=%s), escaped_user);
+   if (asprintf(ldap_exp, (samAccountName=%s), escaped_user) == -1) {
+   SAFE_FREE(escaped_user);
+   return ADS_ERROR(LDAP_NO_MEMORY);
+   }
status = ads_search(ads, res, ldap_exp, attrs);
SAFE_FREE(ldap_exp);
SAFE_FREE(escaped_user);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 1966a947d3f8d432d3af5a9c0004e27561ae7f65

2008-12-23 Thread Jeremy Allison
The branch, master has been updated
   via  1966a947d3f8d432d3af5a9c0004e27561ae7f65 (commit)
  from  94df767f21003507f01b9b08d7c52b5b8819977f (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 1966a947d3f8d432d3af5a9c0004e27561ae7f65
Author: Jeremy Allison jer...@jeremy-desktop.(none)
Date:   Tue Dec 23 11:56:48 2008 -0800

More asprintf warning fixes.
Jeremy.

---

Summary of changes:
 source3/libads/ads_struct.c  |   11 ---
 source3/libads/kerberos_keytab.c |   20 
 source3/libads/ldap_user.c   |5 -
 3 files changed, 28 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libads/ads_struct.c b/source3/libads/ads_struct.c
index 8cc2f12..aef35ad 100644
--- a/source3/libads/ads_struct.c
+++ b/source3/libads/ads_struct.c
@@ -57,12 +57,17 @@ char *ads_build_path(const char *realm, const char *sep, 
const char *field, int
strlcat(ret, p, len);

while ((p=strtok_r(NULL, sep, saveptr)) != NULL) {
-   char *s;
+   int retval;
+   char *s = NULL;
if (reverse)
-   asprintf(s, %s%s,%s, field, p, ret);
+   retval = asprintf(s, %s%s,%s, field, p, ret);
else
-   asprintf(s, %s,%s%s, ret, field, p);
+   retval = asprintf(s, %s,%s%s, ret, field, p);
free(ret);
+   if (retval == -1) {
+   free(r);
+   return NULL;
+   }
ret = SMB_STRDUP(s);
free(s);
}
diff --git a/source3/libads/kerberos_keytab.c b/source3/libads/kerberos_keytab.c
index c4e6709..7c028cb 100644
--- a/source3/libads/kerberos_keytab.c
+++ b/source3/libads/kerberos_keytab.c
@@ -299,17 +299,29 @@ int ads_keytab_add_entry(ADS_STRUCT *ads, const char 
*srvPrinc)
 
if (strchr_m(srvPrinc, '@')) {
/* It's a fully-named principal. */
-   asprintf(princ_s, %s, srvPrinc);
+   if (asprintf(princ_s, %s, srvPrinc) == -1) {
+   ret = -1;
+   goto out;
+   }
} else if (srvPrinc[strlen(srvPrinc)-1] == '$') {
/* It's the machine account, as used by smbclient clients. */
-   asprintf(princ_s, %...@%s, srvPrinc, lp_realm());
+   if (asprintf(princ_s, %...@%s, srvPrinc, lp_realm()) == -1) {
+   ret = -1;
+   goto out;
+   }
} else {
/* It's a normal service principal.  Add the SPN now so that we
 * can obtain credentials for it and double-check the salt value
 * used to generate the service's keys. */
 
-   asprintf(princ_s, %s/%...@%s, srvPrinc, my_fqdn, lp_realm());
-   asprintf(short_princ_s, %s/%...@%s, srvPrinc, machine_name, 
lp_realm());
+   if (asprintf(princ_s, %s/%...@%s, srvPrinc, my_fqdn, 
lp_realm()) == -1) {
+   ret = -1;
+   goto out;
+   }
+   if (asprintf(short_princ_s, %s/%...@%s, srvPrinc, 
machine_name, lp_realm()) == -1) {
+   ret = -1;
+   goto out;
+   }

/* According to http://support.microsoft.com/kb/326985/en-us, 
   certain principal names are automatically mapped to the 
host/...
diff --git a/source3/libads/ldap_user.c b/source3/libads/ldap_user.c
index bef2c91..eecd904 100644
--- a/source3/libads/ldap_user.c
+++ b/source3/libads/ldap_user.c
@@ -35,7 +35,10 @@
return ADS_ERROR(LDAP_NO_MEMORY);
}
 
-   asprintf(ldap_exp, (samAccountName=%s), escaped_user);
+   if (asprintf(ldap_exp, (samAccountName=%s), escaped_user) == -1) {
+   SAFE_FREE(escaped_user);
+   return ADS_ERROR(LDAP_NO_MEMORY);
+   }
status = ads_search(ads, res, ldap_exp, attrs);
SAFE_FREE(ldap_exp);
SAFE_FREE(escaped_user);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - d0eeb9aa8db42ed1fc18024614560820354e6dfa

2008-12-23 Thread Jeremy Allison
The branch, master has been updated
   via  d0eeb9aa8db42ed1fc18024614560820354e6dfa (commit)
  from  1966a947d3f8d432d3af5a9c0004e27561ae7f65 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit d0eeb9aa8db42ed1fc18024614560820354e6dfa
Author: Jeremy Allison jer...@jeremy-desktop.(none)
Date:   Tue Dec 23 12:11:12 2008 -0800

Fix more asprintf warnings and some error path errors.
Jeremy.

---

Summary of changes:
 source3/libads/util.c|   12 ++--
 source3/locking/posix.c  |   13 ++---
 source3/printing/nt_printing.c   |   22 +++---
 source3/printing/print_generic.c |4 +++-
 source3/rpc_server/srv_lsa_hnd.c |   11 +++
 source3/smbd/fileio.c|9 ++---
 source3/smbd/seal.c  |3 +--
 7 files changed, 44 insertions(+), 30 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libads/util.c b/source3/libads/util.c
index 9866a15..2c7ccfe 100644
--- a/source3/libads/util.c
+++ b/source3/libads/util.c
@@ -71,7 +71,11 @@ ADS_STATUS ads_guess_service_principal(ADS_STRUCT *ads,
 
strlower_m(server);
strupper_m(server_realm);
-   asprintf(princ, ldap/%...@%s, server, server_realm);
+   if (asprintf(princ, ldap/%...@%s, server, server_realm) == 
-1) {
+   SAFE_FREE(server);
+   SAFE_FREE(server_realm);
+   return ADS_ERROR(LDAP_NO_MEMORY);
+   }
 
SAFE_FREE(server);
SAFE_FREE(server_realm);
@@ -93,7 +97,11 @@ ADS_STATUS ads_guess_service_principal(ADS_STRUCT *ads,
 
strlower_m(server);
strupper_m(server_realm);
-   asprintf(princ, ldap/%...@%s, server, server_realm);
+   if (asprintf(princ, ldap/%...@%s, server, server_realm) == 
-1) {
+   SAFE_FREE(server);
+   SAFE_FREE(server_realm);
+   return ADS_ERROR(LDAP_NO_MEMORY);
+   }
 
SAFE_FREE(server);
SAFE_FREE(server_realm);
diff --git a/source3/locking/posix.c b/source3/locking/posix.c
index c036ee5..9b51c3a 100644
--- a/source3/locking/posix.c
+++ b/source3/locking/posix.c
@@ -909,13 +909,12 @@ new: start=%.0f,size=%.0f\n, (double)l_curr-start, 
(double)l_curr-size,
 */
char *msg = NULL;
 
-   /* Don't check if alloc succeeds here - we're
-* forcing a core dump anyway. */
-
-   asprintf(msg, logic flaw in cases: l_curr: 
start = %.0f, size = %.0f : \
-lock: start = %.0f, size = %.0f, (double)l_curr-start, (double)l_curr-size, 
(double)lock-start, (double)lock-size );
-
-   smb_panic(msg);
+   if (asprintf(msg, logic flaw in cases: 
l_curr: start = %.0f, size = %.0f : \
+lock: start = %.0f, size = %.0f, (double)l_curr-start, (double)l_curr-size, 
(double)lock-start, (double)lock-size ) != -1) {
+   smb_panic(msg);
+   } else {
+   smb_panic(posix_lock_list);
+   }
}
} /* end for ( l_curr = lhead; l_curr;) */
} /* end for (i=0; inum_locks  ul_head; i++) */
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 2b24fdd..3a81f27 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -3187,7 +3187,9 @@ static bool 
map_nt_printer_info2_to_dsspooler(NT_PRINTER_INFO_LEVEL_2 *info2)
 
map_sz_into_ctr(ctr, SPOOL_REG_SERVERNAME, longname);
 
-   asprintf(allocated_string, %s\\%s, longname, info2-sharename);
+   if (asprintf(allocated_string, %s\\%s, longname, 
info2-sharename) == -1) {
+   return false;
+   }
map_sz_into_ctr(ctr, SPOOL_REG_UNCNAME, allocated_string);
SAFE_FREE(allocated_string);
 
@@ -3267,6 +3269,7 @@ static WERROR nt_printer_publish_ads(ADS_STRUCT *ads,
struct GUID guid;
WERROR win_rc = WERR_OK;
size_t converted_size;
+   int ret;
 
DEBUG(5, (publishing printer %s\n, printer-info_2-printername));
 
@@ -3278,27 +3281,23 @@ static WERROR nt_printer_publish_ads(ADS_STRUCT *ads,
 
srv_dn_utf8 = ldap_get_dn((LDAP *)ads-ldap.ld, (LDAPMessage *)res);
if (!srv_dn_utf8) {
-   ads_destroy(ads);
return WERR_SERVER_UNAVAILABLE;
}
ads_msgfree(ads, res);
srv_cn_utf8 = ldap_explode_dn(srv_dn_utf8, 1);
if (!srv_cn_utf8) {
ldap_memfree(srv_dn_utf8);
-   

[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4735-g44ab658

2008-12-23 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  44ab658b6d80c66f20d80aede7fc7cd2b9a941b1 (commit)
  from  b37c96a4fcf35ba2208078a53bf9484dcd31bd31 (commit)

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


- Log -
commit 44ab658b6d80c66f20d80aede7fc7cd2b9a941b1
Author: Jeremy Allison jer...@jeremy-desktop.(none)
Date:   Tue Dec 23 12:10:47 2008 -0800

Fix more asprintf warnings and some error path errors.
Jeremy.

---

Summary of changes:
 source/libads/util.c|   12 ++--
 source/locking/posix.c  |   13 ++---
 source/printing/nt_printing.c   |   22 +++---
 source/printing/print_generic.c |4 +++-
 source/rpc_server/srv_lsa_hnd.c |   11 +++
 source/smbd/fileio.c|9 ++---
 source/smbd/seal.c  |3 +--
 7 files changed, 44 insertions(+), 30 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libads/util.c b/source/libads/util.c
index d23c36f..1fc0579 100644
--- a/source/libads/util.c
+++ b/source/libads/util.c
@@ -71,7 +71,11 @@ ADS_STATUS ads_guess_service_principal(ADS_STRUCT *ads,
 
strlower_m(server);
strupper_m(server_realm);
-   asprintf(princ, ldap/%...@%s, server, server_realm);
+   if (asprintf(princ, ldap/%...@%s, server, server_realm) == 
-1) {
+   SAFE_FREE(server);
+   SAFE_FREE(server_realm);
+   return ADS_ERROR(LDAP_NO_MEMORY);
+   }
 
SAFE_FREE(server);
SAFE_FREE(server_realm);
@@ -93,7 +97,11 @@ ADS_STATUS ads_guess_service_principal(ADS_STRUCT *ads,
 
strlower_m(server);
strupper_m(server_realm);
-   asprintf(princ, ldap/%...@%s, server, server_realm);
+   if (asprintf(princ, ldap/%...@%s, server, server_realm) == 
-1) {
+   SAFE_FREE(server);
+   SAFE_FREE(server_realm);
+   return ADS_ERROR(LDAP_NO_MEMORY);
+   }
 
SAFE_FREE(server);
SAFE_FREE(server_realm);
diff --git a/source/locking/posix.c b/source/locking/posix.c
index 32e1ee9..496be89 100644
--- a/source/locking/posix.c
+++ b/source/locking/posix.c
@@ -909,13 +909,12 @@ new: start=%.0f,size=%.0f\n, (double)l_curr-start, 
(double)l_curr-size,
 */
char *msg = NULL;
 
-   /* Don't check if alloc succeeds here - we're
-* forcing a core dump anyway. */
-
-   asprintf(msg, logic flaw in cases: l_curr: 
start = %.0f, size = %.0f : \
-lock: start = %.0f, size = %.0f, (double)l_curr-start, (double)l_curr-size, 
(double)lock-start, (double)lock-size );
-
-   smb_panic(msg);
+   if (asprintf(msg, logic flaw in cases: 
l_curr: start = %.0f, size = %.0f : \
+lock: start = %.0f, size = %.0f, (double)l_curr-start, (double)l_curr-size, 
(double)lock-start, (double)lock-size ) != -1) {
+   smb_panic(msg);
+   } else {
+   smb_panic(posix_lock_list);
+   }
}
} /* end for ( l_curr = lhead; l_curr;) */
} /* end for (i=0; inum_locks  ul_head; i++) */
diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c
index 9c62cd5..0d91836 100644
--- a/source/printing/nt_printing.c
+++ b/source/printing/nt_printing.c
@@ -3163,7 +3163,9 @@ static bool 
map_nt_printer_info2_to_dsspooler(NT_PRINTER_INFO_LEVEL_2 *info2)
 
map_sz_into_ctr(ctr, SPOOL_REG_SERVERNAME, longname);
 
-   asprintf(allocated_string, %s\\%s, longname, info2-sharename);
+   if (asprintf(allocated_string, %s\\%s, longname, 
info2-sharename) == -1) {
+   return false;
+   }
map_sz_into_ctr(ctr, SPOOL_REG_UNCNAME, allocated_string);
SAFE_FREE(allocated_string);
 
@@ -3243,6 +3245,7 @@ static WERROR nt_printer_publish_ads(ADS_STRUCT *ads,
struct GUID guid;
WERROR win_rc = WERR_OK;
size_t converted_size;
+   int ret;
 
DEBUG(5, (publishing printer %s\n, printer-info_2-printername));
 
@@ -3254,27 +3257,23 @@ static WERROR nt_printer_publish_ads(ADS_STRUCT *ads,
 
srv_dn_utf8 = ldap_get_dn((LDAP *)ads-ldap.ld, (LDAPMessage *)res);
if (!srv_dn_utf8) {
-   ads_destroy(ads);
return WERR_SERVER_UNAVAILABLE;
}
ads_msgfree(ads, res);
srv_cn_utf8 = ldap_explode_dn(srv_dn_utf8, 1);
if (!srv_cn_utf8) {
ldap_memfree(srv_dn_utf8);
-   

[SCM] Samba Shared Repository - branch master updated - ff26cb4b1c1d0292231e1cfc0490f4be6040d3e3

2008-12-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  ff26cb4b1c1d0292231e1cfc0490f4be6040d3e3 (commit)
   via  ef80d1b794a209ee446c7a586530a5fdd51175f2 (commit)
  from  d0eeb9aa8db42ed1fc18024614560820354e6dfa (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit ff26cb4b1c1d0292231e1cfc0490f4be6040d3e3
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Dec 23 22:11:21 2008 +0100

Fix compiler warnings in libnet.

commit ef80d1b794a209ee446c7a586530a5fdd51175f2
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Dec 23 22:10:34 2008 +0100

Fix use of time offset parameter, and add test to make sure I don't break 
it again :-)

---

Summary of changes:
 lib/util/tests/time.c |   16 
 lib/util/time.c   |5 -
 lib/util/time.h   |3 +++
 source3/lib/time.c|2 --
 source3/param/loadparm.c  |2 --
 source4/libnet/groupinfo.c|5 +
 source4/libnet/groupman.c |4 +---
 source4/libnet/libnet_become_dc.c |4 ++--
 source4/libnet/libnet_join.c  |2 ++
 source4/libnet/userinfo.c |5 +
 source4/libnet/userman.c  |7 ++-
 11 files changed, 32 insertions(+), 23 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/tests/time.c b/lib/util/tests/time.c
index 4a31566..e24c5fe 100644
--- a/lib/util/tests/time.c
+++ b/lib/util/tests/time.c
@@ -58,6 +58,21 @@ static bool test_timestring(struct torture_context *tctx)
return true;
 }
 
+static bool test_get_time_zone(struct torture_context *tctx)
+{
+   time_t t = time(NULL);
+   int old_extra_time_offset = extra_time_offset;
+   int old_offset, new_offset;
+   /* test that extra_time_offset works */
+
+   old_offset = get_time_zone(t);
+   extra_time_offset = 42;
+   new_offset = get_time_zone(t);
+   extra_time_offset = old_extra_time_offset;
+   torture_assert_int_equal(tctx, old_offset+60*42, new_offset,
+time offset not used);
+   return true;
+}
 
 
 struct torture_suite *torture_local_util_time(TALLOC_CTX *mem_ctx)
@@ -65,6 +80,7 @@ struct torture_suite *torture_local_util_time(TALLOC_CTX 
*mem_ctx)
struct torture_suite *suite = torture_suite_create(mem_ctx, TIME);
 
torture_suite_add_simple_test(suite, null_time, test_null_time);
+   torture_suite_add_simple_test(suite, get_time_zone, 
test_get_time_zone);
torture_suite_add_simple_test(suite, null_nttime, test_null_nttime);
torture_suite_add_simple_test(suite, http_timestring, 
  
test_http_timestring);
diff --git a/lib/util/time.c b/lib/util/time.c
index a001e5f..eadafe4 100644
--- a/lib/util/time.c
+++ b/lib/util/time.c
@@ -628,6 +628,9 @@ static int tm_diff(struct tm *a, struct tm *b)
return seconds;
 }
 
+
+int extra_time_offset=0;
+
 /**
   return the UTC offset in seconds west of UTC, or 0 if it cannot be determined
  */
@@ -641,7 +644,7 @@ _PUBLIC_ int get_time_zone(time_t t)
tm = localtime(t);
if (!tm)
return 0;
-   return tm_diff(tm_utc,tm);
+   return tm_diff(tm_utc,tm)+60*extra_time_offset;
 }
 
 struct timespec nt_time_to_unix_timespec(NTTIME *nt)
diff --git a/lib/util/time.h b/lib/util/time.h
index 42644a3..e40de2d 100644
--- a/lib/util/time.h
+++ b/lib/util/time.h
@@ -239,4 +239,7 @@ struct timespec convert_time_t_to_timespec(time_t t);
 
 bool null_timespec(struct timespec ts);
 
+/** Extra minutes to add to the normal GMT to local time conversion. */
+extern int extra_time_offset;
+
 #endif /* _SAMBA_TIME_H_ */
diff --git a/source3/lib/time.c b/source3/lib/time.c
index db2266f..cae6b47 100644
--- a/source3/lib/time.c
+++ b/source3/lib/time.c
@@ -131,8 +131,6 @@ time_t convert_uint32_to_time_t(uint32_t u)
return (time_t)u;
 }
 
-int extra_time_offset=0;
-
 /
  Check if NTTIME is 0.
 /
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 8f03ae8..274c799 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -94,8 +94,6 @@ static int config_backend = CONFIG_BACKEND_FILE;
 #define USERSHARE_VALID 1
 #define USERSHARE_PENDING_DELETE 2
 
-extern int extra_time_offset;
-
 static bool defaults_saved = False;
 
 struct param_opt_struct {
diff --git a/source4/libnet/groupinfo.c b/source4/libnet/groupinfo.c
index 5c94c34..1779c28 100644
--- a/source4/libnet/groupinfo.c
+++ b/source4/libnet/groupinfo.c
@@ -24,13 +24,10 @@
 
 #include includes.h
 #include libcli/composite/composite.h
-#include libnet/composite.h
 #include librpc/gen_ndr/security.h
 

[SCM] Samba Shared Repository - branch master updated - 5c75b65ca15f7c71babd835a45b252fed6534acf

2008-12-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  5c75b65ca15f7c71babd835a45b252fed6534acf (commit)
   via  86cee0b28c50dd849fe919bbe3faa4deba5275bf (commit)
  from  ff26cb4b1c1d0292231e1cfc0490f4be6040d3e3 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 5c75b65ca15f7c71babd835a45b252fed6534acf
Merge: 86cee0b28c50dd849fe919bbe3faa4deba5275bf 
ff26cb4b1c1d0292231e1cfc0490f4be6040d3e3
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Dec 23 22:12:23 2008 +0100

Merge branch 'master' of ssh://git.samba.org/data/git/samba

commit 86cee0b28c50dd849fe919bbe3faa4deba5275bf
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Dec 23 04:06:21 2008 +0100

pytalloc: Add some comments, use talloc object location in repr rather
than python object location.

---

Summary of changes:
 lib/talloc/pytalloc.c |   20 +++-
 1 files changed, 15 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/talloc/pytalloc.c b/lib/talloc/pytalloc.c
index 8bc85ee..51d087b 100644
--- a/lib/talloc/pytalloc.c
+++ b/lib/talloc/pytalloc.c
@@ -18,8 +18,11 @@
 */
 
 #include talloc.h
-#include ../lib/talloc/pytalloc.h
+#include pytalloc.h
 
+/**
+ * Simple dealloc for talloc-wrapping PyObjects
+ */
 void py_talloc_dealloc(PyObject* self)
 {
py_talloc_Object *obj = (py_talloc_Object *)self;
@@ -28,6 +31,9 @@ void py_talloc_dealloc(PyObject* self)
self-ob_type-tp_free(self);
 }
 
+/**
+ * Import an existing talloc pointer into a Python object.
+ */
 PyObject *py_talloc_import_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx, 
   void *ptr)
 {
@@ -43,10 +49,14 @@ PyObject *py_talloc_import_ex(PyTypeObject *py_type, 
TALLOC_CTX *mem_ctx,
return (PyObject *)ret;
 }
 
-PyObject *py_talloc_default_repr(PyObject *py_obj)
+/**
+ * Default (but slightly more useful than the default) implementation of 
Repr().
+ */
+PyObject *py_talloc_default_repr(PyObject *obj)
 {
-   py_talloc_Object *obj = (py_talloc_Object *)py_obj;
-   PyTypeObject *type = (PyTypeObject*)PyObject_Type((PyObject *)obj);
+   py_talloc_Object *talloc_obj = (py_talloc_Object *)obj;
+   PyTypeObject *type = (PyTypeObject*)PyObject_Type(obj);
 
-   return PyString_FromFormat(%s talloc object at 0x%x, type-tp_name, 
(intptr_t)py_obj);
+   return PyString_FromFormat(%s talloc object at 0x%x, 
+  type-tp_name, (intptr_t)talloc_obj-ptr);
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 30bdb68c9ebe281d8c512f8b737141d76a7c7d68

2008-12-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  30bdb68c9ebe281d8c512f8b737141d76a7c7d68 (commit)
   via  e94e7f82798db59849cb1dc6a99b414adc11594e (commit)
   via  dcc4081f75f0d0c51878385477f7738f49a761dd (commit)
   via  8df6af213a0ca9a70e30c630970b5e2d2debe821 (commit)
   via  bd64688c6aca6512efd0bd7d95000579beea3119 (commit)
   via  32e03f9fa55a4c897ade55b9b2e3740facfdcfd1 (commit)
  from  5c75b65ca15f7c71babd835a45b252fed6534acf (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 30bdb68c9ebe281d8c512f8b737141d76a7c7d68
Merge: e94e7f82798db59849cb1dc6a99b414adc11594e 
5c75b65ca15f7c71babd835a45b252fed6534acf
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Dec 23 23:26:32 2008 +0100

Merge branch 'master' of ssh://git.samba.org/data/git/samba

commit e94e7f82798db59849cb1dc6a99b414adc11594e
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Dec 23 23:24:12 2008 +0100

s4: Fix make clean to remove gen_ndr objects.

commit dcc4081f75f0d0c51878385477f7738f49a761dd
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Dec 23 23:22:57 2008 +0100

Fix more compiler warnings.

commit 8df6af213a0ca9a70e30c630970b5e2d2debe821
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Dec 23 23:02:54 2008 +0100

Use 32-bit smbpid in interface as required by SMB2, in line with
1bdd08227e7d046305705050f21f0f1b6dd6994a.

commit bd64688c6aca6512efd0bd7d95000579beea3119
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Dec 23 22:57:11 2008 +0100

Fix more compiler warnings in various places.

commit 32e03f9fa55a4c897ade55b9b2e3740facfdcfd1
Author: Jelmer Vernooij jel...@samba.org
Date:   Tue Dec 23 22:57:00 2008 +0100

Install tevent_internal.h, as Samba 4 needs it.

---

Summary of changes:
 lib/tevent/tevent.mk  |2 +
 lib/tevent/tevent_internal.h  |2 +-
 libcli/nbt/pynbt.c|4 +-
 source4/Makefile  |2 +-
 source4/cluster/ctdb/brlock_ctdb.c|6 ++--
 source4/dsdb/samdb/ldb_modules/kludge_acl.c   |8 ++--
 source4/dsdb/samdb/ldb_modules/partition.c|8 ++--
 source4/dsdb/schema/schema_description.c  |   12 
 source4/dsdb/schema/schema_query.c|   38 
 source4/lib/events/tevent_s4.c|4 +-
 source4/lib/ldb/modules/operational.c |8 +
 source4/lib/tls/tls.c |   20 ++--
 source4/libcli/security/security_descriptor.c |1 -
 source4/ntvfs/common/brlock.c |4 +-
 source4/ntvfs/common/brlock.h |6 ++--
 source4/ntvfs/ipc/ipc_rap.c   |2 -
 source4/ntvfs/posix/pvfs_resolve.c|6 ++--
 source4/torture/libnet/libnet_rpc.c   |   26 
 source4/torture/raw/lookuprate.c  |2 +-
 source4/torture/raw/tconrate.c|1 -
 source4/torture/rpc/netlogon.c|1 -
 source4/torture/rpc/samr.c|2 +-
 source4/torture/rpc/schannel.c|   10 +++---
 source4/utils/ad2oLschema.c   |4 +-
 source4/web_server/wsgi.c |4 --
 source4/winbind/wb_init_domain.c  |1 -
 26 files changed, 86 insertions(+), 98 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent.mk b/lib/tevent/tevent.mk
index 2e4d5a9..6538362 100644
--- a/lib/tevent/tevent.mk
+++ b/lib/tevent/tevent.mk
@@ -21,6 +21,8 @@ installdirs::
 
 installheaders:: installdirs
cp $(srcdir)/tevent.h $(DESTDIR)$(includedir)
+   cp $(srcdir)/tevent_internal.h $(DESTDIR)$(includedir)
+   cp $(srcdir)/tevent_util.h $(DESTDIR)$(includedir)
 
 installlibs:: installdirs
cp tevent.pc $(DESTDIR)$(libdir)/pkgconfig
diff --git a/lib/tevent/tevent_internal.h b/lib/tevent/tevent_internal.h
index 0d0755f..9606fad 100644
--- a/lib/tevent/tevent_internal.h
+++ b/lib/tevent/tevent_internal.h
@@ -103,7 +103,7 @@ struct ev_debug_ops {
 
 int ev_set_debug(struct event_context *ev,
 void (*debug)(void *context, enum ev_debug_level level,
-   const char *fmt, va_list ap),
+   const char *fmt, va_list ap) 
PRINTF_ATTRIBUTE(3,0),
 void *context);
 int ev_set_debug_stderr(struct event_context *ev);
 void ev_debug(struct event_context *ev, enum ev_debug_level level, const char 
*fmt, ...);
diff --git a/libcli/nbt/pynbt.c b/libcli/nbt/pynbt.c
index 6750ad7..1d8924e 100644
--- a/libcli/nbt/pynbt.c
+++ b/libcli/nbt/pynbt.c
@@ -90,7 +90,7 @@ static bool PyObject_AsDestinationTuple(PyObject *obj, const 
char **dest_addr, u
return false;
 }
 
-static bool PyObject_AsNBTName(PyObject *obj, struct 

[SCM] Samba Shared Repository - branch master updated - 1feab85be605269db272a4b48375fd85845b7ffd

2008-12-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  1feab85be605269db272a4b48375fd85845b7ffd (commit)
  from  30bdb68c9ebe281d8c512f8b737141d76a7c7d68 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 1feab85be605269db272a4b48375fd85845b7ffd
Author: Jelmer Vernooij jel...@samba.org
Date:   Wed Dec 24 00:15:43 2008 +0100

Rename samba-socket - samba_socket to fix a couple more compiler
warnings.

---

Summary of changes:
 source4/auth/gensec/config.mk   |2 +-
 source4/auth/kerberos/config.mk |2 +-
 source4/lib/messaging/config.mk |2 +-
 source4/lib/socket/config.mk|8 
 source4/lib/tls/config.mk   |2 +-
 source4/libcli/config.mk|8 
 source4/libcli/ldap/config.mk   |2 +-
 source4/librpc/config.mk|2 +-
 source4/smbd/config.mk  |2 +-
 source4/utils/config.mk |2 +-
 10 files changed, 16 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/gensec/config.mk b/source4/auth/gensec/config.mk
index f08ff26..3c2fa51 100644
--- a/source4/auth/gensec/config.mk
+++ b/source4/auth/gensec/config.mk
@@ -2,7 +2,7 @@
 # Start SUBSYSTEM gensec
 [LIBRARY::gensec]
 PUBLIC_DEPENDENCIES = \
-   CREDENTIALS LIBSAMBA-UTIL LIBCRYPTO ASN1_UTIL samba-socket 
LIBPACKET
+   CREDENTIALS LIBSAMBA-UTIL LIBCRYPTO ASN1_UTIL samba_socket 
LIBPACKET
 # End SUBSYSTEM gensec
 #
 
diff --git a/source4/auth/kerberos/config.mk b/source4/auth/kerberos/config.mk
index 951e247..b724b8d 100644
--- a/source4/auth/kerberos/config.mk
+++ b/source4/auth/kerberos/config.mk
@@ -1,7 +1,7 @@
 #
 # Start SUBSYSTEM KERBEROS
 [SUBSYSTEM::KERBEROS]
-PUBLIC_DEPENDENCIES = HEIMDAL_KRB5 NDR_KRB5PAC samba-socket LIBCLI_RESOLVE
+PUBLIC_DEPENDENCIES = HEIMDAL_KRB5 NDR_KRB5PAC samba_socket LIBCLI_RESOLVE
 PRIVATE_DEPENDENCIES = ASN1_UTIL auth_sam_reply LIBPACKET LIBNDR
 # End SUBSYSTEM KERBEROS
 #
diff --git a/source4/lib/messaging/config.mk b/source4/lib/messaging/config.mk
index e92f78c..b5b1e6d 100644
--- a/source4/lib/messaging/config.mk
+++ b/source4/lib/messaging/config.mk
@@ -7,7 +7,7 @@ PUBLIC_DEPENDENCIES = \
UTIL_TDB \
CLUSTER \
LIBNDR \
-   samba-socket
+   samba_socket
 
 MESSAGING_OBJ_FILES = $(libmessagingsrcdir)/messaging.o
 
diff --git a/source4/lib/socket/config.mk b/source4/lib/socket/config.mk
index 18aa806..ac515c8 100644
--- a/source4/lib/socket/config.mk
+++ b/source4/lib/socket/config.mk
@@ -12,7 +12,7 @@ $(eval $(call 
proto_header_template,$(libsocketsrcdir)/netif_proto.h,$(LIBNETIF_
 
 # Start MODULE socket_ip
 [MODULE::socket_ip]
-SUBSYSTEM = samba-socket
+SUBSYSTEM = samba_socket
 OUTPUT_TYPE = MERGED_OBJ
 PRIVATE_DEPENDENCIES = LIBSAMBA-ERRORS LIBREPLACE_NETWORK
 # End MODULE socket_ip
@@ -23,7 +23,7 @@ socket_ip_OBJ_FILES = $(libsocketsrcdir)/socket_ip.o
 
 # Start MODULE socket_unix
 [MODULE::socket_unix]
-SUBSYSTEM = samba-socket
+SUBSYSTEM = samba_socket
 OUTPUT_TYPE = MERGED_OBJ
 PRIVATE_DEPENDENCIES = LIBREPLACE_NETWORK
 # End MODULE socket_unix
@@ -33,11 +33,11 @@ socket_unix_OBJ_FILES = $(libsocketsrcdir)/socket_unix.o
 
 
 # Start SUBSYSTEM SOCKET
-[SUBSYSTEM::samba-socket]
+[SUBSYSTEM::samba_socket]
 PUBLIC_DEPENDENCIES = LIBTALLOC
 PRIVATE_DEPENDENCIES = SOCKET_WRAPPER LIBCLI_COMPOSITE LIBCLI_RESOLVE
 # End SUBSYSTEM SOCKET
 
 
-samba-socket_OBJ_FILES = $(addprefix $(libsocketsrcdir)/, socket.o access.o 
connect_multi.o connect.o)
+samba_socket_OBJ_FILES = $(addprefix $(libsocketsrcdir)/, socket.o access.o 
connect_multi.o connect.o)
 
diff --git a/source4/lib/tls/config.mk b/source4/lib/tls/config.mk
index e01f79c..ff1eedf 100644
--- a/source4/lib/tls/config.mk
+++ b/source4/lib/tls/config.mk
@@ -1,5 +1,5 @@
 [SUBSYSTEM::LIBTLS]
 PUBLIC_DEPENDENCIES = \
-   LIBTALLOC GNUTLS LIBSAMBA-HOSTCONFIG samba-socket
+   LIBTALLOC GNUTLS LIBSAMBA-HOSTCONFIG samba_socket
 
 LIBTLS_OBJ_FILES = $(addprefix $(libtlssrcdir)/, tls.o tlscert.o)
diff --git a/source4/libcli/config.mk b/source4/libcli/config.mk
index 9bf262f..60baf83 100644
--- a/source4/libcli/config.mk
+++ b/source4/libcli/config.mk
@@ -46,7 +46,7 @@ $(eval $(call 
proto_header_template,$(libclinbtsrcdir)/nbtname.h,$(NDR_NBT_BUF_O
 
 [SUBSYSTEM::LIBCLI_NBT]
 PUBLIC_DEPENDENCIES = LIBNDR NDR_NBT LIBCLI_COMPOSITE LIBEVENTS \
-   NDR_SECURITY samba-socket LIBSAMBA-UTIL
+   NDR_SECURITY samba_socket LIBSAMBA-UTIL
 
 LIBCLI_NBT_OBJ_FILES = $(addprefix $(libclinbtsrcdir)/, \
  

Build status as of Wed Dec 24 00:00:02 2008

2008-12-23 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2008-12-23 
00:00:29.0 +
+++ /home/build/master/cache/broken_results.txt 2008-12-24 00:00:28.0 
+
@@ -1,4 +1,4 @@
-Build status as of Tue Dec 23 00:00:02 2008
+Build status as of Wed Dec 24 00:00:02 2008
 
 Build counts:
 Tree Total  Broken Panic 
@@ -7,17 +7,17 @@
 ctdb 0  0  0 
 distcc   1  0  0 
 ldb  30 30 0 
-libreplace   29 11 0 
+libreplace   28 11 0 
 lorikeet-heimdal 27 18 0 
-pidl 18 17 0 
+pidl 18 2  0 
 ppp  12 0  0 
 rsync30 12 0 
 samba-docs   0  0  0 
 samba-gtk5  5  0 
-samba_3_X_devel 26 22 1 
+samba_3_X_devel 26 21 1 
 samba_3_X_test 26 21 0 
-samba_4_0_test 30 30 1 
-smb-build28 6  0 
+samba_4_0_test 30 29 3 
+smb-build27 6  0 
 talloc   30 30 0 
-tdb  28 13 0 
+tdb  27 10 0 
 


[SCM] Samba Shared Repository - branch master updated - 479b4b09e1694b60a85d7d613655d3dab180ea94

2008-12-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  479b4b09e1694b60a85d7d613655d3dab180ea94 (commit)
  from  1feab85be605269db272a4b48375fd85845b7ffd (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 479b4b09e1694b60a85d7d613655d3dab180ea94
Author: Jelmer Vernooij jel...@samba.org
Date:   Wed Dec 24 05:39:29 2008 +0100

Fix accidental condition inversion.

---

Summary of changes:
 source4/lib/ldb/modules/operational.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb/modules/operational.c 
b/source4/lib/ldb/modules/operational.c
index 4193f91..11c06c8 100644
--- a/source4/lib/ldb/modules/operational.c
+++ b/source4/lib/ldb/modules/operational.c
@@ -273,7 +273,7 @@ static int operational_search(struct ldb_module *module, 
struct ldb_request *req
req-op.search.scope,
req-op.search.tree,
/* use new set of attrs if any */
-   
search_attrs?req-op.search.attrs:search_attrs,
+   search_attrs == 
NULL?req-op.search.attrs:search_attrs,
req-controls,
ac, operational_callback,
req);


-- 
Samba Shared Repository