Merge branch 'selftest' of git://git.samba.org/jelmer/samba
authorJelmer Vernooij <jelmer@samba.org>
Sun, 19 Oct 2008 08:20:37 +0000 (10:20 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 19 Oct 2008 08:20:37 +0000 (10:20 +0200)
913 files changed:
.gitignore
docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml
lib/crypto/hmacmd5test.c
lib/crypto/md4test.c
lib/crypto/md5test.c
lib/replace/replace.h
lib/util/Doxyfile [moved from source4/lib/util/Doxyfile with 100% similarity]
lib/util/README [new file with mode: 0644]
lib/util/asn1.c [moved from source4/lib/util/asn1.c with 99% similarity]
lib/util/asn1.h [moved from source4/lib/util/asn1.h with 97% similarity]
lib/util/attr.h [moved from source4/lib/util/attr.h with 100% similarity]
lib/util/become_daemon.c [moved from source4/lib/util/become_daemon.c with 100% similarity]
lib/util/byteorder.h [moved from source4/lib/util/byteorder.h with 100% similarity]
lib/util/capability.c [moved from source4/lib/util/capability.c with 100% similarity]
lib/util/capability.m4 [moved from source4/lib/util/capability.m4 with 100% similarity]
lib/util/config.mk [moved from source4/lib/util/config.mk with 93% similarity]
lib/util/data_blob.c [moved from source4/lib/util/data_blob.c with 93% similarity]
lib/util/data_blob.h [moved from source4/lib/util/data_blob.h with 92% similarity]
lib/util/debug.c [moved from source4/lib/util/debug.c with 92% similarity]
lib/util/debug.h [moved from source4/lib/util/debug.h with 93% similarity]
lib/util/dlinklist.h [moved from source3/include/dlinklist.h with 100% similarity]
lib/util/dprintf.c [moved from source4/lib/util/dprintf.c with 100% similarity]
lib/util/fault.c [moved from source4/lib/util/fault.c with 100% similarity]
lib/util/fault.m4 [moved from source4/lib/util/fault.m4 with 100% similarity]
lib/util/fsusage.c [moved from source4/lib/util/fsusage.c with 92% similarity]
lib/util/fsusage.m4 [moved from source4/lib/util/fsusage.m4 with 92% similarity]
lib/util/genrand.c [moved from source4/lib/util/genrand.c with 100% similarity]
lib/util/idtree.c [moved from source4/lib/util/idtree.c with 100% similarity]
lib/util/mainpage.dox [moved from source4/lib/util/mainpage.dox with 100% similarity]
lib/util/memory.h [new file with mode: 0644]
lib/util/ms_fnmatch.c [moved from source4/lib/util/ms_fnmatch.c with 100% similarity]
lib/util/mutex.c [moved from source4/lib/util/mutex.c with 100% similarity]
lib/util/mutex.h [moved from source4/lib/util/mutex.h with 100% similarity]
lib/util/params.c [moved from source4/lib/util/params.c with 99% similarity]
lib/util/rbtree.c [moved from source3/lib/rbtree.c with 100% similarity]
lib/util/rbtree.h [moved from source3/include/rbtree.h with 100% similarity]
lib/util/safe_string.h [moved from source4/lib/util/safe_string.h with 100% similarity]
lib/util/signal.c [moved from source4/lib/util/signal.c with 100% similarity]
lib/util/signal.m4 [moved from source4/lib/util/signal.m4 with 100% similarity]
lib/util/substitute.c [new file with mode: 0644]
lib/util/system.c [moved from source4/lib/util/system.c with 100% similarity]
lib/util/tests/data_blob.c [new file with mode: 0644]
lib/util/tests/file.c [moved from source4/lib/util/tests/file.c with 92% similarity]
lib/util/tests/genrand.c [moved from source4/lib/util/tests/genrand.c with 100% similarity]
lib/util/tests/idtree.c [moved from source4/lib/util/tests/idtree.c with 100% similarity]
lib/util/tests/str.c [moved from source4/lib/util/tests/str.c with 100% similarity]
lib/util/tests/strlist.c [moved from source4/lib/util/tests/strlist.c with 94% similarity]
lib/util/tests/time.c [new file with mode: 0644]
lib/util/time.c [moved from source4/lib/util/time.c with 86% similarity]
lib/util/time.h [moved from source4/lib/util/time.h with 97% similarity]
lib/util/time.m4 [moved from source4/lib/util/time.m4 with 100% similarity]
lib/util/unix_privs.c [moved from source4/lib/util/unix_privs.c with 100% similarity]
lib/util/util.c [moved from source4/lib/util/util.c with 81% similarity]
lib/util/util.h [moved from source4/lib/util/util.h with 88% similarity]
lib/util/util.m4 [moved from source4/lib/util/util.m4 with 100% similarity]
lib/util/util_file.c [moved from source4/lib/util/util_file.c with 85% similarity]
lib/util/util_getent.c [moved from source4/lib/util/util_getent.c with 100% similarity]
lib/util/util_ldb.c [moved from source4/lib/util/util_ldb.c with 98% similarity]
lib/util/util_ldb.h [moved from source4/lib/util/util_ldb.h with 100% similarity]
lib/util/util_net.c [new file with mode: 0644]
lib/util/util_pw.c [moved from source4/lib/util/util_pw.c with 100% similarity]
lib/util/util_str.c [moved from source4/lib/util/util_str.c with 80% similarity]
lib/util/util_strlist.c [moved from source4/lib/util/util_strlist.c with 92% similarity]
lib/util/util_tdb.c [moved from source4/lib/util/util_tdb.c with 61% similarity]
lib/util/util_tdb.h [new file with mode: 0644]
lib/util/wrap_xattr.c [moved from source4/lib/util/wrap_xattr.c with 99% similarity]
lib/util/wrap_xattr.h [moved from source4/lib/util/wrap_xattr.h with 100% similarity]
lib/util/xattr.m4 [moved from source4/lib/util/xattr.m4 with 100% similarity]
lib/util/xfile.c [moved from source4/lib/util/xfile.c with 94% similarity]
lib/util/xfile.h [moved from source4/lib/util/xfile.h with 98% similarity]
lib/zlib/ChangeLog [moved from source4/lib/zlib/ChangeLog with 100% similarity]
lib/zlib/FAQ [moved from source4/lib/zlib/FAQ with 100% similarity]
lib/zlib/INDEX [moved from source4/lib/zlib/INDEX with 100% similarity]
lib/zlib/Makefile [moved from source4/lib/zlib/Makefile with 100% similarity]
lib/zlib/Makefile.in [moved from source4/lib/zlib/Makefile.in with 100% similarity]
lib/zlib/README [moved from source4/lib/zlib/README with 100% similarity]
lib/zlib/adler32.c [moved from source4/lib/zlib/adler32.c with 100% similarity]
lib/zlib/algorithm.txt [moved from source4/lib/zlib/algorithm.txt with 100% similarity]
lib/zlib/amiga/Makefile.pup [moved from source4/lib/zlib/amiga/Makefile.pup with 100% similarity]
lib/zlib/amiga/Makefile.sas [moved from source4/lib/zlib/amiga/Makefile.sas with 100% similarity]
lib/zlib/as400/bndsrc [moved from source4/lib/zlib/as400/bndsrc with 100% similarity]
lib/zlib/as400/compile.clp [moved from source4/lib/zlib/as400/compile.clp with 100% similarity]
lib/zlib/as400/readme.txt [moved from source4/lib/zlib/as400/readme.txt with 100% similarity]
lib/zlib/as400/zlib.inc [moved from source4/lib/zlib/as400/zlib.inc with 100% similarity]
lib/zlib/compress.c [moved from source4/lib/zlib/compress.c with 100% similarity]
lib/zlib/contrib/README.contrib [moved from source4/lib/zlib/contrib/README.contrib with 100% similarity]
lib/zlib/contrib/ada/buffer_demo.adb [moved from source4/lib/zlib/contrib/ada/buffer_demo.adb with 100% similarity]
lib/zlib/contrib/ada/mtest.adb [moved from source4/lib/zlib/contrib/ada/mtest.adb with 100% similarity]
lib/zlib/contrib/ada/read.adb [moved from source4/lib/zlib/contrib/ada/read.adb with 100% similarity]
lib/zlib/contrib/ada/readme.txt [moved from source4/lib/zlib/contrib/ada/readme.txt with 100% similarity]
lib/zlib/contrib/ada/test.adb [moved from source4/lib/zlib/contrib/ada/test.adb with 100% similarity]
lib/zlib/contrib/ada/zlib-streams.adb [moved from source4/lib/zlib/contrib/ada/zlib-streams.adb with 100% similarity]
lib/zlib/contrib/ada/zlib-streams.ads [moved from source4/lib/zlib/contrib/ada/zlib-streams.ads with 100% similarity]
lib/zlib/contrib/ada/zlib-thin.adb [moved from source4/lib/zlib/contrib/ada/zlib-thin.adb with 100% similarity]
lib/zlib/contrib/ada/zlib-thin.ads [moved from source4/lib/zlib/contrib/ada/zlib-thin.ads with 100% similarity]
lib/zlib/contrib/ada/zlib.adb [moved from source4/lib/zlib/contrib/ada/zlib.adb with 100% similarity]
lib/zlib/contrib/ada/zlib.ads [moved from source4/lib/zlib/contrib/ada/zlib.ads with 100% similarity]
lib/zlib/contrib/ada/zlib.gpr [moved from source4/lib/zlib/contrib/ada/zlib.gpr with 100% similarity]
lib/zlib/contrib/asm586/README.586 [moved from source4/lib/zlib/contrib/asm586/README.586 with 100% similarity]
lib/zlib/contrib/asm586/match.S [moved from source4/lib/zlib/contrib/asm586/match.S with 100% similarity]
lib/zlib/contrib/asm686/README.686 [moved from source4/lib/zlib/contrib/asm686/README.686 with 100% similarity]
lib/zlib/contrib/asm686/match.S [moved from source4/lib/zlib/contrib/asm686/match.S with 100% similarity]
lib/zlib/contrib/blast/Makefile [moved from source4/lib/zlib/contrib/blast/Makefile with 100% similarity]
lib/zlib/contrib/blast/README [moved from source4/lib/zlib/contrib/blast/README with 100% similarity]
lib/zlib/contrib/blast/blast.c [moved from source4/lib/zlib/contrib/blast/blast.c with 100% similarity]
lib/zlib/contrib/blast/blast.h [moved from source4/lib/zlib/contrib/blast/blast.h with 100% similarity]
lib/zlib/contrib/blast/test.pk [moved from source4/lib/zlib/contrib/blast/test.pk with 100% similarity]
lib/zlib/contrib/blast/test.txt [moved from source4/lib/zlib/contrib/blast/test.txt with 100% similarity]
lib/zlib/contrib/delphi/ZLib.pas [moved from source4/lib/zlib/contrib/delphi/ZLib.pas with 100% similarity]
lib/zlib/contrib/delphi/ZLibConst.pas [moved from source4/lib/zlib/contrib/delphi/ZLibConst.pas with 100% similarity]
lib/zlib/contrib/delphi/readme.txt [moved from source4/lib/zlib/contrib/delphi/readme.txt with 100% similarity]
lib/zlib/contrib/delphi/zlibd32.mak [moved from source4/lib/zlib/contrib/delphi/zlibd32.mak with 100% similarity]
lib/zlib/contrib/dotzlib/DotZLib.build [moved from source4/lib/zlib/contrib/dotzlib/DotZLib.build with 100% similarity]
lib/zlib/contrib/dotzlib/DotZLib.chm [moved from source4/lib/zlib/contrib/dotzlib/DotZLib.chm with 100% similarity]
lib/zlib/contrib/dotzlib/DotZLib.sln [moved from source4/lib/zlib/contrib/dotzlib/DotZLib.sln with 100% similarity]
lib/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs [moved from source4/lib/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs with 100% similarity]
lib/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs [moved from source4/lib/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs with 100% similarity]
lib/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs [moved from source4/lib/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs with 100% similarity]
lib/zlib/contrib/dotzlib/DotZLib/CodecBase.cs [moved from source4/lib/zlib/contrib/dotzlib/DotZLib/CodecBase.cs with 100% similarity]
lib/zlib/contrib/dotzlib/DotZLib/Deflater.cs [moved from source4/lib/zlib/contrib/dotzlib/DotZLib/Deflater.cs with 100% similarity]
lib/zlib/contrib/dotzlib/DotZLib/DotZLib.cs [moved from source4/lib/zlib/contrib/dotzlib/DotZLib/DotZLib.cs with 100% similarity]
lib/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj [moved from source4/lib/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj with 100% similarity]
lib/zlib/contrib/dotzlib/DotZLib/GZipStream.cs [moved from source4/lib/zlib/contrib/dotzlib/DotZLib/GZipStream.cs with 100% similarity]
lib/zlib/contrib/dotzlib/DotZLib/Inflater.cs [moved from source4/lib/zlib/contrib/dotzlib/DotZLib/Inflater.cs with 100% similarity]
lib/zlib/contrib/dotzlib/DotZLib/UnitTests.cs [moved from source4/lib/zlib/contrib/dotzlib/DotZLib/UnitTests.cs with 100% similarity]
lib/zlib/contrib/dotzlib/LICENSE_1_0.txt [moved from source4/lib/zlib/contrib/dotzlib/LICENSE_1_0.txt with 100% similarity]
lib/zlib/contrib/dotzlib/readme.txt [moved from source4/lib/zlib/contrib/dotzlib/readme.txt with 100% similarity]
lib/zlib/contrib/infback9/README [moved from source4/lib/zlib/contrib/infback9/README with 100% similarity]
lib/zlib/contrib/infback9/infback9.c [moved from source4/lib/zlib/contrib/infback9/infback9.c with 100% similarity]
lib/zlib/contrib/infback9/infback9.h [moved from source4/lib/zlib/contrib/infback9/infback9.h with 100% similarity]
lib/zlib/contrib/infback9/inffix9.h [moved from source4/lib/zlib/contrib/infback9/inffix9.h with 100% similarity]
lib/zlib/contrib/infback9/inflate9.h [moved from source4/lib/zlib/contrib/infback9/inflate9.h with 100% similarity]
lib/zlib/contrib/infback9/inftree9.c [moved from source4/lib/zlib/contrib/infback9/inftree9.c with 100% similarity]
lib/zlib/contrib/infback9/inftree9.h [moved from source4/lib/zlib/contrib/infback9/inftree9.h with 100% similarity]
lib/zlib/contrib/inflate86/inffas86.c [moved from source4/lib/zlib/contrib/inflate86/inffas86.c with 100% similarity]
lib/zlib/contrib/inflate86/inffast.S [moved from source4/lib/zlib/contrib/inflate86/inffast.S with 100% similarity]
lib/zlib/contrib/iostream/test.cpp [moved from source4/lib/zlib/contrib/iostream/test.cpp with 100% similarity]
lib/zlib/contrib/iostream/zfstream.cpp [moved from source4/lib/zlib/contrib/iostream/zfstream.cpp with 100% similarity]
lib/zlib/contrib/iostream/zfstream.h [moved from source4/lib/zlib/contrib/iostream/zfstream.h with 100% similarity]
lib/zlib/contrib/iostream2/zstream.h [moved from source4/lib/zlib/contrib/iostream2/zstream.h with 100% similarity]
lib/zlib/contrib/iostream2/zstream_test.cpp [moved from source4/lib/zlib/contrib/iostream2/zstream_test.cpp with 100% similarity]
lib/zlib/contrib/iostream3/README [moved from source4/lib/zlib/contrib/iostream3/README with 100% similarity]
lib/zlib/contrib/iostream3/TODO [moved from source4/lib/zlib/contrib/iostream3/TODO with 100% similarity]
lib/zlib/contrib/iostream3/test.cc [moved from source4/lib/zlib/contrib/iostream3/test.cc with 100% similarity]
lib/zlib/contrib/iostream3/zfstream.cc [moved from source4/lib/zlib/contrib/iostream3/zfstream.cc with 100% similarity]
lib/zlib/contrib/iostream3/zfstream.h [moved from source4/lib/zlib/contrib/iostream3/zfstream.h with 100% similarity]
lib/zlib/contrib/masm686/match.asm [moved from source4/lib/zlib/contrib/masm686/match.asm with 100% similarity]
lib/zlib/contrib/masmx64/bld_ml64.bat [moved from source4/lib/zlib/contrib/masmx64/bld_ml64.bat with 100% similarity]
lib/zlib/contrib/masmx64/gvmat64.asm [moved from source4/lib/zlib/contrib/masmx64/gvmat64.asm with 100% similarity]
lib/zlib/contrib/masmx64/gvmat64.obj [moved from source4/lib/zlib/contrib/masmx64/gvmat64.obj with 100% similarity]
lib/zlib/contrib/masmx64/inffas8664.c [moved from source4/lib/zlib/contrib/masmx64/inffas8664.c with 100% similarity]
lib/zlib/contrib/masmx64/inffasx64.asm [moved from source4/lib/zlib/contrib/masmx64/inffasx64.asm with 100% similarity]
lib/zlib/contrib/masmx64/inffasx64.obj [moved from source4/lib/zlib/contrib/masmx64/inffasx64.obj with 100% similarity]
lib/zlib/contrib/masmx64/readme.txt [moved from source4/lib/zlib/contrib/masmx64/readme.txt with 100% similarity]
lib/zlib/contrib/masmx86/bld_ml32.bat [moved from source4/lib/zlib/contrib/masmx86/bld_ml32.bat with 100% similarity]
lib/zlib/contrib/masmx86/gvmat32.asm [moved from source4/lib/zlib/contrib/masmx86/gvmat32.asm with 100% similarity]
lib/zlib/contrib/masmx86/gvmat32.obj [moved from source4/lib/zlib/contrib/masmx86/gvmat32.obj with 100% similarity]
lib/zlib/contrib/masmx86/gvmat32c.c [moved from source4/lib/zlib/contrib/masmx86/gvmat32c.c with 100% similarity]
lib/zlib/contrib/masmx86/inffas32.asm [moved from source4/lib/zlib/contrib/masmx86/inffas32.asm with 100% similarity]
lib/zlib/contrib/masmx86/inffas32.obj [moved from source4/lib/zlib/contrib/masmx86/inffas32.obj with 100% similarity]
lib/zlib/contrib/masmx86/mkasm.bat [moved from source4/lib/zlib/contrib/masmx86/mkasm.bat with 100% similarity]
lib/zlib/contrib/masmx86/readme.txt [moved from source4/lib/zlib/contrib/masmx86/readme.txt with 100% similarity]
lib/zlib/contrib/minizip/ChangeLogUnzip [moved from source4/lib/zlib/contrib/minizip/ChangeLogUnzip with 100% similarity]
lib/zlib/contrib/minizip/Makefile [moved from source4/lib/zlib/contrib/minizip/Makefile with 100% similarity]
lib/zlib/contrib/minizip/crypt.h [moved from source4/lib/zlib/contrib/minizip/crypt.h with 100% similarity]
lib/zlib/contrib/minizip/ioapi.c [moved from source4/lib/zlib/contrib/minizip/ioapi.c with 100% similarity]
lib/zlib/contrib/minizip/ioapi.h [moved from source4/lib/zlib/contrib/minizip/ioapi.h with 100% similarity]
lib/zlib/contrib/minizip/iowin32.c [moved from source4/lib/zlib/contrib/minizip/iowin32.c with 100% similarity]
lib/zlib/contrib/minizip/iowin32.h [moved from source4/lib/zlib/contrib/minizip/iowin32.h with 100% similarity]
lib/zlib/contrib/minizip/miniunz.c [moved from source4/lib/zlib/contrib/minizip/miniunz.c with 100% similarity]
lib/zlib/contrib/minizip/minizip.c [moved from source4/lib/zlib/contrib/minizip/minizip.c with 100% similarity]
lib/zlib/contrib/minizip/mztools.c [moved from source4/lib/zlib/contrib/minizip/mztools.c with 100% similarity]
lib/zlib/contrib/minizip/mztools.h [moved from source4/lib/zlib/contrib/minizip/mztools.h with 100% similarity]
lib/zlib/contrib/minizip/unzip.c [moved from source4/lib/zlib/contrib/minizip/unzip.c with 100% similarity]
lib/zlib/contrib/minizip/unzip.h [moved from source4/lib/zlib/contrib/minizip/unzip.h with 100% similarity]
lib/zlib/contrib/minizip/zip.c [moved from source4/lib/zlib/contrib/minizip/zip.c with 100% similarity]
lib/zlib/contrib/minizip/zip.h [moved from source4/lib/zlib/contrib/minizip/zip.h with 100% similarity]
lib/zlib/contrib/pascal/example.pas [moved from source4/lib/zlib/contrib/pascal/example.pas with 100% similarity]
lib/zlib/contrib/pascal/readme.txt [moved from source4/lib/zlib/contrib/pascal/readme.txt with 100% similarity]
lib/zlib/contrib/pascal/zlibd32.mak [moved from source4/lib/zlib/contrib/pascal/zlibd32.mak with 100% similarity]
lib/zlib/contrib/pascal/zlibpas.pas [moved from source4/lib/zlib/contrib/pascal/zlibpas.pas with 100% similarity]
lib/zlib/contrib/puff/Makefile [moved from source4/lib/zlib/contrib/puff/Makefile with 100% similarity]
lib/zlib/contrib/puff/README [moved from source4/lib/zlib/contrib/puff/README with 100% similarity]
lib/zlib/contrib/puff/puff.c [moved from source4/lib/zlib/contrib/puff/puff.c with 100% similarity]
lib/zlib/contrib/puff/puff.h [moved from source4/lib/zlib/contrib/puff/puff.h with 100% similarity]
lib/zlib/contrib/puff/zeros.raw [moved from source4/lib/zlib/contrib/puff/zeros.raw with 100% similarity]
lib/zlib/contrib/testzlib/testzlib.c [moved from source4/lib/zlib/contrib/testzlib/testzlib.c with 100% similarity]
lib/zlib/contrib/testzlib/testzlib.txt [moved from source4/lib/zlib/contrib/testzlib/testzlib.txt with 100% similarity]
lib/zlib/contrib/untgz/Makefile [moved from source4/lib/zlib/contrib/untgz/Makefile with 100% similarity]
lib/zlib/contrib/untgz/Makefile.msc [moved from source4/lib/zlib/contrib/untgz/Makefile.msc with 100% similarity]
lib/zlib/contrib/untgz/untgz.c [moved from source4/lib/zlib/contrib/untgz/untgz.c with 100% similarity]
lib/zlib/contrib/vstudio/readme.txt [moved from source4/lib/zlib/contrib/vstudio/readme.txt with 100% similarity]
lib/zlib/contrib/vstudio/vc7/miniunz.vcproj [moved from source4/lib/zlib/contrib/vstudio/vc7/miniunz.vcproj with 100% similarity]
lib/zlib/contrib/vstudio/vc7/minizip.vcproj [moved from source4/lib/zlib/contrib/vstudio/vc7/minizip.vcproj with 100% similarity]
lib/zlib/contrib/vstudio/vc7/testzlib.vcproj [moved from source4/lib/zlib/contrib/vstudio/vc7/testzlib.vcproj with 100% similarity]
lib/zlib/contrib/vstudio/vc7/zlib.rc [moved from source4/lib/zlib/contrib/vstudio/vc7/zlib.rc with 100% similarity]
lib/zlib/contrib/vstudio/vc7/zlibstat.vcproj [moved from source4/lib/zlib/contrib/vstudio/vc7/zlibstat.vcproj with 100% similarity]
lib/zlib/contrib/vstudio/vc7/zlibvc.def [moved from source4/lib/zlib/contrib/vstudio/vc7/zlibvc.def with 100% similarity]
lib/zlib/contrib/vstudio/vc7/zlibvc.sln [moved from source4/lib/zlib/contrib/vstudio/vc7/zlibvc.sln with 100% similarity]
lib/zlib/contrib/vstudio/vc7/zlibvc.vcproj [moved from source4/lib/zlib/contrib/vstudio/vc7/zlibvc.vcproj with 100% similarity]
lib/zlib/contrib/vstudio/vc8/miniunz.vcproj [moved from source4/lib/zlib/contrib/vstudio/vc8/miniunz.vcproj with 100% similarity]
lib/zlib/contrib/vstudio/vc8/minizip.vcproj [moved from source4/lib/zlib/contrib/vstudio/vc8/minizip.vcproj with 100% similarity]
lib/zlib/contrib/vstudio/vc8/testzlib.vcproj [moved from source4/lib/zlib/contrib/vstudio/vc8/testzlib.vcproj with 100% similarity]
lib/zlib/contrib/vstudio/vc8/testzlibdll.vcproj [moved from source4/lib/zlib/contrib/vstudio/vc8/testzlibdll.vcproj with 100% similarity]
lib/zlib/contrib/vstudio/vc8/zlib.rc [moved from source4/lib/zlib/contrib/vstudio/vc8/zlib.rc with 100% similarity]
lib/zlib/contrib/vstudio/vc8/zlibstat.vcproj [moved from source4/lib/zlib/contrib/vstudio/vc8/zlibstat.vcproj with 100% similarity]
lib/zlib/contrib/vstudio/vc8/zlibvc.def [moved from source4/lib/zlib/contrib/vstudio/vc8/zlibvc.def with 100% similarity]
lib/zlib/contrib/vstudio/vc8/zlibvc.sln [moved from source4/lib/zlib/contrib/vstudio/vc8/zlibvc.sln with 100% similarity]
lib/zlib/contrib/vstudio/vc8/zlibvc.vcproj [moved from source4/lib/zlib/contrib/vstudio/vc8/zlibvc.vcproj with 100% similarity]
lib/zlib/crc32.c [moved from source4/lib/zlib/crc32.c with 100% similarity]
lib/zlib/crc32.h [moved from source4/lib/zlib/crc32.h with 100% similarity]
lib/zlib/deflate.c [moved from source4/lib/zlib/deflate.c with 100% similarity]
lib/zlib/deflate.h [moved from source4/lib/zlib/deflate.h with 100% similarity]
lib/zlib/example.c [moved from source4/lib/zlib/example.c with 100% similarity]
lib/zlib/examples/README.examples [moved from source4/lib/zlib/examples/README.examples with 100% similarity]
lib/zlib/examples/fitblk.c [moved from source4/lib/zlib/examples/fitblk.c with 100% similarity]
lib/zlib/examples/gun.c [moved from source4/lib/zlib/examples/gun.c with 100% similarity]
lib/zlib/examples/gzappend.c [moved from source4/lib/zlib/examples/gzappend.c with 100% similarity]
lib/zlib/examples/gzjoin.c [moved from source4/lib/zlib/examples/gzjoin.c with 100% similarity]
lib/zlib/examples/gzlog.c [moved from source4/lib/zlib/examples/gzlog.c with 100% similarity]
lib/zlib/examples/gzlog.h [moved from source4/lib/zlib/examples/gzlog.h with 100% similarity]
lib/zlib/examples/zlib_how.html [moved from source4/lib/zlib/examples/zlib_how.html with 100% similarity]
lib/zlib/examples/zpipe.c [moved from source4/lib/zlib/examples/zpipe.c with 100% similarity]
lib/zlib/examples/zran.c [moved from source4/lib/zlib/examples/zran.c with 100% similarity]
lib/zlib/gzio.c [moved from source4/lib/zlib/gzio.c with 100% similarity]
lib/zlib/infback.c [moved from source4/lib/zlib/infback.c with 100% similarity]
lib/zlib/inffast.c [moved from source4/lib/zlib/inffast.c with 100% similarity]
lib/zlib/inffast.h [moved from source4/lib/zlib/inffast.h with 100% similarity]
lib/zlib/inffixed.h [moved from source4/lib/zlib/inffixed.h with 100% similarity]
lib/zlib/inflate.c [moved from source4/lib/zlib/inflate.c with 100% similarity]
lib/zlib/inflate.h [moved from source4/lib/zlib/inflate.h with 100% similarity]
lib/zlib/inftrees.c [moved from source4/lib/zlib/inftrees.c with 100% similarity]
lib/zlib/inftrees.h [moved from source4/lib/zlib/inftrees.h with 100% similarity]
lib/zlib/make_vms.com [moved from source4/lib/zlib/make_vms.com with 100% similarity]
lib/zlib/minigzip.c [moved from source4/lib/zlib/minigzip.c with 100% similarity]
lib/zlib/msdos/Makefile.bor [moved from source4/lib/zlib/msdos/Makefile.bor with 100% similarity]
lib/zlib/msdos/Makefile.dj2 [moved from source4/lib/zlib/msdos/Makefile.dj2 with 100% similarity]
lib/zlib/msdos/Makefile.emx [moved from source4/lib/zlib/msdos/Makefile.emx with 100% similarity]
lib/zlib/msdos/Makefile.msc [moved from source4/lib/zlib/msdos/Makefile.msc with 100% similarity]
lib/zlib/msdos/Makefile.tc [moved from source4/lib/zlib/msdos/Makefile.tc with 100% similarity]
lib/zlib/old/Makefile.riscos [moved from source4/lib/zlib/old/Makefile.riscos with 100% similarity]
lib/zlib/old/README [moved from source4/lib/zlib/old/README with 100% similarity]
lib/zlib/old/descrip.mms [moved from source4/lib/zlib/old/descrip.mms with 100% similarity]
lib/zlib/old/os2/Makefile.os2 [moved from source4/lib/zlib/old/os2/Makefile.os2 with 100% similarity]
lib/zlib/old/os2/zlib.def [moved from source4/lib/zlib/old/os2/zlib.def with 100% similarity]
lib/zlib/old/visual-basic.txt [moved from source4/lib/zlib/old/visual-basic.txt with 100% similarity]
lib/zlib/old/zlib.html [moved from source4/lib/zlib/old/zlib.html with 100% similarity]
lib/zlib/projects/README.projects [moved from source4/lib/zlib/projects/README.projects with 100% similarity]
lib/zlib/projects/visualc6/README.txt [moved from source4/lib/zlib/projects/visualc6/README.txt with 100% similarity]
lib/zlib/projects/visualc6/example.dsp [moved from source4/lib/zlib/projects/visualc6/example.dsp with 100% similarity]
lib/zlib/projects/visualc6/minigzip.dsp [moved from source4/lib/zlib/projects/visualc6/minigzip.dsp with 100% similarity]
lib/zlib/projects/visualc6/zlib.dsp [moved from source4/lib/zlib/projects/visualc6/zlib.dsp with 100% similarity]
lib/zlib/projects/visualc6/zlib.dsw [moved from source4/lib/zlib/projects/visualc6/zlib.dsw with 100% similarity]
lib/zlib/qnx/package.qpg [moved from source4/lib/zlib/qnx/package.qpg with 100% similarity]
lib/zlib/trees.c [moved from source4/lib/zlib/trees.c with 100% similarity]
lib/zlib/trees.h [moved from source4/lib/zlib/trees.h with 100% similarity]
lib/zlib/uncompr.c [moved from source4/lib/zlib/uncompr.c with 100% similarity]
lib/zlib/win32/DLL_FAQ.txt [moved from source4/lib/zlib/win32/DLL_FAQ.txt with 100% similarity]
lib/zlib/win32/Makefile.bor [moved from source4/lib/zlib/win32/Makefile.bor with 100% similarity]
lib/zlib/win32/Makefile.emx [moved from source4/lib/zlib/win32/Makefile.emx with 100% similarity]
lib/zlib/win32/Makefile.gcc [moved from source4/lib/zlib/win32/Makefile.gcc with 100% similarity]
lib/zlib/win32/Makefile.msc [moved from source4/lib/zlib/win32/Makefile.msc with 100% similarity]
lib/zlib/win32/VisualC.txt [moved from source4/lib/zlib/win32/VisualC.txt with 100% similarity]
lib/zlib/win32/zlib.def [moved from source4/lib/zlib/win32/zlib.def with 100% similarity]
lib/zlib/win32/zlib1.rc [moved from source4/lib/zlib/win32/zlib1.rc with 100% similarity]
lib/zlib/zconf.h [moved from source4/lib/zlib/zconf.h with 100% similarity]
lib/zlib/zconf.in.h [moved from source4/lib/zlib/zconf.in.h with 100% similarity]
lib/zlib/zlib.h [moved from source4/lib/zlib/zlib.h with 100% similarity]
lib/zlib/zlib.m4 [moved from source4/lib/zlib.m4 with 87% similarity]
lib/zlib/zutil.c [moved from source4/lib/zlib/zutil.c with 100% similarity]
lib/zlib/zutil.h [moved from source4/lib/zlib/zutil.h with 100% similarity]
libcli/nbt/man/nmblookup.1.xml [moved from source4/libcli/nbt/man/nmblookup.1.xml with 100% similarity]
libcli/nbt/namerefresh.c
libcli/nbt/nameregister.c
libcli/nbt/nbtsocket.c
libcli/nbt/tools/nmblookup.c [moved from source4/libcli/nbt/tools/nmblookup.c with 100% similarity]
librpc/idl/atsvc.idl [moved from source4/librpc/idl/atsvc.idl with 100% similarity]
librpc/idl/audiosrv.idl [moved from source4/librpc/idl/audiosrv.idl with 100% similarity]
librpc/idl/browser.idl [moved from source4/librpc/idl/browser.idl with 100% similarity]
librpc/idl/dbgidl.idl [moved from source4/librpc/idl/dbgidl.idl with 100% similarity]
librpc/idl/dcom.idl [moved from source4/librpc/idl/dcom.idl with 100% similarity]
librpc/idl/dfs.idl [moved from source3/librpc/idl/dfs.idl with 100% similarity]
librpc/idl/dnsserver.idl [moved from source4/librpc/idl/dnsserver.idl with 100% similarity]
librpc/idl/drsblobs.idl [moved from source4/librpc/idl/drsblobs.idl with 99% similarity]
librpc/idl/drsuapi.idl [moved from source3/librpc/idl/drsuapi.idl with 98% similarity]
librpc/idl/dsbackup.idl [moved from source4/librpc/idl/dsbackup.idl with 100% similarity]
librpc/idl/dssetup.idl [moved from source3/librpc/idl/dssetup.idl with 100% similarity]
librpc/idl/echo.idl [moved from source3/librpc/idl/echo.idl with 100% similarity]
librpc/idl/efs.idl [moved from source4/librpc/idl/efs.idl with 100% similarity]
librpc/idl/epmapper.idl [moved from source4/librpc/idl/epmapper.idl with 100% similarity]
librpc/idl/eventlog.idl [moved from source3/librpc/idl/eventlog.idl with 100% similarity]
librpc/idl/frsapi.idl [moved from source4/librpc/idl/frsapi.idl with 100% similarity]
librpc/idl/frsrpc.idl [moved from source4/librpc/idl/frsrpc.idl with 100% similarity]
librpc/idl/idl_types.h [moved from source4/librpc/idl/idl_types.h with 100% similarity]
librpc/idl/initshutdown.idl [moved from source4/librpc/idl/initshutdown.idl with 94% similarity]
librpc/idl/keysvc.idl [moved from source4/librpc/idl/keysvc.idl with 100% similarity]
librpc/idl/mgmt.idl [moved from source4/librpc/idl/mgmt.idl with 100% similarity]
librpc/idl/misc.idl [moved from source4/librpc/idl/misc.idl with 88% similarity]
librpc/idl/msgsvc.idl [moved from source4/librpc/idl/msgsvc.idl with 100% similarity]
librpc/idl/nbt.idl [moved from source3/librpc/idl/nbt.idl with 100% similarity]
librpc/idl/notify.idl [moved from source3/librpc/idl/notify.idl with 98% similarity]
librpc/idl/ntsvcs.idl [moved from source3/librpc/idl/ntsvcs.idl with 63% similarity]
librpc/idl/orpc.idl [moved from source4/librpc/idl/orpc.idl with 100% similarity]
librpc/idl/oxidresolver.idl [moved from source4/librpc/idl/oxidresolver.idl with 100% similarity]
librpc/idl/policyagent.idl [moved from source4/librpc/idl/policyagent.idl with 100% similarity]
librpc/idl/protected_storage.idl [moved from source4/librpc/idl/protected_storage.idl with 100% similarity]
librpc/idl/remact.idl [moved from source4/librpc/idl/remact.idl with 100% similarity]
librpc/idl/rot.idl [moved from source4/librpc/idl/rot.idl with 100% similarity]
librpc/idl/security.idl [moved from source3/librpc/idl/security.idl with 95% similarity]
librpc/idl/spoolss.idl [moved from source3/librpc/idl/spoolss.idl with 100% similarity]
librpc/idl/svcctl.idl [moved from source3/librpc/idl/svcctl.idl with 96% similarity]
librpc/idl/trkwks.idl [moved from source4/librpc/idl/trkwks.idl with 100% similarity]
librpc/idl/unixinfo.idl [moved from source4/librpc/idl/unixinfo.idl with 100% similarity]
librpc/idl/w32time.idl [moved from source4/librpc/idl/w32time.idl with 100% similarity]
librpc/idl/wkssvc.idl [moved from source3/librpc/idl/wkssvc.idl with 100% similarity]
librpc/idl/wmi.idl [moved from source4/librpc/idl/wmi.idl with 100% similarity]
librpc/idl/wzcsvc.idl [moved from source4/librpc/idl/wzcsvc.idl with 100% similarity]
librpc/idl/xattr.idl [moved from source4/librpc/idl/xattr.idl with 95% similarity]
librpc/ndr.pc.in [moved from source4/librpc/ndr.pc.in with 100% similarity]
librpc/ndr/libndr.h [moved from source4/librpc/ndr/libndr.h with 96% similarity]
librpc/ndr/ndr.c [moved from source4/librpc/ndr/ndr.c with 98% similarity]
librpc/ndr/ndr_basic.c [moved from source4/librpc/ndr/ndr_basic.c with 100% similarity]
librpc/ndr/ndr_compression.c [moved from source4/librpc/ndr/ndr_compression.c with 99% similarity]
librpc/ndr/ndr_compression.h [moved from source3/librpc/ndr/ndr_compression.h with 78% similarity]
librpc/ndr/ndr_drsblobs.c [moved from source4/librpc/ndr/ndr_drsblobs.c with 100% similarity]
librpc/ndr/ndr_drsuapi.c [moved from source4/librpc/ndr/ndr_drsuapi.c with 97% similarity]
librpc/ndr/ndr_drsuapi.h [moved from source4/librpc/ndr/ndr_drsuapi.h with 97% similarity]
librpc/ndr/ndr_krb5pac.c [moved from source4/librpc/ndr/ndr_krb5pac.c with 100% similarity]
librpc/ndr/ndr_misc.c [moved from source4/librpc/ndr/ndr_misc.c with 100% similarity]
librpc/ndr/uuid.c [moved from source4/librpc/ndr/uuid.c with 100% similarity]
librpc/rpc/binding.c [moved from source4/librpc/rpc/binding.c with 99% similarity]
librpc/tools/ndrdump.1.xml [moved from source4/librpc/tools/ndrdump.1.xml with 100% similarity]
librpc/tools/ndrdump.c [moved from source4/librpc/tools/ndrdump.c with 97% similarity]
pidl/lib/Parse/Pidl/ODL.pm
pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
source3/Makefile.in
source3/auth/auth.c
source3/auth/auth_sam.c
source3/auth/token_util.c
source3/client/client.c
source3/client/clitar.c
source3/client/smbspool.c
source3/configure.in
source3/groupdb/mapping_ldb.c
source3/include/byteorder.h [deleted file]
source3/include/client.h
source3/include/dcerpc.h [deleted file]
source3/include/debug.h
source3/include/fake_file.h
source3/include/includes.h
source3/include/messages.h
source3/include/module.h
source3/include/nameserv.h
source3/include/ndr.h [deleted file]
source3/include/ntdomain.h
source3/include/ntlmssp.h
source3/include/ntquotas.h
source3/include/packet.h
source3/include/proto.h
source3/include/rpc_lsa.h
source3/include/rpc_svcctl.h
source3/include/smb.h
source3/include/smbprofile.h
source3/include/sysquotas.h
source3/include/util_tdb.h
source3/include/vfs.h
source3/include/xfile.h [deleted file]
source3/intl/lang_tdb.c
source3/lib/access.c
source3/lib/arc4.c [deleted file]
source3/lib/charcnv.c
source3/lib/ctdbd_conn.c
source3/lib/data_blob.c [deleted file]
source3/lib/dbwrap_ctdb.c
source3/lib/dbwrap_file.c
source3/lib/dbwrap_rbt.c
source3/lib/dbwrap_tdb.c
source3/lib/debug.c
source3/lib/display_sec.c
source3/lib/dprintf.c
source3/lib/events.c
source3/lib/fsusage.c [deleted file]
source3/lib/genrand.c
source3/lib/ldb/libldb.m4
source3/lib/memcache.c
source3/lib/netapi/group.c
source3/lib/netapi/localgroup.c
source3/lib/packet.c
source3/lib/select.c
source3/lib/signal.c [deleted file]
source3/lib/smbconf/smbconf_txt.c
source3/lib/smbldap.c
source3/lib/sysquotas.c
source3/lib/sysquotas_4A.c
source3/lib/sysquotas_linux.c
source3/lib/sysquotas_xfs.c
source3/lib/time.c
source3/lib/util.c
source3/lib/util_file.c
source3/lib/util_pw.c
source3/lib/util_sock.c
source3/lib/util_str.c
source3/lib/util_tdb.c
source3/lib/util_uuid.c
source3/lib/xfile.c [deleted file]
source3/libads/authdata.c
source3/libads/disp_sec.c
source3/libads/krb5_setpw.c
source3/libads/ldap.c
source3/libads/util.c
source3/libgpo/gpext/registry.c
source3/libgpo/gpext/security.c
source3/libgpo/gpo_ini.c
source3/libnet/libnet_dssync.c
source3/libnet/libnet_join.c
source3/librpc/gen_ndr/cli_initshutdown.c
source3/librpc/gen_ndr/cli_initshutdown.h
source3/librpc/gen_ndr/cli_lsa.c
source3/librpc/gen_ndr/cli_lsa.h
source3/librpc/gen_ndr/cli_netlogon.c
source3/librpc/gen_ndr/cli_netlogon.h
source3/librpc/gen_ndr/cli_ntsvcs.c
source3/librpc/gen_ndr/cli_ntsvcs.h
source3/librpc/gen_ndr/cli_svcctl.c
source3/librpc/gen_ndr/cli_svcctl.h
source3/librpc/gen_ndr/cli_winreg.c
source3/librpc/gen_ndr/cli_winreg.h
source3/librpc/gen_ndr/drsblobs.h
source3/librpc/gen_ndr/drsuapi.h
source3/librpc/gen_ndr/epmapper.h
source3/librpc/gen_ndr/initshutdown.h
source3/librpc/gen_ndr/lsa.h
source3/librpc/gen_ndr/misc.h
source3/librpc/gen_ndr/ndr_drsblobs.c
source3/librpc/gen_ndr/ndr_drsblobs.h
source3/librpc/gen_ndr/ndr_drsuapi.c
source3/librpc/gen_ndr/ndr_drsuapi.h
source3/librpc/gen_ndr/ndr_epmapper.c
source3/librpc/gen_ndr/ndr_initshutdown.c
source3/librpc/gen_ndr/ndr_initshutdown.h
source3/librpc/gen_ndr/ndr_lsa.c
source3/librpc/gen_ndr/ndr_lsa.h
source3/librpc/gen_ndr/ndr_misc.c
source3/librpc/gen_ndr/ndr_netlogon.c
source3/librpc/gen_ndr/ndr_netlogon.h
source3/librpc/gen_ndr/ndr_notify.c
source3/librpc/gen_ndr/ndr_ntsvcs.c
source3/librpc/gen_ndr/ndr_samr.c
source3/librpc/gen_ndr/ndr_samr.h
source3/librpc/gen_ndr/ndr_security.c
source3/librpc/gen_ndr/ndr_security.h
source3/librpc/gen_ndr/ndr_svcctl.c
source3/librpc/gen_ndr/ndr_svcctl.h
source3/librpc/gen_ndr/ndr_winreg.c
source3/librpc/gen_ndr/ndr_winreg.h
source3/librpc/gen_ndr/ndr_xattr.c
source3/librpc/gen_ndr/ndr_xattr.h
source3/librpc/gen_ndr/netlogon.h
source3/librpc/gen_ndr/notify.h
source3/librpc/gen_ndr/ntsvcs.h
source3/librpc/gen_ndr/samr.h
source3/librpc/gen_ndr/security.h
source3/librpc/gen_ndr/srv_dfs.c
source3/librpc/gen_ndr/srv_dssetup.c
source3/librpc/gen_ndr/srv_echo.c
source3/librpc/gen_ndr/srv_epmapper.c
source3/librpc/gen_ndr/srv_eventlog.c
source3/librpc/gen_ndr/srv_initshutdown.c
source3/librpc/gen_ndr/srv_lsa.c
source3/librpc/gen_ndr/srv_netlogon.c
source3/librpc/gen_ndr/srv_ntsvcs.c
source3/librpc/gen_ndr/srv_samr.c
source3/librpc/gen_ndr/srv_srvsvc.c
source3/librpc/gen_ndr/srv_svcctl.c
source3/librpc/gen_ndr/srv_winreg.c
source3/librpc/gen_ndr/srv_wkssvc.c
source3/librpc/gen_ndr/svcctl.h
source3/librpc/gen_ndr/winreg.h
source3/librpc/gen_ndr/xattr.h
source3/librpc/idl/drsblobs.idl [deleted file]
source3/librpc/idl/epmapper.idl [deleted file]
source3/librpc/idl/idl_types.h [deleted file]
source3/librpc/idl/initshutdown.idl [deleted file]
source3/librpc/idl/lsa.idl
source3/librpc/idl/misc.idl [deleted file]
source3/librpc/idl/netlogon.idl
source3/librpc/idl/samr.idl
source3/librpc/idl/winreg.idl
source3/librpc/idl/xattr.idl [deleted file]
source3/librpc/ndr/libndr.h [deleted file]
source3/librpc/ndr/ndr.c [deleted file]
source3/librpc/ndr/ndr_basic.c [deleted file]
source3/librpc/ndr/ndr_compression.c [deleted file]
source3/librpc/ndr/ndr_drsuapi.c [deleted file]
source3/librpc/ndr/ndr_drsuapi.h [deleted file]
source3/librpc/ndr/ndr_krb5pac.c [deleted file]
source3/librpc/ndr/ndr_misc.c [deleted file]
source3/librpc/ndr/ndr_string.c
source3/librpc/ndr/util.c [new file with mode: 0644]
source3/librpc/ndr/uuid.c [deleted file]
source3/librpc/rpc/binding.c [deleted file]
source3/librpc/rpc/dcerpc.c
source3/librpc/rpc/dcerpc.h
source3/librpc/rpc/dcerpc_util.c [deleted file]
source3/librpc/tools/ndrdump.c
source3/libsmb/async_smb.c
source3/libsmb/clidgram.c
source3/libsmb/clifile.c
source3/libsmb/clikrb5.c
source3/libsmb/cliquota.c
source3/libsmb/clireadwrite.c
source3/libsmb/ntlmssp_sign.c
source3/libsmb/smbdes.c
source3/libsmb/smbencrypt.c
source3/libsmb/trusts_util.c
source3/locking/locking.c
source3/locking/posix.c
source3/modules/vfs_cap.c
source3/modules/vfs_default.c
source3/modules/vfs_full_audit.c
source3/modules/vfs_smb_traffic_analyzer.c
source3/modules/vfs_xattr_tdb.c
source3/nmbd/nmbd.c
source3/nmbd/nmbd_processlogon.c
source3/nmbd/nmbd_winsserver.c
source3/nsswitch/winbind_nss_irix.c
source3/nsswitch/wins.c
source3/param/loadparm.c
source3/param/params.c [deleted file]
source3/param/test_lp_load.c
source3/passdb/machine_sid.c
source3/passdb/secrets.c
source3/printing/nt_printing.c
source3/printing/pcap.c
source3/printing/print_generic.c
source3/printing/print_svid.c
source3/printing/printfsp.c
source3/printing/printing.c
source3/registry/reg_perfcount.c
source3/rpc_client/cli_netlogon.c
source3/rpc_client/cli_pipe.c
source3/rpc_client/cli_svcctl.c
source3/rpc_client/init_samr.c
source3/rpc_client/ndr.c
source3/rpc_parse/parse_svcctl.c
source3/rpc_server/srv_eventlog_lib.c
source3/rpc_server/srv_lsa_nt.c
source3/rpc_server/srv_netlog_nt.c
source3/rpc_server/srv_pipe_hnd.c
source3/rpc_server/srv_samr_nt.c
source3/rpc_server/srv_spoolss_nt.c
source3/rpc_server/srv_srvsvc_nt.c
source3/rpc_server/srv_svcctl.c
source3/rpc_server/srv_svcctl_nt.c
source3/rpc_server/srv_winreg_nt.c
source3/rpcclient/cmd_drsuapi.c
source3/rpcclient/cmd_lsarpc.c
source3/rpcclient/cmd_netlogon.c
source3/rpcclient/cmd_samr.c
source3/rpcclient/cmd_spoolss.c
source3/samba4.m4
source3/samba4.mk
source3/script/build_idl.sh
source3/smbd/blocking.c
source3/smbd/chgpasswd.c
source3/smbd/close.c
source3/smbd/connection.c
source3/smbd/dfree.c
source3/smbd/dosmode.c
source3/smbd/fake_file.c
source3/smbd/files.c
source3/smbd/ipc.c
source3/smbd/lanman.c
source3/smbd/map_username.c
source3/smbd/noquotas.c
source3/smbd/ntquotas.c
source3/smbd/nttrans.c
source3/smbd/open.c
source3/smbd/password.c
source3/smbd/pipes.c
source3/smbd/posix_acls.c
source3/smbd/process.c
source3/smbd/quotas.c
source3/smbd/reply.c
source3/smbd/seal.c
source3/smbd/server.c
source3/smbd/service.c
source3/smbd/session.c
source3/smbd/statvfs.c
source3/smbd/trans2.c
source3/smbd/vfs.c
source3/torture/cmd_vfs.c
source3/torture/locktest.c
source3/torture/torture.c
source3/torture/vfstest.c
source3/utils/net_ads.c
source3/utils/net_registry_util.c
source3/utils/net_rpc.c
source3/utils/net_rpc_join.c
source3/utils/net_rpc_service.c
source3/utils/net_usershare.c
source3/utils/ntlm_auth.c
source3/utils/pdbedit.c
source3/utils/smbcacls.c
source3/utils/smbcquotas.c
source3/utils/status_profile.c
source3/utils/testparm.c
source3/web/cgi.c
source3/web/swat.c
source3/winbindd/idmap_tdb.c
source3/winbindd/winbindd.c
source3/winbindd/winbindd_dual.c
source3/winbindd/winbindd_proto.h
source3/winbindd/winbindd_rpc.c
source4/Makefile
source4/auth/credentials/credentials.h
source4/auth/credentials/credentials_files.c
source4/auth/gensec/cyrus_sasl.c
source4/auth/gensec/schannel_state.c
source4/auth/gensec/spnego_parse.c
source4/auth/kerberos/gssapi_parse.c
source4/auth/ntlm/auth.c
source4/auth/ntlm/auth_sam.c
source4/auth/ntlm/auth_server.c
source4/auth/sam.c
source4/build/m4/ac_pkg_swig.m4 [moved from source4/scripting/python/ac_pkg_swig.m4 with 100% similarity]
source4/build/m4/check_make.m4
source4/build/m4/check_path.m4
source4/build/m4/check_perl.m4
source4/build/m4/check_python.m4 [new file with mode: 0644]
source4/build/m4/env.m4
source4/cldap_server/netlogon.c
source4/client/client.c
source4/cluster/cluster.c
source4/cluster/ctdb/client/ctdb_client.c
source4/cluster/ctdb/common/ctdb_io.c
source4/cluster/ctdb/common/ctdb_ltdb.c
source4/cluster/ctdb/common/ctdb_message.c
source4/cluster/ctdb/ctdb_cluster.c
source4/cluster/local.c
source4/configure.ac
source4/dsdb/common/sidmap.c
source4/dsdb/common/util.c
source4/dsdb/repl/drepl_out_helpers.c
source4/dsdb/repl/drepl_out_pull.c
source4/dsdb/repl/drepl_partitions.c
source4/dsdb/repl/drepl_periodic.c
source4/dsdb/repl/drepl_service.c
source4/dsdb/repl/replicated_objects.c
source4/dsdb/samdb/cracknames.c
source4/dsdb/samdb/ldb_modules/extended_dn.c
source4/dsdb/samdb/ldb_modules/kludge_acl.c
source4/dsdb/samdb/ldb_modules/naming_fsmo.c
source4/dsdb/samdb/ldb_modules/objectclass.c
source4/dsdb/samdb/ldb_modules/objectguid.c
source4/dsdb/samdb/ldb_modules/partition.c
source4/dsdb/samdb/ldb_modules/password_hash.c
source4/dsdb/samdb/ldb_modules/pdc_fsmo.c
source4/dsdb/samdb/ldb_modules/proxy.c
source4/dsdb/samdb/ldb_modules/repl_meta_data.c
source4/dsdb/samdb/ldb_modules/samldb.c
source4/dsdb/samdb/ldb_modules/schema_fsmo.c
source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
source4/dsdb/samdb/samdb.c
source4/dsdb/samdb/samdb_privilege.c
source4/dsdb/schema/schema_init.c
source4/dsdb/schema/schema_set.c
source4/headermap.txt
source4/include/includes.h
source4/kdc/hdb-samba4.c
source4/kdc/kdc.c
source4/kdc/kpasswdd.c
source4/ldap_server/ldap_backend.c
source4/ldap_server/ldap_extended.c
source4/ldap_server/ldap_server.c
source4/lib/charset/iconv.c
source4/lib/com/dcom/main.c
source4/lib/com/dcom/tables.c
source4/lib/com/main.c
source4/lib/com/tables.c
source4/lib/gencache/gencache.c [deleted file]
source4/lib/gencache/gencache.h [deleted file]
source4/lib/json/AUTHORS [deleted file]
source4/lib/json/COPYING [deleted file]
source4/lib/json/ChangeLog [deleted file]
source4/lib/json/Doxyfile [deleted file]
source4/lib/json/INSTALL [deleted file]
source4/lib/json/Makefile.am [deleted file]
source4/lib/json/Makefile.in [deleted file]
source4/lib/json/NEWS [deleted file]
source4/lib/json/README [deleted file]
source4/lib/json/README-WIN32.html [deleted file]
source4/lib/json/README.html [deleted file]
source4/lib/json/aclocal.m4 [deleted file]
source4/lib/json/arraylist.c [deleted file]
source4/lib/json/arraylist.h [deleted file]
source4/lib/json/autogen.sh [deleted file]
source4/lib/json/bits.h [deleted file]
source4/lib/json/config.guess [deleted file]
source4/lib/json/config.h.in [deleted file]
source4/lib/json/config.h.win32 [deleted file]
source4/lib/json/config.sub [deleted file]
source4/lib/json/configure [deleted file]
source4/lib/json/configure.in [deleted file]
source4/lib/json/debug.c [deleted file]
source4/lib/json/debug.h [deleted file]
source4/lib/json/depcomp [deleted file]
source4/lib/json/install-sh [deleted file]
source4/lib/json/json-c.vcproj [deleted file]
source4/lib/json/json.h [deleted file]
source4/lib/json/json.pc.in [deleted file]
source4/lib/json/json_object.c [deleted file]
source4/lib/json/json_object.h [deleted file]
source4/lib/json/json_object_private.h [deleted file]
source4/lib/json/json_tokener.c [deleted file]
source4/lib/json/json_tokener.h [deleted file]
source4/lib/json/json_util.c [deleted file]
source4/lib/json/json_util.h [deleted file]
source4/lib/json/linkhash.c [deleted file]
source4/lib/json/linkhash.h [deleted file]
source4/lib/json/ltmain.sh [deleted file]
source4/lib/json/missing [deleted file]
source4/lib/json/mkinstalldirs [deleted file]
source4/lib/json/printbuf.c [deleted file]
source4/lib/json/printbuf.h [deleted file]
source4/lib/json/stamp-h.in [deleted file]
source4/lib/json/test1.c [deleted file]
source4/lib/json/test2.c [deleted file]
source4/lib/ldb/common/ldb.c
source4/lib/ldb/common/ldb_modules.c
source4/lib/ldb/include/ldb.h
source4/lib/ldb/ldb.i
source4/lib/ldb/ldb_tdb/ldb_search.c
source4/lib/ldb/ldb_tdb/ldb_tdb.c
source4/lib/ldb/ldb_tdb/ldb_tdb.h
source4/lib/ldb/ldb_wrap.c
source4/lib/ldb/modules/asq.c
source4/lib/ldb/tests/python/ldap.py
source4/lib/messaging/messaging.c
source4/lib/registry/dir.c
source4/lib/registry/interface.c
source4/lib/registry/local.c
source4/lib/registry/regf.c
source4/lib/registry/registry.h
source4/lib/registry/rpc.c
source4/lib/registry/util.c
source4/lib/samba3/config.mk
source4/lib/samba3/samba3.h
source4/lib/smbreadline/smbreadline.c
source4/lib/socket/interface.c
source4/lib/socket/socket.c
source4/lib/stream/packet.c
source4/lib/tdb_wrap.c
source4/lib/tls/tls.c
source4/lib/torture/torture.c
source4/lib/torture/torture.h
source4/lib/util/dlinklist.h [deleted file]
source4/libcli/auth/smbencrypt.c
source4/libcli/cldap/cldap.c
source4/libcli/cldap/cldap.h
source4/libcli/dgram/dgramsocket.c
source4/libcli/dgram/mailslot.c
source4/libcli/ldap/ldap.c
source4/libcli/ldap/ldap_client.c
source4/libcli/ldap/ldap_controls.c
source4/libcli/raw/clitransport.c
source4/libcli/raw/rawnotify.c
source4/libcli/raw/rawrequest.c
source4/libcli/raw/rawtrans.c
source4/libcli/resolve/resolve.c
source4/libcli/resolve/wins.c
source4/libcli/smb2/request.c
source4/libcli/smb2/transport.c
source4/libcli/util/clilsa.c
source4/libcli/wrepl/winsrepl.c
source4/libnet/libnet_become_dc.c
source4/libnet/libnet_join.c
source4/libnet/libnet_lookup.c
source4/libnet/libnet_samdump.c
source4/libnet/libnet_samsync_ldb.c
source4/libnet/libnet_unbecome_dc.c
source4/libnet/libnet_vampire.c
source4/librpc/config.mk
source4/librpc/idl-deps.pl
source4/librpc/idl/dfs.idl [deleted file]
source4/librpc/idl/drsuapi.idl [deleted file]
source4/librpc/idl/dssetup.idl [deleted file]
source4/librpc/idl/echo.idl [deleted file]
source4/librpc/idl/eventlog.idl [deleted file]
source4/librpc/idl/lsa.idl
source4/librpc/idl/nbt.idl [deleted file]
source4/librpc/idl/netlogon.idl
source4/librpc/idl/notify.idl [deleted file]
source4/librpc/idl/ntsvcs.idl [deleted file]
source4/librpc/idl/opendb.idl
source4/librpc/idl/samr.idl
source4/librpc/idl/security.idl
source4/librpc/idl/spoolss.idl [deleted file]
source4/librpc/idl/svcctl.idl [deleted file]
source4/librpc/idl/winreg.idl
source4/librpc/idl/wkssvc.idl [deleted file]
source4/librpc/ndr/ndr_string.c
source4/librpc/ndr/ndr_table.c
source4/librpc/rpc/dcerpc.c
source4/librpc/rpc/dcerpc.h
source4/librpc/scripts/build_idl.sh
source4/main.mk
source4/nbt_server/defense.c
source4/nbt_server/dgram/netlogon.c
source4/nbt_server/interfaces.c
source4/nbt_server/nodestatus.c
source4/nbt_server/query.c
source4/nbt_server/register.c
source4/nbt_server/wins/winsclient.c
source4/nsswitch/winbind_nss_netbsd.h [new file with mode: 0644]
source4/ntptr/simple_ldb/ntptr_simple_ldb.c
source4/ntvfs/cifs/vfs_cifs.c
source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c
source4/ntvfs/common/notify.c
source4/ntvfs/ipc/vfs_ipc.c
source4/ntvfs/ntvfs.h
source4/ntvfs/ntvfs_base.c
source4/ntvfs/ntvfs_util.c
source4/ntvfs/posix/pvfs_acl_nfs4.c
source4/ntvfs/posix/pvfs_acl_xattr.c
source4/ntvfs/posix/pvfs_lock.c
source4/ntvfs/posix/pvfs_notify.c
source4/ntvfs/posix/pvfs_open.c
source4/ntvfs/posix/pvfs_search.c
source4/ntvfs/posix/pvfs_wait.c
source4/ntvfs/posix/pvfs_xattr.c
source4/ntvfs/posix/vfs_posix.c
source4/ntvfs/posix/xattr_system.c
source4/ntvfs/simple/vfs_simple.c
source4/ntvfs/smb2/vfs_smb2.c
source4/ntvfs/sysdep/inotify.c
source4/ntvfs/sysdep/sys_lease.c
source4/ntvfs/sysdep/sys_lease_linux.c
source4/ntvfs/sysdep/sys_notify.c
source4/param/generic.c
source4/param/loadparm.c
source4/param/secrets.c
source4/rpc_server/dcerpc_server.c
source4/rpc_server/dcerpc_server.h
source4/rpc_server/drsuapi/dcesrv_drsuapi.c
source4/rpc_server/handles.c
source4/rpc_server/lsa/dcesrv_lsa.c
source4/rpc_server/lsa/lsa.h
source4/rpc_server/netlogon/dcerpc_netlogon.c
source4/rpc_server/remote/dcesrv_remote.c
source4/rpc_server/samr/dcesrv_samr.c
source4/rpc_server/samr/samr_password.c
source4/rpc_server/service_rpc.c
source4/rpc_server/winreg/rpc_winreg.c
source4/scripting/python/config.m4 [deleted file]
source4/scripting/python/samba/provision.py
source4/selftest/config.mk
source4/setup/schema_samba4.ldif
source4/smb_server/blob.c
source4/smb_server/handle.c
source4/smb_server/session.c
source4/smb_server/smb/trans2.c
source4/smb_server/smb_samba3.c
source4/smb_server/smb_server.h
source4/smb_server/tcon.c
source4/smbd/pidfile.c
source4/smbd/service.c
source4/smbd/service_stream.h
source4/smbd/service_task.h
source4/torture/auth/ntlmssp.c
source4/torture/auth/pac.c
source4/torture/basic/aliases.c
source4/torture/basic/mangle_test.c
source4/torture/basic/misc.c
source4/torture/gentest.c
source4/torture/ldap/cldap.c
source4/torture/ldap/schema.c
source4/torture/ldap/uptodatevector.c
source4/torture/libnet/libnet_BecomeDC.c
source4/torture/local/config.mk
source4/torture/local/local.c
source4/torture/locktest.c
source4/torture/nbench/nbio.c
source4/torture/nbt/wins.c
source4/torture/ndr/ndr.c
source4/torture/ndr/winreg.c
source4/torture/raw/oplock.c
source4/torture/rpc/drsuapi.c
source4/torture/rpc/drsuapi_cracknames.c
source4/torture/rpc/dssync.c
source4/torture/rpc/eventlog.c
source4/torture/rpc/initshutdown.c
source4/torture/rpc/netlogon.c
source4/torture/rpc/rpc.c
source4/torture/rpc/samr.c
source4/torture/rpc/samr_accessmask.c
source4/torture/rpc/samsync.c
source4/torture/rpc/spoolss_notify.c
source4/torture/rpc/winreg.c
source4/torture/rpc/wkssvc.c
source4/torture/smb2/smb2.c
source4/torture/smbtorture.c
source4/torture/torture.c
source4/torture/util_smb.c
source4/utils/getntacl.c
source4/utils/ntlm_auth.c
source4/web_server/web_server.c
source4/web_server/wsgi.c
source4/winbind/wb_samba3_cmd.c
source4/winbind/wb_server.c
source4/winbind/wb_sid2domain.c
source4/wrepl_server/wrepl_server.c
testprogs/win32/midltests/Makefile [new file with mode: 0644]

index e585504ce5e3c575a804d4a0725f5864226342c6..e617400cc5c088791628f9fd70e5928d4c8575f2 100644 (file)
@@ -181,7 +181,7 @@ source4/libcli/composite/proto.h
 source4/libcli/finddcs.h
 source4/libcli/ldap/ldap_proto.h
 source4/libcli/libcli_proto.h
-source4/libcli/nbt/nbtname.h
+libcli/nbt/nbtname.h
 source4/libcli/nbt/nbt_proto.h
 source4/libcli/ndr_netlogon_proto.h
 source4/libcli/netlogon_proto.h
@@ -196,7 +196,7 @@ source4/libcli/util/proto.h
 source4/libcli/wrepl/winsrepl_proto.h
 source4/lib/cmdline/credentials.h
 source4/lib/cmdline/popt_credentials.h
-source4/lib/crypto/test_proto.h
+lib/crypto/test_proto.h
 source4/lib/db_wrap_proto.h
 source4/lib/ldb/bin
 source4/lib/ldb/examples/ldbreader
@@ -230,12 +230,11 @@ source4/lib/tdb/bin/tdbdump
 source4/lib/tdb/bin/tdbtool
 source4/lib/tdb/bin/tdbtorture
 source4/lib/tdr/tdr_proto.h
-source4/lib/util/apidocs
-source4/lib/util/asn1_proto.h
-source4/lib/util/pidfile.h
-source4/lib/util/unix_privs.h
-source4/lib/util/util_proto.h
-source4/lib/util/util_tdb.h
+lib/util/apidocs
+lib/util/asn1_proto.h
+lib/util/pidfile.h
+lib/util/unix_privs.h
+lib/util/util_proto.h
 source4/mkconfig.mk
 source4/nbt_server/dgram/proto.h
 source4/nbt_server/nbt_server_proto.h
@@ -308,3 +307,7 @@ tags
 packaging/RHEL-CTDB/samba.spec
 packaging/RHEL/samba.spec
 packaging/RHEL/makerpms.sh
+source3/librpc/gen_ndr/cli_drsblobs.c
+source3/librpc/gen_ndr/cli_drsblobs.h
+source3/librpc/gen_ndr/srv_drsblobs.c
+source3/librpc/gen_ndr/srv_drsblobs.h
index 28c8413231f4b45561155de2dada09e3b2ac6c2f..556fa3e86ea084a212f329121d532f92bebb1b82 100644 (file)
                <term>smb_traffic_analyzer:port = STRING</term>
                <listitem>
                <para>The module will send the data using the TCP port given
-               in STRING
+               in STRING.
+               </para>
+               </listitem>
+               </varlistentry>
+               <varlistentry>
+               <term>smb_traffic_analyzer:anonymize_prefix = STRING</term>
+               <listitem>
+               <para>The module will replace the user names with a prefix
+               given by STRING and a simple hash number.
                </para>
 
                </listitem>
        <smbconfoption name="smb_traffic_analyzer:mode">unix_domain_socket</smbconfoption>
        </programlisting>
 
-       <para>The module running on share "example_share", using an internet domain socket,
+       <para>The module running on share "example_share", using an internet socket,
        connecting to host "examplehost" on port 3491.</para>
        <programlisting>
        <smbconfsection name="[example_share]"/>
        <smbconfoption name="path">/data/example</smbconfoption>
        <smbconfoption name="vfs objects">smb_traffic_analyzer</smbconfoption>
        <smbconfoption name="smb_traffic_analyzer:host">examplehost</smbconfoption>
-       <smbconfoption name="smb_traffic_analyzer:port">3490</smbconfoption>
+       <smbconfoption name="smb_traffic_analyzer:port">3491</smbconfoption>
        </programlisting>
 
+       <para>The module running on share "example_share", using an internet socket,
+       connecting to host "examplehost" on port 3491, anonymizing user names with
+       the prefix "User".</para>
+       <programlisting>
+       <smbconfsection name="[example_share]"/>
+       <smbconfoption name="path">/data/example</smbconfoption>
+       <smbconfoption name="vfs objects">smb_traffic_analyzer</smbconfoption>
+       <smbconfoption name="smb_traffic_analyzer:host">examplehost</smbconfoption>
+       <smbconfoption name="smb_traffic_analyzer:port">3491</smbconfoption>
+       <smbconfoption name="smb_traffic_analyzer:anonymize_prefix">User</smbconfoption>
+       </programlisting>
 </refsect1>
 
 <refsect1>
index 0a98404eda3a53b144e0d2ed12038717e787221b..77f305a5d39459a0b81853e213a303e854dcc5c5 100644 (file)
@@ -41,34 +41,37 @@ bool torture_local_crypto_hmacmd5(struct torture_context *torture)
                DATA_BLOB md5;
        } testarray[8];
 
+       TALLOC_CTX *tctx = talloc_new(torture);
+       if (!tctx) { return false; };
+
        testarray[0].key        = data_blob_repeat_byte(0x0b, 16);
        testarray[0].data       = data_blob_string_const("Hi There");
-       testarray[0].md5        = strhex_to_data_blob("9294727a3638bb1c13f48ef8158bfc9d");
+       testarray[0].md5        = strhex_to_data_blob(tctx, "9294727a3638bb1c13f48ef8158bfc9d");
 
        testarray[1].key        = data_blob_string_const("Jefe");
        testarray[1].data       = data_blob_string_const("what do ya want for nothing?");
-       testarray[1].md5        = strhex_to_data_blob("750c783e6ab0b503eaa86e310a5db738");
+       testarray[1].md5        = strhex_to_data_blob(tctx, "750c783e6ab0b503eaa86e310a5db738");
 
        testarray[2].key        = data_blob_repeat_byte(0xaa, 16);
        testarray[2].data       = data_blob_repeat_byte(0xdd, 50);
-       testarray[2].md5        = strhex_to_data_blob("56be34521d144c88dbb8c733f0e8b3f6");
+       testarray[2].md5        = strhex_to_data_blob(tctx, "56be34521d144c88dbb8c733f0e8b3f6");
 
-       testarray[3].key        = strhex_to_data_blob("0102030405060708090a0b0c0d0e0f10111213141516171819");
+       testarray[3].key        = strhex_to_data_blob(tctx, "0102030405060708090a0b0c0d0e0f10111213141516171819");
        testarray[3].data       = data_blob_repeat_byte(0xcd, 50);
-       testarray[3].md5        = strhex_to_data_blob("697eaf0aca3a3aea3a75164746ffaa79");
+       testarray[3].md5        = strhex_to_data_blob(tctx, "697eaf0aca3a3aea3a75164746ffaa79");
 
        testarray[4].key        = data_blob_repeat_byte(0x0c, 16);
        testarray[4].data       = data_blob_string_const("Test With Truncation");
-       testarray[4].md5        = strhex_to_data_blob("56461ef2342edc00f9bab995690efd4c");
+       testarray[4].md5        = strhex_to_data_blob(tctx, "56461ef2342edc00f9bab995690efd4c");
 
        testarray[5].key        = data_blob_repeat_byte(0xaa, 80);
        testarray[5].data       = data_blob_string_const("Test Using Larger Than Block-Size Key - Hash Key First");
-       testarray[5].md5        = strhex_to_data_blob("6b1ab7fe4bd7bf8f0b62e6ce61b9d0cd");
+       testarray[5].md5        = strhex_to_data_blob(tctx, "6b1ab7fe4bd7bf8f0b62e6ce61b9d0cd");
 
        testarray[6].key        = data_blob_repeat_byte(0xaa, 80);
        testarray[6].data       = data_blob_string_const("Test Using Larger Than Block-Size Key "
                                                         "and Larger Than One Block-Size Data");
-       testarray[6].md5        = strhex_to_data_blob("6f630fad67cda0ee1fb1f562db3aa53e");
+       testarray[6].md5        = strhex_to_data_blob(tctx, "6f630fad67cda0ee1fb1f562db3aa53e");
 
        testarray[7].key        = data_blob(NULL, 0);
 
@@ -93,6 +96,6 @@ bool torture_local_crypto_hmacmd5(struct torture_context *torture)
                        ret = false;
                }
        }
-
+       talloc_free(tctx);
        return ret;
 }
index dddf9e61a011707bbb3d9102fffffbcae8d429ed..a6080cff823390fa0eb2d3c10fdab95b7320ad61 100644 (file)
@@ -64,7 +64,7 @@ bool torture_local_crypto_md4(struct torture_context *torture)
                DATA_BLOB md4blob;
 
                data = data_blob_string_const(testarray[i].data);
-               md4blob  = strhex_to_data_blob(testarray[i].md4);
+               md4blob  = strhex_to_data_blob(NULL, testarray[i].md4);
 
                mdfour(md4, data.data, data.length);
 
index 1244dca75377e3a79155d447cf67068227a80c48..7223af211433dc4a25ed22d27863e4ad3540b493 100644 (file)
@@ -70,7 +70,7 @@ bool torture_local_crypto_md5(struct torture_context *torture)
                DATA_BLOB md5blob;
 
                data = data_blob_string_const(testarray[i].data);
-               md5blob  = strhex_to_data_blob(testarray[i].md5);
+               md5blob  = strhex_to_data_blob(NULL, testarray[i].md5);
 
                MD5Init(&ctx);
                MD5Update(&ctx, data.data, data.length);
index c69ea6cdac4d8ae873db163b4ceb6c1cbf73f792..4ac77e72702542024f19b7ab088b94ec673845ee 100644 (file)
    which causes a warning storm on irix */
 #undef HAVE_INTTYPES_H
 #elif HAVE_INTTYPES_H
+#define __STDC_FORMAT_MACROS
 #include <inttypes.h>
 #endif
 
+#ifndef __PRI64_PREFIX
+# if __WORDSIZE == 64
+#  define __PRI64_PREFIX       "l"
+# else
+#  define __PRI64_PREFIX       "ll"
+# endif
+#endif
+
+/* Decimal notation.  */
+#ifndef PRId8
+# define PRId8         "d"
+#endif
+#ifndef PRId16
+# define PRId16                "d"
+#endif
+#ifndef PRId32
+# define PRId32                "d"
+#endif
+#ifndef PRId64
+# define PRId64                __PRI64_PREFIX "d"
+#endif
+
+#ifndef PRIi8
+# define PRIi8         "i"
+#endif
+#ifndef PRIi8
+# define PRIi16                "i"
+#endif
+#ifndef PRIi8
+# define PRIi32                "i"
+#endif
+#ifndef PRIi8
+# define PRIi64                __PRI64_PREFIX "i"
+#endif
+
+#ifndef PRIu8
+# define PRIu8         "u"
+#endif
+#ifndef PRIu16
+# define PRIu16                "u"
+#endif
+#ifndef PRIu32
+# define PRIu32                "u"
+#endif
+#ifndef PRIu64
+# define PRIu64                __PRI64_PREFIX "u"
+#endif
+
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
similarity index 100%
rename from source4/lib/util/Doxyfile
rename to lib/util/Doxyfile
diff --git a/lib/util/README b/lib/util/README
new file mode 100644 (file)
index 0000000..fffd44d
--- /dev/null
@@ -0,0 +1,6 @@
+This directory contains libutil (until we can think of a better name)
+
+The idea is that this library contains simple but useful data structures 
+and support functions that are generally useful; not just for Samba but for 
+other projects as well. Functions here should not depend on any external 
+libraries, just on libc (perhaps partially provided by libreplace).
similarity index 99%
rename from source4/lib/util/asn1.c
rename to lib/util/asn1.c
index 4756c0640df391e3a196c1d48ff47d4db451a6c9..ef346542a64a030fa1effbcbd8ed5f71917c9b3e 100644 (file)
@@ -18,7 +18,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/asn1.h"
+#include "../lib/util/asn1.h"
 
 /* allocate an asn1 structure */
 struct asn1_data *asn1_init(TALLOC_CTX *mem_ctx)
similarity index 97%
rename from source4/lib/util/asn1.h
rename to lib/util/asn1.h
index 34aa1e2cb9caee6a597feecfd3dbc3101122a95d..c8e83b92668b42028a6d8dfba1884f1db727bd6b 100644 (file)
@@ -49,6 +49,6 @@ struct asn1_data {
 
 #define ASN1_MAX_OIDS 20
 
-#include "lib/util/asn1_proto.h"
+#include "../lib/util/asn1_proto.h"
 
 #endif /* _ASN_1_H */
similarity index 100%
rename from source4/lib/util/attr.h
rename to lib/util/attr.h
similarity index 93%
rename from source4/lib/util/config.mk
rename to lib/util/config.mk
index 925713a53c1d55f889b199d3512a6769459460b1..5488534f262ad760b5e6b6a1d5fc2156d5fd02dd 100644 (file)
@@ -14,15 +14,18 @@ LIBSAMBA-UTIL_OBJ_FILES = $(addprefix $(libutilsrcdir)/, \
                genrand.o \
                dprintf.o \
                util_str.o \
+               substitute.o \
                util_strlist.o \
                util_file.o \
                data_blob.o \
                util.o \
+               util_net.o \
                fsusage.o \
                ms_fnmatch.o \
                mutex.o \
                idtree.o \
                become_daemon.o \
+               rbtree.o \
                params.o)
 
 PUBLIC_HEADERS += $(addprefix $(libutilsrcdir)/, util.h \
@@ -63,8 +66,6 @@ PUBLIC_DEPENDENCIES = LIBTDB
 
 UTIL_TDB_OBJ_FILES = $(libutilsrcdir)/util_tdb.o
 
-$(eval $(call proto_header_template,$(libutilsrcdir)/util_tdb.h,$(UTIL_TDB_OBJ_FILES:.o=.c)))
-
 [SUBSYSTEM::UTIL_LDB]
 PUBLIC_DEPENDENCIES = LIBLDB
 
similarity index 93%
rename from source4/lib/util/data_blob.c
rename to lib/util/data_blob.c
index 57b34b7ae73d8aa698dc9df4fc164dc22a8b4512..c7d01bacc7ad1b33f05bccc24ad0adb81ab53f51 100644 (file)
@@ -20,6 +20,8 @@
 
 #include "includes.h"
 
+const DATA_BLOB data_blob_null = { NULL, 0 };
+
 /**
  * @file
  * @brief Manipulation of arbitrary data blobs
@@ -180,6 +182,18 @@ _PUBLIC_ DATA_BLOB data_blob_string_const(const char *str)
        return blob;
 }
 
+/**
+  useful for constructing data blobs in test suites, while
+  avoiding const warnings
+**/
+_PUBLIC_ DATA_BLOB data_blob_string_const_null(const char *str)
+{
+       DATA_BLOB blob;
+       blob.data = discard_const_p(uint8_t, str);
+       blob.length = str ? strlen(str)+1 : 0;
+       return blob;
+}
+
 /**
  * Create a new data blob from const data 
  */
similarity index 92%
rename from source4/lib/util/data_blob.h
rename to lib/util/data_blob.h
index e9dca67772043b10ed4a665b33b6719a948f51c4..ffde51cf33600abfb9461b3ceb3cfd79752ed48d 100644 (file)
@@ -104,6 +104,14 @@ _PUBLIC_ char *data_blob_hex_string(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob);
 **/
 _PUBLIC_ DATA_BLOB data_blob_string_const(const char *str);
 
+/**
+  useful for constructing data blobs in test suites, while
+  avoiding const warnings
+
+  includes the terminating null character (as opposed to data_blo_string_const)
+**/
+_PUBLIC_ DATA_BLOB data_blob_string_const_null(const char *str);
+
 /**
  * Create a new data blob from const data 
  */
@@ -120,4 +128,6 @@ _PUBLIC_ bool data_blob_realloc(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, size_t len
 _PUBLIC_ bool data_blob_append(TALLOC_CTX *mem_ctx, DATA_BLOB *blob,
                                   const void *p, size_t length);
 
+extern const DATA_BLOB data_blob_null;
+
 #endif /* _SAMBA_DATABLOB_H_ */
similarity index 92%
rename from source4/lib/util/debug.c
rename to lib/util/debug.c
index 00dcbfc8bdbeba71fa312245aa21f85e31e01a79..b6edb908c7309edb9cf2890fd05bd9e7f9a33ba1 100644 (file)
@@ -31,7 +31,9 @@
 /** 
  * this global variable determines what messages are printed 
  */
-_PUBLIC_ int DEBUGLEVEL;
+int _debug_level = 0;
+_PUBLIC_ int *debug_level = &_debug_level;
+int *DEBUGLEVEL_CLASS = NULL; /* For samba 3 */
 
 /* the registered mutex handlers */
 static struct {
@@ -89,12 +91,19 @@ static void log_timestring(int level, const char *location, const char *func)
   the backend for debug messages. Note that the DEBUG() macro has already
   ensured that the log level has been met before this is called
 */
-_PUBLIC_ void do_debug_header(int level, const char *location, const char *func)
+_PUBLIC_ void dbghdr(int level, const char *location, const char *func)
 {
        log_timestring(level, location, func);
        log_task_id();
 }
 
+
+_PUBLIC_ void dbghdrclass(int level, int class, const char *location, const char *func)
+{
+       /* Simple wrapper, Samba 4 doesn't do debug classes */
+       dbghdr(level, location, func);
+}
+
 /**
   the backend for debug messages. Note that the DEBUG() macro has already
   ensured that the log level has been met before this is called
@@ -102,7 +111,7 @@ _PUBLIC_ void do_debug_header(int level, const char *location, const char *func)
   @note You should never have to call this function directly. Call the DEBUG()
   macro instead.
 */
-_PUBLIC_ void do_debug(const char *format, ...)
+_PUBLIC_ void dbgtext(const char *format, ...)
 {
        va_list ap;
        char *s = NULL;
similarity index 93%
rename from source4/lib/util/debug.h
rename to lib/util/debug.h
index 605628174a949589b433303cff2356ad722f410d..8f4fa2a8fcf8eaa0bd053ac6e67fa0dc678f3e57 100644 (file)
@@ -39,6 +39,7 @@ struct debug_ops {
        void (*log_task_id)(int fd);
 };
 
+#define DEBUGLEVEL *debug_level
 extern int DEBUGLEVEL;
 
 #define debug_ctx() (_debug_ctx?_debug_ctx:(_debug_ctx=talloc_new(NULL)))
@@ -48,9 +49,9 @@ extern int DEBUGLEVEL;
        if (DEBUGLVL(level)) { \
                void* _debug_ctx=NULL; \
                if (header) { \
-                       do_debug_header(level, __location__, __FUNCTION__); \
+                       dbghdr(level, __location__, __FUNCTION__); \
                } \
-               do_debug body; \
+               dbgtext body; \
                talloc_free(_debug_ctx); \
        } \
 } while (0)
@@ -77,7 +78,7 @@ enum debug_logtype {DEBUG_STDOUT = 0, DEBUG_FILE = 1, DEBUG_STDERR = 2};
   the backend for debug messages. Note that the DEBUG() macro has already
   ensured that the log level has been met before this is called
 */
-_PUBLIC_ void do_debug_header(int level, const char *location, const char *func);
+_PUBLIC_ void dbghdr(int level, const char *location, const char *func);
 
 /**
   reopen the log file (usually called because the log file name might have changed)
@@ -125,4 +126,4 @@ _PUBLIC_ void register_debug_handlers(const char *name, struct debug_ops *ops);
   @note You should never have to call this function directly. Call the DEBUG()
   macro instead.
 */
-_PUBLIC_ void do_debug(const char *format, ...) PRINTF_ATTRIBUTE(1,2);
+_PUBLIC_ void dbgtext(const char *format, ...) PRINTF_ATTRIBUTE(1,2);
similarity index 100%
rename from source4/lib/util/fault.c
rename to lib/util/fault.c
similarity index 100%
rename from source4/lib/util/fault.m4
rename to lib/util/fault.m4
similarity index 92%
rename from source4/lib/util/fsusage.c
rename to lib/util/fsusage.c
index 43c87872164d8ef08cb3650267d6aa834b4a86c2..e5f2678a9f14f00726d137fee886d95b5cfeffa5 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "includes.h"
 #include "system/filesys.h"
-
 /**
  * @file
  * @brief Utility functions for getting the amount of free disk space
 */
 static uint64_t adjust_blocks(uint64_t blocks, uint64_t fromsize, uint64_t tosize)
 {
-       if (fromsize == tosize) /* e.g., from 512 to 512 */
+       if (fromsize == tosize) /* e.g., from 512 to 512 */
                return blocks;
-       else if (fromsize > tosize)     /* e.g., from 2048 to 512 */
+       } else if (fromsize > tosize) { /* e.g., from 2048 to 512 */
                return blocks * (fromsize / tosize);
-       else                            /* e.g., from 256 to 512 */
+       } else { /* e.g., from 256 to 512 */
+               /* Protect against broken filesystems... */
+               if (fromsize == 0) {
+                       fromsize = tosize;
+               }
                return (blocks + 1) / (tosize / fromsize);
+       }
 }
 
 /**
@@ -124,8 +129,13 @@ _PUBLIC_ int sys_fsusage(const char *path, uint64_t *dfree, uint64_t *dsize)
 #endif /* STAT_STATFS4 */
 
 #if defined(STAT_STATVFS) || defined(STAT_STATVFS64)           /* SVR4 */
+#ifdef HAVE_FRSIZE
 # define CONVERT_BLOCKS(B) \
        adjust_blocks ((uint64_t)(B), fsd.f_frsize ? (uint64_t)fsd.f_frsize : (uint64_t)fsd.f_bsize, (uint64_t)512)
+#else
+# define CONVERT_BLOCKS(B) \
+       adjust_blocks ((uint64_t)(B), (uint64_t)fsd.f_bsize, (uint64_t)512)
+#endif
 
 #ifdef STAT_STATVFS64
        struct statvfs64 fsd;
similarity index 92%
rename from source4/lib/util/fsusage.m4
rename to lib/util/fsusage.m4
index 6d5d13fe253876641e9da329d4a59a9babe2d880..843965041f86bff21859bdb23599e1e478eb278a 100644 (file)
@@ -54,6 +54,16 @@ if test $space = no; then
   fi
 fi
 
+# fsusage.c assumes that statvfs has an f_frsize entry. Some weird
+# systems use f_bsize.
+AC_CACHE_CHECK([that statvfs.f_frsize works],samba_cv_frsize, [
+    AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/statvfs.h>],[struct statvfs buf; buf.f_frsize = 0],
+       samba_cv_frsize=yes,samba_cv_frsize=no)])
+if test x"$samba_cv_frsize" = x"yes"; then
+    AC_DEFINE(HAVE_FRSIZE, 1, [Whether statvfs.f_frsize exists])
+fi
+
 if test $space = no; then
   # DEC Alpha running OSF/1
   AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
similarity index 100%
rename from source4/lib/util/idtree.c
rename to lib/util/idtree.c
diff --git a/lib/util/memory.h b/lib/util/memory.h
new file mode 100644 (file)
index 0000000..de01492
--- /dev/null
@@ -0,0 +1,93 @@
+/* 
+   Unix SMB/CIFS implementation.
+   Samba utility functions
+   Copyright (C) Andrew Tridgell 1992-1999
+   Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2008
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _SAMBA_MEMORY_H_
+#define _SAMBA_MEMORY_H_
+
+#ifndef SAFE_FREE /* Oh no this is also defined in tdb.h */
+/**
+ * Free memory if the pointer and zero the pointer.
+ *
+ * @note You are explicitly allowed to pass NULL pointers -- they will
+ * always be ignored.
+ **/
+#define SAFE_FREE(x) do { if ((x) != NULL) {free(discard_const_p(void *, (x))); (x)=NULL;} } while(0)
+#endif
+
+/** 
+ * Type-safe version of malloc. Allocated one copy of the 
+ * specified data type.
+ */
+#define malloc_p(type) (type *)malloc(sizeof(type))
+
+/**
+ * Allocate an array of elements of one data type. Does type-checking.
+ */
+#define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count, false)
+
+/** 
+ * Resize an array of elements of one data type. Does type-checking.
+ */
+#define realloc_p(p, type, count) (type *)realloc_array(p, sizeof(type), count, false)
+
+/** 
+ * zero a structure 
+ */
+#ifndef ZERO_STRUCT
+#define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))
+#endif
+
+/** 
+ * zero a structure given a pointer to the structure 
+ */
+#ifndef ZERO_STRUCTP
+#define ZERO_STRUCTP(x) do { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); } while(0)
+#endif
+
+/** 
+ * zero a structure given a pointer to the structure - no zero check 
+ */
+#ifndef ZERO_STRUCTPN
+#define ZERO_STRUCTPN(x) memset((char *)(x), 0, sizeof(*(x)))
+#endif
+
+/* zero an array - note that sizeof(array) must work - ie. it must not be a
+   pointer */
+#ifndef ZERO_ARRAY
+#define ZERO_ARRAY(x) memset((char *)(x), 0, sizeof(x))
+#endif
+
+/**
+ * work out how many elements there are in a static array 
+ */
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
+#endif
+
+/** 
+ * pointer difference macro 
+ */
+#ifndef PTR_DIFF
+#define PTR_DIFF(p1,p2) ((ptrdiff_t)(((const char *)(p1)) - (const char *)(p2)))
+#endif
+
+
+
+#endif /* _SAMBA_MEMORY_H_ */
similarity index 100%
rename from source4/lib/util/mutex.c
rename to lib/util/mutex.c
similarity index 100%
rename from source4/lib/util/mutex.h
rename to lib/util/mutex.h
similarity index 99%
rename from source4/lib/util/params.c
rename to lib/util/params.c
index 3a9e2b95051123fd7315072999b9e234a5cfeb5c..c03edec272cdfbc4aefb673358be754e82b38ffd 100644 (file)
@@ -510,7 +510,7 @@ static myFILE *OpenConfFile( const char *FileName )
   ret = talloc(talloc_autofree_context(), myFILE);
   if (!ret) return NULL;
 
-  ret->buf = file_load(FileName, &ret->size, ret);
+  ret->buf = file_load(FileName, &ret->size, 0, ret);
   if( NULL == ret->buf )
     {
     DEBUG( 1,
similarity index 100%
rename from source3/lib/rbtree.c
rename to lib/util/rbtree.c
similarity index 100%
rename from source3/include/rbtree.h
rename to lib/util/rbtree.h
similarity index 100%
rename from source4/lib/util/signal.c
rename to lib/util/signal.c
diff --git a/lib/util/substitute.c b/lib/util/substitute.c
new file mode 100644 (file)
index 0000000..84514ac
--- /dev/null
@@ -0,0 +1,165 @@
+/* 
+   Unix SMB/CIFS implementation.
+   Samba utility functions
+   
+   Copyright (C) Andrew Tridgell 1992-2001
+   Copyright (C) Simo Sorce      2001-2002
+   Copyright (C) Martin Pool     2003
+   Copyright (C) James Peach    2005
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "includes.h"
+
+/**
+ * @file
+ * @brief Substitute utilities.
+ **/
+
+/**
+ Substitute a string for a pattern in another string. Make sure there is 
+ enough room!
+
+ This routine looks for pattern in s and replaces it with 
+ insert. It may do multiple replacements.
+
+ Any of " ; ' $ or ` in the insert string are replaced with _
+ if len==0 then the string cannot be extended. This is different from the old
+ use of len==0 which was for no length checks to be done.
+**/
+
+_PUBLIC_ void string_sub(char *s, const char *pattern, const char *insert, size_t len)
+{
+       char *p;
+       ssize_t ls, lp, li, i;
+
+       if (!insert || !pattern || !*pattern || !s)
+               return;
+
+       ls = (ssize_t)strlen(s);
+       lp = (ssize_t)strlen(pattern);
+       li = (ssize_t)strlen(insert);
+
+       if (len == 0)
+               len = ls + 1; /* len is number of *bytes* */
+
+       while (lp <= ls && (p = strstr(s, pattern))) {
+               if (ls + (li-lp) >= len) {
+                       DEBUG(0,("ERROR: string overflow by %d in string_sub(%.50s, %d)\n", 
+                                (int)(ls + (li-lp) - len),
+                                pattern, (int)len));
+                       break;
+               }
+               if (li != lp) {
+                       memmove(p+li,p+lp,strlen(p+lp)+1);
+               }
+               for (i=0;i<li;i++) {
+                       switch (insert[i]) {
+                       case '`':
+                       case '"':
+                       case '\'':
+                       case ';':
+                       case '$':
+                       case '%':
+                       case '\r':
+                       case '\n':
+                               p[i] = '_';
+                               break;
+                       default:
+                               p[i] = insert[i];
+                       }
+               }
+               s = p + li;
+               ls += (li-lp);
+       }
+}
+
+/**
+ * Talloc'ed version of string_sub
+ */
+_PUBLIC_ char *string_sub_talloc(TALLOC_CTX *mem_ctx, const char *s, 
+                               const char *pattern, const char *insert)
+{
+       const char *p;
+       char *ret;
+       size_t len, alloc_len;
+
+       if (insert == NULL || pattern == NULL || !*pattern || s == NULL)
+               return NULL;
+
+       /* determine length needed */
+       len = strlen(s);
+       
+       for (p = strstr(s, pattern); p != NULL; 
+            p = strstr(p+strlen(pattern), pattern)) {
+               len += strlen(insert) - strlen(pattern);
+       }
+
+       alloc_len = MAX(len, strlen(s))+1;
+       ret = talloc_array(mem_ctx, char, alloc_len);
+       if (ret == NULL)
+               return NULL;
+       strncpy(ret, s, alloc_len);
+       string_sub(ret, pattern, insert, alloc_len);
+
+       ret = talloc_realloc(mem_ctx, ret, char, len+1);
+       if (ret == NULL)
+               return NULL;
+
+       SMB_ASSERT(ret[len] == '\0');
+
+       return ret;
+}
+
+/**
+ Similar to string_sub() but allows for any character to be substituted. 
+ Use with caution!
+ if len==0 then the string cannot be extended. This is different from the old
+ use of len==0 which was for no length checks to be done.
+**/
+
+_PUBLIC_ void all_string_sub(char *s,const char *pattern,const char *insert, size_t len)
+{
+       char *p;
+       ssize_t ls,lp,li;
+
+       if (!insert || !pattern || !s)
+               return;
+
+       ls = (ssize_t)strlen(s);
+       lp = (ssize_t)strlen(pattern);
+       li = (ssize_t)strlen(insert);
+
+       if (!*pattern)
+               return;
+       
+       if (len == 0)
+               len = ls + 1; /* len is number of *bytes* */
+       
+       while (lp <= ls && (p = strstr(s,pattern))) {
+               if (ls + (li-lp) >= len) {
+                       DEBUG(0,("ERROR: string overflow by %d in all_string_sub(%.50s, %d)\n", 
+                                (int)(ls + (li-lp) - len),
+                                pattern, (int)len));
+                       break;
+               }
+               if (li != lp) {
+                       memmove(p+li,p+lp,strlen(p+lp)+1);
+               }
+               memcpy(p, insert, li);
+               s = p + li;
+               ls += (li-lp);
+       }
+}
similarity index 100%
rename from source4/lib/util/system.c
rename to lib/util/system.c
diff --git a/lib/util/tests/data_blob.c b/lib/util/tests/data_blob.c
new file mode 100644 (file)
index 0000000..875e5fd
--- /dev/null
@@ -0,0 +1,97 @@
+/* 
+   Unix SMB/CIFS implementation.
+
+   data blob testing
+
+   Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2008
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "includes.h"
+#include "torture/torture.h"
+
+static bool test_string(struct torture_context *tctx)
+{
+       DATA_BLOB blob = data_blob_string_const("bla"); 
+
+       torture_assert_int_equal(tctx, blob.length, 3, "blob length");
+       torture_assert_str_equal(tctx, (char *)blob.data, "bla", "blob data");
+
+       return true;
+}
+
+static bool test_string_null(struct torture_context *tctx)
+{
+       DATA_BLOB blob = data_blob_string_const_null("bla");    
+
+       torture_assert_int_equal(tctx, blob.length, 4, "blob length");
+       torture_assert_str_equal(tctx, (char *)blob.data, "bla", "blob data");
+
+       return true;
+}
+
+static bool test_zero(struct torture_context *tctx)
+{
+       int i;
+       DATA_BLOB z = data_blob_talloc_zero(tctx, 4);
+       torture_assert_int_equal(tctx, z.length, 4, "length");
+       for (i = 0; i < z.length; i++)
+               torture_assert_int_equal(tctx, z.data[i], 0, "contents");
+       data_blob_free(&z);
+       return true;
+}
+
+
+static bool test_clear(struct torture_context *tctx)
+{
+       int i;
+       DATA_BLOB z = data_blob("lalala", 6);
+       torture_assert_int_equal(tctx, z.length, 6, "length");
+       data_blob_clear(&z);
+       for (i = 0; i < z.length; i++)
+               torture_assert_int_equal(tctx, z.data[i], 0, "contents");
+       data_blob_free(&z);
+       return true;
+}
+
+static bool test_cmp(struct torture_context *tctx)
+{
+       DATA_BLOB a = data_blob_string_const("bla");
+       DATA_BLOB b = data_blob_string_const("blae");
+       torture_assert(tctx, data_blob_cmp(&a, &b) != 0, "cmp different");
+       torture_assert(tctx, data_blob_cmp(&a, &a) == 0, "cmp self");
+       return true;
+}
+
+static bool test_hex_string(struct torture_context *tctx)
+{
+       DATA_BLOB a = data_blob_string_const("\xC\xA\xF\xE");
+       torture_assert_str_equal(tctx, data_blob_hex_string(tctx, &a), "0C0A0F0E", "hex string");
+       return true;
+}
+
+struct torture_suite *torture_local_util_data_blob(TALLOC_CTX *mem_ctx)
+{
+       struct torture_suite *suite = torture_suite_create(mem_ctx, "DATABLOB");
+
+       torture_suite_add_simple_test(suite, "string", test_string);
+       torture_suite_add_simple_test(suite, "string_null", test_string_null);
+       torture_suite_add_simple_test(suite, "zero", test_zero);;
+       torture_suite_add_simple_test(suite, "clear", test_clear);
+       torture_suite_add_simple_test(suite, "cmp", test_cmp);
+       torture_suite_add_simple_test(suite, "hex string", test_hex_string);
+
+       return suite;
+}
similarity index 92%
rename from source4/lib/util/tests/file.c
rename to lib/util/tests/file.c
index 3377e833dc3e038fcb135c385967dc4946705a7a..4aff0e9afdee5338c2a7892af4fa1187ea6fd5ca 100644 (file)
@@ -42,13 +42,19 @@ static bool test_file_load_save(struct torture_context *tctx)
        torture_assert_file_contains_text(tctx, TEST_FILENAME, TEST_DATA, 
                                                                      "file contents");
 
-       data = file_load(TEST_FILENAME, &len, mem_ctx);
+       data = file_load(TEST_FILENAME, &len, 0, mem_ctx);
        torture_assert(tctx, data, "loading file");
 
        torture_assert_int_equal(tctx, len, strlen(TEST_DATA), "Length");
        
        torture_assert_mem_equal(tctx, data, TEST_DATA, len, "Contents");
 
+       data = file_load(TEST_FILENAME, &len, 5, mem_ctx);
+
+       torture_assert_int_equal(tctx, len, 5, "Length");
+
+       torture_assert_mem_equal(tctx, data, TEST_DATA, len, "Contents");
+
        unlink(TEST_FILENAME);
        return true;
 }
similarity index 94%
rename from source4/lib/util/tests/strlist.c
rename to lib/util/tests/strlist.c
index 9af26f9e71efebff9f9b3b87d8599dbe99459263..86051029548e18eb498fd2c9b54723545d59a9a7 100644 (file)
@@ -71,17 +71,17 @@ static bool test_list_copy(struct torture_context *tctx)
        const char *empty_list[] = { NULL };
        const char **null_list = NULL;
 
-       result = str_list_copy(tctx, list);
+       result = (const char **)str_list_copy(tctx, list);
        torture_assert_int_equal(tctx, str_list_length(result), 2, "list length");
        torture_assert_str_equal(tctx, result[0], "foo", "element 0");
        torture_assert_str_equal(tctx, result[1], "bar", "element 1");
        torture_assert_str_equal(tctx, result[2], NULL, "element 2");
 
-       result = str_list_copy(tctx, empty_list);
+       result = (const char **)str_list_copy(tctx, empty_list);
        torture_assert_int_equal(tctx, str_list_length(result), 0, "list length");
        torture_assert_str_equal(tctx, result[0], NULL, "element 0");
 
-       result = str_list_copy(tctx, null_list);
+       result = (const char **)str_list_copy(tctx, null_list);
        torture_assert(tctx, result == NULL, "result NULL");
        
        return true;
diff --git a/lib/util/tests/time.c b/lib/util/tests/time.c
new file mode 100644 (file)
index 0000000..4a31566
--- /dev/null
@@ -0,0 +1,75 @@
+/* 
+   Unix SMB/CIFS implementation.
+
+   util time testing
+
+   Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2008
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "includes.h"
+#include "torture/torture.h"
+
+static bool test_null_time(struct torture_context *tctx)
+{
+       torture_assert(tctx, null_time(0), "0");
+       torture_assert(tctx, null_time(0xFFFFFFFF), "0xFFFFFFFF");
+       torture_assert(tctx, null_time(-1), "-1");
+       torture_assert(tctx, !null_time(42), "42");
+       return true;
+}
+
+static bool test_null_nttime(struct torture_context *tctx)
+{
+       torture_assert(tctx, null_nttime(-1), "-1");
+       torture_assert(tctx, null_nttime(-1), "-1");
+       torture_assert(tctx, !null_nttime(42), "42");
+       return true;
+}
+
+
+static bool test_http_timestring(struct torture_context *tctx)
+{
+       const char *start = "Thu, 01 Jan 1970";
+       torture_assert(tctx, !strncmp(start, http_timestring(tctx, 42), 
+                                                                                strlen(start)), "42");
+       torture_assert_str_equal(tctx, "never", 
+                                                        http_timestring(tctx, get_time_t_max()), "42");
+       return true;
+}
+
+static bool test_timestring(struct torture_context *tctx)
+{
+       const char *start = "Thu Jan  1";
+       torture_assert(tctx, !strncmp(start, timestring(tctx, 42), strlen(start)),
+                                  "42");
+       return true;
+}
+
+
+
+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, "null_nttime", test_null_nttime);
+       torture_suite_add_simple_test(suite, "http_timestring", 
+                                                                 test_http_timestring);
+       torture_suite_add_simple_test(suite, "timestring", 
+                                                                 test_timestring);
+
+       return suite;
+}
similarity index 86%
rename from source4/lib/util/time.c
rename to lib/util/time.c
index 978d73cc0a1731319ef61a96b239dcfcf678cc93..a001e5f66e0682c8caa93b2c95c65085b2222db7 100644 (file)
 #define TIME_T_MIN 0
 #endif
 
+#if (SIZEOF_LONG == 8)
+#define TIME_FIXUP_CONSTANT_INT 11644473600L
+#elif (SIZEOF_LONG_LONG == 8)
+#define TIME_FIXUP_CONSTANT_INT 11644473600LL
+#endif
+
+
+
 /*
  * we use the INT32_MAX here as on 64 bit systems,
  * gmtime() fails with INT64_MAX
@@ -64,27 +72,40 @@ _PUBLIC_ void GetTimeOfDay(struct timeval *tval)
 
 #define TIME_FIXUP_CONSTANT 11644473600LL
 
-/**
-interpret an 8 byte "filetime" structure to a time_t
-It's originally in "100ns units since jan 1st 1601"
-**/
-_PUBLIC_ time_t nt_time_to_unix(NTTIME nt)
+time_t convert_timespec_to_time_t(struct timespec ts)
 {
-       if (nt == 0) {
-               return 0;
-       }
-       if (nt == -1LL) {
-               return (time_t)-1;
+       /* 1 ns == 1,000,000,000 - one thousand millionths of a second.
+          increment if it's greater than 500 millionth of a second. */
+       if (ts.tv_nsec > 500000000) {
+               return ts.tv_sec + 1;
        }
-       nt += 1000*1000*10/2;
-       nt /= 1000*1000*10;
-       nt -= TIME_FIXUP_CONSTANT;
+       return ts.tv_sec;
+}
 
-       if (TIME_T_MIN > nt || nt > TIME_T_MAX) {
-               return 0;
-       }
+struct timespec convert_time_t_to_timespec(time_t t)
+{
+       struct timespec ts;
+       ts.tv_sec = t;
+       ts.tv_nsec = 0;
+       return ts;
+}
 
-       return (time_t)nt;
+
+
+/**
+ Interpret an 8 byte "filetime" structure to a time_t
+ It's originally in "100ns units since jan 1st 1601"
+
+ An 8 byte value of 0xffffffffffffffff will be returned as a timespec of
+
+       tv_sec = 0
+       tv_nsec = 0;
+
+ Returns GMT.
+**/
+time_t nt_time_to_unix(NTTIME nt)
+{
+       return convert_timespec_to_time_t(nt_time_to_unix_timespec(&nt));
 }
 
 
@@ -99,14 +120,20 @@ _PUBLIC_ void unix_to_nt_time(NTTIME *nt, time_t t)
        if (t == (time_t)-1) {
                *nt = (NTTIME)-1LL;
                return;
-       }               
+       }       
+
+       if (t == TIME_T_MAX) {
+               *nt = 0x7fffffffffffffffLL;
+               return;
+       }
+
        if (t == 0) {
                *nt = 0;
                return;
        }               
 
        t2 = t;
-       t2 += TIME_FIXUP_CONSTANT;
+       t2 += TIME_FIXUP_CONSTANT_INT;
        t2 *= 1000*1000*10;
 
        *nt = t2;
@@ -218,7 +245,7 @@ _PUBLIC_ void push_dos_date3(uint8_t *buf,int offset,time_t unixdate, int zone_o
 /*******************************************************************
   interpret a 32 bit dos packed date/time to some parameters
 ********************************************************************/
-static void interpret_dos_date(uint32_t date,int *year,int *month,int *day,int *hour,int *minute,int *second)
+void interpret_dos_date(uint32_t date,int *year,int *month,int *day,int *hour,int *minute,int *second)
 {
        uint32_t p0,p1,p2,p3;
 
@@ -295,6 +322,10 @@ _PUBLIC_ char *http_timestring(TALLOC_CTX *mem_ctx, time_t t)
        char tempTime[60];
        struct tm *tm = localtime(&t);
 
+       if (t == TIME_T_MAX) {
+               return talloc_strdup(mem_ctx, "never");
+       }
+
        if (!tm) {
                return talloc_asprintf(mem_ctx,"%ld seconds since the Epoch",(long)t);
        }
@@ -613,6 +644,50 @@ _PUBLIC_ int get_time_zone(time_t t)
        return tm_diff(&tm_utc,tm);
 }
 
+struct timespec nt_time_to_unix_timespec(NTTIME *nt)
+{
+       int64_t d;
+       struct timespec ret;
+
+       if (*nt == 0 || *nt == (int64_t)-1) {
+               ret.tv_sec = 0;
+               ret.tv_nsec = 0;
+               return ret;
+       }
+
+       d = (int64_t)*nt;
+       /* d is now in 100ns units, since jan 1st 1601".
+          Save off the ns fraction. */
+
+       /*
+        * Take the last seven decimal digits and multiply by 100.
+        * to convert from 100ns units to 1ns units.
+        */
+        ret.tv_nsec = (long) ((d % (1000 * 1000 * 10)) * 100);
+
+       /* Convert to seconds */
+       d /= 1000*1000*10;
+
+       /* Now adjust by 369 years to make the secs since 1970 */
+       d -= TIME_FIXUP_CONSTANT_INT;
+
+       if (d <= (int64_t)TIME_T_MIN) {
+               ret.tv_sec = TIME_T_MIN;
+               ret.tv_nsec = 0;
+               return ret;
+       }
+
+       if (d >= (int64_t)TIME_T_MAX) {
+               ret.tv_sec = TIME_T_MAX;
+               ret.tv_nsec = 0;
+               return ret;
+       }
+
+       ret.tv_sec = (time_t)d;
+       return ret;
+}
+
+
 /**
   check if 2 NTTIMEs are equal.
 */
@@ -620,3 +695,16 @@ bool nt_time_equal(NTTIME *t1, NTTIME *t2)
 {
        return *t1 == *t2;
 }
+
+/**
+ Check if it's a null timespec.
+**/
+
+bool null_timespec(struct timespec ts)
+{
+       return ts.tv_sec == 0 || 
+               ts.tv_sec == (time_t)0xFFFFFFFF || 
+               ts.tv_sec == (time_t)-1;
+}
+
+
similarity index 97%
rename from source4/lib/util/time.h
rename to lib/util/time.h
index e4008c57824e0b94936adba4d76340e35b617de2..1a1fcc999c0fb816f696fbd696c31525aee25729 100644 (file)
@@ -229,4 +229,9 @@ _PUBLIC_ int get_time_zone(time_t t);
 */
 bool nt_time_equal(NTTIME *t1, NTTIME *t2);
 
+void interpret_dos_date(uint32_t date,int *year,int *month,int *day,int *hour,int *minute,int *second);
+
+
+struct timespec nt_time_to_unix_timespec(NTTIME *nt);
+
 #endif /* _SAMBA_TIME_H_ */
similarity index 100%
rename from source4/lib/util/time.m4
rename to lib/util/time.m4
similarity index 81%
rename from source4/lib/util/util.c
rename to lib/util/util.c
index b5bb75358e107e18e22383eddcaff0217c86a16f..fc55629c4c1f1bfc4fd0d4908b36a52c06e8ade5 100644 (file)
 #include "system/network.h"
 #include "system/filesys.h"
 #include "system/locale.h"
+#undef malloc
+#undef strcasecmp
+#undef strdup
+#undef realloc
 
 /**
  * @file
@@ -216,113 +220,11 @@ _PUBLIC_ char *get_myname(void)
        return hostname;
 }
 
-/**
- Return true if a string could be a pure IP address.
-**/
-
-_PUBLIC_ bool is_ipaddress(const char *str)
-{
-       bool pure_address = true;
-       int i;
-
-       if (str == NULL) return false;
-
-       for (i=0; pure_address && str[i]; i++)
-               if (!(isdigit((int)str[i]) || str[i] == '.'))
-                       pure_address = false;
-
-       /* Check that a pure number is not misinterpreted as an IP */
-       pure_address = pure_address && (strchr(str, '.') != NULL);
-
-       return pure_address;
-}
-
-/**
- Interpret an internet address or name into an IP address in 4 byte form.
-**/
-_PUBLIC_ uint32_t interpret_addr(const char *str)
-{
-       struct hostent *hp;
-       uint32_t res;
-
-       if (str == NULL || *str == 0 ||
-           strcmp(str,"0.0.0.0") == 0) {
-               return 0;
-       }
-       if (strcmp(str,"255.255.255.255") == 0) {
-               return 0xFFFFFFFF;
-       }
-       /* recognise 'localhost' as a special name. This fixes problems with
-          some hosts that don't have localhost in /etc/hosts */
-       if (strcasecmp(str,"localhost") == 0) {
-               str = "127.0.0.1";
-       }
-
-       /* if it's in the form of an IP address then get the lib to interpret it */
-       if (is_ipaddress(str)) {
-               res = inet_addr(str);
-       } else {
-               /* otherwise assume it's a network name of some sort and use 
-                       sys_gethostbyname */
-               if ((hp = sys_gethostbyname(str)) == 0) {
-                       DEBUG(3,("sys_gethostbyname: Unknown host. %s\n",str));
-                       return 0;
-               }
-
-               if(hp->h_addr == NULL) {
-                       DEBUG(3,("sys_gethostbyname: host address is invalid for host %s\n",str));
-                       return 0;
-               }
-               memcpy((char *)&res,(char *)hp->h_addr, 4);
-       }
-
-       if (res == (uint32_t)-1)
-               return(0);
-
-       return(res);
-}
-
-/**
- A convenient addition to interpret_addr().
-**/
-_PUBLIC_ struct in_addr interpret_addr2(const char *str)
-{
-       struct in_addr ret;
-       uint32_t a = interpret_addr(str);
-       ret.s_addr = a;
-       return ret;
-}
-
-/**
- Check if an IP is the 0.0.0.0.
-**/
-
-_PUBLIC_ bool is_zero_ip(struct in_addr ip)
-{
-       return ip.s_addr == 0;
-}
-
-/**
- Are two IPs on the same subnet?
-**/
-
-_PUBLIC_ bool same_net(struct in_addr ip1, struct in_addr ip2, struct in_addr mask)
-{
-       uint32_t net1,net2,nmask;
-
-       nmask = ntohl(mask.s_addr);
-       net1  = ntohl(ip1.s_addr);
-       net2  = ntohl(ip2.s_addr);
-            
-       return((net1 & nmask) == (net2 & nmask));
-}
-
-
 /**
  Check if a process exists. Does this work on all unixes?
 **/
 
-_PUBLIC_ bool process_exists(pid_t pid)
+_PUBLIC_ bool process_exists_by_pid(pid_t pid)
 {
        /* Doing kill with a non-positive pid causes messages to be
         * sent to places we don't want. */
@@ -381,7 +283,7 @@ _PUBLIC_ bool fcntl_lock(int fd, int op, off_t offset, off_t count, int type)
 }
 
 
-static void print_asc(int level, const uint8_t *buf,int len)
+void print_asc(int level, const uint8_t *buf,int len)
 {
        int i;
        for (i=0;i<len;i++)
@@ -509,14 +411,63 @@ _PUBLIC_ void *smb_xmemdup(const void *p, size_t size)
  strdup that aborts on malloc fail.
 **/
 
-_PUBLIC_ char *smb_xstrdup(const char *s)
+char *smb_xstrdup(const char *s)
 {
+#if defined(PARANOID_MALLOC_CHECKER)
+#ifdef strdup
+#undef strdup
+#endif
+#endif
+
+#ifndef HAVE_STRDUP
+#define strdup rep_strdup
+#endif
+
        char *s1 = strdup(s);
-       if (!s1)
-               smb_panic("smb_xstrdup: malloc fail\n");
+#if defined(PARANOID_MALLOC_CHECKER)
+#ifdef strdup
+#undef strdup
+#endif
+#define strdup(s) __ERROR_DONT_USE_STRDUP_DIRECTLY
+#endif
+       if (!s1) {
+               smb_panic("smb_xstrdup: malloc failed");
+       }
        return s1;
+
 }
 
+/**
+ strndup that aborts on malloc fail.
+**/
+
+char *smb_xstrndup(const char *s, size_t n)
+{
+#if defined(PARANOID_MALLOC_CHECKER)
+#ifdef strndup
+#undef strndup
+#endif
+#endif
+
+#if (defined(BROKEN_STRNDUP) || !defined(HAVE_STRNDUP))
+#undef HAVE_STRNDUP
+#define strndup rep_strndup
+#endif
+
+       char *s1 = strndup(s, n);
+#if defined(PARANOID_MALLOC_CHECKER)
+#ifdef strndup
+#undef strndup
+#endif
+#define strndup(s,n) __ERROR_DONT_USE_STRNDUP_DIRECTLY
+#endif
+       if (!s1) {
+               smb_panic("smb_xstrndup: malloc failed");
+       }
+       return s1;
+}
+
+
 
 /**
  Like strdup but for memory.
@@ -569,11 +520,13 @@ _PUBLIC_ bool all_zero(const uint8_t *ptr, size_t size)
 /**
   realloc an array, checking for integer overflow in the array size
 */
-_PUBLIC_ void *realloc_array(void *ptr, size_t el_size, unsigned count)
+_PUBLIC_ void *realloc_array(void *ptr, size_t el_size, unsigned count, bool free_on_fail)
 {
 #define MAX_MALLOC_SIZE 0x7fffffff
        if (count == 0 ||
            count >= MAX_MALLOC_SIZE/el_size) {
+               if (free_on_fail)
+                       SAFE_FREE(ptr);
                return NULL;
        }
        if (!ptr) {
@@ -582,6 +535,15 @@ _PUBLIC_ void *realloc_array(void *ptr, size_t el_size, unsigned count)
        return realloc(ptr, el_size * count);
 }
 
+/****************************************************************************
+ Type-safe malloc.
+****************************************************************************/
+
+void *malloc_array(size_t el_size, unsigned int count)
+{
+       return realloc_array(NULL, el_size, count, false);
+}
+
 _PUBLIC_ void *talloc_check_name_abort(const void *ptr, const char *name)
 {
         void *result;
similarity index 88%
rename from source4/lib/util/util.h
rename to lib/util/util.h
index ffe83c14b297d9573fc669e9b03fcaa4321b82cf..4c9a2230937a0b0270c13e6d94d1e31eed57e867 100644 (file)
 #ifndef _SAMBA_UTIL_H_
 #define _SAMBA_UTIL_H_
 
-#include "util/attr.h"
-
-#include "charset/charset.h"
+#if _SAMBA_BUILD_ == 4
+#include "lib/charset/charset.h"
+#endif
+#include "../lib/util/attr.h"
 
 /* for TALLOC_CTX */
 #include <talloc.h>
@@ -38,12 +39,11 @@ struct smbsrv_tcon;
 extern const char *logfile;
 extern const char *panic_action;
 
-#include "util/time.h"
-#include "util/data_blob.h"
-#include "util/xfile.h"
-#include "util/debug.h"
-#include "util/mutex.h"
-#include "util/byteorder.h"
+#include "../lib/util/time.h"
+#include "../lib/util/data_blob.h"
+#include "../lib/util/xfile.h"
+#include "../lib/util/mutex.h"
+#include "../lib/util/byteorder.h"
 
 /**
   this is a warning hack. The idea is to use this everywhere that we
@@ -79,79 +79,11 @@ extern const char *panic_action;
        DEBUG(0,("PANIC: assert failed at %s(%d)\n", __FILE__, __LINE__)); \
        smb_panic("assert failed"); }} while (0)
 
-#ifndef SAFE_FREE /* Oh no this is also defined in tdb.h */
-/**
- * Free memory if the pointer and zero the pointer.
- *
- * @note You are explicitly allowed to pass NULL pointers -- they will
- * always be ignored.
- **/
-#define SAFE_FREE(x) do { if ((x) != NULL) {free(discard_const_p(void *, (x))); (x)=NULL;} } while(0)
-#endif
-
-/** 
- * Type-safe version of malloc. Allocated one copy of the 
- * specified data type.
- */
-#define malloc_p(type) (type *)malloc(sizeof(type))
-
-/**
- * Allocate an array of elements of one data type. Does type-checking.
- */
-#define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count)
-
-/** 
- * Resize an array of elements of one data type. Does type-checking.
- */
-#define realloc_p(p, type, count) (type *)realloc_array(p, sizeof(type), count)
-
 #if defined(VALGRIND)
 #define strlen(x) valgrind_strlen(x)
 #endif
 
-/** 
- * zero a structure 
- */
-#ifndef ZERO_STRUCT
-#define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))
-#endif
-
-/** 
- * zero a structure given a pointer to the structure 
- */
-#ifndef ZERO_STRUCTP
-#define ZERO_STRUCTP(x) do { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); } while(0)
-#endif
-
-/** 
- * zero a structure given a pointer to the structure - no zero check 
- */
-#ifndef ZERO_STRUCTPN
-#define ZERO_STRUCTPN(x) memset((char *)(x), 0, sizeof(*(x)))
-#endif
-
-/* zero an array - note that sizeof(array) must work - ie. it must not be a
-   pointer */
-#ifndef ZERO_ARRAY
-#define ZERO_ARRAY(x) memset((char *)(x), 0, sizeof(x))
-#endif
-
-/**
- * work out how many elements there are in a static array 
- */
-#ifndef ARRAY_SIZE
-#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
-#endif
-
-/** 
- * pointer difference macro 
- */
-#ifndef PTR_DIFF
-#define PTR_DIFF(p1,p2) ((ptrdiff_t)(((const char *)(p1)) - (const char *)(p2)))
-#endif
-
-/* The following definitions come from lib/util/fault.c  */
-
+#include "../lib/util/memory.h"
 
 /**
  * Write backtrace to debug log
@@ -304,12 +236,12 @@ _PUBLIC_ char *safe_strcat(char *dest, const char *src, size_t maxlength);
 
 
 **/
-_PUBLIC_ size_t strhex_to_str(char *p, size_t len, const char *strhex);
+_PUBLIC_ size_t strhex_to_str(char *p, size_t p_len, const char *strhex, size_t strhex_len);
 
 /** 
  * Parse a hex string and return a data blob. 
  */
-_PUBLIC_ _PURE_ DATA_BLOB strhex_to_data_blob(const char *strhex) ;
+_PUBLIC_ _PURE_ DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex) ;
 
 /**
  * Routine to print a buffer as HEX digits, into an allocated string.
@@ -453,7 +385,7 @@ _PUBLIC_ bool strequal(const char *s1, const char *s2);
   separator list. The separator list must contain characters less than
   or equal to 0x2f for this to work correctly on multi-byte strings
 */
-_PUBLIC_ const char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const char *sep);
+_PUBLIC_ char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const char *sep);
 
 /**
  * build a null terminated list of strings from an argv-like input string 
@@ -474,12 +406,12 @@ _PUBLIC_ char *str_list_join_shell(TALLOC_CTX *mem_ctx, const char **list, char
 /**
   return the number of elements in a string list
 */
-_PUBLIC_ size_t str_list_length(const char **list);
+_PUBLIC_ size_t str_list_length(const char * const *list);
 
 /**
   copy a string list
 */
-_PUBLIC_ const char **str_list_copy(TALLOC_CTX *mem_ctx, const char **list);
+_PUBLIC_ char **str_list_copy(TALLOC_CTX *mem_ctx, const char **list);
 
 /**
    Return true if all the elements of the list match exactly.
@@ -524,12 +456,12 @@ _PUBLIC_ char *afdgets(int fd, TALLOC_CTX *mem_ctx, size_t hint);
 /**
 load a file into memory from a fd.
 **/
-_PUBLIC_ char *fd_load(int fd, size_t *size, TALLOC_CTX *mem_ctx);
+_PUBLIC_ char *fd_load(int fd, size_t *size, size_t maxsize, TALLOC_CTX *mem_ctx);
 
 /**
 load a file into memory
 **/
-_PUBLIC_ char *file_load(const char *fname, size_t *size, TALLOC_CTX *mem_ctx);
+_PUBLIC_ char *file_load(const char *fname, size_t *size, size_t maxsize, TALLOC_CTX *mem_ctx);
 
 /**
 mmap (if possible) or read a file
@@ -540,14 +472,14 @@ _PUBLIC_ void *map_file(const char *fname, size_t size);
 load a file into memory and return an array of pointers to lines in the file
 must be freed with talloc_free(). 
 **/
-_PUBLIC_ char **file_lines_load(const char *fname, int *numlines, TALLOC_CTX *mem_ctx);
+_PUBLIC_ char **file_lines_load(const char *fname, int *numlines, size_t maxsize, TALLOC_CTX *mem_ctx);
 
 /**
 load a fd into memory and return an array of pointers to lines in the file
 must be freed with talloc_free(). If convert is true calls unix_to_dos on
 the list.
 **/
-_PUBLIC_ char **fd_lines_load(int fd, int *numlines, TALLOC_CTX *mem_ctx);
+_PUBLIC_ char **fd_lines_load(int fd, int *numlines, size_t maxsize, TALLOC_CTX *mem_ctx);
 
 /**
 take a list of lines and modify them to produce a list where \ continues
@@ -642,7 +574,7 @@ _PUBLIC_ bool same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask
 /**
  Check if a process exists. Does this work on all unixes?
 **/
-_PUBLIC_ bool process_exists(pid_t pid);
+_PUBLIC_ bool process_exists_by_pid(pid_t pid);
 
 /**
  Simple routine to do POSIX file locking. Cruft in NFS and 64->32 bit mapping
@@ -702,7 +634,7 @@ _PUBLIC_ bool all_zero(const uint8_t *ptr, size_t size);
 /**
   realloc an array, checking for integer overflow in the array size
 */
-_PUBLIC_ void *realloc_array(void *ptr, size_t el_size, unsigned count);
+_PUBLIC_ void *realloc_array(void *ptr, size_t el_size, unsigned count, bool free_on_fail);
 
 /* The following definitions come from lib/util/fsusage.c  */
 
similarity index 100%
rename from source4/lib/util/util.m4
rename to lib/util/util.m4
similarity index 85%
rename from source4/lib/util/util_file.c
rename to lib/util/util_file.c
index c3e22196c0cb69cc95fb6a1b86936e4042dc1d99..0275e78c54fc89f3a69d2539c82874ea1ce10878 100644 (file)
 #include "includes.h"
 #include "system/shmem.h"
 #include "system/filesys.h"
+#if _SAMBA_BUILD_ == 3
+#undef malloc
+#undef realloc
+#endif
 
 /**
  * @file
@@ -160,23 +164,30 @@ _PUBLIC_ char *afdgets(int fd, TALLOC_CTX *mem_ctx, size_t hint)
 /**
 load a file into memory from a fd.
 **/
-_PUBLIC_ char *fd_load(int fd, size_t *size, TALLOC_CTX *mem_ctx)
+_PUBLIC_ char *fd_load(int fd, size_t *psize, size_t maxsize, TALLOC_CTX *mem_ctx)
 {
        struct stat sbuf;
        char *p;
+       size_t size;
 
        if (fstat(fd, &sbuf) != 0) return NULL;
 
-       p = (char *)talloc_size(mem_ctx, sbuf.st_size+1);
+       size = sbuf.st_size;
+
+       if (maxsize) {
+               size = MIN(size, maxsize);
+       }
+
+       p = (char *)talloc_size(mem_ctx, size+1);
        if (!p) return NULL;
 
-       if (read(fd, p, sbuf.st_size) != sbuf.st_size) {
+       if (read(fd, p, size) != size) {
                talloc_free(p);
                return NULL;
        }
-       p[sbuf.st_size] = 0;
+       p[size] = 0;
 
-       if (size) *size = sbuf.st_size;
+       if (psize) *psize = size;
 
        return p;
 }
@@ -184,7 +195,7 @@ _PUBLIC_ char *fd_load(int fd, size_t *size, TALLOC_CTX *mem_ctx)
 /**
 load a file into memory
 **/
-_PUBLIC_ char *file_load(const char *fname, size_t *size, TALLOC_CTX *mem_ctx)
+_PUBLIC_ char *file_load(const char *fname, size_t *size, size_t maxsize, TALLOC_CTX *mem_ctx)
 {
        int fd;
        char *p;
@@ -194,7 +205,7 @@ _PUBLIC_ char *file_load(const char *fname, size_t *size, TALLOC_CTX *mem_ctx)
        fd = open(fname,O_RDONLY);
        if (fd == -1) return NULL;
 
-       p = fd_load(fd, size, mem_ctx);
+       p = fd_load(fd, size, maxsize, mem_ctx);
 
        close(fd);
 
@@ -224,7 +235,7 @@ _PUBLIC_ void *map_file(const char *fname, size_t size)
        }
 #endif
        if (!p) {
-               p = file_load(fname, &s2, talloc_autofree_context());
+               p = file_load(fname, &s2, 0, talloc_autofree_context());
                if (!p) return NULL;
                if (s2 != size) {
                        DEBUG(1,("incorrect size for %s - got %d expected %d\n",
@@ -237,12 +248,31 @@ _PUBLIC_ void *map_file(const char *fname, size_t size)
        return p;
 }
 
+/**
+ unmap or free memory
+**/
+
+bool unmap_file(void *start, size_t size)
+{
+#ifdef HAVE_MMAP
+       if (munmap( start, size ) != 0) {
+               DEBUG( 1, ("map_file: Failed to unmap address %p "
+                       "of size %u - %s\n", 
+                       start, (unsigned int)size, strerror(errno) ));
+               return false;
+       }
+       return true;
+#else
+       talloc_free(start);
+       return true;
+#endif
+}
 
 /**
 parse a buffer into lines
 'p' will be freed on error, and otherwise will be made a child of the returned array
 **/
-static char **file_lines_parse(char *p, size_t size, int *numlines, TALLOC_CTX *mem_ctx)
+char **file_lines_parse(char *p, size_t size, int *numlines, TALLOC_CTX *mem_ctx)
 {
        int i;
        char *s, **ret;
@@ -288,12 +318,12 @@ static char **file_lines_parse(char *p, size_t size, int *numlines, TALLOC_CTX *
 load a file into memory and return an array of pointers to lines in the file
 must be freed with talloc_free(). 
 **/
-_PUBLIC_ char **file_lines_load(const char *fname, int *numlines, TALLOC_CTX *mem_ctx)
+_PUBLIC_ char **file_lines_load(const char *fname, int *numlines, size_t maxsize, TALLOC_CTX *mem_ctx)
 {
        char *p;
        size_t size;
 
-       p = file_load(fname, &size, mem_ctx);
+       p = file_load(fname, &size, maxsize, mem_ctx);
        if (!p) return NULL;
 
        return file_lines_parse(p, size, numlines, mem_ctx);
@@ -304,12 +334,12 @@ load a fd into memory and return an array of pointers to lines in the file
 must be freed with talloc_free(). If convert is true calls unix_to_dos on
 the list.
 **/
-_PUBLIC_ char **fd_lines_load(int fd, int *numlines, TALLOC_CTX *mem_ctx)
+_PUBLIC_ char **fd_lines_load(int fd, int *numlines, size_t maxsize, TALLOC_CTX *mem_ctx)
 {
        char *p;
        size_t size;
 
-       p = fd_load(fd, &size, mem_ctx);
+       p = fd_load(fd, &size, maxsize, mem_ctx);
        if (!p) return NULL;
 
        return file_lines_parse(p, size, numlines, mem_ctx);
@@ -402,3 +432,5 @@ _PUBLIC_ bool large_file_support(const char *path)
        close(fd);
        return ret == 0;
 }
+
+
similarity index 98%
rename from source4/lib/util/util_ldb.c
rename to lib/util/util_ldb.c
index 0465022edd6e7c6b4e4747227bf56a356b7835a4..70b18478c65db84f5ddc9d13359c855816189f54 100644 (file)
@@ -24,7 +24,7 @@
 #include "lib/events/events.h"
 #include "lib/ldb/include/ldb.h"
 #include "lib/ldb/include/ldb_errors.h"
-#include "lib/util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 /*
   search the sam for the specified attributes - va_list variant
 */
diff --git a/lib/util/util_net.c b/lib/util/util_net.c
new file mode 100644 (file)
index 0000000..ee57e9d
--- /dev/null
@@ -0,0 +1,131 @@
+/* 
+   Unix SMB/CIFS implementation.
+   Samba utility functions
+   Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2008
+   Copyright (C) Andrew Tridgell 1992-1998
+   Copyright (C) Jeremy Allison 2001-2002
+   Copyright (C) Simo Sorce 2001
+   Copyright (C) Jim McDonough (jmcd@us.ibm.com)  2003.
+   Copyright (C) James J Myers 2003
+    
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "includes.h"
+#include "system/network.h"
+#include "system/locale.h"
+#include "system/filesys.h"
+
+/**
+ Interpret an internet address or name into an IP address in 4 byte form.
+**/
+_PUBLIC_ uint32_t interpret_addr(const char *str)
+{
+       struct hostent *hp;
+       uint32_t res;
+
+       if (str == NULL || *str == 0 ||
+           strcmp(str,"0.0.0.0") == 0) {
+               return 0;
+       }
+       if (strcmp(str,"255.255.255.255") == 0) {
+               return 0xFFFFFFFF;
+       }
+       /* recognise 'localhost' as a special name. This fixes problems with
+          some hosts that don't have localhost in /etc/hosts */
+       if (strcasecmp(str,"localhost") == 0) {
+               str = "127.0.0.1";
+       }
+
+       /* if it's in the form of an IP address then get the lib to interpret it */
+       if (is_ipaddress(str)) {
+               res = inet_addr(str);
+       } else {
+               /* otherwise assume it's a network name of some sort and use 
+                       sys_gethostbyname */
+               if ((hp = sys_gethostbyname(str)) == 0) {
+                       DEBUG(3,("sys_gethostbyname: Unknown host. %s\n",str));
+                       return 0;
+               }
+
+               if(hp->h_addr == NULL) {
+                       DEBUG(3,("sys_gethostbyname: host address is invalid for host %s\n",str));
+                       return 0;
+               }
+               memcpy((char *)&res,(char *)hp->h_addr, 4);
+       }
+
+       if (res == (uint32_t)-1)
+               return(0);
+
+       return(res);
+}
+
+/**
+ A convenient addition to interpret_addr().
+**/
+_PUBLIC_ struct in_addr interpret_addr2(const char *str)
+{
+       struct in_addr ret;
+       uint32_t a = interpret_addr(str);
+       ret.s_addr = a;
+       return ret;
+}
+
+/**
+ Check if an IP is the 0.0.0.0.
+**/
+
+_PUBLIC_ bool is_zero_ip(struct in_addr ip)
+{
+       return ip.s_addr == 0;
+}
+
+/**
+ Are two IPs on the same subnet?
+**/
+
+_PUBLIC_ bool same_net(struct in_addr ip1, struct in_addr ip2, struct in_addr mask)
+{
+       uint32_t net1,net2,nmask;
+
+       nmask = ntohl(mask.s_addr);
+       net1  = ntohl(ip1.s_addr);
+       net2  = ntohl(ip2.s_addr);
+            
+       return((net1 & nmask) == (net2 & nmask));
+}
+
+/**
+ Return true if a string could be a pure IP address.
+**/
+
+_PUBLIC_ bool is_ipaddress(const char *str)
+{
+       bool pure_address = true;
+       int i;
+
+       if (str == NULL) return false;
+
+       for (i=0; pure_address && str[i]; i++)
+               if (!(isdigit((int)str[i]) || str[i] == '.'))
+                       pure_address = false;
+
+       /* Check that a pure number is not misinterpreted as an IP */
+       pure_address = pure_address && (strchr(str, '.') != NULL);
+
+       return pure_address;
+}
+
+
similarity index 80%
rename from source4/lib/util/util_str.c
rename to lib/util/util_str.c
index 9ea6403c52da1790b794c1d516ca86f73700b461..231f7f2c6f3367a8d8753dbfcaeed90f4b0bba53 100644 (file)
@@ -178,7 +178,7 @@ _PUBLIC_ char *safe_strcat(char *dest, const char *src, size_t maxlength)
 
 
 **/
-_PUBLIC_ size_t strhex_to_str(char *p, size_t len, const char *strhex)
+_PUBLIC_ size_t strhex_to_str(char *p, size_t p_len, const char *strhex, size_t strhex_len)
 {
        size_t i;
        size_t num_chars = 0;
@@ -186,7 +186,7 @@ _PUBLIC_ size_t strhex_to_str(char *p, size_t len, const char *strhex)
        const char     *hexchars = "0123456789ABCDEF";
        char           *p1 = NULL, *p2 = NULL;
 
-       for (i = 0; i < len && strhex[i] != 0; i++) {
+       for (i = 0; i < strhex_len && strhex[i] != 0; i++) {
                if (strncasecmp(hexchars, "0x", 2) == 0) {
                        i++; /* skip two chars */
                        continue;
@@ -204,6 +204,10 @@ _PUBLIC_ size_t strhex_to_str(char *p, size_t len, const char *strhex)
                hinybble = PTR_DIFF(p1, hexchars);
                lonybble = PTR_DIFF(p2, hexchars);
 
+               if (num_chars >= p_len) {
+                       break;
+               }
+
                p[num_chars] = (hinybble << 4) | lonybble;
                num_chars++;
 
@@ -216,13 +220,13 @@ _PUBLIC_ size_t strhex_to_str(char *p, size_t len, const char *strhex)
 /** 
  * Parse a hex string and return a data blob. 
  */
-_PUBLIC_ _PURE_ DATA_BLOB strhex_to_data_blob(const char *strhex) 
+_PUBLIC_ _PURE_ DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex) 
 {
-       DATA_BLOB ret_blob = data_blob(NULL, strlen(strhex)/2+1);
+       DATA_BLOB ret_blob = data_blob_talloc(mem_ctx, NULL, strlen(strhex)/2+1);
 
-       ret_blob.length = strhex_to_str((char *)ret_blob.data,  
-                                       strlen(strhex), 
-                                       strhex);
+       ret_blob.length = strhex_to_str((char *)ret_blob.data, ret_blob.length,
+                                       strhex,
+                                       strlen(strhex));
 
        return ret_blob;
 }
@@ -259,144 +263,6 @@ _PUBLIC_ char *hex_encode_talloc(TALLOC_CTX *mem_ctx, const unsigned char *buff_
        return hex_buffer;
 }
 
-/**
- Substitute a string for a pattern in another string. Make sure there is 
- enough room!
-
- This routine looks for pattern in s and replaces it with 
- insert. It may do multiple replacements.
-
- Any of " ; ' $ or ` in the insert string are replaced with _
- if len==0 then the string cannot be extended. This is different from the old
- use of len==0 which was for no length checks to be done.
-**/
-
-_PUBLIC_ void string_sub(char *s, const char *pattern, const char *insert, size_t len)
-{
-       char *p;
-       ssize_t ls, lp, li, i;
-
-       if (!insert || !pattern || !*pattern || !s)
-               return;
-
-       ls = (ssize_t)strlen(s);
-       lp = (ssize_t)strlen(pattern);
-       li = (ssize_t)strlen(insert);
-
-       if (len == 0)
-               len = ls + 1; /* len is number of *bytes* */
-
-       while (lp <= ls && (p = strstr(s, pattern))) {
-               if (ls + (li-lp) >= len) {
-                       DEBUG(0,("ERROR: string overflow by %d in string_sub(%.50s, %d)\n", 
-                                (int)(ls + (li-lp) - len),
-                                pattern, (int)len));
-                       break;
-               }
-               if (li != lp) {
-                       memmove(p+li,p+lp,strlen(p+lp)+1);
-               }
-               for (i=0;i<li;i++) {
-                       switch (insert[i]) {
-                       case '`':
-                       case '"':
-                       case '\'':
-                       case ';':
-                       case '$':
-                       case '%':
-                       case '\r':
-                       case '\n':
-                               p[i] = '_';
-                               break;
-                       default:
-                               p[i] = insert[i];
-                       }
-               }
-               s = p + li;
-               ls += (li-lp);
-       }
-}
-
-/**
- * Talloc'ed version of string_sub
- */
-_PUBLIC_ char *string_sub_talloc(TALLOC_CTX *mem_ctx, const char *s, 
-                               const char *pattern, const char *insert)
-{
-       const char *p;
-       char *ret;
-       size_t len, alloc_len;
-
-       if (insert == NULL || pattern == NULL || !*pattern || s == NULL)
-               return NULL;
-
-       /* determine length needed */
-       len = strlen(s);
-       
-       for (p = strstr(s, pattern); p != NULL; 
-            p = strstr(p+strlen(pattern), pattern)) {
-               len += strlen(insert) - strlen(pattern);
-       }
-
-       alloc_len = MAX(len, strlen(s))+1;
-       ret = talloc_array(mem_ctx, char, alloc_len);
-       if (ret == NULL)
-               return NULL;
-       strncpy(ret, s, alloc_len);
-       string_sub(ret, pattern, insert, alloc_len);
-
-       ret = talloc_realloc(mem_ctx, ret, char, len+1);
-       if (ret == NULL)
-               return NULL;
-
-       SMB_ASSERT(ret[len] == '\0');
-
-       return ret;
-}
-
-/**
- Similar to string_sub() but allows for any character to be substituted. 
- Use with caution!
- if len==0 then the string cannot be extended. This is different from the old
- use of len==0 which was for no length checks to be done.
-**/
-
-_PUBLIC_ void all_string_sub(char *s,const char *pattern,const char *insert, size_t len)
-{
-       char *p;
-       ssize_t ls,lp,li;
-
-       if (!insert || !pattern || !s)
-               return;
-
-       ls = (ssize_t)strlen(s);
-       lp = (ssize_t)strlen(pattern);
-       li = (ssize_t)strlen(insert);
-
-       if (!*pattern)
-               return;
-       
-       if (len == 0)
-               len = ls + 1; /* len is number of *bytes* */
-       
-       while (lp <= ls && (p = strstr(s,pattern))) {
-               if (ls + (li-lp) >= len) {
-                       DEBUG(0,("ERROR: string overflow by %d in all_string_sub(%.50s, %d)\n", 
-                                (int)(ls + (li-lp) - len),
-                                pattern, (int)len));
-                       break;
-               }
-               if (li != lp) {
-                       memmove(p+li,p+lp,strlen(p+lp)+1);
-               }
-               memcpy(p, insert, li);
-               s = p + li;
-               ls += (li-lp);
-       }
-}
-
-
-
 /**
  Unescape a URL encoded string, in place.
 **/
similarity index 92%
rename from source4/lib/util/util_strlist.c
rename to lib/util/util_strlist.c
index 30de4b962dffe1963d64156e14e379c110af414a..b069a11e38a9e137cd33e9b75fcfdbc3f8ec7063 100644 (file)
@@ -21,6 +21,8 @@
 #include "includes.h"
 #include "system/locale.h"
 
+#undef strcasecmp
+
 /**
  * @file
  * @brief String list manipulation
   separator list. The separator list must contain characters less than
   or equal to 0x2f for this to work correctly on multi-byte strings
 */
-_PUBLIC_ const char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const char *sep)
+_PUBLIC_ char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const char *sep)
 {
        int num_elements = 0;
-       const char **ret = NULL;
+       char **ret = NULL;
 
        if (sep == NULL) {
                sep = LIST_SEP;
        }
 
-       ret = talloc_array(mem_ctx, const char *, 1);
+       ret = talloc_array(mem_ctx, char *, 1);
        if (ret == NULL) {
                return NULL;
        }
 
        while (string && *string) {
                size_t len = strcspn(string, sep);
-               const char **ret2;
+               char **ret2;
                
                if (len == 0) {
                        string += strspn(string, sep);
                        continue;
                }
 
-               ret2 = talloc_realloc(mem_ctx, ret, const char *, num_elements+2);
+               ret2 = talloc_realloc(mem_ctx, ret, char *, num_elements+2);
                if (ret2 == NULL) {
                        talloc_free(ret);
                        return NULL;
@@ -185,7 +187,7 @@ _PUBLIC_ char *str_list_join_shell(TALLOC_CTX *mem_ctx, const char **list, char
 /**
   return the number of elements in a string list
 */
-_PUBLIC_ size_t str_list_length(const char **list)
+_PUBLIC_ size_t str_list_length(const char * const*list)
 {
        size_t ret;
        for (ret=0;list && list[ret];ret++) /* noop */ ;
@@ -196,15 +198,15 @@ _PUBLIC_ size_t str_list_length(const char **list)
 /**
   copy a string list
 */
-_PUBLIC_ const char **str_list_copy(TALLOC_CTX *mem_ctx, const char **list)
+_PUBLIC_ char **str_list_copy(TALLOC_CTX *mem_ctx, const char **list)
 {
        int i;
-       const char **ret;
+       char **ret;
 
        if (list == NULL)
                return NULL;
        
-       ret = talloc_array(mem_ctx, const char *, str_list_length(list)+1);
+       ret = talloc_array(mem_ctx, char *, str_list_length(list)+1);
        if (ret == NULL) 
                return NULL;
 
similarity index 61%
rename from source4/lib/util/util_tdb.c
rename to lib/util/util_tdb.c
index e89085a31bd681247205f7220974b15ebeafc9bb..2d6012c9f42b5827f8fdf8e2c6515ce684d8b54d 100644 (file)
@@ -21,8 +21,7 @@
 
 #include "includes.h"
 #include "../tdb/include/tdb.h"
-#include "pstring.h"
-#include "lib/util/util_tdb.h"
+#include "../lib/util/util_tdb.h"
 
 /* these are little tdb utility functions that are meant to make
    dealing with a tdb database a little less cumbersome in Samba */
  Make a TDB_DATA and keep the const warning in one place
 ****************************************************************/
 
-static TDB_DATA make_tdb_data(const char *dptr, size_t dsize)
+TDB_DATA make_tdb_data(const uint8_t *dptr, size_t dsize)
 {
        TDB_DATA ret;
-       ret.dptr = discard_const_p(unsigned char, dptr);
+       ret.dptr = discard_const_p(uint8_t, dptr);
        ret.dsize = dsize;
        return ret;
 }
 
+TDB_DATA string_tdb_data(const char *string)
+{
+       return make_tdb_data((const uint8_t *)string, string ? strlen(string) : 0 );
+}
+
+TDB_DATA string_term_tdb_data(const char *string)
+{
+       return make_tdb_data((const uint8_t *)string, string ? strlen(string) + 1 : 0);
+}
+
 /****************************************************************************
  Lock a chain by string. Return -1 if lock failed.
 ****************************************************************************/
 
 int tdb_lock_bystring(struct tdb_context *tdb, const char *keyval)
 {
-       TDB_DATA key = make_tdb_data(keyval, strlen(keyval)+1);
+       TDB_DATA key = string_term_tdb_data(keyval);
        
        return tdb_chainlock(tdb, key);
 }
@@ -56,7 +65,7 @@ int tdb_lock_bystring(struct tdb_context *tdb, const char *keyval)
 
 void tdb_unlock_bystring(struct tdb_context *tdb, const char *keyval)
 {
-       TDB_DATA key = make_tdb_data(keyval, strlen(keyval)+1);
+       TDB_DATA key = string_term_tdb_data(keyval);
 
        tdb_chainunlock(tdb, key);
 }
@@ -67,7 +76,7 @@ void tdb_unlock_bystring(struct tdb_context *tdb, const char *keyval)
 
 int tdb_read_lock_bystring(struct tdb_context *tdb, const char *keyval)
 {
-       TDB_DATA key = make_tdb_data(keyval, strlen(keyval)+1);
+       TDB_DATA key = string_term_tdb_data(keyval);
        
        return tdb_chainlock_read(tdb, key);
 }
@@ -78,7 +87,7 @@ int tdb_read_lock_bystring(struct tdb_context *tdb, const char *keyval)
 
 void tdb_read_unlock_bystring(struct tdb_context *tdb, const char *keyval)
 {
-       TDB_DATA key = make_tdb_data(keyval, strlen(keyval)+1);
+       TDB_DATA key = string_term_tdb_data(keyval);
        
        tdb_chainunlock_read(tdb, key);
 }
@@ -89,9 +98,8 @@ void tdb_read_unlock_bystring(struct tdb_context *tdb, const char *keyval)
  Output is int32_t in native byte order.
 ****************************************************************************/
 
-int32_t tdb_fetch_int32_byblob(struct tdb_context *tdb, const char *keyval, size_t len)
+int32_t tdb_fetch_int32_byblob(struct tdb_context *tdb, TDB_DATA key)
 {
-       TDB_DATA key = make_tdb_data(keyval, len);
        TDB_DATA data;
        int32_t ret;
 
@@ -113,7 +121,7 @@ int32_t tdb_fetch_int32_byblob(struct tdb_context *tdb, const char *keyval, size
 
 int32_t tdb_fetch_int32(struct tdb_context *tdb, const char *keystr)
 {
-       return tdb_fetch_int32_byblob(tdb, keystr, strlen(keystr) + 1);
+       return tdb_fetch_int32_byblob(tdb, string_term_tdb_data(keystr));
 }
 
 /****************************************************************************
@@ -121,9 +129,8 @@ int32_t tdb_fetch_int32(struct tdb_context *tdb, const char *keystr)
  Input is int32_t in native byte order. Output in tdb is in little-endian.
 ****************************************************************************/
 
-int tdb_store_int32_byblob(struct tdb_context *tdb, const char *keystr, size_t len, int32_t v)
+int tdb_store_int32_byblob(struct tdb_context *tdb, TDB_DATA key, int32_t v)
 {
-       TDB_DATA key = make_tdb_data(keystr, len);
        TDB_DATA data;
        int32_t v_store;
 
@@ -141,7 +148,7 @@ int tdb_store_int32_byblob(struct tdb_context *tdb, const char *keystr, size_t l
 
 int tdb_store_int32(struct tdb_context *tdb, const char *keystr, int32_t v)
 {
-       return tdb_store_int32_byblob(tdb, keystr, strlen(keystr) + 1, v);
+       return tdb_store_int32_byblob(tdb, string_term_tdb_data(keystr), v);
 }
 
 /****************************************************************************
@@ -149,9 +156,8 @@ int tdb_store_int32(struct tdb_context *tdb, const char *keystr, int32_t v)
  Output is uint32_t in native byte order.
 ****************************************************************************/
 
-bool tdb_fetch_uint32_byblob(struct tdb_context *tdb, const char *keyval, size_t len, uint32_t *value)
+bool tdb_fetch_uint32_byblob(struct tdb_context *tdb, TDB_DATA key, uint32_t *value)
 {
-       TDB_DATA key = make_tdb_data(keyval, len);
        TDB_DATA data;
 
        data = tdb_fetch(tdb, key);
@@ -172,7 +178,7 @@ bool tdb_fetch_uint32_byblob(struct tdb_context *tdb, const char *keyval, size_t
 
 bool tdb_fetch_uint32(struct tdb_context *tdb, const char *keystr, uint32_t *value)
 {
-       return tdb_fetch_uint32_byblob(tdb, keystr, strlen(keystr) + 1, value);
+       return tdb_fetch_uint32_byblob(tdb, string_term_tdb_data(keystr), value);
 }
 
 /****************************************************************************
@@ -180,9 +186,8 @@ bool tdb_fetch_uint32(struct tdb_context *tdb, const char *keystr, uint32_t *val
  Input is uint32_t in native byte order. Output in tdb is in little-endian.
 ****************************************************************************/
 
-bool tdb_store_uint32_byblob(struct tdb_context *tdb, const char *keystr, size_t len, uint32_t value)
+bool tdb_store_uint32_byblob(struct tdb_context *tdb, TDB_DATA key, uint32_t value)
 {
-       TDB_DATA key = make_tdb_data(keystr, len);
        TDB_DATA data;
        uint32_t v_store;
        bool ret = true;
@@ -204,7 +209,7 @@ bool tdb_store_uint32_byblob(struct tdb_context *tdb, const char *keystr, size_t
 
 bool tdb_store_uint32(struct tdb_context *tdb, const char *keystr, uint32_t value)
 {
-       return tdb_store_uint32_byblob(tdb, keystr, strlen(keystr) + 1, value);
+       return tdb_store_uint32_byblob(tdb, string_term_tdb_data(keystr), value);
 }
 /****************************************************************************
  Store a buffer by a null terminated string key.  Return 0 on success, -1
@@ -213,7 +218,7 @@ bool tdb_store_uint32(struct tdb_context *tdb, const char *keystr, uint32_t valu
 
 int tdb_store_bystring(struct tdb_context *tdb, const char *keystr, TDB_DATA data, int flags)
 {
-       TDB_DATA key = make_tdb_data(keystr, strlen(keystr)+1);
+       TDB_DATA key = string_term_tdb_data(keystr);
        
        return tdb_store(tdb, key, data, flags);
 }
@@ -225,7 +230,7 @@ int tdb_store_bystring(struct tdb_context *tdb, const char *keystr, TDB_DATA dat
 
 TDB_DATA tdb_fetch_bystring(struct tdb_context *tdb, const char *keystr)
 {
-       TDB_DATA key = make_tdb_data(keystr, strlen(keystr)+1);
+       TDB_DATA key = string_term_tdb_data(keystr);
 
        return tdb_fetch(tdb, key);
 }
@@ -236,7 +241,7 @@ TDB_DATA tdb_fetch_bystring(struct tdb_context *tdb, const char *keystr)
 
 int tdb_delete_bystring(struct tdb_context *tdb, const char *keystr)
 {
-       TDB_DATA key = make_tdb_data(keystr, strlen(keystr)+1);
+       TDB_DATA key = string_term_tdb_data(keystr);
 
        return tdb_delete(tdb, key);
 }
@@ -333,214 +338,3 @@ int tdb_traverse_delete_fn(struct tdb_context *the_tdb, TDB_DATA key, TDB_DATA d
 {
     return tdb_delete(the_tdb, key);
 }
-
-
-
-/****************************************************************************
- Useful pair of routines for packing/unpacking data consisting of
- integers and strings.
-****************************************************************************/
-
-size_t tdb_pack(TDB_CONTEXT *tdb, char *buf, int bufsize, const char *fmt, ...)
-{
-       va_list ap;
-       uint8_t bt;
-       uint16_t w;
-       uint32_t d;
-       int i;
-       void *p;
-       int len;
-       char *s;
-       char c;
-       char *buf0 = buf;
-       const char *fmt0 = fmt;
-       int bufsize0 = bufsize;
-       tdb_log_func log_fn = tdb_log_fn(tdb);
-
-       va_start(ap, fmt);
-
-       while (*fmt) {
-               switch ((c = *fmt++)) {
-               case 'b': /* unsigned 8-bit integer */
-                       len = 1;
-                       bt = (uint8_t)va_arg(ap, int);
-                       if (bufsize && bufsize >= len)
-                               SSVAL(buf, 0, bt);
-                       break;
-               case 'w': /* unsigned 16-bit integer */
-                       len = 2;
-                       w = (uint16_t)va_arg(ap, int);
-                       if (bufsize && bufsize >= len)
-                               SSVAL(buf, 0, w);
-                       break;
-               case 'd': /* signed 32-bit integer (standard int in most systems) */
-                       len = 4;
-                       d = va_arg(ap, uint32_t);
-                       if (bufsize && bufsize >= len)
-                               SIVAL(buf, 0, d);
-                       break;
-               case 'p': /* pointer */
-                       len = 4;
-                       p = va_arg(ap, void *);
-                       d = p?1:0;
-                       if (bufsize && bufsize >= len)
-                               SIVAL(buf, 0, d);
-                       break;
-               case 'P': /* null-terminated string */
-                       s = va_arg(ap,char *);
-                       w = strlen(s);
-                       len = w + 1;
-                       if (bufsize && bufsize >= len)
-                               memcpy(buf, s, len);
-                       break;
-               case 'f': /* null-terminated string */
-                       s = va_arg(ap,char *);
-                       w = strlen(s);
-                       len = w + 1;
-                       if (bufsize && bufsize >= len)
-                               memcpy(buf, s, len);
-                       break;
-               case 'B': /* fixed-length string */
-                       i = va_arg(ap, int);
-                       s = va_arg(ap, char *);
-                       len = 4+i;
-                       if (bufsize && bufsize >= len) {
-                               SIVAL(buf, 0, i);
-                               memcpy(buf+4, s, i);
-                       }
-                       break;
-               default:
-                       log_fn(tdb, 0,"Unknown tdb_pack format %c in %s\n", 
-                              c, fmt);
-                       len = 0;
-                       break;
-               }
-
-               buf += len;
-               if (bufsize)
-                       bufsize -= len;
-               if (bufsize < 0)
-                       bufsize = 0;
-       }
-
-       va_end(ap);
-
-       log_fn(tdb, 18,"tdb_pack(%s, %d) -> %d\n", 
-              fmt0, bufsize0, (int)PTR_DIFF(buf, buf0));
-       
-       return PTR_DIFF(buf, buf0);
-}
-
-/****************************************************************************
- Useful pair of routines for packing/unpacking data consisting of
- integers and strings.
-****************************************************************************/
-
-int tdb_unpack(TDB_CONTEXT *tdb, char *buf, int bufsize, const char *fmt, ...)
-{
-       va_list ap;
-       uint8_t *bt;
-       uint16_t *w;
-       uint32_t *d;
-       int len;
-       int *i;
-       void **p;
-       char *s, **b, **ps;
-       char c;
-       char *buf0 = buf;
-       const char *fmt0 = fmt;
-       int bufsize0 = bufsize;
-       tdb_log_func log_fn = tdb_log_fn(tdb);
-
-       va_start(ap, fmt);
-
-       while (*fmt) {
-               switch ((c=*fmt++)) {
-               case 'b':
-                       len = 1;
-                       bt = va_arg(ap, uint8_t *);
-                       if (bufsize < len)
-                               goto no_space;
-                       *bt = SVAL(buf, 0);
-                       break;
-               case 'w':
-                       len = 2;
-                       w = va_arg(ap, uint16_t *);
-                       if (bufsize < len)
-                               goto no_space;
-                       *w = SVAL(buf, 0);
-                       break;
-               case 'd':
-                       len = 4;
-                       d = va_arg(ap, uint32_t *);
-                       if (bufsize < len)
-                               goto no_space;
-                       *d = IVAL(buf, 0);
-                       break;
-               case 'p':
-                       len = 4;
-                       p = va_arg(ap, void **);
-                       if (bufsize < len)
-                               goto no_space;
-
-                       /*
-                        * This isn't a real pointer - only a token (1 or 0)
-                        * to mark the fact a pointer is present.
-                        */
-
-                       *p = (void *)(IVAL(buf, 0) ? (void *)1 : NULL);
-                       break;
-               case 'P':
-                       /* Return a malloc'ed string. */
-                       ps = va_arg(ap,char **  );
-                       len = strlen((const char *)buf) + 1;
-                       *ps = strdup((const char *)buf);
-                       break;
-               case 'f':
-                       s = va_arg(ap,char *);
-                       len = strlen(buf) + 1;
-                       if (bufsize < len || len > sizeof(fstring))
-                               goto no_space;
-                       memcpy(s, buf, len);
-                       break;
-               case 'B':
-                       i = va_arg(ap, int *);
-                       b = va_arg(ap, char **);
-                       len = 4;
-                       if (bufsize < len)
-                               goto no_space;
-                       *i = IVAL(buf, 0);
-                       if (! *i) {
-                               *b = NULL;
-                               break;
-                       }
-                       len += *i;
-                       if (bufsize < len)
-                               goto no_space;
-                       *b = (char *)malloc(*i);
-                       if (! *b)
-                               goto no_space;
-                       memcpy(*b, buf+4, *i);
-                       break;
-               default:
-                       log_fn(tdb, 0, "Unknown tdb_unpack format %c in %s\n",
-                              c, fmt);
-
-                       len = 0;
-                       break;
-               }
-
-               buf += len;
-               bufsize -= len;
-       }
-
-       va_end(ap);
-
-       log_fn(tdb, 18, "tdb_unpack(%s, %d) -> %d\n",
-              fmt0, bufsize0, (int)PTR_DIFF(buf, buf0));
-
-       return PTR_DIFF(buf, buf0);
-
- no_space:
-       return -1;
-}
diff --git a/lib/util/util_tdb.h b/lib/util/util_tdb.h
new file mode 100644 (file)
index 0000000..da6378e
--- /dev/null
@@ -0,0 +1,114 @@
+#ifndef _____LIB_UTIL_UTIL_TDB_H__
+#define _____LIB_UTIL_UTIL_TDB_H__
+
+
+/***************************************************************
+ Make a TDB_DATA and keep the const warning in one place
+****************************************************************/
+TDB_DATA make_tdb_data(const uint8_t *dptr, size_t dsize);
+TDB_DATA string_tdb_data(const char *string);
+TDB_DATA string_term_tdb_data(const char *string);
+
+/****************************************************************************
+ Lock a chain by string. Return -1 if lock failed.
+****************************************************************************/
+int tdb_lock_bystring(struct tdb_context *tdb, const char *keyval);
+
+/****************************************************************************
+ Unlock a chain by string.
+****************************************************************************/
+void tdb_unlock_bystring(struct tdb_context *tdb, const char *keyval);
+
+/****************************************************************************
+ Read lock a chain by string. Return -1 if lock failed.
+****************************************************************************/
+int tdb_read_lock_bystring(struct tdb_context *tdb, const char *keyval);
+
+/****************************************************************************
+ Read unlock a chain by string.
+****************************************************************************/
+void tdb_read_unlock_bystring(struct tdb_context *tdb, const char *keyval);
+
+/****************************************************************************
+ Fetch a int32_t value by a arbitrary blob key, return -1 if not found.
+ Output is int32_t in native byte order.
+****************************************************************************/
+int32_t tdb_fetch_int32_byblob(struct tdb_context *tdb, TDB_DATA key);
+
+/****************************************************************************
+ Fetch a int32_t value by string key, return -1 if not found.
+ Output is int32_t in native byte order.
+****************************************************************************/
+int32_t tdb_fetch_int32(struct tdb_context *tdb, const char *keystr);
+
+/****************************************************************************
+ Store a int32_t value by an arbitary blob key, return 0 on success, -1 on failure.
+ Input is int32_t in native byte order. Output in tdb is in little-endian.
+****************************************************************************/
+int tdb_store_int32_byblob(struct tdb_context *tdb, TDB_DATA key, int32_t v);
+
+/****************************************************************************
+ Store a int32_t value by string key, return 0 on success, -1 on failure.
+ Input is int32_t in native byte order. Output in tdb is in little-endian.
+****************************************************************************/
+int tdb_store_int32(struct tdb_context *tdb, const char *keystr, int32_t v);
+
+/****************************************************************************
+ Fetch a uint32_t value by a arbitrary blob key, return -1 if not found.
+ Output is uint32_t in native byte order.
+****************************************************************************/
+bool tdb_fetch_uint32_byblob(struct tdb_context *tdb, TDB_DATA key, uint32_t *value);
+
+/****************************************************************************
+ Fetch a uint32_t value by string key, return -1 if not found.
+ Output is uint32_t in native byte order.
+****************************************************************************/
+bool tdb_fetch_uint32(struct tdb_context *tdb, const char *keystr, uint32_t *value);
+
+/****************************************************************************
+ Store a uint32_t value by an arbitary blob key, return 0 on success, -1 on failure.
+ Input is uint32_t in native byte order. Output in tdb is in little-endian.
+****************************************************************************/
+bool tdb_store_uint32_byblob(struct tdb_context *tdb, TDB_DATA key, uint32_t value);
+
+/****************************************************************************
+ Store a uint32_t value by string key, return 0 on success, -1 on failure.
+ Input is uint32_t in native byte order. Output in tdb is in little-endian.
+****************************************************************************/
+bool tdb_store_uint32(struct tdb_context *tdb, const char *keystr, uint32_t value);
+
+/****************************************************************************
+ Store a buffer by a null terminated string key.  Return 0 on success, -1
+ on failure.
+****************************************************************************/
+int tdb_store_bystring(struct tdb_context *tdb, const char *keystr, TDB_DATA data, int flags);
+
+/****************************************************************************
+ Fetch a buffer using a null terminated string key.  Don't forget to call
+ free() on the result dptr.
+****************************************************************************/
+TDB_DATA tdb_fetch_bystring(struct tdb_context *tdb, const char *keystr);
+
+/****************************************************************************
+ Delete an entry using a null terminated string key. 
+****************************************************************************/
+int tdb_delete_bystring(struct tdb_context *tdb, const char *keystr);
+
+/****************************************************************************
+ Atomic integer change. Returns old value. To create, set initial value in *oldval. 
+****************************************************************************/
+int32_t tdb_change_int32_atomic(struct tdb_context *tdb, const char *keystr, int32_t *oldval, int32_t change_val);
+
+/****************************************************************************
+ Atomic unsigned integer change. Returns old value. To create, set initial value in *oldval. 
+****************************************************************************/
+bool tdb_change_uint32_atomic(struct tdb_context *tdb, const char *keystr, uint32_t *oldval, uint32_t change_val);
+
+/****************************************************************************
+ Allow tdb_delete to be used as a tdb_traversal_fn.
+****************************************************************************/
+int tdb_traverse_delete_fn(struct tdb_context *the_tdb, TDB_DATA key, TDB_DATA dbuf,
+                     void *state);
+
+#endif /* _____LIB_UTIL_UTIL_TDB_H__ */
+
similarity index 99%
rename from source4/lib/util/wrap_xattr.c
rename to lib/util/wrap_xattr.c
index 955f39a7ebb4b4a184f3948c564506af779a520a..b7e69c3676668ae16cde405940b6678a7ca7990b 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "includes.h"
 #include "system/filesys.h"
-#include "lib/util/wrap_xattr.h"
+#include "../lib/util/wrap_xattr.h"
 
 #if defined(HAVE_XATTR_SUPPORT) && defined(XATTR_ADDITIONAL_OPTIONS)
 static ssize_t _wrap_darwin_fgetxattr(int fd, const char *name, void *value, size_t size)
similarity index 100%
rename from source4/lib/util/xattr.m4
rename to lib/util/xattr.m4
similarity index 94%
rename from source4/lib/util/xfile.c
rename to lib/util/xfile.c
index a016031a77dd2007bcfd3324797f52774ccddc4b..94b0ee9b1897d28f9480d72d369e8d8077b8b458 100644 (file)
 #include "includes.h"
 #include "system/filesys.h"
 
+#if _SAMBA_BUILD_ == 3
+#undef malloc
+#endif
+
 #define XBUFSIZE BUFSIZ
 
 static XFILE _x_stdin =  { 0, NULL, NULL, XBUFSIZE, 0, O_RDONLY, X_IOFBF, 0 };
@@ -100,7 +104,7 @@ XFILE *x_fopen(const char *fname, int flags, mode_t mode)
 {
        XFILE *ret;
 
-       ret = malloc_p(XFILE);
+       ret = (XFILE *)malloc_p(XFILE);
        if (!ret) return NULL;
 
        memset(ret, 0, sizeof(XFILE));
@@ -222,7 +226,7 @@ size_t x_fwrite(const void *p, size_t size, size_t nmemb, XFILE *f)
 }
 
 /* at least fileno() is simple! */
-int x_fileno(XFILE *f)
+int x_fileno(const XFILE *f)
 {
        return f->fd;
 }
@@ -387,3 +391,26 @@ off_t x_tseek(XFILE *f, off_t offset, int whence)
        f->flags &= ~X_FLAG_EOF;
        return lseek(f->fd, offset, whence);
 }
+
+XFILE *x_fdup(const XFILE *f)
+{
+       XFILE *ret;
+       int fd;
+
+       fd = dup(x_fileno(f));
+       if (fd < 0) {
+               return NULL;
+       }
+
+       ret = (XFILE *)malloc_p(XFILE);
+       if (!ret) {
+               close(fd);
+               return NULL;
+       }
+       memset(ret, 0, sizeof(XFILE));
+
+       ret->fd = fd;
+       ret->open_flags = f->open_flags;
+       x_setvbuf(ret, NULL, X_IOFBF, XBUFSIZE);
+       return ret;
+}
similarity index 98%
rename from source4/lib/util/xfile.h
rename to lib/util/xfile.h
index 2cc369d8d8efd749decb06530939fea97dd5c496..aa14b7c30a56d78c5a1f0de0822071aab5d29de1 100644 (file)
@@ -62,7 +62,7 @@ int x_fclose(XFILE *f);
 size_t x_fwrite(const void *p, size_t size, size_t nmemb, XFILE *f);
 
 /** thank goodness for asprintf() */
-int x_fileno(XFILE *f);
+int x_fileno(const XFILE *f);
 
 /** simulate fflush() */
 int x_fflush(XFILE *f);
similarity index 100%
rename from source4/lib/zlib/FAQ
rename to lib/zlib/FAQ
similarity index 100%
rename from source4/lib/zlib/INDEX
rename to lib/zlib/INDEX
similarity index 100%
rename from source4/lib/zlib/Makefile
rename to lib/zlib/Makefile
similarity index 100%
rename from source4/lib/zlib/README
rename to lib/zlib/README
similarity index 100%
rename from source4/lib/zlib/crc32.c
rename to lib/zlib/crc32.c
similarity index 100%
rename from source4/lib/zlib/crc32.h
rename to lib/zlib/crc32.h
similarity index 100%
rename from source4/lib/zlib/gzio.c
rename to lib/zlib/gzio.c
similarity index 100%
rename from source4/lib/zlib/trees.c
rename to lib/zlib/trees.c
similarity index 100%
rename from source4/lib/zlib/trees.h
rename to lib/zlib/trees.h
similarity index 100%
rename from source4/lib/zlib/zconf.h
rename to lib/zlib/zconf.h
similarity index 100%
rename from source4/lib/zlib/zlib.h
rename to lib/zlib/zlib.h
similarity index 87%
rename from source4/lib/zlib.m4
rename to lib/zlib/zlib.m4
index 9ee7b8e49e87d2709533f46b33faeb64758fa60b..32d747c3884238de55a84da4f01f956f6209a5d2 100644 (file)
@@ -1,4 +1,4 @@
-
+AC_DEFUN([AC_ZLIB],[
 AC_CHECK_HEADERS(zlib.h)
 
 AC_CHECK_LIB_EXT(z, ZLIB_LIBS, zlibVersion)
@@ -21,7 +21,9 @@ AC_CACHE_CHECK([for zlib >= 1.2.3], samba_cv_zlib_1_2_3, [
 if test x"$ac_cv_header_zlib_h" = x"yes" -a \
        x"$ac_cv_lib_ext_z_zlibVersion" = x"yes" -a \
        x"$samba_cv_zlib_1_2_3" = x"yes"; then
-       SMB_EXT_LIB(ZLIB, [${ZLIB_LIBS}])
+       $1
 else
-       SMB_INCLUDE_MK(lib/zlib.mk)
+       $2
 fi
+])
+
similarity index 100%
rename from source4/lib/zlib/zutil.c
rename to lib/zlib/zutil.c
similarity index 100%
rename from source4/lib/zlib/zutil.h
rename to lib/zlib/zutil.h
index 37bf0fc8f121a4af0e75ae3b0c0105953a809c0a..77f9cbd45c39c908e35ee8d5421bd31102612b47 100644 (file)
@@ -234,11 +234,11 @@ _PUBLIC_ struct composite_context *nbt_name_refresh_wins_send(struct nbt_name_so
        if (state->io == NULL) goto failed;
 
        state->wins_port = io->in.wins_port;
-       state->wins_servers = str_list_copy(state, io->in.wins_servers);
+       state->wins_servers = (const char **)str_list_copy(state, io->in.wins_servers);
        if (state->wins_servers == NULL ||
            state->wins_servers[0] == NULL) goto failed;
 
-       state->addresses = str_list_copy(state, io->in.addresses);
+       state->addresses = (const char **)str_list_copy(state, io->in.addresses);
        if (state->addresses == NULL ||
            state->addresses[0] == NULL) goto failed;
 
index d4728a8e021d3e693de37da044d24f9a941e3404..d9e616feccb816dc07923def29fc8df186988a4d 100644 (file)
@@ -372,11 +372,11 @@ _PUBLIC_ struct composite_context *nbt_name_register_wins_send(struct nbt_name_s
        if (state->io == NULL) goto failed;
 
        state->wins_port = io->in.wins_port;
-       state->wins_servers = str_list_copy(state, io->in.wins_servers);
+       state->wins_servers = (const char **)str_list_copy(state, io->in.wins_servers);
        if (state->wins_servers == NULL ||
            state->wins_servers[0] == NULL) goto failed;
 
-       state->addresses = str_list_copy(state, io->in.addresses);
+       state->addresses = (const char **)str_list_copy(state, io->in.addresses);
        if (state->addresses == NULL ||
            state->addresses[0] == NULL) goto failed;
 
index 57531d2e7b404fa4982bf2880dad696d6fcc18b6..520e9d978a014758c319f1b5b23f6a60eb1e3b0d 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "includes.h"
 #include "lib/events/events.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "../libcli/nbt/libnbt.h"
 #include "lib/socket/socket.h"
 #include "librpc/gen_ndr/ndr_nbt.h"
similarity index 99%
rename from source4/librpc/idl/drsblobs.idl
rename to librpc/idl/drsblobs.idl
index 4274d2000a10f2d6ab6bc7bcfc3a728f310fb7a8..087f0c982ddf52595da9deeb0eb57bb7c199f730 100644 (file)
@@ -332,7 +332,7 @@ interface drsblobs {
                );
 
        typedef [public] struct {
-               [flag(STR_NOTERM|NDR_REMAINING)] string cleartext;
+               [flag(NDR_REMAINING)] DATA_BLOB cleartext;
        } package_PrimaryCLEARTEXTBlob;
 
        void decode_PrimaryCLEARTEXT(
similarity index 98%
rename from source3/librpc/idl/drsuapi.idl
rename to librpc/idl/drsuapi.idl
index df6dcba23ab4dc27c2b7198b0faa5eed53f3844b..e4b5dc1fd9a99fe139c449e3fadf956831236c7b 100644 (file)
@@ -2,13 +2,13 @@
 
 import "security.idl", "misc.idl", "samr.idl";
 
-[ 
+[
   uuid("e3514235-4b06-11d1-ab04-00c04fc2dcd2"),
   version(4.0),
   endpoint("ncacn_np:[\\pipe\\lsass]","ncacn_np:[\\pipe\\protected_storage]", "ncacn_ip_tcp:", "ncalrpc:"),
   authservice("ldap"),
   helpstring("Active Directory Replication"),
-  helper("librpc/ndr/ndr_drsuapi.h"),
+  helper("../librpc/ndr/ndr_drsuapi.h"),
   pointer_default(unique)
 ]
 interface drsuapi
@@ -115,11 +115,11 @@ interface drsuapi
        } drsuapi_DsBindInfoCtr;
 
        /* this is a magic guid you need to pass to DsBind to make drsuapi_DsWriteAccountSpn() work
-        * 
+        *
         * maybe the bind_guid could also be the invocation_id see drsuapi_DsReplicaConnection04
         */
        const char *DRSUAPI_DS_BIND_GUID = "e24d201a-4fd6-11d1-a3da-0000f875ae0d";
-       /* 
+       /*
         * this magic guid are needed to fetch the whole tree with drsuapi_DsGetNCChanges()
         * as administrator and this values are also used in the destination_dsa_guid field
         * of drsuapi_DsGetNCChangesReq5/8 and the source_dsa_guid is zero.
@@ -232,7 +232,7 @@ interface drsuapi
                DRSUAPI_DS_REPLICA_NEIGHBOUR_PREEMPTED                          = 0x01000000,
                DRSUAPI_DS_REPLICA_NEIGHBOUR_IGNORE_CHANGE_NOTIFICATIONS        = 0x04000000,
                DRSUAPI_DS_REPLICA_NEIGHBOUR_DISABLE_SCHEDULED_SYNC             = 0x08000000,
-               /* 
+               /*
                 * the following NOTE applies to DsGetNCChangesRequest5:
                 *  - the data is only compressed when 10 or more objects are replicated
                 *  - but there could also be a size limit of 35 KBytes or something like that
@@ -454,7 +454,7 @@ interface drsuapi
                DRSUAPI_ATTRIBUTE_objectCategory                = 0x0009030e,
                DRSUAPI_ATTRIBUTE_gPLink                        = 0x0009037b,
                DRSUAPI_ATTRIBUTE_msDS_Behavior_Version         = 0x000905b3,
-               DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber         = 0x000906f6,           
+               DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber         = 0x000906f6,
                DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs             = 0x0009071c,
                DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs             = 0x0009072c
        } drsuapi_DsAttributeId;
@@ -629,36 +629,44 @@ interface drsuapi
                WERROR drs_error;
        } drsuapi_DsGetNCChangesCtr6;
 
-       typedef struct {
+       typedef [public] struct {
+               [subcontext(0xFFFFFC01)] drsuapi_DsGetNCChangesCtr1 ctr1;
+       } drsuapi_DsGetNCChangesCtr1TS;
+
+       typedef [public] struct {
+               [subcontext(0xFFFFFC01)] drsuapi_DsGetNCChangesCtr6 ctr6;
+       } drsuapi_DsGetNCChangesCtr6TS;
+
+       typedef [nopush] struct {
                uint32 decompressed_length;
                uint32 compressed_length;
                [subcontext(4),subcontext_size(compressed_length),
                 compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length)]
-                drsuapi_DsGetNCChangesCtr1 *ctr1;
+                drsuapi_DsGetNCChangesCtr1TS *ts;
        } drsuapi_DsGetNCChangesMSZIPCtr1;
 
-       typedef struct {
+       typedef [nopush] struct {
                uint32 decompressed_length;
                uint32 compressed_length;
                [subcontext(4),subcontext_size(compressed_length),
                 compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length)]
-                drsuapi_DsGetNCChangesCtr6 *ctr6;
+                drsuapi_DsGetNCChangesCtr6TS *ts;
        } drsuapi_DsGetNCChangesMSZIPCtr6;
 
-       typedef struct {
+       typedef [nopush] struct {
                uint32 decompressed_length;
                uint32 compressed_length;
                [subcontext(4),subcontext_size(compressed_length),
                 compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length)]
-                drsuapi_DsGetNCChangesCtr1 *ctr1;
+                drsuapi_DsGetNCChangesCtr1TS *ts;
        } drsuapi_DsGetNCChangesXPRESSCtr1;
 
-       typedef struct {
+       typedef [nopush] struct {
                uint32 decompressed_length;
                uint32 compressed_length;
                [subcontext(4),subcontext_size(compressed_length),
                 compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length)]
-                drsuapi_DsGetNCChangesCtr6 *ctr6;
+                drsuapi_DsGetNCChangesCtr6TS *ts;
        } drsuapi_DsGetNCChangesXPRESSCtr6;
 
        typedef [enum16bit] enum {
@@ -674,13 +682,7 @@ interface drsuapi
        } drsuapi_DsGetNCChangesCompressedCtr;
 
        typedef struct {
-               /* 
-                * this is a bit ugly, as the compression depends on the flags
-                * in the DsBind(), but only w2k uses DsGetNCChangesReq5
-                * and will get DsGetNCChangesCtr2 replies, and w2k only knowns
-                * about MSZIP and level 1 replies
-                */
-               [switch_is(1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16))] drsuapi_DsGetNCChangesCompressedCtr ctr;
+               drsuapi_DsGetNCChangesMSZIPCtr1 mszip1;
        } drsuapi_DsGetNCChangesCtr2;
 
        typedef struct {
@@ -805,7 +807,7 @@ interface drsuapi
                [case(1)] drsuapi_DsGetMembershipsRequest1 req1;
        } drsuapi_DsGetMembershipsRequest;
 
-       WERROR drsuapi_DsGetMemberships(
+       [todo] WERROR drsuapi_DsGetMemberships(
                [in] policy_handle *bind_handle,
                [in] int32 level,
                [in,ref] [switch_is(level)] drsuapi_DsGetMembershipsRequest *req,
@@ -848,7 +850,7 @@ interface drsuapi
                [case(1)] drsuapi_DsGetNT4ChangeLogInfo1 info1;
        } drsuapi_DsGetNT4ChangeLogInfo;
 
-       WERROR drsuapi_DsGetNT4ChangeLog(
+       [todo] WERROR drsuapi_DsGetNT4ChangeLog(
                [in] policy_handle *bind_handle,
                [in] uint32 level,
                [in,ref] [switch_is(level)] drsuapi_DsGetNT4ChangeLogRequest *req,
@@ -878,7 +880,7 @@ interface drsuapi
        } drsuapi_DsNameFlags;
 
        typedef [v1_enum] enum {
-               DRSUAPI_DS_NAME_FORMAT_UKNOWN                   = 0,
+               DRSUAPI_DS_NAME_FORMAT_UNKNOWN                  = 0,
                DRSUAPI_DS_NAME_FORMAT_FQDN_1779                = 1,
                DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT              = 2,
                DRSUAPI_DS_NAME_FORMAT_DISPLAY                  = 3,
@@ -973,7 +975,7 @@ interface drsuapi
        typedef struct {
                [charset(UTF16),string] uint16 *server_dn;
                [charset(UTF16),string] uint16 *domain_dn;
-               uint32 unknown; /* 0x000000001 */
+               boolean32 commit;
        } drsuapi_DsRemoveDSServerRequest1;
 
        typedef [switch_type(int32)] union {
@@ -981,7 +983,7 @@ interface drsuapi
        } drsuapi_DsRemoveDSServerRequest;
 
        typedef struct {
-               WERROR status;
+               boolean32 last_dc_in_domain;
        } drsuapi_DsRemoveDSServerResult1;
 
        typedef [switch_type(int32)] union {
@@ -1142,7 +1144,7 @@ interface drsuapi
 
        /*
         * please note the the current idl
-        * for DsAddEntry does only parse 
+        * for DsAddEntry does only parse
         * what I saw between 2 w2k3 boxes
         * in my dssync experiments I got some other replies
         * so all I want to say is that this is very incomplete yet...
@@ -1554,7 +1556,6 @@ interface drsuapi
                [out,ref] [switch_is(*level_out)] drsuapi_DsGetMemberships2Ctr *ctr
                );
 
-
        /*****************/
         /* Function 0x16 */
        [todo] WERROR DRSUAPI_REPLICA_VERIFY_OBJECTS();
similarity index 94%
rename from source4/librpc/idl/initshutdown.idl
rename to librpc/idl/initshutdown.idl
index ac30be70ddb1c90bc95c72a58ffce06a84a284bd..02b2501c1dae7a51cc236ed83ae866eba0568ac0 100644 (file)
@@ -23,7 +23,7 @@ import "lsa.idl";
                [in,unique] lsa_StringLarge *message,
                [in] uint32 timeout,
                [in] uint8 force_apps,
-               [in] uint8 reboot
+               [in] uint8 do_reboot
        );
 
        WERROR initshutdown_Abort(
@@ -39,7 +39,7 @@ import "lsa.idl";
                [in,unique] lsa_StringLarge *message,
                [in] uint32 timeout,
                [in] uint8 force_apps,
-               [in] uint8 reboot,
+               [in] uint8 do_reboot,
                [in] uint32 reason
        );
 }
similarity index 88%
rename from source4/librpc/idl/misc.idl
rename to librpc/idl/misc.idl
index 791b86466ce7f1482f7d4701cda285d0c257a185..ff548fe804f60aacb5cad21c8f85c6b1ba8bae01 100644 (file)
@@ -51,10 +51,4 @@ interface misc
                SAMR_REJECT_COMPLEXITY = 5
        } samr_RejectReason;
 
-       /* id used to identify a endpoint, possibly in a cluster */
-       typedef [public] struct {
-               hyper id;
-               uint32 id2;
-               uint32 node;
-       } server_id;
 }
similarity index 98%
rename from source3/librpc/idl/notify.idl
rename to librpc/idl/notify.idl
index 6f9ad25f092e3e838768ec528c97057fbe84927a..3ce2f40ed87a9dd5000d23ed8969b474943650f7 100644 (file)
@@ -7,7 +7,7 @@
    the change notify buffers
 */
 
-import "misc.idl";
+import "security.idl";
 
 [
   pointer_default(unique)
similarity index 63%
rename from source3/librpc/idl/ntsvcs.idl
rename to librpc/idl/ntsvcs.idl
index cd71de58681d4b30e2949fe6c94f2a52f903dd0b..809ead90c3ceba306dcfa08d59407716c840ad70 100644 (file)
@@ -12,12 +12,12 @@ interface ntsvcs
        /******************/
        /* Function: 0x00 */
 
-       WERROR PNP_Disconnect();
+       [todo] WERROR PNP_Disconnect();
 
        /******************/
        /* Function: 0x01 */
 
-       WERROR PNP_Connect();
+       [todo] WERROR PNP_Connect();
 
        /******************/
        /* Function: 0x02 */
@@ -29,17 +29,17 @@ interface ntsvcs
        /******************/
        /* Function: 0x03 */
 
-       WERROR PNP_GetGlobalState();
+       [todo] WERROR PNP_GetGlobalState();
 
        /******************/
        /* Function: 0x04 */
 
-       WERROR PNP_InitDetection();
+       [todo] WERROR PNP_InitDetection();
 
        /******************/
        /* Function: 0x05 */
 
-       WERROR PNP_ReportLogOn();
+       [todo] WERROR PNP_ReportLogOn();
 
        /******************/
        /* Function: 0x06 */
@@ -52,22 +52,27 @@ interface ntsvcs
        /******************/
        /* Function: 0x07 */
 
-       WERROR PNP_GetRootDeviceInstance();
+       [todo] WERROR PNP_GetRootDeviceInstance();
 
        /******************/
        /* Function: 0x08 */
 
-       WERROR PNP_GetRelatedDeviceInstance();
+       [todo] WERROR PNP_GetRelatedDeviceInstance();
 
        /******************/
        /* Function: 0x09 */
 
-       WERROR PNP_EnumerateSubKeys();
+       [todo] WERROR PNP_EnumerateSubKeys();
 
        /******************/
        /* Function: 0x0a */
 
-       WERROR PNP_GetDeviceList();
+       [todo] WERROR PNP_GetDeviceList(
+               [in,unique] [string,charset(UTF16)] uint16 *filter,
+               [out,ref] [size_is(*length),length_is(*length)] uint16 *buffer,
+               [in,out,ref] uint32 *length,
+               [in] uint32 flags
+               );
 
        /******************/
        /* Function: 0x0b */
@@ -81,7 +86,7 @@ interface ntsvcs
        /******************/
        /* Function: 0x0c */
 
-       WERROR PNP_GetDepth();
+       [todo] WERROR PNP_GetDepth();
 
        /******************/
        /* Function: 0x0d */
@@ -91,142 +96,142 @@ interface ntsvcs
        WERROR PNP_GetDeviceRegProp(
                [in,ref] [string,charset(UTF16)] uint16 *devicepath,
                [in] uint32 property,
-               [in,out,ref] uint32 *unknown1,
+               [in,out,ref] uint32 *reg_data_type,
                [out,ref] [size_is(*buffer_size)] [length_is(*buffer_size)] uint8 *buffer,
                [in,out,ref] uint32 *buffer_size,
                [in,out,ref] uint32 *needed,
-               [in] uint32 unknown3
+               [in] uint32 flags
                );
 
        /******************/
        /* Function: 0x0e */
 
-       WERROR PNP_SetDeviceRegProp();
+       [todo] WERROR PNP_SetDeviceRegProp();
 
        /******************/
        /* Function: 0x0f */
 
-       WERROR PNP_GetClassInstance();
+       [todo] WERROR PNP_GetClassInstance();
 
        /******************/
        /* Function: 0x10 */
 
-       WERROR PNP_CreateKey();
+       [todo] WERROR PNP_CreateKey();
 
        /******************/
        /* Function: 0x11 */
 
-       WERROR PNP_DeleteRegistryKey();
+       [todo] WERROR PNP_DeleteRegistryKey();
 
        /******************/
        /* Function: 0x12 */
 
-       WERROR PNP_GetClassCount();
+       [todo] WERROR PNP_GetClassCount();
 
        /******************/
        /* Function: 0x13 */
 
-       WERROR PNP_GetClassName();
+       [todo] WERROR PNP_GetClassName();
 
        /******************/
        /* Function: 0x14 */
 
-       WERROR PNP_DeleteClassKey();
+       [todo] WERROR PNP_DeleteClassKey();
 
        /******************/
        /* Function: 0x15 */
 
-       WERROR PNP_GetInterfaceDeviceAlias();
+       [todo] WERROR PNP_GetInterfaceDeviceAlias();
 
        /******************/
        /* Function: 0x16 */
 
-       WERROR PNP_GetInterfaceDeviceList();
+       [todo] WERROR PNP_GetInterfaceDeviceList();
 
        /******************/
        /* Function: 0x17 */
 
-       WERROR PNP_GetInterfaceDeviceListSize();
+       [todo] WERROR PNP_GetInterfaceDeviceListSize();
 
        /******************/
        /* Function: 0x18 */
 
-       WERROR PNP_RegisterDeviceClassAssociation();
+       [todo] WERROR PNP_RegisterDeviceClassAssociation();
 
        /******************/
        /* Function: 0x19 */
 
-       WERROR PNP_UnregisterDeviceClassAssociation();
+       [todo] WERROR PNP_UnregisterDeviceClassAssociation();
 
        /******************/
        /* Function: 0x1a */
 
-       WERROR PNP_GetClassRegProp();
+       [todo] WERROR PNP_GetClassRegProp();
 
        /******************/
        /* Function: 0x1b */
 
-       WERROR PNP_SetClassRegProp();
+       [todo] WERROR PNP_SetClassRegProp();
 
        /******************/
        /* Function: 0x1c */
 
-       WERROR PNP_CreateDevInst();
+       [todo] WERROR PNP_CreateDevInst();
 
        /******************/
        /* Function: 0x1d */
 
-       WERROR PNP_DeviceInstanceAction();
+       [todo] WERROR PNP_DeviceInstanceAction();
 
        /******************/
        /* Function: 0x1e */
 
-       WERROR PNP_GetDeviceStatus();
+       [todo] WERROR PNP_GetDeviceStatus();
 
        /******************/
        /* Function: 0x1f */
 
-       WERROR PNP_SetDeviceProblem();
+       [todo] WERROR PNP_SetDeviceProblem();
 
        /******************/
        /* Function: 0x20 */
 
-       WERROR PNP_DisableDevInst();
+       [todo] WERROR PNP_DisableDevInst();
 
        /******************/
        /* Function: 0x21 */
 
-       WERROR PNP_UninstallDevInst();
+       [todo] WERROR PNP_UninstallDevInst();
 
        /******************/
        /* Function: 0x22 */
 
-       WERROR PNP_AddID();
+       [todo] WERROR PNP_AddID();
 
        /******************/
        /* Function: 0x23 */
 
-       WERROR PNP_RegisterDriver();
+       [todo] WERROR PNP_RegisterDriver();
 
        /******************/
        /* Function: 0x24 */
 
-       WERROR PNP_QueryRemove();
+       [todo] WERROR PNP_QueryRemove();
 
        /******************/
        /* Function: 0x25 */
 
-       WERROR PNP_RequestDeviceEject();
+       [todo] WERROR PNP_RequestDeviceEject();
 
        /******************/
        /* Function: 0x26 */
 
-       WERROR PNP_IsDockStationPresent();
+       [todo] WERROR PNP_IsDockStationPresent();
 
        /******************/
        /* Function: 0x27 */
 
-       WERROR PNP_RequestEjectPC();
+       [todo] WERROR PNP_RequestEjectPC();
 
        /******************/
        /* Function: 0x28 */
@@ -262,115 +267,115 @@ interface ntsvcs
        /******************/
        /* Function: 0x2a */
 
-       WERROR PNP_AddEmptyLogConf();
+       [todo] WERROR PNP_AddEmptyLogConf();
 
        /******************/
        /* Function: 0x2b */
 
-       WERROR PNP_FreeLogConf();
+       [todo] WERROR PNP_FreeLogConf();
 
        /******************/
        /* Function: 0x2c */
 
-       WERROR PNP_GetFirstLogConf();
+       [todo] WERROR PNP_GetFirstLogConf();
 
        /******************/
        /* Function: 0x2d */
 
-       WERROR PNP_GetNextLogConf();
+       [todo] WERROR PNP_GetNextLogConf();
 
        /******************/
        /* Function: 0x2e */
 
-       WERROR PNP_GetLogConfPriority();
+       [todo] WERROR PNP_GetLogConfPriority();
 
        /******************/
        /* Function: 0x2f */
 
-       WERROR PNP_AddResDes();
+       [todo] WERROR PNP_AddResDes();
 
        /******************/
        /* Function: 0x30 */
 
-       WERROR PNP_FreeResDes();
+       [todo] WERROR PNP_FreeResDes();
 
        /******************/
        /* Function: 0x31 */
 
-       WERROR PNP_GetNextResDes();
+       [todo] WERROR PNP_GetNextResDes();
 
        /******************/
        /* Function: 0x32 */
 
-       WERROR PNP_GetResDesData();
+       [todo] WERROR PNP_GetResDesData();
 
        /******************/
        /* Function: 0x33 */
 
-       WERROR PNP_GetResDesDataSize();
+       [todo] WERROR PNP_GetResDesDataSize();
 
        /******************/
        /* Function: 0x34 */
 
-       WERROR PNP_ModifyResDes();
+       [todo] WERROR PNP_ModifyResDes();
 
        /******************/
        /* Function: 0x35 */
 
-       WERROR PNP_DetectResourceLimit();
+       [todo] WERROR PNP_DetectResourceLimit();
 
        /******************/
        /* Function: 0x36 */
 
-       WERROR PNP_QueryResConfList();
+       [todo] WERROR PNP_QueryResConfList();
 
        /******************/
        /* Function: 0x37 */
 
-       WERROR PNP_SetHwProf();
+       [todo] WERROR PNP_SetHwProf();
 
        /******************/
        /* Function: 0x38 */
 
-       WERROR PNP_QueryArbitratorFreeData();
+       [todo] WERROR PNP_QueryArbitratorFreeData();
 
        /******************/
        /* Function: 0x39 */
 
-       WERROR PNP_QueryArbitratorFreeSize();
+       [todo] WERROR PNP_QueryArbitratorFreeSize();
 
        /******************/
        /* Function: 0x3a */
 
-       WERROR PNP_RunDetection();
+       [todo] WERROR PNP_RunDetection();
 
        /******************/
        /* Function: 0x3b */
 
-       WERROR PNP_RegisterNotification();
+       [todo] WERROR PNP_RegisterNotification();
 
        /******************/
        /* Function: 0x3c */
 
-       WERROR PNP_UnregisterNotification();
+       [todo] WERROR PNP_UnregisterNotification();
 
        /******************/
        /* Function: 0x3d */
 
-       WERROR PNP_GetCustomDevProp();
+       [todo] WERROR PNP_GetCustomDevProp();
 
        /******************/
        /* Function: 0x3e */
 
-       WERROR PNP_GetVersionInternal();
+       [todo] WERROR PNP_GetVersionInternal();
 
        /******************/
        /* Function: 0x3f */
 
-       WERROR PNP_GetBlockedDriverInfo();
+       [todo] WERROR PNP_GetBlockedDriverInfo();
 
        /******************/
        /* Function: 0x40 */
 
-       WERROR PNP_GetServerSideDeviceInstallFlags();
+       [todo] WERROR PNP_GetServerSideDeviceInstallFlags();
 }
similarity index 95%
rename from source3/librpc/idl/security.idl
rename to librpc/idl/security.idl
index c1dfe272e939c40479e7377f0459c7c834730ab8..6704e300a5108e4618b349f033a11bc69c863e6e 100644 (file)
@@ -106,6 +106,9 @@ interface security
        const int SEC_ADS_LIST_OBJECT      = 0x00000080;
        const int SEC_ADS_CONTROL_ACCESS   = 0x00000100;
 
+       /* invalid bits */
+       const int SEC_MASK_INVALID         = 0x0ce0fe00;
+
        /* generic->specific mappings for files */
        const int SEC_RIGHTS_FILE_READ    = SEC_STD_READ_CONTROL | 
                                            SEC_STD_SYNCHRONIZE | 
@@ -150,6 +153,7 @@ interface security
        const string SID_CREATOR_OWNER_DOMAIN = "S-1-3";
        const string SID_CREATOR_OWNER        = "S-1-3-0";
        const string SID_CREATOR_GROUP        = "S-1-3-1";
+       const string SID_OWNER_RIGHTS         = "S-1-3-4";
 
        /* SECURITY_NT_AUTHORITY */
        const string NAME_NT_AUTHORITY            = "NT AUTHORITY";
@@ -169,9 +173,14 @@ interface security
        const string SID_NT_TERMINAL_SERVER_USERS = "S-1-5-13";
        const string SID_NT_REMOTE_INTERACTIVE    = "S-1-5-14";
        const string SID_NT_THIS_ORGANISATION     = "S-1-5-15";
+       const string SID_NT_IUSR                  = "S-1-5-17";
        const string SID_NT_SYSTEM                = "S-1-5-18";
        const string SID_NT_LOCAL_SERVICE         = "S-1-5-19";
        const string SID_NT_NETWORK_SERVICE       = "S-1-5-20";
+       const string SID_NT_DIGEST_AUTHENTICATION = "S-1-5-64-21";
+       const string SID_NT_NTLM_AUTHENTICATION   = "S-1-5-64-10";
+       const string SID_NT_SCHANNEL_AUTHENTICATION = "S-1-5-64-14";
+       const string SID_NT_OTHER_ORGANISATION    = "S-1-5-1000";
 
        /* SECURITY_BUILTIN_DOMAIN_RID */
        const string NAME_BUILTIN                  = "BUILTIN";
@@ -233,6 +242,7 @@ interface security
                SEC_PRIV_REMOTE_INTERACTIVE_LOGON  = 24
        } sec_privilege;
 
+
        typedef [bitmap8bit] bitmap {
                SEC_ACE_FLAG_OBJECT_INHERIT             = 0x01,
                SEC_ACE_FLAG_CONTAINER_INHERIT          = 0x02,
@@ -373,4 +383,12 @@ interface security
                SECINFO_PROTECTED_SACL       = 0x40000000,
                SECINFO_PROTECTED_DACL       = 0x80000000
        } security_secinfo;
+
+       typedef [public,bitmap32bit] bitmap {
+               KERB_ENCTYPE_DES_CBC_CRC             = 0x00000001,
+               KERB_ENCTYPE_DES_CBC_MD5             = 0x00000002,
+               KERB_ENCTYPE_RC4_HMAC_MD5            = 0x00000004,
+               KERB_ENCTYPE_AES128_CTS_HMAC_SHA1_96 = 0x00000008,
+               KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96 = 0x00000010
+       } kerb_EncTypes;
 }
similarity index 96%
rename from source3/librpc/idl/svcctl.idl
rename to librpc/idl/svcctl.idl
index d1289a64d7c16c8df07fe953b2a7b360f82d9824..3eb686fe15bfd0fa9c968d9623f2d774dfa81e1c 100644 (file)
@@ -92,7 +92,7 @@ import "misc.idl";
        typedef enum {
                FIXME=1
        } SERVICE_CONTROL;
-       
+
        WERROR svcctl_ControlService(
                [in,ref] policy_handle *handle,
                [in] uint32 control,
@@ -266,11 +266,24 @@ import "misc.idl";
 
        /*****************/
        /* Function 0x11 */
+
+       typedef [public,gensize] struct {
+               uint32 service_type;
+               uint32 start_type;
+               uint32 error_control;
+               [string,charset(UTF16)] [range(0,8192)] uint16 *executablepath;
+               [string,charset(UTF16)] [range(0,8192)] uint16 *loadordergroup;
+               uint32 tag_id;
+               [string,charset(UTF16)] [range(0,8192)] uint16 *dependencies;
+               [string,charset(UTF16)] [range(0,8192)] uint16 *startname;
+               [string,charset(UTF16)] [range(0,8192)] uint16 *displayname;
+       } QUERY_SERVICE_CONFIG;
+
        WERROR svcctl_QueryServiceConfigW(
                [in,ref] policy_handle *handle,
-               [out] uint8 query[buf_size], /*QUERY_SERVICE_CONFIG */
-               [in] uint32 buf_size,
-               [out,ref] uint32 *bytes_needed
+               [out] QUERY_SERVICE_CONFIG *query,
+               [in] [range(0,8192)] uint32 buf_size,
+               [out,ref] [range(0,8192)] uint32 *bytes_needed
        );
 
        /*****************/
@@ -297,7 +310,7 @@ import "misc.idl";
                [in,unique] [string,charset(UTF16)] uint16 *service_name,
                [out,ref] [string,charset(UTF16)] uint16 **display_name,
                [in,out,unique] uint32 *display_name_length
-       ); 
+       );
 
        /*****************/
        /* Function 0x15 */
@@ -374,7 +387,7 @@ import "misc.idl";
                [out,ref] uint32 *services_returned,
                [in,out,unique] uint32 *resume_handle
        );
-       
+
        /*****************/
        /* Function 0x1b */
        WERROR svcctl_OpenSCManagerA(
@@ -425,7 +438,7 @@ import "misc.idl";
                [in,unique] [string,charset(UTF16)] uint16 *service_name,
                [out,ref] [string,charset(UTF16)] uint16 **display_name,
                [in,out,unique] uint32 *display_name_length
-       ); 
+       );
 
        /*****************/
        /* Function 0x21 */
similarity index 95%
rename from source4/librpc/idl/xattr.idl
rename to librpc/idl/xattr.idl
index ba0123aed05c9095133ca8dfe316636a9de9a6d5..c1af4791ae7a0388d0628300cd76885af36f0bba 100644 (file)
@@ -75,6 +75,12 @@ interface xattr
                [size_is(num_eas)] xattr_EA *eas;
        } xattr_DosEAs;
 
+       /* Slightly different version, used by the vfs_xattr_tdb module */
+       typedef [public] struct {
+               uint32 num_eas;
+               xattr_EA eas[num_eas];
+       } tdb_xattrs;
+
        /* we store stream information in this xattr structure. Then
           the streams themselves are stored in
           user.DosStream.STREAMNAME or in external files, according
similarity index 100%
rename from source4/librpc/ndr.pc.in
rename to librpc/ndr.pc.in
similarity index 96%
rename from source4/librpc/ndr/libndr.h
rename to librpc/ndr/libndr.h
index 3f4de7801a4d0c076148d0b1d125d01d4ca179d8..63b89e17f4674ec82228af2f7b6d87d152a78995 100644 (file)
 #define __LIBNDR_H__
 
 #include <talloc.h>
-#include "lib/util/util.h" /* for discard_const */
 #include <sys/time.h>
+#if _SAMBA_BUILD_ == 4
+#include "../lib/util/util.h" /* for discard_const */
 #include "lib/charset/charset.h"
+#endif
 
 /*
   this provides definitions for the libcli/rpc/ MSRPC library
@@ -152,6 +154,14 @@ struct ndr_print {
 #define NDR_PRINT_OUT_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_OUT, p)
 #define NDR_PRINT_IN_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_IN | NDR_SET_VALUES, p)
 
+/* useful macro for debugging in strings */
+#define NDR_PRINT_STRUCT_STRING(ctx, type, p) ndr_print_struct_string(ctx, (ndr_print_fn_t)ndr_print_ ##type, #p, p)
+#define NDR_PRINT_UNION_STRING(ctx, type, level, p) ndr_print_union_string(ctx, (ndr_print_fn_t)ndr_print_ ##type, #p, level, p)
+#define NDR_PRINT_FUNCTION_STRING(ctx, type, flags, p) ndr_print_function_string(ctx, (ndr_print_function_t)ndr_print_ ##type, #type, flags, p)
+#define NDR_PRINT_BOTH_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_BOTH, p)
+#define NDR_PRINT_OUT_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_OUT, p)
+#define NDR_PRINT_IN_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_IN | NDR_SET_VALUES, p)
+
 #define NDR_BE(ndr) (((ndr)->flags & (LIBNDR_FLAG_BIGENDIAN|LIBNDR_FLAG_LITTLE_ENDIAN)) == LIBNDR_FLAG_BIGENDIAN)
 
 enum ndr_err_code {
@@ -292,7 +302,9 @@ typedef enum ndr_err_code (*ndr_pull_flags_fn_t)(struct ndr_pull *, int ndr_flag
 typedef void (*ndr_print_fn_t)(struct ndr_print *, const char *, const void *);
 typedef void (*ndr_print_function_t)(struct ndr_print *, const char *, int, const void *);
 
+#if _SAMBA_BUILD_ == 4
 #include "libcli/util/error.h"
+#endif
 #include "librpc/gen_ndr/misc.h"
 
 extern const struct ndr_syntax_id ndr_transfer_syntax;
similarity index 98%
rename from source4/librpc/ndr/ndr.c
rename to librpc/ndr/ndr.c
index c5e4c447942ffe6f5ca533efd3f8e30b39c609be..2f1daeaeb5ac2982aec61787d99d7ecad0b9c0a2 100644 (file)
 
 #include "includes.h"
 #include "librpc/ndr/libndr.h"
-#include "lib/util/dlinklist.h"
-#include "librpc/gen_ndr/dcerpc.h"
+#include "../lib/util/dlinklist.h"
+#if _SAMBA_BUILD_ == 4
 #include "param/param.h"
+#endif
 
 #define NDR_BASE_MARSHALL_SIZE 1024
 
@@ -163,16 +164,20 @@ _PUBLIC_ enum ndr_err_code ndr_push_expand(struct ndr_push *ndr, uint32_t extra_
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_debug_helper(struct ndr_print *ndr, const char *format, ...)
+_PUBLIC_ void ndr_print_debug_helper(struct ndr_print *ndr, const char *format, ...) 
 {
        va_list ap;
        char *s = NULL;
-       int i;
+       int i, ret;
 
        va_start(ap, format);
-       vasprintf(&s, format, ap);
+       ret = vasprintf(&s, format, ap);
        va_end(ap);
 
+       if (ret == -1) {
+               return;
+       }
+
        for (i=0;i<ndr->depth;i++) {
                DEBUGADD(0,("    "));
        }
@@ -350,12 +355,17 @@ _PUBLIC_ enum ndr_err_code ndr_pull_error(struct ndr_pull *ndr,
 {
        char *s=NULL;
        va_list ap;
+       int ret;
 
        va_start(ap, format);
-       vasprintf(&s, format, ap);
+       ret = vasprintf(&s, format, ap);
        va_end(ap);
 
-       DEBUG(3,("ndr_pull_error(%u): %s\n", ndr_err, s));
+       if (ret == -1) {
+               return NDR_ERR_ALLOC;
+       }
+
+       DEBUG(1,("ndr_pull_error(%u): %s\n", ndr_err, s));
 
        free(s);
 
@@ -367,16 +377,21 @@ _PUBLIC_ enum ndr_err_code ndr_pull_error(struct ndr_pull *ndr,
 */
 _PUBLIC_ enum ndr_err_code ndr_push_error(struct ndr_push *ndr,
                                 enum ndr_err_code ndr_err,
-                                const char *format, ...)
+                                const char *format, ...) 
 {
        char *s=NULL;
        va_list ap;
+       int ret;
 
        va_start(ap, format);
-       vasprintf(&s, format, ap);
+       ret = vasprintf(&s, format, ap);
        va_end(ap);
 
-       DEBUG(3,("ndr_push_error(%u): %s\n", ndr_err, s));
+       if (ret == -1) {
+               return NDR_ERR_ALLOC;
+       }
+
+       DEBUG(1,("ndr_push_error(%u): %s\n", ndr_err, s));
 
        free(s);
 
similarity index 99%
rename from source4/librpc/ndr/ndr_compression.c
rename to librpc/ndr/ndr_compression.c
index 05a80e20b2cc112699f37ab68212f0bdf3a09cab..afd397e2a2308b5a0e674f9043ba99bd08f00436 100644 (file)
@@ -23,7 +23,7 @@
 #include "includes.h"
 #include "../lib/compression/lzxpress.h"
 #include "librpc/ndr/libndr.h"
-#include "librpc/ndr/ndr_compression.h"
+#include "../librpc/ndr/ndr_compression.h"
 #include <zlib.h>
 
 static voidpf ndr_zlib_alloc(voidpf opaque, uInt items, uInt size)
similarity index 78%
rename from source3/librpc/ndr/ndr_compression.h
rename to librpc/ndr/ndr_compression.h
index 4cebbe190c11d5afdb53c38db56f254223fda3e9..b939f6a42badabf2af52b3d29176c78e100c4467 100644 (file)
@@ -5,25 +5,9 @@
 #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)
 /* This file was automatically generated by mkproto.pl. DO NOT EDIT */
 
-#ifndef _PUBLIC_
-#define _PUBLIC_
-#endif
-
-#ifndef _PURE_
-#define _PURE_
-#endif
-
-#ifndef _NORETURN_
-#define _NORETURN_
-#endif
-
-#ifndef _DEPRECATED_
-#define _DEPRECATED_
-#endif
-
-#ifndef _WARN_UNUSED_RESULT_
-#define _WARN_UNUSED_RESULT_
-#endif
+/* this file contains prototypes for functions that are private 
+ * to this subsystem or library. These functions should not be 
+ * used outside this particular subsystem! */
 
 
 /* The following definitions come from librpc/ndr/ndr_compression.c  */
@@ -37,11 +21,11 @@ enum ndr_err_code ndr_pull_compression_end(struct ndr_pull *subndr,
                                  enum ndr_compression_alg compression_alg,
                                  ssize_t decompressed_len);
 enum ndr_err_code ndr_push_compression_start(struct ndr_push *subndr,
-                                   struct ndr_push **_comndr,
+                                   struct ndr_push **_uncomndr,
                                    enum ndr_compression_alg compression_alg,
                                    ssize_t decompressed_len);
 enum ndr_err_code ndr_push_compression_end(struct ndr_push *subndr,
-                                 struct ndr_push *comndr,
+                                 struct ndr_push *uncomndr,
                                  enum ndr_compression_alg compression_alg,
                                  ssize_t decompressed_len);
 #undef _PRINTF_ATTRIBUTE
similarity index 97%
rename from source4/librpc/ndr/ndr_drsuapi.c
rename to librpc/ndr/ndr_drsuapi.c
index e77ab54071eae0f3511d51741c06400e97b9660b..38474c254060d69ab3f4ad8f367f0cbfc1b6bbab 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
 
    routines for printing some linked list structs in DRSUAPI
@@ -9,12 +9,12 @@
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 #include "includes.h"
 #include "librpc/gen_ndr/ndr_drsuapi.h"
 #include "librpc/gen_ndr/ndr_misc.h"
-#include "lib/util/asn1.h"
+#include "../lib/util/asn1.h"
 #include "librpc/ndr/ndr_compression.h"
 
-void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char *name, 
+void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char *name,
                                               const struct drsuapi_DsReplicaObjectListItem *r)
 {
        ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectListItem");
@@ -91,8 +91,12 @@ enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_fl
                if (r->oid) {
                        DATA_BLOB blob;
 
+#if (_SAMBA_BUILD_ == 3)
+                       if (StrnCaseCmp("ff", r->oid, 2) == 0) {
+#else
                        if (strncasecmp("ff", r->oid, 2) == 0) {
-                               blob = strhex_to_data_blob(r->oid);
+#endif
+                               blob = strhex_to_data_blob(ndr, r->oid);
                                if (!blob.data) {
                                        return ndr_push_error(ndr, NDR_ERR_SUBCONTEXT,
                                                              "HEX String Conversion Error: %s\n",
@@ -101,7 +105,6 @@ enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_fl
                        } else {
                                _OID_PUSH_CHECK(ber_write_OID_String(&blob, r->oid));
                        }
-                       talloc_steal(ndr, blob.data);
 
                        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, blob.length));
                        NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, blob.data, blob.length));
@@ -164,8 +167,12 @@ size_t ndr_size_drsuapi_DsReplicaOID_oid(const char *oid, int flags)
 
        if (!oid) return 0;
 
+#if (_SAMBA_BUILD_ == 3)
+       if (StrnCaseCmp("ff", oid, 2) == 0) {
+#else
        if (strncasecmp("ff", oid, 2) == 0) {
-               _blob = strhex_to_data_blob(oid);
+#endif
+               _blob = strhex_to_data_blob(NULL, oid);
                if (_blob.data) {
                        ret = _blob.length;
                }
similarity index 97%
rename from source4/librpc/ndr/ndr_drsuapi.h
rename to librpc/ndr/ndr_drsuapi.h
index c663eadd7ac63fb8641dcf20a3fd5134312d2e72..12c2c78bdea8fa1813cd5c05ca036c1f06c8b3b0 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
 
    routines for printing some linked list structs in DRSUAPI
@@ -9,12 +9,12 @@
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
@@ -22,7 +22,7 @@
 #ifndef _LIBRPC_NDR_NDR_DRSUAPI_H
 #define _LIBRPC_NDR_NDR_DRSUAPI_H
 
-void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char *name, 
+void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char *name,
                                               const struct drsuapi_DsReplicaObjectListItem *r);
 
 void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const char *name,
similarity index 100%
rename from source4/librpc/ndr/uuid.c
rename to librpc/ndr/uuid.c
similarity index 99%
rename from source4/librpc/rpc/binding.c
rename to librpc/rpc/binding.c
index bfe62c405418ee734ac07a4533e1003f51dfa339..b755431034ab7ccae503f0abcd841638de28a93d 100644 (file)
 */
 
 #include "includes.h"
-#include "lib/events/events.h"
-#include "librpc/gen_ndr/ndr_epmapper_c.h"
-#include "librpc/gen_ndr/ndr_dcerpc.h"
+#include "librpc/gen_ndr/ndr_epmapper.h"
 #include "librpc/gen_ndr/ndr_misc.h"
+#include "librpc/rpc/dcerpc.h"
+#undef strcasecmp
 
 #define MAX_PROTSEQ            10
 
similarity index 97%
rename from source4/librpc/tools/ndrdump.c
rename to librpc/tools/ndrdump.c
index bc1436916f62de52477029622a23703104d8e0e4..b24868eaced3a9c8b79aa040cef207d648b27d9b 100644 (file)
@@ -291,11 +291,7 @@ static void ndrdump_data(uint8_t *d, uint32_t l, bool force)
                        exit(1);
                }
                        
-#if (_SAMBA_BUILD_ >= 4)
-               data = (uint8_t *)file_load(ctx_filename, &size, mem_ctx);
-#else
-               data = (uint8_t *)file_load(ctx_filename, &size, 0);
-#endif
+               data = (uint8_t *)file_load(ctx_filename, &size, 0, mem_ctx);
                if (!data) {
                        perror(ctx_filename);
                        exit(1);
@@ -322,11 +318,7 @@ static void ndrdump_data(uint8_t *d, uint32_t l, bool force)
        } 
 
        if (filename)
-#if (_SAMBA_BUILD_ >= 4)
-               data = (uint8_t *)file_load(filename, &size, mem_ctx);
-#else
-               data = (uint8_t *)file_load(filename, &size, 0);
-#endif
+               data = (uint8_t *)file_load(filename, &size, 0, mem_ctx);
        else
                data = (uint8_t *)stdin_load(mem_ctx, &size);
 
index c49cdfb795cac9139dd3cfbf548a70d4f18a5ceb..b323a6a98aad143b7b6409bbc4c8a122c918b481 100644 (file)
@@ -57,11 +57,18 @@ sub ODL2IDL
                if ($x->{TYPE} eq "IMPORT") {
                        foreach my $idl_file (@{$x->{PATHS}}) {
                                $idl_file = unmake_str($idl_file);
-                               unless (-f "$basedir/$idl_file") {
+                               my $idl_path = undef;
+                               foreach ($basedir, @$opt_incdirs) {
+                                       if (-f "$_/$idl_file") {
+                                               $idl_path = "$_/$idl_file";
+                                               last;
+                                       }
+                               }
+                               unless ($idl_path) {
                                        error($x, "Unable to open include file `$idl_file'");
                                        next;
                                }
-                               my $podl = Parse::Pidl::IDL::parse_file("$basedir/$idl_file", $opt_incdirs);
+                               my $podl = Parse::Pidl::IDL::parse_file($idl_path, $opt_incdirs);
                                if (defined(@$podl)) {
                                        require Parse::Pidl::Typelist;
 
@@ -74,7 +81,7 @@ sub ODL2IDL
                                                }
                                        }
                                } else {
-                                       error($x, "Failed to parse $idl_file");
+                                       error($x, "Failed to parse $idl_path");
                                }
                        }
                }
index c565d8a572968dee6ca62ade97e3f10d236f3d97..6034fb6f160ecdef84152cc2612f3282638cd1b5 100644 (file)
@@ -171,7 +171,7 @@ sub ParseFunction($$)
        pidl "\tNDR_PRINT_OUT_DEBUG($fn->{NAME}, r);";
        pidl "}";
        pidl "";
-       pidl "push = ndr_push_init_ctx(r);";
+       pidl "push = ndr_push_init_ctx(r, NULL);";
        pidl "if (push == NULL) {";
        pidl "\ttalloc_free(r);";
        pidl "\treturn false;";
index 8bee54d0754f1d17ae4b7f4f4ed610d47b8ee3c9..fed38c828e5d01f6760a11b8524fc2f80e5151a8 100644 (file)
@@ -56,6 +56,7 @@ PIDL_ARGS=@PIDL_ARGS@
 TERMLDFLAGS=@TERMLDFLAGS@
 TERMLIBS=@TERMLIBS@
 PRINT_LIBS=@PRINT_LIBS@
+ZLIB_LIBS=@ZLIB_LIBS@
 AUTH_LIBS=@AUTH_LIBS@
 ACL_LIBS=@ACL_LIBS@
 PASSDB_LIBS=@PASSDB_LIBS@
@@ -151,7 +152,7 @@ CODEPAGEDIR = @codepagedir@
 # the directory where pid files go
 PIDDIR = @piddir@
 
-FLAGS = -I. -I$(srcdir) @FLAGS1@ @SAMBA_CPPFLAGS@ $(CPPFLAGS) -I$(CTDBDIR)/include $(ISA) -I$(srcdir)/lib -D_SAMBA_BUILD_=3
+FLAGS = -I. -I$(srcdir) @FLAGS1@ @SAMBA_CPPFLAGS@ $(CPPFLAGS) -I$(CTDBDIR)/include $(ISA) -I$(srcdir)/lib -I.. -D_SAMBA_BUILD_=3
 
 PATH_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" \
        -DPRIVATE_DIR=\"$(PRIVATE_DIR)\" \
@@ -227,7 +228,7 @@ MODULES = $(VFS_MODULES) $(PDB_MODULES) $(RPC_MODULES) $(IDMAP_MODULES) \
 # object file lists
 ######################################################################
 
-TDB_LIB_OBJ = lib/util_tdb.o \
+TDB_LIB_OBJ = lib/util_tdb.o ../lib/util/util_tdb.o \
          lib/dbwrap.o lib/dbwrap_tdb.o \
          lib/dbwrap_ctdb.o \
          lib/dbwrap_rbt.o @LIBTDB_STATIC@
@@ -246,25 +247,31 @@ SERVER_MUTEX_OBJ = lib/server_mutex.o
 
 PASSCHANGE_OBJ = libsmb/passchange.o
 
-LIBNDR_DRSUAPI_OBJ = librpc/ndr/ndr_drsuapi.o \
-                    librpc/ndr/ndr_compression.o \
+LIBNDR_DRSUAPI_OBJ = ../librpc/ndr/ndr_drsuapi.o \
+                    ../librpc/ndr/ndr_compression.o \
                     librpc/gen_ndr/ndr_drsuapi.o \
+                    ../librpc/ndr/ndr_drsblobs.o \
                     librpc/gen_ndr/ndr_drsblobs.o
 
-COMPRESSION_OBJ = ../lib/compression/mszip.o
+ZLIB_OBJ = @ZLIB_OBJS@
+
+COMPRESSION_OBJ = ../lib/compression/mszip.o \
+                                 ../lib/compression/lzxpress.o \
+                                 $(ZLIB_OBJ)
 
 DRSUAPI_OBJ = $(LIBNDR_DRSUAPI_OBJ) \
              $(COMPRESSION_OBJ)
 
-LIBNDR_OBJ = librpc/ndr/ndr_basic.o \
-            librpc/ndr/ndr.o \
-            librpc/ndr/ndr_misc.o \
+LIBNDR_OBJ = ../librpc/ndr/ndr_basic.o \
+            ../librpc/ndr/ndr.o \
+            ../librpc/ndr/ndr_misc.o \
             librpc/gen_ndr/ndr_misc.o \
             librpc/gen_ndr/ndr_security.o \
             librpc/ndr/ndr_sec_helper.o \
             librpc/ndr/ndr_string.o \
             librpc/ndr/sid.o \
-            librpc/ndr/uuid.o
+            ../librpc/ndr/uuid.o \
+                librpc/ndr/util.o
 
 RPCCLIENT_NDR_OBJ = rpc_client/ndr.o
 
@@ -309,29 +316,36 @@ LIBSAMBAUTIL_OBJ = @LIBTALLOC_STATIC@ \
                $(SOCKET_WRAPPER_OBJ) \
                $(NSS_WRAPPER_OBJ)
 
-LIB_OBJ = $(LIBSAMBAUTIL_OBJ) \
+UTIL_OBJ = ../lib/util/rbtree.o ../lib/util/signal.o ../lib/util/time.o \
+                  ../lib/util/xfile.o ../lib/util/util_strlist.o  \
+                  ../lib/util/util_file.o ../lib/util/data_blob.o \
+                  ../lib/util/util.o ../lib/util/fsusage.o 
+
+CRYPTO_OBJ = ../lib/crypto/crc32.o ../lib/crypto/md5.o \
+                        ../lib/crypto/hmacmd5.o ../lib/crypto/arcfour.o \
+                        ../lib/crypto/md4.o
+
+LIB_OBJ = $(LIBSAMBAUTIL_OBJ) $(UTIL_OBJ) $(CRYPTO_OBJ) \
          lib/messages.o librpc/gen_ndr/ndr_messaging.o lib/messages_local.o \
          lib/messages_ctdbd.o lib/packet.o lib/ctdbd_conn.o lib/talloc_stack.o \
-         lib/interfaces.o lib/rbtree.o lib/memcache.o \
+         lib/interfaces.o lib/memcache.o \
          lib/util_transfer_file.o lib/async_req.o \
          lib/async_sock.o \
          $(TDB_LIB_OBJ) \
          $(VERSION_OBJ) lib/charcnv.o lib/debug.o lib/fault.o \
-         lib/interface.o ../lib/crypto/md4.o \
-         lib/pidfile.o \
-         lib/signal.o lib/system.o lib/sendfile.o lib/recvfile.o lib/time.o \
+         lib/interface.o lib/pidfile.o \
+         lib/system.o lib/sendfile.o lib/recvfile.o lib/time.o \
          lib/ufc.o lib/genrand.o lib/username.o \
          lib/util_pw.o lib/access.o lib/smbrun.o \
-         lib/bitmap.o ../lib/crypto/crc32.o lib/dprintf.o \
-         lib/xfile.o lib/wins_srv.o $(UTIL_REG_OBJ) \
+         lib/bitmap.o lib/dprintf.o $(UTIL_REG_OBJ) \
+         lib/wins_srv.o \
          lib/util_str.o lib/clobber.o lib/util_sid.o lib/util_uuid.o \
-         lib/util_unistr.o lib/util_file.o lib/data_blob.o \
+         lib/util_unistr.o lib/util_file.o \
          lib/util.o lib/util_sock.o lib/sock_exec.o lib/util_sec.o \
-         lib/substitute.o lib/fsusage.o lib/dbwrap_util.o \
+         lib/substitute.o lib/dbwrap_util.o \
          lib/ms_fnmatch.o lib/select.o lib/errmap_unix.o \
          lib/tallocmsg.o lib/dmallocmsg.o libsmb/smb_signing.o \
-         ../lib/crypto/md5.o ../lib/crypto/hmacmd5.o lib/arc4.o lib/iconv.o \
-         lib/pam_errors.o intl/lang_tdb.o lib/conn_tdb.o \
+         lib/iconv.o lib/pam_errors.o intl/lang_tdb.o lib/conn_tdb.o \
          lib/adt_tree.o lib/gencache.o \
          lib/module.o lib/events.o lib/ldap_escape.o @CHARSET_STATIC@ \
          lib/secdesc.o lib/util_seaccess.o lib/secace.o lib/secacl.o \
@@ -347,7 +361,7 @@ READLINE_OBJ = lib/readline.o
 # Be sure to include them into your application
 POPT_LIB_OBJ = lib/popt_common.o
 
-PARAM_WITHOUT_REG_OBJ = dynconfig.o param/loadparm.o param/params.o param/util.o lib/sharesec.o lib/ldap_debug_handler.o
+PARAM_WITHOUT_REG_OBJ = dynconfig.o param/loadparm.o ../lib/util/params.o param/util.o lib/sharesec.o lib/ldap_debug_handler.o
 PARAM_REG_ADD_OBJ = $(REG_SMBCONF_OBJ) $(LIBSMBCONF_OBJ) $(PRIVILEGES_BASIC_OBJ)
 PARAM_OBJ = $(PARAM_WITHOUT_REG_OBJ) $(PARAM_REG_ADD_OBJ)
 
@@ -373,7 +387,7 @@ LIBADS_OBJ = libads/ldap.o libads/ldap_printer.o \
             libads/ldap_schema.o libads/util.o libads/ndr.o
 
 LIBADS_SERVER_OBJ = libads/kerberos_verify.o libads/authdata.o \
-                   librpc/ndr/ndr_krb5pac.o \
+                   ../librpc/ndr/ndr_krb5pac.o \
                    librpc/gen_ndr/ndr_krb5pac.o
 
 SECRETS_OBJ = passdb/secrets.o passdb/machine_sid.o
@@ -432,7 +446,7 @@ LIBMSRPC_OBJ = rpc_client/cli_lsarpc.o rpc_client/cli_samr.o \
               rpc_client/cli_svcctl.o \
               rpc_client/init_samr.o \
                   librpc/rpc/dcerpc.o \
-                  librpc/rpc/binding.o
+                  ../librpc/rpc/binding.o
 
 LIBMSRPC_GEN_OBJ = librpc/gen_ndr/cli_lsa.o \
                   librpc/gen_ndr/cli_dfs.o \
@@ -733,7 +747,7 @@ SMBCONTROL_OBJ = utils/smbcontrol.o $(LOCKING_OBJ) $(PARAM_OBJ) \
 SMBTREE_OBJ = utils/smbtree.o $(PARAM_OBJ) \
              $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSMB_OBJ) \
             $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
-             rpc_client/cli_pipe.o librpc/rpc/binding.o $(RPC_PARSE_OBJ2) \
+             rpc_client/cli_pipe.o ../librpc/rpc/binding.o $(RPC_PARSE_OBJ2) \
              $(RPC_CLIENT_OBJ1) \
             $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(SMBLDAP_OBJ) $(LDB_OBJ) $(GROUPDB_OBJ) \
             $(LIBMSRPC_GEN_OBJ)
@@ -817,7 +831,7 @@ LIBBIGBALLOFMUD_OBJ = $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
        $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) $(SMBLDAP_OBJ) $(LDB_OBJ)
 
 CLIENT_OBJ1 = client/client.o client/clitar.o rpc_client/cli_pipe.o \
-             librpc/rpc/binding.o \
+             ../librpc/rpc/binding.o \
              client/dnsbrowse.o \
              $(RPC_CLIENT_OBJ1) \
              $(RPC_PARSE_OBJ2)
@@ -966,7 +980,7 @@ REPLACETORT_OBJ = @libreplacedir@/test/testsuite.o \
                @libreplacedir@/test/main.o \
                $(LIBREPLACE_OBJ)
 
-NDRDUMP_OBJ = librpc/tools/ndrdump.o \
+NDRDUMP_OBJ = ../librpc/tools/ndrdump.o \
              $(PARAM_OBJ) $(LIBNDR_GEN_OBJ) \
              $(LIBSAMBA_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
              librpc/gen_ndr/ndr_svcctl.o
@@ -1110,7 +1124,7 @@ NTLM_AUTH_OBJ = ${NTLM_AUTH_OBJ1} $(LIBSAMBA_OBJ) $(POPT_LIB_OBJ) \
                $(LIBNDR_GEN_OBJ0) $(LIBNDR_GEN_OBJ1)
 
 
-VLP_OBJ1 = ../testsuite/printing/vlp.o $(RPC_CLIENT_OBJ1) $(RPC_PARSE_OBJ2) $(RPC_CLIENT_OBJ) librpc/rpc/binding.o
+VLP_OBJ1 = ../testsuite/printing/vlp.o $(RPC_CLIENT_OBJ1) $(RPC_PARSE_OBJ2) $(RPC_CLIENT_OBJ) ../librpc/rpc/binding.o
 
 VLP_OBJ = $(VLP_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) \
          $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) $(LIBMSRPC_GEN_OBJ) \
@@ -1128,7 +1142,7 @@ RPC_OPEN_TCP_OBJ = torture/rpc_open_tcp.o \
                   $(RPC_PARSE_OBJ2) \
                   $(RPC_CLIENT_OBJ1) \
                   rpc_client/cli_pipe.o \
-                  librpc/rpc/binding.o \
+                  ../librpc/rpc/binding.o \
                   $(LIBMSRPC_GEN_OBJ)
 
 
@@ -1191,14 +1205,16 @@ modules:: SHOWFLAGS $(MODULES)
 #####################################################################
 ## Perl IDL Compiler
 samba3-idl::
-       @IDL_FILES="lsa.idl dfs.idl echo.idl winreg.idl initshutdown.idl \
-               srvsvc.idl svcctl.idl eventlog.idl wkssvc.idl netlogon.idl notify.idl \
-               epmapper.idl messaging.idl xattr.idl misc.idl samr.idl security.idl \
-               dssetup.idl krb5pac.idl ntsvcs.idl libnetapi.idl drsuapi.idl drsblobs.idl \
-               nbt.idl" \
-               CPP="$(CPP)" PIDL="../pidl/pidl" \
-        srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh $(PIDL_ARGS)
-
+       @PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \
+        srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh librpc/idl/lsa.idl \
+               ../librpc/idl/dfs.idl ../librpc/idl/echo.idl librpc/idl/winreg.idl \
+               ../librpc/idl/initshutdown.idl librpc/idl/srvsvc.idl ../librpc/idl/svcctl.idl \
+               ../librpc/idl/eventlog.idl ../librpc/idl/wkssvc.idl librpc/idl/netlogon.idl \
+               ../librpc/idl/notify.idl ../librpc/idl/epmapper.idl librpc/idl/messaging.idl \
+               ../librpc/idl/xattr.idl ../librpc/idl/misc.idl librpc/idl/samr.idl \
+               ../librpc/idl/security.idl ../librpc/idl/dssetup.idl librpc/idl/krb5pac.idl \
+               ../librpc/idl/ntsvcs.idl librpc/idl/libnetapi.idl ../librpc/idl/drsuapi.idl \
+               ../librpc/idl/drsblobs.idl ../librpc/idl/nbt.idl
 
 #####################################################################
 
@@ -2676,7 +2692,10 @@ clean:: cleanlibs
                $(MODULES) $(TORTURE_PROGS) \
                $(EVERYTHING_PROGS) \
                bin/timelimit \
-               .headers.stamp */src/*.o
+               .headers.stamp */src/*.o \
+               ../lib/*/*.o \
+               ../libcli/*.o ../libcli/*/*.o \
+               ../librpc/*/*.o
        -rm -rf t_dir
 
 include/build_env.h: script/build_env.sh
@@ -2687,7 +2706,9 @@ include/build_env.h: script/build_env.sh
 proto::
 
 etags::
-       etags `find $(srcdir)/.. -name "*.[ch]"`
+       etags `find $(srcdir) -name "*.[ch]"`
+       etags --append `find $(srcdir)/../lib -name "*.[ch]"`
+       etags --append `find $(srcdir)/../source4 -name "*.[ch]"`
 
 ctags::
        ctags `find $(srcdir)/.. -name "*.[ch]"`
index 754cb7a508073308fe67b92d57275ead5fafca5b..7f95656befd7d8abcdaa453456374b3317a4d386 100644 (file)
@@ -459,8 +459,8 @@ NTSTATUS make_auth_context_subsystem(struct auth_context **auth_context)
        NTSTATUS nt_status;
 
        if (lp_auth_methods()
-           && !str_list_copy(talloc_tos(), &auth_method_list,
-                             lp_auth_methods())) {
+           && !(auth_method_list = str_list_copy(talloc_tos(), 
+                             lp_auth_methods()))) {
                return NT_STATUS_NO_MEMORY;
        }
 
index 50bf15318be5b0b2071515cfdfe6a1bb8daf59d7..7fe76fbfd6d2214588ecbd60477b684e19492225 100644 (file)
@@ -176,7 +176,7 @@ static NTSTATUS sam_account_ok(TALLOC_CTX *mem_ctx,
                /* check for expired password */
                if (must_change_time < time(NULL) && must_change_time != 0) {
                        DEBUG(1,("sam_account_ok: Account for user '%s' password expired!.\n", pdb_get_username(sampass)));
-                       DEBUG(1,("sam_account_ok: Password expired at '%s' (%ld) unix time.\n", http_timestring(must_change_time), (long)must_change_time));
+                       DEBUG(1,("sam_account_ok: Password expired at '%s' (%ld) unix time.\n", http_timestring(talloc_tos(), must_change_time), (long)must_change_time));
                        return NT_STATUS_PASSWORD_EXPIRED;
                }
        }
index d6cd2ea3a8474b3de217203fb8975d21049fe016..e739fdaabe92786cc39ea050ca53f1bb40e96c99 100644 (file)
@@ -84,7 +84,7 @@ NT_USER_TOKEN *get_root_nt_token( void )
 
        cache_data = memcache_lookup_talloc(
                NULL, SINGLETON_CACHE_TALLOC,
-               data_blob_string_const("root_nt_token"));
+               data_blob_string_const_null("root_nt_token"));
 
        if (cache_data != NULL) {
                return talloc_get_type_abort(
@@ -109,7 +109,7 @@ NT_USER_TOKEN *get_root_nt_token( void )
 
        memcache_add_talloc(
                NULL, SINGLETON_CACHE_TALLOC,
-               data_blob_string_const("root_nt_token"), token);
+               data_blob_string_const_null("root_nt_token"), token);
 
        return token;
 }
index eb9f31bdf2736a436206f6d0aebadbcaae16ca08..26badc4051c406f5ff1d74280ed71084635956ce 100644 (file)
@@ -84,9 +84,9 @@ static struct sockaddr_storage dest_ss;
 static bool abort_mget = true;
 
 /* timing globals */
-SMB_BIG_UINT get_total_size = 0;
+uint64_t get_total_size = 0;
 unsigned int get_total_time_ms = 0;
-static SMB_BIG_UINT put_total_size = 0;
+static uint64_t put_total_size = 0;
 static unsigned int put_total_time_ms = 0;
 
 /* totals globals */
@@ -1203,7 +1203,7 @@ static void do_mget(file_info *finfo, const char *dir)
                strlower_m(finfo->name);
        }
 
-       if (!directory_exist(finfo->name,NULL) &&
+       if (!directory_exist(finfo->name) &&
            mkdir(finfo->name,0777) != 0) {
                d_printf("failed to create directory %s\n",finfo->name);
                client_set_cur_dir(saved_curdir);
@@ -1752,7 +1752,7 @@ static int cmd_put(void)
                SMB_STRUCT_STAT st;
                /* allow '-' to represent stdin
                   jdblair, 24.jun.98 */
-               if (!file_exist(lname,&st) &&
+               if (!file_exist_stat(lname,&st) &&
                    (strcmp(lname,"-"))) {
                        d_printf("%s does not exist\n",lname);
                        return 1;
@@ -2555,7 +2555,7 @@ static int cmd_lock(void)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *buf = NULL;
-       SMB_BIG_UINT start, len;
+       uint64_t start, len;
        enum brl_type lock_type;
        int fnum;
 
@@ -2584,14 +2584,14 @@ static int cmd_lock(void)
                return 1;
        }
 
-       start = (SMB_BIG_UINT)strtol(buf, (char **)NULL, 16);
+       start = (uint64_t)strtol(buf, (char **)NULL, 16);
 
        if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
                d_printf("lock <fnum> [r|w] <hex-start> <hex-len>\n");
                return 1;
        }
 
-       len = (SMB_BIG_UINT)strtol(buf, (char **)NULL, 16);
+       len = (uint64_t)strtol(buf, (char **)NULL, 16);
 
        if (!cli_posix_lock(cli, fnum, start, len, true, lock_type)) {
                d_printf("lock failed %d: %s\n", fnum, cli_errstr(cli));
@@ -2604,7 +2604,7 @@ static int cmd_unlock(void)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *buf = NULL;
-       SMB_BIG_UINT start, len;
+       uint64_t start, len;
        int fnum;
 
        if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
@@ -2618,14 +2618,14 @@ static int cmd_unlock(void)
                return 1;
        }
 
-       start = (SMB_BIG_UINT)strtol(buf, (char **)NULL, 16);
+       start = (uint64_t)strtol(buf, (char **)NULL, 16);
 
        if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
                d_printf("unlock <fnum> <hex-start> <hex-len>\n");
                return 1;
        }
 
-       len = (SMB_BIG_UINT)strtol(buf, (char **)NULL, 16);
+       len = (uint64_t)strtol(buf, (char **)NULL, 16);
 
        if (!cli_posix_unlock(cli, fnum, start, len)) {
                d_printf("unlock failed %d: %s\n", fnum, cli_errstr(cli));
@@ -3566,7 +3566,7 @@ static int cmd_reput(void)
                return 1;
        }
 
-       if (!file_exist(local_name, &st)) {
+       if (!file_exist_stat(local_name, &st)) {
                d_printf("%s does not exist\n", local_name);
                return 1;
        }
index 084f87e3996a86d0f1d55e35c633d9ec50764763..7ad8a73e9ca0c51ead74e8907e864eb516b6c316 100644 (file)
@@ -112,11 +112,11 @@ extern int get_total_size;
 static int blocksize=20;
 static int tarhandle;
 
-static void writetarheader(int f,  const char *aname, SMB_BIG_UINT size, time_t mtime,
+static void writetarheader(int f,  const char *aname, uint64_t size, time_t mtime,
                           const char *amode, unsigned char ftype);
 static void do_atar(const char *rname_in,char *lname,file_info *finfo1);
 static void do_tar(file_info *finfo, const char *dir);
-static void oct_it(SMB_BIG_UINT value, int ndgs, char *p);
+static void oct_it(uint64_t value, int ndgs, char *p);
 static void fixtarname(char *tptr, const char *fp, size_t l);
 static int dotarbuf(int f, char *b, int n);
 static void dozerobuf(int f, int n);
@@ -154,7 +154,7 @@ static char *string_create_s(int size)
 Write a tar header to buffer
 ****************************************************************************/
 
-static void writetarheader(int f, const char *aname, SMB_BIG_UINT size, time_t mtime,
+static void writetarheader(int f, const char *aname, uint64_t size, time_t mtime,
                           const char *amode, unsigned char ftype)
 {
        union hblock hb;
@@ -195,10 +195,10 @@ static void writetarheader(int f, const char *aname, SMB_BIG_UINT size, time_t m
 
        hb.dbuf.name[NAMSIZ-1]='\0';
        safe_strcpy(hb.dbuf.mode, amode, sizeof(hb.dbuf.mode)-1);
-       oct_it((SMB_BIG_UINT)0, 8, hb.dbuf.uid);
-       oct_it((SMB_BIG_UINT)0, 8, hb.dbuf.gid);
-       oct_it((SMB_BIG_UINT) size, 13, hb.dbuf.size);
-       if (size > (SMB_BIG_UINT)077777777777LL) {
+       oct_it((uint64_t)0, 8, hb.dbuf.uid);
+       oct_it((uint64_t)0, 8, hb.dbuf.gid);
+       oct_it((uint64_t) size, 13, hb.dbuf.size);
+       if (size > (uint64_t)077777777777LL) {
                /* This is a non-POSIX compatible extention to store files
                        greater than 8GB. */
 
@@ -207,7 +207,7 @@ static void writetarheader(int f, const char *aname, SMB_BIG_UINT size, time_t m
                for (i = 8, jp=(char*)&size; i; i--)
                        hb.dbuf.size[i+3] = *(jp++);
        }
-       oct_it((SMB_BIG_UINT) mtime, 13, hb.dbuf.mtime);
+       oct_it((uint64_t) mtime, 13, hb.dbuf.mtime);
        memcpy(hb.dbuf.chksum, "        ", sizeof(hb.dbuf.chksum));
        memset(hb.dbuf.linkname, 0, NAMSIZ);
        hb.dbuf.linkflag=ftype;
@@ -215,7 +215,7 @@ static void writetarheader(int f, const char *aname, SMB_BIG_UINT size, time_t m
        for (chk=0, i=sizeof(hb.dummy), jp=hb.dummy; --i>=0;)
                chk+=(0xFF & *jp++);
 
-       oct_it((SMB_BIG_UINT) chk, 8, hb.dbuf.chksum);
+       oct_it((uint64_t) chk, 8, hb.dbuf.chksum);
        hb.dbuf.chksum[6] = '\0';
 
        (void) dotarbuf(f, hb.dummy, sizeof(hb.dummy));
@@ -431,7 +431,7 @@ static void fixtarname(char *tptr, const char *fp, size_t l)
 Convert from decimal to octal string
 ****************************************************************************/
 
-static void oct_it (SMB_BIG_UINT value, int ndgs, char *p)
+static void oct_it (uint64_t value, int ndgs, char *p)
 {
        /* Converts long to octal string, pads with leading zeros */
 
@@ -567,7 +567,7 @@ static bool ensurepath(const char *fname)
        return True;
 }
 
-static int padit(char *buf, SMB_BIG_UINT bufsize, SMB_BIG_UINT padsize)
+static int padit(char *buf, uint64_t bufsize, uint64_t padsize)
 {
        int berr= 0;
        int bytestowrite;
@@ -607,7 +607,7 @@ append one remote file to the tar file
 static void do_atar(const char *rname_in,char *lname,file_info *finfo1)
 {
        int fnum = -1;
-       SMB_BIG_UINT nread=0;
+       uint64_t nread=0;
        char ftype;
        file_info2 finfo;
        bool shallitime=True;
@@ -738,7 +738,7 @@ static void do_atar(const char *rname_in,char *lname,file_info *finfo1)
                        if (nread < finfo.size) {
                                DEBUG(0, ("Didn't get entire file. size=%.0f, nread=%d\n",
                                                        (double)finfo.size, (int)nread));
-                               if (padit(data, (SMB_BIG_UINT)sizeof(data), finfo.size - nread))
+                               if (padit(data, (uint64_t)sizeof(data), finfo.size - nread))
                                        DEBUG(0,("Error writing tar file - %s\n", strerror(errno)));
                        }
 
@@ -992,7 +992,7 @@ static int skip_file(int skipsize)
 static int get_file(file_info2 finfo)
 {
        int fnum = -1, pos = 0, dsize = 0, bpos = 0;
-       SMB_BIG_UINT rsize = 0;
+       uint64_t rsize = 0;
 
        DEBUG(5, ("get_file: file: %s, size %.0f\n", finfo.name, (double)finfo.size));
 
index 4a173714fe870de48d4ce81624b8c2b83f8ecccf..1910ccd4feefd2d0a8c81602f4333ba48ad8f4cf 100644 (file)
@@ -482,7 +482,7 @@ smb_connect(const char *workgroup,  /* I - Workgroup */
        /*
          * Get the names and addresses of the client and server...
          */
-       myname = get_myname(talloc_tos());
+       myname = talloc_get_myname(talloc_tos());
        if (!myname) {
                return NULL;
        }
index 1eba4a0a58122fc5ee1477926daa3a0e7fac2a9a..9388ebabc01081d9c77447eab621d4e456686686 100644 (file)
@@ -350,7 +350,7 @@ AC_CACHE_CHECK([that the C compiler understands negative enum values],samba_cv_C
 ],
        samba_cv_CC_NEGATIVE_ENUM_VALUES=yes,samba_cv__CC_NEGATIVE_ENUM_VALUES=no)])
 if test x"$samba_cv_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then
-       AC_MSG_WARN([using --unit-enums for pidl])
+       AC_MSG_WARN([using --uint-enums for pidl])
        PIDL_ARGS="$PIDL_ARGS --uint-enums"
 fi
 
@@ -6219,13 +6219,49 @@ MSG
 fi
 
 AC_ARG_ENABLE(merged-build, 
-[AS_HELP_STRING([--enable-merged-build], [Build Samba 4 as well])])
+[AS_HELP_STRING([--enable-merged-build], [Build Samba 4 as well])], 
+[ enable_merged_build=$enableval ], [ enable_merged_build=auto ])
+
+if test x$enable_merged_build = xauto; then
+       merged_build_possible=yes
+
+       # Check for GNU make
+       m4_include(../source4/build/m4/check_make.m4)
+       AC_SAMBA_GNU_MAKE([true], [merged_build_possible=no])
+
+       # Check for perl
+       m4_include(../source4/build/m4/check_perl.m4)
+       AC_SAMBA_PERL([true], [merged_build_possible=no])
+
+       # Check for python
+       m4_include(../source4/build/m4/check_python.m4)
+       AC_SAMBA_PYTHON_DEVEL([true], [merged_build_possible=no])
+
+       AC_MSG_CHECKING([whether it would be possible to do a merged build])
+       AC_MSG_RESULT([$merged_build_possible])
+
+       dnl FIXME: enable_merged_build=$merged_build_possible
+fi
 
 if test x$enable_merged_build = xyes; then
        MERGED_BUILD=1
        m4_include(samba4.m4)
 fi
 
+m4_include(../lib/zlib/zlib.m4)
+AC_SUBST(ZLIB_LIBS)
+AC_SUBST(ZLIB_OBJS)
+AC_ZLIB([ZLIB_OBJS=""], [
+       ZLIB_LIBS=""
+       for o in adler32.o compress.o crc32.o gzio.o uncompr.o \
+                    deflate.o trees.o zutil.o inflate.o infback.o \
+                        inftrees.o inffast.o
+       do
+               ZLIB_OBJS="$ZLIB_OBJS ../lib/zlib/$o"
+       done
+       CFLAGS="$CFLAGS -I../lib/zlib"
+])
+
 dnl Remove -L/usr/lib/? from LDFLAGS and LIBS
 LIB_REMOVE_USR_LIB(LDFLAGS)
 LIB_REMOVE_USR_LIB(LIBS)
index 7ce879fb6ed9eb40931956a4c42c3acc760287fb..1a6b99fa189540c08ebd1d20f1b8fdd7fbdf890d 100644 (file)
@@ -63,7 +63,7 @@ static bool init_group_mapping(void)
        /* Ensure this db is created read/write for root only. */
        ldb_set_create_perms(ldb, 0600);
 
-       existed = file_exist(db_path, NULL);
+       existed = file_exist(db_path);
 
        if (lp_parm_bool(-1, "groupmap", "nosync", False)) {
                flags |= LDB_FLG_NOSYNC;
@@ -99,7 +99,7 @@ static bool init_group_mapping(void)
 
        /* possibly upgrade */
        tdb_path = state_path("group_mapping.tdb");
-       if (file_exist(tdb_path, NULL) && !mapping_upgrade(tdb_path)) {
+       if (file_exist(tdb_path) && !mapping_upgrade(tdb_path)) {
                unlink(state_path("group_mapping.ldb"));
                goto failed;
        }
diff --git a/source3/include/byteorder.h b/source3/include/byteorder.h
deleted file mode 100644 (file)
index 9ced9ce..0000000
+++ /dev/null
@@ -1,176 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-   SMB Byte handling
-   Copyright (C) Andrew Tridgell 1992-1998
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _BYTEORDER_H
-#define _BYTEORDER_H
-
-/*
-   This file implements macros for machine independent short and 
-   int manipulation
-
-Here is a description of this file that I emailed to the samba list once:
-
-> I am confused about the way that byteorder.h works in Samba. I have
-> looked at it, and I would have thought that you might make a distinction
-> between LE and BE machines, but you only seem to distinguish between 386
-> and all other architectures.
-> 
-> Can you give me a clue?
-
-sure.
-
-The distinction between 386 and other architectures is only there as
-an optimisation. You can take it out completely and it will make no
-difference. The routines (macros) in byteorder.h are totally byteorder
-independent. The 386 optimsation just takes advantage of the fact that
-the x86 processors don't care about alignment, so we don't have to
-align ints on int boundaries etc. If there are other processors out
-there that aren't alignment sensitive then you could also define
-CAREFUL_ALIGNMENT=0 on those processors as well.
-
-Ok, now to the macros themselves. I'll take a simple example, say we
-want to extract a 2 byte integer from a SMB packet and put it into a
-type called uint16 that is in the local machines byte order, and you
-want to do it with only the assumption that uint16 is _at_least_ 16
-bits long (this last condition is very important for architectures
-that don't have any int types that are 2 bytes long)
-
-You do this:
-
-#define CVAL(buf,pos) (((unsigned char *)(buf))[pos])
-#define PVAL(buf,pos) ((unsigned)CVAL(buf,pos))
-#define SVAL(buf,pos) (PVAL(buf,pos)|PVAL(buf,(pos)+1)<<8)
-
-then to extract a uint16 value at offset 25 in a buffer you do this:
-
-char *buffer = foo_bar();
-uint16 xx = SVAL(buffer,25);
-
-We are using the byteoder independence of the ANSI C bitshifts to do
-the work. A good optimising compiler should turn this into efficient
-code, especially if it happens to have the right byteorder :-)
-
-I know these macros can be made a bit tidier by removing some of the
-casts, but you need to look at byteorder.h as a whole to see the
-reasoning behind them. byteorder.h defines the following macros:
-
-SVAL(buf,pos) - extract a 2 byte SMB value
-IVAL(buf,pos) - extract a 4 byte SMB value
-SVALS(buf,pos) signed version of SVAL()
-IVALS(buf,pos) signed version of IVAL()
-
-SSVAL(buf,pos,val) - put a 2 byte SMB value into a buffer
-SIVAL(buf,pos,val) - put a 4 byte SMB value into a buffer
-SSVALS(buf,pos,val) - signed version of SSVAL()
-SIVALS(buf,pos,val) - signed version of SIVAL()
-
-RSVAL(buf,pos) - like SVAL() but for NMB byte ordering
-RSVALS(buf,pos) - like SVALS() but for NMB byte ordering
-RIVAL(buf,pos) - like IVAL() but for NMB byte ordering
-RIVALS(buf,pos) - like IVALS() but for NMB byte ordering
-RSSVAL(buf,pos,val) - like SSVAL() but for NMB ordering
-RSIVAL(buf,pos,val) - like SIVAL() but for NMB ordering
-RSIVALS(buf,pos,val) - like SIVALS() but for NMB ordering
-
-it also defines lots of intermediate macros, just ignore those :-)
-
-*/
-
-#undef CAREFUL_ALIGNMENT
-
-/* we know that the 386 can handle misalignment and has the "right" 
-   byteorder */
-#ifdef __i386__
-#define CAREFUL_ALIGNMENT 0
-#endif
-
-#ifndef CAREFUL_ALIGNMENT
-#define CAREFUL_ALIGNMENT 1
-#endif
-
-#define CVAL(buf,pos) ((unsigned)(((const unsigned char *)(buf))[pos]))
-#define CVAL_NC(buf,pos) (((unsigned char *)(buf))[pos]) /* Non-const version of CVAL */
-#define PVAL(buf,pos) (CVAL(buf,pos))
-#define SCVAL(buf,pos,val) (CVAL_NC(buf,pos) = (val))
-
-
-#if CAREFUL_ALIGNMENT
-
-#define SVAL(buf,pos) (PVAL(buf,pos)|PVAL(buf,(pos)+1)<<8)
-#define IVAL(buf,pos) (SVAL(buf,pos)|SVAL(buf,(pos)+2)<<16)
-#define SSVALX(buf,pos,val) (CVAL_NC(buf,pos)=(unsigned char)((val)&0xFF),CVAL_NC(buf,pos+1)=(unsigned char)((val)>>8))
-#define SIVALX(buf,pos,val) (SSVALX(buf,pos,val&0xFFFF),SSVALX(buf,pos+2,val>>16))
-#define SVALS(buf,pos) ((int16)SVAL(buf,pos))
-#define IVALS(buf,pos) ((int32)IVAL(buf,pos))
-#define SSVAL(buf,pos,val) SSVALX((buf),(pos),((uint16)(val)))
-#define SIVAL(buf,pos,val) SIVALX((buf),(pos),((uint32)(val)))
-#define SSVALS(buf,pos,val) SSVALX((buf),(pos),((int16)(val)))
-#define SIVALS(buf,pos,val) SIVALX((buf),(pos),((int32)(val)))
-
-#else /* CAREFUL_ALIGNMENT */
-
-/* this handles things for architectures like the 386 that can handle
-   alignment errors */
-/*
-   WARNING: This section is dependent on the length of int16 and int32
-   being correct 
-*/
-
-/* get single value from an SMB buffer */
-#define SVAL(buf,pos) (*(const uint16 *)((const char *)(buf) + (pos)))
-#define SVAL_NC(buf,pos) (*(uint16 *)((char *)(buf) + (pos))) /* Non const version of above. */
-#define IVAL(buf,pos) (*(const uint32 *)((const char *)(buf) + (pos)))
-#define IVAL_NC(buf,pos) (*(uint32 *)((char *)(buf) + (pos))) /* Non const version of above. */
-#define SVALS(buf,pos) (*(const int16 *)((const char *)(buf) + (pos)))
-#define SVALS_NC(buf,pos) (*(int16 *)((char *)(buf) + (pos))) /* Non const version of above. */
-#define IVALS(buf,pos) (*(const int32 *)((const char *)(buf) + (pos)))
-#define IVALS_NC(buf,pos) (*(int32 *)((char *)(buf) + (pos))) /* Non const version of above. */
-
-/* store single value in an SMB buffer */
-#define SSVAL(buf,pos,val) SVAL_NC(buf,pos)=((uint16)(val))
-#define SIVAL(buf,pos,val) IVAL_NC(buf,pos)=((uint32)(val))
-#define SSVALS(buf,pos,val) SVALS_NC(buf,pos)=((int16)(val))
-#define SIVALS(buf,pos,val) IVALS_NC(buf,pos)=((int32)(val))
-
-#endif /* CAREFUL_ALIGNMENT */
-
-/* now the reverse routines - these are used in nmb packets (mostly) */
-#define SREV(x) ((((x)&0xFF)<<8) | (((x)>>8)&0xFF))
-#define IREV(x) ((SREV(x)<<16) | (SREV((x)>>16)))
-
-#define RSVAL(buf,pos) SREV(SVAL(buf,pos))
-#define RSVALS(buf,pos) SREV(SVALS(buf,pos))
-#define RIVAL(buf,pos) IREV(IVAL(buf,pos))
-#define RIVALS(buf,pos) IREV(IVALS(buf,pos))
-#define RSSVAL(buf,pos,val) SSVAL(buf,pos,SREV(val))
-#define RSSVALS(buf,pos,val) SSVALS(buf,pos,SREV(val))
-#define RSIVAL(buf,pos,val) SIVAL(buf,pos,IREV(val))
-#define RSIVALS(buf,pos,val) SIVALS(buf,pos,IREV(val))
-
-/* Alignment macros. */
-#define ALIGN4(p,base) ((p) + ((4 - (PTR_DIFF((p), (base)) & 3)) & 3))
-#define ALIGN2(p,base) ((p) + ((2 - (PTR_DIFF((p), (base)) & 1)) & 1))
-
-/* 64 bit macros */
-#define BVAL(p, ofs) (IVAL(p,ofs) | (((uint64_t)IVAL(p,(ofs)+4)) << 32))
-#define BVALS(p, ofs) ((int64_t)BVAL(p,ofs))
-#define SBVAL(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,((uint64_t)(v))>>32))
-#define SBVALS(p, ofs, v) (SBVAL(p,ofs,(uint64_t)v))
-
-#endif /* _BYTEORDER_H */
index 70b0421c6da714c2e3b055eb6934c2e2ccf8270e..8d57fe1eed9da5e48e2319c02d69512453233130 100644 (file)
@@ -232,7 +232,7 @@ struct cli_state {
 
 typedef struct file_info {
        struct cli_state *cli;
-       SMB_BIG_UINT size;
+       uint64_t size;
        uint16 mode;
        uid_t uid;
        gid_t gid;
diff --git a/source3/include/dcerpc.h b/source3/include/dcerpc.h
deleted file mode 100644 (file)
index e69de29..0000000
index d1716320b3bb75b28bc2b05d4d6cfd377c11a0f5..56d0237c3f2e51fdbf69bb8e02a51ae603e9b562 100644 (file)
 int  Debug1( const char *, ... ) PRINTF_ATTRIBUTE(1,2);
 /* PRINTFLIKE1 */
 bool dbgtext( const char *, ... ) PRINTF_ATTRIBUTE(1,2);
-bool dbghdr( int level, int cls, const char *file, const char *func, int line );
+bool dbghdrclass( int level, int cls, const char *location, const char *func);
+bool dbghdr( int level, const char *location, const char *func);
 
 #if defined(sgi) && (_COMPILER_VERSION >= 730)
 #pragma mips_frequency_hint NEVER Debug1
 #pragma mips_frequency_hint NEVER dbgtext
+#pragma mips_frequency_hint NEVER dbghdrclass
 #pragma mips_frequency_hint NEVER dbghdr
 #endif
 
@@ -192,7 +194,7 @@ extern bool *DEBUGLEVEL_CLASS_ISSET;
 
 #define DEBUGLVL( level ) \
   ( CHECK_DEBUGLVL(level) \
-   && dbghdr( level, DBGC_CLASS, __FILE__, FUNCTION_MACRO, (__LINE__) ) )
+   && dbghdrclass( level, DBGC_CLASS, __location__, FUNCTION_MACRO ) )
 
 
 #define DEBUGLVLC( dbgc_class, level ) \
@@ -200,7 +202,7 @@ extern bool *DEBUGLEVEL_CLASS_ISSET;
      unlikely((DEBUGLEVEL_CLASS[ dbgc_class ] >= (level))||  \
      (!DEBUGLEVEL_CLASS_ISSET[ dbgc_class ] && \
       DEBUGLEVEL_CLASS[ DBGC_ALL   ] >= (level))  ) \
-   && dbghdr( level, DBGC_CLASS, __FILE__, FUNCTION_MACRO, (__LINE__) ) )
+   && dbghdrclass( level, DBGC_CLASS, __location__, FUNCTION_MACRO) )
 
 
 #define DEBUG( level, body ) \
@@ -208,7 +210,7 @@ extern bool *DEBUGLEVEL_CLASS_ISSET;
            unlikely((DEBUGLEVEL_CLASS[ DBGC_CLASS ] >= (level))||  \
            (!DEBUGLEVEL_CLASS_ISSET[ DBGC_CLASS ] && \
             DEBUGLEVEL_CLASS[ DBGC_ALL   ] >= (level))  ) \
-       && (dbghdr( level, DBGC_CLASS, __FILE__, FUNCTION_MACRO, (__LINE__) )) \
+       && (dbghdrclass( level, DBGC_CLASS, __location__, FUNCTION_MACRO )) \
        && (dbgtext body) )
 
 #define DEBUGC( dbgc_class, level, body ) \
@@ -216,7 +218,7 @@ extern bool *DEBUGLEVEL_CLASS_ISSET;
            unlikely((DEBUGLEVEL_CLASS[ dbgc_class ] >= (level))||  \
            (!DEBUGLEVEL_CLASS_ISSET[ dbgc_class ] && \
            DEBUGLEVEL_CLASS[ DBGC_ALL   ] >= (level))  ) \
-       && (dbghdr( level, DBGC_CLASS, __FILE__, FUNCTION_MACRO, (__LINE__) )) \
+       && (dbghdrclass( level, DBGC_CLASS, __location__, FUNCTION_MACRO)) \
        && (dbgtext body) )
 
 #define DEBUGADD( level, body ) \
index 93da1060309fb4308e8b55f4120a8dcff5b1ce59..c4b271f85d83f3874d670d4fb1884390139d253a 100644 (file)
@@ -22,7 +22,8 @@
 
 enum FAKE_FILE_TYPE {
        FAKE_FILE_TYPE_NONE = 0,
-       FAKE_FILE_TYPE_QUOTA    
+       FAKE_FILE_TYPE_QUOTA,
+       FAKE_FILE_TYPE_NAMED_PIPE
 };
 
 /*
index 79495a7ecf678f8175703f6c6d28060e2e63e1a8..ac5b2b215c6878ffde76636d3867154bc88470e5 100644 (file)
 #undef HAVE_TERMIOS_H
 #endif
 
-#ifndef _PUBLIC_
-#ifdef HAVE_VISIBILITY_ATTR
-#  define _PUBLIC_ __attribute__((visibility("default")))
-#else
-#  define _PUBLIC_
-#endif
-#endif
-
-#if defined(__GNUC__) && !defined(__cplusplus)
-/** gcc attribute used on function parameters so that it does not emit
- * warnings about them being unused. **/
-#  define UNUSED(param) param __attribute__ ((unused))
-#else
-#  define UNUSED(param) param
-/** Feel free to add definitions for other compilers here. */
-#endif
-
 #ifdef RELIANTUNIX
 /*
  * <unistd.h> has to be included before any other to get
@@ -285,37 +268,19 @@ typedef int ber_int_t;
 #define HAVE_ADS
 #endif
 
-/*
- * Define VOLATILE if needed.
- */
-
-#if defined(HAVE_VOLATILE)
-#define VOLATILE volatile
-#else
-#define VOLATILE
-#endif
-
 /*
  * Define additional missing types
  */
-#if defined(HAVE_SIG_ATOMIC_T_TYPE) && defined(AIX)
+#if defined(AIX)
 typedef sig_atomic_t SIG_ATOMIC_T;
-#elif defined(HAVE_SIG_ATOMIC_T_TYPE) && !defined(AIX)
-typedef sig_atomic_t VOLATILE SIG_ATOMIC_T;
 #else
-typedef int VOLATILE SIG_ATOMIC_T;
+typedef sig_atomic_t volatile SIG_ATOMIC_T;
 #endif
 
 #ifndef uchar
 #define uchar unsigned char
 #endif
 
-#ifdef HAVE_UNSIGNED_CHAR
-#define schar signed char
-#else
-#define schar char
-#endif
-
 /*
    Samba needs type definitions for int16, int32, uint16 and uint32.
 
@@ -326,15 +291,11 @@ typedef int VOLATILE SIG_ATOMIC_T;
 */
 
 #ifndef uint8
-#define uint8 unsigned char
+#define uint8 uint8_t
 #endif
 
 #if !defined(int16) && !defined(HAVE_INT16_FROM_RPC_RPC_H)
-#  if (SIZEOF_SHORT == 4)
-#    define int16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16;
-#  else /* SIZEOF_SHORT != 4 */
-#    define int16 short
-#  endif /* SIZEOF_SHORT != 4 */
+#  define int16 int16_t
    /* needed to work around compile issue on HP-UX 11.x */
 #  define _INT16       1
 #endif
@@ -344,25 +305,13 @@ typedef int VOLATILE SIG_ATOMIC_T;
  * case as int16 may be a typedef from rpc/rpc.h
  */
 
+
 #if !defined(uint16) && !defined(HAVE_UINT16_FROM_RPC_RPC_H)
-#if (SIZEOF_SHORT == 4)
-#define uint16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16;
-#else /* SIZEOF_SHORT != 4 */
-#define uint16 unsigned short
-#endif /* SIZEOF_SHORT != 4 */
+#  define uint16 uint16_t
 #endif
 
 #if !defined(int32) && !defined(HAVE_INT32_FROM_RPC_RPC_H)
-#  if (SIZEOF_INT == 4)
-#    define int32 int
-#  elif (SIZEOF_LONG == 4)
-#    define int32 long
-#  elif (SIZEOF_SHORT == 4)
-#    define int32 short
-#  else
-     /* uggh - no 32 bit type?? probably a CRAY. just hope this works ... */
-#    define int32 int
-#  endif
+#  define int32 int32_t
    /* needed to work around compile issue on HP-UX 11.x */
 #  define _INT32       1
 #endif
@@ -373,16 +322,7 @@ typedef int VOLATILE SIG_ATOMIC_T;
  */
 
 #if !defined(uint32) && !defined(HAVE_UINT32_FROM_RPC_RPC_H)
-#if (SIZEOF_INT == 4)
-#define uint32 unsigned int
-#elif (SIZEOF_LONG == 4)
-#define uint32 unsigned long
-#elif (SIZEOF_SHORT == 4)
-#define uint32 unsigned short
-#else
-/* uggh - no 32 bit type?? probably a CRAY. just hope this works ... */
-#define uint32 unsigned
-#endif
+#  define uint32 uint32_t
 #endif
 
 /*
@@ -390,19 +330,11 @@ typedef int VOLATILE SIG_ATOMIC_T;
  */
 
 #if !defined(uint64)
-#if (SIZEOF_LONG == 8)
-#define uint64 unsigned long
-#elif (SIZEOF_LONG_LONG == 8)
-#define uint64 unsigned long long
-#endif /* don't lie.  If we don't have it, then don't use it */
+#  define uint64 uint64_t
 #endif
 
 #if !defined(int64)
-#if (SIZEOF_LONG == 8)
-#define int64 long
-#elif (SIZEOF_LONG_LONG == 8)
-#define int64 long long
-#endif /* don't lie.  If we don't have it, then don't use it */
+#  define int64 int64_t
 #endif
 
 
@@ -426,7 +358,7 @@ typedef int VOLATILE SIG_ATOMIC_T;
 
 #ifdef LARGE_SMB_DEV_T
 #define SDEV_T_VAL(p, ofs, v) (SIVAL((p),(ofs),(v)&0xFFFFFFFF), SIVAL((p),(ofs)+4,(v)>>32))
-#define DEV_T_VAL(p, ofs) ((SMB_DEV_T)(((SMB_BIG_UINT)(IVAL((p),(ofs))))| (((SMB_BIG_UINT)(IVAL((p),(ofs)+4))) << 32)))
+#define DEV_T_VAL(p, ofs) ((SMB_DEV_T)(((uint64_t)(IVAL((p),(ofs))))| (((uint64_t)(IVAL((p),(ofs)+4))) << 32)))
 #else 
 #define SDEV_T_VAL(p, ofs, v) (SIVAL((p),(ofs),v),SIVAL((p),(ofs)+4,0))
 #define DEV_T_VAL(p, ofs) ((SMB_DEV_T)(IVAL((p),(ofs))))
@@ -452,7 +384,7 @@ typedef int VOLATILE SIG_ATOMIC_T;
 
 #ifdef LARGE_SMB_INO_T
 #define SINO_T_VAL(p, ofs, v) (SIVAL((p),(ofs),(v)&0xFFFFFFFF), SIVAL((p),(ofs)+4,(v)>>32))
-#define INO_T_VAL(p, ofs) ((SMB_INO_T)(((SMB_BIG_UINT)(IVAL(p,ofs)))| (((SMB_BIG_UINT)(IVAL(p,(ofs)+4))) << 32)))
+#define INO_T_VAL(p, ofs) ((SMB_INO_T)(((uint64_t)(IVAL(p,ofs)))| (((uint64_t)(IVAL(p,(ofs)+4))) << 32)))
 #else 
 #define SINO_T_VAL(p, ofs, v) (SIVAL(p,ofs,v),SIVAL(p,(ofs)+4,0))
 #define INO_T_VAL(p, ofs) ((SMB_INO_T)(IVAL((p),(ofs))))
@@ -466,20 +398,13 @@ typedef int VOLATILE SIG_ATOMIC_T;
 #  endif
 #endif
 
-#if defined(HAVE_LONGLONG)
-#define SMB_BIG_UINT unsigned long long
-#define SMB_BIG_INT long long
 #define SBIG_UINT(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,(v)>>32))
-#else
-#define SMB_BIG_UINT unsigned long
-#define SMB_BIG_INT long
-#define SBIG_UINT(p, ofs, v) (SIVAL(p,ofs,v),SIVAL(p,(ofs)+4,0))
-#endif
+#define IVAL2_TO_SMB_BIG_UINT(buf,off) ( (((uint64_t)(IVAL((buf),(off)))) & ((uint64_t)0xFFFFFFFF)) | \
+               (( ((uint64_t)(IVAL((buf),(off+4)))) & ((uint64_t)0xFFFFFFFF) ) << 32 ) )
 
-#define SMB_BIG_UINT_BITS (sizeof(SMB_BIG_UINT)*8)
 
 /* this should really be a 64 bit type if possible */
-#define br_off SMB_BIG_UINT
+typedef uint64_t br_off;
 
 #define SMB_OFF_T_BITS (sizeof(SMB_OFF_T)*8)
 
@@ -497,15 +422,11 @@ typedef int VOLATILE SIG_ATOMIC_T;
 #ifdef LARGE_SMB_OFF_T
 #define SOFF_T(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,(v)>>32))
 #define SOFF_T_R(p, ofs, v) (SIVAL(p,(ofs)+4,(v)&0xFFFFFFFF), SIVAL(p,ofs,(v)>>32))
-#define IVAL_TO_SMB_OFF_T(buf,off) ((SMB_OFF_T)(( ((SMB_BIG_UINT)(IVAL((buf),(off)))) & ((SMB_BIG_UINT)0xFFFFFFFF) )))
-#define IVAL2_TO_SMB_BIG_UINT(buf,off) ( (((SMB_BIG_UINT)(IVAL((buf),(off)))) & ((SMB_BIG_UINT)0xFFFFFFFF)) | \
-               (( ((SMB_BIG_UINT)(IVAL((buf),(off+4)))) & ((SMB_BIG_UINT)0xFFFFFFFF) ) << 32 ) )
+#define IVAL_TO_SMB_OFF_T(buf,off) ((SMB_OFF_T)(( ((uint64_t)(IVAL((buf),(off)))) & ((uint64_t)0xFFFFFFFF) )))
 #else 
 #define SOFF_T(p, ofs, v) (SIVAL(p,ofs,v),SIVAL(p,(ofs)+4,0))
 #define SOFF_T_R(p, ofs, v) (SIVAL(p,(ofs)+4,v),SIVAL(p,ofs,0))
 #define IVAL_TO_SMB_OFF_T(buf,off) ((SMB_OFF_T)(( ((uint32)(IVAL((buf),(off)))) & 0xFFFFFFFF )))
-#define IVAL2_TO_SMB_BIG_UINT(buf,off) ( (((SMB_BIG_UINT)(IVAL((buf),(off)))) & ((SMB_BIG_UINT)0xFFFFFFFF)) | \
-                               (( ((SMB_BIG_UINT)(IVAL((buf),(off+4)))) & ((SMB_BIG_UINT)0xFFFFFFFF) ) << 32 ) )
 #endif
 
 /*
@@ -645,14 +566,24 @@ struct timespec {
 typedef char fstring[FSTRING_LEN];
 #endif
 
+/* Samba 3 doesn't use iconv_convenience: */
+extern void *global_loadparm;
+extern void *cmdline_lp_ctx;
+struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
+
 /* Lists, trees, caching, database... */
-#include "xfile.h"
+#include "../lib/util/xfile.h"
+#include "../lib/util/memory.h"
+#include "../lib/util/attr.h"
 #include "intl.h"
-#include "dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "tdb.h"
 #include "util_tdb.h"
 
 #include "../talloc/talloc.h"
+
+#include "../lib/util/data_blob.h"
+#include "../lib/util/time.h"
 /* And a little extension. Abort on type mismatch */
 #define talloc_get_type_abort(ptr, type) \
        (type *)talloc_check_name_abort(ptr, #type)
@@ -675,7 +606,7 @@ typedef char fstring[FSTRING_LEN];
 #include "smb.h"
 #include "nameserv.h"
 #include "secrets.h"
-#include "byteorder.h"
+#include "../lib/util/byteorder.h"
 #include "privileges.h"
 #include "rpc_misc.h"
 #include "rpc_dce.h"
@@ -687,6 +618,7 @@ typedef char fstring[FSTRING_LEN];
 #include "msdfs.h"
 #include "rap.h"
 #include "../lib/crypto/md5.h"
+#include "../lib/crypto/arcfour.h"
 #include "../lib/crypto/crc32.h"
 #include "../lib/crypto/hmacmd5.h"
 #include "ntlmssp.h"
@@ -832,14 +764,6 @@ enum flush_reason_enum {
 /* prototypes from lib/util_transfer_file.c */
 #include "transfer_file.h"
 
-#ifdef __COMPAR_FN_T
-#define QSORT_CAST (__compar_fn_t)
-#endif
-
-#ifndef QSORT_CAST
-#define QSORT_CAST (int (*)(const void *, const void *))
-#endif
-
 #ifndef DEFAULT_PRINTING
 #ifdef HAVE_CUPS
 #define DEFAULT_PRINTING PRINT_CUPS
@@ -889,26 +813,10 @@ enum flush_reason_enum {
 #define SYNC_DNS 1
 #endif
 
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#endif
-
-#ifndef INADDR_LOOPBACK
-#define INADDR_LOOPBACK 0x7f000001
-#endif
-
-#ifndef INADDR_NONE
-#define INADDR_NONE 0xffffffff
-#endif
-
 #ifndef HAVE_CRYPT
 #define crypt ufc_crypt
 #endif
 
-#ifndef O_ACCMODE
-#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
-#endif
-
 #if defined(HAVE_CRYPT16) && defined(HAVE_GETAUTHUID)
 #define ULTRIX_AUTH 1
 #endif
@@ -921,26 +829,9 @@ int setresuid(uid_t ruid, uid_t euid, uid_t suid);
 int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
 #endif
 
-/*
- * Some older systems seem not to have MAXHOSTNAMELEN
- * defined.
- */
-#ifndef MAXHOSTNAMELEN
-#define MAXHOSTNAMELEN 255
-#endif
-
 /* yuck, I'd like a better way of doing this */
 #define DIRP_SIZE (256 + 32)
 
-/*
- * glibc on linux doesn't seem to have MSG_WAITALL
- * defined. I think the kernel has it though..
- */
-
-#ifndef MSG_WAITALL
-#define MSG_WAITALL 0
-#endif
-
 /* default socket options. Dave Miller thinks we should default to TCP_NODELAY
    given the socket IO pattern that Samba uses */
 #ifdef TCP_NODELAY
@@ -956,84 +847,6 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
 #endif
 
 
-/* Some POSIX definitions for those without */
-#ifndef S_IFDIR
-#define S_IFDIR         0x4000
-#endif
-#ifndef S_ISDIR
-#define S_ISDIR(mode)   ((mode & 0xF000) == S_IFDIR)
-#endif
-#ifndef S_IRWXU
-#define S_IRWXU 00700           /* read, write, execute: owner */
-#endif
-#ifndef S_IRUSR
-#define S_IRUSR 00400           /* read permission: owner */
-#endif
-#ifndef S_IWUSR
-#define S_IWUSR 00200           /* write permission: owner */
-#endif
-#ifndef S_IXUSR
-#define S_IXUSR 00100           /* execute permission: owner */
-#endif
-#ifndef S_IRWXG
-#define S_IRWXG 00070           /* read, write, execute: group */
-#endif
-#ifndef S_IRGRP
-#define S_IRGRP 00040           /* read permission: group */
-#endif
-#ifndef S_IWGRP
-#define S_IWGRP 00020           /* write permission: group */
-#endif
-#ifndef S_IXGRP
-#define S_IXGRP 00010           /* execute permission: group */
-#endif
-#ifndef S_IRWXO
-#define S_IRWXO 00007           /* read, write, execute: other */
-#endif
-#ifndef S_IROTH
-#define S_IROTH 00004           /* read permission: other */
-#endif
-#ifndef S_IWOTH
-#define S_IWOTH 00002           /* write permission: other */
-#endif
-#ifndef S_IXOTH
-#define S_IXOTH 00001           /* execute permission: other */
-#endif
-
-/* For sys_adminlog(). */
-#ifndef LOG_EMERG
-#define LOG_EMERG       0       /* system is unusable */
-#endif
-
-#ifndef LOG_ALERT
-#define LOG_ALERT       1       /* action must be taken immediately */
-#endif
-
-#ifndef LOG_CRIT
-#define LOG_CRIT        2       /* critical conditions */
-#endif
-
-#ifndef LOG_ERR
-#define LOG_ERR         3       /* error conditions */
-#endif
-
-#ifndef LOG_WARNING
-#define LOG_WARNING     4       /* warning conditions */
-#endif
-
-#ifndef LOG_NOTICE
-#define LOG_NOTICE      5       /* normal but significant condition */
-#endif
-
-#ifndef LOG_INFO
-#define LOG_INFO        6       /* informational */
-#endif
-
-#ifndef LOG_DEBUG
-#define LOG_DEBUG       7       /* debug-level messages */
-#endif
-
 #if HAVE_KERNEL_SHARE_MODES
 #ifndef LOCK_MAND 
 #define LOCK_MAND      32      /* This is a mandatory flock */
@@ -1061,19 +874,6 @@ extern int DEBUGLEVEL;
 #endif
 
 
-/* Needed for sys_dlopen/sys_dlsym/sys_dlclose */
-#ifndef RTLD_GLOBAL
-#define RTLD_GLOBAL 0
-#endif
-
-#ifndef RTLD_LAZY
-#define RTLD_LAZY 0
-#endif
-
-#ifndef RTLD_NOW
-#define RTLD_NOW 0
-#endif
-
 /* needed for some systems without iconv. Doesn't really matter
    what error code we use */
 #ifndef EILSEQ
@@ -1106,17 +906,6 @@ char *talloc_asprintf_strupper_m(TALLOC_CTX *t, const char *fmt, ...) PRINTF_ATT
 #define slprintf snprintf
 #define vslprintf vsnprintf
 
-/* we need to use __va_copy() on some platforms */
-#ifdef HAVE_VA_COPY
-#define VA_COPY(dest, src) va_copy(dest, src)
-#else
-#ifdef HAVE___VA_COPY
-#define VA_COPY(dest, src) __va_copy(dest, src)
-#else
-#define VA_COPY(dest, src) (dest) = (src)
-#endif
-#endif
-
 /*
  * Veritas File System.  Often in addition to native.
  * Quotas different.
@@ -1272,10 +1061,6 @@ LDAP *ldap_open_with_timeout(const char *server, int port, unsigned int to);
 ssize_t readahead(int fd, off64_t offset, size_t count);
 #endif
 
-/* TRUE and FALSE are part of the C99 standard and gcc, but
-   unfortunately many vendor compilers don't support them.  Use True
-   and False instead. */
-
 #ifdef TRUE
 #undef TRUE
 #endif
@@ -1296,19 +1081,11 @@ ssize_t readahead(int fd, off64_t offset, size_t count);
 #define CONST_DISCARD(type, ptr)      ((type) ((void *) (ptr)))
 #define CONST_ADD(type, ptr)          ((type) ((const void *) (ptr)))
 
-#ifndef NORETURN_ATTRIBUTE
-#if (__GNUC__ >= 3)
-#define NORETURN_ATTRIBUTE __attribute__ ((noreturn))
-#else
-#define NORETURN_ATTRIBUTE
-#endif
-#endif
-
-void smb_panic( const char *why ) NORETURN_ATTRIBUTE ;
-void dump_core(void) NORETURN_ATTRIBUTE ;
-void exit_server(const char *const reason) NORETURN_ATTRIBUTE ;
-void exit_server_cleanly(const char *const reason) NORETURN_ATTRIBUTE ;
-void exit_server_fault(void) NORETURN_ATTRIBUTE ;
+void smb_panic( const char *why ) _NORETURN_;
+void dump_core(void) _NORETURN_;
+void exit_server(const char *const reason) _NORETURN_;
+void exit_server_cleanly(const char *const reason) _NORETURN_;
+void exit_server_fault(void) _NORETURN_;
 
 #ifdef HAVE_LIBNSCD
 #include "libnscd.h"
index db805a20932d7c747e013aef000743d2951adc45..785f116e1ce586ba85460dc7bd97005859616bfb 100644 (file)
@@ -82,7 +82,6 @@ struct server_id {
 
 struct messaging_context;
 struct messaging_rec;
-struct data_blob;
 
 /*
  * struct messaging_context belongs to messages.c, but because we still have
@@ -102,7 +101,7 @@ struct messaging_context {
 struct messaging_backend {
        NTSTATUS (*send_fn)(struct messaging_context *msg_ctx,
                            struct server_id pid, int msg_type,
-                           const struct data_blob *data,
+                           const DATA_BLOB *data,
                            struct messaging_backend *backend);
        void *private_data;
 };
@@ -138,12 +137,12 @@ NTSTATUS messaging_register(struct messaging_context *msg_ctx,
                                       void *private_data, 
                                       uint32_t msg_type, 
                                       struct server_id server_id,
-                                      struct data_blob *data));
+                                      DATA_BLOB *data));
 void messaging_deregister(struct messaging_context *ctx, uint32_t msg_type,
                          void *private_data);
 NTSTATUS messaging_send(struct messaging_context *msg_ctx,
                        struct server_id server, 
-                       uint32_t msg_type, const struct data_blob *data);
+                       uint32_t msg_type, const DATA_BLOB *data);
 NTSTATUS messaging_send_buf(struct messaging_context *msg_ctx,
                            struct server_id server, uint32_t msg_type,
                            const uint8 *buf, size_t len);
index 20dbaba6b40b21a08473f4f96555f78a71e2718e..52245e01d2ac3a21cd9701f2cd340b344010a4b7 100644 (file)
@@ -23,6 +23,7 @@
 /* Module support */
 typedef NTSTATUS (init_module_function) (void);
 
+NTSTATUS init_samba_module(void);
 
 typedef int smb_event_id_t;
 #define SMB_EVENT_ID_INVALID   (-1)
index a7d46e72d8c9516bd723a5272d0f37c95a41b53a..496d87e2dbace6ceb90cbc41958fc3d9f6aeb1e3 100644 (file)
@@ -208,7 +208,7 @@ struct nmb_data {
        time_t death_time; /* The time the record must be removed (do not remove if 0). */
        time_t refresh_time; /* The time the record should be refreshed. */
   
-       SMB_BIG_UINT id;                /* unique id */
+       uint64_t id;            /* unique id */
        struct in_addr wins_ip; /* the adress of the wins server this record comes from */
 
        int wins_flags;         /* similar to the netbios flags but different ! */
@@ -606,7 +606,7 @@ typedef struct _WINS_RECORD {
        char type;
        int nb_flags;
        int wins_flags;
-       SMB_BIG_UINT id;
+       uint64_t id;
        int num_ips;
        struct in_addr ip[25];
        struct in_addr wins_ip;
diff --git a/source3/include/ndr.h b/source3/include/ndr.h
deleted file mode 100644 (file)
index a416866..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/* dummy file to deal with pidl autogenerated ndr files */
index de0a31360985f73c54c2694437b53ec01c4cb6d6..e6c97c69dc2c1f2566cff251417a958700a7d3d9 100644 (file)
@@ -287,63 +287,6 @@ typedef struct pipes_struct {
 
 } pipes_struct;
 
-typedef struct smb_np_struct {
-       struct smb_np_struct *next, *prev;
-       int pnum;
-       connection_struct *conn;
-       uint16 vuid; /* points to the unauthenticated user that opened this pipe. */
-       bool open; /* open connection */
-       uint16 device_state;
-       uint16 priority;
-       char *name;
-
-       /* When replying to an SMBtrans, this is the maximum amount of
-           data that can be sent in the initial reply. */
-       int max_trans_reply;
-
-       /*
-        * NamedPipe state information.
-        */
-       struct pipes_struct *np_state;
-
-       /*
-        * NamedPipe functions, to be called to perform
-        * Named Pipe transactions on request from an
-        * SMB client.
-        */
-
-       /* call to create a named pipe connection.
-        * returns: state information representing the connection.
-        *          is stored in np_state, above.
-        */
-       struct pipes_struct *(*namedpipe_create)(
-               const char *pipe_name,
-               const char *client_address,
-               struct auth_serversupplied_info *server_info,
-               uint16_t vuid);
-
-       /* call to perform a write namedpipe operation
-        */
-       ssize_t (*namedpipe_write)(struct pipes_struct *p,
-                                  char *data, size_t n);
-
-       /* call to perform a read namedpipe operation.
-        *
-        * NOTE: the only reason that the pipe_outstanding
-        * argument is here is because samba does not use
-        * the namedpipe_transact function yet: instead,
-        * it performs the same as what namedpipe_transact
-        * does - a write, followed by a read.
-        *
-        * when samba is modified to use namedpipe_transact,
-        * the pipe_outstanding argument may be removed.
-        */
-       ssize_t (*namedpipe_read)(struct pipes_struct *p,
-                                 char *data, size_t max_len,
-                                 bool *pipe_outstanding);
-
-} smb_np_struct;
-
 struct api_struct {  
        const char *name;
        uint8 opnum;
index 3fb41c56131d299bc7ff245d561cfd0efc0f7c93..b014b2170c7f3b1700412ea22216118886bc6414 100644 (file)
@@ -157,14 +157,14 @@ typedef struct ntlmssp_state
        unsigned char recv_sign_key[16];
        unsigned char recv_seal_key[16];
 
-       unsigned char send_seal_arc4_state[258];
-       unsigned char recv_seal_arc4_state[258];
+       struct arcfour_state send_seal_arc4_state;
+       struct arcfour_state recv_seal_arc4_state;
 
        uint32 ntlm2_send_seq_num;
        uint32 ntlm2_recv_seq_num;
 
        /* ntlmv1 */
-       unsigned char ntlmv1_arc4_state[258];
+       struct arcfour_state ntlmv1_arc4_state;
        uint32 ntlmv1_seq_num;
 
        /* it turns out that we don't always get the
index ed503b38543a03dd47aad05726bc31284c741644..9aa8b9139e764315e7b02dcd3b8324c73475322c 100644 (file)
 #define QUOTAS_4000            0x4000
 #define QUOTAS_8000            0x8000
 
-#define SMB_NTQUOTAS_NO_LIMIT  ((SMB_BIG_UINT)(-1))
-#define SMB_NTQUOTAS_NO_ENTRY  ((SMB_BIG_UINT)(-2))
-#define SMB_NTQUOTAS_NO_SPACE  ((SMB_BIG_UINT)(0))
-#define SMB_NTQUOTAS_1_B       (SMB_BIG_UINT)0x0000000000000001
-#define SMB_NTQUOTAS_1KB       (SMB_BIG_UINT)0x0000000000000400
-#define SMB_NTQUOTAS_1MB       (SMB_BIG_UINT)0x0000000000100000
-#define SMB_NTQUOTAS_1GB       (SMB_BIG_UINT)0x0000000040000000
-#define SMB_NTQUOTAS_1TB       (SMB_BIG_UINT)0x0000010000000000
-#define SMB_NTQUOTAS_1PB       (SMB_BIG_UINT)0x0004000000000000
-#define SMB_NTQUOTAS_1EB       (SMB_BIG_UINT)0x1000000000000000
+#define SMB_NTQUOTAS_NO_LIMIT  ((uint64_t)(-1))
+#define SMB_NTQUOTAS_NO_ENTRY  ((uint64_t)(-2))
+#define SMB_NTQUOTAS_NO_SPACE  ((uint64_t)(0))
+#define SMB_NTQUOTAS_1_B       (uint64_t)0x0000000000000001
+#define SMB_NTQUOTAS_1KB       (uint64_t)0x0000000000000400
+#define SMB_NTQUOTAS_1MB       (uint64_t)0x0000000000100000
+#define SMB_NTQUOTAS_1GB       (uint64_t)0x0000000040000000
+#define SMB_NTQUOTAS_1TB       (uint64_t)0x0000010000000000
+#define SMB_NTQUOTAS_1PB       (uint64_t)0x0004000000000000
+#define SMB_NTQUOTAS_1EB       (uint64_t)0x1000000000000000
 
 enum SMB_QUOTA_TYPE {
        SMB_INVALID_QUOTA_TYPE = -1,
@@ -68,9 +68,9 @@ enum SMB_QUOTA_TYPE {
 
 typedef struct _SMB_NTQUOTA_STRUCT {
        enum SMB_QUOTA_TYPE qtype;
-       SMB_BIG_UINT usedspace;
-       SMB_BIG_UINT softlim;
-       SMB_BIG_UINT hardlim;
+       uint64_t usedspace;
+       uint64_t softlim;
+       uint64_t hardlim;
        uint32 qflags;
        DOM_SID sid;
 } SMB_NTQUOTA_STRUCT;
index d5174229cadfa33e9fe849bbe66eaf82a0a8b33d..05974da8fc59e5a23ff1d7f52fb267e8caf925a3 100644 (file)
@@ -46,10 +46,10 @@ NTSTATUS packet_fd_read_sync(struct packet_context *ctx);
  * Otherwise return True and store the callback result in *status
  */
 bool packet_handler(struct packet_context *ctx,
-                   bool (*full_req)(const struct data_blob *data,
+                   bool (*full_req)(const DATA_BLOB *data,
                                     size_t *length,
                                     void *private_data),
-                   NTSTATUS (*callback)(const struct data_blob *data,
+                   NTSTATUS (*callback)(const DATA_BLOB *data,
                                         void *private_data),
                    void *private_data,
                    NTSTATUS *status);
index fc497b69661c71857968e5f64f0c380547a5acd0..156e66d4dced03bcf3e8b25b8151739a04f2fa11 100644 (file)
@@ -315,11 +315,6 @@ int afs_syscall( int subcall,
 bool afs_settoken_str(const char *token_string);
 bool afs_settoken_str(const char *token_string);
 
-/* The following definitions come from lib/arc4.c  */
-
-void smb_arc4_init(unsigned char arc4_state_out[258], const unsigned char *key, size_t keylen);
-void smb_arc4_crypt(unsigned char arc4_state_inout[258], unsigned char *data, size_t len);
-
 /* The following definitions come from lib/audit.c  */
 
 const char *audit_category_str(uint32 category);
@@ -440,18 +435,6 @@ int connections_forall(int (*fn)(struct db_record *rec,
                       void *private_data);
 bool connections_init(bool rw);
 
-/* The following definitions come from lib/data_blob.c  */
-
-DATA_BLOB data_blob(const void *p, size_t length);
-DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length);
-void data_blob_free(DATA_BLOB *d);
-void data_blob_clear(DATA_BLOB *d);
-void data_blob_clear_free(DATA_BLOB *d);
-DATA_BLOB data_blob_string_const(const char *str);
-DATA_BLOB data_blob_const(const void *p, size_t length);
-DATA_BLOB data_blob_talloc_zero(TALLOC_CTX *mem_ctx, size_t length);
-_PUBLIC_ char *data_blob_hex_string(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob);
-
 /* The following definitions come from lib/dbwrap_util.c  */
 
 int32_t dbwrap_fetch_int32(struct db_context *db, const char *keystr);
@@ -491,7 +474,8 @@ void force_check_log_size( void );
 bool need_to_check_log_size( void );
 void check_log_size( void );
 void dbgflush( void );
-bool dbghdr(int level, int cls, const char *file, const char *func, int line);
+bool dbghdrclass(int level, int cls, const char *location, const char *func);
+bool dbghdr(int level, const char *location, const char *func);
 TALLOC_CTX *debug_ctx(void);
 
 /* The following definitions come from lib/display_sec.c  */
@@ -573,7 +557,7 @@ void pull_file_id_16(char *buf, struct file_id *id);
 
 /* The following definitions come from lib/fsusage.c  */
 
-int sys_fsusage(const char *path, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
+int sys_fsusage(const char *path, uint64_t *dfree, uint64_t *dsize);
 
 /* The following definitions come from lib/gencache.c  */
 
@@ -593,8 +577,8 @@ void gencache_unlock_entry( const char *key );
 
 void set_rand_reseed_callback(void (*fn)(int *));
 void set_need_random_reseed(void);
-void generate_random_buffer( unsigned char *out, int len);
-char *generate_random_str(size_t len);
+void generate_random_buffer(uint8_t *out, int len);
+char *generate_random_str(TALLOC_CTX *mem_ctx, size_t len);
 
 /* The following definitions come from lib/iconv.c  */
 
@@ -785,12 +769,6 @@ int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorf
 
 /* The following definitions come from lib/sendfile.c  */
 
-ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
-ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
-ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
-ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
-ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
-ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
 
 /* The following definitions come from lib/server_mutex.c  */
@@ -1131,11 +1109,9 @@ void push_dos_date3(uint8_t *buf,int offset,time_t unixdate, int zone_offset);
 time_t pull_dos_date(const uint8_t *date_ptr, int zone_offset);
 time_t pull_dos_date2(const uint8_t *date_ptr, int zone_offset);
 time_t pull_dos_date3(const uint8_t *date_ptr, int zone_offset);
-char *http_timestring(time_t t);
 char *timestring(TALLOC_CTX *mem_ctx, time_t t);
 const char *nt_time_string(TALLOC_CTX *mem_ctx, NTTIME nt);
 NTTIME nttime_from_string(const char *s);
-int64_t usec_time_diff(struct timeval *tv1, struct timeval *tv2);
 struct timeval timeval_zero(void);
 bool timeval_is_zero(const struct timeval *tv);
 struct timeval timeval_current(void);
@@ -1250,10 +1226,12 @@ const char *tmpdir(void);
 bool add_gid_to_array_unique(TALLOC_CTX *mem_ctx, gid_t gid,
                             gid_t **gids, size_t *num_gids);
 const char *get_numlist(const char *p, uint32 **num, int *count);
-bool file_exist(const char *fname,SMB_STRUCT_STAT *sbuf);
+bool file_exist_stat(const char *fname,SMB_STRUCT_STAT *sbuf);
+bool file_exist(const char *fname);
 bool socket_exist(const char *fname);
 time_t file_modtime(const char *fname);
-bool directory_exist(char *dname,SMB_STRUCT_STAT *st);
+bool directory_exist_stat(char *dname,SMB_STRUCT_STAT *st);
+bool directory_exist(const char *dname);
 SMB_OFF_T get_file_size(char *file_name);
 char *attrib_string(uint16 mode);
 void show_msg(char *buf);
@@ -1281,7 +1259,7 @@ void add_to_large_array(TALLOC_CTX *mem_ctx, size_t element_size,
                        void *element, void *_array, uint32 *num_elements,
                        ssize_t *array_size);
 void safe_free(void *p);
-char *get_myname(TALLOC_CTX *ctx);
+char *talloc_get_myname(TALLOC_CTX *ctx);
 char *get_mydnsdomname(TALLOC_CTX *ctx);
 int interpret_protocol(const char *str,int def);
 char *automount_lookup(TALLOC_CTX *ctx, const char *user_name);
@@ -1309,6 +1287,7 @@ enum remote_arch_types get_remote_arch(void);
 void print_asc(int level, const unsigned char *buf,int len);
 void dump_data(int level, const unsigned char *buf1,int len);
 void dump_data_pw(const char *msg, const uchar * data, size_t len);
+void dump_data_skip_zeros(int level, const uint8_t *buf, int len);
 const char *tab_depth(int level, int depth);
 int str_checksum(const char *s);
 void zero_free(void *p, size_t size);
@@ -1380,16 +1359,16 @@ const char *strip_hostname(const char *s);
 /* The following definitions come from lib/util_file.c  */
 
 char *fgets_slash(char *s2,int maxlen,XFILE *f);
-char *fd_load(int fd, size_t *psize, size_t maxsize);
-char *file_load(const char *fname, size_t *size, size_t maxsize);
+char *file_load(const char *fname, size_t *size, size_t maxsize, TALLOC_CTX *mem_ctx);
+char **file_lines_parse(char *p, size_t size, int *numlines, TALLOC_CTX *mem_ctx);
 bool unmap_file(void* start, size_t size);
-void *map_file(char *fname, size_t size);
-char **file_lines_load(const char *fname, int *numlines, size_t maxsize);
-char **fd_lines_load(int fd, int *numlines, size_t maxsize);
-char **file_lines_pload(char *syscmd, int *numlines);
+void *map_file(const char *fname, size_t size);
+char **file_lines_load(const char *fname, int *numlines, size_t maxsize, TALLOC_CTX *mem_ctx);
+char **fd_lines_load(int fd, int *numlines, size_t maxsize, TALLOC_CTX *mem_ctx);
+char **file_lines_pload(const char *syscmd, int *numlines);
 void file_lines_free(char **lines);
 void file_lines_slashcont(char **lines);
-bool file_save(const char *fname, void *packet, size_t length);
+bool file_save(const char *fname, const void *packet, size_t length);
 
 /* The following definitions come from lib/util_nscd.c  */
 
@@ -1629,7 +1608,7 @@ char *alpha_strcpy_fn(const char *fn,
 char *StrnCpy_fn(const char *fn, int line,char *dest,const char *src,size_t n);
 size_t strhex_to_str(char *buf, size_t buf_len, const char *strhex, size_t strhex_len);
 DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex);
-char *hex_encode(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len);
+char *hex_encode_talloc(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len);
 bool in_list(const char *s, const char *list, bool casesensitive);
 void string_free(char **s);
 bool string_set(char **dest,const char *src);
@@ -1678,9 +1657,9 @@ char *binary_string_rfc2254(char *buf, int len);
 char *binary_string(char *buf, int len);
 int fstr_sprintf(fstring s, const char *fmt, ...);
 char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const char *sep);
-bool str_list_copy(TALLOC_CTX *mem_ctx, char ***dest, const char **src);
-bool str_list_compare(char **list1, char **list2);
-int str_list_count( const char **list );
+char **str_list_copy(TALLOC_CTX *mem_ctx, const char **list);
+bool str_list_equal(const char **list1, const char **list2);
+size_t str_list_length( const char * const*list );
 bool str_list_sub_basic( char **list, const char *smb_name,
                         const char *domain_name );
 bool str_list_substitute(char **list, const char *pattern, const char *insert);
@@ -1693,7 +1672,7 @@ void rfc1738_unescape(char *buf);
 DATA_BLOB base64_decode_data_blob(const char *s);
 void base64_decode_inplace(char *s);
 char *base64_encode_data_blob(TALLOC_CTX *mem_ctx, DATA_BLOB data);
-SMB_BIG_UINT STR_TO_SMB_BIG_UINT(const char *nptr, const char **entptr);
+uint64_t STR_TO_SMB_BIG_UINT(const char *nptr, const char **entptr);
 SMB_OFF_T conv_str_size(const char * str);
 void string_append(char **left, const char *right);
 bool add_string_to_array(TALLOC_CTX *mem_ctx,
@@ -1779,9 +1758,6 @@ int islower_ascii(int c);
 
 void smb_uuid_pack(const struct GUID uu, UUID_FLAT *ptr);
 void smb_uuid_unpack(const UUID_FLAT in, struct GUID *uu);
-void smb_uuid_generate_random(struct GUID *uu);
-const char *smb_uuid_string(TALLOC_CTX *mem_ctx, const struct GUID uu);
-bool smb_string_to_uuid(const char *in, struct GUID* uu);
 char *guid_binstring(const struct GUID *guid);
 
 /* The following definitions come from lib/version.c  */
@@ -2562,16 +2538,6 @@ _PUBLIC_ void ndr_print_eventlog_WriteClusterEvents(struct ndr_print *ndr, const
 _PUBLIC_ void ndr_print_eventlog_GetLogIntormation(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetLogIntormation *r);
 _PUBLIC_ void ndr_print_eventlog_FlushEventLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_FlushEventLog *r);
 
-/* The following definitions come from librpc/gen_ndr/ndr_initshutdown.c  */
-
-_PUBLIC_ void ndr_print_initshutdown_String_sub(struct ndr_print *ndr, const char *name, const struct initshutdown_String_sub *r);
-_PUBLIC_ enum ndr_err_code ndr_push_initshutdown_String(struct ndr_push *ndr, int ndr_flags, const struct initshutdown_String *r);
-_PUBLIC_ enum ndr_err_code ndr_pull_initshutdown_String(struct ndr_pull *ndr, int ndr_flags, struct initshutdown_String *r);
-_PUBLIC_ void ndr_print_initshutdown_String(struct ndr_print *ndr, const char *name, const struct initshutdown_String *r);
-_PUBLIC_ void ndr_print_initshutdown_Init(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_Init *r);
-_PUBLIC_ void ndr_print_initshutdown_Abort(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_Abort *r);
-_PUBLIC_ void ndr_print_initshutdown_InitEx(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_InitEx *r);
-
 /* The following definitions come from librpc/gen_ndr/ndr_krb5pac.c  */
 
 _PUBLIC_ void ndr_print_PAC_LOGON_NAME(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_NAME *r);
@@ -2665,7 +2631,15 @@ _PUBLIC_ void ndr_print_lsa_PrivilegeSet(struct ndr_print *ndr, const char *name
 _PUBLIC_ void ndr_print_lsa_DATA_BUF(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF *r);
 _PUBLIC_ void ndr_print_lsa_DATA_BUF2(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF2 *r);
 _PUBLIC_ void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print *ndr, const char *name, enum lsa_TrustDomInfoEnum r);
+_PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustDirection(struct ndr_push *ndr, int ndr_flags, uint32_t r);
+_PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustDirection(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
+_PUBLIC_ void ndr_print_lsa_TrustDirection(struct ndr_print *ndr, const char *name, uint32_t r);
+_PUBLIC_ void ndr_print_lsa_TrustType(struct ndr_print *ndr, const char *name, enum lsa_TrustType r);
+_PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustAttributes(struct ndr_push *ndr, int ndr_flags, uint32_t r);
+_PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustAttributes(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
+_PUBLIC_ void ndr_print_lsa_TrustAttributes(struct ndr_print *ndr, const char *name, uint32_t r);
 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoName(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoName *r);
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoControllers(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoControllers *r);
 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoPosixOffset(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPosixOffset *r);
 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoPassword(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPassword *r);
 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBasic(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBasic *r);
@@ -2673,8 +2647,11 @@ _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx(struct ndr_print *ndr, const c
 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBuffer(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBuffer *r);
 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoAuthInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfo *r);
 _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo *r);
-_PUBLIC_ void ndr_print_lsa_TrustDomainInfo11(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfo11 *r);
-_PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoAll(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoAll *r);
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfoInternal *r);
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfoInternal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfoInternal *r);
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx2Internal *r);
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo2Internal *r);
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoSupportedEncTypes *r);
 _PUBLIC_ void ndr_print_lsa_TrustedDomainInfo(struct ndr_print *ndr, const char *name, const union lsa_TrustedDomainInfo *r);
 _PUBLIC_ void ndr_print_lsa_DATA_BUF_PTR(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF_PTR *r);
 _PUBLIC_ void ndr_print_lsa_RightSet(struct ndr_print *ndr, const char *name, const struct lsa_RightSet *r);
@@ -2848,9 +2825,11 @@ _PUBLIC_ void ndr_print_netr_IdentityInfo(struct ndr_print *ndr, const char *nam
 _PUBLIC_ void ndr_print_netr_PasswordInfo(struct ndr_print *ndr, const char *name, const struct netr_PasswordInfo *r);
 _PUBLIC_ void ndr_print_netr_ChallengeResponse(struct ndr_print *ndr, const char *name, const struct netr_ChallengeResponse *r);
 _PUBLIC_ void ndr_print_netr_NetworkInfo(struct ndr_print *ndr, const char *name, const struct netr_NetworkInfo *r);
-_PUBLIC_ enum ndr_err_code ndr_push_netr_LogonInfo(struct ndr_push *ndr, int ndr_flags, const union netr_LogonInfo *r);
-_PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr_flags, union netr_LogonInfo *r);
-_PUBLIC_ void ndr_print_netr_LogonInfo(struct ndr_print *ndr, const char *name, const union netr_LogonInfo *r);
+_PUBLIC_ void ndr_print_netr_GenericInfo(struct ndr_print *ndr, const char *name, const struct netr_GenericInfo *r);
+_PUBLIC_ void ndr_print_netr_LogonInfoClass(struct ndr_print *ndr, const char *name, enum netr_LogonInfoClass r);
+_PUBLIC_ enum ndr_err_code ndr_push_netr_LogonLevel(struct ndr_push *ndr, int ndr_flags, const union netr_LogonLevel *r);
+_PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonLevel(struct ndr_pull *ndr, int ndr_flags, union netr_LogonLevel *r);
+_PUBLIC_ void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, const union netr_LogonLevel *r);
 _PUBLIC_ enum ndr_err_code ndr_push_netr_UserSessionKey(struct ndr_push *ndr, int ndr_flags, const struct netr_UserSessionKey *r);
 _PUBLIC_ enum ndr_err_code ndr_pull_netr_UserSessionKey(struct ndr_pull *ndr, int ndr_flags, struct netr_UserSessionKey *r);
 _PUBLIC_ void ndr_print_netr_UserSessionKey(struct ndr_print *ndr, const char *name, const struct netr_UserSessionKey *r);
@@ -2868,6 +2847,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_SamInfo3(struct ndr_pull *ndr, int ndr_
 _PUBLIC_ void ndr_print_netr_SamInfo3(struct ndr_print *ndr, const char *name, const struct netr_SamInfo3 *r);
 _PUBLIC_ void ndr_print_netr_SamInfo6(struct ndr_print *ndr, const char *name, const struct netr_SamInfo6 *r);
 _PUBLIC_ void ndr_print_netr_PacInfo(struct ndr_print *ndr, const char *name, const struct netr_PacInfo *r);
+_PUBLIC_ void ndr_print_netr_GenericInfo2(struct ndr_print *ndr, const char *name, const struct netr_GenericInfo2 *r);
 _PUBLIC_ enum ndr_err_code ndr_push_netr_Validation(struct ndr_push *ndr, int ndr_flags, const union netr_Validation *r);
 _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int ndr_flags, union netr_Validation *r);
 _PUBLIC_ void ndr_print_netr_Validation(struct ndr_print *ndr, const char *name, const union netr_Validation *r);
@@ -2877,7 +2857,6 @@ _PUBLIC_ void ndr_print_netr_Credential(struct ndr_print *ndr, const char *name,
 _PUBLIC_ enum ndr_err_code ndr_push_netr_Authenticator(struct ndr_push *ndr, int ndr_flags, const struct netr_Authenticator *r);
 _PUBLIC_ enum ndr_err_code ndr_pull_netr_Authenticator(struct ndr_pull *ndr, int ndr_flags, struct netr_Authenticator *r);
 _PUBLIC_ void ndr_print_netr_Authenticator(struct ndr_print *ndr, const char *name, const struct netr_Authenticator *r);
-_PUBLIC_ void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, enum netr_LogonLevel r);
 _PUBLIC_ void ndr_print_netr_DELTA_DELETE_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_USER *r);
 _PUBLIC_ void ndr_print_netr_USER_KEY16(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY16 *r);
 _PUBLIC_ void ndr_print_netr_PasswordHistory(struct ndr_print *ndr, const char *name, const struct netr_PasswordHistory *r);
@@ -2925,16 +2904,22 @@ _PUBLIC_ void ndr_print_netr_DsR_DcFlags(struct ndr_print *ndr, const char *name
 _PUBLIC_ enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_DsRGetDCNameInfo *r);
 _PUBLIC_ enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_DsRGetDCNameInfo *r);
 _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char *name, const struct netr_DsRGetDCNameInfo *r);
+_PUBLIC_ void ndr_print_netr_TrustFlags(struct ndr_print *ndr, const char *name, uint32_t r);
 _PUBLIC_ void ndr_print_netr_BinaryString(struct ndr_print *ndr, const char *name, const struct netr_BinaryString *r);
 _PUBLIC_ void ndr_print_netr_DomainQuery1(struct ndr_print *ndr, const char *name, const struct netr_DomainQuery1 *r);
 _PUBLIC_ void ndr_print_netr_DomainQuery(struct ndr_print *ndr, const char *name, const union netr_DomainQuery *r);
+_PUBLIC_ void ndr_print_netr_trust_extension(struct ndr_print *ndr, const char *name, const struct netr_trust_extension *r);
+_PUBLIC_ void ndr_print_netr_trust_extension_container(struct ndr_print *ndr, const char *name, const struct netr_trust_extension_container *r);
 _PUBLIC_ void ndr_print_netr_DomainTrustInfo(struct ndr_print *ndr, const char *name, const struct netr_DomainTrustInfo *r);
+_PUBLIC_ void ndr_print_netr_LsaPolicyInfo(struct ndr_print *ndr, const char *name, const struct netr_LsaPolicyInfo *r);
+_PUBLIC_ enum ndr_err_code ndr_push_netr_WorkstationFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r);
+_PUBLIC_ enum ndr_err_code ndr_pull_netr_WorkstationFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
+_PUBLIC_ void ndr_print_netr_WorkstationFlags(struct ndr_print *ndr, const char *name, uint32_t r);
 _PUBLIC_ void ndr_print_netr_DomainInfo1(struct ndr_print *ndr, const char *name, const struct netr_DomainInfo1 *r);
 _PUBLIC_ void ndr_print_netr_DomainInfo(struct ndr_print *ndr, const char *name, const union netr_DomainInfo *r);
 _PUBLIC_ void ndr_print_netr_CryptPassword(struct ndr_print *ndr, const char *name, const struct netr_CryptPassword *r);
 _PUBLIC_ void ndr_print_netr_DsRAddressToSitenamesWCtr(struct ndr_print *ndr, const char *name, const struct netr_DsRAddressToSitenamesWCtr *r);
 _PUBLIC_ void ndr_print_netr_DsRAddress(struct ndr_print *ndr, const char *name, const struct netr_DsRAddress *r);
-_PUBLIC_ void ndr_print_netr_TrustFlags(struct ndr_print *ndr, const char *name, uint32_t r);
 _PUBLIC_ void ndr_print_netr_TrustType(struct ndr_print *ndr, const char *name, enum netr_TrustType r);
 _PUBLIC_ void ndr_print_netr_TrustAttributes(struct ndr_print *ndr, const char *name, uint32_t r);
 _PUBLIC_ void ndr_print_netr_DomainTrust(struct ndr_print *ndr, const char *name, const struct netr_DomainTrust *r);
@@ -3088,15 +3073,15 @@ _PUBLIC_ enum ndr_err_code ndr_push_samr_PasswordProperties(struct ndr_push *ndr
 _PUBLIC_ enum ndr_err_code ndr_pull_samr_PasswordProperties(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
 _PUBLIC_ void ndr_print_samr_PasswordProperties(struct ndr_print *ndr, const char *name, uint32_t r);
 _PUBLIC_ void ndr_print_samr_DomInfo1(struct ndr_print *ndr, const char *name, const struct samr_DomInfo1 *r);
-_PUBLIC_ void ndr_print_samr_DomInfo2(struct ndr_print *ndr, const char *name, const struct samr_DomInfo2 *r);
+_PUBLIC_ void ndr_print_samr_DomGeneralInformation(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation *r);
 _PUBLIC_ void ndr_print_samr_DomInfo3(struct ndr_print *ndr, const char *name, const struct samr_DomInfo3 *r);
-_PUBLIC_ void ndr_print_samr_DomInfo4(struct ndr_print *ndr, const char *name, const struct samr_DomInfo4 *r);
+_PUBLIC_ void ndr_print_samr_DomOEMInformation(struct ndr_print *ndr, const char *name, const struct samr_DomOEMInformation *r);
 _PUBLIC_ void ndr_print_samr_DomInfo5(struct ndr_print *ndr, const char *name, const struct samr_DomInfo5 *r);
 _PUBLIC_ void ndr_print_samr_DomInfo6(struct ndr_print *ndr, const char *name, const struct samr_DomInfo6 *r);
 _PUBLIC_ void ndr_print_samr_DomInfo7(struct ndr_print *ndr, const char *name, const struct samr_DomInfo7 *r);
 _PUBLIC_ void ndr_print_samr_DomInfo8(struct ndr_print *ndr, const char *name, const struct samr_DomInfo8 *r);
 _PUBLIC_ void ndr_print_samr_DomInfo9(struct ndr_print *ndr, const char *name, const struct samr_DomInfo9 *r);
-_PUBLIC_ void ndr_print_samr_DomInfo11(struct ndr_print *ndr, const char *name, const struct samr_DomInfo11 *r);
+_PUBLIC_ void ndr_print_samr_DomGeneralInformation2(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation2 *r);
 _PUBLIC_ void ndr_print_samr_DomInfo12(struct ndr_print *ndr, const char *name, const struct samr_DomInfo12 *r);
 _PUBLIC_ void ndr_print_samr_DomInfo13(struct ndr_print *ndr, const char *name, const struct samr_DomInfo13 *r);
 _PUBLIC_ void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name, const union samr_DomainInfo *r);
@@ -3697,15 +3682,6 @@ _PUBLIC_ void ndr_print_wkssvc_NetrRemoveAlternateComputerName(struct ndr_print
 _PUBLIC_ void ndr_print_wkssvc_NetrSetPrimaryComputername(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrSetPrimaryComputername *r);
 _PUBLIC_ void ndr_print_wkssvc_NetrEnumerateComputerNames(struct ndr_print *ndr, const char *name, int flags, const struct wkssvc_NetrEnumerateComputerNames *r);
 
-/* The following definitions come from librpc/gen_ndr/ndr_xattr.c  */
-
-_PUBLIC_ enum ndr_err_code ndr_push_tdb_xattr(struct ndr_push *ndr, int ndr_flags, const struct tdb_xattr *r);
-_PUBLIC_ enum ndr_err_code ndr_pull_tdb_xattr(struct ndr_pull *ndr, int ndr_flags, struct tdb_xattr *r);
-_PUBLIC_ void ndr_print_tdb_xattr(struct ndr_print *ndr, const char *name, const struct tdb_xattr *r);
-_PUBLIC_ enum ndr_err_code ndr_push_tdb_xattrs(struct ndr_push *ndr, int ndr_flags, const struct tdb_xattrs *r);
-_PUBLIC_ enum ndr_err_code ndr_pull_tdb_xattrs(struct ndr_pull *ndr, int ndr_flags, struct tdb_xattrs *r);
-_PUBLIC_ void ndr_print_tdb_xattrs(struct ndr_print *ndr, const char *name, const struct tdb_xattrs *r);
-
 /* The following definitions come from librpc/gen_ndr/srv_dfs.c  */
 
 void netdfs_get_pipe_fns(struct api_struct **fns, int *n_fns);
@@ -3776,9 +3752,7 @@ NTSTATUS rpc_wkssvc_init(void);
 _PUBLIC_ size_t ndr_align_size(uint32_t offset, size_t n);
 _PUBLIC_ struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience);
 _PUBLIC_ enum ndr_err_code ndr_pull_advance(struct ndr_pull *ndr, uint32_t size);
-_PUBLIC_ void ndr_pull_save(struct ndr_pull *ndr, struct ndr_pull_save *save);
-_PUBLIC_ void ndr_pull_restore(struct ndr_pull *ndr, struct ndr_pull_save *save);
-_PUBLIC_ struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx);
+_PUBLIC_ struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience);
 _PUBLIC_ DATA_BLOB ndr_push_blob(struct ndr_push *ndr);
 _PUBLIC_ enum ndr_err_code ndr_push_expand(struct ndr_push *ndr, uint32_t extra_size);
 _PUBLIC_ void ndr_print_debug_helper(struct ndr_print *ndr, const char *format, ...) _PRINTF_ATTRIBUTE(2,3);
@@ -3840,13 +3814,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_struct_blob(const DATA_BLOB *blob, TALLOC_CT
 _PUBLIC_ enum ndr_err_code ndr_pull_struct_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
                                                    struct smb_iconv_convenience *iconv_convenience,
                                                    void *p, ndr_pull_flags_fn_t fn);
-_PUBLIC_ enum ndr_err_code ndr_pull_union_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
-                            uint32_t level, ndr_pull_flags_fn_t fn);
-_PUBLIC_ enum ndr_err_code ndr_pull_union_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
-                            uint32_t level, ndr_pull_flags_fn_t fn);
 _PUBLIC_ enum ndr_err_code ndr_push_struct_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, const void *p, ndr_push_flags_fn_t fn);
-_PUBLIC_ enum ndr_err_code ndr_push_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
-                            uint32_t level, ndr_push_flags_fn_t fn);
 _PUBLIC_ size_t ndr_size_struct(const void *p, int flags, ndr_push_flags_fn_t push);
 _PUBLIC_ size_t ndr_size_union(const void *p, int flags, uint32_t level, ndr_push_flags_fn_t push);
 _PUBLIC_ uint32_t ndr_push_get_relative_base_offset(struct ndr_push *ndr);
@@ -3902,8 +3870,6 @@ _PUBLIC_ enum ndr_err_code ndr_pull_align(struct ndr_pull *ndr, size_t size);
 _PUBLIC_ enum ndr_err_code ndr_push_bytes(struct ndr_push *ndr, const uint8_t *data, uint32_t n);
 _PUBLIC_ enum ndr_err_code ndr_push_zero(struct ndr_push *ndr, uint32_t n);
 _PUBLIC_ enum ndr_err_code ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const uint8_t *data, uint32_t n);
-_PUBLIC_ void ndr_push_save(struct ndr_push *ndr, struct ndr_push_save *save);
-_PUBLIC_ void ndr_push_restore(struct ndr_push *ndr, struct ndr_push_save *save);
 _PUBLIC_ enum ndr_err_code ndr_push_unique_ptr(struct ndr_push *ndr, const void *p);
 _PUBLIC_ enum ndr_err_code ndr_push_full_ptr(struct ndr_push *ndr, const void *p);
 _PUBLIC_ enum ndr_err_code ndr_push_ref_ptr(struct ndr_push *ndr);
@@ -4275,13 +4241,13 @@ bool cli_lock(struct cli_state *cli, int fnum,
              uint32 offset, uint32 len, int timeout, enum brl_type lock_type);
 bool cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len);
 bool cli_lock64(struct cli_state *cli, int fnum,
-               SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type);
-bool cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len);
+               uint64_t offset, uint64_t len, int timeout, enum brl_type lock_type);
+bool cli_unlock64(struct cli_state *cli, int fnum, uint64_t offset, uint64_t len);
 bool cli_posix_lock(struct cli_state *cli, int fnum,
-                       SMB_BIG_UINT offset, SMB_BIG_UINT len,
+                       uint64_t offset, uint64_t len,
                        bool wait_lock, enum brl_type lock_type);
-bool cli_posix_unlock(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len);
-bool cli_posix_getlock(struct cli_state *cli, int fnum, SMB_BIG_UINT *poffset, SMB_BIG_UINT *plen);
+bool cli_posix_unlock(struct cli_state *cli, int fnum, uint64_t offset, uint64_t len);
+bool cli_posix_getlock(struct cli_state *cli, int fnum, uint64_t *poffset, uint64_t *plen);
 bool cli_getattrE(struct cli_state *cli, int fd,
                  uint16 *attr, SMB_OFF_T *size,
                  time_t *change_time,
@@ -5133,20 +5099,20 @@ const char *lock_type_name(enum brl_type lock_type);
 const char *lock_flav_name(enum brl_flavour lock_flav);
 bool is_locked(files_struct *fsp,
                uint32 smbpid,
-               SMB_BIG_UINT count,
-               SMB_BIG_UINT offset, 
+               uint64_t count,
+               uint64_t offset, 
                enum brl_type lock_type);
 NTSTATUS query_lock(files_struct *fsp,
                        uint32 *psmbpid,
-                       SMB_BIG_UINT *pcount,
-                       SMB_BIG_UINT *poffset,
+                       uint64_t *pcount,
+                       uint64_t *poffset,
                        enum brl_type *plock_type,
                        enum brl_flavour lock_flav);
 struct byte_range_lock *do_lock(struct messaging_context *msg_ctx,
                        files_struct *fsp,
                        uint32 lock_pid,
-                       SMB_BIG_UINT count,
-                       SMB_BIG_UINT offset,
+                       uint64_t count,
+                       uint64_t offset,
                        enum brl_type lock_type,
                        enum brl_flavour lock_flav,
                        bool blocking_lock,
@@ -5155,13 +5121,13 @@ struct byte_range_lock *do_lock(struct messaging_context *msg_ctx,
 NTSTATUS do_unlock(struct messaging_context *msg_ctx,
                        files_struct *fsp,
                        uint32 lock_pid,
-                       SMB_BIG_UINT count,
-                       SMB_BIG_UINT offset,
+                       uint64_t count,
+                       uint64_t offset,
                        enum brl_flavour lock_flav);
 NTSTATUS do_lock_cancel(files_struct *fsp,
                        uint32 lock_pid,
-                       SMB_BIG_UINT count,
-                       SMB_BIG_UINT offset,
+                       uint64_t count,
+                       uint64_t offset,
                        enum brl_flavour lock_flav);
 void locking_close_file(struct messaging_context *msg_ctx,
                        files_struct *fsp);
@@ -5213,8 +5179,8 @@ int share_mode_forall(void (*fn)(const struct share_mode_entry *, const char *,
 /* The following definitions come from locking/posix.c  */
 
 bool is_posix_locked(files_struct *fsp,
-                       SMB_BIG_UINT *pu_offset,
-                       SMB_BIG_UINT *pu_count,
+                       uint64_t *pu_offset,
+                       uint64_t *pu_count,
                        enum brl_type *plock_type,
                        enum brl_flavour lock_flav);
 bool posix_locking_init(bool read_only);
@@ -5222,28 +5188,28 @@ bool posix_locking_end(void);
 void reduce_windows_lock_ref_count(files_struct *fsp, unsigned int dcount);
 int fd_close_posix(struct files_struct *fsp);
 bool set_posix_lock_windows_flavour(files_struct *fsp,
-                       SMB_BIG_UINT u_offset,
-                       SMB_BIG_UINT u_count,
+                       uint64_t u_offset,
+                       uint64_t u_count,
                        enum brl_type lock_type,
                        const struct lock_context *lock_ctx,
                        const struct lock_struct *plocks,
                        int num_locks,
                        int *errno_ret);
 bool release_posix_lock_windows_flavour(files_struct *fsp,
-                               SMB_BIG_UINT u_offset,
-                               SMB_BIG_UINT u_count,
+                               uint64_t u_offset,
+                               uint64_t u_count,
                                enum brl_type deleted_lock_type,
                                const struct lock_context *lock_ctx,
                                const struct lock_struct *plocks,
                                int num_locks);
 bool set_posix_lock_posix_flavour(files_struct *fsp,
-                       SMB_BIG_UINT u_offset,
-                       SMB_BIG_UINT u_count,
+                       uint64_t u_offset,
+                       uint64_t u_count,
                        enum brl_type lock_type,
                        int *errno_ret);
 bool release_posix_lock_posix_flavour(files_struct *fsp,
-                               SMB_BIG_UINT u_offset,
-                               SMB_BIG_UINT u_count,
+                               uint64_t u_offset,
+                               uint64_t u_count,
                                const struct lock_context *lock_ctx,
                                const struct lock_struct *plocks,
                                int num_locks);
@@ -6600,7 +6566,8 @@ bool sysv_cache_reload(void);
 
 /* The following definitions come from printing/printfsp.c  */
 
-NTSTATUS print_fsp_open(connection_struct *conn, const char *fname,
+NTSTATUS print_fsp_open(struct smb_request *req, connection_struct *conn,
+                       const char *fname,
                        uint16_t current_vuid, files_struct **result);
 void print_fsp_end(files_struct *fsp, enum file_close_type close_type);
 
@@ -7201,8 +7168,6 @@ WERROR rpccli_spoolss_rffpcnex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
 WERROR rpccli_svcctl_enumerate_services( struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
                                       POLICY_HND *hSCM, uint32 type, uint32 state, 
                                      uint32 *returned, ENUM_SERVICES_STATUS **service_array  );
-WERROR rpccli_svcctl_query_config(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
-                                POLICY_HND *hService, SERVICE_CONFIG *config );
 
 /* The following definitions come from rpc_client/init_lsa.c  */
 
@@ -7327,22 +7292,22 @@ void init_samr_DomInfo1(struct samr_DomInfo1 *r,
                        uint32_t password_properties,
                        int64_t max_password_age,
                        int64_t min_password_age);
-void init_samr_DomInfo2(struct samr_DomInfo2 *r,
-                       NTTIME force_logoff_time,
-                       const char *comment,
-                       const char *domain_name,
-                       const char *primary,
-                       uint64_t sequence_num,
-                       uint32_t unknown2,
-                       enum samr_Role role,
-                       uint32_t unknown3,
-                       uint32_t num_users,
-                       uint32_t num_groups,
-                       uint32_t num_aliases);
+void init_samr_DomGeneralInformation(struct samr_DomGeneralInformation *r,
+                                    NTTIME force_logoff_time,
+                                    const char *oem_information,
+                                    const char *domain_name,
+                                    const char *primary,
+                                    uint64_t sequence_num,
+                                    uint32_t unknown2,
+                                    enum samr_Role role,
+                                    uint32_t unknown3,
+                                    uint32_t num_users,
+                                    uint32_t num_groups,
+                                    uint32_t num_aliases);
 void init_samr_DomInfo3(struct samr_DomInfo3 *r,
                        NTTIME force_logoff_time);
-void init_samr_DomInfo4(struct samr_DomInfo4 *r,
-                       const char *comment);
+void init_samr_DomOEMInformation(struct samr_DomOEMInformation *r,
+                                const char *oem_information);
 void init_samr_DomInfo5(struct samr_DomInfo5 *r,
                        const char *domain_name);
 void init_samr_DomInfo6(struct samr_DomInfo6 *r,
@@ -8195,11 +8160,8 @@ bool convert_port_data_1( NT_PORT_DATA_1 *port1, RPC_BUFFER *buf ) ;
 bool svcctl_io_enum_services_status( const char *desc, ENUM_SERVICES_STATUS *enum_status, RPC_BUFFER *buffer, int depth );
 bool svcctl_io_service_status_process( const char *desc, SERVICE_STATUS_PROCESS *status, RPC_BUFFER *buffer, int depth );
 uint32 svcctl_sizeof_enum_services_status( ENUM_SERVICES_STATUS *status );
-uint32 svcctl_sizeof_service_config( SERVICE_CONFIG *config );
 bool svcctl_io_q_enum_services_status(const char *desc, SVCCTL_Q_ENUM_SERVICES_STATUS *q_u, prs_struct *ps, int depth);
 bool svcctl_io_r_enum_services_status(const char *desc, SVCCTL_R_ENUM_SERVICES_STATUS *r_u, prs_struct *ps, int depth);
-bool svcctl_io_q_query_service_config(const char *desc, SVCCTL_Q_QUERY_SERVICE_CONFIG *q_u, prs_struct *ps, int depth);
-bool svcctl_io_r_query_service_config(const char *desc, SVCCTL_R_QUERY_SERVICE_CONFIG *r_u, prs_struct *ps, int depth);
 bool svcctl_io_q_query_service_config2(const char *desc, SVCCTL_Q_QUERY_SERVICE_CONFIG2 *q_u, prs_struct *ps, int depth);
 void init_service_description_buffer(SERVICE_DESCRIPTION *desc, const char *service_desc );
 bool svcctl_io_service_description( const char *desc, SERVICE_DESCRIPTION *description, RPC_BUFFER *buffer, int depth );
@@ -8718,26 +8680,16 @@ bool api_pipe_request(pipes_struct *p);
 pipes_struct *get_first_internal_pipe(void);
 pipes_struct *get_next_internal_pipe(pipes_struct *p);
 void set_pipe_handle_offset(int max_open_files);
-void reset_chain_p(void);
 void init_rpc_pipe_hnd(void);
-smb_np_struct *open_rpc_pipe_p(const char *pipe_name, 
-                             connection_struct *conn, uint16 vuid);
-ssize_t write_to_pipe(smb_np_struct *p, char *data, size_t n);
-ssize_t read_from_pipe(smb_np_struct *p, char *data, size_t n,
-               bool *is_data_outstanding);
-bool wait_rpc_pipe_hnd_state(smb_np_struct *p, uint16 priority);
-bool set_rpc_pipe_hnd_state(smb_np_struct *p, uint16 device_state);
-bool close_rpc_pipe_hnd(smb_np_struct *p);
-void pipe_close_conn(connection_struct *conn);
-smb_np_struct *get_rpc_pipe_p(uint16 pnum);
-smb_np_struct *get_rpc_pipe(int pnum);
-struct pipes_struct *make_internal_rpc_pipe_p(const char *pipe_name,
-                                             const char *client_address,
-                                             struct auth_serversupplied_info *server_info,
-                                             uint16_t vuid);
-ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, size_t n,
-                               bool *is_data_outstanding);
-ssize_t write_to_internal_pipe(struct pipes_struct *p, char *data, size_t n);
+
+bool fsp_is_np(struct files_struct *fsp);
+NTSTATUS np_open(struct smb_request *smb_req, struct connection_struct *conn,
+                const char *name, struct files_struct **pfsp);
+NTSTATUS np_write(struct files_struct *fsp, uint8_t *data, size_t len,
+                 ssize_t *nwritten);
+NTSTATUS np_read(struct files_struct *fsp, uint8_t *data, size_t len,
+                ssize_t *nread, bool *is_data_outstanding);
+
 
 /* The following definitions come from rpc_server/srv_samr_nt.c  */
 
@@ -9135,7 +9087,6 @@ WERROR _svcctl_ControlService(pipes_struct *p,
 WERROR _svcctl_EnumDependentServicesW(pipes_struct *p,
                                      struct svcctl_EnumDependentServicesW *r);
 WERROR _svcctl_query_service_status_ex( pipes_struct *p, SVCCTL_Q_QUERY_SERVICE_STATUSEX *q_u, SVCCTL_R_QUERY_SERVICE_STATUSEX *r_u );
-WERROR _svcctl_query_service_config( pipes_struct *p, SVCCTL_Q_QUERY_SERVICE_CONFIG *q_u, SVCCTL_R_QUERY_SERVICE_CONFIG *r_u );
 WERROR _svcctl_query_service_config2( pipes_struct *p, SVCCTL_Q_QUERY_SERVICE_CONFIG2 *q_u, SVCCTL_R_QUERY_SERVICE_CONFIG2 *r_u );
 WERROR _svcctl_LockServiceDatabase(pipes_struct *p,
                                   struct svcctl_LockServiceDatabase *r);
@@ -9358,16 +9309,16 @@ bool push_blocking_lock_request( struct byte_range_lock *br_lck,
                uint32 lock_pid,
                enum brl_type lock_type,
                enum brl_flavour lock_flav,
-               SMB_BIG_UINT offset,
-               SMB_BIG_UINT count,
+               uint64_t offset,
+               uint64_t count,
                uint32 blocking_pid);
 void cancel_pending_lock_requests_by_fid(files_struct *fsp, struct byte_range_lock *br_lck);
 void remove_pending_lock_requests_by_mid(int mid);
 bool blocking_lock_was_deferred(int mid);
 bool blocking_lock_cancel(files_struct *fsp,
                        uint32 lock_pid,
-                       SMB_BIG_UINT offset,
-                       SMB_BIG_UINT count,
+                       uint64_t offset,
+                       uint64_t count,
                        enum brl_flavour lock_flav,
                        unsigned char locktype,
                         NTSTATUS err);
@@ -9396,7 +9347,8 @@ NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passw
 /* The following definitions come from smbd/close.c  */
 
 void set_close_write_time(struct files_struct *fsp, struct timespec ts);
-NTSTATUS close_file(files_struct *fsp, enum file_close_type close_type);
+NTSTATUS close_file(struct smb_request *req, files_struct *fsp,
+                   enum file_close_type close_type);
 void msg_close_file(struct messaging_context *msg_ctx,
                    void *private_data,
                    uint32_t msg_type,
@@ -9429,19 +9381,17 @@ int count_all_current_connections(void);
 bool claim_connection(connection_struct *conn, const char *name,
                      uint32 msg_flags);
 bool register_message_flags(bool doreg, uint32 msg_flags);
-bool store_pipe_opendb( smb_np_struct *p );
-bool delete_pipe_opendb( smb_np_struct *p );
 
 /* The following definitions come from smbd/dfree.c  */
 
-SMB_BIG_UINT sys_disk_free(connection_struct *conn, const char *path, bool small_query, 
-                              SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize);
-SMB_BIG_UINT get_dfree_info(connection_struct *conn,
+uint64_t sys_disk_free(connection_struct *conn, const char *path, bool small_query, 
+                              uint64_t *bsize,uint64_t *dfree,uint64_t *dsize);
+uint64_t get_dfree_info(connection_struct *conn,
                        const char *path,
                        bool small_query,
-                       SMB_BIG_UINT *bsize,
-                       SMB_BIG_UINT *dfree,
-                       SMB_BIG_UINT *dsize);
+                       uint64_t *bsize,
+                       uint64_t *dfree,
+                       uint64_t *dsize);
 
 /* The following definitions come from smbd/dir.c  */
 
@@ -9555,13 +9505,13 @@ void reply_unix_error(struct smb_request *req, uint8 defclass, uint32 defcode,
 /* The following definitions come from smbd/fake_file.c  */
 
 enum FAKE_FILE_TYPE is_fake_file(const char *fname);
-NTSTATUS open_fake_file(connection_struct *conn,
+NTSTATUS open_fake_file(struct smb_request *req, connection_struct *conn,
                                uint16_t current_vuid,
                                enum FAKE_FILE_TYPE fake_file_type,
                                const char *fname,
                                uint32 access_mask,
                                files_struct **result);
-NTSTATUS close_fake_file(files_struct *fsp);
+NTSTATUS close_fake_file(struct smb_request *req, files_struct *fsp);
 
 /* The following definitions come from smbd/file_access.c  */
 
@@ -9602,7 +9552,8 @@ NTSTATUS check_name(connection_struct *conn, const char *name);
 
 /* The following definitions come from smbd/files.c  */
 
-NTSTATUS file_new(connection_struct *conn, files_struct **result);
+NTSTATUS file_new(struct smb_request *req, connection_struct *conn,
+                 files_struct **result);
 void file_close_conn(connection_struct *conn);
 void file_close_pid(uint16 smbpid, int vuid);
 void file_init(void);
@@ -9615,15 +9566,12 @@ files_struct *file_find_di_first(struct file_id id);
 files_struct *file_find_di_next(files_struct *start_fsp);
 files_struct *file_find_print(void);
 void file_sync_all(connection_struct *conn);
-void file_free(files_struct *fsp);
+void file_free(struct smb_request *req, files_struct *fsp);
 files_struct *file_fnum(uint16 fnum);
-files_struct *file_fsp(uint16 fid);
-void file_chain_reset(void);
-NTSTATUS dup_file_fsp(files_struct *fsp,
-                               uint32 access_mask,
-                               uint32 share_access,
-                               uint32 create_options,
-                               files_struct **result);
+files_struct *file_fsp(struct smb_request *req, uint16 fid);
+NTSTATUS dup_file_fsp(struct smb_request *req, files_struct *fsp,
+                     uint32 access_mask, uint32 share_access,
+                     uint32 create_options, files_struct **result);
 
 /* The following definitions come from smbd/ipc.c  */
 
@@ -9815,9 +9763,10 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
                                                        /* Information (FILE_EXISTS etc.) */
                            int *pinfo,
                            files_struct **result);
-NTSTATUS open_file_fchmod(connection_struct *conn, const char *fname,
+NTSTATUS open_file_fchmod(struct smb_request *req, connection_struct *conn,
+                         const char *fname,
                          SMB_STRUCT_STAT *psbuf, files_struct **result);
-NTSTATUS close_file_fchmod(files_struct *fsp);
+NTSTATUS close_file_fchmod(struct smb_request *req, files_struct *fsp);
 NTSTATUS open_directory(connection_struct *conn,
                        struct smb_request *req,
                        const char *fname,
@@ -9844,7 +9793,7 @@ NTSTATUS create_file_unixpath(connection_struct *conn,
                              uint32_t create_options,
                              uint32_t file_attributes,
                              uint32_t oplock_request,
-                             SMB_BIG_UINT allocation_size,
+                             uint64_t allocation_size,
                              struct security_descriptor *sd,
                              struct ea_list *ea_list,
 
@@ -9861,7 +9810,7 @@ NTSTATUS create_file(connection_struct *conn,
                     uint32_t create_options,
                     uint32_t file_attributes,
                     uint32_t oplock_request,
-                    SMB_BIG_UINT allocation_size,
+                    uint64_t allocation_size,
                     struct security_descriptor *sd,
                     struct ea_list *ea_list,
 
@@ -9988,18 +9937,18 @@ void smbd_process(void);
 
 /* The following definitions come from smbd/quotas.c  */
 
-bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
-bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
+bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize);
+bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize);
 bool disk_quotas(const char *path,
-               SMB_BIG_UINT *bsize,
-               SMB_BIG_UINT *dfree,
-               SMB_BIG_UINT *dsize);
-bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
-bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
-bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
-bool disk_quotas_vxfs(const char *name, char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
-bool disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize);
-bool disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize);
+               uint64_t *bsize,
+               uint64_t *dfree,
+               uint64_t *dsize);
+bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize);
+bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize);
+bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize);
+bool disk_quotas_vxfs(const char *name, char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize);
+bool disk_quotas(const char *path,uint64_t *bsize,uint64_t *dfree,uint64_t *dsize);
+bool disk_quotas(const char *path,uint64_t *bsize,uint64_t *dfree,uint64_t *dsize);
 
 /* The following definitions come from smbd/reply.c  */
 
@@ -10109,8 +10058,8 @@ NTSTATUS copy_file(TALLOC_CTX *ctx,
                        bool target_is_directory);
 void reply_copy(struct smb_request *req);
 uint32 get_lock_pid( char *data, int data_offset, bool large_file_format);
-SMB_BIG_UINT get_lock_count( char *data, int data_offset, bool large_file_format);
-SMB_BIG_UINT get_lock_offset( char *data, int data_offset, bool large_file_format, bool *err);
+uint64_t get_lock_count( char *data, int data_offset, bool large_file_format);
+uint64_t get_lock_offset( char *data, int data_offset, bool large_file_format, bool *err);
 void reply_lockingX(struct smb_request *req);
 void reply_readbmpx(struct smb_request *req);
 void reply_readbs(struct smb_request *req);
@@ -10228,8 +10177,8 @@ int sys_statvfs(const char *path, vfs_statvfs_struct *statbuf);
 
 /* The following definitions come from smbd/trans2.c  */
 
-SMB_BIG_UINT smb_roundup(connection_struct *conn, SMB_BIG_UINT val);
-SMB_BIG_UINT get_allocation_size(connection_struct *conn, files_struct *fsp, const SMB_STRUCT_STAT *sbuf);
+uint64_t smb_roundup(connection_struct *conn, uint64_t val);
+uint64_t get_allocation_size(connection_struct *conn, files_struct *fsp, const SMB_STRUCT_STAT *sbuf);
 NTSTATUS get_ea_value(TALLOC_CTX *mem_ctx, connection_struct *conn,
                      files_struct *fsp, const char *fname,
                      const char *ea_name, struct ea_struct *pea);
@@ -10313,7 +10262,7 @@ ssize_t vfs_pwrite_data(struct smb_request *req,
                        const char *buffer,
                        size_t N,
                        SMB_OFF_T offset);
-int vfs_allocate_file_space(files_struct *fsp, SMB_BIG_UINT len);
+int vfs_allocate_file_space(files_struct *fsp, uint64_t len);
 int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len);
 int vfs_fill_sparse(files_struct *fsp, SMB_OFF_T len);
 SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n);
index b4021afd0a67e861bf77fc8db7376bc3a5c9a807..1dc5ba4a7ba0446e8720ff2c5593cae84faa3390 100644 (file)
@@ -39,6 +39,7 @@
 
 
 #define LSA_POLICY_READ       ( STANDARD_RIGHTS_READ_ACCESS      |\
+                            LSA_POLICY_VIEW_LOCAL_INFORMATION    |\
                             LSA_POLICY_VIEW_AUDIT_INFORMATION    |\
                             LSA_POLICY_GET_PRIVATE_INFORMATION)
 
index aa1d1662c839edfa59aa698095c7bf041f8daa8b..0e31a53e32456788d8e66e9d699736d08d540ba9 100644 (file)
@@ -141,18 +141,6 @@ typedef struct {
        SERVICE_STATUS status;
 } ENUM_SERVICES_STATUS;
 
-typedef struct {
-       uint32 service_type;
-       uint32 start_type;
-       uint32 error_control;
-       UNISTR2 *executablepath;
-       UNISTR2 *loadordergroup;
-       uint32 tag_id;
-       UNISTR2 *dependencies;
-       UNISTR2 *startname;
-       UNISTR2 *displayname;
-} SERVICE_CONFIG;
-
 typedef struct {
        uint32 unknown; 
         UNISTR description;
@@ -212,20 +200,6 @@ typedef struct {
        WERROR status;
 } SVCCTL_R_ENUM_SERVICES_STATUS;
 
-/**************************/
-
-typedef struct {
-       POLICY_HND handle;
-       uint32 buffer_size;
-} SVCCTL_Q_QUERY_SERVICE_CONFIG;
-
-typedef struct {
-       SERVICE_CONFIG config;
-       uint32 needed;
-       WERROR status;
-} SVCCTL_R_QUERY_SERVICE_CONFIG;
-
-
 /**************************/
 
 typedef struct {
index ef98b5e1b545bc3b52635d2b90f82694d95352e5..732bef1212963b86c5257441cf4713e1a0c32379 100644 (file)
@@ -174,9 +174,6 @@ typedef uint32 codepoint_t;
 /* pipe string names */
 #define PIPE_LANMAN   "\\PIPE\\LANMAN"
 
-/* 64 bit time (100usec) since ????? - cifs6.txt, section 3.5, page 30 */
-typedef uint64_t NTTIME;
-
 #define MAX_HOURS_LEN 32
 
 #ifndef MAXSUBAUTHS
@@ -249,15 +246,6 @@ struct id_map {
        enum id_mapping status;
 };
 
-/* used to hold an arbitrary blob of data */
-typedef struct data_blob {
-       uint8 *data;
-       size_t length;
-       void (*free)(struct data_blob *data_blob);
-} DATA_BLOB;
-
-extern const DATA_BLOB data_blob_null;
-
 #include "librpc/gen_ndr/misc.h"
 #include "librpc/gen_ndr/security.h"
 #include "librpc/ndr/libndr.h"
@@ -372,7 +360,7 @@ typedef struct {
 struct fd_handle {
        size_t ref_count;
        int fd;
-       SMB_BIG_UINT position_information;
+       uint64_t position_information;
        SMB_OFF_T pos;
        uint32 private_options; /* NT Create options, but we only look at
                                 * NTCREATEX_OPTIONS_PRIVATE_DENY_DOS and
@@ -448,7 +436,7 @@ typedef struct files_struct {
        unsigned int num_smb_operations;
        uint16 rap_print_jobid;
        struct file_id file_id;
-       SMB_BIG_UINT initial_allocation_size; /* Faked up initial allocation on disk. */
+       uint64_t initial_allocation_size; /* Faked up initial allocation on disk. */
        mode_t mode;
        uint16 file_pid;
        uint16 vuid;
@@ -559,10 +547,10 @@ struct stream_struct {
 
 struct dfree_cached_info {
        time_t last_dfree_time;
-       SMB_BIG_UINT dfree_ret;
-       SMB_BIG_UINT bsize;
-       SMB_BIG_UINT dfree;
-       SMB_BIG_UINT dsize;
+       uint64_t dfree_ret;
+       uint64_t bsize;
+       uint64_t dfree;
+       uint64_t dsize;
 };
 
 struct dptr_struct;
@@ -648,6 +636,7 @@ struct smb_request {
        size_t unread_bytes;
        bool encrypted;
        connection_struct *conn;
+       struct files_struct *chain_fsp;
 };
 
 /* Defines for the sent_oplock_break field above. */
index f58a6452bfe08606bd75c8ce5a0d72be7ba0d143..8945708ca3375adb127a22226b36e9cd1dcdede7 100644 (file)
@@ -782,7 +782,7 @@ extern bool do_profile_times;
 
 extern clockid_t __profile_clock;
 
-static inline SMB_BIG_UINT profile_timestamp(void)
+static inline uint64_t profile_timestamp(void)
 {
        struct timespec ts;
 
@@ -797,7 +797,7 @@ static inline SMB_BIG_UINT profile_timestamp(void)
 
 #else
 
-static inline SMB_BIG_UINT profile_timestamp(void)
+static inline uint64_t profile_timestamp(void)
 {
        struct timeval tv;
        GetTimeOfDay(&tv);
@@ -830,14 +830,14 @@ static inline SMB_BIG_UINT profile_timestamp(void)
        }
 
 #define START_PROFILE(x) \
-       SMB_BIG_UINT __profstamp_##x = 0; \
+       uint64_t __profstamp_##x = 0; \
        if (do_profile_flag) { \
                __profstamp_##x = do_profile_times ? profile_timestamp() : 0;\
                INC_PROFILE_COUNT(x##_count); \
        }
 
 #define START_PROFILE_BYTES(x,n) \
-       SMB_BIG_UINT __profstamp_##x = 0; \
+       uint64_t __profstamp_##x = 0; \
        if (do_profile_flag) { \
                __profstamp_##x = do_profile_times ? profile_timestamp() : 0;\
                INC_PROFILE_COUNT(x##_count); \
index a0754a37377d1a978c5a00086c21a8c1dd2e3098..71d5e9b264013fd42a1ff83d4f50d06fed658087 100644 (file)
@@ -37,8 +37,8 @@
  Some stuff for the sys_quota api.
  **************************************************/ 
 
-#define SMB_QUOTAS_NO_LIMIT    ((SMB_BIG_UINT)(0))
-#define SMB_QUOTAS_NO_SPACE    ((SMB_BIG_UINT)(1))
+#define SMB_QUOTAS_NO_LIMIT    ((uint64_t)(0))
+#define SMB_QUOTAS_NO_SPACE    ((uint64_t)(1))
 
 #define SMB_QUOTAS_SET_NO_LIMIT(dp) \
 {\
 
 typedef struct _SMB_DISK_QUOTA {
        enum SMB_QUOTA_TYPE qtype;
-       SMB_BIG_UINT bsize;
-       SMB_BIG_UINT hardlimit; /* In bsize units. */
-       SMB_BIG_UINT softlimit; /* In bsize units. */
-       SMB_BIG_UINT curblocks; /* In bsize units. */
-       SMB_BIG_UINT ihardlimit; /* inode hard limit. */
-       SMB_BIG_UINT isoftlimit; /* inode soft limit. */
-       SMB_BIG_UINT curinodes; /* Current used inodes. */
-       uint32       qflags;
+       uint64_t bsize;
+       uint64_t hardlimit; /* In bsize units. */
+       uint64_t softlimit; /* In bsize units. */
+       uint64_t curblocks; /* In bsize units. */
+       uint64_t ihardlimit; /* inode hard limit. */
+       uint64_t isoftlimit; /* inode soft limit. */
+       uint64_t curinodes; /* Current used inodes. */
+       uint32_t       qflags;
 } SMB_DISK_QUOTA;
 
 #ifndef QUOTABLOCK_SIZE
index fcc723c51150133d936a98c530f81372228eaf58..107d0b1bd549919eacafe1054e0b5434af5712b5 100644 (file)
@@ -48,34 +48,34 @@ struct tdb_validation_status {
 
 typedef int (*tdb_validate_data_func)(TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *state);
 
-TDB_DATA make_tdb_data(const uint8 *dptr, size_t dsize);
+TDB_DATA make_tdb_data(const uint8_t *dptr, size_t dsize);
 TDB_DATA string_tdb_data(const char *string);
 TDB_DATA string_term_tdb_data(const char *string);
 
 TDB_LIST_NODE *tdb_search_keys(struct tdb_context*, const char*);
 void tdb_search_list_free(TDB_LIST_NODE*);
 
-int tdb_chainlock_with_timeout( TDB_CONTEXT *tdb, TDB_DATA key,
+int tdb_chainlock_with_timeout( struct tdb_context *tdb, TDB_DATA key,
                                unsigned int timeout);
 int tdb_lock_bystring(struct tdb_context *tdb, const char *keyval);
-int tdb_lock_bystring_with_timeout(TDB_CONTEXT *tdb, const char *keyval,
+int tdb_lock_bystring_with_timeout(struct tdb_context *tdb, const char *keyval,
                                   int timeout);
 void tdb_unlock_bystring(struct tdb_context *tdb, const char *keyval);
 int tdb_read_lock_bystring_with_timeout(TDB_CONTEXT *tdb, const char *keyval,
                                        unsigned int timeout);
-void tdb_read_unlock_bystring(TDB_CONTEXT *tdb, const char *keyval);
-
-int32 tdb_fetch_int32_byblob(TDB_CONTEXT *tdb, TDB_DATA key);
-int32 tdb_fetch_int32(struct tdb_context *tdb, const char *keystr);
-bool tdb_store_uint32_byblob(TDB_CONTEXT *tdb, TDB_DATA key, uint32 value);
-bool tdb_store_uint32(struct tdb_context *tdb, const char *keystr, uint32 value);
-int tdb_store_int32_byblob(TDB_CONTEXT *tdb, TDB_DATA key, int32 v);
-int tdb_store_int32(struct tdb_context *tdb, const char *keystr, int32 v);
-bool tdb_fetch_uint32_byblob(TDB_CONTEXT *tdb, TDB_DATA key, uint32 *value);
-bool tdb_fetch_uint32(struct tdb_context *tdb, const char *keystr, uint32 *value);
-int32 tdb_change_int32_atomic(struct tdb_context *tdb, const char *keystr, int32 *oldval, int32 change_val);
-bool tdb_change_uint32_atomic(TDB_CONTEXT *tdb, const char *keystr,
-                             uint32 *oldval, uint32 change_val);
+void tdb_read_unlock_bystring(struct tdb_context *tdb, const char *keyval);
+
+int32_t tdb_fetch_int32_byblob(struct tdb_context *tdb, TDB_DATA key);
+int32_t tdb_fetch_int32(struct tdb_context *tdb, const char *keystr);
+bool tdb_store_uint32_byblob(struct tdb_context *tdb, TDB_DATA key, uint32_t value);
+bool tdb_store_uint32(struct tdb_context *tdb, const char *keystr, uint32_t value);
+int tdb_store_int32_byblob(struct tdb_context *tdb, TDB_DATA key, int32_t v);
+int tdb_store_int32(struct tdb_context *tdb, const char *keystr, int32_t v);
+bool tdb_fetch_uint32_byblob(struct tdb_context *tdb, TDB_DATA key, uint32_t *value);
+bool tdb_fetch_uint32(struct tdb_context *tdb, const char *keystr, uint32_t *value);
+int32_t tdb_change_int32_atomic(struct tdb_context *tdb, const char *keystr, int32_t *oldval, int32_t change_val);
+bool tdb_change_uint32_atomic(struct tdb_context *tdb, const char *keystr,
+                             uint32_t *oldval, uint32_t change_val);
 
 int tdb_store_bystring(struct tdb_context *tdb, const char *keystr, TDB_DATA data, int flags);
 int tdb_trans_store_bystring(TDB_CONTEXT *tdb, const char *keystr,
index a3d38f6a25d2becaa3686d814b7400a73fe4c42f..4cedb4a9c6bfcc1895323867a7f69e1a6c796584 100644 (file)
 /* Changed to version 23 - remove set_nt_acl call. This can only be done via an
    open handle. JRA. */
 /* Changed to version 24 - make security descriptor const in fset_nt_acl. JRA. */
+/* Changed to version 25 - Jelmer's change from SMB_BIG_UINT to uint64_t. */
 
-#define SMB_VFS_INTERFACE_VERSION 24
+#define SMB_VFS_INTERFACE_VERSION 25
 
 
 /* to bug old modules which are trying to compile with the old functions */
@@ -282,8 +283,8 @@ struct vfs_ops {
 
                int (*connect_fn)(struct vfs_handle_struct *handle, const char *service, const char *user);
                void (*disconnect)(struct vfs_handle_struct *handle);
-               SMB_BIG_UINT (*disk_free)(struct vfs_handle_struct *handle, const char *path, bool small_query, SMB_BIG_UINT *bsize,
-                       SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
+               uint64_t (*disk_free)(struct vfs_handle_struct *handle, const char *path, bool small_query, uint64_t *bsize,
+                       uint64_t *dfree, uint64_t *dsize);
                int (*get_quota)(struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt);
                int (*set_quota)(struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt);
                int (*get_shadow_copy_data)(struct vfs_handle_struct *handle, struct files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels);
@@ -625,14 +626,14 @@ typedef struct vfs_statvfs_struct {
         if no distinction is made return the same value in each.
        */
 
-       SMB_BIG_UINT TotalBlocks;
-       SMB_BIG_UINT BlocksAvail;       /* bfree */
-       SMB_BIG_UINT UserBlocksAvail;   /* bavail */
+       uint64_t TotalBlocks;
+       uint64_t BlocksAvail;       /* bfree */
+       uint64_t UserBlocksAvail;   /* bavail */
 
        /* For undefined Node fields or FSID return -1 */
-       SMB_BIG_UINT TotalFileNodes;
-       SMB_BIG_UINT FreeFileNodes;
-       SMB_BIG_UINT FsIdentifier;   /* fsid */
+       uint64_t TotalFileNodes;
+       uint64_t FreeFileNodes;
+       uint64_t FsIdentifier;   /* fsid */
        /* NB Namelen comes from FILE_SYSTEM_ATTRIBUTE_INFO call */
        /* NB flags can come from FILE_SYSTEM_DEVICE_INFO call   */
 
diff --git a/source3/include/xfile.h b/source3/include/xfile.h
deleted file mode 100644 (file)
index ffe4481..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-   stdio replacement
-   Copyright (C) Andrew Tridgell 2001
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _XFILE_H_
-#define _XFILE_H_
-/*
-  see xfile.c for explanations
-*/
-
-typedef struct {
-       int fd;
-       char *buf;
-       char *next;
-       int bufsize;
-       int bufused;
-       int open_flags;
-       int buftype;
-       int flags;
-} XFILE;
-
-extern XFILE *x_stdin, *x_stdout, *x_stderr;
-
-/* buffering type */
-#define X_IOFBF 0
-#define X_IOLBF 1
-#define X_IONBF 2
-
-#define x_getc(f) x_fgetc(f)
-
-int x_vfprintf(XFILE *f, const char *format, va_list ap) PRINTF_ATTRIBUTE(2, 0);
-int x_fprintf(XFILE *f, const char *format, ...) PRINTF_ATTRIBUTE(2, 3);
-#endif /* _XFILE_H_ */
index 499b9eb87daa319248757da884a5ba68f6e6318f..ac7e9dda4042133362917f7b6c65a095f0998539 100644 (file)
@@ -33,14 +33,14 @@ static bool load_msg(const char *msg_file)
        char *msgid, *msgstr;
        TDB_DATA data;
 
-       lines = file_lines_load(msg_file, &num_lines,0);
+       lines = file_lines_load(msg_file, &num_lines, 0, NULL);
 
        if (!lines) {
                return False;
        }
 
        if (tdb_lockall(tdb) != 0) {
-               file_lines_free(lines);
+               TALLOC_FREE(lines);
                return False;
        }
 
@@ -68,7 +68,7 @@ static bool load_msg(const char *msg_file)
                }
        }
 
-       file_lines_free(lines);
+       TALLOC_FREE(lines);
        tdb_unlockall(tdb);
 
        return True;
index 6a445f8139c48ebdf79827712728c29a1b304152..966d8ce87c31ec977fd6232364f196c38b596b3a 100644 (file)
@@ -104,7 +104,7 @@ static bool string_match(const char *tok,const char *s)
 
                if (memcache_lookup(
                            NULL, SINGLETON_CACHE,
-                           data_blob_string_const("yp_default_domain"),
+                           data_blob_string_const_null("yp_default_domain"),
                            &tmp)) {
 
                        SMB_ASSERT(tmp.length > 0);
@@ -116,8 +116,8 @@ static bool string_match(const char *tok,const char *s)
 
                        memcache_add(
                                NULL, SINGLETON_CACHE,
-                               data_blob_string_const("yp_default_domain"),
-                               data_blob_string_const(mydomain?mydomain:""));
+                               data_blob_string_const_null("yp_default_domain"),
+                               data_blob_string_const_null(mydomain?mydomain:""));
                }
 
                if (!mydomain) {
diff --git a/source3/lib/arc4.c b/source3/lib/arc4.c
deleted file mode 100644 (file)
index af2564b..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-
-   An implementation of arc4.
-
-   Copyright (C) Jeremy Allison 2005.
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-
-/*****************************************************************
- Initialize state for an arc4 crypt/decrpyt.
- arc4 state is 258 bytes - last 2 bytes are the index bytes.
-*****************************************************************/
-
-void smb_arc4_init(unsigned char arc4_state_out[258], const unsigned char *key, size_t keylen)
-{
-       size_t ind;
-       unsigned char j = 0;
-
-       for (ind = 0; ind < 256; ind++) {
-               arc4_state_out[ind] = (unsigned char)ind;
-       }
-
-       for( ind = 0; ind < 256; ind++) {
-               unsigned char tc;
-
-               j += (arc4_state_out[ind] + key[ind%keylen]);
-
-               tc = arc4_state_out[ind];
-               arc4_state_out[ind] = arc4_state_out[j];
-               arc4_state_out[j] = tc;
-       }
-       arc4_state_out[256] = 0;
-       arc4_state_out[257] = 0;
-}
-
-/*****************************************************************
- Do the arc4 crypt/decrpyt.
- arc4 state is 258 bytes - last 2 bytes are the index bytes.
-*****************************************************************/
-
-void smb_arc4_crypt(unsigned char arc4_state_inout[258], unsigned char *data, size_t len)
-{
-       unsigned char index_i = arc4_state_inout[256];
-       unsigned char index_j = arc4_state_inout[257];
-        size_t ind;
-
-       for( ind = 0; ind < len; ind++) {
-               unsigned char tc;
-               unsigned char t;
-
-               index_i++;
-               index_j += arc4_state_inout[index_i];
-
-               tc = arc4_state_inout[index_i];
-               arc4_state_inout[index_i] = arc4_state_inout[index_j];
-               arc4_state_inout[index_j] = tc;
-
-               t = arc4_state_inout[index_i] + arc4_state_inout[index_j];
-               data[ind] = data[ind] ^ arc4_state_inout[t];
-       }
-
-       arc4_state_inout[256] = index_i;
-       arc4_state_inout[257] = index_j;
-}
index 485212b100f510523e7701aa074a6468e33da95d..3ec322090083029d8d3995367b152d2d4b5ac661 100644 (file)
@@ -1166,7 +1166,7 @@ static size_t pull_ascii_base_talloc(TALLOC_CTX *ctx,
                                        int flags)
 {
        char *dest = NULL;
-       size_t converted_size;
+       size_t dest_len;
 
 #ifdef DEVELOPER
        /* Ensure we never use the braindead "malloc" varient. */
@@ -1177,6 +1177,10 @@ static size_t pull_ascii_base_talloc(TALLOC_CTX *ctx,
 
        *ppdest = NULL;
 
+       if (!src_len) {
+               return 0;
+       }
+
        if (flags & STR_TERMINATE) {
                if (src_len == (size_t)-1) {
                        src_len = strlen((const char *)src) + 1;
@@ -1194,18 +1198,41 @@ static size_t pull_ascii_base_talloc(TALLOC_CTX *ctx,
                                        (unsigned int)src_len);
                        smb_panic(msg);
                }
+       } else {
+               /* Can't have an unlimited length
+                * non STR_TERMINATE'd.
+                */
+               if (src_len == (size_t)-1) {
+                       errno = EINVAL;
+                       return 0;
+               }
        }
 
+       /* src_len != -1 here. */
+
        if (!convert_string_allocate(ctx, CH_DOS, CH_UNIX, src, src_len, &dest,
-                                    &converted_size, True))
-       {
-               converted_size = 0;
+                                    &dest_len, True)) {
+               dest_len = 0;
        }
 
-       if (converted_size && dest) {
+       if (dest_len && dest) {
                /* Did we already process the terminating zero ? */
-               if (dest[converted_size - 1] != 0) {
-                       dest[converted_size - 1] = 0;
+               if (dest[dest_len-1] != 0) {
+                       size_t size = talloc_get_size(dest);
+                       /* Have we got space to append the '\0' ? */
+                       if (size <= dest_len) {
+                               /* No, realloc. */
+                               dest = TALLOC_REALLOC_ARRAY(ctx, dest, char,
+                                               dest_len+1);
+                               if (!dest) {
+                                       /* talloc fail. */
+                                       dest_len = (size_t)-1;
+                                       return 0;
+                               }
+                       }
+                       /* Yay - space ! */
+                       dest[dest_len] = '\0';
+                       dest_len++;
                }
        } else if (dest) {
                dest[0] = 0;
@@ -1562,21 +1589,26 @@ size_t pull_ucs2_base_talloc(TALLOC_CTX *ctx,
                if (src_len >= 1024*1024) {
                        smb_panic("Bad src length in pull_ucs2_base_talloc\n");
                }
+       } else {
+               /* Can't have an unlimited length
+                * non STR_TERMINATE'd.
+                */
+               if (src_len == (size_t)-1) {
+                       errno = EINVAL;
+                       return 0;
+               }
        }
 
+       /* src_len != -1 here. */
+
        /* ucs2 is always a multiple of 2 bytes */
-       if (src_len != (size_t)-1) {
-               src_len &= ~1;
-       }
+       src_len &= ~1;
 
        if (!convert_string_talloc(ctx, CH_UTF16LE, CH_UNIX, src, src_len,
                                   (void *)&dest, &dest_len, True)) {
                dest_len = 0;
        }
 
-       if (src_len == (size_t)-1)
-               src_len = dest_len*2;
-
        if (dest_len) {
                /* Did we already process the terminating zero ? */
                if (dest[dest_len-1] != 0) {
index 5075476e948eddd60a568e72fe5e23ad22ca5818..10a65c5bccafd50154d3751bad9ca449c03ef380 100644 (file)
@@ -155,7 +155,7 @@ static NTSTATUS ctdbd_connect(TALLOC_CTX *mem_ctx,
  * Do we have a complete ctdb packet in the queue?
  */
 
-static bool ctdb_req_complete(const struct data_blob *data,
+static bool ctdb_req_complete(const DATA_BLOB *data,
                              size_t *length,
                              void *private_data)
 {
@@ -220,7 +220,7 @@ struct req_pull_state {
  * Pull a ctdb request out of the incoming packet queue
  */
 
-static NTSTATUS ctdb_req_pull(const struct data_blob *data,
+static NTSTATUS ctdb_req_pull(const DATA_BLOB *data,
                              void *private_data)
 {
        struct req_pull_state *state = (struct req_pull_state *)private_data;
@@ -497,7 +497,7 @@ NTSTATUS ctdbd_messaging_connection(TALLOC_CTX *mem_ctx,
 /*
  * Packet handler to receive and handle a ctdb message
  */
-static NTSTATUS ctdb_handle_message(const struct data_blob *data,
+static NTSTATUS ctdb_handle_message(const DATA_BLOB *data,
                                    void *private_data)
 {
        struct ctdbd_connection *conn = talloc_get_type_abort(
@@ -1025,7 +1025,7 @@ struct ctdbd_traverse_state {
  * Handle a traverse record coming in on the ctdbd connection
  */
 
-static NTSTATUS ctdb_traverse_handler(const struct data_blob *blob,
+static NTSTATUS ctdb_traverse_handler(const DATA_BLOB *blob,
                                      void *private_data)
 {
        struct ctdbd_traverse_state *state =
diff --git a/source3/lib/data_blob.c b/source3/lib/data_blob.c
deleted file mode 100644 (file)
index 66c5daf..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-   Easy management of byte-length data
-   Copyright (C) Andrew Tridgell 2001
-   Copyright (C) Andrew Bartlett 2001
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-
-const DATA_BLOB data_blob_null = { NULL, 0, NULL };
-
-/*******************************************************************
- Free() a data blob.
-*******************************************************************/
-
-static void free_data_blob(DATA_BLOB *d)
-{
-       if ((d) && (d->free)) {
-               SAFE_FREE(d->data);
-       }
-}
-
-/*******************************************************************
- Construct a data blob, must be freed with data_blob_free().
- You can pass NULL for p and get a blank data blob
-*******************************************************************/
-
-DATA_BLOB data_blob(const void *p, size_t length)
-{
-       DATA_BLOB ret;
-
-       if (!length) {
-               ZERO_STRUCT(ret);
-               return ret;
-       }
-
-       if (p) {
-               ret.data = (uint8 *)smb_xmemdup(p, length);
-       } else {
-               ret.data = SMB_XMALLOC_ARRAY(uint8, length);
-       }
-       ret.length = length;
-       ret.free = free_data_blob;
-       return ret;
-}
-
-/*******************************************************************
- Construct a data blob, using supplied TALLOC_CTX.
-*******************************************************************/
-
-DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length)
-{
-       DATA_BLOB ret;
-
-       if (!length) {
-               ZERO_STRUCT(ret);
-               return ret;
-       }
-
-       if (p) {
-               ret.data = (uint8 *)TALLOC_MEMDUP(mem_ctx, p, length);
-               if (ret.data == NULL)
-                       smb_panic("data_blob_talloc: TALLOC_MEMDUP failed");
-       } else {
-               ret.data = (uint8 *)TALLOC(mem_ctx, length);
-               if (ret.data == NULL)
-                       smb_panic("data_blob_talloc: TALLOC failed");
-       }
-
-       ret.length = length;
-       ret.free = NULL;
-       return ret;
-}
-
-/*******************************************************************
- Free a data blob.
-*******************************************************************/
-
-void data_blob_free(DATA_BLOB *d)
-{
-       if (d) {
-               if (d->free) {
-                       (d->free)(d);
-               }
-               d->length = 0;
-       }
-}
-
-/*******************************************************************
- Clear a DATA_BLOB's contents
-*******************************************************************/
-
-void data_blob_clear(DATA_BLOB *d)
-{
-       if (d->data) {
-               memset(d->data, 0, d->length);
-       }
-}
-
-/*******************************************************************
- Free a data blob and clear its contents
-*******************************************************************/
-
-void data_blob_clear_free(DATA_BLOB *d)
-{
-       data_blob_clear(d);
-       data_blob_free(d);
-}
-
-/**
-  useful for constructing data blobs in test suites, while
-  avoiding const warnings
-**/
-DATA_BLOB data_blob_string_const(const char *str)
-{
-       DATA_BLOB blob;
-       blob.data = CONST_DISCARD(uint8 *, str);
-       blob.length = strlen(str) + 1;
-       blob.free = NULL;
-       return blob;
-}
-
-/**
- * Create a new data blob from const data 
- */
-DATA_BLOB data_blob_const(const void *p, size_t length)
-{
-       DATA_BLOB blob;
-       blob.data = CONST_DISCARD(uint8 *, p);
-       blob.length = length;
-       blob.free = NULL;
-       return blob;
-}
-
-/**
- construct a zero data blob, using supplied TALLOC_CTX.
- use this sparingly as it initialises data - better to initialise
- yourself if you want specific data in the blob
-**/
-DATA_BLOB data_blob_talloc_zero(TALLOC_CTX *mem_ctx, size_t length)
-{
-       DATA_BLOB blob = data_blob_talloc(mem_ctx, NULL, length);
-       data_blob_clear(&blob);
-       return blob;
-}
-
-/**
-print the data_blob as hex string
-**/
-_PUBLIC_ char *data_blob_hex_string(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob)
-{
-       int i;
-       char *hex_string;
-
-       hex_string = talloc_array(mem_ctx, char, (blob->length*2)+1);
-       if (!hex_string) {
-               return NULL;
-       }
-
-       for (i = 0; i < blob->length; i++)
-               slprintf(&hex_string[i*2], 3, "%02X", blob->data[i]);
-
-       hex_string[(blob->length*2)] = '\0';
-       return hex_string;
-}
-
-
index 2818634b14386224a1fe7d2dfeac6f7426661581..38daa61b330cb93be495349357d8b2dd74898b78 100644 (file)
@@ -821,7 +821,7 @@ static int db_ctdb_record_destr(struct db_record* data)
                   ? "Unlocking db %u key %s\n"
                   : "Unlocking db %u key %.20s\n",
                   (int)crec->ctdb_ctx->db_id,
-                  hex_encode(data, (unsigned char *)data->key.dptr,
+                  hex_encode_talloc(data, (unsigned char *)data->key.dptr,
                              data->key.dsize)));
 
        if (tdb_chainunlock(crec->ctdb_ctx->wtdb->tdb, data->key) != 0) {
@@ -871,7 +871,7 @@ static struct db_record *fetch_locked_internal(struct db_ctdb_ctx *ctx,
 again:
 
        if (DEBUGLEVEL >= 10) {
-               char *keystr = hex_encode(result, key.dptr, key.dsize);
+               char *keystr = hex_encode_talloc(result, key.dptr, key.dsize);
                DEBUG(10, (DEBUGLEVEL > 10
                           ? "Locking db %u key %s\n"
                           : "Locking db %u key %.20s\n",
index e3779de1e47effda998f93ba7b996cc0243a5f44..69ad8e4b20c7c16031d7a3013c729e159d5c4a13 100644 (file)
@@ -105,7 +105,7 @@ static struct db_record *db_file_fetch_locked(struct db_context *db,
 
        /* Cut to 8 bits */
        file->hash = fsh(key.dptr, key.dsize);
-       file->name = hex_encode(file, (unsigned char *)key.dptr, key.dsize);
+       file->name = hex_encode_talloc(file, (unsigned char *)key.dptr, key.dsize);
        if (file->name == NULL) {
                DEBUG(0, ("hex_encode failed\n"));
                TALLOC_FREE(result);
index b70ce3dfa068d94cb472caca5495746b665890d0..6e09627223c84a5b8726e8ca20b0a7a2e60af971 100644 (file)
@@ -18,7 +18,7 @@
 */
 
 #include "includes.h"
-#include "rbtree.h"
+#include "../lib/util/rbtree.h"
 
 #define DBWRAP_RBT_ALIGN(_size_) (((_size_)+15)&~15)
 
index 7bdadd37709526d1b18b0ab96a70a7218b436c89..4860c61ab04fe3fd19ba8d4b87966d98e8ee1f9d 100644 (file)
@@ -31,14 +31,14 @@ static int db_tdb_record_destr(struct db_record* data)
        struct db_tdb_ctx *ctx =
                talloc_get_type_abort(data->private_data, struct db_tdb_ctx);
 
-       /* This hex_encode() call allocates memory on data context. By way how current 
+       /* This hex_encode_talloc() call allocates memory on data context. By way how current 
           __talloc_free() code works, it is OK to allocate in the destructor as 
           the children of data will be freed after call to the destructor and this 
           new 'child' will be caught and freed correctly.
         */
        DEBUG(10, (DEBUGLEVEL > 10
                   ? "Unlocking key %s\n" : "Unlocking key %.20s\n",
-                  hex_encode(data, (unsigned char *)data->key.dptr,
+                  hex_encode_talloc(data, (unsigned char *)data->key.dptr,
                              data->key.dsize)));
 
        if (tdb_chainunlock(ctx->wtdb->tdb, data->key) != 0) {
@@ -94,7 +94,7 @@ static struct db_record *db_tdb_fetch_locked(struct db_context *db,
 
        /* Do not accidently allocate/deallocate w/o need when debug level is lower than needed */
        if(DEBUGLEVEL >= 10) {
-               char *keystr = hex_encode(NULL, (unsigned char*)key.dptr, key.dsize);
+               char *keystr = hex_encode_talloc(NULL, (unsigned char*)key.dptr, key.dsize);
                DEBUG(10, (DEBUGLEVEL > 10
                           ? "Locking key %s\n" : "Locking key %.20s\n",
                           keystr));
index d91b55dd23b70c150b4ee26c0b98dae7eddee830..be2707b59505a927c34dbf771b9fa255959dff43 100644 (file)
@@ -984,7 +984,7 @@ void dbgflush( void )
 
 ****************************************************************************/
 
-bool dbghdr(int level, int cls, const char *file, const char *func, int line)
+bool dbghdrclass(int level, int cls, const char *location, const char *func)
 {
        /* Ensure we don't lose any real errno value. */
        int old_errno = errno;
@@ -1046,10 +1046,10 @@ bool dbghdr(int level, int cls, const char *file, const char *func, int line)
                                           lp_debug_hires_timestamp()),
                        level, header_str);
                } else {
-                   (void)Debug1( "[%s, %2d%s] %s:%s(%d)\n",
+                   (void)Debug1( "[%s, %2d%s] %s(%s)\n",
                        current_timestring(debug_ctx(),
                                           lp_debug_hires_timestamp()),
-                       level, header_str, file, func, line );
+                       level, header_str, location, func );
                }
        }
 
@@ -1057,6 +1057,12 @@ bool dbghdr(int level, int cls, const char *file, const char *func, int line)
        return( True );
 }
 
+bool dbghdr(int level, const char *location, const char *func)
+{
+       /* For compatibility with Samba 4, which doesn't have debug classes */
+       return dbghdrclass(level, 0, location, func);
+}
+
 /***************************************************************************
  Add text to the body of the "current" debug message via the format buffer.
 
index 5427a8173ee09bcf3f727e413ca15608e2c7bfc0..a0d93d6fe76ccb6eac85f51d38a65b1e9438fa6f 100644 (file)
@@ -157,13 +157,13 @@ static void disp_sec_ace_object(struct security_ace_object *object)
 {
        if (object->flags & SEC_ACE_OBJECT_PRESENT) {
                printf("Object type: SEC_ACE_OBJECT_PRESENT\n");
-               printf("Object GUID: %s\n", smb_uuid_string(talloc_tos(),
-                       object->type.type));
+               printf("Object GUID: %s\n", GUID_string(talloc_tos(),
+                       &object->type.type));
        }
        if (object->flags & SEC_ACE_OBJECT_INHERITED_PRESENT) {
                printf("Object type: SEC_ACE_OBJECT_INHERITED_PRESENT\n");
-               printf("Object GUID: %s\n", smb_uuid_string(talloc_tos(), 
-                       object->inherited_type.inherited_type));
+               printf("Object GUID: %s\n", GUID_string(talloc_tos(), 
+                       &object->inherited_type.inherited_type));
        }
 }
 
index a3bb5be43af53c226de31b8d2101cbc6d1a7f081..b3c830dd5b9d4c16772712bd5d139b9386ed05b7 100644 (file)
@@ -41,7 +41,7 @@
        msgstr = lang_msg(format);
        if (!msgstr) return -1;
 
-       VA_COPY(ap2, ap);
+       va_copy(ap2, ap);
 
        ret = vasprintf(&p, msgstr, ap2);
 
index f03138708bacc0bcfe37b3e6bbe776bfee670618..8bbc9497ac7ec9642ca55d2c160820ac2050da47 100644 (file)
@@ -436,7 +436,7 @@ void dump_event_list(struct event_context *event_ctx)
                           te->event_name,
                           (unsigned long)te,
                           (int)evt.tv_sec,
-                          http_timestring(te->when.tv_sec)));
+                          http_timestring(talloc_tos(), te->when.tv_sec)));
        }
 
        for (fe = event_ctx->fd_events; fe; fe = fe->next) {
diff --git a/source3/lib/fsusage.c b/source3/lib/fsusage.c
deleted file mode 100644 (file)
index 66ffb9f..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-   functions to calculate the free disk space
-   Copyright (C) Andrew Tridgell 1998-2000
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-
-
-/* Return the number of TOSIZE-byte blocks used by
-   BLOCKS FROMSIZE-byte blocks, rounding away from zero.
-*/
-static SMB_BIG_UINT adjust_blocks(SMB_BIG_UINT blocks, SMB_BIG_UINT fromsize, SMB_BIG_UINT tosize)
-{
-       if (fromsize == tosize) { /* e.g., from 512 to 512 */
-               return blocks;
-       } else if (fromsize > tosize) { /* e.g., from 2048 to 512 */
-               return blocks * (fromsize / tosize);
-       } else { /* e.g., from 256 to 512 */
-               /* Protect against broken filesystems... */
-               if (fromsize == 0) {
-                       fromsize = tosize;
-               }
-               return (blocks + 1) / (tosize / fromsize);
-       }
-}
-
-/* this does all of the system specific guff to get the free disk space.
-   It is derived from code in the GNU fileutils package, but has been
-   considerably mangled for use here 
-
-   results are returned in *dfree and *dsize, in 512 byte units
-*/
-int sys_fsusage(const char *path, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
-{
-#ifdef STAT_STATFS3_OSF1
-#define CONVERT_BLOCKS(B) adjust_blocks ((SMB_BIG_UINT)(B), (SMB_BIG_UINT)fsd.f_fsize, (SMB_BIG_UINT)512)
-       struct statfs fsd;
-
-       if (statfs (path, &fsd, sizeof (struct statfs)) != 0)
-               return -1;
-#endif /* STAT_STATFS3_OSF1 */
-       
-#ifdef STAT_STATFS2_FS_DATA    /* Ultrix */
-#define CONVERT_BLOCKS(B) adjust_blocks ((SMB_BIG_UINT)(B), (SMB_BIG_UINT)1024, (SMB_BIG_UINT)512)     
-       struct fs_data fsd;
-       
-       if (statfs (path, &fsd) != 1)
-               return -1;
-       
-       (*dsize) = CONVERT_BLOCKS (fsd.fd_req.btot);
-       (*dfree) = CONVERT_BLOCKS (fsd.fd_req.bfreen);
-#endif /* STAT_STATFS2_FS_DATA */
-       
-#ifdef STAT_STATFS2_BSIZE      /* 4.3BSD, SunOS 4, HP-UX, AIX */
-#define CONVERT_BLOCKS(B) adjust_blocks ((SMB_BIG_UINT)(B), (SMB_BIG_UINT)fsd.f_bsize, (SMB_BIG_UINT)512)
-       struct statfs fsd;
-       
-       if (statfs (path, &fsd) < 0)
-               return -1;
-       
-#ifdef STATFS_TRUNCATES_BLOCK_COUNTS
-       /* In SunOS 4.1.2, 4.1.3, and 4.1.3_U1, the block counts in the
-          struct statfs are truncated to 2GB.  These conditions detect that
-          truncation, presumably without botching the 4.1.1 case, in which
-          the values are not truncated.  The correct counts are stored in
-          undocumented spare fields.  */
-       if (fsd.f_blocks == 0x1fffff && fsd.f_spare[0] > 0) {
-               fsd.f_blocks = fsd.f_spare[0];
-               fsd.f_bfree = fsd.f_spare[1];
-               fsd.f_bavail = fsd.f_spare[2];
-       }
-#endif /* STATFS_TRUNCATES_BLOCK_COUNTS */
-#endif /* STAT_STATFS2_BSIZE */
-       
-
-#ifdef STAT_STATFS2_FSIZE      /* 4.4BSD */
-#define CONVERT_BLOCKS(B) adjust_blocks ((SMB_BIG_UINT)(B), (SMB_BIG_UINT)fsd.f_fsize, (SMB_BIG_UINT)512)
-       
-       struct statfs fsd;
-       
-       if (statfs (path, &fsd) < 0)
-               return -1;
-#endif /* STAT_STATFS2_FSIZE */
-       
-#ifdef STAT_STATFS4            /* SVR3, Dynix, Irix, AIX */
-# if _AIX || defined(_CRAY)
-#  define CONVERT_BLOCKS(B) adjust_blocks ((SMB_BIG_UINT)(B), (SMB_BIG_UINT)fsd.f_bsize, (SMB_BIG_UINT)512)
-#  ifdef _CRAY
-#   define f_bavail f_bfree
-#  endif
-# else
-#  define CONVERT_BLOCKS(B) ((SMB_BIG_UINT)B)
-#  ifndef _SEQUENT_            /* _SEQUENT_ is DYNIX/ptx */
-#   ifndef DOLPHIN             /* DOLPHIN 3.8.alfa/7.18 has f_bavail */
-#    define f_bavail f_bfree
-#   endif
-#  endif
-# endif
-       
-       struct statfs fsd;
-
-       if (statfs (path, &fsd, sizeof fsd, 0) < 0)
-               return -1;
-       /* Empirically, the block counts on most SVR3 and SVR3-derived
-          systems seem to always be in terms of 512-byte blocks,
-          no matter what value f_bsize has.  */
-
-#endif /* STAT_STATFS4 */
-
-#if defined(STAT_STATVFS) || defined(STAT_STATVFS64)           /* SVR4 */
-#if defined HAVE_FRSIZE
-# define CONVERT_BLOCKS(B) \
-       adjust_blocks ((SMB_BIG_UINT)(B), fsd.f_frsize ? (SMB_BIG_UINT)fsd.f_frsize : (SMB_BIG_UINT)fsd.f_bsize, (SMB_BIG_UINT)512)
-#else
-# define CONVERT_BLOCKS(B) \
-       adjust_blocks ((SMB_BIG_UINT)(B), (SMB_BIG_UINT)fsd.f_bsize, (SMB_BIG_UINT)512)
-#endif
-
-#ifdef STAT_STATVFS64
-       struct statvfs64 fsd;
-       if (statvfs64(path, &fsd) < 0) return -1;
-#else
-       struct statvfs fsd;
-       if (statvfs(path, &fsd) < 0) return -1;
-#endif
-
-       /* f_frsize isn't guaranteed to be supported.  */
-
-#endif /* STAT_STATVFS */
-
-#ifndef CONVERT_BLOCKS
-       /* we don't have any dfree code! */
-       return -1;
-#else
-#if !defined(STAT_STATFS2_FS_DATA)
-       /* !Ultrix */
-       (*dsize) = CONVERT_BLOCKS (fsd.f_blocks);
-       (*dfree) = CONVERT_BLOCKS (fsd.f_bavail);
-#endif /* not STAT_STATFS2_FS_DATA */
-#endif
-
-       return 0;
-}
index 4590b812c58271c85c820b456f6ef26084f1860e..076a2fd51896cab64fcecc3caaf53340fc56f113 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "includes.h"
 
-static unsigned char smb_arc4_state[258];
+static struct arcfour_state smb_arc4_state;
 static uint32 counter;
 
 static bool done_reseed = False;
@@ -89,6 +89,7 @@ static void do_filehash(const char *fname, unsigned char *the_hash)
 static int do_reseed(bool use_fd, int fd)
 {
        unsigned char seed_inbuf[40];
+       DATA_BLOB seed_blob = { seed_inbuf, 40 };
        uint32 v1, v2; struct timeval tval; pid_t mypid;
        struct passwd *pw;
        int reseed_data = 0;
@@ -146,7 +147,7 @@ static int do_reseed(bool use_fd, int fd)
                        seed_inbuf[i] ^= ((char *)(&reseed_data))[i % sizeof(reseed_data)];
        }
 
-       smb_arc4_init(smb_arc4_state, seed_inbuf, sizeof(seed_inbuf));
+       arcfour_init(&smb_arc4_state, &seed_blob);
 
        return -1;
 }
@@ -155,7 +156,7 @@ static int do_reseed(bool use_fd, int fd)
  Interface to the (hopefully) good crypto random number generator.
 ********************************************************************/
 
-void generate_random_buffer( unsigned char *out, int len)
+void generate_random_buffer(uint8_t *out, int len)
 {
        static int urand_fd = -1;
        unsigned char md4_buf[64];
@@ -190,7 +191,7 @@ void generate_random_buffer( unsigned char *out, int len)
        while(len > 0) {
                int copy_len = len > 16 ? 16 : len;
 
-               smb_arc4_crypt(smb_arc4_state, md4_buf, sizeof(md4_buf));
+               arcfour_crypt_sbox(&smb_arc4_state, md4_buf, sizeof(md4_buf));
                mdfour(tmp_buf, md4_buf, sizeof(md4_buf));
                memcpy(p, tmp_buf, copy_len);
                p += copy_len;
@@ -204,15 +205,11 @@ void generate_random_buffer( unsigned char *out, int len)
 
 static char c_list[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+_-#.,";
 
-char *generate_random_str(size_t len)
+char *generate_random_str(TALLOC_CTX *mem_ctx, size_t len)
 {
-       static unsigned char retstr[256];
+       unsigned char *retstr = talloc_zero_array(mem_ctx, unsigned char, len);
        size_t i;
 
-       memset(retstr, '\0', sizeof(retstr));
-
-       if (len > sizeof(retstr)-1)
-               len = sizeof(retstr) -1;
        generate_random_buffer( retstr, len);
        for (i = 0; i < len; i++)
                retstr[i] = c_list[ retstr[i] % (sizeof(c_list)-1) ];
index 845563b4a185e70aa37ddd8f4f6e112e5c3eb417..df2075d4e38271cdf881050b0a3a2fc721560b1a 100644 (file)
@@ -1,33 +1 @@
 SMB_ENABLE(ldb_sqlite3,$with_sqlite3_support)
-
-AC_MSG_CHECKING([for Python])
-
-PYTHON=
-AC_ARG_WITH(python,
-[  --with-python=PYTHONNAME  build Python libraries],
-[ case "${withval-python}" in
-  yes)
-        PYTHON=python
-        ;;
-  no)
-        PYTHON=
-        ;;
-  *)
-        PYTHON=${withval-python}
-        ;;
-  esac ])
-
-if test x"$PYTHON" != "x"; then
-       incdir=`python -c 'import sys; print "%s/include/python%d.%d" % (sys.prefix, sys.version_info[[0]], sys.version_info[[1]])'`
-       CPPFLAGS="$CPPFLAGS -I $incdir"
-fi
-
-if test x"$PYTHON" != "x"; then
-       AC_MSG_RESULT([${withval-python}])
-else
-       AC_MSG_RESULT(no)
-       SMB_ENABLE(swig_ldb, NO)
-fi
-
-AC_SUBST(PYTHON)
index e1426bc811a862529a9ec48f2648980025c9ed1b..9c892fedfac5cd68f175675ce4858a80fda37901 100644 (file)
@@ -18,7 +18,7 @@
 */
 
 #include "memcache.h"
-#include "rbtree.h"
+#include "../lib/util/rbtree.h"
 
 static struct memcache *global_cache;
 
index c3fccb484015cfdba9ff6510a006d7e6b510c80b..8dba4b88380a59fdda6dc062d6cb3cb2c24b6bd0 100644 (file)
@@ -1224,7 +1224,7 @@ WERROR NetGroupEnum_r(struct libnetapi_ctx *ctx,
        }
 
        if (r->out.total_entries) {
-               *r->out.total_entries = domain_info->info2.num_groups;
+               *r->out.total_entries = domain_info->general.num_groups;
        }
 
        status = rpccli_samr_QueryDisplayInfo2(pipe_cli,
index 25a3427bc1785c88d656d950f065deee7a1ff258..5e738e1262cf954fbf48ac2072a111bd05ba126c 100644 (file)
@@ -822,7 +822,7 @@ WERROR NetLocalGroupEnum_r(struct libnetapi_ctx *ctx,
        }
 
        if (r->out.total_entries) {
-               *r->out.total_entries += builtin_info->info2.num_aliases;
+               *r->out.total_entries += builtin_info->general.num_aliases;
        }
 
        status = rpccli_samr_QueryDomainInfo(pipe_cli, ctx,
@@ -835,7 +835,7 @@ WERROR NetLocalGroupEnum_r(struct libnetapi_ctx *ctx,
        }
 
        if (r->out.total_entries) {
-               *r->out.total_entries += domain_info->info2.num_aliases;
+               *r->out.total_entries += domain_info->general.num_aliases;
        }
 
        status = rpccli_samr_EnumDomainAliases(pipe_cli, ctx,
index e0486165f34efa78ad31c4b5c76d0210b534dff9..e4cab6ba87216499249eca1d34b5df705bfc6a51 100644 (file)
@@ -21,7 +21,7 @@
 
 struct packet_context {
        int fd;
-       struct data_blob in, out;
+       DATA_BLOB in, out;
 };
 
 /*
@@ -120,16 +120,16 @@ NTSTATUS packet_fd_read_sync(struct packet_context *ctx)
 }
 
 bool packet_handler(struct packet_context *ctx,
-                   bool (*full_req)(const struct data_blob *data,
+                   bool (*full_req)(const DATA_BLOB *data,
                                     size_t *length,
                                     void *private_data),
-                   NTSTATUS (*callback)(const struct data_blob *data,
+                   NTSTATUS (*callback)(const DATA_BLOB *data,
                                         void *private_data),
                    void *private_data,
                    NTSTATUS *status)
 {
        size_t length;
-       struct data_blob data;
+       DATA_BLOB data;
 
        if (!full_req(&ctx->in, &length, private_data)) {
                return False;
@@ -211,7 +211,7 @@ NTSTATUS packet_send(struct packet_context *ctx, int num_blobs, ...)
        va_start(ap, num_blobs);
        for (i=0; i<num_blobs; i++) {
                size_t tmp;
-               struct data_blob blob = va_arg(ap, struct data_blob);
+               DATA_BLOB blob = va_arg(ap, DATA_BLOB);
 
                tmp = len + blob.length;
                if (tmp < len) {
@@ -236,7 +236,7 @@ NTSTATUS packet_send(struct packet_context *ctx, int num_blobs, ...)
 
        va_start(ap, num_blobs);
        for (i=0; i<num_blobs; i++) {
-               struct data_blob blob = va_arg(ap, struct data_blob);
+               DATA_BLOB blob = va_arg(ap, DATA_BLOB);
 
                memcpy(ctx->out.data+ctx->out.length, blob.data, blob.length);
                ctx->out.length += blob.length;
index c3da6a9bbaf4924a820c45ac72898ad92d321702..14e59257bac03c715f40ef32d87172d7b380a0f4 100644 (file)
@@ -30,7 +30,7 @@
 
 static pid_t initialised;
 static int select_pipe[2];
-static VOLATILE unsigned pipe_written, pipe_read;
+static volatile unsigned pipe_written, pipe_read;
 
 /*******************************************************************
  Call this from all Samba signal handlers if you want to avoid a 
@@ -161,7 +161,7 @@ int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorf
                        errorfds_buf = *errorfds;
                if (ptval && (errno == EINTR)) {
                        struct timeval now_time;
-                       SMB_BIG_INT tdif;
+                       int64_t tdif;
 
                        GetTimeOfDay(&now_time);
                        tdif = usec_time_diff(&end_time, &now_time);
diff --git a/source3/lib/signal.c b/source3/lib/signal.c
deleted file mode 100644 (file)
index 4b1c95e..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-   signal handling functions
-
-   Copyright (C) Andrew Tridgell 1998
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-
-/****************************************************************************
- Catch child exits and reap the child zombie status.
-****************************************************************************/
-
-static void sig_cld(int signum)
-{
-       while (sys_waitpid((pid_t)-1,(int *)NULL, WNOHANG) > 0)
-               ;
-
-       /*
-        * Turns out it's *really* important not to
-        * restore the signal handler here if we have real POSIX
-        * signal handling. If we do, then we get the signal re-delivered
-        * immediately - hey presto - instant loop ! JRA.
-        */
-
-#if !defined(HAVE_SIGACTION)
-       CatchSignal(SIGCLD, sig_cld);
-#endif
-}
-
-/****************************************************************************
-catch child exits - leave status;
-****************************************************************************/
-
-static void sig_cld_leave_status(int signum)
-{
-       /*
-        * Turns out it's *really* important not to
-        * restore the signal handler here if we have real POSIX
-        * signal handling. If we do, then we get the signal re-delivered
-        * immediately - hey presto - instant loop ! JRA.
-        */
-
-#if !defined(HAVE_SIGACTION)
-       CatchSignal(SIGCLD, sig_cld_leave_status);
-#endif
-}
-
-/*******************************************************************
- Block sigs.
-********************************************************************/
-
-void BlockSignals(bool block,int signum)
-{
-#ifdef HAVE_SIGPROCMASK
-       sigset_t set;
-       sigemptyset(&set);
-       sigaddset(&set,signum);
-       sigprocmask(block?SIG_BLOCK:SIG_UNBLOCK,&set,NULL);
-#elif defined(HAVE_SIGBLOCK)
-       if (block) {
-               sigblock(sigmask(signum));
-       } else {
-               sigsetmask(siggetmask() & ~sigmask(signum));
-       }
-#else
-       /* yikes! This platform can't block signals? */
-       static int done;
-       if (!done) {
-               DEBUG(0,("WARNING: No signal blocking available\n"));
-               done=1;
-       }
-#endif
-}
-
-/*******************************************************************
- Catch a signal. This should implement the following semantics:
-
- 1) The handler remains installed after being called.
- 2) The signal should be blocked during handler execution.
-********************************************************************/
-
-void (*CatchSignal(int signum,void (*handler)(int )))(int)
-{
-#ifdef HAVE_SIGACTION
-       struct sigaction act;
-       struct sigaction oldact;
-
-       ZERO_STRUCT(act);
-
-       act.sa_handler = handler;
-#ifdef SA_RESTART
-       /*
-        * We *want* SIGALRM to interrupt a system call.
-        */
-       if(signum != SIGALRM)
-               act.sa_flags = SA_RESTART;
-#endif
-       sigemptyset(&act.sa_mask);
-       sigaddset(&act.sa_mask,signum);
-       sigaction(signum,&act,&oldact);
-       return oldact.sa_handler;
-#else /* !HAVE_SIGACTION */
-       /* FIXME: need to handle sigvec and systems with broken signal() */
-       return signal(signum, handler);
-#endif
-}
-
-/*******************************************************************
- Ignore SIGCLD via whatever means is necessary for this OS.
-********************************************************************/
-
-void CatchChild(void)
-{
-       CatchSignal(SIGCLD, sig_cld);
-}
-
-/*******************************************************************
- Catch SIGCLD but leave the child around so it's status can be reaped.
-********************************************************************/
-
-void CatchChildLeaveStatus(void)
-{
-       CatchSignal(SIGCLD, sig_cld_leave_status);
-}
index 1a29f40164924d3d2d9ee7ccab19d94c5ed163d4..1393a098d5d6c51c037ba37febcc2fe0404d02cf 100644 (file)
@@ -183,7 +183,7 @@ static WERROR smbconf_txt_load_file(struct smbconf_ctx *ctx)
        WERROR werr;
        uint64_t new_csn;
 
-       if (!file_exist(ctx->path, NULL)) {
+       if (!file_exist(ctx->path)) {
                return WERR_BADFILE;
        }
 
index 93494d6dadbcf616dd6b962661aa6a7f59f24c9d..f5e152bb959f0ce9b5421a01069a7ed968c3be28 100644 (file)
@@ -1211,7 +1211,7 @@ static int smbldap_search_ext(struct smbldap_state *ldap_state,
 
        if (ldap_state->last_rebind.tv_sec > 0) {
                struct timeval  tval;
-               SMB_BIG_INT     tdiff = 0;
+               int64_t tdiff = 0;
                int             sleep_time = 0;
 
                ZERO_STRUCT(tval);
index 4a2d88abdf5ee58d2394cd0657ed6d8da779f9fa..5ee199de22dd60548afcaed37490aedc6c51c9b5 100644 (file)
@@ -295,7 +295,7 @@ static int command_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t
                                dp->bsize = 1024;
                        }
 
-                       file_lines_free(lines);
+                       TALLOC_FREE(lines);
                        lines = NULL;
 
                        DEBUG (3, ("Parsed output of get_quota, ...\n"));
@@ -331,7 +331,7 @@ static int command_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t
 
 invalid_param:
 
-       file_lines_free(lines);
+       TALLOC_FREE(lines);
        DEBUG(0,("The output of get_quota_command is invalid!\n"));
        return -1;
 }
@@ -392,7 +392,7 @@ static int command_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t
 
                        DEBUG (3, ("Read output from set_quota, \"%s\"\n", line));
 
-                       file_lines_free(lines);
+                       TALLOC_FREE(lines);
 
                        return 0;
                }
index f185bba6df3a67ff4ffff36d435713861ce29043..8a1b12238cca88e449297eca1381da6dee785a06 100644 (file)
@@ -89,7 +89,7 @@ int sys_get_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
        int ret = -1;
        uint32 qflags = 0;
        struct dqblk D;
-       SMB_BIG_UINT bsize = (SMB_BIG_UINT)QUOTABLOCK_SIZE;
+       uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
 
        ZERO_STRUCT(D);
        ZERO_STRUCT(*dp);
@@ -162,12 +162,12 @@ int sys_get_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
        }
 
        dp->bsize = bsize;
-       dp->softlimit = (SMB_BIG_UINT)D.dqb_bsoftlimit;
-       dp->hardlimit = (SMB_BIG_UINT)D.dqb_bhardlimit;
-       dp->ihardlimit = (SMB_BIG_UINT)D.dqb_ihardlimit;
-       dp->isoftlimit = (SMB_BIG_UINT)D.dqb_isoftlimit;
-       dp->curinodes = (SMB_BIG_UINT)D.dqb_curinodes;
-       dp->curblocks = (SMB_BIG_UINT)D.dqb_curblocks;
+       dp->softlimit = (uint64_t)D.dqb_bsoftlimit;
+       dp->hardlimit = (uint64_t)D.dqb_bhardlimit;
+       dp->ihardlimit = (uint64_t)D.dqb_ihardlimit;
+       dp->isoftlimit = (uint64_t)D.dqb_isoftlimit;
+       dp->curinodes = (uint64_t)D.dqb_curinodes;
+       dp->curblocks = (uint64_t)D.dqb_curblocks;
 
 
        dp->qflags = qflags;
@@ -184,7 +184,7 @@ int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
        uint32 qflags = 0;
        uint32 oldqflags = 0;
        struct dqblk D;
-       SMB_BIG_UINT bsize = (SMB_BIG_UINT)QUOTABLOCK_SIZE;
+       uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
 
        ZERO_STRUCT(D);
 
index f9a0464086026feb00977da5462546d99b363cbf..5720328764b539812d0d2396072ec5b9552c05c5 100644 (file)
@@ -41,7 +41,7 @@ static int sys_get_linux_v1_quota(const char *path, const char *bdev, enum SMB_Q
        int ret = -1;
        uint32 qflags = 0;
        struct v1_kern_dqblk D;
-       SMB_BIG_UINT bsize = (SMB_BIG_UINT)QUOTABLOCK_SIZE;
+       uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
 
        ZERO_STRUCT(D);
 
@@ -88,12 +88,12 @@ static int sys_get_linux_v1_quota(const char *path, const char *bdev, enum SMB_Q
        }
 
        dp->bsize = bsize;
-       dp->softlimit = (SMB_BIG_UINT)D.dqb_bsoftlimit;
-       dp->hardlimit = (SMB_BIG_UINT)D.dqb_bhardlimit;
-       dp->ihardlimit = (SMB_BIG_UINT)D.dqb_ihardlimit;
-       dp->isoftlimit = (SMB_BIG_UINT)D.dqb_isoftlimit;
-       dp->curinodes = (SMB_BIG_UINT)D.dqb_curinodes;
-       dp->curblocks = (SMB_BIG_UINT)D.dqb_curblocks;
+       dp->softlimit = (uint64_t)D.dqb_bsoftlimit;
+       dp->hardlimit = (uint64_t)D.dqb_bhardlimit;
+       dp->ihardlimit = (uint64_t)D.dqb_ihardlimit;
+       dp->isoftlimit = (uint64_t)D.dqb_isoftlimit;
+       dp->curinodes = (uint64_t)D.dqb_curinodes;
+       dp->curblocks = (uint64_t)D.dqb_curblocks;
 
 
        dp->qflags = qflags;
@@ -110,7 +110,7 @@ static int sys_set_linux_v1_quota(const char *path, const char *bdev, enum SMB_Q
        uint32 qflags = 0;
        uint32 oldqflags = 0;
        struct v1_kern_dqblk D;
-       SMB_BIG_UINT bsize = (SMB_BIG_UINT)QUOTABLOCK_SIZE;
+       uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
 
        ZERO_STRUCT(D);
 
@@ -175,7 +175,7 @@ static int sys_get_linux_v2_quota(const char *path, const char *bdev, enum SMB_Q
        int ret = -1;
        uint32 qflags = 0;
        struct v2_kern_dqblk D;
-       SMB_BIG_UINT bsize = (SMB_BIG_UINT)QUOTABLOCK_SIZE;
+       uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
 
        ZERO_STRUCT(D);
 
@@ -222,12 +222,12 @@ static int sys_get_linux_v2_quota(const char *path, const char *bdev, enum SMB_Q
        }
 
        dp->bsize = bsize;
-       dp->softlimit = (SMB_BIG_UINT)D.dqb_bsoftlimit;
-       dp->hardlimit = (SMB_BIG_UINT)D.dqb_bhardlimit;
-       dp->ihardlimit = (SMB_BIG_UINT)D.dqb_ihardlimit;
-       dp->isoftlimit = (SMB_BIG_UINT)D.dqb_isoftlimit;
-       dp->curinodes = (SMB_BIG_UINT)D.dqb_curinodes;
-       dp->curblocks = (SMB_BIG_UINT)D.dqb_curspace/bsize;
+       dp->softlimit = (uint64_t)D.dqb_bsoftlimit;
+       dp->hardlimit = (uint64_t)D.dqb_bhardlimit;
+       dp->ihardlimit = (uint64_t)D.dqb_ihardlimit;
+       dp->isoftlimit = (uint64_t)D.dqb_isoftlimit;
+       dp->curinodes = (uint64_t)D.dqb_curinodes;
+       dp->curblocks = (uint64_t)D.dqb_curspace/bsize;
 
 
        dp->qflags = qflags;
@@ -244,7 +244,7 @@ static int sys_set_linux_v2_quota(const char *path, const char *bdev, enum SMB_Q
        uint32 qflags = 0;
        uint32 oldqflags = 0;
        struct v2_kern_dqblk D;
-       SMB_BIG_UINT bsize = (SMB_BIG_UINT)QUOTABLOCK_SIZE;
+       uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
 
        ZERO_STRUCT(D);
 
@@ -309,7 +309,7 @@ static int sys_get_linux_gen_quota(const char *path, const char *bdev, enum SMB_
        int ret = -1;
        uint32 qflags = 0;
        struct if_dqblk D;
-       SMB_BIG_UINT bsize = (SMB_BIG_UINT)QUOTABLOCK_SIZE;
+       uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
 
        ZERO_STRUCT(D);
 
@@ -356,12 +356,12 @@ static int sys_get_linux_gen_quota(const char *path, const char *bdev, enum SMB_
        }
 
        dp->bsize = bsize;
-       dp->softlimit = (SMB_BIG_UINT)D.dqb_bsoftlimit;
-       dp->hardlimit = (SMB_BIG_UINT)D.dqb_bhardlimit;
-       dp->ihardlimit = (SMB_BIG_UINT)D.dqb_ihardlimit;
-       dp->isoftlimit = (SMB_BIG_UINT)D.dqb_isoftlimit;
-       dp->curinodes = (SMB_BIG_UINT)D.dqb_curinodes;
-       dp->curblocks = (SMB_BIG_UINT)D.dqb_curspace/bsize;
+       dp->softlimit = (uint64_t)D.dqb_bsoftlimit;
+       dp->hardlimit = (uint64_t)D.dqb_bhardlimit;
+       dp->ihardlimit = (uint64_t)D.dqb_ihardlimit;
+       dp->isoftlimit = (uint64_t)D.dqb_isoftlimit;
+       dp->curinodes = (uint64_t)D.dqb_curinodes;
+       dp->curblocks = (uint64_t)D.dqb_curspace/bsize;
 
 
        dp->qflags = qflags;
@@ -378,7 +378,7 @@ static int sys_set_linux_gen_quota(const char *path, const char *bdev, enum SMB_
        uint32 qflags = 0;
        uint32 oldqflags = 0;
        struct if_dqblk D;
-       SMB_BIG_UINT bsize = (SMB_BIG_UINT)QUOTABLOCK_SIZE;
+       uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
 
        ZERO_STRUCT(D);
 
index 30538c167bbb6a83b5412fb1666e6244db8ebd00..1e438e9a6d67b040c1c1818de1d81c129055fb43 100644 (file)
@@ -76,7 +76,7 @@ int sys_get_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
 {
        int ret = -1;
        uint32 qflags = 0;
-       SMB_BIG_UINT bsize = (SMB_BIG_UINT)BBSIZE;
+       uint64_t bsize = (uint64_t)BBSIZE;
        struct fs_disk_quota D;
        struct fs_quota_stat F;
        ZERO_STRUCT(D);
@@ -145,12 +145,12 @@ int sys_get_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
        }
 
        dp->bsize = bsize;
-       dp->softlimit = (SMB_BIG_UINT)D.d_blk_softlimit;
-       dp->hardlimit = (SMB_BIG_UINT)D.d_blk_hardlimit;
-       dp->ihardlimit = (SMB_BIG_UINT)D.d_ino_hardlimit;
-       dp->isoftlimit = (SMB_BIG_UINT)D.d_ino_softlimit;
-       dp->curinodes = (SMB_BIG_UINT)D.d_icount;
-       dp->curblocks = (SMB_BIG_UINT)D.d_bcount;
+       dp->softlimit = (uint64_t)D.d_blk_softlimit;
+       dp->hardlimit = (uint64_t)D.d_blk_hardlimit;
+       dp->ihardlimit = (uint64_t)D.d_ino_hardlimit;
+       dp->isoftlimit = (uint64_t)D.d_ino_softlimit;
+       dp->curinodes = (uint64_t)D.d_icount;
+       dp->curblocks = (uint64_t)D.d_bcount;
        dp->qflags = qflags;
 
        return ret;
@@ -163,7 +163,7 @@ int sys_set_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
 {
        int ret = -1;
        uint32 qflags = 0;
-       SMB_BIG_UINT bsize = (SMB_BIG_UINT)BBSIZE;
+       uint64_t bsize = (uint64_t)BBSIZE;
        struct fs_disk_quota D;
        struct fs_quota_stat F;
        int q_on = 0;
index 8cefef6e2331357fbe827d6fc3bf2f155a6b8f00..c4aa7d01b3a7048c510fa914f482cf78df888ce7 100644 (file)
 
 #define NTTIME_INFINITY (NTTIME)0x8000000000000000LL
 
-/***************************************************************************
- External access to time_t_min and time_t_max.
-****************************************************************************/
-
-time_t get_time_t_max(void)
-{
-       return TIME_T_MAX;
-}
-
-/***************************************************************************
- A gettimeofday wrapper.
-****************************************************************************/
-
-void GetTimeOfDay(struct timeval *tval)
-{
-#ifdef HAVE_GETTIMEOFDAY_TZ
-       gettimeofday(tval,NULL);
-#else
-       gettimeofday(tval);
-#endif
-}
-
 #if (SIZEOF_LONG == 8)
 #define TIME_FIXUP_CONSTANT_INT 11644473600L
 #elif (SIZEOF_LONG_LONG == 8)
 #define TIME_FIXUP_CONSTANT_INT 11644473600LL
 #endif
 
-/****************************************************************************
- Interpret an 8 byte "filetime" structure to a time_t
- It's originally in "100ns units since jan 1st 1601"
-
- An 8 byte value of 0xffffffffffffffff will be returned as a timespec of
-
-       tv_sec = 0
-       tv_nsec = 0;
-
- Returns GMT.
-****************************************************************************/
-
-time_t nt_time_to_unix(NTTIME nt)
-{
-       return convert_timespec_to_time_t(nt_time_to_unix_timespec(&nt));
-}
-
-/****************************************************************************
- Put a 8 byte filetime from a time_t. Uses GMT.
-****************************************************************************/
-
-void unix_to_nt_time(NTTIME *nt, time_t t)
-{
-       uint64_t t2; 
-
-       if (t == (time_t)-1) {
-               *nt = (NTTIME)-1LL;
-               return;
-       }       
-
-       if (t == TIME_T_MAX) {
-               *nt = 0x7fffffffffffffffLL;
-               return;
-       }
-
-       if (t == 0) {
-               *nt = 0;
-               return;
-       }               
-
-       t2 = t;
-       t2 += TIME_FIXUP_CONSTANT_INT;
-       t2 *= 1000*1000*10;
-
-       *nt = t2;
-}
-
-/****************************************************************************
- Check if it's a null unix time.
-****************************************************************************/
-
-bool null_time(time_t t)
-{
-       return t == 0 || 
-               t == (time_t)0xFFFFFFFF || 
-               t == (time_t)-1;
-}
-
-/****************************************************************************
- Check if it's a null NTTIME.
-****************************************************************************/
-
-bool null_nttime(NTTIME t)
-{
-       return t == 0 || t == (NTTIME)-1;
-}
-
-/****************************************************************************
- Check if it's a null timespec.
-****************************************************************************/
-
-bool null_timespec(struct timespec ts)
-{
-       return ts.tv_sec == 0 || 
-               ts.tv_sec == (time_t)0xFFFFFFFF || 
-               ts.tv_sec == (time_t)-1;
-}
-
 /*******************************************************************
   create a 16 bit dos packed date
 ********************************************************************/
@@ -192,183 +92,6 @@ static uint32_t make_dos_date(time_t unixdate, int zone_offset)
        return ret;
 }
 
-/**
-put a dos date into a buffer (time/date format)
-This takes GMT time and puts local time in the buffer
-**/
-void push_dos_date(uint8_t *buf, int offset, time_t unixdate, int zone_offset)
-{
-       uint32_t x = make_dos_date(unixdate, zone_offset);
-       SIVAL(buf,offset,x);
-}
-
-/**
-put a dos date into a buffer (date/time format)
-This takes GMT time and puts local time in the buffer
-**/
-void push_dos_date2(uint8_t *buf,int offset,time_t unixdate, int zone_offset)
-{
-       uint32_t x;
-       x = make_dos_date(unixdate, zone_offset);
-       x = ((x&0xFFFF)<<16) | ((x&0xFFFF0000)>>16);
-       SIVAL(buf,offset,x);
-}
-
-/**
-put a dos 32 bit "unix like" date into a buffer. This routine takes
-GMT and converts it to LOCAL time before putting it (most SMBs assume
-localtime for this sort of date)
-**/
-void push_dos_date3(uint8_t *buf,int offset,time_t unixdate, int zone_offset)
-{
-       if (!null_time(unixdate)) {
-               unixdate -= zone_offset;
-       }
-       SIVAL(buf,offset,unixdate);
-}
-
-/*******************************************************************
-  interpret a 32 bit dos packed date/time to some parameters
-********************************************************************/
-static void interpret_dos_date(uint32_t date,int *year,int *month,int *day,int *hour,int *minute,int *second)
-{
-       uint32_t p0,p1,p2,p3;
-
-       p0=date&0xFF; p1=((date&0xFF00)>>8)&0xFF; 
-       p2=((date&0xFF0000)>>16)&0xFF; p3=((date&0xFF000000)>>24)&0xFF;
-
-       *second = 2*(p0 & 0x1F);
-       *minute = ((p0>>5)&0xFF) + ((p1&0x7)<<3);
-       *hour = (p1>>3)&0xFF;
-       *day = (p2&0x1F);
-       *month = ((p2>>5)&0xFF) + ((p3&0x1)<<3) - 1;
-       *year = ((p3>>1)&0xFF) + 80;
-}
-
-/**
-  create a unix date (int GMT) from a dos date (which is actually in
-  localtime)
-**/
-time_t pull_dos_date(const uint8_t *date_ptr, int zone_offset)
-{
-       uint32_t dos_date=0;
-       struct tm t;
-       time_t ret;
-
-       dos_date = IVAL(date_ptr,0);
-
-       if (dos_date == 0) return (time_t)0;
-  
-       interpret_dos_date(dos_date,&t.tm_year,&t.tm_mon,
-                          &t.tm_mday,&t.tm_hour,&t.tm_min,&t.tm_sec);
-       t.tm_isdst = -1;
-  
-       ret = timegm(&t);
-
-       ret += zone_offset;
-
-       return ret;
-}
-
-/**
-like make_unix_date() but the words are reversed
-**/
-time_t pull_dos_date2(const uint8_t *date_ptr, int zone_offset)
-{
-       uint32_t x,x2;
-
-       x = IVAL(date_ptr,0);
-       x2 = ((x&0xFFFF)<<16) | ((x&0xFFFF0000)>>16);
-       SIVAL(&x,0,x2);
-
-       return pull_dos_date((const uint8_t *)&x, zone_offset);
-}
-
-/**
-  create a unix GMT date from a dos date in 32 bit "unix like" format
-  these generally arrive as localtimes, with corresponding DST
-**/
-time_t pull_dos_date3(const uint8_t *date_ptr, int zone_offset)
-{
-       time_t t = (time_t)IVAL(date_ptr,0);
-       if (!null_time(t)) {
-               t += zone_offset;
-       }
-       return t;
-}
-
-/***************************************************************************
- Return a HTTP/1.0 time string.
-***************************************************************************/
-
-char *http_timestring(time_t t)
-{
-       fstring buf;
-       struct tm *tm = localtime(&t);
-
-       if (t == TIME_T_MAX) {
-               fstrcpy(buf, "never");
-       } else if (!tm) {
-               fstr_sprintf(buf, "%ld seconds since the Epoch", (long)t);
-       } else {
-#ifndef HAVE_STRFTIME
-               const char *asct = asctime(tm);
-               fstrcpy(buf, asct ? asct : "unknown");
-       }
-       if(buf[strlen(buf)-1] == '\n') {
-               buf[strlen(buf)-1] = 0;
-#else /* !HAVE_STRFTIME */
-               strftime(buf, sizeof(buf)-1, "%a, %d %b %Y %H:%M:%S %Z", tm);
-#endif /* !HAVE_STRFTIME */
-       }
-       return talloc_strdup(talloc_tos(), buf);
-}
-
-
-/**
- Return the date and time as a string
-**/
-char *timestring(TALLOC_CTX *mem_ctx, time_t t)
-{
-       char *TimeBuf;
-       char tempTime[80];
-       struct tm *tm;
-
-       tm = localtime(&t);
-       if (!tm) {
-               return talloc_asprintf(mem_ctx,
-                                      "%ld seconds since the Epoch",
-                                      (long)t);
-       }
-
-#ifdef HAVE_STRFTIME
-       /* some versions of gcc complain about using %c. This is a bug
-          in the gcc warning, not a bug in this code. See a recent
-          strftime() manual page for details.
-        */
-       strftime(tempTime,sizeof(tempTime)-1,"%c %Z",tm);
-       TimeBuf = talloc_strdup(mem_ctx, tempTime);
-#else
-       TimeBuf = talloc_strdup(mem_ctx, asctime(tm));
-#endif
-
-       return TimeBuf;
-}
-
-/**
-  return a talloced string representing a NTTIME for human consumption
-*/
-const char *nt_time_string(TALLOC_CTX *mem_ctx, NTTIME nt)
-{
-       time_t t;
-       if (nt == 0) {
-               return "NTTIME(0)";
-       }
-       t = nt_time_to_unix(nt);
-       return timestring(mem_ctx, t);
-}
-
-
 /**
   parse a nttime as a large integer in a string and return a NTTIME
 */
@@ -377,190 +100,6 @@ NTTIME nttime_from_string(const char *s)
        return strtoull(s, NULL, 0);
 }
 
-/**
-  return (tv1 - tv2) in microseconds
-*/
-int64_t usec_time_diff(struct timeval *tv1, struct timeval *tv2)
-{
-       int64_t sec_diff = tv1->tv_sec - tv2->tv_sec;
-       return (sec_diff * 1000000) + (int64_t)(tv1->tv_usec - tv2->tv_usec);
-}
-
-
-/**
-  return a zero timeval
-*/
-struct timeval timeval_zero(void)
-{
-       struct timeval tv;
-       tv.tv_sec = 0;
-       tv.tv_usec = 0;
-       return tv;
-}
-
-/**
-  return True if a timeval is zero
-*/
-bool timeval_is_zero(const struct timeval *tv)
-{
-       return tv->tv_sec == 0 && tv->tv_usec == 0;
-}
-
-/**
-  return a timeval for the current time
-*/
-struct timeval timeval_current(void)
-{
-       struct timeval tv;
-       GetTimeOfDay(&tv);
-       return tv;
-}
-
-/**
-  return a timeval struct with the given elements
-*/
-struct timeval timeval_set(uint32_t secs, uint32_t usecs)
-{
-       struct timeval tv;
-       tv.tv_sec = secs;
-       tv.tv_usec = usecs;
-       return tv;
-}
-
-
-/**
-  return a timeval ofs microseconds after tv
-*/
-struct timeval timeval_add(const struct timeval *tv,
-                          uint32_t secs, uint32_t usecs)
-{
-       struct timeval tv2 = *tv;
-       const unsigned int million = 1000000;
-       tv2.tv_sec += secs;
-       tv2.tv_usec += usecs;
-       tv2.tv_sec += tv2.tv_usec / million;
-       tv2.tv_usec = tv2.tv_usec % million;
-       return tv2;
-}
-
-/**
-  return the sum of two timeval structures
-*/
-struct timeval timeval_sum(const struct timeval *tv1,
-                          const struct timeval *tv2)
-{
-       return timeval_add(tv1, tv2->tv_sec, tv2->tv_usec);
-}
-
-/**
-  return a timeval secs/usecs into the future
-*/
-struct timeval timeval_current_ofs(uint32_t secs, uint32_t usecs)
-{
-       struct timeval tv = timeval_current();
-       return timeval_add(&tv, secs, usecs);
-}
-
-/**
-  compare two timeval structures. 
-  Return -1 if tv1 < tv2
-  Return 0 if tv1 == tv2
-  Return 1 if tv1 > tv2
-*/
-int timeval_compare(const struct timeval *tv1, const struct timeval *tv2)
-{
-       if (tv1->tv_sec  > tv2->tv_sec)  return 1;
-       if (tv1->tv_sec  < tv2->tv_sec)  return -1;
-       if (tv1->tv_usec > tv2->tv_usec) return 1;
-       if (tv1->tv_usec < tv2->tv_usec) return -1;
-       return 0;
-}
-
-/**
-  return True if a timer is in the past
-*/
-bool timeval_expired(const struct timeval *tv)
-{
-       struct timeval tv2 = timeval_current();
-       if (tv2.tv_sec > tv->tv_sec) return True;
-       if (tv2.tv_sec < tv->tv_sec) return False;
-       return (tv2.tv_usec >= tv->tv_usec);
-}
-
-/**
-  return the number of seconds elapsed between two times
-*/
-double timeval_elapsed2(const struct timeval *tv1, const struct timeval *tv2)
-{
-       return (tv2->tv_sec - tv1->tv_sec) + 
-              (tv2->tv_usec - tv1->tv_usec)*1.0e-6;
-}
-
-/**
-  return the number of seconds elapsed since a given time
-*/
-double timeval_elapsed(const struct timeval *tv)
-{
-       struct timeval tv2 = timeval_current();
-       return timeval_elapsed2(tv, &tv2);
-}
-
-/**
-  return the lesser of two timevals
-*/
-struct timeval timeval_min(const struct timeval *tv1,
-                          const struct timeval *tv2)
-{
-       if (tv1->tv_sec < tv2->tv_sec) return *tv1;
-       if (tv1->tv_sec > tv2->tv_sec) return *tv2;
-       if (tv1->tv_usec < tv2->tv_usec) return *tv1;
-       return *tv2;
-}
-
-/**
-  return the greater of two timevals
-*/
-struct timeval timeval_max(const struct timeval *tv1,
-                          const struct timeval *tv2)
-{
-       if (tv1->tv_sec > tv2->tv_sec) return *tv1;
-       if (tv1->tv_sec < tv2->tv_sec) return *tv2;
-       if (tv1->tv_usec > tv2->tv_usec) return *tv1;
-       return *tv2;
-}
-
-/**
-  return the difference between two timevals as a timeval
-  if tv1 comes after tv2, then return a zero timeval
-  (this is *tv2 - *tv1)
-*/
-struct timeval timeval_until(const struct timeval *tv1,
-                            const struct timeval *tv2)
-{
-       struct timeval t;
-       if (timeval_compare(tv1, tv2) >= 0) {
-               return timeval_zero();
-       }
-       t.tv_sec = tv2->tv_sec - tv1->tv_sec;
-       if (tv1->tv_usec > tv2->tv_usec) {
-               t.tv_sec--;
-               t.tv_usec = 1000000 - (tv1->tv_usec - tv2->tv_usec);
-       } else {
-               t.tv_usec = tv2->tv_usec - tv1->tv_usec;
-       }
-       return t;
-}
-
-
-/**
-  convert a timeval to a NTTIME
-*/
-NTTIME timeval_to_nttime(const struct timeval *tv)
-{
-       return 10*(tv->tv_usec + 
-                 ((TIME_FIXUP_CONSTANT_INT + (uint64_t)tv->tv_sec) * 1000000));
-}
-
 /**************************************************************
  Handle conversions between time_t and uint32, taking care to
  preserve the "special" values.
@@ -592,44 +131,8 @@ time_t convert_uint32_to_time_t(uint32 u)
        return (time_t)u;
 }
 
-/*******************************************************************
- Yield the difference between *A and *B, in seconds, ignoring leap seconds.
-********************************************************************/
-
-static int tm_diff(struct tm *a, struct tm *b)
-{
-       int ay = a->tm_year + (1900 - 1);
-       int by = b->tm_year + (1900 - 1);
-       int intervening_leap_days =
-               (ay/4 - by/4) - (ay/100 - by/100) + (ay/400 - by/400);
-       int years = ay - by;
-       int days = 365*years + intervening_leap_days + (a->tm_yday - b->tm_yday);
-       int hours = 24*days + (a->tm_hour - b->tm_hour);
-       int minutes = 60*hours + (a->tm_min - b->tm_min);
-       int seconds = 60*minutes + (a->tm_sec - b->tm_sec);
-
-       return seconds;
-}
-
 int extra_time_offset=0;
 
-/*******************************************************************
- Return the UTC offset in seconds west of UTC, or 0 if it cannot be determined.
-********************************************************************/
-
-int get_time_zone(time_t t)
-{
-       struct tm *tm = gmtime(&t);
-       struct tm tm_utc;
-       if (!tm)
-               return 0;
-       tm_utc = *tm;
-       tm = localtime(&t);
-       if (!tm)
-               return 0;
-       return tm_diff(&tm_utc,tm)+60*extra_time_offset;
-}
-
 /****************************************************************************
  Check if NTTIME is 0.
 ****************************************************************************/
@@ -1084,24 +587,6 @@ time_t srv_make_unix_date3(const void *date_ptr)
        return make_unix_date3(date_ptr, server_zone_offset);
 }
 
-time_t convert_timespec_to_time_t(struct timespec ts)
-{
-       /* 1 ns == 1,000,000,000 - one thousand millionths of a second.
-          increment if it's greater than 500 millionth of a second. */
-       if (ts.tv_nsec > 500000000) {
-               return ts.tv_sec + 1;
-       }
-       return ts.tv_sec;
-}
-
-struct timespec convert_time_t_to_timespec(time_t t)
-{
-       struct timespec ts;
-       ts.tv_sec = t;
-       ts.tv_nsec = 0;
-       return ts;
-}
-
 /****************************************************************************
  Convert a normalized timeval to a timespec.
 ****************************************************************************/
@@ -1222,49 +707,6 @@ time_t cli_make_unix_date3(struct cli_state *cli, const void *date_ptr)
        return make_unix_date3(date_ptr, cli->serverzone);
 }
 
-/* Large integer version. */
-struct timespec nt_time_to_unix_timespec(NTTIME *nt)
-{
-       int64 d;
-       struct timespec ret;
-
-       if (*nt == 0 || *nt == (int64)-1) {
-               ret.tv_sec = 0;
-               ret.tv_nsec = 0;
-               return ret;
-       }
-
-       d = (int64)*nt;
-       /* d is now in 100ns units, since jan 1st 1601".
-          Save off the ns fraction. */
-
-       /*
-        * Take the last seven decimal digits and multiply by 100.
-        * to convert from 100ns units to 1ns units.
-        */
-        ret.tv_nsec = (long) ((d % (1000 * 1000 * 10)) * 100);
-
-       /* Convert to seconds */
-       d /= 1000*1000*10;
-
-       /* Now adjust by 369 years to make the secs since 1970 */
-       d -= TIME_FIXUP_CONSTANT_INT;
-
-       if (d <= (int64)TIME_T_MIN) {
-               ret.tv_sec = TIME_T_MIN;
-               ret.tv_nsec = 0;
-               return ret;
-       }
-
-       if (d >= (int64)TIME_T_MAX) {
-               ret.tv_sec = TIME_T_MAX;
-               ret.tv_nsec = 0;
-               return ret;
-       }
-
-       ret.tv_sec = (time_t)d;
-       return ret;
-}
 /****************************************************************************
  Check if two NTTIMEs are the same.
 ****************************************************************************/
index ec43ea7037dc73aa05e0c81447b89906992f9a10..92b818b0aa82530b6934709deb1f156585c849ff 100644 (file)
@@ -439,19 +439,6 @@ bool set_cmdline_auth_info_machine_account_creds(void)
        return true;
 }
 
-/**************************************************************************n
- Find a suitable temporary directory. The result should be copied immediately
- as it may be overwritten by a subsequent call.
-****************************************************************************/
-
-const char *tmpdir(void)
-{
-       char *p;
-       if ((p = getenv("TMPDIR")))
-               return p;
-       return "/tmp";
-}
-
 /****************************************************************************
  Add a gid to an array of gids if it's not already there.
 ****************************************************************************/
@@ -540,7 +527,7 @@ const char *get_numlist(const char *p, uint32 **num, int *count)
  Check if a file exists - call vfs_file_exist for samba files.
 ********************************************************************/
 
-bool file_exist(const char *fname,SMB_STRUCT_STAT *sbuf)
+bool file_exist_stat(const char *fname,SMB_STRUCT_STAT *sbuf)
 {
        SMB_STRUCT_STAT st;
        if (!sbuf)
@@ -565,25 +552,11 @@ bool socket_exist(const char *fname)
        return S_ISSOCK(st.st_mode);
 }
 
-/*******************************************************************
- Check a files mod time.
-********************************************************************/
-
-time_t file_modtime(const char *fname)
-{
-       SMB_STRUCT_STAT st;
-  
-       if (sys_stat(fname,&st) != 0) 
-               return(0);
-
-       return(st.st_mtime);
-}
-
 /*******************************************************************
  Check if a directory exists.
 ********************************************************************/
 
-bool directory_exist(char *dname,SMB_STRUCT_STAT *st)
+bool directory_exist_stat(char *dname,SMB_STRUCT_STAT *st)
 {
        SMB_STRUCT_STAT st2;
        bool ret;
@@ -927,36 +900,6 @@ ssize_t write_data_at_offset(int fd, const char *buffer, size_t N, SMB_OFF_T pos
 #endif
 }
 
-/****************************************************************************
- Set a fd into blocking/nonblocking mode. Uses POSIX O_NONBLOCK if available,
- else
-  if SYSV use O_NDELAY
-  if BSD use FNDELAY
-****************************************************************************/
-
-int set_blocking(int fd, bool set)
-{
-       int val;
-#ifdef O_NONBLOCK
-#define FLAG_TO_SET O_NONBLOCK
-#else
-#ifdef SYSV
-#define FLAG_TO_SET O_NDELAY
-#else /* BSD */
-#define FLAG_TO_SET FNDELAY
-#endif
-#endif
-
-       if((val = sys_fcntl_long(fd, F_GETFL, 0)) == -1)
-               return -1;
-       if(set) /* Turn blocking on - ie. clear nonblock flag */
-               val &= ~FLAG_TO_SET;
-       else
-               val |= FLAG_TO_SET;
-       return sys_fcntl_long( fd, F_SETFL, val);
-#undef FLAG_TO_SET
-}
-
 /*******************************************************************
  Sleep for a specified number of milliseconds.
 ********************************************************************/
@@ -1129,26 +1072,6 @@ static void *realloc_(void *ptr, size_t size)
 
 #endif /* PARANOID_MALLOC_CHECKER */
 
-/****************************************************************************
- Type-safe malloc.
-****************************************************************************/
-
-void *malloc_array(size_t el_size, unsigned int count)
-{
-       if (count >= MAX_ALLOC_SIZE/el_size) {
-               return NULL;
-       }
-
-       if (el_size == 0 || count == 0) {
-               return NULL;
-       }
-#if defined(PARANOID_MALLOC_CHECKER)
-       return malloc_(el_size*count);
-#else
-       return malloc(el_size*count);
-#endif
-}
-
 /****************************************************************************
  Type-safe memalign
 ****************************************************************************/
@@ -1249,21 +1172,6 @@ void *Realloc(void *p, size_t size, bool free_old_on_error)
        return(ret);
 }
 
-/****************************************************************************
- Type-safe realloc.
-****************************************************************************/
-
-void *realloc_array(void *p, size_t el_size, unsigned int count, bool free_old_on_error)
-{
-       if (count >= MAX_ALLOC_SIZE/el_size) {
-               if (free_old_on_error) {
-                       SAFE_FREE(p);
-               }
-               return NULL;
-       }
-       return Realloc(p, el_size*count, free_old_on_error);
-}
-
 /****************************************************************************
  (Hopefully) efficient array append.
 ****************************************************************************/
@@ -1334,7 +1242,7 @@ void safe_free(void *p)
  Get my own name and IP.
 ****************************************************************************/
 
-char *get_myname(TALLOC_CTX *ctx)
+char *talloc_get_myname(TALLOC_CTX *ctx)
 {
        char *p;
        char hostname[HOST_NAME_MAX];
@@ -1549,14 +1457,6 @@ bool process_exists(const struct server_id pid)
 #endif
 }
 
-bool process_exists_by_pid(pid_t pid)
-{
-       /* Doing kill with a non-positive pid causes messages to be
-        * sent to places we don't want. */
-       SMB_ASSERT(pid > 0);
-       return(kill(pid,0) == 0 || errno != ESRCH);
-}
-
 /*******************************************************************
  Convert a uid into a user name.
 ********************************************************************/
@@ -2002,42 +1902,6 @@ void free_namearray(name_compare_entry *name_array)
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_LOCKING
 
-/****************************************************************************
- Simple routine to do POSIX file locking. Cruft in NFS and 64->32 bit mapping
- is dealt with in posix.c
- Returns True if the lock was granted, False otherwise.
-****************************************************************************/
-
-bool fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
-{
-       SMB_STRUCT_FLOCK lock;
-       int ret;
-
-       DEBUG(8,("fcntl_lock fd=%d op=%d offset=%.0f count=%.0f type=%d\n",
-               fd,op,(double)offset,(double)count,type));
-
-       lock.l_type = type;
-       lock.l_whence = SEEK_SET;
-       lock.l_start = offset;
-       lock.l_len = count;
-       lock.l_pid = 0;
-
-       ret = sys_fcntl_ptr(fd,op,&lock);
-
-       if (ret == -1) {
-               int sav = errno;
-               DEBUG(3,("fcntl_lock: lock failed at offset %.0f count %.0f op %d type %d (%s)\n",
-                       (double)offset,(double)count,op,type,strerror(errno)));
-               errno = sav;
-               return False;
-       }
-
-       /* everything went OK */
-       DEBUG(8,("fcntl_lock: Lock call successful\n"));
-
-       return True;
-}
-
 /****************************************************************************
  Simple routine to query existing file locks. Cruft in NFS and 64->32 bit mapping
  is dealt with in posix.c
@@ -2210,57 +2074,6 @@ enum remote_arch_types get_remote_arch(void)
        return ra_type;
 }
 
-void print_asc(int level, const unsigned char *buf,int len)
-{
-       int i;
-       for (i=0;i<len;i++)
-               DEBUG(level,("%c", isprint(buf[i])?buf[i]:'.'));
-}
-
-void dump_data(int level, const unsigned char *buf1,int len)
-{
-       const unsigned char *buf = (const unsigned char *)buf1;
-       int i=0;
-       if (len<=0) return;
-
-       if (!DEBUGLVL(level)) return;
-       
-       DEBUGADD(level,("[%03X] ",i));
-       for (i=0;i<len;) {
-               DEBUGADD(level,("%02X ",(int)buf[i]));
-               i++;
-               if (i%8 == 0) DEBUGADD(level,(" "));
-               if (i%16 == 0) {      
-                       print_asc(level,&buf[i-16],8); DEBUGADD(level,(" "));
-                       print_asc(level,&buf[i-8],8); DEBUGADD(level,("\n"));
-                       if (i<len) DEBUGADD(level,("[%03X] ",i));
-               }
-       }
-       if (i%16) {
-               int n;
-               n = 16 - (i%16);
-               DEBUGADD(level,(" "));
-               if (n>8) DEBUGADD(level,(" "));
-               while (n--) DEBUGADD(level,("   "));
-               n = MIN(8,i%16);
-               print_asc(level,&buf[i-(i%16)],n); DEBUGADD(level,( " " ));
-               n = (i%16) - n;
-               if (n>0) print_asc(level,&buf[i-n],n);
-               DEBUGADD(level,("\n"));
-       }
-}
-
-void dump_data_pw(const char *msg, const uchar * data, size_t len)
-{
-#ifdef DEBUG_PASSWORD
-       DEBUG(11, ("%s", msg));
-       if (data != NULL && len > 0)
-       {
-               dump_data(11, data, len);
-       }
-#endif
-}
-
 const char *tab_depth(int level, int depth)
 {
        if( CHECK_DEBUGLVL(level) ) {
@@ -2425,78 +2238,6 @@ void *smb_xmalloc_array(size_t size, unsigned int count)
        return p;
 }
 
-/**
- Memdup with smb_panic on fail.
-**/
-
-void *smb_xmemdup(const void *p, size_t size)
-{
-       void *p2;
-       p2 = SMB_XMALLOC_ARRAY(unsigned char,size);
-       memcpy(p2, p, size);
-       return p2;
-}
-
-/**
- strdup that aborts on malloc fail.
-**/
-
-char *smb_xstrdup(const char *s)
-{
-#if defined(PARANOID_MALLOC_CHECKER)
-#ifdef strdup
-#undef strdup
-#endif
-#endif
-
-#ifndef HAVE_STRDUP
-#define strdup rep_strdup
-#endif
-
-       char *s1 = strdup(s);
-#if defined(PARANOID_MALLOC_CHECKER)
-#ifdef strdup
-#undef strdup
-#endif
-#define strdup(s) __ERROR_DONT_USE_STRDUP_DIRECTLY
-#endif
-       if (!s1) {
-               smb_panic("smb_xstrdup: malloc failed");
-       }
-       return s1;
-
-}
-
-/**
- strndup that aborts on malloc fail.
-**/
-
-char *smb_xstrndup(const char *s, size_t n)
-{
-#if defined(PARANOID_MALLOC_CHECKER)
-#ifdef strndup
-#undef strndup
-#endif
-#endif
-
-#if (defined(BROKEN_STRNDUP) || !defined(HAVE_STRNDUP))
-#undef HAVE_STRNDUP
-#define strndup rep_strndup
-#endif
-
-       char *s1 = strndup(s, n);
-#if defined(PARANOID_MALLOC_CHECKER)
-#ifdef strndup
-#undef strndup
-#endif
-#define strndup(s,n) __ERROR_DONT_USE_STRNDUP_DIRECTLY
-#endif
-       if (!s1) {
-               smb_panic("smb_xstrndup: malloc failed");
-       }
-       return s1;
-}
-
 /*
   vasprintf that aborts on malloc fail
 */
@@ -2506,7 +2247,7 @@ char *smb_xstrndup(const char *s, size_t n)
        int n;
        va_list ap2;
 
-       VA_COPY(ap2, ap);
+       va_copy(ap2, ap);
 
        n = vasprintf(ptr, format, ap2);
        if (n == -1 || ! *ptr) {
@@ -2516,22 +2257,6 @@ char *smb_xstrndup(const char *s, size_t n)
        return n;
 }
 
-/*****************************************************************
- Like strdup but for memory.
-*****************************************************************/
-
-void *memdup(const void *p, size_t size)
-{
-       void *p2;
-       if (size == 0)
-               return NULL;
-       p2 = SMB_MALLOC(size);
-       if (!p2)
-               return NULL;
-       memcpy(p2, p, size);
-       return p2;
-}
-
 /*****************************************************************
  Get local hostname and cache result.
 *****************************************************************/
@@ -2542,7 +2267,7 @@ char *myhostname(void)
        if (ret == NULL) {
                /* This is cached forever so
                 * use NULL talloc ctx. */
-               ret = get_myname(NULL);
+               ret = talloc_get_myname(NULL);
        }
        return ret;
 }
@@ -2561,7 +2286,7 @@ static char *xx_path(const char *name, const char *rootpath)
        }
        trim_string(fname,"","/");
 
-       if (!directory_exist(fname,NULL)) {
+       if (!directory_exist(fname)) {
                mkdir(fname,0755);
        }
 
@@ -2971,25 +2696,6 @@ bool name_to_fqdn(fstring fqdn, const char *name)
        return true;
 }
 
-/**********************************************************************
- Extension to talloc_get_type: Abort on type mismatch
-***********************************************************************/
-
-void *talloc_check_name_abort(const void *ptr, const char *name)
-{
-       void *result;
-
-       result = talloc_check_name(ptr, name);
-       if (result != NULL)
-               return result;
-
-       DEBUG(0, ("Talloc type mismatch, expected %s, got %s\n",
-                 name, talloc_get_name(ptr)));
-       smb_panic("talloc type mismatch");
-       /* Keep the compiler happy */
-       return NULL;
-}
-
 /**********************************************************************
  Append a DATA_BLOB to a talloc'ed object
 ***********************************************************************/
index b628b06cc6aafd37f89ed4dbbc3b86a697a7e9eb..c5a9b7c29afdf59a52ddb711f5ee5f676ee79e99 100644 (file)
 
 #include "includes.h"
 
-#ifndef MAP_FAILED
-#define MAP_FAILED ((void *)-1)
-#endif
-
-/****************************************************************************
- Read a line from a file with possible \ continuation chars. 
- Blanks at the start or end of a line are stripped.
- The string will be allocated if s2 is NULL.
-****************************************************************************/
-
-char *fgets_slash(char *s2,int maxlen,XFILE *f)
-{
-       char *s=s2;
-       int len = 0;
-       int c;
-       bool start_of_line = True;
-
-       if (x_feof(f)) {
-               return(NULL);
-       }
-
-       if (maxlen <2) {
-               return(NULL);
-       }
-
-       if (!s2) {
-               maxlen = MIN(maxlen,8);
-               s = (char *)SMB_MALLOC(maxlen);
-       }
-
-       if (!s) {
-               return(NULL);
-       }
-
-       *s = 0;
-
-       while (len < maxlen-1) {
-               c = x_getc(f);
-               switch (c) {
-                       case '\r':
-                               break;
-                       case '\n':
-                               while (len > 0 && s[len-1] == ' ') {
-                                       s[--len] = 0;
-                               }
-                               if (len > 0 && s[len-1] == '\\') {
-                                       s[--len] = 0;
-                                       start_of_line = True;
-                                       break;
-                               }
-                               return(s);
-                       case EOF:
-                               if (len <= 0 && !s2)  {
-                                       SAFE_FREE(s);
-                               }
-                               return(len>0?s:NULL);
-                       case ' ':
-                               if (start_of_line) {
-                                       break;
-                               }
-                       default:
-                               start_of_line = False;
-                               s[len++] = c;
-                               s[len] = 0;
-               }
-
-               if (!s2 && len > maxlen-3) {
-                       maxlen *= 2;
-                       s = (char *)SMB_REALLOC(s,maxlen);
-                       if (!s) {
-                               DEBUG(0,("fgets_slash: failed to expand buffer!\n"));
-                               return(NULL);
-                       }
-               }
-       }
-       return(s);
-}
-
-/****************************************************************************
+/**
  Load from a pipe into memory.
-****************************************************************************/
+**/
 
-static char *file_pload(char *syscmd, size_t *size)
+static char *file_pload(const char *syscmd, size_t *size)
 {
        int fd, n;
        char *p;
@@ -143,215 +65,14 @@ static char *file_pload(char *syscmd, size_t *size)
        return p;
 }
 
-/****************************************************************************
- Load a file into memory from a fd.
- Truncate at maxsize. If maxsize == 0 - no limit.
-****************************************************************************/ 
-
-char *fd_load(int fd, size_t *psize, size_t maxsize)
-{
-       SMB_STRUCT_STAT sbuf;
-       size_t size;
-       char *p;
-
-       if (sys_fstat(fd, &sbuf) != 0) {
-               return NULL;
-       }
-
-       size = sbuf.st_size;
-       if (maxsize) {
-               size = MIN(size, maxsize);
-       }
-
-       p = (char *)SMB_MALLOC(size+1);
-       if (!p) {
-               return NULL;
-       }
-
-       if (read(fd, p, size) != size) {
-               SAFE_FREE(p);
-               return NULL;
-       }
-       p[size] = 0;
-
-       if (psize) {
-               *psize = size;
-       }
-
-       return p;
-}
-
-/****************************************************************************
- Load a file into memory.
-****************************************************************************/
-
-char *file_load(const char *fname, size_t *size, size_t maxsize)
-{
-       int fd;
-       char *p;
-
-       if (!fname || !*fname) {
-               return NULL;
-       }
-       
-       fd = open(fname,O_RDONLY);
-       if (fd == -1) {
-               return NULL;
-       }
-
-       p = fd_load(fd, size, maxsize);
-       close(fd);
-       return p;
-}
-
-/*******************************************************************
- unmap or free memory
-*******************************************************************/
-
-bool unmap_file(void* start, size_t size)
-{
-#ifdef HAVE_MMAP
-       if ( munmap( start, size ) != 0 ) {
-               DEBUG( 1, ("map_file: Failed to unmap address %p "
-                       "of size %u - %s\n", 
-                       start, (unsigned int)size, strerror(errno) ));
-               return False;
-       }
-       return True;
-#else
-       SAFE_FREE( start );
-       return True;
-#endif
-}
-
-/*******************************************************************
- mmap (if possible) or read a file.
-********************************************************************/
-
-void *map_file(char *fname, size_t size)
-{
-       size_t s2 = 0;
-       void *p = NULL;
-#ifdef HAVE_MMAP
-       int fd;
-       fd = open(fname, O_RDONLY, 0);
-       if (fd == -1) {
-               DEBUG(2,("map_file: Failed to load %s - %s\n", fname, strerror(errno)));
-               return NULL;
-       }
-       p = mmap(NULL, size, PROT_READ, MAP_SHARED|MAP_FILE, fd, 0);
-       close(fd);
-       if (p == MAP_FAILED) {
-               DEBUG(1,("map_file: Failed to mmap %s - %s\n", fname, strerror(errno)));
-               return NULL;
-       }
-#endif
-       if (!p) {
-               p = file_load(fname, &s2, 0);
-               if (!p) {
-                       return NULL;
-               }
-               if (s2 != size) {
-                       DEBUG(1,("map_file: incorrect size for %s - got %lu expected %lu\n",
-                                fname, (unsigned long)s2, (unsigned long)size));
-                       SAFE_FREE(p);   
-                       return NULL;
-               }
-       }
-       return p;
-}
-
-/****************************************************************************
- Parse a buffer into lines.
-****************************************************************************/
-
-static char **file_lines_parse(char *p, size_t size, int *numlines)
-{
-       int i;
-       char *s, **ret;
-
-       if (!p) {
-               return NULL;
-       }
-
-       for (s = p, i=0; s < p+size; s++) {
-               if (s[0] == '\n') i++;
-       }
-
-       ret = SMB_MALLOC_ARRAY(char *, i+2);
-       if (!ret) {
-               SAFE_FREE(p);
-               return NULL;
-       }       
-       memset(ret, 0, sizeof(ret[0])*(i+2));
-
-       ret[0] = p;
-       for (s = p, i=0; s < p+size; s++) {
-               if (s[0] == '\n') {
-                       s[0] = 0;
-                       i++;
-                       ret[i] = s+1;
-               }
-               if (s[0] == '\r') {
-                       s[0] = 0;
-               }
-       }
-
-       /* remove any blank lines at the end */
-       while (i > 0 && ret[i-1][0] == 0) {
-               i--;
-       }
-
-       if (numlines) {
-               *numlines = i;
-       }
-
-       return ret;
-}
-
-/****************************************************************************
- Load a file into memory and return an array of pointers to lines in the file
- must be freed with file_lines_free(). 
-****************************************************************************/
-
-char **file_lines_load(const char *fname, int *numlines, size_t maxsize)
-{
-       char *p;
-       size_t size = 0;
-
-       p = file_load(fname, &size, maxsize);
-       if (!p) {
-               return NULL;
-       }
-
-       return file_lines_parse(p, size, numlines);
-}
-
-/****************************************************************************
- Load a fd into memory and return an array of pointers to lines in the file
- must be freed with file_lines_free(). If convert is true calls unix_to_dos on
- the list.
-****************************************************************************/
 
-char **fd_lines_load(int fd, int *numlines, size_t maxsize)
-{
-       char *p;
-       size_t size;
 
-       p = fd_load(fd, &size, maxsize);
-       if (!p) {
-               return NULL;
-       }
-
-       return file_lines_parse(p, size, numlines);
-}
-
-/****************************************************************************
+/**
  Load a pipe into memory and return an array of pointers to lines in the data
  must be freed with file_lines_free(). 
-****************************************************************************/
+**/
 
-char **file_lines_pload(char *syscmd, int *numlines)
+char **file_lines_pload(const char *syscmd, int *numlines)
 {
        char *p;
        size_t size;
@@ -361,64 +82,5 @@ char **file_lines_pload(char *syscmd, int *numlines)
                return NULL;
        }
 
-       return file_lines_parse(p, size, numlines);
-}
-
-/****************************************************************************
- Free lines loaded with file_lines_load.
-****************************************************************************/
-
-void file_lines_free(char **lines)
-{
-       if (!lines) {
-               return;
-       }
-       SAFE_FREE(lines[0]);
-       SAFE_FREE(lines);
-}
-
-/****************************************************************************
- Take a list of lines and modify them to produce a list where \ continues
- a line.
-****************************************************************************/
-
-void file_lines_slashcont(char **lines)
-{
-       int i, j;
-
-       for (i=0; lines[i];) {
-               int len = strlen(lines[i]);
-               if (lines[i][len-1] == '\\') {
-                       lines[i][len-1] = ' ';
-                       if (lines[i+1]) {
-                               char *p = &lines[i][len];
-                               while (p < lines[i+1]) {
-                                       *p++ = ' ';
-                               }
-                               for (j = i+1; lines[j]; j++) {
-                                       lines[j] = lines[j+1];
-                               }
-                       }
-               } else {
-                       i++;
-               }
-       }
-}
-
-/****************************************************************************
- Save a lump of data into a file. Mostly used for debugging.
-****************************************************************************/
-
-bool file_save(const char *fname, void *packet, size_t length)
-{
-       int fd;
-       fd = open(fname, O_WRONLY|O_CREAT|O_TRUNC, 0644);
-       if (fd == -1) {
-               return False;
-       }
-       if (write(fd, packet, length) != (size_t)length) {
-               return False;
-       }
-       close(fd);
-       return True;
+       return file_lines_parse(p, size, numlines, NULL);
 }
index 428378505f7a1a1230e7499bb2d6bd0b7ee534b3..c0d37f1094b7c3c80fb88ac7c1f4f81e31bba67b 100644 (file)
@@ -47,7 +47,7 @@ struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name)
        struct passwd *temp, *cached;
 
        temp = (struct passwd *)memcache_lookup_talloc(
-               NULL, GETPWNAM_CACHE, data_blob_string_const(name));
+               NULL, GETPWNAM_CACHE, data_blob_string_const_null(name));
        if (temp != NULL) {
                return tcopy_passwd(mem_ctx, temp);
        }
@@ -65,7 +65,7 @@ struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name)
                return temp;
        }
 
-       memcache_add_talloc(NULL, GETPWNAM_CACHE, data_blob_string_const(name),
+       memcache_add_talloc(NULL, GETPWNAM_CACHE, data_blob_string_const_null(name),
                            cached);
        return tcopy_passwd(mem_ctx, temp);
 }
index e20768ed89242c0aade9714f5639f784807110e5..f3dc3fc1d1316a1d4a5b652551c9d8a0847c7bc3 100644 (file)
@@ -1706,7 +1706,7 @@ static bool lookup_nc(struct name_addr_pair *nc)
 
        if (!memcache_lookup(
                        NULL, SINGLETON_CACHE,
-                       data_blob_string_const("get_peer_name"),
+                       data_blob_string_const_null("get_peer_name"),
                        &tmp)) {
                return false;
        }
@@ -1733,7 +1733,7 @@ static void store_nc(const struct name_addr_pair *nc)
        memcpy(tmp.data+sizeof(nc->ss), nc->name, namelen+1);
 
        memcache_add(NULL, SINGLETON_CACHE,
-                       data_blob_string_const("get_peer_name"),
+                       data_blob_string_const_null("get_peer_name"),
                        tmp);
        data_blob_free(&tmp);
 }
@@ -1945,7 +1945,7 @@ const char *get_mydnsfullname(void)
        DATA_BLOB tmp;
 
        if (memcache_lookup(NULL, SINGLETON_CACHE,
-                       data_blob_string_const("get_mydnsfullname"),
+                       data_blob_string_const_null("get_mydnsfullname"),
                        &tmp)) {
                SMB_ASSERT(tmp.length > 0);
                return (const char *)tmp.data;
@@ -1989,11 +1989,11 @@ const char *get_mydnsfullname(void)
         */
 
        memcache_add(NULL, SINGLETON_CACHE,
-                       data_blob_string_const("get_mydnsfullname"),
-                       data_blob_string_const(res->ai_canonname));
+                       data_blob_string_const_null("get_mydnsfullname"),
+                       data_blob_string_const_null(res->ai_canonname));
 
        if (!memcache_lookup(NULL, SINGLETON_CACHE,
-                       data_blob_string_const("get_mydnsfullname"),
+                       data_blob_string_const_null("get_mydnsfullname"),
                        &tmp)) {
                tmp = data_blob_talloc(talloc_tos(), res->ai_canonname,
                                strlen(res->ai_canonname) + 1);
index 9f952abf1010c6440fceb1f23552ddd03e466526..f6783f10ffd8537c40cc39a543d21833bc2194cd 100644 (file)
@@ -939,7 +939,7 @@ DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex)
  * Routine to print a buffer as HEX digits, into an allocated string.
  */
 
-char *hex_encode(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len)
+char *hex_encode_talloc(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len)
 {
        int i;
        char *hex_buffer;
@@ -1843,136 +1843,6 @@ int fstr_sprintf(fstring s, const char *fmt, ...)
 
 #define S_LIST_ABS 16 /* List Allocation Block Size */
 
-char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const char *sep)
-{
-       char **list;
-       const char *str;
-       char *s;
-       int num, lsize;
-       char *tok;
-
-       if (!string || !*string)
-               return NULL;
-
-       list = TALLOC_ARRAY(mem_ctx, char *, S_LIST_ABS+1);
-       if (list == NULL) {
-               return NULL;
-       }
-       lsize = S_LIST_ABS;
-
-       s = talloc_strdup(list, string);
-       if (s == NULL) {
-               DEBUG(0,("str_list_make: Unable to allocate memory"));
-               TALLOC_FREE(list);
-               return NULL;
-       }
-       if (!sep) sep = LIST_SEP;
-
-       num = 0;
-       str = s;
-
-       while (next_token_talloc(list, &str, &tok, sep)) {
-
-               if (num == lsize) {
-                       char **tmp;
-
-                       lsize += S_LIST_ABS;
-
-                       tmp = TALLOC_REALLOC_ARRAY(mem_ctx, list, char *,
-                                                  lsize + 1);
-                       if (tmp == NULL) {
-                               DEBUG(0,("str_list_make: "
-                                       "Unable to allocate memory"));
-                               TALLOC_FREE(list);
-                               return NULL;
-                       }
-
-                       list = tmp;
-
-                       memset (&list[num], 0,
-                               ((sizeof(char**)) * (S_LIST_ABS +1)));
-               }
-
-               list[num] = tok;
-               num += 1;
-       }
-
-       list[num] = NULL;
-
-       TALLOC_FREE(s);
-       return list;
-}
-
-bool str_list_copy(TALLOC_CTX *mem_ctx, char ***dest, const char **src)
-{
-       char **list;
-       int i, num;
-
-       *dest = NULL;
-       if (!src)
-               return false;
-
-       num = 0;
-       while (src[num] != NULL) {
-               num += 1;
-       }
-
-       list = TALLOC_ARRAY(mem_ctx, char *, num+1);
-       if (list == NULL) {
-               return false;
-       }
-
-       for (i=0; i<num; i++) {
-               list[i] = talloc_strdup(list, src[i]);
-               if (list[i] == NULL) {
-                       TALLOC_FREE(list);
-                       return false;
-               }
-       }
-       list[i] = NULL;
-       *dest = list;
-       return true;
-}
-
-/**
- * Return true if all the elements of the list match exactly.
- **/
-bool str_list_compare(char **list1, char **list2)
-{
-       int num;
-
-       if (!list1 || !list2)
-               return (list1 == list2);
-
-       for (num = 0; list1[num]; num++) {
-               if (!list2[num])
-                       return false;
-               if (!strcsequal(list1[num], list2[num]))
-                       return false;
-       }
-       if (list2[num])
-               return false; /* if list2 has more elements than list1 fail */
-
-       return true;
-}
-
-/******************************************************************************
- *****************************************************************************/
-
-int str_list_count( const char **list )
-{
-       int i = 0;
-
-       if ( ! list )
-               return 0;
-
-       /* count the number of list members */
-
-       for ( i=0; *list; i++, list++ );
-
-       return i;
-}
-
 /******************************************************************************
  version of standard_sub_basic() for string lists; uses talloc_sub_basic()
  for the work
@@ -2386,10 +2256,10 @@ char *base64_encode_data_blob(TALLOC_CTX *mem_ctx, DATA_BLOB data)
 }
 
 /* read a SMB_BIG_UINT from a string */
-SMB_BIG_UINT STR_TO_SMB_BIG_UINT(const char *nptr, const char **entptr)
+uint64_t STR_TO_SMB_BIG_UINT(const char *nptr, const char **entptr)
 {
 
-       SMB_BIG_UINT val = -1;
+       uint64_t val = -1;
        const char *p = nptr;
 
        if (!p) {
@@ -2402,11 +2272,7 @@ SMB_BIG_UINT STR_TO_SMB_BIG_UINT(const char *nptr, const char **entptr)
        while (*p && isspace(*p))
                p++;
 
-#ifdef LARGE_SMB_OFF_T
-       sscanf(p,"%llu",&val);
-#else /* LARGE_SMB_OFF_T */
-       sscanf(p,"%lu",&val);
-#endif /* LARGE_SMB_OFF_T */
+       sscanf(p,"%"PRIu64,&val);
        if (entptr) {
                while (*p && isdigit(*p))
                        p++;
index 825723266790e731ab40ed7191cde788d0360cf8..bb568bc22e9b8837563ca2a034751e4b52c0fbd5 100644 (file)
@@ -39,28 +39,6 @@ static void gotalarm_sig(void)
        gotalarm = 1;
 }
 
-/***************************************************************
- Make a TDB_DATA and keep the const warning in one place
-****************************************************************/
-
-TDB_DATA make_tdb_data(const uint8 *dptr, size_t dsize)
-{
-       TDB_DATA ret;
-       ret.dptr = CONST_DISCARD(uint8 *, dptr);
-       ret.dsize = dsize;
-       return ret;
-}
-
-TDB_DATA string_tdb_data(const char *string)
-{
-       return make_tdb_data((const uint8 *)string, string ? strlen(string) : 0 );
-}
-
-TDB_DATA string_term_tdb_data(const char *string)
-{
-       return make_tdb_data((const uint8 *)string, string ? strlen(string) + 1 : 0);
-}
-
 /****************************************************************************
  Lock a chain with timeout (in seconds).
 ****************************************************************************/
@@ -109,17 +87,6 @@ int tdb_chainlock_with_timeout( TDB_CONTEXT *tdb, TDB_DATA key, unsigned int tim
        return tdb_chainlock_with_timeout_internal(tdb, key, timeout, F_WRLCK);
 }
 
-/****************************************************************************
- Lock a chain by string. Return -1 if timeout or lock failed.
-****************************************************************************/
-
-int tdb_lock_bystring(TDB_CONTEXT *tdb, const char *keyval)
-{
-       TDB_DATA key = string_term_tdb_data(keyval);
-       
-       return tdb_chainlock(tdb, key);
-}
-
 int tdb_lock_bystring_with_timeout(TDB_CONTEXT *tdb, const char *keyval,
                                   int timeout)
 {
@@ -128,17 +95,6 @@ int tdb_lock_bystring_with_timeout(TDB_CONTEXT *tdb, const char *keyval,
        return tdb_chainlock_with_timeout(tdb, key, timeout);
 }
 
-/****************************************************************************
- Unlock a chain by string.
-****************************************************************************/
-
-void tdb_unlock_bystring(TDB_CONTEXT *tdb, const char *keyval)
-{
-       TDB_DATA key = string_term_tdb_data(keyval);
-
-       tdb_chainunlock(tdb, key);
-}
-
 /****************************************************************************
  Read lock a chain by string. Return -1 if timeout or lock failed.
 ****************************************************************************/
@@ -150,155 +106,8 @@ int tdb_read_lock_bystring_with_timeout(TDB_CONTEXT *tdb, const char *keyval, un
        return tdb_chainlock_with_timeout_internal(tdb, key, timeout, F_RDLCK);
 }
 
-/****************************************************************************
- Read unlock a chain by string.
-****************************************************************************/
-
-void tdb_read_unlock_bystring(TDB_CONTEXT *tdb, const char *keyval)
-{
-       TDB_DATA key = string_term_tdb_data(keyval);
-       
-       tdb_chainunlock_read(tdb, key);
-}
-
-
-/****************************************************************************
- Fetch a int32 value by a arbitrary blob key, return -1 if not found.
- Output is int32 in native byte order.
-****************************************************************************/
-
-int32 tdb_fetch_int32_byblob(TDB_CONTEXT *tdb, TDB_DATA key)
-{
-       TDB_DATA data;
-       int32 ret;
-
-       data = tdb_fetch(tdb, key);
-       if (!data.dptr || data.dsize != sizeof(int32)) {
-               SAFE_FREE(data.dptr);
-               return -1;
-       }
-
-       ret = IVAL(data.dptr,0);
-       SAFE_FREE(data.dptr);
-       return ret;
-}
-
-/****************************************************************************
- Fetch a int32 value by string key, return -1 if not found.
- Output is int32 in native byte order.
-****************************************************************************/
-
-int32 tdb_fetch_int32(TDB_CONTEXT *tdb, const char *keystr)
-{
-       TDB_DATA key = string_term_tdb_data(keystr);
-
-       return tdb_fetch_int32_byblob(tdb, key);
-}
-
-/****************************************************************************
- Store a int32 value by an arbitary blob key, return 0 on success, -1 on failure.
- Input is int32 in native byte order. Output in tdb is in little-endian.
-****************************************************************************/
-
-int tdb_store_int32_byblob(TDB_CONTEXT *tdb, TDB_DATA key, int32 v)
-{
-       TDB_DATA data;
-       int32 v_store;
-
-       SIVAL(&v_store,0,v);
-       data.dptr = (uint8 *)&v_store;
-       data.dsize = sizeof(int32);
-
-       return tdb_store(tdb, key, data, TDB_REPLACE);
-}
-
-/****************************************************************************
- Store a int32 value by string key, return 0 on success, -1 on failure.
- Input is int32 in native byte order. Output in tdb is in little-endian.
-****************************************************************************/
-
-int tdb_store_int32(TDB_CONTEXT *tdb, const char *keystr, int32 v)
-{
-       TDB_DATA key = string_term_tdb_data(keystr);
-
-       return tdb_store_int32_byblob(tdb, key, v);
-}
-
-/****************************************************************************
- Fetch a uint32 value by a arbitrary blob key, return -1 if not found.
- Output is uint32 in native byte order.
-****************************************************************************/
-
-bool tdb_fetch_uint32_byblob(TDB_CONTEXT *tdb, TDB_DATA key, uint32 *value)
-{
-       TDB_DATA data;
-
-       data = tdb_fetch(tdb, key);
-       if (!data.dptr || data.dsize != sizeof(uint32)) {
-               SAFE_FREE(data.dptr);
-               return False;
-       }
-
-       *value = IVAL(data.dptr,0);
-       SAFE_FREE(data.dptr);
-       return True;
-}
-
-/****************************************************************************
- Fetch a uint32 value by string key, return -1 if not found.
- Output is uint32 in native byte order.
-****************************************************************************/
-
-bool tdb_fetch_uint32(TDB_CONTEXT *tdb, const char *keystr, uint32 *value)
-{
-       TDB_DATA key = string_term_tdb_data(keystr);
-
-       return tdb_fetch_uint32_byblob(tdb, key, value);
-}
-
-/****************************************************************************
- Store a uint32 value by an arbitary blob key, return 0 on success, -1 on failure.
- Input is uint32 in native byte order. Output in tdb is in little-endian.
-****************************************************************************/
-
-bool tdb_store_uint32_byblob(TDB_CONTEXT *tdb, TDB_DATA key, uint32 value)
-{
-       TDB_DATA data;
-       uint32 v_store;
-       bool ret = True;
-
-       SIVAL(&v_store, 0, value);
-       data.dptr = (uint8 *)&v_store;
-       data.dsize = sizeof(uint32);
 
-       if (tdb_store(tdb, key, data, TDB_REPLACE) == -1)
-               ret = False;
 
-       return ret;
-}
-
-/****************************************************************************
- Store a uint32 value by string key, return 0 on success, -1 on failure.
- Input is uint32 in native byte order. Output in tdb is in little-endian.
-****************************************************************************/
-
-bool tdb_store_uint32(TDB_CONTEXT *tdb, const char *keystr, uint32 value)
-{
-       TDB_DATA key = string_term_tdb_data(keystr);
-
-       return tdb_store_uint32_byblob(tdb, key, value);
-}
-/****************************************************************************
- Store a buffer by a null terminated string key.  Return 0 on success, -1
- on failure.
-****************************************************************************/
-
-int tdb_store_bystring(TDB_CONTEXT *tdb, const char *keystr, TDB_DATA data, int flags)
-{
-       TDB_DATA key = string_term_tdb_data(keystr);
-
-       return tdb_store(tdb, key, data, flags);
-}
 
 int tdb_trans_store_bystring(TDB_CONTEXT *tdb, const char *keystr,
                             TDB_DATA data, int flags)
@@ -308,112 +117,6 @@ int tdb_trans_store_bystring(TDB_CONTEXT *tdb, const char *keystr,
        return tdb_trans_store(tdb, key, data, flags);
 }
 
-/****************************************************************************
- Fetch a buffer using a null terminated string key.  Don't forget to call
- free() on the result dptr.
-****************************************************************************/
-
-TDB_DATA tdb_fetch_bystring(TDB_CONTEXT *tdb, const char *keystr)
-{
-       TDB_DATA key = string_term_tdb_data(keystr);
-
-       return tdb_fetch(tdb, key);
-}
-
-/****************************************************************************
- Delete an entry using a null terminated string key. 
-****************************************************************************/
-
-int tdb_delete_bystring(TDB_CONTEXT *tdb, const char *keystr)
-{
-       TDB_DATA key = string_term_tdb_data(keystr);
-
-       return tdb_delete(tdb, key);
-}
-
-/****************************************************************************
- Atomic integer change. Returns old value. To create, set initial value in *oldval. 
-****************************************************************************/
-
-int32 tdb_change_int32_atomic(TDB_CONTEXT *tdb, const char *keystr, int32 *oldval, int32 change_val)
-{
-       int32 val;
-       int32 ret = -1;
-
-       if (tdb_lock_bystring(tdb, keystr) == -1)
-               return -1;
-
-       if ((val = tdb_fetch_int32(tdb, keystr)) == -1) {
-               /* The lookup failed */
-               if (tdb_error(tdb) != TDB_ERR_NOEXIST) {
-                       /* but not because it didn't exist */
-                       goto err_out;
-               }
-               
-               /* Start with 'old' value */
-               val = *oldval;
-
-       } else {
-               /* It worked, set return value (oldval) to tdb data */
-               *oldval = val;
-       }
-
-       /* Increment value for storage and return next time */
-       val += change_val;
-               
-       if (tdb_store_int32(tdb, keystr, val) == -1)
-               goto err_out;
-
-       ret = 0;
-
-  err_out:
-
-       tdb_unlock_bystring(tdb, keystr);
-       return ret;
-}
-
-/****************************************************************************
- Atomic unsigned integer change. Returns old value. To create, set initial value in *oldval. 
-****************************************************************************/
-
-bool tdb_change_uint32_atomic(TDB_CONTEXT *tdb, const char *keystr, uint32 *oldval, uint32 change_val)
-{
-       uint32 val;
-       bool ret = False;
-
-       if (tdb_lock_bystring(tdb, keystr) == -1)
-               return False;
-
-       if (!tdb_fetch_uint32(tdb, keystr, &val)) {
-               /* It failed */
-               if (tdb_error(tdb) != TDB_ERR_NOEXIST) { 
-                       /* and not because it didn't exist */
-                       goto err_out;
-               }
-
-               /* Start with 'old' value */
-               val = *oldval;
-
-       } else {
-               /* it worked, set return value (oldval) to tdb data */
-               *oldval = val;
-
-       }
-
-       /* get a new value to store */
-       val += change_val;
-               
-       if (!tdb_store_uint32(tdb, keystr, val))
-               goto err_out;
-
-       ret = True;
-
-  err_out:
-
-       tdb_unlock_bystring(tdb, keystr);
-       return ret;
-}
-
 /****************************************************************************
  Useful pair of routines for packing/unpacking data consisting of
  integers and strings.
index 3a8f7b3f4f4dd232b6c98d2a28faed21ce465ed1..c681b66d34a7a5d827f9002e70ceae0d81889ec4 100644 (file)
 
 #include "includes.h"
 
-/*
- * Offset between 15-Oct-1582 and 1-Jan-70
- */
-#define TIME_OFFSET_HIGH 0x01B21DD2
-#define TIME_OFFSET_LOW  0x13814000
-
 void smb_uuid_pack(const struct GUID uu, UUID_FLAT *ptr)
 {
        SIVAL(ptr->info, 0, uu.time_low);
@@ -44,78 +38,6 @@ void smb_uuid_unpack(const UUID_FLAT in, struct GUID *uu)
        memcpy(uu->node, in.info+10, 6);
 }
 
-void smb_uuid_generate_random(struct GUID *uu)
-{
-       UUID_FLAT tmp;
-
-       generate_random_buffer(tmp.info, sizeof(tmp.info));
-       smb_uuid_unpack(tmp, uu);
-
-       uu->clock_seq[0] = (uu->clock_seq[0] & 0x3F) | 0x80;
-       uu->time_hi_and_version = (uu->time_hi_and_version & 0x0FFF) | 0x4000;
-}
-
-const char *smb_uuid_string(TALLOC_CTX *mem_ctx, const struct GUID uu)
-{
-       char *result;
-
-       result = talloc_asprintf(
-               mem_ctx,
-               "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
-               uu.time_low, uu.time_mid, uu.time_hi_and_version,
-               uu.clock_seq[0], uu.clock_seq[1],
-               uu.node[0], uu.node[1], uu.node[2], 
-               uu.node[3], uu.node[4], uu.node[5]);
-
-       SMB_ASSERT(result != NULL);
-       return result;
-}
-
-bool smb_string_to_uuid(const char *in, struct GUID* uu)
-{
-       bool ret = False;
-       const char *ptr = in;
-       char *end = (char *)in;
-       int i;
-       unsigned v1, v2;
-
-       if (!in || !uu) goto out;
-
-       uu->time_low = strtoul(ptr, &end, 16);
-       if ((end - ptr) != 8 || *end != '-') goto out;
-       ptr = (end + 1);
-
-       uu->time_mid = strtoul(ptr, &end, 16);
-       if ((end - ptr) != 4 || *end != '-') goto out;
-       ptr = (end + 1);
-
-       uu->time_hi_and_version = strtoul(ptr, &end, 16);
-       if ((end - ptr) != 4 || *end != '-') goto out;
-       ptr = (end + 1);
-
-       if (sscanf(ptr, "%02x%02x", &v1, &v2) != 2) {
-               goto out;
-       }
-       uu->clock_seq[0] = v1;
-       uu->clock_seq[1] = v2;
-       ptr += 4;
-
-       if (*ptr != '-') goto out;
-       ptr++;
-
-       for (i = 0; i < 6; i++) {
-               if (sscanf(ptr, "%02x", &v1) != 1) {
-                       goto out;
-               }
-               uu->node[i] = v1;
-               ptr += 2;
-       }
-
-       ret = True;
-out:
-        return ret;
-}
-
 /*****************************************************************
  Return the binary string representation of a GUID.
  Caller must free.
diff --git a/source3/lib/xfile.c b/source3/lib/xfile.c
deleted file mode 100644 (file)
index e44a92d..0000000
+++ /dev/null
@@ -1,417 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-   stdio replacement
-   Copyright (C) Andrew Tridgell 2001
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
-  stdio is very convenient, but on some systems the file descriptor
-  in FILE* is 8 bits, so it fails when more than 255 files are open. 
-
-  XFILE replaces stdio. It is less efficient, but at least it works
-  when you have lots of files open
-
-  The main restriction on XFILE is that it doesn't support seeking,
-  and doesn't support O_RDWR. That keeps the code simple.
-*/
-
-#include "includes.h"
-
-#define XBUFSIZE BUFSIZ
-
-static XFILE _x_stdin =  { 0, NULL, NULL, XBUFSIZE, 0, O_RDONLY, X_IOFBF, 0 };
-static XFILE _x_stdout = { 1, NULL, NULL, XBUFSIZE, 0, O_WRONLY, X_IOLBF, 0 };
-static XFILE _x_stderr = { 2, NULL, NULL, 0, 0, O_WRONLY, X_IONBF, 0 };
-
-XFILE *x_stdin = &_x_stdin;
-XFILE *x_stdout = &_x_stdout;
-XFILE *x_stderr = &_x_stderr;
-
-#define X_FLAG_EOF 1
-#define X_FLAG_ERROR 2
-#define X_FLAG_EINVAL 3
-
-/* simulate setvbuf() */
-int x_setvbuf(XFILE *f, char *buf, int mode, size_t size)
-{
-       if (x_fflush(f) != 0) return -1;
-       if (f->bufused) return -1;
-
-       /* on files being read full buffering is the only option */
-       if ((f->open_flags & O_ACCMODE) == O_RDONLY) {
-               mode = X_IOFBF;
-       }
-
-       /* destroy any earlier buffer */
-       SAFE_FREE(f->buf);
-       f->buf = 0;
-       f->bufsize = 0;
-       f->next = NULL;
-       f->bufused = 0;
-       f->buftype = mode;
-
-       if (f->buftype == X_IONBF) return 0;
-
-       /* if buffering then we need some size */
-       if (size == 0) size = XBUFSIZE;
-
-       f->bufsize = size;
-       f->bufused = 0;
-
-       return 0;
-}
-
-/* allocate the buffer */
-static int x_allocate_buffer(XFILE *f)
-{
-       if (f->buf) return 1;
-       if (f->bufsize == 0) return 0;
-       f->buf = (char *)SMB_MALLOC(f->bufsize);
-       if (!f->buf) return 0;
-       f->next = f->buf;
-       return 1;
-}
-
-
-/* this looks more like open() than fopen(), but that is quite deliberate.
-   I want programmers to *think* about O_EXCL, O_CREAT etc not just
-   get them magically added 
-*/
-XFILE *x_fopen(const char *fname, int flags, mode_t mode)
-{
-       XFILE *ret;
-
-       ret = SMB_MALLOC_P(XFILE);
-       if (!ret) {
-               return NULL;
-       }
-
-       memset(ret, 0, sizeof(XFILE));
-
-       if ((flags & O_ACCMODE) == O_RDWR) {
-               /* we don't support RDWR in XFILE - use file 
-                  descriptors instead */
-               SAFE_FREE(ret);
-               errno = EINVAL;
-               return NULL;
-       }
-
-       ret->open_flags = flags;
-
-       ret->fd = sys_open(fname, flags, mode);
-       if (ret->fd == -1) {
-               SAFE_FREE(ret);
-               return NULL;
-       }
-
-       x_setvbuf(ret, NULL, X_IOFBF, XBUFSIZE);
-       
-       return ret;
-}
-
-XFILE *x_fdup(const XFILE *f)
-{
-       XFILE *ret;
-       int fd;
-
-       fd = dup(x_fileno(f));
-       if (fd < 0) {
-               return NULL;
-       }
-
-       ret = SMB_CALLOC_ARRAY(XFILE, 1);
-       if (!ret) {
-               close(fd);
-               return NULL;
-       }
-
-       ret->fd = fd;
-       ret->open_flags = f->open_flags;
-       x_setvbuf(ret, NULL, X_IOFBF, XBUFSIZE);
-       return ret;
-}
-
-/* simulate fclose() */
-int x_fclose(XFILE *f)
-{
-       int ret;
-
-       /* make sure we flush any buffered data */
-       (void)x_fflush(f);
-
-       ret = close(f->fd);
-       f->fd = -1;
-       if (f->buf) {
-               /* make sure data can't leak into a later malloc */
-               memset(f->buf, 0, f->bufsize);
-               SAFE_FREE(f->buf);
-       }
-       /* check the file descriptor given to the function is NOT one of the static
-        * descriptor of this libreary or we will free unallocated memory
-        * --sss */
-       if (f != x_stdin && f != x_stdout && f != x_stderr) {
-               SAFE_FREE(f);
-       }
-       return ret;
-}
-
-/* simulate fwrite() */
-size_t x_fwrite(const void *p, size_t size, size_t nmemb, XFILE *f)
-{
-       ssize_t ret;
-       size_t total=0;
-
-       /* we might be writing unbuffered */
-       if (f->buftype == X_IONBF || 
-           (!f->buf && !x_allocate_buffer(f))) {
-               ret = write(f->fd, p, size*nmemb);
-               if (ret == -1) return -1;
-               return ret/size;
-       } 
-
-
-       while (total < size*nmemb) {
-               size_t n = f->bufsize - f->bufused;
-               n = MIN(n, (size*nmemb)-total);
-
-               if (n == 0) {
-                       /* it's full, flush it */
-                       if (x_fflush(f) != 0) {
-                               return -1;
-                       }
-                       continue;
-               }
-
-               memcpy(f->buf + f->bufused, total+(const char *)p, n);
-               f->bufused += n;
-               total += n;
-       }
-
-       /* when line buffered we need to flush at the last linefeed. This can
-          flush a bit more than necessary, but that is harmless */
-       if (f->buftype == X_IOLBF && f->bufused) {
-               int i;
-               for (i=(size*nmemb)-1; i>=0; i--) {
-                       if (*(i+(const char *)p) == '\n') {
-                               if (x_fflush(f) != 0) {
-                                       return -1;
-                               }
-                               break;
-                       }
-               }
-       }
-
-       return total/size;
-}
-
-/* thank goodness for asprintf() */
- int x_vfprintf(XFILE *f, const char *format, va_list ap)
-{
-       char *p;
-       int len, ret;
-       va_list ap2;
-
-       VA_COPY(ap2, ap);
-
-       len = vasprintf(&p, format, ap2);
-       if (len <= 0) {
-               va_end(ap2);
-               return len;
-       }
-       ret = x_fwrite(p, 1, len, f);
-       SAFE_FREE(p);
-
-       va_end(ap2);
-
-       return ret;
-}
-
- int x_fprintf(XFILE *f, const char *format, ...)
-{
-       va_list ap;
-       int ret;
-
-       va_start(ap, format);
-       ret = x_vfprintf(f, format, ap);
-       va_end(ap);
-       return ret;
-}
-
-/* at least fileno() is simple! */
-int x_fileno(const XFILE *f)
-{
-       return f->fd;
-}
-
-/* simulate fflush() */
-int x_fflush(XFILE *f)
-{
-       int ret;
-
-       if (f->flags & X_FLAG_ERROR) return -1;
-
-       if (f->bufused == 0 || !f->buf) return 0;
-
-       if ((f->open_flags & O_ACCMODE) != O_WRONLY) {
-               errno = EINVAL;
-               return -1;
-       }
-
-       ret = write(f->fd, f->buf, f->bufused);
-       if (ret == -1) return -1;
-       
-       f->bufused -= ret;
-       if (f->bufused > 0) {
-               f->flags |= X_FLAG_ERROR;
-               memmove(f->buf, ret + (char *)f->buf, f->bufused);
-               return -1;
-       }
-
-       return 0;
-}
-
-/* simulate setbuffer() */
-void x_setbuffer(XFILE *f, char *buf, size_t size)
-{
-       x_setvbuf(f, buf, buf?X_IOFBF:X_IONBF, size);
-}
-
-/* simulate setbuf() */
-void x_setbuf(XFILE *f, char *buf)
-{
-       x_setvbuf(f, buf, buf?X_IOFBF:X_IONBF, XBUFSIZE);
-}
-
-/* simulate setlinebuf() */
-void x_setlinebuf(XFILE *f)
-{
-       x_setvbuf(f, NULL, X_IOLBF, 0);
-}
-
-
-/* simulate feof() */
-int x_feof(XFILE *f)
-{
-       if (f->flags & X_FLAG_EOF) return 1;
-       return 0;
-}
-
-/* simulate ferror() */
-int x_ferror(XFILE *f)
-{
-       if (f->flags & X_FLAG_ERROR) return 1;
-       return 0;
-}
-
-/* fill the read buffer */
-static void x_fillbuf(XFILE *f)
-{
-       int n;
-
-       if (f->bufused) return;
-
-       if (!f->buf && !x_allocate_buffer(f)) return;
-
-       n = read(f->fd, f->buf, f->bufsize);
-       if (n <= 0) return;
-       f->bufused = n;
-       f->next = f->buf;
-}
-
-/* simulate fgetc() */
-int x_fgetc(XFILE *f)
-{
-       int ret;
-
-       if (f->flags & (X_FLAG_EOF | X_FLAG_ERROR)) return EOF;
-       
-       if (f->bufused == 0) x_fillbuf(f);
-
-       if (f->bufused == 0) {
-               f->flags |= X_FLAG_EOF;
-               return EOF;
-       }
-
-       ret = *(unsigned char *)(f->next);
-       f->next++;
-       f->bufused--;
-       return ret;
-}
-
-/* simulate fread */
-size_t x_fread(void *p, size_t size, size_t nmemb, XFILE *f)
-{
-       size_t total = 0;
-       while (total < size*nmemb) {
-               int c = x_fgetc(f);
-               if (c == EOF) break;
-               (total+(char *)p)[0] = (char)c;
-               total++;
-       }
-       return total/size;
-}
-
-/* simulate fgets() */
-char *x_fgets(char *s, int size, XFILE *stream) 
-{
-       char *s0 = s;
-       int l = size;
-       while (l>1) {
-               int c = x_fgetc(stream);
-               if (c == EOF) break;
-               *s++ = (char)c;
-               l--;
-               if (c == '\n') break;
-       }
-       if (l==size || x_ferror(stream)) {
-               return 0;
-       }
-       *s = 0;
-       return s0;
-}
-
-/* trivial seek, works only for SEEK_SET and SEEK_END if SEEK_CUR is
- * set then an error is returned */
-off_t x_tseek(XFILE *f, off_t offset, int whence)
-{
-       if (f->flags & X_FLAG_ERROR)
-               return -1;
-
-       /* only SEEK_SET and SEEK_END are supported */
-       /* SEEK_CUR needs internal offset counter */
-       if (whence != SEEK_SET && whence != SEEK_END) {
-               f->flags |= X_FLAG_EINVAL;
-               errno = EINVAL;
-               return -1;
-       }
-
-       /* empty the buffer */
-       switch (f->open_flags & O_ACCMODE) {
-       case O_RDONLY:
-               f->bufused = 0;
-               break;
-       case O_WRONLY:
-               if (x_fflush(f) != 0)
-                       return -1;
-               break;
-       default:
-               errno = EINVAL;
-               return -1;
-       }
-
-       f->flags &= ~X_FLAG_EOF;
-       return (off_t)sys_lseek(f->fd, offset, whence);
-}
index 40f051c8510960587a50e7c15197d1c9b75cbd5e..5a7bd24507684ba5c9ac02260baadc1baefc0515 100644 (file)
@@ -403,12 +403,12 @@ NTSTATUS kerberos_return_pac(TALLOC_CTX *mem_ctx,
        DEBUG(10,("got TGT for %s in %s\n", auth_princ, cc));
        if (expire_time) {
                DEBUGADD(10,("\tvalid until: %s (%d)\n",
-                       http_timestring(*expire_time),
+                       http_timestring(talloc_tos(), *expire_time),
                        (int)*expire_time));
        }
        if (renew_till_time) {
                DEBUGADD(10,("\trenewable till: %s (%d)\n",
-                       http_timestring(*renew_till_time),
+                       http_timestring(talloc_tos(), *renew_till_time),
                        (int)*renew_till_time));
        }
 
index f4c68638dfd258f12da286f0f7675d50f1983c39..a5e04a4a6c49e3b72e62ea80bb97bc17175f8324 100644 (file)
@@ -114,15 +114,15 @@ static void ads_disp_sec_ace_object(ADS_STRUCT *ads,
 {
        if (object->flags & SEC_ACE_OBJECT_PRESENT) {
                printf("Object type: SEC_ACE_OBJECT_PRESENT\n");
-               printf("Object GUID: %s (%s)\n", smb_uuid_string(mem_ctx, 
-                       object->type.type), 
+               printf("Object GUID: %s (%s)\n", GUID_string(mem_ctx, 
+                       &object->type.type), 
                        ads_interprete_guid_from_object(ads, mem_ctx, 
                                &object->type.type));
        }
        if (object->flags & SEC_ACE_OBJECT_INHERITED_PRESENT) {
                printf("Object type: SEC_ACE_OBJECT_INHERITED_PRESENT\n");
-               printf("Object GUID: %s (%s)\n", smb_uuid_string(mem_ctx,
-                       object->inherited_type.inherited_type),
+               printf("Object GUID: %s (%s)\n", GUID_string(mem_ctx,
+                       &object->inherited_type.inherited_type),
                        ads_interprete_guid_from_object(ads, mem_ctx, 
                                &object->inherited_type.inherited_type));
        }
index 719f3bd3ecf16dada423f61db78173de18c2eb01..0ff9f2ba3298ecb8cf42698f480c7d3ac39a9b77 100644 (file)
@@ -285,7 +285,7 @@ static krb5_error_code parse_setpw_reply(krb5_context context,
                return KRB5KRB_AP_ERR_MODIFIED;
        }
        
-       p = packet->data;
+       p = (char *)packet->data;
        /*
        ** see if it is an error
        */
@@ -368,7 +368,7 @@ static krb5_error_code parse_setpw_reply(krb5_context context,
                return KRB5KRB_AP_ERR_MODIFIED;
        }
        
-       p = clearresult.data;
+       p = (char *)clearresult.data;
        
        res_code = RSVAL(p, 0);
        
@@ -687,10 +687,10 @@ kerb_prompter(krb5_context ctx, void *data,
        memset(prompts[0].reply->data, 0, prompts[0].reply->length);
        if (prompts[0].reply->length > 0) {
                if (data) {
-                       strncpy(prompts[0].reply->data,
+                       strncpy((char *)prompts[0].reply->data,
                                (const char *)data,
                                prompts[0].reply->length-1);
-                       prompts[0].reply->length = strlen(prompts[0].reply->data);
+                       prompts[0].reply->length = strlen((const char *)prompts[0].reply->data);
                } else {
                        prompts[0].reply->length = 0;
                }
index 40f052281ddf28e8cf02c5030279a723d2355395..2dcd1fd6aee19a6978ed55740e10e48d23f4dd76 100644 (file)
@@ -801,7 +801,7 @@ static ADS_STATUS ads_do_paged_search_args(ADS_STRUCT *ads,
                                           int *count, struct berval **cookie)
 {
        int rc, i, version;
-       char *utf8_expr, *utf8_path, **search_attrs;
+       char *utf8_expr, *utf8_path, **search_attrs = NULL;
        size_t converted_size;
        LDAPControl PagedResults, NoReferrals, ExternalCtrl, *controls[4], **rcontrols;
        BerElement *cookie_be = NULL;
@@ -832,7 +832,7 @@ static ADS_STATUS ads_do_paged_search_args(ADS_STRUCT *ads,
        else {
                /* This would be the utf8-encoded version...*/
                /* if (!(search_attrs = ads_push_strvals(ctx, attrs))) */
-               if (!(str_list_copy(talloc_tos(), &search_attrs, attrs))) {
+               if (!(search_attrs = str_list_copy(talloc_tos(), attrs))) {
                        rc = LDAP_NO_MEMORY;
                        goto done;
                }
@@ -1144,7 +1144,7 @@ ADS_STATUS ads_do_search_all_fn(ADS_STRUCT *ads, const char *bind_path,
        else {
                /* This would be the utf8-encoded version...*/
                /* if (!(search_attrs = ads_push_strvals(ctx, attrs)))  */
-               if (!(str_list_copy(talloc_tos(), &search_attrs, attrs)))
+               if (!(search_attrs = str_list_copy(talloc_tos(), attrs)))
                {
                        DEBUG(1,("ads_do_search: str_list_copy() failed!"));
                        rc = LDAP_NO_MEMORY;
@@ -2062,7 +2062,7 @@ static void dump_guid(ADS_STRUCT *ads, const char *field, struct berval **values
 
                memcpy(guid.info, values[i]->bv_val, sizeof(guid.info));
                smb_uuid_unpack(guid, &tmp);
-               printf("%s: %s\n", field, smb_uuid_string(talloc_tos(), tmp));
+               printf("%s: %s\n", field, GUID_string(talloc_tos(), &tmp));
        }
 }
 
@@ -3748,7 +3748,7 @@ const char *ads_get_extended_right_name_by_guid(ADS_STRUCT *ads,
        }
 
        expr = talloc_asprintf(mem_ctx, "(rightsGuid=%s)", 
-                              smb_uuid_string(mem_ctx, *rights_guid));
+                              GUID_string(mem_ctx, rights_guid));
        if (!expr) {
                goto done;
        }
index d23c36f3269fc2bb4e0b72c362bedd0a10df5adb..9866a15285faaa2a17f0b4d209cedd17e9c9a631 100644 (file)
@@ -33,7 +33,7 @@ ADS_STATUS ads_change_trust_account_password(ADS_STRUCT *ads, char *host_princip
                return ADS_ERROR_SYSTEM(ENOENT);
        }
 
-       new_password = generate_random_str(DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
+       new_password = generate_random_str(talloc_tos(), DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
     
        ret = kerberos_set_password(ads->auth.kdc_server, host_principal, password, host_principal, new_password, ads->auth.time_offset);
 
index 188a48ab49d292319cd241d1d3739852ca4d8ac7..f50149840726b61524ad01371c6186e53fc79588 100644 (file)
@@ -410,7 +410,7 @@ static NTSTATUS reg_parse_registry(TALLOC_CTX *mem_ctx,
                return status;
        }
 
-       buf = (uint16 *)file_load(real_filename, &n, 0);
+       buf = (uint16 *)file_load(real_filename, &n, 0, NULL);
        if (!buf) {
                TALLOC_FREE(reg_file);
                return NT_STATUS_CANNOT_LOAD_REGISTRY_FILE;
@@ -455,7 +455,7 @@ static NTSTATUS reg_parse_registry(TALLOC_CTX *mem_ctx,
        status = NT_STATUS_OK;
 
  out:
-       SAFE_FREE(buf);
+       TALLOC_FREE(buf);
        prs_mem_free(&ps);
 
        return status;
index 1d746da37f7d34e97a49d732dd2be5127ac3a87c..6aeb354c41ff3eed52d5f17f15ddb8bbf8ce93a0 100644 (file)
@@ -249,7 +249,7 @@ static struct gp_extension_methods security_methods = {
 /****************************************************************
 ****************************************************************/
 
-static NTSTATUS gpext_security_init(void)
+NTSTATUS gpext_security_init(void)
 {
        NTSTATUS status;
 
index 54aaffa4776be872e18328bbb6338c7fe1f8d284..aa8f7c77700a2fd6b27e8ef81f029d14c4920c6c 100644 (file)
@@ -63,7 +63,7 @@ static NTSTATUS convert_file_from_ucs2(TALLOC_CTX *mem_ctx,
                return NT_STATUS_INVALID_PARAMETER;
        }
 
-       data_in = (uint8 *)file_load(filename_in, &n, 0);
+       data_in = (uint8 *)file_load(filename_in, &n, 0, NULL);
        if (!data_in) {
                status = NT_STATUS_NO_SUCH_FILE;
                goto out;
@@ -116,7 +116,7 @@ static NTSTATUS convert_file_from_ucs2(TALLOC_CTX *mem_ctx,
                close(tmp_fd);
        }
 
-       SAFE_FREE(data_in);
+       TALLOC_FREE(data_in);
 
        return status;
 }
index bae03effed6e57ffe250892eaea4ed5b703ae7fd..81866c85ba590624929b63209b181f1b1f08a957 100644 (file)
@@ -297,7 +297,7 @@ static NTSTATUS libnet_dssync_lookup_nc(TALLOC_CTX *mem_ctx,
        req.req1.count          = 1;
        req.req1.names          = names;
        req.req1.format_flags   = DRSUAPI_DS_NAME_FLAG_NO_FLAGS;
-       req.req1.format_offered = DRSUAPI_DS_NAME_FORMAT_UKNOWN;
+       req.req1.format_offered = DRSUAPI_DS_NAME_FORMAT_UNKNOWN;
        req.req1.format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
 
        status = rpccli_drsuapi_DsCrackNames(ctx->cli, mem_ctx,
@@ -539,17 +539,24 @@ static NTSTATUS libnet_dssync_getncchanges(TALLOC_CTX *mem_ctx,
                if (level_out == 1) {
                        out_level = 1;
                        ctr1 = &ctr.ctr1;
-               } else if (level_out == 2) {
+               } else if (level_out == 2 && ctr.ctr2.mszip1.ts) {
                        out_level = 1;
-                       ctr1 = ctr.ctr2.ctr.mszip1.ctr1;
+                       ctr1 = &ctr.ctr2.mszip1.ts->ctr1;
                } else if (level_out == 6) {
                        out_level = 6;
                        ctr6 = &ctr.ctr6;
                } else if (level_out == 7
                           && ctr.ctr7.level == 6
-                          && ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP) {
+                          && ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP
+                          && ctr.ctr7.ctr.mszip6.ts) {
                        out_level = 6;
-                       ctr6 = ctr.ctr7.ctr.mszip6.ctr6;
+                       ctr6 = &ctr.ctr7.ctr.mszip6.ts->ctr6;
+               } else if (level_out == 7
+                          && ctr.ctr7.level == 6
+                          && ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS
+                          && ctr.ctr7.ctr.xpress6.ts) {
+                       out_level = 6;
+                       ctr6 = &ctr.ctr7.ctr.xpress6.ts->ctr6;
                }
 
                if (out_level == 1) {
index ab8af0be6bec6d1a3b75be613d3e04ef2257d54a..6935e000dc224b44c609bb6cdab61f4ad8227286 100644 (file)
@@ -775,7 +775,7 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
        ZERO_STRUCT(user_pol);
 
        if (!r->in.machine_password) {
-               r->in.machine_password = talloc_strdup(mem_ctx, generate_random_str(DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH));
+               r->in.machine_password = generate_random_str(mem_ctx, DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
                NT_STATUS_HAVE_NO_MEMORY(r->in.machine_password);
        }
 
index ab48623ee1bcd1282a9d647ae28e9eab2557d7f5..bc8ca5b5f128cf64782eabdfb5c5a6bbaf487fb6 100644 (file)
@@ -9,7 +9,7 @@
 NTSTATUS rpccli_initshutdown_Init(struct rpc_pipe_client *cli,
                                  TALLOC_CTX *mem_ctx,
                                  uint16_t *hostname /* [in] [unique] */,
-                                 struct initshutdown_String *message /* [in] [unique] */,
+                                 struct lsa_StringLarge *message /* [in] [unique] */,
                                  uint32_t timeout /* [in]  */,
                                  uint8_t force_apps /* [in]  */,
                                  uint8_t do_reboot /* [in]  */,
@@ -103,7 +103,7 @@ NTSTATUS rpccli_initshutdown_Abort(struct rpc_pipe_client *cli,
 NTSTATUS rpccli_initshutdown_InitEx(struct rpc_pipe_client *cli,
                                    TALLOC_CTX *mem_ctx,
                                    uint16_t *hostname /* [in] [unique] */,
-                                   struct initshutdown_String *message /* [in] [unique] */,
+                                   struct lsa_StringLarge *message /* [in] [unique] */,
                                    uint32_t timeout /* [in]  */,
                                    uint8_t force_apps /* [in]  */,
                                    uint8_t do_reboot /* [in]  */,
index c7d2cad664063811a1a949521af0a87a4dfaad1e..e2eb9daabef8c6f45aaa9bfbb0525badd732c001 100644 (file)
@@ -4,7 +4,7 @@
 NTSTATUS rpccli_initshutdown_Init(struct rpc_pipe_client *cli,
                                  TALLOC_CTX *mem_ctx,
                                  uint16_t *hostname /* [in] [unique] */,
-                                 struct initshutdown_String *message /* [in] [unique] */,
+                                 struct lsa_StringLarge *message /* [in] [unique] */,
                                  uint32_t timeout /* [in]  */,
                                  uint8_t force_apps /* [in]  */,
                                  uint8_t do_reboot /* [in]  */,
@@ -16,7 +16,7 @@ NTSTATUS rpccli_initshutdown_Abort(struct rpc_pipe_client *cli,
 NTSTATUS rpccli_initshutdown_InitEx(struct rpc_pipe_client *cli,
                                    TALLOC_CTX *mem_ctx,
                                    uint16_t *hostname /* [in] [unique] */,
-                                   struct initshutdown_String *message /* [in] [unique] */,
+                                   struct lsa_StringLarge *message /* [in] [unique] */,
                                    uint32_t timeout /* [in]  */,
                                    uint8_t force_apps /* [in]  */,
                                    uint8_t do_reboot /* [in]  */,
index 4ab27ed04b10af05607e96137dad3febd8a8cdc2..15ff462ef614771e1652ae334359f4fde408ba2b 100644 (file)
@@ -1141,12 +1141,18 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client *cli,
 }
 
 NTSTATUS rpccli_lsa_SetInformationTrustedDomain(struct rpc_pipe_client *cli,
-                                               TALLOC_CTX *mem_ctx)
+                                               TALLOC_CTX *mem_ctx,
+                                               struct policy_handle *trustdom_handle /* [in] [ref] */,
+                                               enum lsa_TrustDomInfoEnum level /* [in]  */,
+                                               union lsa_TrustedDomainInfo *info /* [in] [ref,switch_is(level)] */)
 {
        struct lsa_SetInformationTrustedDomain r;
        NTSTATUS status;
 
        /* In parameters */
+       r.in.trustdom_handle = trustdom_handle;
+       r.in.level = level;
+       r.in.info = info;
 
        if (DEBUGLEVEL >= 10) {
                NDR_PRINT_IN_DEBUG(lsa_SetInformationTrustedDomain, &r);
@@ -1706,12 +1712,20 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfoBySid(struct rpc_pipe_client *cli,
 }
 
 NTSTATUS rpccli_lsa_SetTrustedDomainInfo(struct rpc_pipe_client *cli,
-                                        TALLOC_CTX *mem_ctx)
+                                        TALLOC_CTX *mem_ctx,
+                                        struct policy_handle *handle /* [in] [ref] */,
+                                        struct dom_sid2 *dom_sid /* [in] [ref] */,
+                                        enum lsa_TrustDomInfoEnum level /* [in]  */,
+                                        union lsa_TrustedDomainInfo *info /* [in] [ref,switch_is(level)] */)
 {
        struct lsa_SetTrustedDomainInfo r;
        NTSTATUS status;
 
        /* In parameters */
+       r.in.handle = handle;
+       r.in.dom_sid = dom_sid;
+       r.in.level = level;
+       r.in.info = info;
 
        if (DEBUGLEVEL >= 10) {
                NDR_PRINT_IN_DEBUG(lsa_SetTrustedDomainInfo, &r);
@@ -2161,12 +2175,21 @@ NTSTATUS rpccli_lsa_EnumTrustedDomainsEx(struct rpc_pipe_client *cli,
 }
 
 NTSTATUS rpccli_lsa_CreateTrustedDomainEx(struct rpc_pipe_client *cli,
-                                         TALLOC_CTX *mem_ctx)
+                                         TALLOC_CTX *mem_ctx,
+                                         struct policy_handle *policy_handle /* [in] [ref] */,
+                                         struct lsa_TrustDomainInfoInfoEx *info /* [in] [ref] */,
+                                         struct lsa_TrustDomainInfoAuthInfoInternal *auth_info /* [in] [ref] */,
+                                         uint32_t access_mask /* [in]  */,
+                                         struct policy_handle *trustdom_handle /* [out] [ref] */)
 {
        struct lsa_CreateTrustedDomainEx r;
        NTSTATUS status;
 
        /* In parameters */
+       r.in.policy_handle = policy_handle;
+       r.in.info = info;
+       r.in.auth_info = auth_info;
+       r.in.access_mask = access_mask;
 
        if (DEBUGLEVEL >= 10) {
                NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx, &r);
@@ -2191,6 +2214,7 @@ NTSTATUS rpccli_lsa_CreateTrustedDomainEx(struct rpc_pipe_client *cli,
        }
 
        /* Return variables */
+       *trustdom_handle = *r.out.trustdom_handle;
 
        /* Return result */
        return r.out.result;
@@ -2462,8 +2486,8 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli,
                                 struct lsa_TransSidArray2 *sids /* [in,out] [ref] */,
                                 enum lsa_LookupNamesLevel level /* [in]  */,
                                 uint32_t *count /* [in,out] [ref] */,
-                                uint32_t unknown1 /* [in]  */,
-                                uint32_t unknown2 /* [in]  */)
+                                uint32_t lookup_options /* [in]  */,
+                                uint32_t client_revision /* [in]  */)
 {
        struct lsa_LookupNames2 r;
        NTSTATUS status;
@@ -2475,8 +2499,8 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli,
        r.in.sids = sids;
        r.in.level = level;
        r.in.count = count;
-       r.in.unknown1 = unknown1;
-       r.in.unknown2 = unknown2;
+       r.in.lookup_options = lookup_options;
+       r.in.client_revision = client_revision;
 
        if (DEBUGLEVEL >= 10) {
                NDR_PRINT_IN_DEBUG(lsa_LookupNames2, &r);
@@ -2510,12 +2534,21 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli,
 }
 
 NTSTATUS rpccli_lsa_CreateTrustedDomainEx2(struct rpc_pipe_client *cli,
-                                          TALLOC_CTX *mem_ctx)
+                                          TALLOC_CTX *mem_ctx,
+                                          struct policy_handle *policy_handle /* [in] [ref] */,
+                                          struct lsa_TrustDomainInfoInfoEx *info /* [in] [ref] */,
+                                          struct lsa_TrustDomainInfoAuthInfoInternal *auth_info /* [in] [ref] */,
+                                          uint32_t access_mask /* [in]  */,
+                                          struct policy_handle *trustdom_handle /* [out] [ref] */)
 {
        struct lsa_CreateTrustedDomainEx2 r;
        NTSTATUS status;
 
        /* In parameters */
+       r.in.policy_handle = policy_handle;
+       r.in.info = info;
+       r.in.auth_info = auth_info;
+       r.in.access_mask = access_mask;
 
        if (DEBUGLEVEL >= 10) {
                NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx2, &r);
@@ -2540,6 +2573,7 @@ NTSTATUS rpccli_lsa_CreateTrustedDomainEx2(struct rpc_pipe_client *cli,
        }
 
        /* Return variables */
+       *trustdom_handle = *r.out.trustdom_handle;
 
        /* Return result */
        return r.out.result;
@@ -2842,8 +2876,8 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli,
                                 struct lsa_TransSidArray3 *sids /* [in,out] [ref] */,
                                 enum lsa_LookupNamesLevel level /* [in]  */,
                                 uint32_t *count /* [in,out] [ref] */,
-                                uint32_t unknown1 /* [in]  */,
-                                uint32_t unknown2 /* [in]  */)
+                                uint32_t lookup_options /* [in]  */,
+                                uint32_t client_revision /* [in]  */)
 {
        struct lsa_LookupNames3 r;
        NTSTATUS status;
@@ -2855,8 +2889,8 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli,
        r.in.sids = sids;
        r.in.level = level;
        r.in.count = count;
-       r.in.unknown1 = unknown1;
-       r.in.unknown2 = unknown2;
+       r.in.lookup_options = lookup_options;
+       r.in.client_revision = client_revision;
 
        if (DEBUGLEVEL >= 10) {
                NDR_PRINT_IN_DEBUG(lsa_LookupNames3, &r);
@@ -3209,8 +3243,8 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli,
                                 struct lsa_TransSidArray3 *sids /* [in,out] [ref] */,
                                 enum lsa_LookupNamesLevel level /* [in]  */,
                                 uint32_t *count /* [in,out] [ref] */,
-                                uint32_t unknown1 /* [in]  */,
-                                uint32_t unknown2 /* [in]  */)
+                                uint32_t lookup_options /* [in]  */,
+                                uint32_t client_revision /* [in]  */)
 {
        struct lsa_LookupNames4 r;
        NTSTATUS status;
@@ -3221,8 +3255,8 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli,
        r.in.sids = sids;
        r.in.level = level;
        r.in.count = count;
-       r.in.unknown1 = unknown1;
-       r.in.unknown2 = unknown2;
+       r.in.lookup_options = lookup_options;
+       r.in.client_revision = client_revision;
 
        if (DEBUGLEVEL >= 10) {
                NDR_PRINT_IN_DEBUG(lsa_LookupNames4, &r);
index f3333a091b246fdf536a34f34ff19aef833ad436..d6cb2fc7a79e357f777c2baef3770f056b8bf247 100644 (file)
@@ -133,7 +133,10 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client *cli,
                                           enum lsa_TrustDomInfoEnum level /* [in]  */,
                                           union lsa_TrustedDomainInfo **info /* [out] [ref,switch_is(level)] */);
 NTSTATUS rpccli_lsa_SetInformationTrustedDomain(struct rpc_pipe_client *cli,
-                                               TALLOC_CTX *mem_ctx);
+                                               TALLOC_CTX *mem_ctx,
+                                               struct policy_handle *trustdom_handle /* [in] [ref] */,
+                                               enum lsa_TrustDomInfoEnum level /* [in]  */,
+                                               union lsa_TrustedDomainInfo *info /* [in] [ref,switch_is(level)] */);
 NTSTATUS rpccli_lsa_OpenSecret(struct rpc_pipe_client *cli,
                               TALLOC_CTX *mem_ctx,
                               struct policy_handle *handle /* [in] [ref] */,
@@ -201,7 +204,11 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfoBySid(struct rpc_pipe_client *cli,
                                                enum lsa_TrustDomInfoEnum level /* [in]  */,
                                                union lsa_TrustedDomainInfo **info /* [out] [ref,switch_is(level)] */);
 NTSTATUS rpccli_lsa_SetTrustedDomainInfo(struct rpc_pipe_client *cli,
-                                        TALLOC_CTX *mem_ctx);
+                                        TALLOC_CTX *mem_ctx,
+                                        struct policy_handle *handle /* [in] [ref] */,
+                                        struct dom_sid2 *dom_sid /* [in] [ref] */,
+                                        enum lsa_TrustDomInfoEnum level /* [in]  */,
+                                        union lsa_TrustedDomainInfo *info /* [in] [ref,switch_is(level)] */);
 NTSTATUS rpccli_lsa_DeleteTrustedDomain(struct rpc_pipe_client *cli,
                                        TALLOC_CTX *mem_ctx,
                                        struct policy_handle *handle /* [in] [ref] */,
@@ -250,7 +257,12 @@ NTSTATUS rpccli_lsa_EnumTrustedDomainsEx(struct rpc_pipe_client *cli,
                                         struct lsa_DomainListEx *domains /* [out] [ref] */,
                                         uint32_t max_size /* [in]  */);
 NTSTATUS rpccli_lsa_CreateTrustedDomainEx(struct rpc_pipe_client *cli,
-                                         TALLOC_CTX *mem_ctx);
+                                         TALLOC_CTX *mem_ctx,
+                                         struct policy_handle *policy_handle /* [in] [ref] */,
+                                         struct lsa_TrustDomainInfoInfoEx *info /* [in] [ref] */,
+                                         struct lsa_TrustDomainInfoAuthInfoInternal *auth_info /* [in] [ref] */,
+                                         uint32_t access_mask /* [in]  */,
+                                         struct policy_handle *trustdom_handle /* [out] [ref] */);
 NTSTATUS rpccli_lsa_CloseTrustedDomainEx(struct rpc_pipe_client *cli,
                                         TALLOC_CTX *mem_ctx,
                                         struct policy_handle *handle /* [in,out] [ref] */);
@@ -291,10 +303,15 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli,
                                 struct lsa_TransSidArray2 *sids /* [in,out] [ref] */,
                                 enum lsa_LookupNamesLevel level /* [in]  */,
                                 uint32_t *count /* [in,out] [ref] */,
-                                uint32_t unknown1 /* [in]  */,
-                                uint32_t unknown2 /* [in]  */);
+                                uint32_t lookup_options /* [in]  */,
+                                uint32_t client_revision /* [in]  */);
 NTSTATUS rpccli_lsa_CreateTrustedDomainEx2(struct rpc_pipe_client *cli,
-                                          TALLOC_CTX *mem_ctx);
+                                          TALLOC_CTX *mem_ctx,
+                                          struct policy_handle *policy_handle /* [in] [ref] */,
+                                          struct lsa_TrustDomainInfoInfoEx *info /* [in] [ref] */,
+                                          struct lsa_TrustDomainInfoAuthInfoInternal *auth_info /* [in] [ref] */,
+                                          uint32_t access_mask /* [in]  */,
+                                          struct policy_handle *trustdom_handle /* [out] [ref] */);
 NTSTATUS rpccli_lsa_CREDRWRITE(struct rpc_pipe_client *cli,
                               TALLOC_CTX *mem_ctx);
 NTSTATUS rpccli_lsa_CREDRREAD(struct rpc_pipe_client *cli,
@@ -320,8 +337,8 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli,
                                 struct lsa_TransSidArray3 *sids /* [in,out] [ref] */,
                                 enum lsa_LookupNamesLevel level /* [in]  */,
                                 uint32_t *count /* [in,out] [ref] */,
-                                uint32_t unknown1 /* [in]  */,
-                                uint32_t unknown2 /* [in]  */);
+                                uint32_t lookup_options /* [in]  */,
+                                uint32_t client_revision /* [in]  */);
 NTSTATUS rpccli_lsa_CREDRGETSESSIONTYPES(struct rpc_pipe_client *cli,
                                         TALLOC_CTX *mem_ctx);
 NTSTATUS rpccli_lsa_LSARREGISTERAUDITEVENT(struct rpc_pipe_client *cli,
@@ -357,8 +374,8 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli,
                                 struct lsa_TransSidArray3 *sids /* [in,out] [ref] */,
                                 enum lsa_LookupNamesLevel level /* [in]  */,
                                 uint32_t *count /* [in,out] [ref] */,
-                                uint32_t unknown1 /* [in]  */,
-                                uint32_t unknown2 /* [in]  */);
+                                uint32_t lookup_options /* [in]  */,
+                                uint32_t client_revision /* [in]  */);
 NTSTATUS rpccli_lsa_LSAROPENPOLICYSCE(struct rpc_pipe_client *cli,
                                      TALLOC_CTX *mem_ctx);
 NTSTATUS rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client *cli,
index d6ac8b9ede67b704b530ceeaec016a2d7e3322d8..941273bddc49219b2848010692f4ae64146ad86c 100644 (file)
@@ -110,8 +110,8 @@ NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli,
                                   const char *computer_name /* [in] [unique,charset(UTF16)] */,
                                   struct netr_Authenticator *credential /* [in] [unique] */,
                                   struct netr_Authenticator *return_authenticator /* [in,out] [unique] */,
-                                  enum netr_LogonLevel logon_level /* [in]  */,
-                                  union netr_LogonInfo *logon /* [in] [ref,switch_is(logon_level)] */,
+                                  enum netr_LogonInfoClass logon_level /* [in]  */,
+                                  union netr_LogonLevel *logon /* [in] [ref,switch_is(logon_level)] */,
                                   uint16_t validation_level /* [in]  */,
                                   union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */,
                                   uint8_t *authoritative /* [out] [ref] */)
@@ -167,8 +167,8 @@ NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli,
                                    const char *computer_name /* [in] [unique,charset(UTF16)] */,
                                    struct netr_Authenticator *credential /* [in] [unique] */,
                                    struct netr_Authenticator *return_authenticator /* [in,out] [unique] */,
-                                   enum netr_LogonLevel logon_level /* [in]  */,
-                                   union netr_LogonInfo logon /* [in] [switch_is(logon_level)] */)
+                                   enum netr_LogonInfoClass logon_level /* [in]  */,
+                                   union netr_LogonLevel logon /* [in] [switch_is(logon_level)] */)
 {
        struct netr_LogonSamLogoff r;
        NTSTATUS status;
@@ -1934,8 +1934,8 @@ NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli,
                                     TALLOC_CTX *mem_ctx,
                                     const char *server_name /* [in] [unique,charset(UTF16)] */,
                                     const char *computer_name /* [in] [unique,charset(UTF16)] */,
-                                    enum netr_LogonLevel logon_level /* [in]  */,
-                                    union netr_LogonInfo *logon /* [in] [ref,switch_is(logon_level)] */,
+                                    enum netr_LogonInfoClass logon_level /* [in]  */,
+                                    union netr_LogonLevel *logon /* [in] [ref,switch_is(logon_level)] */,
                                     uint16_t validation_level /* [in]  */,
                                     union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */,
                                     uint8_t *authoritative /* [out] [ref] */,
@@ -2241,8 +2241,8 @@ NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli,
                                            const char *computer_name /* [in] [unique,charset(UTF16)] */,
                                            struct netr_Authenticator *credential /* [in] [unique] */,
                                            struct netr_Authenticator *return_authenticator /* [in,out] [unique] */,
-                                           enum netr_LogonLevel logon_level /* [in]  */,
-                                           union netr_LogonInfo logon /* [in] [switch_is(logon_level)] */,
+                                           enum netr_LogonInfoClass logon_level /* [in]  */,
+                                           union netr_LogonLevel logon /* [in] [switch_is(logon_level)] */,
                                            uint16_t validation_level /* [in]  */,
                                            union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */,
                                            uint8_t *authoritative /* [out] [ref] */,
index 2033315a5d5fb9b824222fb6c71f1b92f0650f15..0a0cfdf6e418fe443f34bbc8efbf8212d3f94616 100644 (file)
@@ -21,8 +21,8 @@ NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli,
                                   const char *computer_name /* [in] [unique,charset(UTF16)] */,
                                   struct netr_Authenticator *credential /* [in] [unique] */,
                                   struct netr_Authenticator *return_authenticator /* [in,out] [unique] */,
-                                  enum netr_LogonLevel logon_level /* [in]  */,
-                                  union netr_LogonInfo *logon /* [in] [ref,switch_is(logon_level)] */,
+                                  enum netr_LogonInfoClass logon_level /* [in]  */,
+                                  union netr_LogonLevel *logon /* [in] [ref,switch_is(logon_level)] */,
                                   uint16_t validation_level /* [in]  */,
                                   union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */,
                                   uint8_t *authoritative /* [out] [ref] */);
@@ -32,8 +32,8 @@ NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli,
                                    const char *computer_name /* [in] [unique,charset(UTF16)] */,
                                    struct netr_Authenticator *credential /* [in] [unique] */,
                                    struct netr_Authenticator *return_authenticator /* [in,out] [unique] */,
-                                   enum netr_LogonLevel logon_level /* [in]  */,
-                                   union netr_LogonInfo logon /* [in] [switch_is(logon_level)] */);
+                                   enum netr_LogonInfoClass logon_level /* [in]  */,
+                                   union netr_LogonLevel logon /* [in] [switch_is(logon_level)] */);
 NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli,
                                        TALLOC_CTX *mem_ctx,
                                        const char *server_name /* [in] [unique,charset(UTF16)] */,
@@ -297,8 +297,8 @@ NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli,
                                     TALLOC_CTX *mem_ctx,
                                     const char *server_name /* [in] [unique,charset(UTF16)] */,
                                     const char *computer_name /* [in] [unique,charset(UTF16)] */,
-                                    enum netr_LogonLevel logon_level /* [in]  */,
-                                    union netr_LogonInfo *logon /* [in] [ref,switch_is(logon_level)] */,
+                                    enum netr_LogonInfoClass logon_level /* [in]  */,
+                                    union netr_LogonLevel *logon /* [in] [ref,switch_is(logon_level)] */,
                                     uint16_t validation_level /* [in]  */,
                                     union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */,
                                     uint8_t *authoritative /* [out] [ref] */,
@@ -349,8 +349,8 @@ NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli,
                                            const char *computer_name /* [in] [unique,charset(UTF16)] */,
                                            struct netr_Authenticator *credential /* [in] [unique] */,
                                            struct netr_Authenticator *return_authenticator /* [in,out] [unique] */,
-                                           enum netr_LogonLevel logon_level /* [in]  */,
-                                           union netr_LogonInfo logon /* [in] [switch_is(logon_level)] */,
+                                           enum netr_LogonInfoClass logon_level /* [in]  */,
+                                           union netr_LogonLevel logon /* [in] [switch_is(logon_level)] */,
                                            uint16_t validation_level /* [in]  */,
                                            union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */,
                                            uint8_t *authoritative /* [out] [ref] */,
index bc5dba4d9186a107b5d0d8c0e2adb86d3e5b1b60..f8ef7a99ad18240ba1f871db4cb9bea3a33d6c44 100644 (file)
@@ -424,12 +424,19 @@ NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli,
 
 NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli,
                                  TALLOC_CTX *mem_ctx,
+                                 const char *filter /* [in] [unique,charset(UTF16)] */,
+                                 uint16_t *buffer /* [out] [ref,length_is(*length),size_is(*length)] */,
+                                 uint32_t *length /* [in,out] [ref] */,
+                                 uint32_t flags /* [in]  */,
                                  WERROR *werror)
 {
        struct PNP_GetDeviceList r;
        NTSTATUS status;
 
        /* In parameters */
+       r.in.filter = filter;
+       r.in.length = length;
+       r.in.flags = flags;
 
        if (DEBUGLEVEL >= 10) {
                NDR_PRINT_IN_DEBUG(PNP_GetDeviceList, &r);
@@ -454,6 +461,8 @@ NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli,
        }
 
        /* Return variables */
+       memcpy(buffer, r.out.buffer, *r.in.length * sizeof(*buffer));
+       *length = *r.out.length;
 
        /* Return result */
        if (werror) {
@@ -555,11 +564,11 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
                                     TALLOC_CTX *mem_ctx,
                                     const char *devicepath /* [in] [ref,charset(UTF16)] */,
                                     uint32_t property /* [in]  */,
-                                    uint32_t *unknown1 /* [in,out] [ref] */,
+                                    uint32_t *reg_data_type /* [in,out] [ref] */,
                                     uint8_t *buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
                                     uint32_t *buffer_size /* [in,out] [ref] */,
                                     uint32_t *needed /* [in,out] [ref] */,
-                                    uint32_t unknown3 /* [in]  */,
+                                    uint32_t flags /* [in]  */,
                                     WERROR *werror)
 {
        struct PNP_GetDeviceRegProp r;
@@ -568,10 +577,10 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
        /* In parameters */
        r.in.devicepath = devicepath;
        r.in.property = property;
-       r.in.unknown1 = unknown1;
+       r.in.reg_data_type = reg_data_type;
        r.in.buffer_size = buffer_size;
        r.in.needed = needed;
-       r.in.unknown3 = unknown3;
+       r.in.flags = flags;
 
        if (DEBUGLEVEL >= 10) {
                NDR_PRINT_IN_DEBUG(PNP_GetDeviceRegProp, &r);
@@ -596,7 +605,7 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
        }
 
        /* Return variables */
-       *unknown1 = *r.out.unknown1;
+       *reg_data_type = *r.out.reg_data_type;
        memcpy(buffer, r.out.buffer, *r.in.buffer_size * sizeof(*buffer));
        *buffer_size = *r.out.buffer_size;
        *needed = *r.out.needed;
index a52a79ecc5da6b6c8c076f64cc37bd6626768723..4ed8a401ec78b970365a89ff5642d20a72b30e76 100644 (file)
@@ -36,6 +36,10 @@ NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli,
                                     WERROR *werror);
 NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli,
                                  TALLOC_CTX *mem_ctx,
+                                 const char *filter /* [in] [unique,charset(UTF16)] */,
+                                 uint16_t *buffer /* [out] [ref,length_is(*length),size_is(*length)] */,
+                                 uint32_t *length /* [in,out] [ref] */,
+                                 uint32_t flags /* [in]  */,
                                  WERROR *werror);
 NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli,
                                      TALLOC_CTX *mem_ctx,
@@ -50,11 +54,11 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
                                     TALLOC_CTX *mem_ctx,
                                     const char *devicepath /* [in] [ref,charset(UTF16)] */,
                                     uint32_t property /* [in]  */,
-                                    uint32_t *unknown1 /* [in,out] [ref] */,
+                                    uint32_t *reg_data_type /* [in,out] [ref] */,
                                     uint8_t *buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
                                     uint32_t *buffer_size /* [in,out] [ref] */,
                                     uint32_t *needed /* [in,out] [ref] */,
-                                    uint32_t unknown3 /* [in]  */,
+                                    uint32_t flags /* [in]  */,
                                     WERROR *werror);
 NTSTATUS rpccli_PNP_SetDeviceRegProp(struct rpc_pipe_client *cli,
                                     TALLOC_CTX *mem_ctx,
index c996c761d5d1cb8ca9a1bd52be05a05bd4d42831..e5fd4dac87092163bab6e1d4eb70beead7cafc82 100644 (file)
@@ -858,9 +858,9 @@ NTSTATUS rpccli_svcctl_OpenServiceW(struct rpc_pipe_client *cli,
 NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli,
                                           TALLOC_CTX *mem_ctx,
                                           struct policy_handle *handle /* [in] [ref] */,
-                                          uint8_t *query /* [out]  */,
-                                          uint32_t buf_size /* [in]  */,
-                                          uint32_t *bytes_needed /* [out] [ref] */,
+                                          struct QUERY_SERVICE_CONFIG *query /* [out] [ref] */,
+                                          uint32_t buf_size /* [in] [range(0,8192)] */,
+                                          uint32_t *bytes_needed /* [out] [ref,range(0,8192)] */,
                                           WERROR *werror)
 {
        struct svcctl_QueryServiceConfigW r;
@@ -893,7 +893,7 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli,
        }
 
        /* Return variables */
-       memcpy(query, r.out.query, r.in.buf_size * sizeof(*query));
+       *query = *r.out.query;
        *bytes_needed = *r.out.bytes_needed;
 
        /* Return result */
index 56f0a2b0e723f654b10d4726d7ac1302cdbf8cc0..02abbadf1e097ce0950abf8a622dfa822d84a881 100644 (file)
@@ -127,9 +127,9 @@ NTSTATUS rpccli_svcctl_OpenServiceW(struct rpc_pipe_client *cli,
 NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli,
                                           TALLOC_CTX *mem_ctx,
                                           struct policy_handle *handle /* [in] [ref] */,
-                                          uint8_t *query /* [out]  */,
-                                          uint32_t buf_size /* [in]  */,
-                                          uint32_t *bytes_needed /* [out] [ref] */,
+                                          struct QUERY_SERVICE_CONFIG *query /* [out] [ref] */,
+                                          uint32_t buf_size /* [in] [range(0,8192)] */,
+                                          uint32_t *bytes_needed /* [out] [ref,range(0,8192)] */,
                                           WERROR *werror);
 NTSTATUS rpccli_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client *cli,
                                               TALLOC_CTX *mem_ctx,
index 29f7e50c45f0223404fdff6d3747a31656b032c0..d558a5a185d71184e2d71e8520b7104012b51db8 100644 (file)
@@ -872,9 +872,9 @@ NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli,
                                  struct policy_handle *handle /* [in] [ref] */,
                                  struct winreg_String *value_name /* [in] [ref] */,
                                  enum winreg_Type *type /* [in,out] [unique] */,
-                                 uint8_t *data /* [in,out] [unique,length_is(*value_length),size_is(*data_size)] */,
+                                 uint8_t *data /* [in,out] [unique,length_is(*data_length),size_is(*data_size)] */,
                                  uint32_t *data_size /* [in,out] [unique] */,
-                                 uint32_t *value_length /* [in,out] [unique] */,
+                                 uint32_t *data_length /* [in,out] [unique] */,
                                  WERROR *werror)
 {
        struct winreg_QueryValue r;
@@ -886,7 +886,7 @@ NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli,
        r.in.type = type;
        r.in.data = data;
        r.in.data_size = data_size;
-       r.in.value_length = value_length;
+       r.in.data_length = data_length;
 
        if (DEBUGLEVEL >= 10) {
                NDR_PRINT_IN_DEBUG(winreg_QueryValue, &r);
@@ -920,8 +920,8 @@ NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli,
        if (data_size && r.out.data_size) {
                *data_size = *r.out.data_size;
        }
-       if (value_length && r.out.value_length) {
-               *value_length = *r.out.value_length;
+       if (data_length && r.out.data_length) {
+               *data_length = *r.out.data_length;
        }
 
        /* Return result */
@@ -1070,7 +1070,7 @@ NTSTATUS rpccli_winreg_SaveKey(struct rpc_pipe_client *cli,
 NTSTATUS rpccli_winreg_SetKeySecurity(struct rpc_pipe_client *cli,
                                      TALLOC_CTX *mem_ctx,
                                      struct policy_handle *handle /* [in] [ref] */,
-                                     uint32_t access_mask /* [in]  */,
+                                     uint32_t sec_info /* [in]  */,
                                      struct KeySecurityData *sd /* [in] [ref] */,
                                      WERROR *werror)
 {
@@ -1079,7 +1079,7 @@ NTSTATUS rpccli_winreg_SetKeySecurity(struct rpc_pipe_client *cli,
 
        /* In parameters */
        r.in.handle = handle;
-       r.in.access_mask = access_mask;
+       r.in.sec_info = sec_info;
        r.in.sd = sd;
 
        if (DEBUGLEVEL >= 10) {
@@ -1209,7 +1209,7 @@ NTSTATUS rpccli_winreg_UnLoadKey(struct rpc_pipe_client *cli,
 NTSTATUS rpccli_winreg_InitiateSystemShutdown(struct rpc_pipe_client *cli,
                                              TALLOC_CTX *mem_ctx,
                                              uint16_t *hostname /* [in] [unique] */,
-                                             struct initshutdown_String *message /* [in] [unique] */,
+                                             struct lsa_StringLarge *message /* [in] [unique] */,
                                              uint32_t timeout /* [in]  */,
                                              uint8_t force_apps /* [in]  */,
                                              uint8_t do_reboot /* [in]  */,
@@ -1498,7 +1498,7 @@ NTSTATUS rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client *cli,
 NTSTATUS rpccli_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client *cli,
                                                TALLOC_CTX *mem_ctx,
                                                uint16_t *hostname /* [in] [unique] */,
-                                               struct initshutdown_String *message /* [in] [unique] */,
+                                               struct lsa_StringLarge *message /* [in] [unique] */,
                                                uint32_t timeout /* [in]  */,
                                                uint8_t force_apps /* [in]  */,
                                                uint8_t do_reboot /* [in]  */,
index 793a4ffc5b8f68299a182db1a88ba0e3a0ab4aa2..ce2bfcd5ec11a053141f2b93f1a6a4b2b81723c6 100644 (file)
@@ -126,9 +126,9 @@ NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli,
                                  struct policy_handle *handle /* [in] [ref] */,
                                  struct winreg_String *value_name /* [in] [ref] */,
                                  enum winreg_Type *type /* [in,out] [unique] */,
-                                 uint8_t *data /* [in,out] [unique,length_is(*value_length),size_is(*data_size)] */,
+                                 uint8_t *data /* [in,out] [unique,length_is(*data_length),size_is(*data_size)] */,
                                  uint32_t *data_size /* [in,out] [unique] */,
-                                 uint32_t *value_length /* [in,out] [unique] */,
+                                 uint32_t *data_length /* [in,out] [unique] */,
                                  WERROR *werror);
 NTSTATUS rpccli_winreg_ReplaceKey(struct rpc_pipe_client *cli,
                                  TALLOC_CTX *mem_ctx,
@@ -148,7 +148,7 @@ NTSTATUS rpccli_winreg_SaveKey(struct rpc_pipe_client *cli,
 NTSTATUS rpccli_winreg_SetKeySecurity(struct rpc_pipe_client *cli,
                                      TALLOC_CTX *mem_ctx,
                                      struct policy_handle *handle /* [in] [ref] */,
-                                     uint32_t access_mask /* [in]  */,
+                                     uint32_t sec_info /* [in]  */,
                                      struct KeySecurityData *sd /* [in] [ref] */,
                                      WERROR *werror);
 NTSTATUS rpccli_winreg_SetValue(struct rpc_pipe_client *cli,
@@ -165,7 +165,7 @@ NTSTATUS rpccli_winreg_UnLoadKey(struct rpc_pipe_client *cli,
 NTSTATUS rpccli_winreg_InitiateSystemShutdown(struct rpc_pipe_client *cli,
                                              TALLOC_CTX *mem_ctx,
                                              uint16_t *hostname /* [in] [unique] */,
-                                             struct initshutdown_String *message /* [in] [unique] */,
+                                             struct lsa_StringLarge *message /* [in] [unique] */,
                                              uint32_t timeout /* [in]  */,
                                              uint8_t force_apps /* [in]  */,
                                              uint8_t do_reboot /* [in]  */,
@@ -202,7 +202,7 @@ NTSTATUS rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client *cli,
 NTSTATUS rpccli_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client *cli,
                                                TALLOC_CTX *mem_ctx,
                                                uint16_t *hostname /* [in] [unique] */,
-                                               struct initshutdown_String *message /* [in] [unique] */,
+                                               struct lsa_StringLarge *message /* [in] [unique] */,
                                                uint32_t timeout /* [in]  */,
                                                uint8_t force_apps /* [in]  */,
                                                uint8_t do_reboot /* [in]  */,
index b0ab9aea2a5f03487fde7ced67a23ce21d33023d..692746468e8c433407f15091ea6a6914f937a5f1 100644 (file)
@@ -4,12 +4,16 @@
 
 #include "librpc/gen_ndr/drsuapi.h"
 #include "librpc/gen_ndr/misc.h"
+#include "librpc/gen_ndr/samr.h"
+#include "librpc/gen_ndr/lsa.h"
 #ifndef _HEADER_drsblobs
 #define _HEADER_drsblobs
 
 #define SUPPLEMENTAL_CREDENTIALS_PREFIX        ( "                                                " )
 enum drsuapi_DsAttributeId;
 
+enum lsa_TrustAuthType;
+
 struct replPropertyMetaData1 {
        enum drsuapi_DsAttributeId attid;
        uint32_t version;
@@ -247,7 +251,7 @@ struct package_PrimaryKerberosBlob {
 }/* [public] */;
 
 struct package_PrimaryCLEARTEXTBlob {
-       const char * cleartext;/* [flag(LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING)] */
+       DATA_BLOB cleartext;/* [flag(LIBNDR_FLAG_REMAINING)] */
 }/* [public] */;
 
 struct package_PrimaryWDigestHash {
@@ -263,63 +267,158 @@ struct package_PrimaryWDigestBlob {
        struct package_PrimaryWDigestHash *hashes;
 }/* [public] */;
 
-struct trustAuthInOutSecret1 {
-       NTTIME time1;
-       uint32_t unknown1;
-       DATA_BLOB value;
-       DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */
+struct AuthInfoNone {
+       uint32_t size;/* [value(0)] */
 };
 
-struct trustAuthInOutCtr1 {
-       struct trustAuthInOutSecret1 *value1;/* [relative] */
-       struct trustAuthInOutSecret1 *value2;/* [relative] */
+struct AuthInfoNT4Owf {
+       uint32_t size;/* [value(16)] */
+       struct samr_Password password;
 };
 
-struct trustAuthInOutSecret2V1 {
-       NTTIME time1;
-       uint32_t unknown1;
-       DATA_BLOB value;
-       NTTIME time2;
-       uint32_t unknown2;
-       uint32_t unknown3;
-       uint32_t unknown4;
-       DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */
+struct AuthInfoClear {
+       uint32_t size;
+       uint8_t *password;
 };
 
-struct trustAuthInOutSecret2V2 {
-       NTTIME time1;
-       uint32_t unknown1;
-       DATA_BLOB value;
-       NTTIME time2;
-       uint32_t unknown2;
-       uint32_t unknown3;
-       DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */
-};
-
-struct trustAuthInOutCtr2 {
-       struct trustAuthInOutSecret2V1 *value1;/* [relative] */
-       struct trustAuthInOutSecret2V2 *value2;/* [relative] */
+struct AuthInfoVersion {
+       uint32_t size;/* [value(4)] */
+       uint32_t version;
 };
 
-union trustAuthInOutCtr {
-       struct trustAuthInOutCtr1 ctr1;/* [case] */
-       struct trustAuthInOutCtr2 ctr2;/* [case(2)] */
+union AuthInfo {
+       struct AuthInfoNone none;/* [case(TRUST_AUTH_TYPE_NONE)] */
+       struct AuthInfoNT4Owf nt4owf;/* [case(TRUST_AUTH_TYPE_NT4OWF)] */
+       struct AuthInfoClear clear;/* [case(TRUST_AUTH_TYPE_CLEAR)] */
+       struct AuthInfoVersion version;/* [case(TRUST_AUTH_TYPE_VERSION)] */
 }/* [nodiscriminant] */;
 
-struct trustAuthInOutBlob {
-       uint32_t version;
-       union trustAuthInOutCtr ctr;/* [switch_is(version)] */
+struct AuthenticationInformation {
+       NTTIME LastUpdateTime;
+       enum lsa_TrustAuthType AuthType;
+       union AuthInfo AuthInfo;/* [switch_is(AuthType)] */
+       DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */
 }/* [public] */;
 
+struct AuthenticationInformationArray {
+       struct AuthenticationInformation *array;/* [size_is] */
+}/* [noprint,nopush,nopull] */;
+
+struct trustAuthInOutBlob {
+       uint32_t count;
+       struct AuthenticationInformationArray *current;/* [relative] */
+       struct AuthenticationInformationArray *previous;/* [relative] */
+}/* [noprint,gensize,nopull,public,nopush] */;
+
+struct trustCurrentPasswords {
+       uint32_t count;
+       struct AuthenticationInformation **current;/* [relative] */
+}/* [gensize,public] */;
+
+struct trustDomainPasswords {
+       uint8_t confounder[512];
+       struct trustCurrentPasswords outgoing;/* [subcontext_size(outgoing_size),subcontext(0)] */
+       struct trustCurrentPasswords incoming;/* [subcontext_size(incoming_size),subcontext(0)] */
+       uint32_t outgoing_size;/* [value(ndr_size_trustCurrentPasswords(&outgoing,ndr->flags))] */
+       uint32_t incoming_size;/* [value(ndr_size_trustCurrentPasswords(&incoming,ndr->flags))] */
+}/* [public,nopull] */;
+
 struct DsCompressedChunk {
        uint32_t marker;
        DATA_BLOB data;
 }/* [public] */;
 
-struct DsCompressedBlob {
-       struct DsCompressedChunk chunks[5];
+struct ExtendedErrorAString {
+       uint16_t __size;
+       const char *string;/* [unique,charset(DOS),size_is(__size)] */
+};
+
+struct ExtendedErrorUString {
+       uint16_t __size;
+       const char *string;/* [unique,charset(UTF16),size_is(__size)] */
+};
+
+struct ExtendedErrorBlob {
+       uint16_t length;
+       uint8_t *data;/* [unique,size_is(length)] */
+};
+
+enum ExtendedErrorComputerNamePresent
+#ifndef USE_UINT_ENUMS
+ {
+       EXTENDED_ERROR_COMPUTER_NAME_PRESENT=1,
+       EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT=2
+}
+#else
+ { __donnot_use_enum_ExtendedErrorComputerNamePresent=0x7FFFFFFF}
+#define EXTENDED_ERROR_COMPUTER_NAME_PRESENT ( 1 )
+#define EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT ( 2 )
+#endif
+;
+
+union ExtendedErrorComputerNameU {
+       struct ExtendedErrorUString name;/* [case(EXTENDED_ERROR_COMPUTER_NAME_PRESENT)] */
+}/* [switch_type(ExtendedErrorComputerNamePresent)] */;
+
+struct ExtendedErrorComputerName {
+       enum ExtendedErrorComputerNamePresent present;
+       union ExtendedErrorComputerNameU n;/* [switch_is(present)] */
+};
+
+enum ExtendedErrorParamType
+#ifndef USE_UINT_ENUMS
+ {
+       EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING=1,
+       EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING=2,
+       EXTENDED_ERROR_PARAM_TYPE_UINT32=3,
+       EXTENDED_ERROR_PARAM_TYPE_UINT16=4,
+       EXTENDED_ERROR_PARAM_TYPE_UINT64=5,
+       EXTENDED_ERROR_PARAM_TYPE_NONE=6,
+       EXTENDED_ERROR_PARAM_TYPE_BLOB=7
+}
+#else
+ { __donnot_use_enum_ExtendedErrorParamType=0x7FFFFFFF}
+#define EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING ( 1 )
+#define EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING ( 2 )
+#define EXTENDED_ERROR_PARAM_TYPE_UINT32 ( 3 )
+#define EXTENDED_ERROR_PARAM_TYPE_UINT16 ( 4 )
+#define EXTENDED_ERROR_PARAM_TYPE_UINT64 ( 5 )
+#define EXTENDED_ERROR_PARAM_TYPE_NONE ( 6 )
+#define EXTENDED_ERROR_PARAM_TYPE_BLOB ( 7 )
+#endif
+;
+
+union ExtendedErrorParamU {
+       struct ExtendedErrorAString a_string;/* [case(EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING)] */
+       struct ExtendedErrorUString u_string;/* [case(EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING)] */
+       uint32_t uint32;/* [case(EXTENDED_ERROR_PARAM_TYPE_UINT32)] */
+       uint16_t uint16;/* [case(EXTENDED_ERROR_PARAM_TYPE_UINT16)] */
+       uint64_t uint64;/* [case(EXTENDED_ERROR_PARAM_TYPE_UINT64)] */
+       struct ExtendedErrorBlob blob;/* [case(EXTENDED_ERROR_PARAM_TYPE_BLOB)] */
+}/* [switch_type(ExtendedErrorParamType)] */;
+
+struct ExtendedErrorParam {
+       enum ExtendedErrorParamType type;
+       union ExtendedErrorParamU p;/* [switch_is(type)] */
+};
+
+struct ExtendedErrorInfo {
+       struct ExtendedErrorInfo *next;/* [unique] */
+       struct ExtendedErrorComputerName computer_name;
+       uint64_t pid;
+       NTTIME time;
+       uint32_t generating_component;
+       WERROR status;
+       uint16_t detection_location;
+       uint16_t flags;
+       uint16_t num_params;
+       struct ExtendedErrorParam *params;/* [size_is(num_params)] */
 }/* [public] */;
 
+struct ExtendedErrorInfoPtr {
+       struct ExtendedErrorInfo *info;/* [unique] */
+};
+
 
 struct decode_replPropertyMetaData {
        struct {
@@ -417,9 +516,17 @@ struct decode_trustAuthInOut {
 };
 
 
-struct decode_DsCompressed {
+struct decode_trustDomainPasswords {
+       struct {
+               struct trustDomainPasswords blob;
+       } in;
+
+};
+
+
+struct decode_ExtendedErrorInfo {
        struct {
-               struct DsCompressedBlob blob;
+               struct ExtendedErrorInfoPtr ptr;/* [subcontext(0xFFFFFC01)] */
        } in;
 
 };
index 049c2bf4b11aa4a8ed077ceae2cfa22583e683d5..ba01e8f22650ecedb7737c1e75b8abe2209ea0c2 100644 (file)
@@ -575,29 +575,37 @@ struct drsuapi_DsGetNCChangesCtr6 {
        WERROR drs_error;
 }/* [gensize,public] */;
 
+struct drsuapi_DsGetNCChangesCtr1TS {
+       struct drsuapi_DsGetNCChangesCtr1 ctr1;/* [subcontext(0xFFFFFC01)] */
+}/* [public] */;
+
+struct drsuapi_DsGetNCChangesCtr6TS {
+       struct drsuapi_DsGetNCChangesCtr6 ctr6;/* [subcontext(0xFFFFFC01)] */
+}/* [public] */;
+
 struct drsuapi_DsGetNCChangesMSZIPCtr1 {
        uint32_t decompressed_length;
        uint32_t compressed_length;
-       struct drsuapi_DsGetNCChangesCtr1 *ctr1;/* [unique,compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length),subcontext_size(compressed_length),subcontext(4)] */
-};
+       struct drsuapi_DsGetNCChangesCtr1TS *ts;/* [unique,compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length),subcontext_size(compressed_length),subcontext(4)] */
+}/* [nopush] */;
 
 struct drsuapi_DsGetNCChangesMSZIPCtr6 {
        uint32_t decompressed_length;
        uint32_t compressed_length;
-       struct drsuapi_DsGetNCChangesCtr6 *ctr6;/* [unique,compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length),subcontext_size(compressed_length),subcontext(4)] */
-};
+       struct drsuapi_DsGetNCChangesCtr6TS *ts;/* [unique,compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length),subcontext_size(compressed_length),subcontext(4)] */
+}/* [nopush] */;
 
 struct drsuapi_DsGetNCChangesXPRESSCtr1 {
        uint32_t decompressed_length;
        uint32_t compressed_length;
-       struct drsuapi_DsGetNCChangesCtr1 *ctr1;/* [unique,compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length),subcontext_size(compressed_length),subcontext(4)] */
-};
+       struct drsuapi_DsGetNCChangesCtr1TS *ts;/* [unique,compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length),subcontext_size(compressed_length),subcontext(4)] */
+}/* [nopush] */;
 
 struct drsuapi_DsGetNCChangesXPRESSCtr6 {
        uint32_t decompressed_length;
        uint32_t compressed_length;
-       struct drsuapi_DsGetNCChangesCtr6 *ctr6;/* [unique,compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length),subcontext_size(compressed_length),subcontext(4)] */
-};
+       struct drsuapi_DsGetNCChangesCtr6TS *ts;/* [unique,compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length),subcontext_size(compressed_length),subcontext(4)] */
+}/* [nopush] */;
 
 enum drsuapi_DsGetNCChangesCompressionType
 #ifndef USE_UINT_ENUMS
@@ -620,7 +628,7 @@ union drsuapi_DsGetNCChangesCompressedCtr {
 }/* [nodiscriminant,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
 
 struct drsuapi_DsGetNCChangesCtr2 {
-       union drsuapi_DsGetNCChangesCompressedCtr ctr;/* [switch_is(1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16))] */
+       struct drsuapi_DsGetNCChangesMSZIPCtr1 mszip1;
 };
 
 struct drsuapi_DsGetNCChangesCtr7 {
@@ -790,7 +798,7 @@ enum drsuapi_DsNameFlags
 enum drsuapi_DsNameFormat
 #ifndef USE_UINT_ENUMS
  {
-       DRSUAPI_DS_NAME_FORMAT_UKNOWN=0,
+       DRSUAPI_DS_NAME_FORMAT_UNKNOWN=0,
        DRSUAPI_DS_NAME_FORMAT_FQDN_1779=1,
        DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT=2,
        DRSUAPI_DS_NAME_FORMAT_DISPLAY=3,
@@ -804,7 +812,7 @@ enum drsuapi_DsNameFormat
 }
 #else
  { __donnot_use_enum_drsuapi_DsNameFormat=0x7FFFFFFF}
-#define DRSUAPI_DS_NAME_FORMAT_UKNOWN ( 0 )
+#define DRSUAPI_DS_NAME_FORMAT_UNKNOWN ( 0 )
 #define DRSUAPI_DS_NAME_FORMAT_FQDN_1779 ( 1 )
 #define DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT ( 2 )
 #define DRSUAPI_DS_NAME_FORMAT_DISPLAY ( 3 )
@@ -889,7 +897,7 @@ union drsuapi_DsWriteAccountSpnResult {
 struct drsuapi_DsRemoveDSServerRequest1 {
        const char *server_dn;/* [unique,charset(UTF16)] */
        const char *domain_dn;/* [unique,charset(UTF16)] */
-       uint32_t unknown;
+       uint32_t commit;
 };
 
 union drsuapi_DsRemoveDSServerRequest {
@@ -897,7 +905,7 @@ union drsuapi_DsRemoveDSServerRequest {
 }/* [switch_type(int32)] */;
 
 struct drsuapi_DsRemoveDSServerResult1 {
-       WERROR status;
+       uint32_t last_dc_in_domain;
 };
 
 union drsuapi_DsRemoveDSServerResult {
index 7689ee54a658240713421d758a2aeeaff759bf2a..4b75261a02e7ec93993edc524b4dfc9855c353f6 100644 (file)
@@ -227,7 +227,9 @@ struct epm_twr_t {
 struct epm_entry_t {
        struct GUID object;
        struct epm_twr_t *tower;/* [ptr] */
-       const char * annotation;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_LEN4)] */
+       uint32_t __annotation_offset;/* [value(0)] */
+       uint32_t __annotation_length;/* [value(strlen(annotation)+1)] */
+       const char *annotation;/* [charset(DOS)] */
 };
 
 struct rpc_if_id_t {
index 3f2384641bfb797330ce18d224395879a1bc0872..014e2fe6898d7a87e71b9e07e08d705b8e58c80a 100644 (file)
@@ -6,22 +6,11 @@
 #ifndef _HEADER_initshutdown
 #define _HEADER_initshutdown
 
-struct initshutdown_String_sub {
-       uint32_t name_size;/* [value(strlen_m_term(name))] */
-       const char * name;/* [flag(LIBNDR_FLAG_STR_LEN4|LIBNDR_FLAG_STR_NOTERM)] */
-};
-
-struct initshutdown_String {
-       uint16_t name_len;/* [value(strlen_m(name->name)*2)] */
-       uint16_t name_size;/* [value(strlen_m_term(name->name)*2)] */
-       struct initshutdown_String_sub *name;/* [unique] */
-}/* [public] */;
-
 
 struct initshutdown_Init {
        struct {
                uint16_t *hostname;/* [unique] */
-               struct initshutdown_String *message;/* [unique] */
+               struct lsa_StringLarge *message;/* [unique] */
                uint32_t timeout;
                uint8_t force_apps;
                uint8_t do_reboot;
@@ -49,7 +38,7 @@ struct initshutdown_Abort {
 struct initshutdown_InitEx {
        struct {
                uint16_t *hostname;/* [unique] */
-               struct initshutdown_String *message;/* [unique] */
+               struct lsa_StringLarge *message;/* [unique] */
                uint32_t timeout;
                uint8_t force_apps;
                uint8_t do_reboot;
index b37d7a1c417966a0a1abc36bc5f710bb81d190bb..bcf6dd665ec4eb295a7ed9966324c95e5cefdf96 100644 (file)
@@ -12,6 +12,9 @@
 #define MAX_REF_DOMAINS        ( LSA_REF_DOMAIN_LIST_MULTIPLIER )
 #define MAX_LOOKUP_SIDS        ( 0x5000 )
 #define LSA_ENUM_TRUST_DOMAIN_EX_MULTIPLIER    ( 82 )
+#define LSA_CLIENT_REVISION_NO_DNS     ( 0x00000001 )
+#define LSA_CLIENT_REVISION_DNS        ( 0x00000002 )
+#define LSA_LOOKUP_OPTIONS_NO_ISOLATED ( 0x80000000 )
 struct lsa_String {
        uint16_t length;/* [value(2*strlen_m(string))] */
        uint16_t size;/* [value(2*strlen_m(string))] */
@@ -219,7 +222,8 @@ enum lsa_PolicyInfo
        LSA_POLICY_INFO_DB=9,
        LSA_POLICY_INFO_AUDIT_FULL_SET=10,
        LSA_POLICY_INFO_AUDIT_FULL_QUERY=11,
-       LSA_POLICY_INFO_DNS=12
+       LSA_POLICY_INFO_DNS=12,
+       LSA_POLICY_INFO_DNS_INT=13
 }
 #else
  { __donnot_use_enum_lsa_PolicyInfo=0x7FFFFFFF}
@@ -235,6 +239,7 @@ enum lsa_PolicyInfo
 #define LSA_POLICY_INFO_AUDIT_FULL_SET ( 10 )
 #define LSA_POLICY_INFO_AUDIT_FULL_QUERY ( 11 )
 #define LSA_POLICY_INFO_DNS ( 12 )
+#define LSA_POLICY_INFO_DNS_INT ( 13 )
 #endif
 ;
 
@@ -321,7 +326,8 @@ enum lsa_LookupNamesLevel
        LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY=3,
        LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY=4,
        LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY=5,
-       LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2=6
+       LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2=6,
+       LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC=7
 }
 #else
  { __donnot_use_enum_lsa_LookupNamesLevel=0x7FFFFFFF}
@@ -331,6 +337,7 @@ enum lsa_LookupNamesLevel
 #define LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY ( 4 )
 #define LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY ( 5 )
 #define LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2 ( 6 )
+#define LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC ( 7 )
 #endif
 ;
 
@@ -371,35 +378,75 @@ enum lsa_TrustDomInfoEnum
 #ifndef USE_UINT_ENUMS
  {
        LSA_TRUSTED_DOMAIN_INFO_NAME=1,
-       LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS_INFO=2,
+       LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS=2,
        LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET=3,
        LSA_TRUSTED_DOMAIN_INFO_PASSWORD=4,
        LSA_TRUSTED_DOMAIN_INFO_BASIC=5,
        LSA_TRUSTED_DOMAIN_INFO_INFO_EX=6,
        LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO=7,
        LSA_TRUSTED_DOMAIN_INFO_FULL_INFO=8,
-       LSA_TRUSTED_DOMAIN_INFO_11=11,
-       LSA_TRUSTED_DOMAIN_INFO_INFO_ALL=12
+       LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL=9,
+       LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL=10,
+       LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL=11,
+       LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL=12,
+       LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES=13
 }
 #else
  { __donnot_use_enum_lsa_TrustDomInfoEnum=0x7FFFFFFF}
 #define LSA_TRUSTED_DOMAIN_INFO_NAME ( 1 )
-#define LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS_INFO ( 2 )
+#define LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS ( 2 )
 #define LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET ( 3 )
 #define LSA_TRUSTED_DOMAIN_INFO_PASSWORD ( 4 )
 #define LSA_TRUSTED_DOMAIN_INFO_BASIC ( 5 )
 #define LSA_TRUSTED_DOMAIN_INFO_INFO_EX ( 6 )
 #define LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO ( 7 )
 #define LSA_TRUSTED_DOMAIN_INFO_FULL_INFO ( 8 )
-#define LSA_TRUSTED_DOMAIN_INFO_11 ( 11 )
-#define LSA_TRUSTED_DOMAIN_INFO_INFO_ALL ( 12 )
+#define LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL ( 9 )
+#define LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL ( 10 )
+#define LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL ( 11 )
+#define LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL ( 12 )
+#define LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES ( 13 )
 #endif
 ;
 
+/* bitmap lsa_TrustDirection */
+#define LSA_TRUST_DIRECTION_INBOUND ( 0x00000001 )
+#define LSA_TRUST_DIRECTION_OUTBOUND ( 0x00000002 )
+
+enum lsa_TrustType
+#ifndef USE_UINT_ENUMS
+ {
+       LSA_TRUST_TYPE_DOWNLEVEL=0x00000001,
+       LSA_TRUST_TYPE_UPLEVEL=0x00000002,
+       LSA_TRUST_TYPE_MIT=0x00000003
+}
+#else
+ { __donnot_use_enum_lsa_TrustType=0x7FFFFFFF}
+#define LSA_TRUST_TYPE_DOWNLEVEL ( 0x00000001 )
+#define LSA_TRUST_TYPE_UPLEVEL ( 0x00000002 )
+#define LSA_TRUST_TYPE_MIT ( 0x00000003 )
+#endif
+;
+
+/* bitmap lsa_TrustAttributes */
+#define LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE ( 0x00000001 )
+#define LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY ( 0x00000002 )
+#define LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN ( 0x00000004 )
+#define LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE ( 0x00000008 )
+#define LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION ( 0x00000010 )
+#define LSA_TRUST_ATTRIBUTE_WITHIN_FOREST ( 0x00000020 )
+#define LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL ( 0x00000040 )
+#define LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION ( 0x00000080 )
+
 struct lsa_TrustDomainInfoName {
        struct lsa_StringLarge netbios_name;
 };
 
+struct lsa_TrustDomainInfoControllers {
+       uint32_t entries;
+       struct lsa_StringLarge *netbios_names;/* [unique,size_is(entries)] */
+};
+
 struct lsa_TrustDomainInfoPosixOffset {
        uint32_t posix_offset;
 };
@@ -419,13 +466,30 @@ struct lsa_TrustDomainInfoInfoEx {
        struct lsa_StringLarge netbios_name;
        struct dom_sid2 *sid;/* [unique] */
        uint32_t trust_direction;
-       uint32_t trust_type;
+       enum lsa_TrustType trust_type;
        uint32_t trust_attributes;
 };
 
+enum lsa_TrustAuthType
+#ifndef USE_UINT_ENUMS
+ {
+       TRUST_AUTH_TYPE_NONE=0,
+       TRUST_AUTH_TYPE_NT4OWF=1,
+       TRUST_AUTH_TYPE_CLEAR=2,
+       TRUST_AUTH_TYPE_VERSION=3
+}
+#else
+ { __donnot_use_enum_lsa_TrustAuthType=0x7FFFFFFF}
+#define TRUST_AUTH_TYPE_NONE ( 0 )
+#define TRUST_AUTH_TYPE_NT4OWF ( 1 )
+#define TRUST_AUTH_TYPE_CLEAR ( 2 )
+#define TRUST_AUTH_TYPE_VERSION ( 3 )
+#endif
+;
+
 struct lsa_TrustDomainInfoBuffer {
        NTTIME last_update_time;
-       uint32_t secret_type;
+       enum lsa_TrustAuthType AuthType;
        struct lsa_DATA_BUF2 data;
 };
 
@@ -444,28 +508,46 @@ struct lsa_TrustDomainInfoFullInfo {
        struct lsa_TrustDomainInfoAuthInfo auth_info;
 };
 
-struct lsa_TrustDomainInfo11 {
+struct lsa_TrustDomainInfoAuthInfoInternal {
+       struct lsa_DATA_BUF2 auth_blob;
+};
+
+struct lsa_TrustDomainInfoFullInfoInternal {
        struct lsa_TrustDomainInfoInfoEx info_ex;
-       struct lsa_DATA_BUF2 data1;
+       struct lsa_TrustDomainInfoPosixOffset posix_offset;
+       struct lsa_TrustDomainInfoAuthInfoInternal auth_info;
 };
 
-struct lsa_TrustDomainInfoInfoAll {
+struct lsa_TrustDomainInfoInfoEx2Internal {
        struct lsa_TrustDomainInfoInfoEx info_ex;
-       struct lsa_DATA_BUF2 data1;
+       uint32_t forest_trust_length;
+       uint8_t *forest_trust_data;/* [unique,size_is(forest_trust_length)] */
+};
+
+struct lsa_TrustDomainInfoFullInfo2Internal {
+       struct lsa_TrustDomainInfoInfoEx2Internal info;
        struct lsa_TrustDomainInfoPosixOffset posix_offset;
        struct lsa_TrustDomainInfoAuthInfo auth_info;
 };
 
+struct lsa_TrustDomainInfoSupportedEncTypes {
+       uint32_t enc_types;
+};
+
 union lsa_TrustedDomainInfo {
        struct lsa_TrustDomainInfoName name;/* [case(LSA_TRUSTED_DOMAIN_INFO_NAME)] */
+       struct lsa_TrustDomainInfoControllers controllers;/* [case(LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS)] */
        struct lsa_TrustDomainInfoPosixOffset posix_offset;/* [case(LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET)] */
        struct lsa_TrustDomainInfoPassword password;/* [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD)] */
        struct lsa_TrustDomainInfoBasic info_basic;/* [case(LSA_TRUSTED_DOMAIN_INFO_BASIC)] */
        struct lsa_TrustDomainInfoInfoEx info_ex;/* [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX)] */
        struct lsa_TrustDomainInfoAuthInfo auth_info;/* [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO)] */
        struct lsa_TrustDomainInfoFullInfo full_info;/* [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO)] */
-       struct lsa_TrustDomainInfo11 info11;/* [case(LSA_TRUSTED_DOMAIN_INFO_11)] */
-       struct lsa_TrustDomainInfoInfoAll info_all;/* [case(LSA_TRUSTED_DOMAIN_INFO_INFO_ALL)] */
+       struct lsa_TrustDomainInfoAuthInfoInternal auth_info_internal;/* [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL)] */
+       struct lsa_TrustDomainInfoFullInfoInternal full_info_internal;/* [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL)] */
+       struct lsa_TrustDomainInfoInfoEx2Internal info_ex2_internal;/* [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL)] */
+       struct lsa_TrustDomainInfoFullInfo2Internal full_info2_internal;/* [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL)] */
+       struct lsa_TrustDomainInfoSupportedEncTypes enc_types;/* [case(LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES)] */
 }/* [switch_type(lsa_TrustDomInfoEnum)] */;
 
 struct lsa_DATA_BUF_PTR {
@@ -546,7 +628,7 @@ struct lsa_TranslatedSid3 {
        enum lsa_SidType sid_type;
        struct dom_sid2 *sid;/* [unique] */
        uint32_t sid_index;
-       uint32_t unknown;
+       uint32_t flags;
 };
 
 struct lsa_TransSidArray3 {
@@ -973,6 +1055,12 @@ struct lsa_QueryTrustedDomainInfo {
 
 
 struct lsa_SetInformationTrustedDomain {
+       struct {
+               struct policy_handle *trustdom_handle;/* [ref] */
+               enum lsa_TrustDomInfoEnum level;
+               union lsa_TrustedDomainInfo *info;/* [ref,switch_is(level)] */
+       } in;
+
        struct {
                NTSTATUS result;
        } out;
@@ -1160,6 +1248,13 @@ struct lsa_QueryTrustedDomainInfoBySid {
 
 
 struct lsa_SetTrustedDomainInfo {
+       struct {
+               struct policy_handle *handle;/* [ref] */
+               struct dom_sid2 *dom_sid;/* [ref] */
+               enum lsa_TrustDomInfoEnum level;
+               union lsa_TrustedDomainInfo *info;/* [ref,switch_is(level)] */
+       } in;
+
        struct {
                NTSTATUS result;
        } out;
@@ -1303,6 +1398,14 @@ struct lsa_EnumTrustedDomainsEx {
 
 struct lsa_CreateTrustedDomainEx {
        struct {
+               struct policy_handle *policy_handle;/* [ref] */
+               struct lsa_TrustDomainInfoInfoEx *info;/* [ref] */
+               struct lsa_TrustDomainInfoAuthInfoInternal *auth_info;/* [ref] */
+               uint32_t access_mask;
+       } in;
+
+       struct {
+               struct policy_handle *trustdom_handle;/* [ref] */
                NTSTATUS result;
        } out;
 
@@ -1400,8 +1503,8 @@ struct lsa_LookupNames2 {
                uint32_t num_names;/* [range(0,1000)] */
                struct lsa_String *names;/* [size_is(num_names)] */
                enum lsa_LookupNamesLevel level;
-               uint32_t unknown1;
-               uint32_t unknown2;
+               uint32_t lookup_options;
+               uint32_t client_revision;
                struct lsa_TransSidArray2 *sids;/* [ref] */
                uint32_t *count;/* [ref] */
        } in;
@@ -1418,6 +1521,14 @@ struct lsa_LookupNames2 {
 
 struct lsa_CreateTrustedDomainEx2 {
        struct {
+               struct policy_handle *policy_handle;/* [ref] */
+               struct lsa_TrustDomainInfoInfoEx *info;/* [ref] */
+               struct lsa_TrustDomainInfoAuthInfoInternal *auth_info;/* [ref] */
+               uint32_t access_mask;
+       } in;
+
+       struct {
+               struct policy_handle *trustdom_handle;/* [ref] */
                NTSTATUS result;
        } out;
 
@@ -1494,8 +1605,8 @@ struct lsa_LookupNames3 {
                uint32_t num_names;/* [range(0,1000)] */
                struct lsa_String *names;/* [size_is(num_names)] */
                enum lsa_LookupNamesLevel level;
-               uint32_t unknown1;
-               uint32_t unknown2;
+               uint32_t lookup_options;
+               uint32_t client_revision;
                struct lsa_TransSidArray3 *sids;/* [ref] */
                uint32_t *count;/* [ref] */
        } in;
@@ -1598,8 +1709,8 @@ struct lsa_LookupNames4 {
                uint32_t num_names;/* [range(0,1000)] */
                struct lsa_String *names;/* [size_is(num_names)] */
                enum lsa_LookupNamesLevel level;
-               uint32_t unknown1;
-               uint32_t unknown2;
+               uint32_t lookup_options;
+               uint32_t client_revision;
                struct lsa_TransSidArray3 *sids;/* [ref] */
                uint32_t *count;/* [ref] */
        } in;
index 4fa7415db71cd02a9e28522ce0de8e2b3f861f59..b3740faf34e26671cae2b2a07dbb3c0f6a46344f 100644 (file)
@@ -26,13 +26,17 @@ struct policy_handle {
 enum netr_SchannelType
 #ifndef USE_UINT_ENUMS
  {
+       SEC_CHAN_NULL=0,
        SEC_CHAN_WKSTA=2,
+       SEC_CHAN_DNS_DOMAIN=3,
        SEC_CHAN_DOMAIN=4,
        SEC_CHAN_BDC=6
 }
 #else
  { __donnot_use_enum_netr_SchannelType=0x7FFFFFFF}
+#define SEC_CHAN_NULL ( 0 )
 #define SEC_CHAN_WKSTA ( 2 )
+#define SEC_CHAN_DNS_DOMAIN ( 3 )
 #define SEC_CHAN_DOMAIN ( 4 )
 #define SEC_CHAN_BDC ( 6 )
 #endif
index 41a448cbe3b197d82cf4af3b306b52855cf4e2b8..dd8d77ea15a4b65cded03f1c0a66e7f43c4cde34 100644 (file)
@@ -5,6 +5,8 @@
 
 #include "librpc/gen_ndr/ndr_drsuapi.h"
 #include "librpc/gen_ndr/ndr_misc.h"
+#include "librpc/gen_ndr/ndr_samr.h"
+#include "librpc/gen_ndr/ndr_lsa.h"
 static enum ndr_err_code ndr_push_replPropertyMetaData1(struct ndr_push *ndr, int ndr_flags, const struct replPropertyMetaData1 *r)
 {
        if (ndr_flags & NDR_SCALARS) {
@@ -2165,10 +2167,10 @@ _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryCLEARTEXTBlob(struct ndr_push
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
                {
-                       uint32_t _flags_save_string = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
-                       NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->cleartext));
-                       ndr->flags = _flags_save_string;
+                       uint32_t _flags_save_DATA_BLOB = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
+                       NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->cleartext));
+                       ndr->flags = _flags_save_DATA_BLOB;
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
@@ -2181,10 +2183,10 @@ _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryCLEARTEXTBlob(struct ndr_pull
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
                {
-                       uint32_t _flags_save_string = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
-                       NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->cleartext));
-                       ndr->flags = _flags_save_string;
+                       uint32_t _flags_save_DATA_BLOB = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
+                       NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->cleartext));
+                       ndr->flags = _flags_save_DATA_BLOB;
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
@@ -2196,7 +2198,7 @@ _PUBLIC_ void ndr_print_package_PrimaryCLEARTEXTBlob(struct ndr_print *ndr, cons
 {
        ndr_print_struct(ndr, name, "package_PrimaryCLEARTEXTBlob");
        ndr->depth++;
-       ndr_print_string(ndr, "cleartext", r->cleartext);
+       ndr_print_DATA_BLOB(ndr, "cleartext", r->cleartext);
        ndr->depth--;
 }
 
@@ -2311,13 +2313,269 @@ _PUBLIC_ void ndr_print_package_PrimaryWDigestBlob(struct ndr_print *ndr, const
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_trustAuthInOutSecret1(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutSecret1 *r)
+static enum ndr_err_code ndr_push_AuthInfoNone(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoNone *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_AuthInfoNone(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoNone *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_AuthInfoNone(struct ndr_print *ndr, const char *name, const struct AuthInfoNone *r)
+{
+       ndr_print_struct(ndr, name, "AuthInfoNone");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->size);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_AuthInfoNT4Owf(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoNT4Owf *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 16));
+               NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->password));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_samr_Password(ndr, NDR_BUFFERS, &r->password));
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_AuthInfoNT4Owf(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoNT4Owf *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
+               NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->password));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_BUFFERS, &r->password));
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_AuthInfoNT4Owf(struct ndr_print *ndr, const char *name, const struct AuthInfoNT4Owf *r)
+{
+       ndr_print_struct(ndr, name, "AuthInfoNT4Owf");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?16:r->size);
+       ndr_print_samr_Password(ndr, "password", &r->password);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_AuthInfoClear(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoClear *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
+               NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->password, r->size));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_AuthInfoClear(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoClear *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
+               NDR_PULL_ALLOC_N(ndr, r->password, r->size);
+               NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->password, r->size));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_AuthInfoClear(struct ndr_print *ndr, const char *name, const struct AuthInfoClear *r)
+{
+       ndr_print_struct(ndr, name, "AuthInfoClear");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "size", r->size);
+       ndr_print_array_uint8(ndr, "password", r->password, r->size);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_AuthInfoVersion(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoVersion *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_AuthInfoVersion(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoVersion *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_AuthInfoVersion(struct ndr_print *ndr, const char *name, const struct AuthInfoVersion *r)
+{
+       ndr_print_struct(ndr, name, "AuthInfoVersion");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?4:r->size);
+       ndr_print_uint32(ndr, "version", r->version);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_AuthInfo(struct ndr_push *ndr, int ndr_flags, const union AuthInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               int level = ndr_push_get_switch_value(ndr, r);
+               switch (level) {
+                       case TRUST_AUTH_TYPE_NONE: {
+                               NDR_CHECK(ndr_push_AuthInfoNone(ndr, NDR_SCALARS, &r->none));
+                       break; }
+
+                       case TRUST_AUTH_TYPE_NT4OWF: {
+                               NDR_CHECK(ndr_push_AuthInfoNT4Owf(ndr, NDR_SCALARS, &r->nt4owf));
+                       break; }
+
+                       case TRUST_AUTH_TYPE_CLEAR: {
+                               NDR_CHECK(ndr_push_AuthInfoClear(ndr, NDR_SCALARS, &r->clear));
+                       break; }
+
+                       case TRUST_AUTH_TYPE_VERSION: {
+                               NDR_CHECK(ndr_push_AuthInfoVersion(ndr, NDR_SCALARS, &r->version));
+                       break; }
+
+                       default:
+                               return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               int level = ndr_push_get_switch_value(ndr, r);
+               switch (level) {
+                       case TRUST_AUTH_TYPE_NONE:
+                       break;
+
+                       case TRUST_AUTH_TYPE_NT4OWF:
+                               NDR_CHECK(ndr_push_AuthInfoNT4Owf(ndr, NDR_BUFFERS, &r->nt4owf));
+                       break;
+
+                       case TRUST_AUTH_TYPE_CLEAR:
+                       break;
+
+                       case TRUST_AUTH_TYPE_VERSION:
+                       break;
+
+                       default:
+                               return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_AuthInfo(struct ndr_pull *ndr, int ndr_flags, union AuthInfo *r)
+{
+       int level;
+       level = ndr_pull_get_switch_value(ndr, r);
+       if (ndr_flags & NDR_SCALARS) {
+               switch (level) {
+                       case TRUST_AUTH_TYPE_NONE: {
+                               NDR_CHECK(ndr_pull_AuthInfoNone(ndr, NDR_SCALARS, &r->none));
+                       break; }
+
+                       case TRUST_AUTH_TYPE_NT4OWF: {
+                               NDR_CHECK(ndr_pull_AuthInfoNT4Owf(ndr, NDR_SCALARS, &r->nt4owf));
+                       break; }
+
+                       case TRUST_AUTH_TYPE_CLEAR: {
+                               NDR_CHECK(ndr_pull_AuthInfoClear(ndr, NDR_SCALARS, &r->clear));
+                       break; }
+
+                       case TRUST_AUTH_TYPE_VERSION: {
+                               NDR_CHECK(ndr_pull_AuthInfoVersion(ndr, NDR_SCALARS, &r->version));
+                       break; }
+
+                       default:
+                               return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               switch (level) {
+                       case TRUST_AUTH_TYPE_NONE:
+                       break;
+
+                       case TRUST_AUTH_TYPE_NT4OWF:
+                               NDR_CHECK(ndr_pull_AuthInfoNT4Owf(ndr, NDR_BUFFERS, &r->nt4owf));
+                       break;
+
+                       case TRUST_AUTH_TYPE_CLEAR:
+                       break;
+
+                       case TRUST_AUTH_TYPE_VERSION:
+                       break;
+
+                       default:
+                               return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_AuthInfo(struct ndr_print *ndr, const char *name, const union AuthInfo *r)
+{
+       int level;
+       level = ndr_print_get_switch_value(ndr, r);
+       ndr_print_union(ndr, name, level, "AuthInfo");
+       switch (level) {
+               case TRUST_AUTH_TYPE_NONE:
+                       ndr_print_AuthInfoNone(ndr, "none", &r->none);
+               break;
+
+               case TRUST_AUTH_TYPE_NT4OWF:
+                       ndr_print_AuthInfoNT4Owf(ndr, "nt4owf", &r->nt4owf);
+               break;
+
+               case TRUST_AUTH_TYPE_CLEAR:
+                       ndr_print_AuthInfoClear(ndr, "clear", &r->clear);
+               break;
+
+               case TRUST_AUTH_TYPE_VERSION:
+                       ndr_print_AuthInfoVersion(ndr, "version", &r->version);
+               break;
+
+               default:
+                       ndr_print_bad_level(ndr, name, level);
+       }
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_AuthenticationInformation(struct ndr_push *ndr, int ndr_flags, const struct AuthenticationInformation *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time1));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
-               NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->value));
+               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->LastUpdateTime));
+               NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr, NDR_SCALARS, r->AuthType));
+               NDR_CHECK(ndr_push_set_switch_value(ndr, &r->AuthInfo, r->AuthType));
+               NDR_CHECK(ndr_push_AuthInfo(ndr, NDR_SCALARS, &r->AuthInfo));
                {
                        uint32_t _flags_save_DATA_BLOB = ndr->flags;
                        ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
@@ -2326,17 +2584,19 @@ static enum ndr_err_code ndr_push_trustAuthInOutSecret1(struct ndr_push *ndr, in
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_AuthInfo(ndr, NDR_BUFFERS, &r->AuthInfo));
        }
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_trustAuthInOutSecret1(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutSecret1 *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_AuthenticationInformation(struct ndr_pull *ndr, int ndr_flags, struct AuthenticationInformation *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time1));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
-               NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->value));
+               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->LastUpdateTime));
+               NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr, NDR_SCALARS, &r->AuthType));
+               NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->AuthInfo, r->AuthType));
+               NDR_CHECK(ndr_pull_AuthInfo(ndr, NDR_SCALARS, &r->AuthInfo));
                {
                        uint32_t _flags_save_DATA_BLOB = ndr->flags;
                        ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
@@ -2345,325 +2605,583 @@ static enum ndr_err_code ndr_pull_trustAuthInOutSecret1(struct ndr_pull *ndr, in
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_AuthInfo(ndr, NDR_BUFFERS, &r->AuthInfo));
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_trustAuthInOutSecret1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret1 *r)
+_PUBLIC_ void ndr_print_AuthenticationInformation(struct ndr_print *ndr, const char *name, const struct AuthenticationInformation *r)
 {
-       ndr_print_struct(ndr, name, "trustAuthInOutSecret1");
+       ndr_print_struct(ndr, name, "AuthenticationInformation");
        ndr->depth++;
-       ndr_print_NTTIME(ndr, "time1", r->time1);
-       ndr_print_uint32(ndr, "unknown1", r->unknown1);
-       ndr_print_DATA_BLOB(ndr, "value", r->value);
+       ndr_print_NTTIME(ndr, "LastUpdateTime", r->LastUpdateTime);
+       ndr_print_lsa_TrustAuthType(ndr, "AuthType", r->AuthType);
+       ndr_print_set_switch_value(ndr, &r->AuthInfo, r->AuthType);
+       ndr_print_AuthInfo(ndr, "AuthInfo", &r->AuthInfo);
        ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_trustAuthInOutCtr1(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutCtr1 *r)
+_PUBLIC_ size_t ndr_size_trustAuthInOutBlob(const struct trustAuthInOutBlob *r, int flags)
 {
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustAuthInOutBlob);
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_trustCurrentPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustCurrentPasswords *r)
+{
+       uint32_t cntr_current_0;
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value1));
-               NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value2));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+               for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->current[cntr_current_0]));
+               }
        }
        if (ndr_flags & NDR_BUFFERS) {
-               if (r->value1) {
-                       NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value1));
-                       NDR_CHECK(ndr_push_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value1));
+               for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
+                       if (r->current[cntr_current_0]) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->current[cntr_current_0]));
+                               NDR_CHECK(ndr_push_AuthenticationInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->current[cntr_current_0]));
+                       }
                }
-               if (r->value2) {
-                       NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value2));
-                       NDR_CHECK(ndr_push_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value2));
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_trustCurrentPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustCurrentPasswords *r)
+{
+       uint32_t _ptr_current;
+       uint32_t cntr_current_0;
+       TALLOC_CTX *_mem_save_current_0;
+       TALLOC_CTX *_mem_save_current_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+               NDR_PULL_ALLOC_N(ndr, r->current, r->count);
+               _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->current, 0);
+               for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_current));
+                       if (_ptr_current) {
+                               NDR_PULL_ALLOC(ndr, r->current[cntr_current_0]);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->current[cntr_current_0], _ptr_current));
+                       } else {
+                               r->current[cntr_current_0] = NULL;
+                       }
+               }
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0);
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->current, 0);
+               for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
+                       if (r->current[cntr_current_0]) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->current[cntr_current_0]));
+                               _mem_save_current_1 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->current[cntr_current_0], 0);
+                               NDR_CHECK(ndr_pull_AuthenticationInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->current[cntr_current_0]));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_1, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
                }
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0);
        }
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_trustAuthInOutCtr1(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutCtr1 *r)
+_PUBLIC_ void ndr_print_trustCurrentPasswords(struct ndr_print *ndr, const char *name, const struct trustCurrentPasswords *r)
+{
+       uint32_t cntr_current_0;
+       ndr_print_struct(ndr, name, "trustCurrentPasswords");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "count", r->count);
+       ndr->print(ndr, "%s: ARRAY(%d)", "current", (int)r->count);
+       ndr->depth++;
+       for (cntr_current_0=0;cntr_current_0<r->count;cntr_current_0++) {
+               char *idx_0=NULL;
+               if (asprintf(&idx_0, "[%d]", cntr_current_0) != -1) {
+                       ndr_print_ptr(ndr, "current", r->current[cntr_current_0]);
+                       ndr->depth++;
+                       if (r->current[cntr_current_0]) {
+                               ndr_print_AuthenticationInformation(ndr, "current", r->current[cntr_current_0]);
+                       }
+                       ndr->depth--;
+                       free(idx_0);
+               }
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+_PUBLIC_ size_t ndr_size_trustCurrentPasswords(const struct trustCurrentPasswords *r, int flags)
+{
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustCurrentPasswords);
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_trustDomainPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustDomainPasswords *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->confounder, 512));
+               {
+                       struct ndr_push *_ndr_outgoing;
+                       NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->flags)));
+                       NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_outgoing, NDR_SCALARS|NDR_BUFFERS, &r->outgoing));
+                       NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->flags)));
+               }
+               {
+                       struct ndr_push *_ndr_incoming;
+                       NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->flags)));
+                       NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_incoming, NDR_SCALARS|NDR_BUFFERS, &r->incoming));
+                       NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->flags)));
+               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->flags)));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->incoming, ndr->flags)));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trustDomainPasswords(struct ndr_print *ndr, const char *name, const struct trustDomainPasswords *r)
+{
+       ndr_print_struct(ndr, name, "trustDomainPasswords");
+       ndr->depth++;
+       ndr_print_array_uint8(ndr, "confounder", r->confounder, 512);
+       ndr_print_trustCurrentPasswords(ndr, "outgoing", &r->outgoing);
+       ndr_print_trustCurrentPasswords(ndr, "incoming", &r->incoming);
+       ndr_print_uint32(ndr, "outgoing_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_trustCurrentPasswords(&r->outgoing, ndr->flags):r->outgoing_size);
+       ndr_print_uint32(ndr, "incoming_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_trustCurrentPasswords(&r->incoming, ndr->flags):r->incoming_size);
+       ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedChunk *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->marker));
+               NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedChunk *r)
 {
-       uint32_t _ptr_value1;
-       TALLOC_CTX *_mem_save_value1_0;
-       uint32_t _ptr_value2;
-       TALLOC_CTX *_mem_save_value2_0;
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value1));
-               if (_ptr_value1) {
-                       NDR_PULL_ALLOC(ndr, r->value1);
-                       NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value1, _ptr_value1));
-               } else {
-                       r->value1 = NULL;
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->marker));
+               NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r)
+{
+       ndr_print_struct(ndr, name, "DsCompressedChunk");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "marker", r->marker);
+       ndr_print_DATA_BLOB(ndr, "data", r->data);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_ExtendedErrorAString(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorAString *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->string) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->__size));
+                       NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->__size, sizeof(uint8_t), CH_DOS));
                }
-               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value2));
-               if (_ptr_value2) {
-                       NDR_PULL_ALLOC(ndr, r->value2);
-                       NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value2, _ptr_value2));
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_ExtendedErrorAString(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorAString *r)
+{
+       uint32_t _ptr_string;
+       TALLOC_CTX *_mem_save_string_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__size));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
+               if (_ptr_string) {
+                       NDR_PULL_ALLOC(ndr, r->string);
                } else {
-                       r->value2 = NULL;
+                       r->string = NULL;
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
-               if (r->value1) {
-                       uint32_t _relative_save_offset;
-                       _relative_save_offset = ndr->offset;
-                       NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value1));
-                       _mem_save_value1_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->value1, 0);
-                       NDR_CHECK(ndr_pull_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value1));
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value1_0, 0);
-                       ndr->offset = _relative_save_offset;
+               if (r->string) {
+                       _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
+                       NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_size(ndr, &r->string), sizeof(uint8_t), CH_DOS));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
                }
-               if (r->value2) {
-                       uint32_t _relative_save_offset;
-                       _relative_save_offset = ndr->offset;
-                       NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value2));
-                       _mem_save_value2_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->value2, 0);
-                       NDR_CHECK(ndr_pull_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value2));
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value2_0, 0);
-                       ndr->offset = _relative_save_offset;
+               if (r->string) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->__size));
                }
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_trustAuthInOutCtr1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutCtr1 *r)
+_PUBLIC_ void ndr_print_ExtendedErrorAString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorAString *r)
 {
-       ndr_print_struct(ndr, name, "trustAuthInOutCtr1");
+       ndr_print_struct(ndr, name, "ExtendedErrorAString");
        ndr->depth++;
-       ndr_print_ptr(ndr, "value1", r->value1);
+       ndr_print_uint16(ndr, "__size", r->__size);
+       ndr_print_ptr(ndr, "string", r->string);
        ndr->depth++;
-       if (r->value1) {
-               ndr_print_trustAuthInOutSecret1(ndr, "value1", r->value1);
+       if (r->string) {
+               ndr_print_string(ndr, "string", r->string);
        }
        ndr->depth--;
-       ndr_print_ptr(ndr, "value2", r->value2);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_ExtendedErrorUString(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorUString *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->string) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->__size));
+                       NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->__size, sizeof(uint16_t), CH_UTF16));
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_ExtendedErrorUString(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorUString *r)
+{
+       uint32_t _ptr_string;
+       TALLOC_CTX *_mem_save_string_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__size));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
+               if (_ptr_string) {
+                       NDR_PULL_ALLOC(ndr, r->string);
+               } else {
+                       r->string = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->string) {
+                       _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
+                       NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_size(ndr, &r->string), sizeof(uint16_t), CH_UTF16));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
+               }
+               if (r->string) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->__size));
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_ExtendedErrorUString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorUString *r)
+{
+       ndr_print_struct(ndr, name, "ExtendedErrorUString");
+       ndr->depth++;
+       ndr_print_uint16(ndr, "__size", r->__size);
+       ndr_print_ptr(ndr, "string", r->string);
        ndr->depth++;
-       if (r->value2) {
-               ndr_print_trustAuthInOutSecret1(ndr, "value2", r->value2);
+       if (r->string) {
+               ndr_print_string(ndr, "string", r->string);
        }
        ndr->depth--;
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_trustAuthInOutSecret2V1(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutSecret2V1 *r)
+static enum ndr_err_code ndr_push_ExtendedErrorBlob(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorBlob *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time1));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
-               NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->value));
-               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time2));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4));
-               {
-                       uint32_t _flags_save_DATA_BLOB = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
-                       NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
-                       ndr->flags = _flags_save_DATA_BLOB;
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->data) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
+                       NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_ExtendedErrorBlob(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorBlob *r)
+{
+       uint32_t _ptr_data;
+       TALLOC_CTX *_mem_save_data_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
+               if (_ptr_data) {
+                       NDR_PULL_ALLOC(ndr, r->data);
+               } else {
+                       r->data = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->data) {
+                       _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
+                       NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
+                       NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data)));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
+               }
+               if (r->data) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length));
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_ExtendedErrorBlob(struct ndr_print *ndr, const char *name, const struct ExtendedErrorBlob *r)
+{
+       ndr_print_struct(ndr, name, "ExtendedErrorBlob");
+       ndr->depth++;
+       ndr_print_uint16(ndr, "length", r->length);
+       ndr_print_ptr(ndr, "data", r->data);
+       ndr->depth++;
+       if (r->data) {
+               ndr_print_array_uint8(ndr, "data", r->data, r->length);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_ExtendedErrorComputerNamePresent(struct ndr_push *ndr, int ndr_flags, enum ExtendedErrorComputerNamePresent r)
+{
+       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_ExtendedErrorComputerNamePresent(struct ndr_pull *ndr, int ndr_flags, enum ExtendedErrorComputerNamePresent *r)
+{
+       uint16_t v;
+       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_ExtendedErrorComputerNamePresent(struct ndr_print *ndr, const char *name, enum ExtendedErrorComputerNamePresent r)
+{
+       const char *val = NULL;
+
+       switch (r) {
+               case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: val = "EXTENDED_ERROR_COMPUTER_NAME_PRESENT"; break;
+               case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: val = "EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT"; break;
+       }
+       ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+static enum ndr_err_code ndr_push_ExtendedErrorComputerNameU(struct ndr_push *ndr, int ndr_flags, const union ExtendedErrorComputerNameU *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               int level = ndr_push_get_switch_value(ndr, r);
+               NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, level));
+               switch (level) {
+                       case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: {
+                               NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name));
+                       break; }
+
+                       case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: {
+                       break; }
+
+                       default:
+                               return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
+               int level = ndr_push_get_switch_value(ndr, r);
+               switch (level) {
+                       case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
+                               NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->name));
+                       break;
+
+                       case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
+                       break;
+
+                       default:
+                               return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
        }
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_trustAuthInOutSecret2V1(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutSecret2V1 *r)
+static enum ndr_err_code ndr_pull_ExtendedErrorComputerNameU(struct ndr_pull *ndr, int ndr_flags, union ExtendedErrorComputerNameU *r)
 {
+       int level;
+       uint16_t _level;
+       level = ndr_pull_get_switch_value(ndr, r);
        if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time1));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
-               NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->value));
-               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time2));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
-               {
-                       uint32_t _flags_save_DATA_BLOB = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
-                       NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
-                       ndr->flags = _flags_save_DATA_BLOB;
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
+               if (_level != level) {
+                       return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
+               }
+               switch (level) {
+                       case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: {
+                               NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name));
+                       break; }
+
+                       case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: {
+                       break; }
+
+                       default:
+                               return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
+               switch (level) {
+                       case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
+                               NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->name));
+                       break;
+
+                       case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
+                       break;
+
+                       default:
+                               return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_trustAuthInOutSecret2V1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret2V1 *r)
+_PUBLIC_ void ndr_print_ExtendedErrorComputerNameU(struct ndr_print *ndr, const char *name, const union ExtendedErrorComputerNameU *r)
 {
-       ndr_print_struct(ndr, name, "trustAuthInOutSecret2V1");
-       ndr->depth++;
-       ndr_print_NTTIME(ndr, "time1", r->time1);
-       ndr_print_uint32(ndr, "unknown1", r->unknown1);
-       ndr_print_DATA_BLOB(ndr, "value", r->value);
-       ndr_print_NTTIME(ndr, "time2", r->time2);
-       ndr_print_uint32(ndr, "unknown2", r->unknown2);
-       ndr_print_uint32(ndr, "unknown3", r->unknown3);
-       ndr_print_uint32(ndr, "unknown4", r->unknown4);
-       ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
-       ndr->depth--;
+       int level;
+       level = ndr_print_get_switch_value(ndr, r);
+       ndr_print_union(ndr, name, level, "ExtendedErrorComputerNameU");
+       switch (level) {
+               case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
+                       ndr_print_ExtendedErrorUString(ndr, "name", &r->name);
+               break;
+
+               case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
+               break;
+
+               default:
+                       ndr_print_bad_level(ndr, name, level);
+       }
 }
 
-static enum ndr_err_code ndr_push_trustAuthInOutSecret2V2(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutSecret2V2 *r)
+static enum ndr_err_code ndr_push_ExtendedErrorComputerName(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorComputerName *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time1));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
-               NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->value));
-               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time2));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
-               {
-                       uint32_t _flags_save_DATA_BLOB = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
-                       NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
-                       ndr->flags = _flags_save_DATA_BLOB;
-               }
+               NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, r->present));
+               NDR_CHECK(ndr_push_set_switch_value(ndr, &r->n, r->present));
+               NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n));
        }
        if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n));
        }
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_trustAuthInOutSecret2V2(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutSecret2V2 *r)
+static enum ndr_err_code ndr_pull_ExtendedErrorComputerName(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorComputerName *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time1));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
-               NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->value));
-               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time2));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
-               {
-                       uint32_t _flags_save_DATA_BLOB = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
-                       NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
-                       ndr->flags = _flags_save_DATA_BLOB;
-               }
+               NDR_CHECK(ndr_pull_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, &r->present));
+               NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->n, r->present));
+               NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n));
        }
        if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n));
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_trustAuthInOutSecret2V2(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret2V2 *r)
+_PUBLIC_ void ndr_print_ExtendedErrorComputerName(struct ndr_print *ndr, const char *name, const struct ExtendedErrorComputerName *r)
 {
-       ndr_print_struct(ndr, name, "trustAuthInOutSecret2V2");
+       ndr_print_struct(ndr, name, "ExtendedErrorComputerName");
        ndr->depth++;
-       ndr_print_NTTIME(ndr, "time1", r->time1);
-       ndr_print_uint32(ndr, "unknown1", r->unknown1);
-       ndr_print_DATA_BLOB(ndr, "value", r->value);
-       ndr_print_NTTIME(ndr, "time2", r->time2);
-       ndr_print_uint32(ndr, "unknown2", r->unknown2);
-       ndr_print_uint32(ndr, "unknown3", r->unknown3);
-       ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
+       ndr_print_ExtendedErrorComputerNamePresent(ndr, "present", r->present);
+       ndr_print_set_switch_value(ndr, &r->n, r->present);
+       ndr_print_ExtendedErrorComputerNameU(ndr, "n", &r->n);
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_trustAuthInOutCtr2(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutCtr2 *r)
+static enum ndr_err_code ndr_push_ExtendedErrorParamType(struct ndr_push *ndr, int ndr_flags, enum ExtendedErrorParamType r)
 {
-       if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value1));
-               NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value2));
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-               if (r->value1) {
-                       NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value1));
-                       NDR_CHECK(ndr_push_trustAuthInOutSecret2V1(ndr, NDR_SCALARS, r->value1));
-               }
-               if (r->value2) {
-                       NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value2));
-                       NDR_CHECK(ndr_push_trustAuthInOutSecret2V2(ndr, NDR_SCALARS, r->value2));
-               }
-       }
+       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_trustAuthInOutCtr2(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutCtr2 *r)
+static enum ndr_err_code ndr_pull_ExtendedErrorParamType(struct ndr_pull *ndr, int ndr_flags, enum ExtendedErrorParamType *r)
 {
-       uint32_t _ptr_value1;
-       TALLOC_CTX *_mem_save_value1_0;
-       uint32_t _ptr_value2;
-       TALLOC_CTX *_mem_save_value2_0;
-       if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value1));
-               if (_ptr_value1) {
-                       NDR_PULL_ALLOC(ndr, r->value1);
-                       NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value1, _ptr_value1));
-               } else {
-                       r->value1 = NULL;
-               }
-               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value2));
-               if (_ptr_value2) {
-                       NDR_PULL_ALLOC(ndr, r->value2);
-                       NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value2, _ptr_value2));
-               } else {
-                       r->value2 = NULL;
-               }
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-               if (r->value1) {
-                       uint32_t _relative_save_offset;
-                       _relative_save_offset = ndr->offset;
-                       NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value1));
-                       _mem_save_value1_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->value1, 0);
-                       NDR_CHECK(ndr_pull_trustAuthInOutSecret2V1(ndr, NDR_SCALARS, r->value1));
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value1_0, 0);
-                       ndr->offset = _relative_save_offset;
-               }
-               if (r->value2) {
-                       uint32_t _relative_save_offset;
-                       _relative_save_offset = ndr->offset;
-                       NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value2));
-                       _mem_save_value2_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->value2, 0);
-                       NDR_CHECK(ndr_pull_trustAuthInOutSecret2V2(ndr, NDR_SCALARS, r->value2));
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value2_0, 0);
-                       ndr->offset = _relative_save_offset;
-               }
-       }
+       uint16_t v;
+       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+       *r = v;
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_trustAuthInOutCtr2(struct ndr_print *ndr, const char *name, const struct trustAuthInOutCtr2 *r)
+_PUBLIC_ void ndr_print_ExtendedErrorParamType(struct ndr_print *ndr, const char *name, enum ExtendedErrorParamType r)
 {
-       ndr_print_struct(ndr, name, "trustAuthInOutCtr2");
-       ndr->depth++;
-       ndr_print_ptr(ndr, "value1", r->value1);
-       ndr->depth++;
-       if (r->value1) {
-               ndr_print_trustAuthInOutSecret2V1(ndr, "value1", r->value1);
-       }
-       ndr->depth--;
-       ndr_print_ptr(ndr, "value2", r->value2);
-       ndr->depth++;
-       if (r->value2) {
-               ndr_print_trustAuthInOutSecret2V2(ndr, "value2", r->value2);
+       const char *val = NULL;
+
+       switch (r) {
+               case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: val = "EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING"; break;
+               case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: val = "EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING"; break;
+               case EXTENDED_ERROR_PARAM_TYPE_UINT32: val = "EXTENDED_ERROR_PARAM_TYPE_UINT32"; break;
+               case EXTENDED_ERROR_PARAM_TYPE_UINT16: val = "EXTENDED_ERROR_PARAM_TYPE_UINT16"; break;
+               case EXTENDED_ERROR_PARAM_TYPE_UINT64: val = "EXTENDED_ERROR_PARAM_TYPE_UINT64"; break;
+               case EXTENDED_ERROR_PARAM_TYPE_NONE: val = "EXTENDED_ERROR_PARAM_TYPE_NONE"; break;
+               case EXTENDED_ERROR_PARAM_TYPE_BLOB: val = "EXTENDED_ERROR_PARAM_TYPE_BLOB"; break;
        }
-       ndr->depth--;
-       ndr->depth--;
+       ndr_print_enum(ndr, name, "ENUM", val, r);
 }
 
-static enum ndr_err_code ndr_push_trustAuthInOutCtr(struct ndr_push *ndr, int ndr_flags, const union trustAuthInOutCtr *r)
+static enum ndr_err_code ndr_push_ExtendedErrorParamU(struct ndr_push *ndr, int ndr_flags, const union ExtendedErrorParamU *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                int level = ndr_push_get_switch_value(ndr, r);
+               NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, level));
                switch (level) {
-                       case 1: {
-                               NDR_CHECK(ndr_push_trustAuthInOutCtr1(ndr, NDR_SCALARS, &r->ctr1));
+                       case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: {
+                               NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string));
                        break; }
 
-                       case 2: {
-                               NDR_CHECK(ndr_push_trustAuthInOutCtr2(ndr, NDR_SCALARS, &r->ctr2));
+                       case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: {
+                               NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->u_string));
+                       break; }
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT32: {
+                               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->uint32));
+                       break; }
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT16: {
+                               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->uint16));
+                       break; }
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT64: {
+                               NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->uint64));
+                       break; }
+
+                       case EXTENDED_ERROR_PARAM_TYPE_NONE: {
+                       break; }
+
+                       case EXTENDED_ERROR_PARAM_TYPE_BLOB: {
+                               NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr, NDR_SCALARS, &r->blob));
                        break; }
 
                        default:
@@ -2673,12 +3191,28 @@ static enum ndr_err_code ndr_push_trustAuthInOutCtr(struct ndr_push *ndr, int nd
        if (ndr_flags & NDR_BUFFERS) {
                int level = ndr_push_get_switch_value(ndr, r);
                switch (level) {
-                       case 1:
-                               NDR_CHECK(ndr_push_trustAuthInOutCtr1(ndr, NDR_BUFFERS, &r->ctr1));
+                       case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
+                               NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_BUFFERS, &r->a_string));
                        break;
 
-                       case 2:
-                               NDR_CHECK(ndr_push_trustAuthInOutCtr2(ndr, NDR_BUFFERS, &r->ctr2));
+                       case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
+                               NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->u_string));
+                       break;
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT32:
+                       break;
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT16:
+                       break;
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT64:
+                       break;
+
+                       case EXTENDED_ERROR_PARAM_TYPE_NONE:
+                       break;
+
+                       case EXTENDED_ERROR_PARAM_TYPE_BLOB:
+                               NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr, NDR_BUFFERS, &r->blob));
                        break;
 
                        default:
@@ -2688,18 +3222,42 @@ static enum ndr_err_code ndr_push_trustAuthInOutCtr(struct ndr_push *ndr, int nd
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_trustAuthInOutCtr(struct ndr_pull *ndr, int ndr_flags, union trustAuthInOutCtr *r)
+static enum ndr_err_code ndr_pull_ExtendedErrorParamU(struct ndr_pull *ndr, int ndr_flags, union ExtendedErrorParamU *r)
 {
        int level;
+       uint16_t _level;
        level = ndr_pull_get_switch_value(ndr, r);
        if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
+               if (_level != level) {
+                       return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
+               }
                switch (level) {
-                       case 1: {
-                               NDR_CHECK(ndr_pull_trustAuthInOutCtr1(ndr, NDR_SCALARS, &r->ctr1));
+                       case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: {
+                               NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string));
                        break; }
 
-                       case 2: {
-                               NDR_CHECK(ndr_pull_trustAuthInOutCtr2(ndr, NDR_SCALARS, &r->ctr2));
+                       case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: {
+                               NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->u_string));
+                       break; }
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT32: {
+                               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->uint32));
+                       break; }
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT16: {
+                               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->uint16));
+                       break; }
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT64: {
+                               NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->uint64));
+                       break; }
+
+                       case EXTENDED_ERROR_PARAM_TYPE_NONE: {
+                       break; }
+
+                       case EXTENDED_ERROR_PARAM_TYPE_BLOB: {
+                               NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr, NDR_SCALARS, &r->blob));
                        break; }
 
                        default:
@@ -2708,12 +3266,28 @@ static enum ndr_err_code ndr_pull_trustAuthInOutCtr(struct ndr_pull *ndr, int nd
        }
        if (ndr_flags & NDR_BUFFERS) {
                switch (level) {
-                       case 1:
-                               NDR_CHECK(ndr_pull_trustAuthInOutCtr1(ndr, NDR_BUFFERS, &r->ctr1));
+                       case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
+                               NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_BUFFERS, &r->a_string));
                        break;
 
-                       case 2:
-                               NDR_CHECK(ndr_pull_trustAuthInOutCtr2(ndr, NDR_BUFFERS, &r->ctr2));
+                       case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
+                               NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->u_string));
+                       break;
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT32:
+                       break;
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT16:
+                       break;
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT64:
+                       break;
+
+                       case EXTENDED_ERROR_PARAM_TYPE_NONE:
+                       break;
+
+                       case EXTENDED_ERROR_PARAM_TYPE_BLOB:
+                               NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr, NDR_BUFFERS, &r->blob));
                        break;
 
                        default:
@@ -2723,18 +3297,37 @@ static enum ndr_err_code ndr_pull_trustAuthInOutCtr(struct ndr_pull *ndr, int nd
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_trustAuthInOutCtr(struct ndr_print *ndr, const char *name, const union trustAuthInOutCtr *r)
+_PUBLIC_ void ndr_print_ExtendedErrorParamU(struct ndr_print *ndr, const char *name, const union ExtendedErrorParamU *r)
 {
        int level;
        level = ndr_print_get_switch_value(ndr, r);
-       ndr_print_union(ndr, name, level, "trustAuthInOutCtr");
+       ndr_print_union(ndr, name, level, "ExtendedErrorParamU");
        switch (level) {
-               case 1:
-                       ndr_print_trustAuthInOutCtr1(ndr, "ctr1", &r->ctr1);
+               case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
+                       ndr_print_ExtendedErrorAString(ndr, "a_string", &r->a_string);
                break;
 
-               case 2:
-                       ndr_print_trustAuthInOutCtr2(ndr, "ctr2", &r->ctr2);
+               case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
+                       ndr_print_ExtendedErrorUString(ndr, "u_string", &r->u_string);
+               break;
+
+               case EXTENDED_ERROR_PARAM_TYPE_UINT32:
+                       ndr_print_uint32(ndr, "uint32", r->uint32);
+               break;
+
+               case EXTENDED_ERROR_PARAM_TYPE_UINT16:
+                       ndr_print_uint16(ndr, "uint16", r->uint16);
+               break;
+
+               case EXTENDED_ERROR_PARAM_TYPE_UINT64:
+                       ndr_print_hyper(ndr, "uint64", r->uint64);
+               break;
+
+               case EXTENDED_ERROR_PARAM_TYPE_NONE:
+               break;
+
+               case EXTENDED_ERROR_PARAM_TYPE_BLOB:
+                       ndr_print_ExtendedErrorBlob(ndr, "blob", &r->blob);
                break;
 
                default:
@@ -2742,118 +3335,205 @@ _PUBLIC_ void ndr_print_trustAuthInOutCtr(struct ndr_print *ndr, const char *nam
        }
 }
 
-_PUBLIC_ enum ndr_err_code ndr_push_trustAuthInOutBlob(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutBlob *r)
+static enum ndr_err_code ndr_push_ExtendedErrorParam(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorParam *r)
 {
        if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
-               NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
-               NDR_CHECK(ndr_push_trustAuthInOutCtr(ndr, NDR_SCALARS, &r->ctr));
+               NDR_CHECK(ndr_push_align(ndr, 8));
+               NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, r->type));
+               NDR_CHECK(ndr_push_set_switch_value(ndr, &r->p, r->type));
+               NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p));
        }
        if (ndr_flags & NDR_BUFFERS) {
-               NDR_CHECK(ndr_push_trustAuthInOutCtr(ndr, NDR_BUFFERS, &r->ctr));
+               NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p));
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ enum ndr_err_code ndr_pull_trustAuthInOutBlob(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutBlob *r)
+static enum ndr_err_code ndr_pull_ExtendedErrorParam(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorParam *r)
 {
        if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
-               NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
-               NDR_CHECK(ndr_pull_trustAuthInOutCtr(ndr, NDR_SCALARS, &r->ctr));
+               NDR_CHECK(ndr_pull_align(ndr, 8));
+               NDR_CHECK(ndr_pull_ExtendedErrorParamType(ndr, NDR_SCALARS, &r->type));
+               NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->p, r->type));
+               NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p));
        }
        if (ndr_flags & NDR_BUFFERS) {
-               NDR_CHECK(ndr_pull_trustAuthInOutCtr(ndr, NDR_BUFFERS, &r->ctr));
+               NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p));
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_trustAuthInOutBlob(struct ndr_print *ndr, const char *name, const struct trustAuthInOutBlob *r)
+_PUBLIC_ void ndr_print_ExtendedErrorParam(struct ndr_print *ndr, const char *name, const struct ExtendedErrorParam *r)
 {
-       ndr_print_struct(ndr, name, "trustAuthInOutBlob");
+       ndr_print_struct(ndr, name, "ExtendedErrorParam");
        ndr->depth++;
-       ndr_print_uint32(ndr, "version", r->version);
-       ndr_print_set_switch_value(ndr, &r->ctr, r->version);
-       ndr_print_trustAuthInOutCtr(ndr, "ctr", &r->ctr);
+       ndr_print_ExtendedErrorParamType(ndr, "type", r->type);
+       ndr_print_set_switch_value(ndr, &r->p, r->type);
+       ndr_print_ExtendedErrorParamU(ndr, "p", &r->p);
        ndr->depth--;
 }
 
-_PUBLIC_ enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedChunk *r)
+_PUBLIC_ enum ndr_err_code ndr_push_ExtendedErrorInfo(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfo *r)
 {
+       uint32_t cntr_params_0;
        if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->marker));
-               NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_params));
+               NDR_CHECK(ndr_push_align(ndr, 8));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->next));
+               NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr, NDR_SCALARS, &r->computer_name));
+               NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->pid));
+               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->generating_component));
+               NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->detection_location));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->flags));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_params));
+               for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
+                       NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0]));
+               }
        }
        if (ndr_flags & NDR_BUFFERS) {
+               if (r->next) {
+                       NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
+               }
+               NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr, NDR_BUFFERS, &r->computer_name));
+               for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
+                       NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_BUFFERS, &r->params[cntr_params_0]));
+               }
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedChunk *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_ExtendedErrorInfo(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfo *r)
 {
+       uint32_t _ptr_next;
+       TALLOC_CTX *_mem_save_next_0;
+       uint32_t cntr_params_0;
+       TALLOC_CTX *_mem_save_params_0;
        if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->marker));
-               NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
+               NDR_CHECK(ndr_pull_array_size(ndr, &r->params));
+               NDR_CHECK(ndr_pull_align(ndr, 8));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next));
+               if (_ptr_next) {
+                       NDR_PULL_ALLOC(ndr, r->next);
+               } else {
+                       r->next = NULL;
+               }
+               NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr, NDR_SCALARS, &r->computer_name));
+               NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->pid));
+               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->generating_component));
+               NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->status));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->detection_location));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_params));
+               NDR_PULL_ALLOC_N(ndr, r->params, ndr_get_array_size(ndr, &r->params));
+               _mem_save_params_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->params, 0);
+               for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
+                       NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0]));
+               }
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_params_0, 0);
+               if (r->params) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->params, r->num_params));
+               }
        }
        if (ndr_flags & NDR_BUFFERS) {
+               if (r->next) {
+                       _mem_save_next_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->next, 0);
+                       NDR_CHECK(ndr_pull_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_0, 0);
+               }
+               NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr, NDR_BUFFERS, &r->computer_name));
+               _mem_save_params_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->params, 0);
+               for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
+                       NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr, NDR_BUFFERS, &r->params[cntr_params_0]));
+               }
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_params_0, 0);
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r)
+_PUBLIC_ void ndr_print_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfo *r)
 {
-       ndr_print_struct(ndr, name, "DsCompressedChunk");
+       uint32_t cntr_params_0;
+       ndr_print_struct(ndr, name, "ExtendedErrorInfo");
        ndr->depth++;
-       ndr_print_uint32(ndr, "marker", r->marker);
-       ndr_print_DATA_BLOB(ndr, "data", r->data);
+       ndr_print_ptr(ndr, "next", r->next);
+       ndr->depth++;
+       if (r->next) {
+               ndr_print_ExtendedErrorInfo(ndr, "next", r->next);
+       }
+       ndr->depth--;
+       ndr_print_ExtendedErrorComputerName(ndr, "computer_name", &r->computer_name);
+       ndr_print_hyper(ndr, "pid", r->pid);
+       ndr_print_NTTIME(ndr, "time", r->time);
+       ndr_print_uint32(ndr, "generating_component", r->generating_component);
+       ndr_print_WERROR(ndr, "status", r->status);
+       ndr_print_uint16(ndr, "detection_location", r->detection_location);
+       ndr_print_uint16(ndr, "flags", r->flags);
+       ndr_print_uint16(ndr, "num_params", r->num_params);
+       ndr->print(ndr, "%s: ARRAY(%d)", "params", (int)r->num_params);
+       ndr->depth++;
+       for (cntr_params_0=0;cntr_params_0<r->num_params;cntr_params_0++) {
+               char *idx_0=NULL;
+               if (asprintf(&idx_0, "[%d]", cntr_params_0) != -1) {
+                       ndr_print_ExtendedErrorParam(ndr, "params", &r->params[cntr_params_0]);
+                       free(idx_0);
+               }
+       }
+       ndr->depth--;
        ndr->depth--;
 }
 
-_PUBLIC_ enum ndr_err_code ndr_push_DsCompressedBlob(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedBlob *r)
+static enum ndr_err_code ndr_push_ExtendedErrorInfoPtr(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfoPtr *r)
 {
-       uint32_t cntr_chunks_0;
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
-               for (cntr_chunks_0 = 0; cntr_chunks_0 < 5; cntr_chunks_0++) {
-                       NDR_CHECK(ndr_push_DsCompressedChunk(ndr, NDR_SCALARS, &r->chunks[cntr_chunks_0]));
-               }
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
        }
        if (ndr_flags & NDR_BUFFERS) {
+               if (r->info) {
+                       NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
+               }
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedBlob(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedBlob *r)
+static enum ndr_err_code ndr_pull_ExtendedErrorInfoPtr(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfoPtr *r)
 {
-       uint32_t cntr_chunks_0;
+       uint32_t _ptr_info;
+       TALLOC_CTX *_mem_save_info_0;
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
-               for (cntr_chunks_0 = 0; cntr_chunks_0 < 5; cntr_chunks_0++) {
-                       NDR_CHECK(ndr_pull_DsCompressedChunk(ndr, NDR_SCALARS, &r->chunks[cntr_chunks_0]));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+               if (_ptr_info) {
+                       NDR_PULL_ALLOC(ndr, r->info);
+               } else {
+                       r->info = NULL;
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
+               if (r->info) {
+                       _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
+                       NDR_CHECK(ndr_pull_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+               }
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_DsCompressedBlob(struct ndr_print *ndr, const char *name, const struct DsCompressedBlob *r)
+_PUBLIC_ void ndr_print_ExtendedErrorInfoPtr(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfoPtr *r)
 {
-       uint32_t cntr_chunks_0;
-       ndr_print_struct(ndr, name, "DsCompressedBlob");
+       ndr_print_struct(ndr, name, "ExtendedErrorInfoPtr");
        ndr->depth++;
-       ndr->print(ndr, "%s: ARRAY(%d)", "chunks", (int)5);
+       ndr_print_ptr(ndr, "info", r->info);
        ndr->depth++;
-       for (cntr_chunks_0=0;cntr_chunks_0<5;cntr_chunks_0++) {
-               char *idx_0=NULL;
-               if (asprintf(&idx_0, "[%d]", cntr_chunks_0) != -1) {
-                       ndr_print_DsCompressedChunk(ndr, "chunks", &r->chunks[cntr_chunks_0]);
-                       free(idx_0);
-               }
+       if (r->info) {
+               ndr_print_ExtendedErrorInfo(ndr, "info", r->info);
        }
        ndr->depth--;
        ndr->depth--;
@@ -3351,41 +4031,92 @@ _PUBLIC_ void ndr_print_decode_trustAuthInOut(struct ndr_print *ndr, const char
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_decode_DsCompressed(struct ndr_push *ndr, int flags, const struct decode_DsCompressed *r)
+static enum ndr_err_code ndr_push_decode_trustDomainPasswords(struct ndr_push *ndr, int flags, const struct decode_trustDomainPasswords *r)
+{
+       if (flags & NDR_IN) {
+               NDR_CHECK(ndr_push_trustDomainPasswords(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
+       }
+       if (flags & NDR_OUT) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_decode_trustDomainPasswords(struct ndr_pull *ndr, int flags, struct decode_trustDomainPasswords *r)
+{
+       if (flags & NDR_IN) {
+               NDR_CHECK(ndr_pull_trustDomainPasswords(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
+       }
+       if (flags & NDR_OUT) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_decode_trustDomainPasswords(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustDomainPasswords *r)
+{
+       ndr_print_struct(ndr, name, "decode_trustDomainPasswords");
+       ndr->depth++;
+       if (flags & NDR_SET_VALUES) {
+               ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+       }
+       if (flags & NDR_IN) {
+               ndr_print_struct(ndr, "in", "decode_trustDomainPasswords");
+               ndr->depth++;
+               ndr_print_trustDomainPasswords(ndr, "blob", &r->in.blob);
+               ndr->depth--;
+       }
+       if (flags & NDR_OUT) {
+               ndr_print_struct(ndr, "out", "decode_trustDomainPasswords");
+               ndr->depth++;
+               ndr->depth--;
+       }
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_decode_ExtendedErrorInfo(struct ndr_push *ndr, int flags, const struct decode_ExtendedErrorInfo *r)
 {
        if (flags & NDR_IN) {
-               NDR_CHECK(ndr_push_DsCompressedBlob(ndr, NDR_SCALARS, &r->in.blob));
+               {
+                       struct ndr_push *_ndr_ptr;
+                       NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ptr, 0xFFFFFC01, -1));
+                       NDR_CHECK(ndr_push_ExtendedErrorInfoPtr(_ndr_ptr, NDR_SCALARS|NDR_BUFFERS, &r->in.ptr));
+                       NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ptr, 0xFFFFFC01, -1));
+               }
        }
        if (flags & NDR_OUT) {
        }
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_decode_DsCompressed(struct ndr_pull *ndr, int flags, struct decode_DsCompressed *r)
+static enum ndr_err_code ndr_pull_decode_ExtendedErrorInfo(struct ndr_pull *ndr, int flags, struct decode_ExtendedErrorInfo *r)
 {
        if (flags & NDR_IN) {
-               NDR_CHECK(ndr_pull_DsCompressedBlob(ndr, NDR_SCALARS, &r->in.blob));
+               {
+                       struct ndr_pull *_ndr_ptr;
+                       NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ptr, 0xFFFFFC01, -1));
+                       NDR_CHECK(ndr_pull_ExtendedErrorInfoPtr(_ndr_ptr, NDR_SCALARS|NDR_BUFFERS, &r->in.ptr));
+                       NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ptr, 0xFFFFFC01, -1));
+               }
        }
        if (flags & NDR_OUT) {
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_decode_DsCompressed(struct ndr_print *ndr, const char *name, int flags, const struct decode_DsCompressed *r)
+_PUBLIC_ void ndr_print_decode_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, int flags, const struct decode_ExtendedErrorInfo *r)
 {
-       ndr_print_struct(ndr, name, "decode_DsCompressed");
+       ndr_print_struct(ndr, name, "decode_ExtendedErrorInfo");
        ndr->depth++;
        if (flags & NDR_SET_VALUES) {
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
        }
        if (flags & NDR_IN) {
-               ndr_print_struct(ndr, "in", "decode_DsCompressed");
+               ndr_print_struct(ndr, "in", "decode_ExtendedErrorInfo");
                ndr->depth++;
-               ndr_print_DsCompressedBlob(ndr, "blob", &r->in.blob);
+               ndr_print_ExtendedErrorInfoPtr(ndr, "ptr", &r->in.ptr);
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
-               ndr_print_struct(ndr, "out", "decode_DsCompressed");
+               ndr_print_struct(ndr, "out", "decode_ExtendedErrorInfo");
                ndr->depth++;
                ndr->depth--;
        }
@@ -3490,11 +4221,19 @@ static const struct ndr_interface_call drsblobs_calls[] = {
                false,
        },
        {
-               "decode_DsCompressed",
-               sizeof(struct decode_DsCompressed),
-               (ndr_push_flags_fn_t) ndr_push_decode_DsCompressed,
-               (ndr_pull_flags_fn_t) ndr_pull_decode_DsCompressed,
-               (ndr_print_function_t) ndr_print_decode_DsCompressed,
+               "decode_trustDomainPasswords",
+               sizeof(struct decode_trustDomainPasswords),
+               (ndr_push_flags_fn_t) ndr_push_decode_trustDomainPasswords,
+               (ndr_pull_flags_fn_t) ndr_pull_decode_trustDomainPasswords,
+               (ndr_print_function_t) ndr_print_decode_trustDomainPasswords,
+               false,
+       },
+       {
+               "decode_ExtendedErrorInfo",
+               sizeof(struct decode_ExtendedErrorInfo),
+               (ndr_push_flags_fn_t) ndr_push_decode_ExtendedErrorInfo,
+               (ndr_pull_flags_fn_t) ndr_pull_decode_ExtendedErrorInfo,
+               (ndr_print_function_t) ndr_print_decode_ExtendedErrorInfo,
                false,
        },
        { NULL, 0, NULL, NULL, NULL, false }
@@ -3526,7 +4265,7 @@ const struct ndr_interface_table ndr_table_drsblobs = {
                NDR_DRSBLOBS_VERSION
        },
        .helpstring     = NDR_DRSBLOBS_HELPSTRING,
-       .num_calls      = 13,
+       .num_calls      = 14,
        .calls          = drsblobs_calls,
        .endpoints      = &drsblobs_endpoints,
        .authservices   = &drsblobs_authservices
index 171e7e25a144f5464448e1e31a44d28414dc8f0c..8a5298874a237d6d8e6683d3c58c8c0ce059f578 100644 (file)
@@ -35,9 +35,11 @@ extern const struct ndr_interface_table ndr_table_drsblobs;
 
 #define NDR_DECODE_TRUSTAUTHINOUT (0x0b)
 
-#define NDR_DECODE_DSCOMPRESSED (0x0c)
+#define NDR_DECODE_TRUSTDOMAINPASSWORDS (0x0c)
 
-#define NDR_DRSBLOBS_CALL_COUNT (13)
+#define NDR_DECODE_EXTENDEDERRORINFO (0x0d)
+
+#define NDR_DRSBLOBS_CALL_COUNT (14)
 void ndr_print_replPropertyMetaData1(struct ndr_print *ndr, const char *name, const struct replPropertyMetaData1 *r);
 void ndr_print_replPropertyMetaDataCtr1(struct ndr_print *ndr, const char *name, const struct replPropertyMetaDataCtr1 *r);
 void ndr_print_replPropertyMetaDataCtr(struct ndr_print *ndr, const char *name, const union replPropertyMetaDataCtr *r);
@@ -102,21 +104,44 @@ void ndr_print_package_PrimaryWDigestHash(struct ndr_print *ndr, const char *nam
 enum ndr_err_code ndr_push_package_PrimaryWDigestBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryWDigestBlob *r);
 enum ndr_err_code ndr_pull_package_PrimaryWDigestBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryWDigestBlob *r);
 void ndr_print_package_PrimaryWDigestBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestBlob *r);
-void ndr_print_trustAuthInOutSecret1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret1 *r);
-void ndr_print_trustAuthInOutCtr1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutCtr1 *r);
-void ndr_print_trustAuthInOutSecret2V1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret2V1 *r);
-void ndr_print_trustAuthInOutSecret2V2(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret2V2 *r);
-void ndr_print_trustAuthInOutCtr2(struct ndr_print *ndr, const char *name, const struct trustAuthInOutCtr2 *r);
-void ndr_print_trustAuthInOutCtr(struct ndr_print *ndr, const char *name, const union trustAuthInOutCtr *r);
+void ndr_print_AuthInfoNone(struct ndr_print *ndr, const char *name, const struct AuthInfoNone *r);
+void ndr_print_AuthInfoNT4Owf(struct ndr_print *ndr, const char *name, const struct AuthInfoNT4Owf *r);
+void ndr_print_AuthInfoClear(struct ndr_print *ndr, const char *name, const struct AuthInfoClear *r);
+void ndr_print_AuthInfoVersion(struct ndr_print *ndr, const char *name, const struct AuthInfoVersion *r);
+void ndr_print_AuthInfo(struct ndr_print *ndr, const char *name, const union AuthInfo *r);
+enum ndr_err_code ndr_push_AuthenticationInformation(struct ndr_push *ndr, int ndr_flags, const struct AuthenticationInformation *r);
+enum ndr_err_code ndr_pull_AuthenticationInformation(struct ndr_pull *ndr, int ndr_flags, struct AuthenticationInformation *r);
+void ndr_print_AuthenticationInformation(struct ndr_print *ndr, const char *name, const struct AuthenticationInformation *r);
+enum ndr_err_code ndr_push_AuthenticationInformationArray(struct ndr_push *ndr, int ndr_flags, const struct AuthenticationInformationArray *r);
+enum ndr_err_code ndr_pull_AuthenticationInformationArray(struct ndr_pull *ndr, int ndr_flags, struct AuthenticationInformationArray *r);
+void ndr_print_AuthenticationInformationArray(struct ndr_print *ndr, const char *name, const struct AuthenticationInformationArray *r);
 enum ndr_err_code ndr_push_trustAuthInOutBlob(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutBlob *r);
 enum ndr_err_code ndr_pull_trustAuthInOutBlob(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutBlob *r);
 void ndr_print_trustAuthInOutBlob(struct ndr_print *ndr, const char *name, const struct trustAuthInOutBlob *r);
+size_t ndr_size_trustAuthInOutBlob(const struct trustAuthInOutBlob *r, int flags);
+enum ndr_err_code ndr_push_trustCurrentPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustCurrentPasswords *r);
+enum ndr_err_code ndr_pull_trustCurrentPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustCurrentPasswords *r);
+void ndr_print_trustCurrentPasswords(struct ndr_print *ndr, const char *name, const struct trustCurrentPasswords *r);
+size_t ndr_size_trustCurrentPasswords(const struct trustCurrentPasswords *r, int flags);
+enum ndr_err_code ndr_push_trustDomainPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustDomainPasswords *r);
+enum ndr_err_code ndr_pull_trustDomainPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustDomainPasswords *r);
+void ndr_print_trustDomainPasswords(struct ndr_print *ndr, const char *name, const struct trustDomainPasswords *r);
 enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedChunk *r);
 enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedChunk *r);
 void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r);
-enum ndr_err_code ndr_push_DsCompressedBlob(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedBlob *r);
-enum ndr_err_code ndr_pull_DsCompressedBlob(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedBlob *r);
-void ndr_print_DsCompressedBlob(struct ndr_print *ndr, const char *name, const struct DsCompressedBlob *r);
+void ndr_print_ExtendedErrorAString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorAString *r);
+void ndr_print_ExtendedErrorUString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorUString *r);
+void ndr_print_ExtendedErrorBlob(struct ndr_print *ndr, const char *name, const struct ExtendedErrorBlob *r);
+void ndr_print_ExtendedErrorComputerNamePresent(struct ndr_print *ndr, const char *name, enum ExtendedErrorComputerNamePresent r);
+void ndr_print_ExtendedErrorComputerNameU(struct ndr_print *ndr, const char *name, const union ExtendedErrorComputerNameU *r);
+void ndr_print_ExtendedErrorComputerName(struct ndr_print *ndr, const char *name, const struct ExtendedErrorComputerName *r);
+void ndr_print_ExtendedErrorParamType(struct ndr_print *ndr, const char *name, enum ExtendedErrorParamType r);
+void ndr_print_ExtendedErrorParamU(struct ndr_print *ndr, const char *name, const union ExtendedErrorParamU *r);
+void ndr_print_ExtendedErrorParam(struct ndr_print *ndr, const char *name, const struct ExtendedErrorParam *r);
+enum ndr_err_code ndr_push_ExtendedErrorInfo(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfo *r);
+enum ndr_err_code ndr_pull_ExtendedErrorInfo(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfo *r);
+void ndr_print_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfo *r);
+void ndr_print_ExtendedErrorInfoPtr(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfoPtr *r);
 void ndr_print_decode_replPropertyMetaData(struct ndr_print *ndr, const char *name, int flags, const struct decode_replPropertyMetaData *r);
 void ndr_print_decode_replUpToDateVector(struct ndr_print *ndr, const char *name, int flags, const struct decode_replUpToDateVector *r);
 void ndr_print_decode_repsFromTo(struct ndr_print *ndr, const char *name, int flags, const struct decode_repsFromTo *r);
@@ -129,5 +154,6 @@ void ndr_print_decode_PrimaryKerberos(struct ndr_print *ndr, const char *name, i
 void ndr_print_decode_PrimaryCLEARTEXT(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryCLEARTEXT *r);
 void ndr_print_decode_PrimaryWDigest(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryWDigest *r);
 void ndr_print_decode_trustAuthInOut(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustAuthInOut *r);
-void ndr_print_decode_DsCompressed(struct ndr_print *ndr, const char *name, int flags, const struct decode_DsCompressed *r);
+void ndr_print_decode_trustDomainPasswords(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustDomainPasswords *r);
+void ndr_print_decode_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, int flags, const struct decode_ExtendedErrorInfo *r);
 #endif /* _HEADER_NDR_drsblobs */
index 38b88f643c9d3cb10fc2a34bbe7a91664e458422..c2a4aee180c859a5003a03a75822ac1a5fb88052 100644 (file)
@@ -2823,217 +2823,219 @@ _PUBLIC_ size_t ndr_size_drsuapi_DsGetNCChangesCtr6(const struct drsuapi_DsGetNC
        return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr6);
 }
 
-static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesMSZIPCtr1 *r)
+_PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr1TS(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr1TS *r)
 {
        if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->decompressed_length));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->compressed_length));
-               NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
+               NDR_CHECK(ndr_push_align(ndr, 1));
+               {
+                       struct ndr_push *_ndr_ctr1;
+                       NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ctr1, 0xFFFFFC01, -1));
+                       NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1, NDR_SCALARS|NDR_BUFFERS, &r->ctr1));
+                       NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr1, 0xFFFFFC01, -1));
+               }
        }
        if (ndr_flags & NDR_BUFFERS) {
-               if (r->ctr1) {
-                       {
-                               struct ndr_push *_ndr_ctr1;
-                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ctr1, 4, r->compressed_length));
-                               {
-                                       struct ndr_push *_ndr_ctr1_compressed;
-                                       NDR_CHECK(ndr_push_compression_start(_ndr_ctr1, &_ndr_ctr1_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length));
-                                       NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1_compressed, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
-                                       NDR_CHECK(ndr_push_compression_end(_ndr_ctr1, _ndr_ctr1_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length));
-                               }
-                               NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr1, 4, r->compressed_length));
-                       }
-               }
        }
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesMSZIPCtr1 *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr1TS(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr1TS *r)
 {
-       uint32_t _ptr_ctr1;
-       TALLOC_CTX *_mem_save_ctr1_0;
        if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length));
-               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
-               if (_ptr_ctr1) {
-                       NDR_PULL_ALLOC(ndr, r->ctr1);
-               } else {
-                       r->ctr1 = NULL;
+               NDR_CHECK(ndr_pull_align(ndr, 1));
+               {
+                       struct ndr_pull *_ndr_ctr1;
+                       NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ctr1, 0xFFFFFC01, -1));
+                       NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1, NDR_SCALARS|NDR_BUFFERS, &r->ctr1));
+                       NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr1, 0xFFFFFC01, -1));
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
-               if (r->ctr1) {
-                       _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
-                       {
-                               struct ndr_pull *_ndr_ctr1;
-                               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ctr1, 4, r->compressed_length));
-                               {
-                                       struct ndr_pull *_ndr_ctr1_compressed;
-                                       NDR_CHECK(ndr_pull_compression_start(_ndr_ctr1, &_ndr_ctr1_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length));
-                                       NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1_compressed, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
-                                       NDR_CHECK(ndr_pull_compression_end(_ndr_ctr1, _ndr_ctr1_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length));
-                               }
-                               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr1, 4, r->compressed_length));
-                       }
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
-               }
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesMSZIPCtr1 *r)
+_PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr1TS(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr1TS *r)
 {
-       ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesMSZIPCtr1");
-       ndr->depth++;
-       ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length);
-       ndr_print_uint32(ndr, "compressed_length", r->compressed_length);
-       ndr_print_ptr(ndr, "ctr1", r->ctr1);
+       ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr1TS");
        ndr->depth++;
-       if (r->ctr1) {
-               ndr_print_drsuapi_DsGetNCChangesCtr1(ndr, "ctr1", r->ctr1);
-       }
-       ndr->depth--;
+       ndr_print_drsuapi_DsGetNCChangesCtr1(ndr, "ctr1", &r->ctr1);
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesMSZIPCtr6 *r)
+_PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr6TS(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr6TS *r)
 {
        if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->decompressed_length));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->compressed_length));
-               NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr6));
+               NDR_CHECK(ndr_push_align(ndr, 1));
+               {
+                       struct ndr_push *_ndr_ctr6;
+                       NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ctr6, 0xFFFFFC01, -1));
+                       NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6, NDR_SCALARS|NDR_BUFFERS, &r->ctr6));
+                       NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr6, 0xFFFFFC01, -1));
+               }
        }
        if (ndr_flags & NDR_BUFFERS) {
-               if (r->ctr6) {
-                       {
-                               struct ndr_push *_ndr_ctr6;
-                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ctr6, 4, r->compressed_length));
-                               {
-                                       struct ndr_push *_ndr_ctr6_compressed;
-                                       NDR_CHECK(ndr_push_compression_start(_ndr_ctr6, &_ndr_ctr6_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length));
-                                       NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6_compressed, NDR_SCALARS|NDR_BUFFERS, r->ctr6));
-                                       NDR_CHECK(ndr_push_compression_end(_ndr_ctr6, _ndr_ctr6_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length));
-                               }
-                               NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr6, 4, r->compressed_length));
-                       }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6TS(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr6TS *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 1));
+               {
+                       struct ndr_pull *_ndr_ctr6;
+                       NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ctr6, 0xFFFFFC01, -1));
+                       NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6, NDR_SCALARS|NDR_BUFFERS, &r->ctr6));
+                       NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr6, 0xFFFFFC01, -1));
                }
        }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesMSZIPCtr6 *r)
+_PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr6TS(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr6TS *r)
+{
+       ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr6TS");
+       ndr->depth++;
+       ndr_print_drsuapi_DsGetNCChangesCtr6(ndr, "ctr6", &r->ctr6);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesMSZIPCtr1 *r)
 {
-       uint32_t _ptr_ctr6;
-       TALLOC_CTX *_mem_save_ctr6_0;
+       uint32_t _ptr_ts;
+       TALLOC_CTX *_mem_save_ts_0;
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length));
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length));
-               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr6));
-               if (_ptr_ctr6) {
-                       NDR_PULL_ALLOC(ndr, r->ctr6);
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ts));
+               if (_ptr_ts) {
+                       NDR_PULL_ALLOC(ndr, r->ts);
                } else {
-                       r->ctr6 = NULL;
+                       r->ts = NULL;
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
-               if (r->ctr6) {
-                       _mem_save_ctr6_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->ctr6, 0);
+               if (r->ts) {
+                       _mem_save_ts_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->ts, 0);
                        {
-                               struct ndr_pull *_ndr_ctr6;
-                               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ctr6, 4, r->compressed_length));
+                               struct ndr_pull *_ndr_ts;
+                               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ts, 4, r->compressed_length));
                                {
-                                       struct ndr_pull *_ndr_ctr6_compressed;
-                                       NDR_CHECK(ndr_pull_compression_start(_ndr_ctr6, &_ndr_ctr6_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length));
-                                       NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6_compressed, NDR_SCALARS|NDR_BUFFERS, r->ctr6));
-                                       NDR_CHECK(ndr_pull_compression_end(_ndr_ctr6, _ndr_ctr6_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length));
+                                       struct ndr_pull *_ndr_ts_compressed;
+                                       NDR_CHECK(ndr_pull_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length));
+                                       NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
+                                       NDR_CHECK(ndr_pull_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length));
                                }
-                               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr6, 4, r->compressed_length));
+                               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ts, 4, r->compressed_length));
                        }
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr6_0, 0);
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ts_0, 0);
                }
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesMSZIPCtr6 *r)
+_PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesMSZIPCtr1 *r)
 {
-       ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesMSZIPCtr6");
+       ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesMSZIPCtr1");
        ndr->depth++;
        ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length);
        ndr_print_uint32(ndr, "compressed_length", r->compressed_length);
-       ndr_print_ptr(ndr, "ctr6", r->ctr6);
+       ndr_print_ptr(ndr, "ts", r->ts);
        ndr->depth++;
-       if (r->ctr6) {
-               ndr_print_drsuapi_DsGetNCChangesCtr6(ndr, "ctr6", r->ctr6);
+       if (r->ts) {
+               ndr_print_drsuapi_DsGetNCChangesCtr1TS(ndr, "ts", r->ts);
        }
        ndr->depth--;
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesXPRESSCtr1 *r)
+static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesMSZIPCtr6 *r)
 {
+       uint32_t _ptr_ts;
+       TALLOC_CTX *_mem_save_ts_0;
        if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->decompressed_length));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->compressed_length));
-               NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ts));
+               if (_ptr_ts) {
+                       NDR_PULL_ALLOC(ndr, r->ts);
+               } else {
+                       r->ts = NULL;
+               }
        }
        if (ndr_flags & NDR_BUFFERS) {
-               if (r->ctr1) {
+               if (r->ts) {
+                       _mem_save_ts_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->ts, 0);
                        {
-                               struct ndr_push *_ndr_ctr1;
-                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ctr1, 4, r->compressed_length));
+                               struct ndr_pull *_ndr_ts;
+                               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ts, 4, r->compressed_length));
                                {
-                                       struct ndr_push *_ndr_ctr1_compressed;
-                                       NDR_CHECK(ndr_push_compression_start(_ndr_ctr1, &_ndr_ctr1_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length));
-                                       NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1_compressed, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
-                                       NDR_CHECK(ndr_push_compression_end(_ndr_ctr1, _ndr_ctr1_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length));
+                                       struct ndr_pull *_ndr_ts_compressed;
+                                       NDR_CHECK(ndr_pull_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length));
+                                       NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
+                                       NDR_CHECK(ndr_pull_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length));
                                }
-                               NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr1, 4, r->compressed_length));
+                               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ts, 4, r->compressed_length));
                        }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ts_0, 0);
                }
        }
        return NDR_ERR_SUCCESS;
 }
 
+_PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesMSZIPCtr6 *r)
+{
+       ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesMSZIPCtr6");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length);
+       ndr_print_uint32(ndr, "compressed_length", r->compressed_length);
+       ndr_print_ptr(ndr, "ts", r->ts);
+       ndr->depth++;
+       if (r->ts) {
+               ndr_print_drsuapi_DsGetNCChangesCtr6TS(ndr, "ts", r->ts);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
 static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesXPRESSCtr1 *r)
 {
-       uint32_t _ptr_ctr1;
-       TALLOC_CTX *_mem_save_ctr1_0;
+       uint32_t _ptr_ts;
+       TALLOC_CTX *_mem_save_ts_0;
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length));
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length));
-               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
-               if (_ptr_ctr1) {
-                       NDR_PULL_ALLOC(ndr, r->ctr1);
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ts));
+               if (_ptr_ts) {
+                       NDR_PULL_ALLOC(ndr, r->ts);
                } else {
-                       r->ctr1 = NULL;
+                       r->ts = NULL;
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
-               if (r->ctr1) {
-                       _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
+               if (r->ts) {
+                       _mem_save_ts_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->ts, 0);
                        {
-                               struct ndr_pull *_ndr_ctr1;
-                               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ctr1, 4, r->compressed_length));
+                               struct ndr_pull *_ndr_ts;
+                               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ts, 4, r->compressed_length));
                                {
-                                       struct ndr_pull *_ndr_ctr1_compressed;
-                                       NDR_CHECK(ndr_pull_compression_start(_ndr_ctr1, &_ndr_ctr1_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length));
-                                       NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1_compressed, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
-                                       NDR_CHECK(ndr_pull_compression_end(_ndr_ctr1, _ndr_ctr1_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length));
+                                       struct ndr_pull *_ndr_ts_compressed;
+                                       NDR_CHECK(ndr_pull_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length));
+                                       NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
+                                       NDR_CHECK(ndr_pull_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length));
                                }
-                               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr1, 4, r->compressed_length));
+                               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ts, 4, r->compressed_length));
                        }
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ts_0, 0);
                }
        }
        return NDR_ERR_SUCCESS;
@@ -3045,72 +3047,46 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_print *ndr,
        ndr->depth++;
        ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length);
        ndr_print_uint32(ndr, "compressed_length", r->compressed_length);
-       ndr_print_ptr(ndr, "ctr1", r->ctr1);
+       ndr_print_ptr(ndr, "ts", r->ts);
        ndr->depth++;
-       if (r->ctr1) {
-               ndr_print_drsuapi_DsGetNCChangesCtr1(ndr, "ctr1", r->ctr1);
+       if (r->ts) {
+               ndr_print_drsuapi_DsGetNCChangesCtr1TS(ndr, "ts", r->ts);
        }
        ndr->depth--;
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesXPRESSCtr6 *r)
-{
-       if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->decompressed_length));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->compressed_length));
-               NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr6));
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-               if (r->ctr6) {
-                       {
-                               struct ndr_push *_ndr_ctr6;
-                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ctr6, 4, r->compressed_length));
-                               {
-                                       struct ndr_push *_ndr_ctr6_compressed;
-                                       NDR_CHECK(ndr_push_compression_start(_ndr_ctr6, &_ndr_ctr6_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length));
-                                       NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6_compressed, NDR_SCALARS|NDR_BUFFERS, r->ctr6));
-                                       NDR_CHECK(ndr_push_compression_end(_ndr_ctr6, _ndr_ctr6_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length));
-                               }
-                               NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr6, 4, r->compressed_length));
-                       }
-               }
-       }
-       return NDR_ERR_SUCCESS;
-}
-
 static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesXPRESSCtr6 *r)
 {
-       uint32_t _ptr_ctr6;
-       TALLOC_CTX *_mem_save_ctr6_0;
+       uint32_t _ptr_ts;
+       TALLOC_CTX *_mem_save_ts_0;
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length));
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length));
-               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr6));
-               if (_ptr_ctr6) {
-                       NDR_PULL_ALLOC(ndr, r->ctr6);
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ts));
+               if (_ptr_ts) {
+                       NDR_PULL_ALLOC(ndr, r->ts);
                } else {
-                       r->ctr6 = NULL;
+                       r->ts = NULL;
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
-               if (r->ctr6) {
-                       _mem_save_ctr6_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->ctr6, 0);
+               if (r->ts) {
+                       _mem_save_ts_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->ts, 0);
                        {
-                               struct ndr_pull *_ndr_ctr6;
-                               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ctr6, 4, r->compressed_length));
+                               struct ndr_pull *_ndr_ts;
+                               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ts, 4, r->compressed_length));
                                {
-                                       struct ndr_pull *_ndr_ctr6_compressed;
-                                       NDR_CHECK(ndr_pull_compression_start(_ndr_ctr6, &_ndr_ctr6_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length));
-                                       NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6_compressed, NDR_SCALARS|NDR_BUFFERS, r->ctr6));
-                                       NDR_CHECK(ndr_pull_compression_end(_ndr_ctr6, _ndr_ctr6_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length));
+                                       struct ndr_pull *_ndr_ts_compressed;
+                                       NDR_CHECK(ndr_pull_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length));
+                                       NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
+                                       NDR_CHECK(ndr_pull_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length));
                                }
-                               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr6, 4, r->compressed_length));
+                               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ts, 4, r->compressed_length));
                        }
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr6_0, 0);
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ts_0, 0);
                }
        }
        return NDR_ERR_SUCCESS;
@@ -3122,10 +3098,10 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_print *ndr,
        ndr->depth++;
        ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length);
        ndr_print_uint32(ndr, "compressed_length", r->compressed_length);
-       ndr_print_ptr(ndr, "ctr6", r->ctr6);
+       ndr_print_ptr(ndr, "ts", r->ts);
        ndr->depth++;
-       if (r->ctr6) {
-               ndr_print_drsuapi_DsGetNCChangesCtr6(ndr, "ctr6", r->ctr6);
+       if (r->ts) {
+               ndr_print_drsuapi_DsGetNCChangesCtr6TS(ndr, "ts", r->ts);
        }
        ndr->depth--;
        ndr->depth--;
@@ -3304,11 +3280,10 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr2(struct ndr_push *nd
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, 1 | (DRSUAPI_COMPRESSION_TYPE_MSZIP << 16)));
-               NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_SCALARS, &r->ctr));
+               NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_SCALARS, &r->mszip1));
        }
        if (ndr_flags & NDR_BUFFERS) {
-               NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_BUFFERS, &r->ctr));
+               NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_BUFFERS, &r->mszip1));
        }
        return NDR_ERR_SUCCESS;
 }
@@ -3317,11 +3292,10 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr2(struct ndr_pull *nd
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, 1 | (DRSUAPI_COMPRESSION_TYPE_MSZIP << 16)));
-               NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_SCALARS, &r->ctr));
+               NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_SCALARS, &r->mszip1));
        }
        if (ndr_flags & NDR_BUFFERS) {
-               NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_BUFFERS, &r->ctr));
+               NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_BUFFERS, &r->mszip1));
        }
        return NDR_ERR_SUCCESS;
 }
@@ -3330,8 +3304,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr2(struct ndr_print *ndr, const
 {
        ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr2");
        ndr->depth++;
-       ndr_print_set_switch_value(ndr, &r->ctr, 1 | (DRSUAPI_COMPRESSION_TYPE_MSZIP << 16));
-       ndr_print_drsuapi_DsGetNCChangesCompressedCtr(ndr, "ctr", &r->ctr);
+       ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, "mszip1", &r->mszip1);
        ndr->depth--;
 }
 
@@ -4741,7 +4714,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsNameFormat(struct ndr_print *ndr, const char *
        const char *val = NULL;
 
        switch (r) {
-               case DRSUAPI_DS_NAME_FORMAT_UKNOWN: val = "DRSUAPI_DS_NAME_FORMAT_UKNOWN"; break;
+               case DRSUAPI_DS_NAME_FORMAT_UNKNOWN: val = "DRSUAPI_DS_NAME_FORMAT_UNKNOWN"; break;
                case DRSUAPI_DS_NAME_FORMAT_FQDN_1779: val = "DRSUAPI_DS_NAME_FORMAT_FQDN_1779"; break;
                case DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT: val = "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT"; break;
                case DRSUAPI_DS_NAME_FORMAT_DISPLAY: val = "DRSUAPI_DS_NAME_FORMAT_DISPLAY"; break;
@@ -5609,7 +5582,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServerRequest1(struct ndr_pu
                NDR_CHECK(ndr_push_align(ndr, 4));
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_dn));
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_dn));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->commit));
        }
        if (ndr_flags & NDR_BUFFERS) {
                if (r->server_dn) {
@@ -5648,7 +5621,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServerRequest1(struct ndr_pu
                } else {
                        r->domain_dn = NULL;
                }
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->commit));
        }
        if (ndr_flags & NDR_BUFFERS) {
                if (r->server_dn) {
@@ -5695,7 +5668,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsRemoveDSServerRequest1(struct ndr_print *ndr,
                ndr_print_string(ndr, "domain_dn", r->domain_dn);
        }
        ndr->depth--;
-       ndr_print_uint32(ndr, "unknown", r->unknown);
+       ndr_print_uint32(ndr, "commit", r->commit);
        ndr->depth--;
 }
 
@@ -5778,7 +5751,7 @@ static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServerResult1(struct ndr_pus
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->last_dc_in_domain));
        }
        if (ndr_flags & NDR_BUFFERS) {
        }
@@ -5789,7 +5762,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServerResult1(struct ndr_pul
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->status));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->last_dc_in_domain));
        }
        if (ndr_flags & NDR_BUFFERS) {
        }
@@ -5800,7 +5773,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsRemoveDSServerResult1(struct ndr_print *ndr, c
 {
        ndr_print_struct(ndr, name, "drsuapi_DsRemoveDSServerResult1");
        ndr->depth++;
-       ndr_print_WERROR(ndr, "status", r->status);
+       ndr_print_uint32(ndr, "last_dc_in_domain", r->last_dc_in_domain);
        ndr->depth--;
 }
 
index 6b6a0b5670a52236cdd5765bcd9c817ab19278b2..4b5ead467f156edae5a10e495a6fc405533bb2df 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef _HEADER_NDR_drsuapi
 #define _HEADER_NDR_drsuapi
 
-#include "librpc/ndr/ndr_drsuapi.h"
+#include "../librpc/ndr/ndr_drsuapi.h"
 #define NDR_DRSUAPI_UUID "e3514235-4b06-11d1-ab04-00c04fc2dcd2"
 #define NDR_DRSUAPI_VERSION 4.0
 #define NDR_DRSUAPI_NAME "drsuapi"
@@ -151,9 +151,19 @@ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr6(struct ndr_push *ndr, int
 enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr6 *r);
 void ndr_print_drsuapi_DsGetNCChangesCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr6 *r);
 size_t ndr_size_drsuapi_DsGetNCChangesCtr6(const struct drsuapi_DsGetNCChangesCtr6 *r, int flags);
+enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr1TS(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr1TS *r);
+enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr1TS(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr1TS *r);
+void ndr_print_drsuapi_DsGetNCChangesCtr1TS(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr1TS *r);
+enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr6TS(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr6TS *r);
+enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6TS(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr6TS *r);
+void ndr_print_drsuapi_DsGetNCChangesCtr6TS(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr6TS *r);
+enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesMSZIPCtr1 *r);
 void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesMSZIPCtr1 *r);
+enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesMSZIPCtr6 *r);
 void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesMSZIPCtr6 *r);
+enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesXPRESSCtr1 *r);
 void ndr_print_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesXPRESSCtr1 *r);
+enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesXPRESSCtr6 *r);
 void ndr_print_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesXPRESSCtr6 *r);
 void ndr_print_drsuapi_DsGetNCChangesCompressionType(struct ndr_print *ndr, const char *name, enum drsuapi_DsGetNCChangesCompressionType r);
 void ndr_print_drsuapi_DsGetNCChangesCompressedCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNCChangesCompressedCtr *r);
index b7cead8a2140e4eb51073cddf23fb51736b797d3..0f1005dda71bcdb00590bd623c0f199023aacb00 100644 (file)
@@ -1633,12 +1633,9 @@ static enum ndr_err_code ndr_push_epm_entry_t(struct ndr_push *ndr, int ndr_flag
                NDR_CHECK(ndr_push_align(ndr, 4));
                NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->object));
                NDR_CHECK(ndr_push_full_ptr(ndr, r->tower));
-               {
-                       uint32_t _flags_save_string = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_LEN4);
-                       NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->annotation));
-                       ndr->flags = _flags_save_string;
-               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen(r->annotation) + 1));
+               NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->annotation, strlen(r->annotation) + 1, sizeof(uint8_t), CH_DOS));
        }
        if (ndr_flags & NDR_BUFFERS) {
                if (r->tower) {
@@ -1661,12 +1658,9 @@ static enum ndr_err_code ndr_pull_epm_entry_t(struct ndr_pull *ndr, int ndr_flag
                } else {
                        r->tower = NULL;
                }
-               {
-                       uint32_t _flags_save_string = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_LEN4);
-                       NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->annotation));
-                       ndr->flags = _flags_save_string;
-               }
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__annotation_offset));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__annotation_length));
+               NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->annotation, r->__annotation_length, sizeof(uint8_t), CH_DOS));
        }
        if (ndr_flags & NDR_BUFFERS) {
                if (r->tower) {
@@ -1690,6 +1684,8 @@ _PUBLIC_ void ndr_print_epm_entry_t(struct ndr_print *ndr, const char *name, con
                ndr_print_epm_twr_t(ndr, "tower", r->tower);
        }
        ndr->depth--;
+       ndr_print_uint32(ndr, "__annotation_offset", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->__annotation_offset);
+       ndr_print_uint32(ndr, "__annotation_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->annotation) + 1:r->__annotation_length);
        ndr_print_string(ndr, "annotation", r->annotation);
        ndr->depth--;
 }
index 271dac12b0ebd231324bf5e49a57962bed466b28..62a19af3a262a340e9ff4287cc74233b75117182 100644 (file)
@@ -4,106 +4,6 @@
 #include "librpc/gen_ndr/ndr_initshutdown.h"
 
 #include "librpc/gen_ndr/ndr_lsa.h"
-static enum ndr_err_code ndr_push_initshutdown_String_sub(struct ndr_push *ndr, int ndr_flags, const struct initshutdown_String_sub *r)
-{
-       if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term(r->name)));
-               {
-                       uint32_t _flags_save_string = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_LEN4|LIBNDR_FLAG_STR_NOTERM);
-                       NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name));
-                       ndr->flags = _flags_save_string;
-               }
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_initshutdown_String_sub(struct ndr_pull *ndr, int ndr_flags, struct initshutdown_String_sub *r)
-{
-       if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->name_size));
-               {
-                       uint32_t _flags_save_string = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_LEN4|LIBNDR_FLAG_STR_NOTERM);
-                       NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name));
-                       ndr->flags = _flags_save_string;
-               }
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_initshutdown_String_sub(struct ndr_print *ndr, const char *name, const struct initshutdown_String_sub *r)
-{
-       ndr_print_struct(ndr, name, "initshutdown_String_sub");
-       ndr->depth++;
-       ndr_print_uint32(ndr, "name_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name):r->name_size);
-       ndr_print_string(ndr, "name", r->name);
-       ndr->depth--;
-}
-
-_PUBLIC_ enum ndr_err_code ndr_push_initshutdown_String(struct ndr_push *ndr, int ndr_flags, const struct initshutdown_String *r)
-{
-       if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->name->name) * 2));
-               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name->name) * 2));
-               NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-               if (r->name) {
-                       NDR_CHECK(ndr_push_initshutdown_String_sub(ndr, NDR_SCALARS, r->name));
-               }
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ enum ndr_err_code ndr_pull_initshutdown_String(struct ndr_pull *ndr, int ndr_flags, struct initshutdown_String *r)
-{
-       uint32_t _ptr_name;
-       TALLOC_CTX *_mem_save_name_0;
-       if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->name_len));
-               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->name_size));
-               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
-               if (_ptr_name) {
-                       NDR_PULL_ALLOC(ndr, r->name);
-               } else {
-                       r->name = NULL;
-               }
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-               if (r->name) {
-                       _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
-                       NDR_CHECK(ndr_pull_initshutdown_String_sub(ndr, NDR_SCALARS, r->name));
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
-               }
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_initshutdown_String(struct ndr_print *ndr, const char *name, const struct initshutdown_String *r)
-{
-       ndr_print_struct(ndr, name, "initshutdown_String");
-       ndr->depth++;
-       ndr_print_uint16(ndr, "name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->name->name) * 2:r->name_len);
-       ndr_print_uint16(ndr, "name_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name->name) * 2:r->name_size);
-       ndr_print_ptr(ndr, "name", r->name);
-       ndr->depth++;
-       if (r->name) {
-               ndr_print_initshutdown_String_sub(ndr, "name", r->name);
-       }
-       ndr->depth--;
-       ndr->depth--;
-}
-
 static enum ndr_err_code ndr_push_initshutdown_Init(struct ndr_push *ndr, int flags, const struct initshutdown_Init *r)
 {
        if (flags & NDR_IN) {
@@ -113,7 +13,7 @@ static enum ndr_err_code ndr_push_initshutdown_Init(struct ndr_push *ndr, int fl
                }
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message));
                if (r->in.message) {
-                       NDR_CHECK(ndr_push_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
+                       NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
                }
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout));
                NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps));
@@ -153,7 +53,7 @@ static enum ndr_err_code ndr_pull_initshutdown_Init(struct ndr_pull *ndr, int fl
                if (r->in.message) {
                        _mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr);
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0);
-                       NDR_CHECK(ndr_pull_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
+                       NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0);
                }
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout));
@@ -185,7 +85,7 @@ _PUBLIC_ void ndr_print_initshutdown_Init(struct ndr_print *ndr, const char *nam
                ndr_print_ptr(ndr, "message", r->in.message);
                ndr->depth++;
                if (r->in.message) {
-                       ndr_print_initshutdown_String(ndr, "message", r->in.message);
+                       ndr_print_lsa_StringLarge(ndr, "message", r->in.message);
                }
                ndr->depth--;
                ndr_print_uint32(ndr, "timeout", r->in.timeout);
@@ -276,7 +176,7 @@ static enum ndr_err_code ndr_push_initshutdown_InitEx(struct ndr_push *ndr, int
                }
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message));
                if (r->in.message) {
-                       NDR_CHECK(ndr_push_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
+                       NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
                }
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout));
                NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps));
@@ -317,7 +217,7 @@ static enum ndr_err_code ndr_pull_initshutdown_InitEx(struct ndr_pull *ndr, int
                if (r->in.message) {
                        _mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr);
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0);
-                       NDR_CHECK(ndr_pull_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
+                       NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0);
                }
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout));
@@ -350,7 +250,7 @@ _PUBLIC_ void ndr_print_initshutdown_InitEx(struct ndr_print *ndr, const char *n
                ndr_print_ptr(ndr, "message", r->in.message);
                ndr->depth++;
                if (r->in.message) {
-                       ndr_print_initshutdown_String(ndr, "message", r->in.message);
+                       ndr_print_lsa_StringLarge(ndr, "message", r->in.message);
                }
                ndr->depth--;
                ndr_print_uint32(ndr, "timeout", r->in.timeout);
index 9a194326781af8fe9db067a018a0e111b1c32200..2cb5a530b03b8b663025a0f24e4200af0a8119d4 100644 (file)
@@ -18,10 +18,6 @@ extern const struct ndr_interface_table ndr_table_initshutdown;
 #define NDR_INITSHUTDOWN_INITEX (0x02)
 
 #define NDR_INITSHUTDOWN_CALL_COUNT (3)
-void ndr_print_initshutdown_String_sub(struct ndr_print *ndr, const char *name, const struct initshutdown_String_sub *r);
-enum ndr_err_code ndr_push_initshutdown_String(struct ndr_push *ndr, int ndr_flags, const struct initshutdown_String *r);
-enum ndr_err_code ndr_pull_initshutdown_String(struct ndr_pull *ndr, int ndr_flags, struct initshutdown_String *r);
-void ndr_print_initshutdown_String(struct ndr_print *ndr, const char *name, const struct initshutdown_String *r);
 void ndr_print_initshutdown_Init(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_Init *r);
 void ndr_print_initshutdown_Abort(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_Abort *r);
 void ndr_print_initshutdown_InitEx(struct ndr_print *ndr, const char *name, int flags, const struct initshutdown_InitEx *r);
index b5dd2a0bc1132140834e9cd043771c2d74904170..ffa4d7df773bee5509d75c31a1d8526005c2b836 100644 (file)
@@ -1198,7 +1198,7 @@ static enum ndr_err_code ndr_push_lsa_ModificationInfo(struct ndr_push *ndr, int
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 8));
                NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->modified_id));
-               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->db_create_time));
+               NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->db_create_time));
        }
        if (ndr_flags & NDR_BUFFERS) {
        }
@@ -1210,7 +1210,7 @@ static enum ndr_err_code ndr_pull_lsa_ModificationInfo(struct ndr_pull *ndr, int
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 8));
                NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->modified_id));
-               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->db_create_time));
+               NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->db_create_time));
        }
        if (ndr_flags & NDR_BUFFERS) {
        }
@@ -1222,7 +1222,7 @@ _PUBLIC_ void ndr_print_lsa_ModificationInfo(struct ndr_print *ndr, const char *
        ndr_print_struct(ndr, name, "lsa_ModificationInfo");
        ndr->depth++;
        ndr_print_hyper(ndr, "modified_id", r->modified_id);
-       ndr_print_NTTIME(ndr, "db_create_time", r->db_create_time);
+       ndr_print_NTTIME_hyper(ndr, "db_create_time", r->db_create_time);
        ndr->depth--;
 }
 
@@ -1392,6 +1392,7 @@ _PUBLIC_ void ndr_print_lsa_PolicyInfo(struct ndr_print *ndr, const char *name,
                case LSA_POLICY_INFO_AUDIT_FULL_SET: val = "LSA_POLICY_INFO_AUDIT_FULL_SET"; break;
                case LSA_POLICY_INFO_AUDIT_FULL_QUERY: val = "LSA_POLICY_INFO_AUDIT_FULL_QUERY"; break;
                case LSA_POLICY_INFO_DNS: val = "LSA_POLICY_INFO_DNS"; break;
+               case LSA_POLICY_INFO_DNS_INT: val = "LSA_POLICY_INFO_DNS_INT"; break;
        }
        ndr_print_enum(ndr, name, "ENUM", val, r);
 }
@@ -1450,6 +1451,10 @@ static enum ndr_err_code ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, in
                                NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
                        break; }
 
+                       case LSA_POLICY_INFO_DNS_INT: {
+                               NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
+                       break; }
+
                        default:
                                return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
                }
@@ -1499,6 +1504,10 @@ static enum ndr_err_code ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, in
                                NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
                        break;
 
+                       case LSA_POLICY_INFO_DNS_INT:
+                               NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
+                       break;
+
                        default:
                                return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
                }
@@ -1565,6 +1574,10 @@ static enum ndr_err_code ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, in
                                NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
                        break; }
 
+                       case LSA_POLICY_INFO_DNS_INT: {
+                               NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
+                       break; }
+
                        default:
                                return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
                }
@@ -1613,6 +1626,10 @@ static enum ndr_err_code ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, in
                                NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
                        break;
 
+                       case LSA_POLICY_INFO_DNS_INT:
+                               NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
+                       break;
+
                        default:
                                return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
                }
@@ -1674,6 +1691,10 @@ _PUBLIC_ void ndr_print_lsa_PolicyInformation(struct ndr_print *ndr, const char
                        ndr_print_lsa_DnsDomainInfo(ndr, "dns", &r->dns);
                break;
 
+               case LSA_POLICY_INFO_DNS_INT:
+                       ndr_print_lsa_DnsDomainInfo(ndr, "dns", &r->dns);
+               break;
+
                default:
                        ndr_print_bad_level(ndr, name, level);
        }
@@ -2174,6 +2195,7 @@ _PUBLIC_ void ndr_print_lsa_LookupNamesLevel(struct ndr_print *ndr, const char *
                case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY: val = "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY"; break;
                case LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY: val = "LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY"; break;
                case LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2: val = "LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2"; break;
+               case LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC: val = "LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC"; break;
        }
        ndr_print_enum(ndr, name, "ENUM", val, r);
 }
@@ -2588,19 +2610,100 @@ _PUBLIC_ void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print *ndr, const char *
 
        switch (r) {
                case LSA_TRUSTED_DOMAIN_INFO_NAME: val = "LSA_TRUSTED_DOMAIN_INFO_NAME"; break;
-               case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS_INFO: val = "LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS_INFO"; break;
+               case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: val = "LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS"; break;
                case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: val = "LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET"; break;
                case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: val = "LSA_TRUSTED_DOMAIN_INFO_PASSWORD"; break;
                case LSA_TRUSTED_DOMAIN_INFO_BASIC: val = "LSA_TRUSTED_DOMAIN_INFO_BASIC"; break;
                case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: val = "LSA_TRUSTED_DOMAIN_INFO_INFO_EX"; break;
                case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: val = "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO"; break;
                case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO"; break;
-               case LSA_TRUSTED_DOMAIN_INFO_11: val = "LSA_TRUSTED_DOMAIN_INFO_11"; break;
-               case LSA_TRUSTED_DOMAIN_INFO_INFO_ALL: val = "LSA_TRUSTED_DOMAIN_INFO_INFO_ALL"; break;
+               case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL"; break;
+               case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL"; break;
+               case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL"; break;
+               case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL"; break;
+               case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: val = "LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES"; break;
        }
        ndr_print_enum(ndr, name, "ENUM", val, r);
 }
 
+_PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustDirection(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustDirection(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+       uint32_t v;
+       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_lsa_TrustDirection(struct ndr_print *ndr, const char *name, uint32_t r)
+{
+       ndr_print_uint32(ndr, name, r);
+       ndr->depth++;
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_DIRECTION_INBOUND", LSA_TRUST_DIRECTION_INBOUND, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_DIRECTION_OUTBOUND", LSA_TRUST_DIRECTION_OUTBOUND, r);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_lsa_TrustType(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustType r)
+{
+       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_lsa_TrustType(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustType *r)
+{
+       uint32_t v;
+       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_lsa_TrustType(struct ndr_print *ndr, const char *name, enum lsa_TrustType r)
+{
+       const char *val = NULL;
+
+       switch (r) {
+               case LSA_TRUST_TYPE_DOWNLEVEL: val = "LSA_TRUST_TYPE_DOWNLEVEL"; break;
+               case LSA_TRUST_TYPE_UPLEVEL: val = "LSA_TRUST_TYPE_UPLEVEL"; break;
+               case LSA_TRUST_TYPE_MIT: val = "LSA_TRUST_TYPE_MIT"; break;
+       }
+       ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustAttributes(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustAttributes(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+       uint32_t v;
+       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_lsa_TrustAttributes(struct ndr_print *ndr, const char *name, uint32_t r)
+{
+       ndr_print_uint32(ndr, name, r);
+       ndr->depth++;
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE", LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY", LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN", LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE", LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION", LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_WITHIN_FOREST", LSA_TRUST_ATTRIBUTE_WITHIN_FOREST, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL", LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION", LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION, r);
+       ndr->depth--;
+}
+
 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoName(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoName *r)
 {
        if (ndr_flags & NDR_SCALARS) {
@@ -2633,6 +2736,92 @@ _PUBLIC_ void ndr_print_lsa_TrustDomainInfoName(struct ndr_print *ndr, const cha
        ndr->depth--;
 }
 
+static enum ndr_err_code ndr_push_lsa_TrustDomainInfoControllers(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoControllers *r)
+{
+       uint32_t cntr_netbios_names_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entries));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->netbios_names));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->netbios_names) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entries));
+                       for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) {
+                               NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_names[cntr_netbios_names_1]));
+                       }
+                       for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) {
+                               NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_names[cntr_netbios_names_1]));
+                       }
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoControllers(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoControllers *r)
+{
+       uint32_t _ptr_netbios_names;
+       uint32_t cntr_netbios_names_1;
+       TALLOC_CTX *_mem_save_netbios_names_0;
+       TALLOC_CTX *_mem_save_netbios_names_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->entries));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_netbios_names));
+               if (_ptr_netbios_names) {
+                       NDR_PULL_ALLOC(ndr, r->netbios_names);
+               } else {
+                       r->netbios_names = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->netbios_names) {
+                       _mem_save_netbios_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->netbios_names, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->netbios_names));
+                       NDR_PULL_ALLOC_N(ndr, r->netbios_names, ndr_get_array_size(ndr, &r->netbios_names));
+                       _mem_save_netbios_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->netbios_names, 0);
+                       for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) {
+                               NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_names[cntr_netbios_names_1]));
+                       }
+                       for (cntr_netbios_names_1 = 0; cntr_netbios_names_1 < r->entries; cntr_netbios_names_1++) {
+                               NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_names[cntr_netbios_names_1]));
+                       }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_names_1, 0);
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_names_0, 0);
+               }
+               if (r->netbios_names) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->netbios_names, r->entries));
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoControllers(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoControllers *r)
+{
+       uint32_t cntr_netbios_names_1;
+       ndr_print_struct(ndr, name, "lsa_TrustDomainInfoControllers");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "entries", r->entries);
+       ndr_print_ptr(ndr, "netbios_names", r->netbios_names);
+       ndr->depth++;
+       if (r->netbios_names) {
+               ndr->print(ndr, "%s: ARRAY(%d)", "netbios_names", (int)r->entries);
+               ndr->depth++;
+               for (cntr_netbios_names_1=0;cntr_netbios_names_1<r->entries;cntr_netbios_names_1++) {
+                       char *idx_1=NULL;
+                       if (asprintf(&idx_1, "[%d]", cntr_netbios_names_1) != -1) {
+                               ndr_print_lsa_StringLarge(ndr, "netbios_names", &r->netbios_names[cntr_netbios_names_1]);
+                               free(idx_1);
+                       }
+               }
+               ndr->depth--;
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoPosixOffset(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoPosixOffset *r)
 {
        if (ndr_flags & NDR_SCALARS) {
@@ -2801,9 +2990,9 @@ static enum ndr_err_code ndr_push_lsa_TrustDomainInfoInfoEx(struct ndr_push *ndr
                NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->domain_name));
                NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->trust_direction));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->trust_type));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->trust_attributes));
+               NDR_CHECK(ndr_push_lsa_TrustDirection(ndr, NDR_SCALARS, r->trust_direction));
+               NDR_CHECK(ndr_push_lsa_TrustType(ndr, NDR_SCALARS, r->trust_type));
+               NDR_CHECK(ndr_push_lsa_TrustAttributes(ndr, NDR_SCALARS, r->trust_attributes));
        }
        if (ndr_flags & NDR_BUFFERS) {
                NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domain_name));
@@ -2829,9 +3018,9 @@ static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoInfoEx(struct ndr_pull *ndr
                } else {
                        r->sid = NULL;
                }
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->trust_direction));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->trust_type));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->trust_attributes));
+               NDR_CHECK(ndr_pull_lsa_TrustDirection(ndr, NDR_SCALARS, &r->trust_direction));
+               NDR_CHECK(ndr_pull_lsa_TrustType(ndr, NDR_SCALARS, &r->trust_type));
+               NDR_CHECK(ndr_pull_lsa_TrustAttributes(ndr, NDR_SCALARS, &r->trust_attributes));
        }
        if (ndr_flags & NDR_BUFFERS) {
                NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domain_name));
@@ -2858,18 +3047,45 @@ _PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx(struct ndr_print *ndr, const c
                ndr_print_dom_sid2(ndr, "sid", r->sid);
        }
        ndr->depth--;
-       ndr_print_uint32(ndr, "trust_direction", r->trust_direction);
-       ndr_print_uint32(ndr, "trust_type", r->trust_type);
-       ndr_print_uint32(ndr, "trust_attributes", r->trust_attributes);
+       ndr_print_lsa_TrustDirection(ndr, "trust_direction", r->trust_direction);
+       ndr_print_lsa_TrustType(ndr, "trust_type", r->trust_type);
+       ndr_print_lsa_TrustAttributes(ndr, "trust_attributes", r->trust_attributes);
        ndr->depth--;
 }
 
+_PUBLIC_ enum ndr_err_code ndr_push_lsa_TrustAuthType(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustAuthType r)
+{
+       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_lsa_TrustAuthType(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustAuthType *r)
+{
+       uint32_t v;
+       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_lsa_TrustAuthType(struct ndr_print *ndr, const char *name, enum lsa_TrustAuthType r)
+{
+       const char *val = NULL;
+
+       switch (r) {
+               case TRUST_AUTH_TYPE_NONE: val = "TRUST_AUTH_TYPE_NONE"; break;
+               case TRUST_AUTH_TYPE_NT4OWF: val = "TRUST_AUTH_TYPE_NT4OWF"; break;
+               case TRUST_AUTH_TYPE_CLEAR: val = "TRUST_AUTH_TYPE_CLEAR"; break;
+               case TRUST_AUTH_TYPE_VERSION: val = "TRUST_AUTH_TYPE_VERSION"; break;
+       }
+       ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
 static enum ndr_err_code ndr_push_lsa_TrustDomainInfoBuffer(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoBuffer *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 8));
                NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->last_update_time));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->secret_type));
+               NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr, NDR_SCALARS, r->AuthType));
                NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data));
        }
        if (ndr_flags & NDR_BUFFERS) {
@@ -2883,7 +3099,7 @@ static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoBuffer(struct ndr_pull *ndr
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 8));
                NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->last_update_time));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->secret_type));
+               NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr, NDR_SCALARS, &r->AuthType));
                NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data));
        }
        if (ndr_flags & NDR_BUFFERS) {
@@ -2897,7 +3113,7 @@ _PUBLIC_ void ndr_print_lsa_TrustDomainInfoBuffer(struct ndr_print *ndr, const c
        ndr_print_struct(ndr, name, "lsa_TrustDomainInfoBuffer");
        ndr->depth++;
        ndr_print_NTTIME_hyper(ndr, "last_update_time", r->last_update_time);
-       ndr_print_uint32(ndr, "secret_type", r->secret_type);
+       ndr_print_lsa_TrustAuthType(ndr, "AuthType", r->AuthType);
        ndr_print_lsa_DATA_BUF2(ndr, "data", &r->data);
        ndr->depth--;
 }
@@ -3071,88 +3287,213 @@ _PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo(struct ndr_print *ndr, const
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_lsa_TrustDomainInfo11(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfo11 *r)
+static enum ndr_err_code ndr_push_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoAuthInfoInternal *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->auth_blob));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->auth_blob));
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoAuthInfoInternal *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->auth_blob));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->auth_blob));
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfoInternal *r)
+{
+       ndr_print_struct(ndr, name, "lsa_TrustDomainInfoAuthInfoInternal");
+       ndr->depth++;
+       ndr_print_lsa_DATA_BUF2(ndr, "auth_blob", &r->auth_blob);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfoInternal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfoInternal *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
                NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
-               NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data1));
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info));
        }
        if (ndr_flags & NDR_BUFFERS) {
                NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
-               NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data1));
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info));
        }
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_lsa_TrustDomainInfo11(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfo11 *r)
+static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfoInternal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfoInternal *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
                NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
-               NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data1));
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info));
        }
        if (ndr_flags & NDR_BUFFERS) {
                NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
-               NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data1));
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info));
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_lsa_TrustDomainInfo11(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfo11 *r)
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfoInternal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfoInternal *r)
 {
-       ndr_print_struct(ndr, name, "lsa_TrustDomainInfo11");
+       ndr_print_struct(ndr, name, "lsa_TrustDomainInfoFullInfoInternal");
        ndr->depth++;
        ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
-       ndr_print_lsa_DATA_BUF2(ndr, "data1", &r->data1);
+       ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
+       ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info", &r->auth_info);
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_lsa_TrustDomainInfoInfoAll(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoInfoAll *r)
+static enum ndr_err_code ndr_push_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoInfoEx2Internal *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
                NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
-               NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data1));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->forest_trust_length));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->forest_trust_data));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
+               if (r->forest_trust_data) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->forest_trust_length));
+                       NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->forest_trust_data, r->forest_trust_length));
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoInfoEx2Internal *r)
+{
+       uint32_t _ptr_forest_trust_data;
+       TALLOC_CTX *_mem_save_forest_trust_data_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->forest_trust_length));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest_trust_data));
+               if (_ptr_forest_trust_data) {
+                       NDR_PULL_ALLOC(ndr, r->forest_trust_data);
+               } else {
+                       r->forest_trust_data = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
+               if (r->forest_trust_data) {
+                       _mem_save_forest_trust_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->forest_trust_data, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->forest_trust_data));
+                       NDR_PULL_ALLOC_N(ndr, r->forest_trust_data, ndr_get_array_size(ndr, &r->forest_trust_data));
+                       NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->forest_trust_data, ndr_get_array_size(ndr, &r->forest_trust_data)));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_trust_data_0, 0);
+               }
+               if (r->forest_trust_data) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->forest_trust_data, r->forest_trust_length));
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx2Internal *r)
+{
+       ndr_print_struct(ndr, name, "lsa_TrustDomainInfoInfoEx2Internal");
+       ndr->depth++;
+       ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
+       ndr_print_uint32(ndr, "forest_trust_length", r->forest_trust_length);
+       ndr_print_ptr(ndr, "forest_trust_data", r->forest_trust_data);
+       ndr->depth++;
+       if (r->forest_trust_data) {
+               ndr_print_array_uint8(ndr, "forest_trust_data", r->forest_trust_data, r->forest_trust_length);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfo2Internal *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info));
                NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
                NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
        }
        if (ndr_flags & NDR_BUFFERS) {
-               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
-               NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data1));
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info));
                NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
        }
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoInfoAll(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoInfoAll *r)
+static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfo2Internal *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
-               NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data1));
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info));
                NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
                NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
        }
        if (ndr_flags & NDR_BUFFERS) {
-               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
-               NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data1));
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info));
                NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoAll(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoAll *r)
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo2Internal *r)
 {
-       ndr_print_struct(ndr, name, "lsa_TrustDomainInfoInfoAll");
+       ndr_print_struct(ndr, name, "lsa_TrustDomainInfoFullInfo2Internal");
        ndr->depth++;
-       ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
-       ndr_print_lsa_DATA_BUF2(ndr, "data1", &r->data1);
+       ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr, "info", &r->info);
        ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
        ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, "auth_info", &r->auth_info);
        ndr->depth--;
 }
 
+static enum ndr_err_code ndr_push_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoSupportedEncTypes *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_kerb_EncTypes(ndr, NDR_SCALARS, r->enc_types));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoSupportedEncTypes *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_kerb_EncTypes(ndr, NDR_SCALARS, &r->enc_types));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoSupportedEncTypes *r)
+{
+       ndr_print_struct(ndr, name, "lsa_TrustDomainInfoSupportedEncTypes");
+       ndr->depth++;
+       ndr_print_kerb_EncTypes(ndr, "enc_types", r->enc_types);
+       ndr->depth--;
+}
+
 static enum ndr_err_code ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, int ndr_flags, const union lsa_TrustedDomainInfo *r)
 {
        if (ndr_flags & NDR_SCALARS) {
@@ -3163,6 +3504,10 @@ static enum ndr_err_code ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, in
                                NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr, NDR_SCALARS, &r->name));
                        break; }
 
+                       case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: {
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr, NDR_SCALARS, &r->controllers));
+                       break; }
+
                        case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: {
                                NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
                        break; }
@@ -3187,12 +3532,24 @@ static enum ndr_err_code ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, in
                                NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr, NDR_SCALARS, &r->full_info));
                        break; }
 
-                       case LSA_TRUSTED_DOMAIN_INFO_11: {
-                               NDR_CHECK(ndr_push_lsa_TrustDomainInfo11(ndr, NDR_SCALARS, &r->info11));
+                       case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: {
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info_internal));
+                       break; }
+
+                       case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: {
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_SCALARS, &r->full_info_internal));
+                       break; }
+
+                       case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: {
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info_ex2_internal));
                        break; }
 
-                       case LSA_TRUSTED_DOMAIN_INFO_INFO_ALL: {
-                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoAll(ndr, NDR_SCALARS, &r->info_all));
+                       case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: {
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_SCALARS, &r->full_info2_internal));
+                       break; }
+
+                       case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: {
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoSupportedEncTypes(ndr, NDR_SCALARS, &r->enc_types));
                        break; }
 
                        default:
@@ -3206,6 +3563,10 @@ static enum ndr_err_code ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, in
                                NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr, NDR_BUFFERS, &r->name));
                        break;
 
+                       case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoControllers(ndr, NDR_BUFFERS, &r->controllers));
+                       break;
+
                        case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
                        break;
 
@@ -3229,12 +3590,23 @@ static enum ndr_err_code ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, in
                                NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr, NDR_BUFFERS, &r->full_info));
                        break;
 
-                       case LSA_TRUSTED_DOMAIN_INFO_11:
-                               NDR_CHECK(ndr_push_lsa_TrustDomainInfo11(ndr, NDR_BUFFERS, &r->info11));
+                       case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info_internal));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_BUFFERS, &r->full_info_internal));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info_ex2_internal));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_BUFFERS, &r->full_info2_internal));
                        break;
 
-                       case LSA_TRUSTED_DOMAIN_INFO_INFO_ALL:
-                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoAll(ndr, NDR_BUFFERS, &r->info_all));
+                       case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES:
                        break;
 
                        default:
@@ -3259,6 +3631,10 @@ static enum ndr_err_code ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull *ndr, in
                                NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr, NDR_SCALARS, &r->name));
                        break; }
 
+                       case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS: {
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr, NDR_SCALARS, &r->controllers));
+                       break; }
+
                        case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: {
                                NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
                        break; }
@@ -3283,12 +3659,24 @@ static enum ndr_err_code ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull *ndr, in
                                NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr, NDR_SCALARS, &r->full_info));
                        break; }
 
-                       case LSA_TRUSTED_DOMAIN_INFO_11: {
-                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfo11(ndr, NDR_SCALARS, &r->info11));
+                       case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL: {
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS, &r->auth_info_internal));
+                       break; }
+
+                       case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL: {
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_SCALARS, &r->full_info_internal));
                        break; }
 
-                       case LSA_TRUSTED_DOMAIN_INFO_INFO_ALL: {
-                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoAll(ndr, NDR_SCALARS, &r->info_all));
+                       case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL: {
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_SCALARS, &r->info_ex2_internal));
+                       break; }
+
+                       case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL: {
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_SCALARS, &r->full_info2_internal));
+                       break; }
+
+                       case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES: {
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoSupportedEncTypes(ndr, NDR_SCALARS, &r->enc_types));
                        break; }
 
                        default:
@@ -3301,6 +3689,10 @@ static enum ndr_err_code ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull *ndr, in
                                NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr, NDR_BUFFERS, &r->name));
                        break;
 
+                       case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS:
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoControllers(ndr, NDR_BUFFERS, &r->controllers));
+                       break;
+
                        case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
                        break;
 
@@ -3324,12 +3716,23 @@ static enum ndr_err_code ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull *ndr, in
                                NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr, NDR_BUFFERS, &r->full_info));
                        break;
 
-                       case LSA_TRUSTED_DOMAIN_INFO_11:
-                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfo11(ndr, NDR_BUFFERS, &r->info11));
+                       case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL:
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_BUFFERS, &r->auth_info_internal));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL:
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfoInternal(ndr, NDR_BUFFERS, &r->full_info_internal));
                        break;
 
-                       case LSA_TRUSTED_DOMAIN_INFO_INFO_ALL:
-                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoAll(ndr, NDR_BUFFERS, &r->info_all));
+                       case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL:
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx2Internal(ndr, NDR_BUFFERS, &r->info_ex2_internal));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL:
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo2Internal(ndr, NDR_BUFFERS, &r->full_info2_internal));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES:
                        break;
 
                        default:
@@ -3349,6 +3752,10 @@ _PUBLIC_ void ndr_print_lsa_TrustedDomainInfo(struct ndr_print *ndr, const char
                        ndr_print_lsa_TrustDomainInfoName(ndr, "name", &r->name);
                break;
 
+               case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS:
+                       ndr_print_lsa_TrustDomainInfoControllers(ndr, "controllers", &r->controllers);
+               break;
+
                case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
                        ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
                break;
@@ -3373,12 +3780,24 @@ _PUBLIC_ void ndr_print_lsa_TrustedDomainInfo(struct ndr_print *ndr, const char
                        ndr_print_lsa_TrustDomainInfoFullInfo(ndr, "full_info", &r->full_info);
                break;
 
-               case LSA_TRUSTED_DOMAIN_INFO_11:
-                       ndr_print_lsa_TrustDomainInfo11(ndr, "info11", &r->info11);
+               case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL:
+                       ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info_internal", &r->auth_info_internal);
+               break;
+
+               case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL:
+                       ndr_print_lsa_TrustDomainInfoFullInfoInternal(ndr, "full_info_internal", &r->full_info_internal);
                break;
 
-               case LSA_TRUSTED_DOMAIN_INFO_INFO_ALL:
-                       ndr_print_lsa_TrustDomainInfoInfoAll(ndr, "info_all", &r->info_all);
+               case LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL:
+                       ndr_print_lsa_TrustDomainInfoInfoEx2Internal(ndr, "info_ex2_internal", &r->info_ex2_internal);
+               break;
+
+               case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL:
+                       ndr_print_lsa_TrustDomainInfoFullInfo2Internal(ndr, "full_info2_internal", &r->full_info2_internal);
+               break;
+
+               case LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES:
+                       ndr_print_lsa_TrustDomainInfoSupportedEncTypes(ndr, "enc_types", &r->enc_types);
                break;
 
                default:
@@ -4069,7 +4488,7 @@ static enum ndr_err_code ndr_push_lsa_TranslatedSid3(struct ndr_push *ndr, int n
                NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
        }
        if (ndr_flags & NDR_BUFFERS) {
                if (r->sid) {
@@ -4093,7 +4512,7 @@ static enum ndr_err_code ndr_pull_lsa_TranslatedSid3(struct ndr_pull *ndr, int n
                        r->sid = NULL;
                }
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
        }
        if (ndr_flags & NDR_BUFFERS) {
                if (r->sid) {
@@ -4118,7 +4537,7 @@ _PUBLIC_ void ndr_print_lsa_TranslatedSid3(struct ndr_print *ndr, const char *na
        }
        ndr->depth--;
        ndr_print_uint32(ndr, "sid_index", r->sid_index);
-       ndr_print_uint32(ndr, "unknown", r->unknown);
+       ndr_print_uint32(ndr, "flags", r->flags);
        ndr->depth--;
 }
 
@@ -7098,6 +7517,16 @@ _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfo(struct ndr_print *ndr, const
 static enum ndr_err_code ndr_push_lsa_SetInformationTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_SetInformationTrustedDomain *r)
 {
        if (flags & NDR_IN) {
+               if (r->in.trustdom_handle == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle));
+               NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
+               if (r->in.info == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
+               NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
        }
        if (flags & NDR_OUT) {
                NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
@@ -7107,7 +7536,25 @@ static enum ndr_err_code ndr_push_lsa_SetInformationTrustedDomain(struct ndr_pus
 
 static enum ndr_err_code ndr_pull_lsa_SetInformationTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_SetInformationTrustedDomain *r)
 {
+       TALLOC_CTX *_mem_save_trustdom_handle_0;
+       TALLOC_CTX *_mem_save_info_0;
        if (flags & NDR_IN) {
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.trustdom_handle);
+               }
+               _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.trustdom_handle));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.info);
+               }
+               _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
+               NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
        }
        if (flags & NDR_OUT) {
                NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
@@ -7125,6 +7572,16 @@ _PUBLIC_ void ndr_print_lsa_SetInformationTrustedDomain(struct ndr_print *ndr, c
        if (flags & NDR_IN) {
                ndr_print_struct(ndr, "in", "lsa_SetInformationTrustedDomain");
                ndr->depth++;
+               ndr_print_ptr(ndr, "trustdom_handle", r->in.trustdom_handle);
+               ndr->depth++;
+               ndr_print_policy_handle(ndr, "trustdom_handle", r->in.trustdom_handle);
+               ndr->depth--;
+               ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
+               ndr_print_ptr(ndr, "info", r->in.info);
+               ndr->depth++;
+               ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
+               ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->in.info);
+               ndr->depth--;
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
@@ -8486,6 +8943,20 @@ _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoBySid(struct ndr_print *ndr, c
 static enum ndr_err_code ndr_push_lsa_SetTrustedDomainInfo(struct ndr_push *ndr, int flags, const struct lsa_SetTrustedDomainInfo *r)
 {
        if (flags & NDR_IN) {
+               if (r->in.handle == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
+               if (r->in.dom_sid == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
+               NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
+               if (r->in.info == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
+               NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
        }
        if (flags & NDR_OUT) {
                NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
@@ -8495,7 +8966,33 @@ static enum ndr_err_code ndr_push_lsa_SetTrustedDomainInfo(struct ndr_push *ndr,
 
 static enum ndr_err_code ndr_pull_lsa_SetTrustedDomainInfo(struct ndr_pull *ndr, int flags, struct lsa_SetTrustedDomainInfo *r)
 {
+       TALLOC_CTX *_mem_save_handle_0;
+       TALLOC_CTX *_mem_save_dom_sid_0;
+       TALLOC_CTX *_mem_save_info_0;
        if (flags & NDR_IN) {
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.handle);
+               }
+               _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.dom_sid);
+               }
+               _mem_save_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_sid, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_sid_0, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.info);
+               }
+               _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
+               NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
        }
        if (flags & NDR_OUT) {
                NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
@@ -8513,6 +9010,20 @@ _PUBLIC_ void ndr_print_lsa_SetTrustedDomainInfo(struct ndr_print *ndr, const ch
        if (flags & NDR_IN) {
                ndr_print_struct(ndr, "in", "lsa_SetTrustedDomainInfo");
                ndr->depth++;
+               ndr_print_ptr(ndr, "handle", r->in.handle);
+               ndr->depth++;
+               ndr_print_policy_handle(ndr, "handle", r->in.handle);
+               ndr->depth--;
+               ndr_print_ptr(ndr, "dom_sid", r->in.dom_sid);
+               ndr->depth++;
+               ndr_print_dom_sid2(ndr, "dom_sid", r->in.dom_sid);
+               ndr->depth--;
+               ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
+               ndr_print_ptr(ndr, "info", r->in.info);
+               ndr->depth++;
+               ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
+               ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->in.info);
+               ndr->depth--;
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
@@ -9535,8 +10046,25 @@ _PUBLIC_ void ndr_print_lsa_EnumTrustedDomainsEx(struct ndr_print *ndr, const ch
 static enum ndr_err_code ndr_push_lsa_CreateTrustedDomainEx(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomainEx *r)
 {
        if (flags & NDR_IN) {
+               if (r->in.policy_handle == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
+               if (r->in.info == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
+               if (r->in.auth_info == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
        }
        if (flags & NDR_OUT) {
+               if (r->out.trustdom_handle == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
                NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
        }
        return NDR_ERR_SUCCESS;
@@ -9544,9 +10072,46 @@ static enum ndr_err_code ndr_push_lsa_CreateTrustedDomainEx(struct ndr_push *ndr
 
 static enum ndr_err_code ndr_pull_lsa_CreateTrustedDomainEx(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomainEx *r)
 {
+       TALLOC_CTX *_mem_save_policy_handle_0;
+       TALLOC_CTX *_mem_save_info_0;
+       TALLOC_CTX *_mem_save_auth_info_0;
+       TALLOC_CTX *_mem_save_trustdom_handle_0;
        if (flags & NDR_IN) {
+               ZERO_STRUCT(r->out);
+
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.policy_handle);
+               }
+               _mem_save_policy_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.policy_handle, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_handle_0, LIBNDR_FLAG_REF_ALLOC);
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.info);
+               }
+               _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.auth_info);
+               }
+               _mem_save_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.auth_info, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_auth_info_0, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
+               NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
+               ZERO_STRUCTP(r->out.trustdom_handle);
        }
        if (flags & NDR_OUT) {
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
+               }
+               _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
        }
        return NDR_ERR_SUCCESS;
@@ -9562,11 +10127,28 @@ _PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx(struct ndr_print *ndr, const c
        if (flags & NDR_IN) {
                ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomainEx");
                ndr->depth++;
+               ndr_print_ptr(ndr, "policy_handle", r->in.policy_handle);
+               ndr->depth++;
+               ndr_print_policy_handle(ndr, "policy_handle", r->in.policy_handle);
+               ndr->depth--;
+               ndr_print_ptr(ndr, "info", r->in.info);
+               ndr->depth++;
+               ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info", r->in.info);
+               ndr->depth--;
+               ndr_print_ptr(ndr, "auth_info", r->in.auth_info);
+               ndr->depth++;
+               ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info", r->in.auth_info);
+               ndr->depth--;
+               ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
                ndr_print_struct(ndr, "out", "lsa_CreateTrustedDomainEx");
                ndr->depth++;
+               ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
+               ndr->depth++;
+               ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
+               ndr->depth--;
                ndr_print_NTSTATUS(ndr, "result", r->out.result);
                ndr->depth--;
        }
@@ -10178,8 +10760,8 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int f
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.lookup_options));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.client_revision));
        }
        if (flags & NDR_OUT) {
                if (r->out.domains == NULL) {
@@ -10252,8 +10834,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int f
                NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.lookup_options));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.client_revision));
                NDR_PULL_ALLOC(ndr, r->out.domains);
                ZERO_STRUCTP(r->out.domains);
                NDR_PULL_ALLOC(ndr, r->out.sids);
@@ -10337,8 +10919,8 @@ _PUBLIC_ void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name
                ndr->depth++;
                ndr_print_uint32(ndr, "count", *r->in.count);
                ndr->depth--;
-               ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
-               ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
+               ndr_print_uint32(ndr, "lookup_options", r->in.lookup_options);
+               ndr_print_uint32(ndr, "client_revision", r->in.client_revision);
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
@@ -10370,8 +10952,25 @@ _PUBLIC_ void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name
 static enum ndr_err_code ndr_push_lsa_CreateTrustedDomainEx2(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomainEx2 *r)
 {
        if (flags & NDR_IN) {
+               if (r->in.policy_handle == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
+               if (r->in.info == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
+               if (r->in.auth_info == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
        }
        if (flags & NDR_OUT) {
+               if (r->out.trustdom_handle == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
                NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
        }
        return NDR_ERR_SUCCESS;
@@ -10379,9 +10978,46 @@ static enum ndr_err_code ndr_push_lsa_CreateTrustedDomainEx2(struct ndr_push *nd
 
 static enum ndr_err_code ndr_pull_lsa_CreateTrustedDomainEx2(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomainEx2 *r)
 {
+       TALLOC_CTX *_mem_save_policy_handle_0;
+       TALLOC_CTX *_mem_save_info_0;
+       TALLOC_CTX *_mem_save_auth_info_0;
+       TALLOC_CTX *_mem_save_trustdom_handle_0;
        if (flags & NDR_IN) {
+               ZERO_STRUCT(r->out);
+
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.policy_handle);
+               }
+               _mem_save_policy_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.policy_handle, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_handle_0, LIBNDR_FLAG_REF_ALLOC);
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.info);
+               }
+               _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.auth_info);
+               }
+               _mem_save_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.auth_info, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfoInternal(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.auth_info));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_auth_info_0, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
+               NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
+               ZERO_STRUCTP(r->out.trustdom_handle);
        }
        if (flags & NDR_OUT) {
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
+               }
+               _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.trustdom_handle));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
        }
        return NDR_ERR_SUCCESS;
@@ -10397,11 +11033,28 @@ _PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx2(struct ndr_print *ndr, const
        if (flags & NDR_IN) {
                ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomainEx2");
                ndr->depth++;
+               ndr_print_ptr(ndr, "policy_handle", r->in.policy_handle);
+               ndr->depth++;
+               ndr_print_policy_handle(ndr, "policy_handle", r->in.policy_handle);
+               ndr->depth--;
+               ndr_print_ptr(ndr, "info", r->in.info);
+               ndr->depth++;
+               ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info", r->in.info);
+               ndr->depth--;
+               ndr_print_ptr(ndr, "auth_info", r->in.auth_info);
+               ndr->depth++;
+               ndr_print_lsa_TrustDomainInfoAuthInfoInternal(ndr, "auth_info", r->in.auth_info);
+               ndr->depth--;
+               ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
                ndr_print_struct(ndr, "out", "lsa_CreateTrustedDomainEx2");
                ndr->depth++;
+               ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
+               ndr->depth++;
+               ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
+               ndr->depth--;
                ndr_print_NTSTATUS(ndr, "result", r->out.result);
                ndr->depth--;
        }
@@ -10761,8 +11414,8 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int f
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.lookup_options));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.client_revision));
        }
        if (flags & NDR_OUT) {
                if (r->out.domains == NULL) {
@@ -10835,8 +11488,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int f
                NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.lookup_options));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.client_revision));
                NDR_PULL_ALLOC(ndr, r->out.domains);
                ZERO_STRUCTP(r->out.domains);
                NDR_PULL_ALLOC(ndr, r->out.sids);
@@ -10920,8 +11573,8 @@ _PUBLIC_ void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name
                ndr->depth++;
                ndr_print_uint32(ndr, "count", *r->in.count);
                ndr->depth--;
-               ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
-               ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
+               ndr_print_uint32(ndr, "lookup_options", r->in.lookup_options);
+               ndr_print_uint32(ndr, "client_revision", r->in.client_revision);
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
@@ -11507,8 +12160,8 @@ static enum ndr_err_code ndr_push_lsa_LookupNames4(struct ndr_push *ndr, int fla
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.lookup_options));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.client_revision));
        }
        if (flags & NDR_OUT) {
                if (r->out.domains == NULL) {
@@ -11573,8 +12226,8 @@ static enum ndr_err_code ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int fla
                NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.lookup_options));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.client_revision));
                NDR_PULL_ALLOC(ndr, r->out.domains);
                ZERO_STRUCTP(r->out.domains);
                NDR_PULL_ALLOC(ndr, r->out.sids);
@@ -11654,8 +12307,8 @@ _PUBLIC_ void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name
                ndr->depth++;
                ndr_print_uint32(ndr, "count", *r->in.count);
                ndr->depth--;
-               ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
-               ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
+               ndr_print_uint32(ndr, "lookup_options", r->in.lookup_options);
+               ndr_print_uint32(ndr, "client_revision", r->in.client_revision);
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
index a489b5423ebecb69923c938e025fe8b97a0eead7..61684d1789456ad7dfac69ea023ccc17368a0e96 100644 (file)
@@ -233,16 +233,30 @@ void ndr_print_lsa_PrivilegeSet(struct ndr_print *ndr, const char *name, const s
 void ndr_print_lsa_DATA_BUF(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF *r);
 void ndr_print_lsa_DATA_BUF2(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF2 *r);
 void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print *ndr, const char *name, enum lsa_TrustDomInfoEnum r);
+enum ndr_err_code ndr_push_lsa_TrustDirection(struct ndr_push *ndr, int ndr_flags, uint32_t r);
+enum ndr_err_code ndr_pull_lsa_TrustDirection(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
+void ndr_print_lsa_TrustDirection(struct ndr_print *ndr, const char *name, uint32_t r);
+void ndr_print_lsa_TrustType(struct ndr_print *ndr, const char *name, enum lsa_TrustType r);
+enum ndr_err_code ndr_push_lsa_TrustAttributes(struct ndr_push *ndr, int ndr_flags, uint32_t r);
+enum ndr_err_code ndr_pull_lsa_TrustAttributes(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
+void ndr_print_lsa_TrustAttributes(struct ndr_print *ndr, const char *name, uint32_t r);
 void ndr_print_lsa_TrustDomainInfoName(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoName *r);
+void ndr_print_lsa_TrustDomainInfoControllers(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoControllers *r);
 void ndr_print_lsa_TrustDomainInfoPosixOffset(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPosixOffset *r);
 void ndr_print_lsa_TrustDomainInfoPassword(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPassword *r);
 void ndr_print_lsa_TrustDomainInfoBasic(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBasic *r);
 void ndr_print_lsa_TrustDomainInfoInfoEx(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx *r);
+enum ndr_err_code ndr_push_lsa_TrustAuthType(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustAuthType r);
+enum ndr_err_code ndr_pull_lsa_TrustAuthType(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustAuthType *r);
+void ndr_print_lsa_TrustAuthType(struct ndr_print *ndr, const char *name, enum lsa_TrustAuthType r);
 void ndr_print_lsa_TrustDomainInfoBuffer(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBuffer *r);
 void ndr_print_lsa_TrustDomainInfoAuthInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfo *r);
 void ndr_print_lsa_TrustDomainInfoFullInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo *r);
-void ndr_print_lsa_TrustDomainInfo11(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfo11 *r);
-void ndr_print_lsa_TrustDomainInfoInfoAll(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoAll *r);
+void ndr_print_lsa_TrustDomainInfoAuthInfoInternal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfoInternal *r);
+void ndr_print_lsa_TrustDomainInfoFullInfoInternal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfoInternal *r);
+void ndr_print_lsa_TrustDomainInfoInfoEx2Internal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx2Internal *r);
+void ndr_print_lsa_TrustDomainInfoFullInfo2Internal(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo2Internal *r);
+void ndr_print_lsa_TrustDomainInfoSupportedEncTypes(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoSupportedEncTypes *r);
 void ndr_print_lsa_TrustedDomainInfo(struct ndr_print *ndr, const char *name, const union lsa_TrustedDomainInfo *r);
 void ndr_print_lsa_DATA_BUF_PTR(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF_PTR *r);
 void ndr_print_lsa_RightSet(struct ndr_print *ndr, const char *name, const struct lsa_RightSet *r);
index 56105d499f5f2b3ab732f00b855e3d94ad98dd2f..22c416a0d7975fc8f942fbaeb3cb3a03132ad24b 100644 (file)
@@ -123,7 +123,9 @@ _PUBLIC_ void ndr_print_netr_SchannelType(struct ndr_print *ndr, const char *nam
        const char *val = NULL;
 
        switch (r) {
+               case SEC_CHAN_NULL: val = "SEC_CHAN_NULL"; break;
                case SEC_CHAN_WKSTA: val = "SEC_CHAN_WKSTA"; break;
+               case SEC_CHAN_DNS_DOMAIN: val = "SEC_CHAN_DNS_DOMAIN"; break;
                case SEC_CHAN_DOMAIN: val = "SEC_CHAN_DOMAIN"; break;
                case SEC_CHAN_BDC: val = "SEC_CHAN_BDC"; break;
        }
index 0bd3d0fd164e5259ddd0fe85b6a6205cba783d3e..169d35e326d727fb2816e58ca0971ba1b721df22 100644 (file)
@@ -538,32 +538,155 @@ _PUBLIC_ void ndr_print_netr_NetworkInfo(struct ndr_print *ndr, const char *name
        }
 }
 
-_PUBLIC_ enum ndr_err_code ndr_push_netr_LogonInfo(struct ndr_push *ndr, int ndr_flags, const union netr_LogonInfo *r)
+static enum ndr_err_code ndr_push_netr_GenericInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_GenericInfo *r)
+{
+       {
+               uint32_t _flags_save_STRUCT = ndr->flags;
+               ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+               if (ndr_flags & NDR_SCALARS) {
+                       NDR_CHECK(ndr_push_align(ndr, 4));
+                       NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
+                       NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->package_name));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
+                       NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
+               }
+               if (ndr_flags & NDR_BUFFERS) {
+                       NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
+                       NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->package_name));
+                       if (r->data) {
+                               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
+                               NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
+                       }
+               }
+               ndr->flags = _flags_save_STRUCT;
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_netr_GenericInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_GenericInfo *r)
+{
+       uint32_t _ptr_data;
+       TALLOC_CTX *_mem_save_data_0;
+       {
+               uint32_t _flags_save_STRUCT = ndr->flags;
+               ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+               if (ndr_flags & NDR_SCALARS) {
+                       NDR_CHECK(ndr_pull_align(ndr, 4));
+                       NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_SCALARS, &r->identity_info));
+                       NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->package_name));
+                       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
+                       if (_ptr_data) {
+                               NDR_PULL_ALLOC(ndr, r->data);
+                       } else {
+                               r->data = NULL;
+                       }
+               }
+               if (ndr_flags & NDR_BUFFERS) {
+                       NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
+                       NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->package_name));
+                       if (r->data) {
+                               _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
+                               NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
+                               NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
+                               NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data)));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
+                       }
+                       if (r->data) {
+                               NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length));
+                       }
+               }
+               ndr->flags = _flags_save_STRUCT;
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_netr_GenericInfo(struct ndr_print *ndr, const char *name, const struct netr_GenericInfo *r)
+{
+       ndr_print_struct(ndr, name, "netr_GenericInfo");
+       {
+               uint32_t _flags_save_STRUCT = ndr->flags;
+               ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+               ndr->depth++;
+               ndr_print_netr_IdentityInfo(ndr, "identity_info", &r->identity_info);
+               ndr_print_lsa_String(ndr, "package_name", &r->package_name);
+               ndr_print_uint32(ndr, "length", r->length);
+               ndr_print_ptr(ndr, "data", r->data);
+               ndr->depth++;
+               if (r->data) {
+                       ndr_print_array_uint8(ndr, "data", r->data, r->length);
+               }
+               ndr->depth--;
+               ndr->depth--;
+               ndr->flags = _flags_save_STRUCT;
+       }
+}
+
+static enum ndr_err_code ndr_push_netr_LogonInfoClass(struct ndr_push *ndr, int ndr_flags, enum netr_LogonInfoClass r)
+{
+       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_netr_LogonInfoClass(struct ndr_pull *ndr, int ndr_flags, enum netr_LogonInfoClass *r)
+{
+       uint16_t v;
+       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_netr_LogonInfoClass(struct ndr_print *ndr, const char *name, enum netr_LogonInfoClass r)
+{
+       const char *val = NULL;
+
+       switch (r) {
+               case NetlogonInteractiveInformation: val = "NetlogonInteractiveInformation"; break;
+               case NetlogonNetworkInformation: val = "NetlogonNetworkInformation"; break;
+               case NetlogonServiceInformation: val = "NetlogonServiceInformation"; break;
+               case NetlogonGenericInformation: val = "NetlogonGenericInformation"; break;
+               case NetlogonInteractiveTransitiveInformation: val = "NetlogonInteractiveTransitiveInformation"; break;
+               case NetlogonNetworkTransitiveInformation: val = "NetlogonNetworkTransitiveInformation"; break;
+               case NetlogonServiceTransitiveInformation: val = "NetlogonServiceTransitiveInformation"; break;
+       }
+       ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_netr_LogonLevel(struct ndr_push *ndr, int ndr_flags, const union netr_LogonLevel *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                int level = ndr_push_get_switch_value(ndr, r);
-               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
+               NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, level));
                switch (level) {
-                       case 1: {
+                       case NetlogonInteractiveInformation: {
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
                        break; }
 
-                       case 2: {
+                       case NetlogonNetworkInformation: {
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->network));
                        break; }
 
-                       case 3: {
+                       case NetlogonServiceInformation: {
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
                        break; }
 
-                       case 5: {
+                       case NetlogonGenericInformation: {
+                               NDR_CHECK(ndr_push_unique_ptr(ndr, r->generic));
+                       break; }
+
+                       case NetlogonInteractiveTransitiveInformation: {
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
                        break; }
 
-                       case 6: {
+                       case NetlogonNetworkTransitiveInformation: {
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->network));
                        break; }
 
+                       case NetlogonServiceTransitiveInformation: {
+                               NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
+                       break; }
+
                        default:
                                return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
                }
@@ -571,36 +694,48 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonInfo(struct ndr_push *ndr, int ndr
        if (ndr_flags & NDR_BUFFERS) {
                int level = ndr_push_get_switch_value(ndr, r);
                switch (level) {
-                       case 1:
+                       case NetlogonInteractiveInformation:
                                if (r->password) {
                                        NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
                                }
                        break;
 
-                       case 2:
+                       case NetlogonNetworkInformation:
                                if (r->network) {
                                        NDR_CHECK(ndr_push_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
                                }
                        break;
 
-                       case 3:
+                       case NetlogonServiceInformation:
                                if (r->password) {
                                        NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
                                }
                        break;
 
-                       case 5:
+                       case NetlogonGenericInformation:
+                               if (r->generic) {
+                                       NDR_CHECK(ndr_push_netr_GenericInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic));
+                               }
+                       break;
+
+                       case NetlogonInteractiveTransitiveInformation:
                                if (r->password) {
                                        NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
                                }
                        break;
 
-                       case 6:
+                       case NetlogonNetworkTransitiveInformation:
                                if (r->network) {
                                        NDR_CHECK(ndr_push_netr_NetworkInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->network));
                                }
                        break;
 
+                       case NetlogonServiceTransitiveInformation:
+                               if (r->password) {
+                                       NDR_CHECK(ndr_push_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
+                               }
+                       break;
+
                        default:
                                return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
                }
@@ -608,12 +743,13 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_LogonInfo(struct ndr_push *ndr, int ndr
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr_flags, union netr_LogonInfo *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonLevel(struct ndr_pull *ndr, int ndr_flags, union netr_LogonLevel *r)
 {
        int level;
        uint16_t _level;
        TALLOC_CTX *_mem_save_password_0;
        TALLOC_CTX *_mem_save_network_0;
+       TALLOC_CTX *_mem_save_generic_0;
        level = ndr_pull_get_switch_value(ndr, r);
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
@@ -621,7 +757,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr
                        return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
                }
                switch (level) {
-                       case 1: {
+                       case NetlogonInteractiveInformation: {
                                uint32_t _ptr_password;
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
                                if (_ptr_password) {
@@ -631,7 +767,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr
                                }
                        break; }
 
-                       case 2: {
+                       case NetlogonNetworkInformation: {
                                uint32_t _ptr_network;
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_network));
                                if (_ptr_network) {
@@ -641,7 +777,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr
                                }
                        break; }
 
-                       case 3: {
+                       case NetlogonServiceInformation: {
                                uint32_t _ptr_password;
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
                                if (_ptr_password) {
@@ -651,7 +787,17 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr
                                }
                        break; }
 
-                       case 5: {
+                       case NetlogonGenericInformation: {
+                               uint32_t _ptr_generic;
+                               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_generic));
+                               if (_ptr_generic) {
+                                       NDR_PULL_ALLOC(ndr, r->generic);
+                               } else {
+                                       r->generic = NULL;
+                               }
+                       break; }
+
+                       case NetlogonInteractiveTransitiveInformation: {
                                uint32_t _ptr_password;
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
                                if (_ptr_password) {
@@ -661,7 +807,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr
                                }
                        break; }
 
-                       case 6: {
+                       case NetlogonNetworkTransitiveInformation: {
                                uint32_t _ptr_network;
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_network));
                                if (_ptr_network) {
@@ -671,13 +817,23 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr
                                }
                        break; }
 
+                       case NetlogonServiceTransitiveInformation: {
+                               uint32_t _ptr_password;
+                               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
+                               if (_ptr_password) {
+                                       NDR_PULL_ALLOC(ndr, r->password);
+                               } else {
+                                       r->password = NULL;
+                               }
+                       break; }
+
                        default:
                                return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
                switch (level) {
-                       case 1:
+                       case NetlogonInteractiveInformation:
                                if (r->password) {
                                        _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
                                        NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
@@ -686,7 +842,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr
                                }
                        break;
 
-                       case 2:
+                       case NetlogonNetworkInformation:
                                if (r->network) {
                                        _mem_save_network_0 = NDR_PULL_GET_MEM_CTX(ndr);
                                        NDR_PULL_SET_MEM_CTX(ndr, r->network, 0);
@@ -695,7 +851,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr
                                }
                        break;
 
-                       case 3:
+                       case NetlogonServiceInformation:
                                if (r->password) {
                                        _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
                                        NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
@@ -704,7 +860,16 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr
                                }
                        break;
 
-                       case 5:
+                       case NetlogonGenericInformation:
+                               if (r->generic) {
+                                       _mem_save_generic_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                                       NDR_PULL_SET_MEM_CTX(ndr, r->generic, 0);
+                                       NDR_CHECK(ndr_pull_netr_GenericInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic));
+                                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_generic_0, 0);
+                               }
+                       break;
+
+                       case NetlogonInteractiveTransitiveInformation:
                                if (r->password) {
                                        _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
                                        NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
@@ -713,7 +878,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr
                                }
                        break;
 
-                       case 6:
+                       case NetlogonNetworkTransitiveInformation:
                                if (r->network) {
                                        _mem_save_network_0 = NDR_PULL_GET_MEM_CTX(ndr);
                                        NDR_PULL_SET_MEM_CTX(ndr, r->network, 0);
@@ -722,6 +887,15 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr
                                }
                        break;
 
+                       case NetlogonServiceTransitiveInformation:
+                               if (r->password) {
+                                       _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                                       NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
+                                       NDR_CHECK(ndr_pull_netr_PasswordInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
+                                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
+                               }
+                       break;
+
                        default:
                                return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
                }
@@ -729,13 +903,13 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_netr_LogonInfo(struct ndr_print *ndr, const char *name, const union netr_LogonInfo *r)
+_PUBLIC_ void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, const union netr_LogonLevel *r)
 {
        int level;
        level = ndr_print_get_switch_value(ndr, r);
-       ndr_print_union(ndr, name, level, "netr_LogonInfo");
+       ndr_print_union(ndr, name, level, "netr_LogonLevel");
        switch (level) {
-               case 1:
+               case NetlogonInteractiveInformation:
                        ndr_print_ptr(ndr, "password", r->password);
                        ndr->depth++;
                        if (r->password) {
@@ -744,7 +918,7 @@ _PUBLIC_ void ndr_print_netr_LogonInfo(struct ndr_print *ndr, const char *name,
                        ndr->depth--;
                break;
 
-               case 2:
+               case NetlogonNetworkInformation:
                        ndr_print_ptr(ndr, "network", r->network);
                        ndr->depth++;
                        if (r->network) {
@@ -753,7 +927,7 @@ _PUBLIC_ void ndr_print_netr_LogonInfo(struct ndr_print *ndr, const char *name,
                        ndr->depth--;
                break;
 
-               case 3:
+               case NetlogonServiceInformation:
                        ndr_print_ptr(ndr, "password", r->password);
                        ndr->depth++;
                        if (r->password) {
@@ -762,7 +936,16 @@ _PUBLIC_ void ndr_print_netr_LogonInfo(struct ndr_print *ndr, const char *name,
                        ndr->depth--;
                break;
 
-               case 5:
+               case NetlogonGenericInformation:
+                       ndr_print_ptr(ndr, "generic", r->generic);
+                       ndr->depth++;
+                       if (r->generic) {
+                               ndr_print_netr_GenericInfo(ndr, "generic", r->generic);
+                       }
+                       ndr->depth--;
+               break;
+
+               case NetlogonInteractiveTransitiveInformation:
                        ndr_print_ptr(ndr, "password", r->password);
                        ndr->depth++;
                        if (r->password) {
@@ -771,7 +954,7 @@ _PUBLIC_ void ndr_print_netr_LogonInfo(struct ndr_print *ndr, const char *name,
                        ndr->depth--;
                break;
 
-               case 6:
+               case NetlogonNetworkTransitiveInformation:
                        ndr_print_ptr(ndr, "network", r->network);
                        ndr->depth++;
                        if (r->network) {
@@ -780,6 +963,15 @@ _PUBLIC_ void ndr_print_netr_LogonInfo(struct ndr_print *ndr, const char *name,
                        ndr->depth--;
                break;
 
+               case NetlogonServiceTransitiveInformation:
+                       ndr_print_ptr(ndr, "password", r->password);
+                       ndr->depth++;
+                       if (r->password) {
+                               ndr_print_netr_PasswordInfo(ndr, "password", r->password);
+                       }
+                       ndr->depth--;
+               break;
+
                default:
                        ndr_print_bad_level(ndr, name, level);
        }
@@ -1511,17 +1703,92 @@ _PUBLIC_ void ndr_print_netr_PacInfo(struct ndr_print *ndr, const char *name, co
        ndr->depth--;
 }
 
+static enum ndr_err_code ndr_push_netr_GenericInfo2(struct ndr_push *ndr, int ndr_flags, const struct netr_GenericInfo2 *r)
+{
+       {
+               uint32_t _flags_save_STRUCT = ndr->flags;
+               ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+               if (ndr_flags & NDR_SCALARS) {
+                       NDR_CHECK(ndr_push_align(ndr, 4));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
+                       NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
+               }
+               if (ndr_flags & NDR_BUFFERS) {
+                       if (r->data) {
+                               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
+                               NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
+                       }
+               }
+               ndr->flags = _flags_save_STRUCT;
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_netr_GenericInfo2(struct ndr_pull *ndr, int ndr_flags, struct netr_GenericInfo2 *r)
+{
+       uint32_t _ptr_data;
+       TALLOC_CTX *_mem_save_data_0;
+       {
+               uint32_t _flags_save_STRUCT = ndr->flags;
+               ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+               if (ndr_flags & NDR_SCALARS) {
+                       NDR_CHECK(ndr_pull_align(ndr, 4));
+                       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
+                       if (_ptr_data) {
+                               NDR_PULL_ALLOC(ndr, r->data);
+                       } else {
+                               r->data = NULL;
+                       }
+               }
+               if (ndr_flags & NDR_BUFFERS) {
+                       if (r->data) {
+                               _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
+                               NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
+                               NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
+                               NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data)));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
+                       }
+                       if (r->data) {
+                               NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length));
+                       }
+               }
+               ndr->flags = _flags_save_STRUCT;
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_netr_GenericInfo2(struct ndr_print *ndr, const char *name, const struct netr_GenericInfo2 *r)
+{
+       ndr_print_struct(ndr, name, "netr_GenericInfo2");
+       {
+               uint32_t _flags_save_STRUCT = ndr->flags;
+               ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+               ndr->depth++;
+               ndr_print_uint32(ndr, "length", r->length);
+               ndr_print_ptr(ndr, "data", r->data);
+               ndr->depth++;
+               if (r->data) {
+                       ndr_print_array_uint8(ndr, "data", r->data, r->length);
+               }
+               ndr->depth--;
+               ndr->depth--;
+               ndr->flags = _flags_save_STRUCT;
+       }
+}
+
 _PUBLIC_ enum ndr_err_code ndr_push_netr_Validation(struct ndr_push *ndr, int ndr_flags, const union netr_Validation *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                int level = ndr_push_get_switch_value(ndr, r);
                NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
                switch (level) {
-                       case 2: {
+                       case NetlogonValidationSamInfo: {
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam2));
                        break; }
 
-                       case 3: {
+                       case NetlogonValidationSamInfo2: {
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam3));
                        break; }
 
@@ -1529,11 +1796,11 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_Validation(struct ndr_push *ndr, int nd
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->pac));
                        break; }
 
-                       case 5: {
-                               NDR_CHECK(ndr_push_unique_ptr(ndr, r->pac));
+                       case NetlogonValidationGenericInfo2: {
+                               NDR_CHECK(ndr_push_unique_ptr(ndr, r->generic));
                        break; }
 
-                       case 6: {
+                       case NetlogonValidationSamInfo4: {
                                NDR_CHECK(ndr_push_unique_ptr(ndr, r->sam6));
                        break; }
 
@@ -1544,13 +1811,13 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_Validation(struct ndr_push *ndr, int nd
        if (ndr_flags & NDR_BUFFERS) {
                int level = ndr_push_get_switch_value(ndr, r);
                switch (level) {
-                       case 2:
+                       case NetlogonValidationSamInfo:
                                if (r->sam2) {
                                        NDR_CHECK(ndr_push_netr_SamInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam2));
                                }
                        break;
 
-                       case 3:
+                       case NetlogonValidationSamInfo2:
                                if (r->sam3) {
                                        NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam3));
                                }
@@ -1562,13 +1829,13 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_Validation(struct ndr_push *ndr, int nd
                                }
                        break;
 
-                       case 5:
-                               if (r->pac) {
-                                       NDR_CHECK(ndr_push_netr_PacInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->pac));
+                       case NetlogonValidationGenericInfo2:
+                               if (r->generic) {
+                                       NDR_CHECK(ndr_push_netr_GenericInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic));
                                }
                        break;
 
-                       case 6:
+                       case NetlogonValidationSamInfo4:
                                if (r->sam6) {
                                        NDR_CHECK(ndr_push_netr_SamInfo6(ndr, NDR_SCALARS|NDR_BUFFERS, r->sam6));
                                }
@@ -1588,6 +1855,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int nd
        TALLOC_CTX *_mem_save_sam2_0;
        TALLOC_CTX *_mem_save_sam3_0;
        TALLOC_CTX *_mem_save_pac_0;
+       TALLOC_CTX *_mem_save_generic_0;
        TALLOC_CTX *_mem_save_sam6_0;
        level = ndr_pull_get_switch_value(ndr, r);
        if (ndr_flags & NDR_SCALARS) {
@@ -1596,7 +1864,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int nd
                        return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
                }
                switch (level) {
-                       case 2: {
+                       case NetlogonValidationSamInfo: {
                                uint32_t _ptr_sam2;
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam2));
                                if (_ptr_sam2) {
@@ -1606,7 +1874,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int nd
                                }
                        break; }
 
-                       case 3: {
+                       case NetlogonValidationSamInfo2: {
                                uint32_t _ptr_sam3;
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam3));
                                if (_ptr_sam3) {
@@ -1626,17 +1894,17 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int nd
                                }
                        break; }
 
-                       case 5: {
-                               uint32_t _ptr_pac;
-                               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pac));
-                               if (_ptr_pac) {
-                                       NDR_PULL_ALLOC(ndr, r->pac);
+                       case NetlogonValidationGenericInfo2: {
+                               uint32_t _ptr_generic;
+                               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_generic));
+                               if (_ptr_generic) {
+                                       NDR_PULL_ALLOC(ndr, r->generic);
                                } else {
-                                       r->pac = NULL;
+                                       r->generic = NULL;
                                }
                        break; }
 
-                       case 6: {
+                       case NetlogonValidationSamInfo4: {
                                uint32_t _ptr_sam6;
                                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam6));
                                if (_ptr_sam6) {
@@ -1652,7 +1920,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int nd
        }
        if (ndr_flags & NDR_BUFFERS) {
                switch (level) {
-                       case 2:
+                       case NetlogonValidationSamInfo:
                                if (r->sam2) {
                                        _mem_save_sam2_0 = NDR_PULL_GET_MEM_CTX(ndr);
                                        NDR_PULL_SET_MEM_CTX(ndr, r->sam2, 0);
@@ -1661,7 +1929,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int nd
                                }
                        break;
 
-                       case 3:
+                       case NetlogonValidationSamInfo2:
                                if (r->sam3) {
                                        _mem_save_sam3_0 = NDR_PULL_GET_MEM_CTX(ndr);
                                        NDR_PULL_SET_MEM_CTX(ndr, r->sam3, 0);
@@ -1679,16 +1947,16 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int nd
                                }
                        break;
 
-                       case 5:
-                               if (r->pac) {
-                                       _mem_save_pac_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                                       NDR_PULL_SET_MEM_CTX(ndr, r->pac, 0);
-                                       NDR_CHECK(ndr_pull_netr_PacInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->pac));
-                                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pac_0, 0);
+                       case NetlogonValidationGenericInfo2:
+                               if (r->generic) {
+                                       _mem_save_generic_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                                       NDR_PULL_SET_MEM_CTX(ndr, r->generic, 0);
+                                       NDR_CHECK(ndr_pull_netr_GenericInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->generic));
+                                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_generic_0, 0);
                                }
                        break;
 
-                       case 6:
+                       case NetlogonValidationSamInfo4:
                                if (r->sam6) {
                                        _mem_save_sam6_0 = NDR_PULL_GET_MEM_CTX(ndr);
                                        NDR_PULL_SET_MEM_CTX(ndr, r->sam6, 0);
@@ -1710,7 +1978,7 @@ _PUBLIC_ void ndr_print_netr_Validation(struct ndr_print *ndr, const char *name,
        level = ndr_print_get_switch_value(ndr, r);
        ndr_print_union(ndr, name, level, "netr_Validation");
        switch (level) {
-               case 2:
+               case NetlogonValidationSamInfo:
                        ndr_print_ptr(ndr, "sam2", r->sam2);
                        ndr->depth++;
                        if (r->sam2) {
@@ -1719,7 +1987,7 @@ _PUBLIC_ void ndr_print_netr_Validation(struct ndr_print *ndr, const char *name,
                        ndr->depth--;
                break;
 
-               case 3:
+               case NetlogonValidationSamInfo2:
                        ndr_print_ptr(ndr, "sam3", r->sam3);
                        ndr->depth++;
                        if (r->sam3) {
@@ -1737,16 +2005,16 @@ _PUBLIC_ void ndr_print_netr_Validation(struct ndr_print *ndr, const char *name,
                        ndr->depth--;
                break;
 
-               case 5:
-                       ndr_print_ptr(ndr, "pac", r->pac);
+               case NetlogonValidationGenericInfo2:
+                       ndr_print_ptr(ndr, "generic", r->generic);
                        ndr->depth++;
-                       if (r->pac) {
-                               ndr_print_netr_PacInfo(ndr, "pac", r->pac);
+                       if (r->generic) {
+                               ndr_print_netr_GenericInfo2(ndr, "generic", r->generic);
                        }
                        ndr->depth--;
                break;
 
-               case 6:
+               case NetlogonValidationSamInfo4:
                        ndr_print_ptr(ndr, "sam6", r->sam6);
                        ndr->depth++;
                        if (r->sam6) {
@@ -1838,31 +2106,6 @@ _PUBLIC_ void ndr_print_netr_Authenticator(struct ndr_print *ndr, const char *na
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_netr_LogonLevel(struct ndr_push *ndr, int ndr_flags, enum netr_LogonLevel r)
-{
-       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
-       return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_netr_LogonLevel(struct ndr_pull *ndr, int ndr_flags, enum netr_LogonLevel *r)
-{
-       uint16_t v;
-       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
-       *r = v;
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, enum netr_LogonLevel r)
-{
-       const char *val = NULL;
-
-       switch (r) {
-               case INTERACTIVE_LOGON_TYPE: val = "INTERACTIVE_LOGON_TYPE"; break;
-               case NET_LOGON_TYPE: val = "NET_LOGON_TYPE"; break;
-       }
-       ndr_print_enum(ndr, name, "ENUM", val, r);
-}
-
 static enum ndr_err_code ndr_push_netr_DELTA_DELETE_USER(struct ndr_push *ndr, int ndr_flags, const struct netr_DELTA_DELETE_USER *r)
 {
        if (ndr_flags & NDR_SCALARS) {
@@ -2404,7 +2647,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_DOMAIN(struct ndr_push *ndr, int nd
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
                NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
-               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment));
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
                NDR_CHECK(ndr_push_dlong(ndr, NDR_SCALARS, r->force_logoff_time));
                NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->min_password_length));
                NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->password_history_length));
@@ -2425,7 +2668,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_DOMAIN(struct ndr_push *ndr, int nd
        }
        if (ndr_flags & NDR_BUFFERS) {
                NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
-               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment));
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
                NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
                NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->account_lockout));
                NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
@@ -2440,7 +2683,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_DOMAIN(struct ndr_pull *ndr, int nd
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
                NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
-               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment));
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
                NDR_CHECK(ndr_pull_dlong(ndr, NDR_SCALARS, &r->force_logoff_time));
                NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->min_password_length));
                NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->password_history_length));
@@ -2461,7 +2704,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_DOMAIN(struct ndr_pull *ndr, int nd
        }
        if (ndr_flags & NDR_BUFFERS) {
                NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
-               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment));
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
                NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
                NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->account_lockout));
                NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown2));
@@ -2476,7 +2719,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_DOMAIN(struct ndr_print *ndr, const char *nam
        ndr_print_struct(ndr, name, "netr_DELTA_DOMAIN");
        ndr->depth++;
        ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
-       ndr_print_lsa_String(ndr, "comment", &r->comment);
+       ndr_print_lsa_String(ndr, "oem_information", &r->oem_information);
        ndr_print_dlong(ndr, "force_logoff_time", r->force_logoff_time);
        ndr_print_uint16(ndr, "min_password_length", r->min_password_length);
        ndr_print_uint16(ndr, "password_history_length", r->password_history_length);
@@ -6366,6 +6609,35 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char
        ndr->depth--;
 }
 
+static enum ndr_err_code ndr_push_netr_TrustFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_netr_TrustFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+       uint32_t v;
+       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_netr_TrustFlags(struct ndr_print *ndr, const char *name, uint32_t r)
+{
+       ndr_print_uint32(ndr, name, r);
+       ndr->depth++;
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_IN_FOREST", NETR_TRUST_FLAG_IN_FOREST, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_OUTBOUND", NETR_TRUST_FLAG_OUTBOUND, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_TREEROOT", NETR_TRUST_FLAG_TREEROOT, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_PRIMARY", NETR_TRUST_FLAG_PRIMARY, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_NATIVE", NETR_TRUST_FLAG_NATIVE, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_INBOUND", NETR_TRUST_FLAG_INBOUND, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_MIT_KRB5", NETR_TRUST_FLAG_MIT_KRB5, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_AES", NETR_TRUST_FLAG_AES, r);
+       ndr->depth--;
+}
+
 static enum ndr_err_code ndr_push_netr_BinaryString(struct ndr_push *ndr, int ndr_flags, const struct netr_BinaryString *r)
 {
        uint32_t cntr_data_1;
@@ -6874,10 +7146,115 @@ _PUBLIC_ void ndr_print_netr_DomainQuery(struct ndr_print *ndr, const char *name
        }
 }
 
+static enum ndr_err_code ndr_push_netr_trust_extension(struct ndr_push *ndr, int ndr_flags, const struct netr_trust_extension *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 8));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 8));
+               NDR_CHECK(ndr_push_netr_TrustFlags(ndr, NDR_SCALARS, r->flags));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->parent_index));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->trust_type));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->trust_attributes));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_netr_trust_extension(struct ndr_pull *ndr, int ndr_flags, struct netr_trust_extension *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
+               NDR_CHECK(ndr_pull_netr_TrustFlags(ndr, NDR_SCALARS, &r->flags));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->parent_index));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->trust_type));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->trust_attributes));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_netr_trust_extension(struct ndr_print *ndr, const char *name, const struct netr_trust_extension *r)
+{
+       ndr_print_struct(ndr, name, "netr_trust_extension");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?8:r->length);
+       ndr_print_uint32(ndr, "dummy", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->dummy);
+       ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?8:r->size);
+       ndr_print_netr_TrustFlags(ndr, "flags", r->flags);
+       ndr_print_uint32(ndr, "parent_index", r->parent_index);
+       ndr_print_uint32(ndr, "trust_type", r->trust_type);
+       ndr_print_uint32(ndr, "trust_attributes", r->trust_attributes);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_netr_trust_extension_container(struct ndr_push *ndr, int ndr_flags, const struct netr_trust_extension_container *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->info) {
+                       NDR_CHECK(ndr_push_netr_trust_extension(ndr, NDR_SCALARS, r->info));
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_netr_trust_extension_container(struct ndr_pull *ndr, int ndr_flags, struct netr_trust_extension_container *r)
+{
+       uint32_t _ptr_info;
+       TALLOC_CTX *_mem_save_info_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+               if (_ptr_info) {
+                       NDR_PULL_ALLOC(ndr, r->info);
+               } else {
+                       r->info = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->info) {
+                       _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
+                       NDR_CHECK(ndr_pull_netr_trust_extension(ndr, NDR_SCALARS, r->info));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_netr_trust_extension_container(struct ndr_print *ndr, const char *name, const struct netr_trust_extension_container *r)
+{
+       ndr_print_struct(ndr, name, "netr_trust_extension_container");
+       ndr->depth++;
+       ndr_print_uint16(ndr, "length", r->length);
+       ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->length:r->size);
+       ndr_print_ptr(ndr, "info", r->info);
+       ndr->depth++;
+       if (r->info) {
+               ndr_print_netr_trust_extension(ndr, "info", r->info);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
 static enum ndr_err_code ndr_push_netr_DomainTrustInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_DomainTrustInfo *r)
 {
-       uint32_t cntr_unknown1_0;
-       uint32_t cntr_unknown_0;
+       uint32_t cntr_dummystring_0;
+       uint32_t cntr_dummy_0;
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
                NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domainname));
@@ -6885,11 +7262,12 @@ static enum ndr_err_code ndr_push_netr_DomainTrustInfo(struct ndr_push *ndr, int
                NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->forest));
                NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
-               for (cntr_unknown1_0 = 0; cntr_unknown1_0 < 4; cntr_unknown1_0++) {
-                       NDR_CHECK(ndr_push_netr_BinaryString(ndr, NDR_SCALARS, &r->unknown1[cntr_unknown1_0]));
+               NDR_CHECK(ndr_push_netr_trust_extension_container(ndr, NDR_SCALARS, &r->trust_extension));
+               for (cntr_dummystring_0 = 0; cntr_dummystring_0 < 3; cntr_dummystring_0++) {
+                       NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->dummystring[cntr_dummystring_0]));
                }
-               for (cntr_unknown_0 = 0; cntr_unknown_0 < 4; cntr_unknown_0++) {
-                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown[cntr_unknown_0]));
+               for (cntr_dummy_0 = 0; cntr_dummy_0 < 4; cntr_dummy_0++) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy[cntr_dummy_0]));
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
@@ -6899,8 +7277,9 @@ static enum ndr_err_code ndr_push_netr_DomainTrustInfo(struct ndr_push *ndr, int
                if (r->sid) {
                        NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
                }
-               for (cntr_unknown1_0 = 0; cntr_unknown1_0 < 4; cntr_unknown1_0++) {
-                       NDR_CHECK(ndr_push_netr_BinaryString(ndr, NDR_BUFFERS, &r->unknown1[cntr_unknown1_0]));
+               NDR_CHECK(ndr_push_netr_trust_extension_container(ndr, NDR_BUFFERS, &r->trust_extension));
+               for (cntr_dummystring_0 = 0; cntr_dummystring_0 < 3; cntr_dummystring_0++) {
+                       NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->dummystring[cntr_dummystring_0]));
                }
        }
        return NDR_ERR_SUCCESS;
@@ -6910,8 +7289,8 @@ static enum ndr_err_code ndr_pull_netr_DomainTrustInfo(struct ndr_pull *ndr, int
 {
        uint32_t _ptr_sid;
        TALLOC_CTX *_mem_save_sid_0;
-       uint32_t cntr_unknown1_0;
-       uint32_t cntr_unknown_0;
+       uint32_t cntr_dummystring_0;
+       uint32_t cntr_dummy_0;
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
                NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domainname));
@@ -6924,11 +7303,12 @@ static enum ndr_err_code ndr_pull_netr_DomainTrustInfo(struct ndr_pull *ndr, int
                } else {
                        r->sid = NULL;
                }
-               for (cntr_unknown1_0 = 0; cntr_unknown1_0 < 4; cntr_unknown1_0++) {
-                       NDR_CHECK(ndr_pull_netr_BinaryString(ndr, NDR_SCALARS, &r->unknown1[cntr_unknown1_0]));
+               NDR_CHECK(ndr_pull_netr_trust_extension_container(ndr, NDR_SCALARS, &r->trust_extension));
+               for (cntr_dummystring_0 = 0; cntr_dummystring_0 < 3; cntr_dummystring_0++) {
+                       NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->dummystring[cntr_dummystring_0]));
                }
-               for (cntr_unknown_0 = 0; cntr_unknown_0 < 4; cntr_unknown_0++) {
-                       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown[cntr_unknown_0]));
+               for (cntr_dummy_0 = 0; cntr_dummy_0 < 4; cntr_dummy_0++) {
+                       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy[cntr_dummy_0]));
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
@@ -6941,8 +7321,9 @@ static enum ndr_err_code ndr_pull_netr_DomainTrustInfo(struct ndr_pull *ndr, int
                        NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
                }
-               for (cntr_unknown1_0 = 0; cntr_unknown1_0 < 4; cntr_unknown1_0++) {
-                       NDR_CHECK(ndr_pull_netr_BinaryString(ndr, NDR_BUFFERS, &r->unknown1[cntr_unknown1_0]));
+               NDR_CHECK(ndr_pull_netr_trust_extension_container(ndr, NDR_BUFFERS, &r->trust_extension));
+               for (cntr_dummystring_0 = 0; cntr_dummystring_0 < 3; cntr_dummystring_0++) {
+                       NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->dummystring[cntr_dummystring_0]));
                }
        }
        return NDR_ERR_SUCCESS;
@@ -6950,8 +7331,8 @@ static enum ndr_err_code ndr_pull_netr_DomainTrustInfo(struct ndr_pull *ndr, int
 
 _PUBLIC_ void ndr_print_netr_DomainTrustInfo(struct ndr_print *ndr, const char *name, const struct netr_DomainTrustInfo *r)
 {
-       uint32_t cntr_unknown1_0;
-       uint32_t cntr_unknown_0;
+       uint32_t cntr_dummystring_0;
+       uint32_t cntr_dummy_0;
        ndr_print_struct(ndr, name, "netr_DomainTrustInfo");
        ndr->depth++;
        ndr_print_lsa_String(ndr, "domainname", &r->domainname);
@@ -6964,22 +7345,23 @@ _PUBLIC_ void ndr_print_netr_DomainTrustInfo(struct ndr_print *ndr, const char *
                ndr_print_dom_sid2(ndr, "sid", r->sid);
        }
        ndr->depth--;
-       ndr->print(ndr, "%s: ARRAY(%d)", "unknown1", (int)4);
+       ndr_print_netr_trust_extension_container(ndr, "trust_extension", &r->trust_extension);
+       ndr->print(ndr, "%s: ARRAY(%d)", "dummystring", (int)3);
        ndr->depth++;
-       for (cntr_unknown1_0=0;cntr_unknown1_0<4;cntr_unknown1_0++) {
+       for (cntr_dummystring_0=0;cntr_dummystring_0<3;cntr_dummystring_0++) {
                char *idx_0=NULL;
-               if (asprintf(&idx_0, "[%d]", cntr_unknown1_0) != -1) {
-                       ndr_print_netr_BinaryString(ndr, "unknown1", &r->unknown1[cntr_unknown1_0]);
+               if (asprintf(&idx_0, "[%d]", cntr_dummystring_0) != -1) {
+                       ndr_print_lsa_String(ndr, "dummystring", &r->dummystring[cntr_dummystring_0]);
                        free(idx_0);
                }
        }
        ndr->depth--;
-       ndr->print(ndr, "%s: ARRAY(%d)", "unknown", (int)4);
+       ndr->print(ndr, "%s: ARRAY(%d)", "dummy", (int)4);
        ndr->depth++;
-       for (cntr_unknown_0=0;cntr_unknown_0<4;cntr_unknown_0++) {
+       for (cntr_dummy_0=0;cntr_dummy_0<4;cntr_dummy_0++) {
                char *idx_0=NULL;
-               if (asprintf(&idx_0, "[%d]", cntr_unknown_0) != -1) {
-                       ndr_print_uint32(ndr, "unknown", r->unknown[cntr_unknown_0]);
+               if (asprintf(&idx_0, "[%d]", cntr_dummy_0) != -1) {
+                       ndr_print_uint32(ndr, "dummy", r->dummy[cntr_dummy_0]);
                        free(idx_0);
                }
        }
@@ -6987,17 +7369,108 @@ _PUBLIC_ void ndr_print_netr_DomainTrustInfo(struct ndr_print *ndr, const char *
        ndr->depth--;
 }
 
+static enum ndr_err_code ndr_push_netr_LsaPolicyInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_LsaPolicyInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->policy_size));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->policy));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->policy) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->policy_size));
+                       NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->policy, r->policy_size));
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_netr_LsaPolicyInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_LsaPolicyInfo *r)
+{
+       uint32_t _ptr_policy;
+       TALLOC_CTX *_mem_save_policy_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->policy_size));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_policy));
+               if (_ptr_policy) {
+                       NDR_PULL_ALLOC(ndr, r->policy);
+               } else {
+                       r->policy = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->policy) {
+                       _mem_save_policy_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->policy, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->policy));
+                       NDR_PULL_ALLOC_N(ndr, r->policy, ndr_get_array_size(ndr, &r->policy));
+                       NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->policy, ndr_get_array_size(ndr, &r->policy)));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_0, 0);
+               }
+               if (r->policy) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->policy, r->policy_size));
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_netr_LsaPolicyInfo(struct ndr_print *ndr, const char *name, const struct netr_LsaPolicyInfo *r)
+{
+       ndr_print_struct(ndr, name, "netr_LsaPolicyInfo");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "policy_size", r->policy_size);
+       ndr_print_ptr(ndr, "policy", r->policy);
+       ndr->depth++;
+       if (r->policy) {
+               ndr_print_array_uint8(ndr, "policy", r->policy, r->policy_size);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_netr_WorkstationFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_netr_WorkstationFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+       uint32_t v;
+       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_netr_WorkstationFlags(struct ndr_print *ndr, const char *name, uint32_t r)
+{
+       ndr_print_uint32(ndr, name, r);
+       ndr->depth++;
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS", NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_WS_FLAG_HANDLES_SPN_UPDATE", NETR_WS_FLAG_HANDLES_SPN_UPDATE, r);
+       ndr->depth--;
+}
+
 static enum ndr_err_code ndr_push_netr_DomainInfo1(struct ndr_push *ndr, int ndr_flags, const struct netr_DomainInfo1 *r)
 {
        uint32_t cntr_trusts_1;
-       uint32_t cntr_unknown_0;
+       uint32_t cntr_dummystring_0;
+       uint32_t cntr_dummy_0;
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
                NDR_CHECK(ndr_push_netr_DomainTrustInfo(ndr, NDR_SCALARS, &r->domaininfo));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_trusts));
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->trusts));
-               for (cntr_unknown_0 = 0; cntr_unknown_0 < 14; cntr_unknown_0++) {
-                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown[cntr_unknown_0]));
+               NDR_CHECK(ndr_push_netr_LsaPolicyInfo(ndr, NDR_SCALARS, &r->lsa_policy));
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->dns_hostname));
+               for (cntr_dummystring_0 = 0; cntr_dummystring_0 < 3; cntr_dummystring_0++) {
+                       NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->dummystring[cntr_dummystring_0]));
+               }
+               NDR_CHECK(ndr_push_netr_WorkstationFlags(ndr, NDR_SCALARS, r->workstation_flags));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->supported_enc_types));
+               for (cntr_dummy_0 = 0; cntr_dummy_0 < 2; cntr_dummy_0++) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy[cntr_dummy_0]));
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
@@ -7011,6 +7484,11 @@ static enum ndr_err_code ndr_push_netr_DomainInfo1(struct ndr_push *ndr, int ndr
                                NDR_CHECK(ndr_push_netr_DomainTrustInfo(ndr, NDR_BUFFERS, &r->trusts[cntr_trusts_1]));
                        }
                }
+               NDR_CHECK(ndr_push_netr_LsaPolicyInfo(ndr, NDR_BUFFERS, &r->lsa_policy));
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->dns_hostname));
+               for (cntr_dummystring_0 = 0; cntr_dummystring_0 < 3; cntr_dummystring_0++) {
+                       NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->dummystring[cntr_dummystring_0]));
+               }
        }
        return NDR_ERR_SUCCESS;
 }
@@ -7021,7 +7499,8 @@ static enum ndr_err_code ndr_pull_netr_DomainInfo1(struct ndr_pull *ndr, int ndr
        uint32_t cntr_trusts_1;
        TALLOC_CTX *_mem_save_trusts_0;
        TALLOC_CTX *_mem_save_trusts_1;
-       uint32_t cntr_unknown_0;
+       uint32_t cntr_dummystring_0;
+       uint32_t cntr_dummy_0;
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
                NDR_CHECK(ndr_pull_netr_DomainTrustInfo(ndr, NDR_SCALARS, &r->domaininfo));
@@ -7032,8 +7511,15 @@ static enum ndr_err_code ndr_pull_netr_DomainInfo1(struct ndr_pull *ndr, int ndr
                } else {
                        r->trusts = NULL;
                }
-               for (cntr_unknown_0 = 0; cntr_unknown_0 < 14; cntr_unknown_0++) {
-                       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown[cntr_unknown_0]));
+               NDR_CHECK(ndr_pull_netr_LsaPolicyInfo(ndr, NDR_SCALARS, &r->lsa_policy));
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->dns_hostname));
+               for (cntr_dummystring_0 = 0; cntr_dummystring_0 < 3; cntr_dummystring_0++) {
+                       NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->dummystring[cntr_dummystring_0]));
+               }
+               NDR_CHECK(ndr_pull_netr_WorkstationFlags(ndr, NDR_SCALARS, &r->workstation_flags));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->supported_enc_types));
+               for (cntr_dummy_0 = 0; cntr_dummy_0 < 2; cntr_dummy_0++) {
+                       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy[cntr_dummy_0]));
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
@@ -7054,6 +7540,11 @@ static enum ndr_err_code ndr_pull_netr_DomainInfo1(struct ndr_pull *ndr, int ndr
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusts_1, 0);
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusts_0, 0);
                }
+               NDR_CHECK(ndr_pull_netr_LsaPolicyInfo(ndr, NDR_BUFFERS, &r->lsa_policy));
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->dns_hostname));
+               for (cntr_dummystring_0 = 0; cntr_dummystring_0 < 3; cntr_dummystring_0++) {
+                       NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->dummystring[cntr_dummystring_0]));
+               }
                if (r->trusts) {
                        NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->trusts, r->num_trusts));
                }
@@ -7064,7 +7555,8 @@ static enum ndr_err_code ndr_pull_netr_DomainInfo1(struct ndr_pull *ndr, int ndr
 _PUBLIC_ void ndr_print_netr_DomainInfo1(struct ndr_print *ndr, const char *name, const struct netr_DomainInfo1 *r)
 {
        uint32_t cntr_trusts_1;
-       uint32_t cntr_unknown_0;
+       uint32_t cntr_dummystring_0;
+       uint32_t cntr_dummy_0;
        ndr_print_struct(ndr, name, "netr_DomainInfo1");
        ndr->depth++;
        ndr_print_netr_DomainTrustInfo(ndr, "domaininfo", &r->domaininfo);
@@ -7084,12 +7576,26 @@ _PUBLIC_ void ndr_print_netr_DomainInfo1(struct ndr_print *ndr, const char *name
                ndr->depth--;
        }
        ndr->depth--;
-       ndr->print(ndr, "%s: ARRAY(%d)", "unknown", (int)14);
+       ndr_print_netr_LsaPolicyInfo(ndr, "lsa_policy", &r->lsa_policy);
+       ndr_print_lsa_String(ndr, "dns_hostname", &r->dns_hostname);
+       ndr->print(ndr, "%s: ARRAY(%d)", "dummystring", (int)3);
        ndr->depth++;
-       for (cntr_unknown_0=0;cntr_unknown_0<14;cntr_unknown_0++) {
+       for (cntr_dummystring_0=0;cntr_dummystring_0<3;cntr_dummystring_0++) {
                char *idx_0=NULL;
-               if (asprintf(&idx_0, "[%d]", cntr_unknown_0) != -1) {
-                       ndr_print_uint32(ndr, "unknown", r->unknown[cntr_unknown_0]);
+               if (asprintf(&idx_0, "[%d]", cntr_dummystring_0) != -1) {
+                       ndr_print_lsa_String(ndr, "dummystring", &r->dummystring[cntr_dummystring_0]);
+                       free(idx_0);
+               }
+       }
+       ndr->depth--;
+       ndr_print_netr_WorkstationFlags(ndr, "workstation_flags", r->workstation_flags);
+       ndr_print_uint32(ndr, "supported_enc_types", r->supported_enc_types);
+       ndr->print(ndr, "%s: ARRAY(%d)", "dummy", (int)2);
+       ndr->depth++;
+       for (cntr_dummy_0=0;cntr_dummy_0<2;cntr_dummy_0++) {
+               char *idx_0=NULL;
+               if (asprintf(&idx_0, "[%d]", cntr_dummy_0) != -1) {
+                       ndr_print_uint32(ndr, "dummy", r->dummy[cntr_dummy_0]);
                        free(idx_0);
                }
        }
@@ -7108,7 +7614,7 @@ static enum ndr_err_code ndr_push_netr_DomainInfo(struct ndr_push *ndr, int ndr_
                        break; }
 
                        case 2: {
-                               NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
+                               NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
                        break; }
 
                        default:
@@ -7125,8 +7631,8 @@ static enum ndr_err_code ndr_push_netr_DomainInfo(struct ndr_push *ndr, int ndr_
                        break;
 
                        case 2:
-                               if (r->info1) {
-                                       NDR_CHECK(ndr_push_netr_DomainInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
+                               if (r->info2) {
+                                       NDR_CHECK(ndr_push_netr_DomainInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
                                }
                        break;
 
@@ -7142,6 +7648,7 @@ static enum ndr_err_code ndr_pull_netr_DomainInfo(struct ndr_pull *ndr, int ndr_
        int level;
        uint32_t _level;
        TALLOC_CTX *_mem_save_info1_0;
+       TALLOC_CTX *_mem_save_info2_0;
        level = ndr_pull_get_switch_value(ndr, r);
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
@@ -7160,12 +7667,12 @@ static enum ndr_err_code ndr_pull_netr_DomainInfo(struct ndr_pull *ndr, int ndr_
                        break; }
 
                        case 2: {
-                               uint32_t _ptr_info1;
-                               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
-                               if (_ptr_info1) {
-                                       NDR_PULL_ALLOC(ndr, r->info1);
+                               uint32_t _ptr_info2;
+                               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
+                               if (_ptr_info2) {
+                                       NDR_PULL_ALLOC(ndr, r->info2);
                                } else {
-                                       r->info1 = NULL;
+                                       r->info2 = NULL;
                                }
                        break; }
 
@@ -7185,11 +7692,11 @@ static enum ndr_err_code ndr_pull_netr_DomainInfo(struct ndr_pull *ndr, int ndr_
                        break;
 
                        case 2:
-                               if (r->info1) {
-                                       _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                                       NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
-                                       NDR_CHECK(ndr_pull_netr_DomainInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
-                                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
+                               if (r->info2) {
+                                       _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                                       NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
+                                       NDR_CHECK(ndr_pull_netr_DomainInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
+                                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
                                }
                        break;
 
@@ -7216,10 +7723,10 @@ _PUBLIC_ void ndr_print_netr_DomainInfo(struct ndr_print *ndr, const char *name,
                break;
 
                case 2:
-                       ndr_print_ptr(ndr, "info1", r->info1);
+                       ndr_print_ptr(ndr, "info2", r->info2);
                        ndr->depth++;
-                       if (r->info1) {
-                               ndr_print_netr_DomainInfo1(ndr, "info1", r->info1);
+                       if (r->info2) {
+                               ndr_print_netr_DomainInfo1(ndr, "info2", r->info2);
                        }
                        ndr->depth--;
                break;
@@ -7423,33 +7930,6 @@ _PUBLIC_ void ndr_print_netr_DsRAddress(struct ndr_print *ndr, const char *name,
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_netr_TrustFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
-{
-       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
-       return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_netr_TrustFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
-{
-       uint32_t v;
-       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
-       *r = v;
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_netr_TrustFlags(struct ndr_print *ndr, const char *name, uint32_t r)
-{
-       ndr_print_uint32(ndr, name, r);
-       ndr->depth++;
-       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_IN_FOREST", NETR_TRUST_FLAG_IN_FOREST, r);
-       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_OUTBOUND", NETR_TRUST_FLAG_OUTBOUND, r);
-       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_TREEROOT", NETR_TRUST_FLAG_TREEROOT, r);
-       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_PRIMARY", NETR_TRUST_FLAG_PRIMARY, r);
-       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_NATIVE", NETR_TRUST_FLAG_NATIVE, r);
-       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETR_TRUST_FLAG_INBOUND", NETR_TRUST_FLAG_INBOUND, r);
-       ndr->depth--;
-}
-
 static enum ndr_err_code ndr_push_netr_TrustType(struct ndr_push *ndr, int ndr_flags, enum netr_TrustType r)
 {
        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
@@ -8212,12 +8692,12 @@ static enum ndr_err_code ndr_push_netr_LogonSamLogon(struct ndr_push *ndr, int f
                if (r->in.return_authenticator) {
                        NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
                }
-               NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS, r->in.logon_level));
+               NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, r->in.logon_level));
                if (r->in.logon == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
                NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.logon, r->in.logon_level));
-               NDR_CHECK(ndr_push_netr_LogonInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
+               NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
                NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level));
        }
        if (flags & NDR_OUT) {
@@ -8315,14 +8795,14 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogon(struct ndr_pull *ndr, int f
                        NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
                }
-               NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS, &r->in.logon_level));
+               NDR_CHECK(ndr_pull_netr_LogonInfoClass(ndr, NDR_SCALARS, &r->in.logon_level));
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
                        NDR_PULL_ALLOC(ndr, r->in.logon);
                }
                _mem_save_logon_0 = NDR_PULL_GET_MEM_CTX(ndr);
                NDR_PULL_SET_MEM_CTX(ndr, r->in.logon, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.logon, r->in.logon_level));
-               NDR_CHECK(ndr_pull_netr_LogonInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
+               NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_0, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.validation_level));
                NDR_PULL_ALLOC(ndr, r->out.validation);
@@ -8397,11 +8877,11 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogon(struct ndr_print *ndr, const char *na
                        ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
                }
                ndr->depth--;
-               ndr_print_netr_LogonLevel(ndr, "logon_level", r->in.logon_level);
+               ndr_print_netr_LogonInfoClass(ndr, "logon_level", r->in.logon_level);
                ndr_print_ptr(ndr, "logon", r->in.logon);
                ndr->depth++;
                ndr_print_set_switch_value(ndr, r->in.logon, r->in.logon_level);
-               ndr_print_netr_LogonInfo(ndr, "logon", r->in.logon);
+               ndr_print_netr_LogonLevel(ndr, "logon", r->in.logon);
                ndr->depth--;
                ndr_print_uint16(ndr, "validation_level", r->in.validation_level);
                ndr->depth--;
@@ -8455,9 +8935,9 @@ static enum ndr_err_code ndr_push_netr_LogonSamLogoff(struct ndr_push *ndr, int
                if (r->in.return_authenticator) {
                        NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
                }
-               NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS, r->in.logon_level));
+               NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, r->in.logon_level));
                NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
-               NDR_CHECK(ndr_push_netr_LogonInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
+               NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
        }
        if (flags & NDR_OUT) {
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.return_authenticator));
@@ -8542,9 +9022,9 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogoff(struct ndr_pull *ndr, int
                        NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
                }
-               NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS, &r->in.logon_level));
+               NDR_CHECK(ndr_pull_netr_LogonInfoClass(ndr, NDR_SCALARS, &r->in.logon_level));
                NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
-               NDR_CHECK(ndr_pull_netr_LogonInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
+               NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
        }
        if (flags & NDR_OUT) {
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_return_authenticator));
@@ -8598,9 +9078,9 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogoff(struct ndr_print *ndr, const char *n
                        ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
                }
                ndr->depth--;
-               ndr_print_netr_LogonLevel(ndr, "logon_level", r->in.logon_level);
+               ndr_print_netr_LogonInfoClass(ndr, "logon_level", r->in.logon_level);
                ndr_print_set_switch_value(ndr, &r->in.logon, r->in.logon_level);
-               ndr_print_netr_LogonInfo(ndr, "logon", &r->in.logon);
+               ndr_print_netr_LogonLevel(ndr, "logon", &r->in.logon);
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
@@ -13435,12 +13915,12 @@ static enum ndr_err_code ndr_push_netr_LogonSamLogonEx(struct ndr_push *ndr, int
                        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
                }
-               NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS, r->in.logon_level));
+               NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, r->in.logon_level));
                if (r->in.logon == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
                NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.logon, r->in.logon_level));
-               NDR_CHECK(ndr_push_netr_LogonInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
+               NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
                NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level));
                if (r->in.flags == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
@@ -13515,14 +13995,14 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogonEx(struct ndr_pull *ndr, int
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16));
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
                }
-               NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS, &r->in.logon_level));
+               NDR_CHECK(ndr_pull_netr_LogonInfoClass(ndr, NDR_SCALARS, &r->in.logon_level));
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
                        NDR_PULL_ALLOC(ndr, r->in.logon);
                }
                _mem_save_logon_0 = NDR_PULL_GET_MEM_CTX(ndr);
                NDR_PULL_SET_MEM_CTX(ndr, r->in.logon, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.logon, r->in.logon_level));
-               NDR_CHECK(ndr_pull_netr_LogonInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
+               NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logon));
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logon_0, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.validation_level));
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
@@ -13589,11 +14069,11 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogonEx(struct ndr_print *ndr, const char *
                        ndr_print_string(ndr, "computer_name", r->in.computer_name);
                }
                ndr->depth--;
-               ndr_print_netr_LogonLevel(ndr, "logon_level", r->in.logon_level);
+               ndr_print_netr_LogonInfoClass(ndr, "logon_level", r->in.logon_level);
                ndr_print_ptr(ndr, "logon", r->in.logon);
                ndr->depth++;
                ndr_print_set_switch_value(ndr, r->in.logon, r->in.logon_level);
-               ndr_print_netr_LogonInfo(ndr, "logon", r->in.logon);
+               ndr_print_netr_LogonLevel(ndr, "logon", r->in.logon);
                ndr->depth--;
                ndr_print_uint16(ndr, "validation_level", r->in.validation_level);
                ndr_print_ptr(ndr, "flags", r->in.flags);
@@ -14413,9 +14893,9 @@ static enum ndr_err_code ndr_push_netr_LogonSamLogonWithFlags(struct ndr_push *n
                if (r->in.return_authenticator) {
                        NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
                }
-               NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS, r->in.logon_level));
+               NDR_CHECK(ndr_push_netr_LogonInfoClass(ndr, NDR_SCALARS, r->in.logon_level));
                NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
-               NDR_CHECK(ndr_push_netr_LogonInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
+               NDR_CHECK(ndr_push_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
                NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.validation_level));
                if (r->in.flags == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
@@ -14521,9 +15001,9 @@ static enum ndr_err_code ndr_pull_netr_LogonSamLogonWithFlags(struct ndr_pull *n
                        NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, 0);
                }
-               NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS, &r->in.logon_level));
+               NDR_CHECK(ndr_pull_netr_LogonInfoClass(ndr, NDR_SCALARS, &r->in.logon_level));
                NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.logon, r->in.logon_level));
-               NDR_CHECK(ndr_pull_netr_LogonInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
+               NDR_CHECK(ndr_pull_netr_LogonLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.logon));
                NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.validation_level));
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
                        NDR_PULL_ALLOC(ndr, r->in.flags);
@@ -14613,9 +15093,9 @@ _PUBLIC_ void ndr_print_netr_LogonSamLogonWithFlags(struct ndr_print *ndr, const
                        ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
                }
                ndr->depth--;
-               ndr_print_netr_LogonLevel(ndr, "logon_level", r->in.logon_level);
+               ndr_print_netr_LogonInfoClass(ndr, "logon_level", r->in.logon_level);
                ndr_print_set_switch_value(ndr, &r->in.logon, r->in.logon_level);
-               ndr_print_netr_LogonInfo(ndr, "logon", &r->in.logon);
+               ndr_print_netr_LogonLevel(ndr, "logon", &r->in.logon);
                ndr_print_uint16(ndr, "validation_level", r->in.validation_level);
                ndr_print_ptr(ndr, "flags", r->in.flags);
                ndr->depth++;
index a9d36aeacbe92910ce055ed0ff09c93b72495e79..2a3c0fbf843f1a2bb0ea7a5217eee67f63a52673 100644 (file)
@@ -118,9 +118,11 @@ void ndr_print_netr_IdentityInfo(struct ndr_print *ndr, const char *name, const
 void ndr_print_netr_PasswordInfo(struct ndr_print *ndr, const char *name, const struct netr_PasswordInfo *r);
 void ndr_print_netr_ChallengeResponse(struct ndr_print *ndr, const char *name, const struct netr_ChallengeResponse *r);
 void ndr_print_netr_NetworkInfo(struct ndr_print *ndr, const char *name, const struct netr_NetworkInfo *r);
-enum ndr_err_code ndr_push_netr_LogonInfo(struct ndr_push *ndr, int ndr_flags, const union netr_LogonInfo *r);
-enum ndr_err_code ndr_pull_netr_LogonInfo(struct ndr_pull *ndr, int ndr_flags, union netr_LogonInfo *r);
-void ndr_print_netr_LogonInfo(struct ndr_print *ndr, const char *name, const union netr_LogonInfo *r);
+void ndr_print_netr_GenericInfo(struct ndr_print *ndr, const char *name, const struct netr_GenericInfo *r);
+void ndr_print_netr_LogonInfoClass(struct ndr_print *ndr, const char *name, enum netr_LogonInfoClass r);
+enum ndr_err_code ndr_push_netr_LogonLevel(struct ndr_push *ndr, int ndr_flags, const union netr_LogonLevel *r);
+enum ndr_err_code ndr_pull_netr_LogonLevel(struct ndr_pull *ndr, int ndr_flags, union netr_LogonLevel *r);
+void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, const union netr_LogonLevel *r);
 enum ndr_err_code ndr_push_netr_UserSessionKey(struct ndr_push *ndr, int ndr_flags, const struct netr_UserSessionKey *r);
 enum ndr_err_code ndr_pull_netr_UserSessionKey(struct ndr_pull *ndr, int ndr_flags, struct netr_UserSessionKey *r);
 void ndr_print_netr_UserSessionKey(struct ndr_print *ndr, const char *name, const struct netr_UserSessionKey *r);
@@ -138,6 +140,7 @@ enum ndr_err_code ndr_pull_netr_SamInfo3(struct ndr_pull *ndr, int ndr_flags, st
 void ndr_print_netr_SamInfo3(struct ndr_print *ndr, const char *name, const struct netr_SamInfo3 *r);
 void ndr_print_netr_SamInfo6(struct ndr_print *ndr, const char *name, const struct netr_SamInfo6 *r);
 void ndr_print_netr_PacInfo(struct ndr_print *ndr, const char *name, const struct netr_PacInfo *r);
+void ndr_print_netr_GenericInfo2(struct ndr_print *ndr, const char *name, const struct netr_GenericInfo2 *r);
 enum ndr_err_code ndr_push_netr_Validation(struct ndr_push *ndr, int ndr_flags, const union netr_Validation *r);
 enum ndr_err_code ndr_pull_netr_Validation(struct ndr_pull *ndr, int ndr_flags, union netr_Validation *r);
 void ndr_print_netr_Validation(struct ndr_print *ndr, const char *name, const union netr_Validation *r);
@@ -147,7 +150,6 @@ void ndr_print_netr_Credential(struct ndr_print *ndr, const char *name, const st
 enum ndr_err_code ndr_push_netr_Authenticator(struct ndr_push *ndr, int ndr_flags, const struct netr_Authenticator *r);
 enum ndr_err_code ndr_pull_netr_Authenticator(struct ndr_pull *ndr, int ndr_flags, struct netr_Authenticator *r);
 void ndr_print_netr_Authenticator(struct ndr_print *ndr, const char *name, const struct netr_Authenticator *r);
-void ndr_print_netr_LogonLevel(struct ndr_print *ndr, const char *name, enum netr_LogonLevel r);
 void ndr_print_netr_DELTA_DELETE_USER(struct ndr_print *ndr, const char *name, const struct netr_DELTA_DELETE_USER *r);
 void ndr_print_netr_USER_KEY16(struct ndr_print *ndr, const char *name, const struct netr_USER_KEY16 *r);
 void ndr_print_netr_PasswordHistory(struct ndr_print *ndr, const char *name, const struct netr_PasswordHistory *r);
@@ -195,16 +197,22 @@ void ndr_print_netr_DsR_DcFlags(struct ndr_print *ndr, const char *name, uint32_
 enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_DsRGetDCNameInfo *r);
 enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_DsRGetDCNameInfo *r);
 void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char *name, const struct netr_DsRGetDCNameInfo *r);
+void ndr_print_netr_TrustFlags(struct ndr_print *ndr, const char *name, uint32_t r);
 void ndr_print_netr_BinaryString(struct ndr_print *ndr, const char *name, const struct netr_BinaryString *r);
 void ndr_print_netr_DomainQuery1(struct ndr_print *ndr, const char *name, const struct netr_DomainQuery1 *r);
 void ndr_print_netr_DomainQuery(struct ndr_print *ndr, const char *name, const union netr_DomainQuery *r);
+void ndr_print_netr_trust_extension(struct ndr_print *ndr, const char *name, const struct netr_trust_extension *r);
+void ndr_print_netr_trust_extension_container(struct ndr_print *ndr, const char *name, const struct netr_trust_extension_container *r);
 void ndr_print_netr_DomainTrustInfo(struct ndr_print *ndr, const char *name, const struct netr_DomainTrustInfo *r);
+void ndr_print_netr_LsaPolicyInfo(struct ndr_print *ndr, const char *name, const struct netr_LsaPolicyInfo *r);
+enum ndr_err_code ndr_push_netr_WorkstationFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r);
+enum ndr_err_code ndr_pull_netr_WorkstationFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
+void ndr_print_netr_WorkstationFlags(struct ndr_print *ndr, const char *name, uint32_t r);
 void ndr_print_netr_DomainInfo1(struct ndr_print *ndr, const char *name, const struct netr_DomainInfo1 *r);
 void ndr_print_netr_DomainInfo(struct ndr_print *ndr, const char *name, const union netr_DomainInfo *r);
 void ndr_print_netr_CryptPassword(struct ndr_print *ndr, const char *name, const struct netr_CryptPassword *r);
 void ndr_print_netr_DsRAddressToSitenamesWCtr(struct ndr_print *ndr, const char *name, const struct netr_DsRAddressToSitenamesWCtr *r);
 void ndr_print_netr_DsRAddress(struct ndr_print *ndr, const char *name, const struct netr_DsRAddress *r);
-void ndr_print_netr_TrustFlags(struct ndr_print *ndr, const char *name, uint32_t r);
 void ndr_print_netr_TrustType(struct ndr_print *ndr, const char *name, enum netr_TrustType r);
 void ndr_print_netr_TrustAttributes(struct ndr_print *ndr, const char *name, uint32_t r);
 void ndr_print_netr_DomainTrust(struct ndr_print *ndr, const char *name, const struct netr_DomainTrust *r);
index b4be9a8f5a54696e08c13dade09142ce4333d1f4..dfa72d8004068610a73b5537520c7d832c2ed2b8 100644 (file)
@@ -3,7 +3,7 @@
 #include "includes.h"
 #include "librpc/gen_ndr/ndr_notify.h"
 
-#include "librpc/gen_ndr/ndr_misc.h"
+#include "librpc/gen_ndr/ndr_security.h"
 _PUBLIC_ enum ndr_err_code ndr_push_notify_entry(struct ndr_push *ndr, int ndr_flags, const struct notify_entry *r)
 {
        if (ndr_flags & NDR_SCALARS) {
index 62acf474ae77de2b1cbaa2ea3f010a10560ce664..35d02a0dcbb3b58740b609155208b626c6f66185 100644 (file)
@@ -508,9 +508,35 @@ _PUBLIC_ void ndr_print_PNP_EnumerateSubKeys(struct ndr_print *ndr, const char *
 
 static enum ndr_err_code ndr_push_PNP_GetDeviceList(struct ndr_push *ndr, int flags, const struct PNP_GetDeviceList *r)
 {
+       uint32_t cntr_buffer_1;
        if (flags & NDR_IN) {
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.filter));
+               if (r->in.filter) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.filter, CH_UTF16)));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.filter, CH_UTF16)));
+                       NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.filter, ndr_charset_length(r->in.filter, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+               }
+               if (r->in.length == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.length));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
        }
        if (flags & NDR_OUT) {
+               if (r->out.buffer == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.length));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.length));
+               for (cntr_buffer_1 = 0; cntr_buffer_1 < *r->out.length; cntr_buffer_1++) {
+                       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.buffer[cntr_buffer_1]));
+               }
+               if (r->out.length == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.length));
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
        }
        return NDR_ERR_SUCCESS;
@@ -518,16 +544,81 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceList(struct ndr_push *ndr, int fl
 
 static enum ndr_err_code ndr_pull_PNP_GetDeviceList(struct ndr_pull *ndr, int flags, struct PNP_GetDeviceList *r)
 {
+       uint32_t _ptr_filter;
+       uint32_t cntr_buffer_1;
+       TALLOC_CTX *_mem_save_filter_0;
+       TALLOC_CTX *_mem_save_buffer_1;
+       TALLOC_CTX *_mem_save_length_0;
        if (flags & NDR_IN) {
+               ZERO_STRUCT(r->out);
+
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_filter));
+               if (_ptr_filter) {
+                       NDR_PULL_ALLOC(ndr, r->in.filter);
+               } else {
+                       r->in.filter = NULL;
+               }
+               if (r->in.filter) {
+                       _mem_save_filter_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->in.filter, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->in.filter));
+                       NDR_CHECK(ndr_pull_array_length(ndr, &r->in.filter));
+                       if (ndr_get_array_length(ndr, &r->in.filter) > ndr_get_array_size(ndr, &r->in.filter)) {
+                               return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.filter), ndr_get_array_length(ndr, &r->in.filter));
+                       }
+                       NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.filter), sizeof(uint16_t)));
+                       NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.filter, ndr_get_array_length(ndr, &r->in.filter), sizeof(uint16_t), CH_UTF16));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_filter_0, 0);
+               }
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.length);
+               }
+               _mem_save_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.length, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.length));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_length_0, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
+               NDR_PULL_ALLOC_N(ndr, r->out.buffer, *r->in.length);
+               memset(r->out.buffer, 0, (*r->in.length) * sizeof(*r->out.buffer));
+               NDR_PULL_ALLOC(ndr, r->out.length);
+               *r->out.length = *r->in.length;
        }
        if (flags & NDR_OUT) {
+               NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
+               NDR_CHECK(ndr_pull_array_length(ndr, &r->out.buffer));
+               if (ndr_get_array_length(ndr, &r->out.buffer) > ndr_get_array_size(ndr, &r->out.buffer)) {
+                       return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->out.buffer), ndr_get_array_length(ndr, &r->out.buffer));
+               }
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
+               }
+               _mem_save_buffer_1 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer, 0);
+               for (cntr_buffer_1 = 0; cntr_buffer_1 < *r->out.length; cntr_buffer_1++) {
+                       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.buffer[cntr_buffer_1]));
+               }
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_1, 0);
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->out.length);
+               }
+               _mem_save_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.length, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.length));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_length_0, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+               if (r->out.buffer) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, *r->out.length));
+               }
+               if (r->out.buffer) {
+                       NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.buffer, *r->out.length));
+               }
        }
        return NDR_ERR_SUCCESS;
 }
 
 _PUBLIC_ void ndr_print_PNP_GetDeviceList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceList *r)
 {
+       uint32_t cntr_buffer_1;
        ndr_print_struct(ndr, name, "PNP_GetDeviceList");
        ndr->depth++;
        if (flags & NDR_SET_VALUES) {
@@ -536,11 +627,39 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceList(struct ndr_print *ndr, const char *nam
        if (flags & NDR_IN) {
                ndr_print_struct(ndr, "in", "PNP_GetDeviceList");
                ndr->depth++;
+               ndr_print_ptr(ndr, "filter", r->in.filter);
+               ndr->depth++;
+               if (r->in.filter) {
+                       ndr_print_string(ndr, "filter", r->in.filter);
+               }
+               ndr->depth--;
+               ndr_print_ptr(ndr, "length", r->in.length);
+               ndr->depth++;
+               ndr_print_uint32(ndr, "length", *r->in.length);
+               ndr->depth--;
+               ndr_print_uint32(ndr, "flags", r->in.flags);
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
                ndr_print_struct(ndr, "out", "PNP_GetDeviceList");
                ndr->depth++;
+               ndr_print_ptr(ndr, "buffer", r->out.buffer);
+               ndr->depth++;
+               ndr->print(ndr, "%s: ARRAY(%d)", "buffer", (int)*r->out.length);
+               ndr->depth++;
+               for (cntr_buffer_1=0;cntr_buffer_1<*r->out.length;cntr_buffer_1++) {
+                       char *idx_1=NULL;
+                       if (asprintf(&idx_1, "[%d]", cntr_buffer_1) != -1) {
+                               ndr_print_uint16(ndr, "buffer", r->out.buffer[cntr_buffer_1]);
+                               free(idx_1);
+                       }
+               }
+               ndr->depth--;
+               ndr->depth--;
+               ndr_print_ptr(ndr, "length", r->out.length);
+               ndr->depth++;
+               ndr_print_uint32(ndr, "length", *r->out.length);
+               ndr->depth--;
                ndr_print_WERROR(ndr, "result", r->out.result);
                ndr->depth--;
        }
@@ -696,10 +815,10 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceRegProp(struct ndr_push *ndr, int
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicepath, CH_UTF16)));
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.devicepath, ndr_charset_length(r->in.devicepath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.property));
-               if (r->in.unknown1 == NULL) {
+               if (r->in.reg_data_type == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.unknown1));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.reg_data_type));
                if (r->in.buffer_size == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
@@ -708,13 +827,13 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceRegProp(struct ndr_push *ndr, int
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.needed));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown3));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
        }
        if (flags & NDR_OUT) {
-               if (r->out.unknown1 == NULL) {
+               if (r->out.reg_data_type == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.unknown1));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.reg_data_type));
                if (r->out.buffer == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
@@ -737,7 +856,7 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceRegProp(struct ndr_push *ndr, int
 
 static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int flags, struct PNP_GetDeviceRegProp *r)
 {
-       TALLOC_CTX *_mem_save_unknown1_0;
+       TALLOC_CTX *_mem_save_reg_data_type_0;
        TALLOC_CTX *_mem_save_buffer_size_0;
        TALLOC_CTX *_mem_save_needed_0;
        if (flags & NDR_IN) {
@@ -752,12 +871,12 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.devicepath, ndr_get_array_length(ndr, &r->in.devicepath), sizeof(uint16_t), CH_UTF16));
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.property));
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->in.unknown1);
+                       NDR_PULL_ALLOC(ndr, r->in.reg_data_type);
                }
-               _mem_save_unknown1_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown1, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.unknown1));
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown1_0, LIBNDR_FLAG_REF_ALLOC);
+               _mem_save_reg_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.reg_data_type, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.reg_data_type));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reg_data_type_0, LIBNDR_FLAG_REF_ALLOC);
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
                        NDR_PULL_ALLOC(ndr, r->in.buffer_size);
                }
@@ -772,9 +891,9 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int
                NDR_PULL_SET_MEM_CTX(ndr, r->in.needed, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.needed));
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown3));
-               NDR_PULL_ALLOC(ndr, r->out.unknown1);
-               *r->out.unknown1 = *r->in.unknown1;
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
+               NDR_PULL_ALLOC(ndr, r->out.reg_data_type);
+               *r->out.reg_data_type = *r->in.reg_data_type;
                NDR_PULL_ALLOC_N(ndr, r->out.buffer, *r->in.buffer_size);
                memset(r->out.buffer, 0, (*r->in.buffer_size) * sizeof(*r->out.buffer));
                NDR_PULL_ALLOC(ndr, r->out.buffer_size);
@@ -784,12 +903,12 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int
        }
        if (flags & NDR_OUT) {
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->out.unknown1);
+                       NDR_PULL_ALLOC(ndr, r->out.reg_data_type);
                }
-               _mem_save_unknown1_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown1, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.unknown1));
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown1_0, LIBNDR_FLAG_REF_ALLOC);
+               _mem_save_reg_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.reg_data_type, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.reg_data_type));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reg_data_type_0, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
                NDR_CHECK(ndr_pull_array_length(ndr, &r->out.buffer));
                if (ndr_get_array_length(ndr, &r->out.buffer) > ndr_get_array_size(ndr, &r->out.buffer)) {
@@ -839,9 +958,9 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceRegProp(struct ndr_print *ndr, const char *
                ndr_print_string(ndr, "devicepath", r->in.devicepath);
                ndr->depth--;
                ndr_print_uint32(ndr, "property", r->in.property);
-               ndr_print_ptr(ndr, "unknown1", r->in.unknown1);
+               ndr_print_ptr(ndr, "reg_data_type", r->in.reg_data_type);
                ndr->depth++;
-               ndr_print_uint32(ndr, "unknown1", *r->in.unknown1);
+               ndr_print_uint32(ndr, "reg_data_type", *r->in.reg_data_type);
                ndr->depth--;
                ndr_print_ptr(ndr, "buffer_size", r->in.buffer_size);
                ndr->depth++;
@@ -851,15 +970,15 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceRegProp(struct ndr_print *ndr, const char *
                ndr->depth++;
                ndr_print_uint32(ndr, "needed", *r->in.needed);
                ndr->depth--;
-               ndr_print_uint32(ndr, "unknown3", r->in.unknown3);
+               ndr_print_uint32(ndr, "flags", r->in.flags);
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
                ndr_print_struct(ndr, "out", "PNP_GetDeviceRegProp");
                ndr->depth++;
-               ndr_print_ptr(ndr, "unknown1", r->out.unknown1);
+               ndr_print_ptr(ndr, "reg_data_type", r->out.reg_data_type);
                ndr->depth++;
-               ndr_print_uint32(ndr, "unknown1", *r->out.unknown1);
+               ndr_print_uint32(ndr, "reg_data_type", *r->out.reg_data_type);
                ndr->depth--;
                ndr_print_ptr(ndr, "buffer", r->out.buffer);
                ndr->depth++;
index 9c5a8863255d18941488e7f55b126a6765cb3a31..10055aef37b06d04caf698ef92a56addb3741b80 100644 (file)
@@ -406,12 +406,12 @@ _PUBLIC_ void ndr_print_samr_DomInfo1(struct ndr_print *ndr, const char *name, c
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_samr_DomInfo2(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo2 *r)
+static enum ndr_err_code ndr_push_samr_DomGeneralInformation(struct ndr_push *ndr, int ndr_flags, const struct samr_DomGeneralInformation *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
                NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->force_logoff_time));
-               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment));
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
                NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
                NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->primary));
                NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->sequence_num));
@@ -423,19 +423,19 @@ static enum ndr_err_code ndr_push_samr_DomInfo2(struct ndr_push *ndr, int ndr_fl
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_aliases));
        }
        if (ndr_flags & NDR_BUFFERS) {
-               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment));
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
                NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
                NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->primary));
        }
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_samr_DomInfo2(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo2 *r)
+static enum ndr_err_code ndr_pull_samr_DomGeneralInformation(struct ndr_pull *ndr, int ndr_flags, struct samr_DomGeneralInformation *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
                NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->force_logoff_time));
-               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment));
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
                NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
                NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->primary));
                NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->sequence_num));
@@ -447,19 +447,19 @@ static enum ndr_err_code ndr_pull_samr_DomInfo2(struct ndr_pull *ndr, int ndr_fl
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_aliases));
        }
        if (ndr_flags & NDR_BUFFERS) {
-               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment));
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
                NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->domain_name));
                NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->primary));
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_samr_DomInfo2(struct ndr_print *ndr, const char *name, const struct samr_DomInfo2 *r)
+_PUBLIC_ void ndr_print_samr_DomGeneralInformation(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation *r)
 {
-       ndr_print_struct(ndr, name, "samr_DomInfo2");
+       ndr_print_struct(ndr, name, "samr_DomGeneralInformation");
        ndr->depth++;
        ndr_print_NTTIME(ndr, "force_logoff_time", r->force_logoff_time);
-       ndr_print_lsa_String(ndr, "comment", &r->comment);
+       ndr_print_lsa_String(ndr, "oem_information", &r->oem_information);
        ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
        ndr_print_lsa_String(ndr, "primary", &r->primary);
        ndr_print_udlong(ndr, "sequence_num", r->sequence_num);
@@ -502,35 +502,35 @@ _PUBLIC_ void ndr_print_samr_DomInfo3(struct ndr_print *ndr, const char *name, c
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_samr_DomInfo4(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo4 *r)
+static enum ndr_err_code ndr_push_samr_DomOEMInformation(struct ndr_push *ndr, int ndr_flags, const struct samr_DomOEMInformation *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment));
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
        }
        if (ndr_flags & NDR_BUFFERS) {
-               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment));
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
        }
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_samr_DomInfo4(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo4 *r)
+static enum ndr_err_code ndr_pull_samr_DomOEMInformation(struct ndr_pull *ndr, int ndr_flags, struct samr_DomOEMInformation *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment));
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->oem_information));
        }
        if (ndr_flags & NDR_BUFFERS) {
-               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment));
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->oem_information));
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_samr_DomInfo4(struct ndr_print *ndr, const char *name, const struct samr_DomInfo4 *r)
+_PUBLIC_ void ndr_print_samr_DomOEMInformation(struct ndr_print *ndr, const char *name, const struct samr_DomOEMInformation *r)
 {
-       ndr_print_struct(ndr, name, "samr_DomInfo4");
+       ndr_print_struct(ndr, name, "samr_DomOEMInformation");
        ndr->depth++;
-       ndr_print_lsa_String(ndr, "comment", &r->comment);
+       ndr_print_lsa_String(ndr, "oem_information", &r->oem_information);
        ndr->depth--;
 }
 
@@ -691,41 +691,41 @@ _PUBLIC_ void ndr_print_samr_DomInfo9(struct ndr_print *ndr, const char *name, c
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_samr_DomInfo11(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo11 *r)
+static enum ndr_err_code ndr_push_samr_DomGeneralInformation2(struct ndr_push *ndr, int ndr_flags, const struct samr_DomGeneralInformation2 *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 8));
-               NDR_CHECK(ndr_push_samr_DomInfo2(ndr, NDR_SCALARS, &r->info2));
+               NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general));
                NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_duration));
                NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lockout_window));
                NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lockout_threshold));
        }
        if (ndr_flags & NDR_BUFFERS) {
-               NDR_CHECK(ndr_push_samr_DomInfo2(ndr, NDR_BUFFERS, &r->info2));
+               NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general));
        }
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_samr_DomInfo11(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo11 *r)
+static enum ndr_err_code ndr_pull_samr_DomGeneralInformation2(struct ndr_pull *ndr, int ndr_flags, struct samr_DomGeneralInformation2 *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 8));
-               NDR_CHECK(ndr_pull_samr_DomInfo2(ndr, NDR_SCALARS, &r->info2));
+               NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general));
                NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_duration));
                NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lockout_window));
                NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lockout_threshold));
        }
        if (ndr_flags & NDR_BUFFERS) {
-               NDR_CHECK(ndr_pull_samr_DomInfo2(ndr, NDR_BUFFERS, &r->info2));
+               NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general));
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_samr_DomInfo11(struct ndr_print *ndr, const char *name, const struct samr_DomInfo11 *r)
+_PUBLIC_ void ndr_print_samr_DomGeneralInformation2(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation2 *r)
 {
-       ndr_print_struct(ndr, name, "samr_DomInfo11");
+       ndr_print_struct(ndr, name, "samr_DomGeneralInformation2");
        ndr->depth++;
-       ndr_print_samr_DomInfo2(ndr, "info2", &r->info2);
+       ndr_print_samr_DomGeneralInformation(ndr, "general", &r->general);
        ndr_print_hyper(ndr, "lockout_duration", r->lockout_duration);
        ndr_print_hyper(ndr, "lockout_window", r->lockout_window);
        ndr_print_uint16(ndr, "lockout_threshold", r->lockout_threshold);
@@ -818,7 +818,7 @@ static enum ndr_err_code ndr_push_samr_DomainInfo(struct ndr_push *ndr, int ndr_
                        break; }
 
                        case 2: {
-                               NDR_CHECK(ndr_push_samr_DomInfo2(ndr, NDR_SCALARS, &r->info2));
+                               NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general));
                        break; }
 
                        case 3: {
@@ -826,7 +826,7 @@ static enum ndr_err_code ndr_push_samr_DomainInfo(struct ndr_push *ndr, int ndr_
                        break; }
 
                        case 4: {
-                               NDR_CHECK(ndr_push_samr_DomInfo4(ndr, NDR_SCALARS, &r->info4));
+                               NDR_CHECK(ndr_push_samr_DomOEMInformation(ndr, NDR_SCALARS, &r->oem));
                        break; }
 
                        case 5: {
@@ -850,7 +850,7 @@ static enum ndr_err_code ndr_push_samr_DomainInfo(struct ndr_push *ndr, int ndr_
                        break; }
 
                        case 11: {
-                               NDR_CHECK(ndr_push_samr_DomInfo11(ndr, NDR_SCALARS, &r->info11));
+                               NDR_CHECK(ndr_push_samr_DomGeneralInformation2(ndr, NDR_SCALARS, &r->general2));
                        break; }
 
                        case 12: {
@@ -872,14 +872,14 @@ static enum ndr_err_code ndr_push_samr_DomainInfo(struct ndr_push *ndr, int ndr_
                        break;
 
                        case 2:
-                               NDR_CHECK(ndr_push_samr_DomInfo2(ndr, NDR_BUFFERS, &r->info2));
+                               NDR_CHECK(ndr_push_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general));
                        break;
 
                        case 3:
                        break;
 
                        case 4:
-                               NDR_CHECK(ndr_push_samr_DomInfo4(ndr, NDR_BUFFERS, &r->info4));
+                               NDR_CHECK(ndr_push_samr_DomOEMInformation(ndr, NDR_BUFFERS, &r->oem));
                        break;
 
                        case 5:
@@ -900,7 +900,7 @@ static enum ndr_err_code ndr_push_samr_DomainInfo(struct ndr_push *ndr, int ndr_
                        break;
 
                        case 11:
-                               NDR_CHECK(ndr_push_samr_DomInfo11(ndr, NDR_BUFFERS, &r->info11));
+                               NDR_CHECK(ndr_push_samr_DomGeneralInformation2(ndr, NDR_BUFFERS, &r->general2));
                        break;
 
                        case 12:
@@ -932,7 +932,7 @@ static enum ndr_err_code ndr_pull_samr_DomainInfo(struct ndr_pull *ndr, int ndr_
                        break; }
 
                        case 2: {
-                               NDR_CHECK(ndr_pull_samr_DomInfo2(ndr, NDR_SCALARS, &r->info2));
+                               NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_SCALARS, &r->general));
                        break; }
 
                        case 3: {
@@ -940,7 +940,7 @@ static enum ndr_err_code ndr_pull_samr_DomainInfo(struct ndr_pull *ndr, int ndr_
                        break; }
 
                        case 4: {
-                               NDR_CHECK(ndr_pull_samr_DomInfo4(ndr, NDR_SCALARS, &r->info4));
+                               NDR_CHECK(ndr_pull_samr_DomOEMInformation(ndr, NDR_SCALARS, &r->oem));
                        break; }
 
                        case 5: {
@@ -964,7 +964,7 @@ static enum ndr_err_code ndr_pull_samr_DomainInfo(struct ndr_pull *ndr, int ndr_
                        break; }
 
                        case 11: {
-                               NDR_CHECK(ndr_pull_samr_DomInfo11(ndr, NDR_SCALARS, &r->info11));
+                               NDR_CHECK(ndr_pull_samr_DomGeneralInformation2(ndr, NDR_SCALARS, &r->general2));
                        break; }
 
                        case 12: {
@@ -985,14 +985,14 @@ static enum ndr_err_code ndr_pull_samr_DomainInfo(struct ndr_pull *ndr, int ndr_
                        break;
 
                        case 2:
-                               NDR_CHECK(ndr_pull_samr_DomInfo2(ndr, NDR_BUFFERS, &r->info2));
+                               NDR_CHECK(ndr_pull_samr_DomGeneralInformation(ndr, NDR_BUFFERS, &r->general));
                        break;
 
                        case 3:
                        break;
 
                        case 4:
-                               NDR_CHECK(ndr_pull_samr_DomInfo4(ndr, NDR_BUFFERS, &r->info4));
+                               NDR_CHECK(ndr_pull_samr_DomOEMInformation(ndr, NDR_BUFFERS, &r->oem));
                        break;
 
                        case 5:
@@ -1013,7 +1013,7 @@ static enum ndr_err_code ndr_pull_samr_DomainInfo(struct ndr_pull *ndr, int ndr_
                        break;
 
                        case 11:
-                               NDR_CHECK(ndr_pull_samr_DomInfo11(ndr, NDR_BUFFERS, &r->info11));
+                               NDR_CHECK(ndr_pull_samr_DomGeneralInformation2(ndr, NDR_BUFFERS, &r->general2));
                        break;
 
                        case 12:
@@ -1040,7 +1040,7 @@ _PUBLIC_ void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name,
                break;
 
                case 2:
-                       ndr_print_samr_DomInfo2(ndr, "info2", &r->info2);
+                       ndr_print_samr_DomGeneralInformation(ndr, "general", &r->general);
                break;
 
                case 3:
@@ -1048,7 +1048,7 @@ _PUBLIC_ void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name,
                break;
 
                case 4:
-                       ndr_print_samr_DomInfo4(ndr, "info4", &r->info4);
+                       ndr_print_samr_DomOEMInformation(ndr, "oem", &r->oem);
                break;
 
                case 5:
@@ -1072,7 +1072,7 @@ _PUBLIC_ void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name,
                break;
 
                case 11:
-                       ndr_print_samr_DomInfo11(ndr, "info11", &r->info11);
+                       ndr_print_samr_DomGeneralInformation2(ndr, "general2", &r->general2);
                break;
 
                case 12:
index c21b5455fb864faff7ef786dabe11d1e45009c48..1f582061f9325149011a064736463429063476d8 100644 (file)
@@ -163,15 +163,15 @@ enum ndr_err_code ndr_push_samr_PasswordProperties(struct ndr_push *ndr, int ndr
 enum ndr_err_code ndr_pull_samr_PasswordProperties(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
 void ndr_print_samr_PasswordProperties(struct ndr_print *ndr, const char *name, uint32_t r);
 void ndr_print_samr_DomInfo1(struct ndr_print *ndr, const char *name, const struct samr_DomInfo1 *r);
-void ndr_print_samr_DomInfo2(struct ndr_print *ndr, const char *name, const struct samr_DomInfo2 *r);
+void ndr_print_samr_DomGeneralInformation(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation *r);
 void ndr_print_samr_DomInfo3(struct ndr_print *ndr, const char *name, const struct samr_DomInfo3 *r);
-void ndr_print_samr_DomInfo4(struct ndr_print *ndr, const char *name, const struct samr_DomInfo4 *r);
+void ndr_print_samr_DomOEMInformation(struct ndr_print *ndr, const char *name, const struct samr_DomOEMInformation *r);
 void ndr_print_samr_DomInfo5(struct ndr_print *ndr, const char *name, const struct samr_DomInfo5 *r);
 void ndr_print_samr_DomInfo6(struct ndr_print *ndr, const char *name, const struct samr_DomInfo6 *r);
 void ndr_print_samr_DomInfo7(struct ndr_print *ndr, const char *name, const struct samr_DomInfo7 *r);
 void ndr_print_samr_DomInfo8(struct ndr_print *ndr, const char *name, const struct samr_DomInfo8 *r);
 void ndr_print_samr_DomInfo9(struct ndr_print *ndr, const char *name, const struct samr_DomInfo9 *r);
-void ndr_print_samr_DomInfo11(struct ndr_print *ndr, const char *name, const struct samr_DomInfo11 *r);
+void ndr_print_samr_DomGeneralInformation2(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation2 *r);
 void ndr_print_samr_DomInfo12(struct ndr_print *ndr, const char *name, const struct samr_DomInfo12 *r);
 void ndr_print_samr_DomInfo13(struct ndr_print *ndr, const char *name, const struct samr_DomInfo13 *r);
 void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name, const union samr_DomainInfo *r);
index d54fdb2395ebda7240fcb2c04021c7a1f958d61f..de899241ab5b701b61a91edf8abfe210a06df01b 100644 (file)
@@ -1024,3 +1024,29 @@ _PUBLIC_ void ndr_print_security_secinfo(struct ndr_print *ndr, const char *name
        ndr->depth--;
 }
 
+_PUBLIC_ enum ndr_err_code ndr_push_kerb_EncTypes(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_kerb_EncTypes(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+       uint32_t v;
+       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_kerb_EncTypes(struct ndr_print *ndr, const char *name, uint32_t r)
+{
+       ndr_print_uint32(ndr, name, r);
+       ndr->depth++;
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_DES_CBC_CRC", KERB_ENCTYPE_DES_CBC_CRC, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_DES_CBC_MD5", KERB_ENCTYPE_DES_CBC_MD5, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_RC4_HMAC_MD5", KERB_ENCTYPE_RC4_HMAC_MD5, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_AES128_CTS_HMAC_SHA1_96", KERB_ENCTYPE_AES128_CTS_HMAC_SHA1_96, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96", KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96, r);
+       ndr->depth--;
+}
+
index 79bfd78f5155d268565d6af50e3e13b7fee92341..7a2ff7430970162fa568531579166e21b233e0d3 100644 (file)
@@ -38,4 +38,7 @@ void ndr_print_security_token(struct ndr_print *ndr, const char *name, const str
 enum ndr_err_code ndr_push_security_secinfo(struct ndr_push *ndr, int ndr_flags, uint32_t r);
 enum ndr_err_code ndr_pull_security_secinfo(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
 void ndr_print_security_secinfo(struct ndr_print *ndr, const char *name, uint32_t r);
+enum ndr_err_code ndr_push_kerb_EncTypes(struct ndr_push *ndr, int ndr_flags, uint32_t r);
+enum ndr_err_code ndr_pull_kerb_EncTypes(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
+void ndr_print_kerb_EncTypes(struct ndr_print *ndr, const char *name, uint32_t r);
 #endif /* _HEADER_NDR_security */
index ec1450b48ba2e1f8d911f176be8c90ac6e96295f..e897ef334b950af7ffa3b4a30b5cd54ff39e921b 100644 (file)
@@ -353,6 +353,215 @@ _PUBLIC_ void ndr_print_svcctl_ServiceAccessMask(struct ndr_print *ndr, const ch
        ndr->depth--;
 }
 
+_PUBLIC_ enum ndr_err_code ndr_push_QUERY_SERVICE_CONFIG(struct ndr_push *ndr, int ndr_flags, const struct QUERY_SERVICE_CONFIG *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_type));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->start_type));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->error_control));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->executablepath));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->loadordergroup));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->tag_id));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->dependencies));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->startname));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->displayname));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->executablepath) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->executablepath, CH_UTF16)));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->executablepath, CH_UTF16)));
+                       NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->executablepath, ndr_charset_length(r->executablepath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+               }
+               if (r->loadordergroup) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->loadordergroup, CH_UTF16)));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->loadordergroup, CH_UTF16)));
+                       NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->loadordergroup, ndr_charset_length(r->loadordergroup, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+               }
+               if (r->dependencies) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dependencies, CH_UTF16)));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dependencies, CH_UTF16)));
+                       NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dependencies, ndr_charset_length(r->dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+               }
+               if (r->startname) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->startname, CH_UTF16)));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->startname, CH_UTF16)));
+                       NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->startname, ndr_charset_length(r->startname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+               }
+               if (r->displayname) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->displayname, CH_UTF16)));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->displayname, CH_UTF16)));
+                       NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->displayname, ndr_charset_length(r->displayname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_QUERY_SERVICE_CONFIG(struct ndr_pull *ndr, int ndr_flags, struct QUERY_SERVICE_CONFIG *r)
+{
+       uint32_t _ptr_executablepath;
+       TALLOC_CTX *_mem_save_executablepath_0;
+       uint32_t _ptr_loadordergroup;
+       TALLOC_CTX *_mem_save_loadordergroup_0;
+       uint32_t _ptr_dependencies;
+       TALLOC_CTX *_mem_save_dependencies_0;
+       uint32_t _ptr_startname;
+       TALLOC_CTX *_mem_save_startname_0;
+       uint32_t _ptr_displayname;
+       TALLOC_CTX *_mem_save_displayname_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->service_type));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->start_type));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->error_control));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_executablepath));
+               if (_ptr_executablepath) {
+                       NDR_PULL_ALLOC(ndr, r->executablepath);
+               } else {
+                       r->executablepath = NULL;
+               }
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_loadordergroup));
+               if (_ptr_loadordergroup) {
+                       NDR_PULL_ALLOC(ndr, r->loadordergroup);
+               } else {
+                       r->loadordergroup = NULL;
+               }
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->tag_id));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
+               if (_ptr_dependencies) {
+                       NDR_PULL_ALLOC(ndr, r->dependencies);
+               } else {
+                       r->dependencies = NULL;
+               }
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_startname));
+               if (_ptr_startname) {
+                       NDR_PULL_ALLOC(ndr, r->startname);
+               } else {
+                       r->startname = NULL;
+               }
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_displayname));
+               if (_ptr_displayname) {
+                       NDR_PULL_ALLOC(ndr, r->displayname);
+               } else {
+                       r->displayname = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->executablepath) {
+                       _mem_save_executablepath_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->executablepath, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->executablepath));
+                       NDR_CHECK(ndr_pull_array_length(ndr, &r->executablepath));
+                       if (ndr_get_array_length(ndr, &r->executablepath) > ndr_get_array_size(ndr, &r->executablepath)) {
+                               return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->executablepath), ndr_get_array_length(ndr, &r->executablepath));
+                       }
+                       NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->executablepath), sizeof(uint16_t)));
+                       NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->executablepath, ndr_get_array_length(ndr, &r->executablepath), sizeof(uint16_t), CH_UTF16));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_executablepath_0, 0);
+               }
+               if (r->loadordergroup) {
+                       _mem_save_loadordergroup_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->loadordergroup, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->loadordergroup));
+                       NDR_CHECK(ndr_pull_array_length(ndr, &r->loadordergroup));
+                       if (ndr_get_array_length(ndr, &r->loadordergroup) > ndr_get_array_size(ndr, &r->loadordergroup)) {
+                               return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->loadordergroup), ndr_get_array_length(ndr, &r->loadordergroup));
+                       }
+                       NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->loadordergroup), sizeof(uint16_t)));
+                       NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->loadordergroup, ndr_get_array_length(ndr, &r->loadordergroup), sizeof(uint16_t), CH_UTF16));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_loadordergroup_0, 0);
+               }
+               if (r->dependencies) {
+                       _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->dependencies, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->dependencies));
+                       NDR_CHECK(ndr_pull_array_length(ndr, &r->dependencies));
+                       if (ndr_get_array_length(ndr, &r->dependencies) > ndr_get_array_size(ndr, &r->dependencies)) {
+                               return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->dependencies), ndr_get_array_length(ndr, &r->dependencies));
+                       }
+                       NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dependencies), sizeof(uint16_t)));
+                       NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dependencies, ndr_get_array_length(ndr, &r->dependencies), sizeof(uint16_t), CH_UTF16));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
+               }
+               if (r->startname) {
+                       _mem_save_startname_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->startname, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->startname));
+                       NDR_CHECK(ndr_pull_array_length(ndr, &r->startname));
+                       if (ndr_get_array_length(ndr, &r->startname) > ndr_get_array_size(ndr, &r->startname)) {
+                               return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->startname), ndr_get_array_length(ndr, &r->startname));
+                       }
+                       NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->startname), sizeof(uint16_t)));
+                       NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->startname, ndr_get_array_length(ndr, &r->startname), sizeof(uint16_t), CH_UTF16));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_startname_0, 0);
+               }
+               if (r->displayname) {
+                       _mem_save_displayname_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->displayname, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->displayname));
+                       NDR_CHECK(ndr_pull_array_length(ndr, &r->displayname));
+                       if (ndr_get_array_length(ndr, &r->displayname) > ndr_get_array_size(ndr, &r->displayname)) {
+                               return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->displayname), ndr_get_array_length(ndr, &r->displayname));
+                       }
+                       NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->displayname), sizeof(uint16_t)));
+                       NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->displayname, ndr_get_array_length(ndr, &r->displayname), sizeof(uint16_t), CH_UTF16));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_displayname_0, 0);
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_QUERY_SERVICE_CONFIG(struct ndr_print *ndr, const char *name, const struct QUERY_SERVICE_CONFIG *r)
+{
+       ndr_print_struct(ndr, name, "QUERY_SERVICE_CONFIG");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "service_type", r->service_type);
+       ndr_print_uint32(ndr, "start_type", r->start_type);
+       ndr_print_uint32(ndr, "error_control", r->error_control);
+       ndr_print_ptr(ndr, "executablepath", r->executablepath);
+       ndr->depth++;
+       if (r->executablepath) {
+               ndr_print_string(ndr, "executablepath", r->executablepath);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "loadordergroup", r->loadordergroup);
+       ndr->depth++;
+       if (r->loadordergroup) {
+               ndr_print_string(ndr, "loadordergroup", r->loadordergroup);
+       }
+       ndr->depth--;
+       ndr_print_uint32(ndr, "tag_id", r->tag_id);
+       ndr_print_ptr(ndr, "dependencies", r->dependencies);
+       ndr->depth++;
+       if (r->dependencies) {
+               ndr_print_string(ndr, "dependencies", r->dependencies);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "startname", r->startname);
+       ndr->depth++;
+       if (r->startname) {
+               ndr_print_string(ndr, "startname", r->startname);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "displayname", r->displayname);
+       ndr->depth++;
+       if (r->displayname) {
+               ndr_print_string(ndr, "displayname", r->displayname);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+_PUBLIC_ size_t ndr_size_QUERY_SERVICE_CONFIG(const struct QUERY_SERVICE_CONFIG *r, int flags)
+{
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_QUERY_SERVICE_CONFIG);
+}
+
 static enum ndr_err_code ndr_push_svcctl_CloseServiceHandle(struct ndr_push *ndr, int flags, const struct svcctl_CloseServiceHandle *r)
 {
        if (flags & NDR_IN) {
@@ -2260,7 +2469,10 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigW(struct ndr_push *nd
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
        }
        if (flags & NDR_OUT) {
-               NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.buf_size));
+               if (r->out.query == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_QUERY_SERVICE_CONFIG(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
                if (r->out.bytes_needed == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
@@ -2273,6 +2485,7 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigW(struct ndr_push *nd
 static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigW(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfigW *r)
 {
        TALLOC_CTX *_mem_save_handle_0;
+       TALLOC_CTX *_mem_save_query_0;
        TALLOC_CTX *_mem_save_bytes_needed_0;
        if (flags & NDR_IN) {
                ZERO_STRUCT(r->out);
@@ -2285,18 +2498,31 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigW(struct ndr_pull *nd
                NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
+               if (r->in.buf_size < 0 || r->in.buf_size > 8192) {
+                       return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+               }
+               NDR_PULL_ALLOC(ndr, r->out.query);
+               ZERO_STRUCTP(r->out.query);
                NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
                ZERO_STRUCTP(r->out.bytes_needed);
        }
        if (flags & NDR_OUT) {
-               NDR_PULL_ALLOC_N(ndr, r->out.query, r->in.buf_size);
-               NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.buf_size));
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->out.query);
+               }
+               _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.query, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_QUERY_SERVICE_CONFIG(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
                        NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
                }
                _mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
                NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
+               if (*r->out.bytes_needed < 0 || *r->out.bytes_needed > 8192) {
+                       return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+               }
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
        }
@@ -2323,7 +2549,10 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigW(struct ndr_print *ndr, const
        if (flags & NDR_OUT) {
                ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfigW");
                ndr->depth++;
-               ndr_print_array_uint8(ndr, "query", r->out.query, r->in.buf_size);
+               ndr_print_ptr(ndr, "query", r->out.query);
+               ndr->depth++;
+               ndr_print_QUERY_SERVICE_CONFIG(ndr, "query", r->out.query);
+               ndr->depth--;
                ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
                ndr->depth++;
                ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
index 4475b08792fca440fc32a12d594894c7064d91f2..0bebd3401ad120815ae8d47f341dc1610743c26d 100644 (file)
@@ -108,6 +108,10 @@ enum ndr_err_code ndr_pull_svcctl_ServerType(struct ndr_pull *ndr, int ndr_flags
 void ndr_print_svcctl_ServerType(struct ndr_print *ndr, const char *name, uint32_t r);
 void ndr_print_svcctl_MgrAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
 void ndr_print_svcctl_ServiceAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
+enum ndr_err_code ndr_push_QUERY_SERVICE_CONFIG(struct ndr_push *ndr, int ndr_flags, const struct QUERY_SERVICE_CONFIG *r);
+enum ndr_err_code ndr_pull_QUERY_SERVICE_CONFIG(struct ndr_pull *ndr, int ndr_flags, struct QUERY_SERVICE_CONFIG *r);
+void ndr_print_QUERY_SERVICE_CONFIG(struct ndr_print *ndr, const char *name, const struct QUERY_SERVICE_CONFIG *r);
+size_t ndr_size_QUERY_SERVICE_CONFIG(const struct QUERY_SERVICE_CONFIG *r, int flags);
 void ndr_print_svcctl_CloseServiceHandle(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CloseServiceHandle *r);
 void ndr_print_svcctl_ControlService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ControlService *r);
 void ndr_print_svcctl_DeleteService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_DeleteService *r);
index cc0d800f51d483ad1bb9dfb6285cafd135cf933f..41c9acd7b93bd3d41420a3f7508dc528f369ad3a 100644 (file)
@@ -4,7 +4,6 @@
 #include "librpc/gen_ndr/ndr_winreg.h"
 
 #include "librpc/gen_ndr/ndr_lsa.h"
-#include "librpc/gen_ndr/ndr_initshutdown.h"
 #include "librpc/gen_ndr/ndr_security.h"
 static enum ndr_err_code ndr_push_winreg_AccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
 {
@@ -35,13 +34,13 @@ _PUBLIC_ void ndr_print_winreg_AccessMask(struct ndr_print *ndr, const char *nam
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winreg_Type(struct ndr_push *ndr, int ndr_flags, enum winreg_Type r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_Type(struct ndr_push *ndr, int ndr_flags, enum winreg_Type r)
 {
        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winreg_Type(struct ndr_pull *ndr, int ndr_flags, enum winreg_Type *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_Type(struct ndr_pull *ndr, int ndr_flags, enum winreg_Type *r)
 {
        uint32_t v;
        NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
@@ -414,6 +413,31 @@ _PUBLIC_ void ndr_print_winreg_ValNameBuf(struct ndr_print *ndr, const char *nam
        ndr->depth--;
 }
 
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_NotifyChangeType(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_NotifyChangeType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+       uint32_t v;
+       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_winreg_NotifyChangeType(struct ndr_print *ndr, const char *name, uint32_t r)
+{
+       ndr_print_uint32(ndr, name, r);
+       ndr->depth++;
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_NOTIFY_CHANGE_NAME", REG_NOTIFY_CHANGE_NAME, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_NOTIFY_CHANGE_ATTRIBUTES", REG_NOTIFY_CHANGE_ATTRIBUTES, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_NOTIFY_CHANGE_LAST_SET", REG_NOTIFY_CHANGE_LAST_SET, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_NOTIFY_CHANGE_SECURITY", REG_NOTIFY_CHANGE_SECURITY, r);
+       ndr->depth--;
+}
+
 static enum ndr_err_code ndr_push_KeySecurityAttribute(struct ndr_push *ndr, int ndr_flags, const struct KeySecurityAttribute *r)
 {
        if (ndr_flags & NDR_SCALARS) {
@@ -688,7 +712,7 @@ _PUBLIC_ void ndr_print_winreg_OpenHKCU(struct ndr_print *ndr, const char *name,
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winreg_OpenHKLM(struct ndr_push *ndr, int flags, const struct winreg_OpenHKLM *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_OpenHKLM(struct ndr_push *ndr, int flags, const struct winreg_OpenHKLM *r)
 {
        if (flags & NDR_IN) {
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
@@ -707,7 +731,7 @@ static enum ndr_err_code ndr_push_winreg_OpenHKLM(struct ndr_push *ndr, int flag
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winreg_OpenHKLM(struct ndr_pull *ndr, int flags, struct winreg_OpenHKLM *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_OpenHKLM(struct ndr_pull *ndr, int flags, struct winreg_OpenHKLM *r)
 {
        uint32_t _ptr_system_name;
        TALLOC_CTX *_mem_save_system_name_0;
@@ -952,7 +976,7 @@ _PUBLIC_ void ndr_print_winreg_OpenHKU(struct ndr_print *ndr, const char *name,
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winreg_CloseKey(struct ndr_push *ndr, int flags, const struct winreg_CloseKey *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_CloseKey(struct ndr_push *ndr, int flags, const struct winreg_CloseKey *r)
 {
        if (flags & NDR_IN) {
                if (r->in.handle == NULL) {
@@ -970,7 +994,7 @@ static enum ndr_err_code ndr_push_winreg_CloseKey(struct ndr_push *ndr, int flag
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winreg_CloseKey(struct ndr_pull *ndr, int flags, struct winreg_CloseKey *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_CloseKey(struct ndr_pull *ndr, int flags, struct winreg_CloseKey *r)
 {
        TALLOC_CTX *_mem_save_handle_0;
        if (flags & NDR_IN) {
@@ -1028,7 +1052,7 @@ _PUBLIC_ void ndr_print_winreg_CloseKey(struct ndr_print *ndr, const char *name,
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winreg_CreateKey(struct ndr_push *ndr, int flags, const struct winreg_CreateKey *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_CreateKey(struct ndr_push *ndr, int flags, const struct winreg_CreateKey *r)
 {
        if (flags & NDR_IN) {
                if (r->in.handle == NULL) {
@@ -1062,7 +1086,7 @@ static enum ndr_err_code ndr_push_winreg_CreateKey(struct ndr_push *ndr, int fla
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winreg_CreateKey(struct ndr_pull *ndr, int flags, struct winreg_CreateKey *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_CreateKey(struct ndr_pull *ndr, int flags, struct winreg_CreateKey *r)
 {
        uint32_t _ptr_secdesc;
        uint32_t _ptr_action_taken;
@@ -1187,7 +1211,7 @@ _PUBLIC_ void ndr_print_winreg_CreateKey(struct ndr_print *ndr, const char *name
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winreg_DeleteKey(struct ndr_push *ndr, int flags, const struct winreg_DeleteKey *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_DeleteKey(struct ndr_push *ndr, int flags, const struct winreg_DeleteKey *r)
 {
        if (flags & NDR_IN) {
                if (r->in.handle == NULL) {
@@ -1202,7 +1226,7 @@ static enum ndr_err_code ndr_push_winreg_DeleteKey(struct ndr_push *ndr, int fla
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winreg_DeleteKey(struct ndr_pull *ndr, int flags, struct winreg_DeleteKey *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_DeleteKey(struct ndr_pull *ndr, int flags, struct winreg_DeleteKey *r)
 {
        TALLOC_CTX *_mem_save_handle_0;
        if (flags & NDR_IN) {
@@ -1307,7 +1331,7 @@ _PUBLIC_ void ndr_print_winreg_DeleteValue(struct ndr_print *ndr, const char *na
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winreg_EnumKey(struct ndr_push *ndr, int flags, const struct winreg_EnumKey *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_EnumKey(struct ndr_push *ndr, int flags, const struct winreg_EnumKey *r)
 {
        if (flags & NDR_IN) {
                if (r->in.handle == NULL) {
@@ -1346,7 +1370,7 @@ static enum ndr_err_code ndr_push_winreg_EnumKey(struct ndr_push *ndr, int flags
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winreg_EnumKey(struct ndr_pull *ndr, int flags, struct winreg_EnumKey *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_EnumKey(struct ndr_pull *ndr, int flags, struct winreg_EnumKey *r)
 {
        uint32_t _ptr_keyclass;
        uint32_t _ptr_last_changed_time;
@@ -1494,7 +1518,7 @@ _PUBLIC_ void ndr_print_winreg_EnumKey(struct ndr_print *ndr, const char *name,
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winreg_EnumValue(struct ndr_push *ndr, int flags, const struct winreg_EnumValue *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_EnumValue(struct ndr_push *ndr, int flags, const struct winreg_EnumValue *r)
 {
        if (flags & NDR_IN) {
                if (r->in.handle == NULL) {
@@ -1555,7 +1579,7 @@ static enum ndr_err_code ndr_push_winreg_EnumValue(struct ndr_push *ndr, int fla
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winreg_EnumValue(struct ndr_pull *ndr, int flags, struct winreg_EnumValue *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_EnumValue(struct ndr_pull *ndr, int flags, struct winreg_EnumValue *r)
 {
        uint32_t _ptr_type;
        uint32_t _ptr_value;
@@ -1809,7 +1833,7 @@ _PUBLIC_ void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winreg_FlushKey(struct ndr_push *ndr, int flags, const struct winreg_FlushKey *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_FlushKey(struct ndr_push *ndr, int flags, const struct winreg_FlushKey *r)
 {
        if (flags & NDR_IN) {
                if (r->in.handle == NULL) {
@@ -1823,7 +1847,7 @@ static enum ndr_err_code ndr_push_winreg_FlushKey(struct ndr_push *ndr, int flag
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winreg_FlushKey(struct ndr_pull *ndr, int flags, struct winreg_FlushKey *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_FlushKey(struct ndr_pull *ndr, int flags, struct winreg_FlushKey *r)
 {
        TALLOC_CTX *_mem_save_handle_0;
        if (flags & NDR_IN) {
@@ -1866,7 +1890,7 @@ _PUBLIC_ void ndr_print_winreg_FlushKey(struct ndr_print *ndr, const char *name,
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winreg_GetKeySecurity(struct ndr_push *ndr, int flags, const struct winreg_GetKeySecurity *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_GetKeySecurity(struct ndr_push *ndr, int flags, const struct winreg_GetKeySecurity *r)
 {
        if (flags & NDR_IN) {
                if (r->in.handle == NULL) {
@@ -1889,7 +1913,7 @@ static enum ndr_err_code ndr_push_winreg_GetKeySecurity(struct ndr_push *ndr, in
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winreg_GetKeySecurity(struct ndr_pull *ndr, int flags, struct winreg_GetKeySecurity *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_GetKeySecurity(struct ndr_pull *ndr, int flags, struct winreg_GetKeySecurity *r)
 {
        TALLOC_CTX *_mem_save_handle_0;
        TALLOC_CTX *_mem_save_sd_0;
@@ -2066,7 +2090,7 @@ _PUBLIC_ void ndr_print_winreg_LoadKey(struct ndr_print *ndr, const char *name,
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *ndr, int flags, const struct winreg_NotifyChangeKeyValue *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *ndr, int flags, const struct winreg_NotifyChangeKeyValue *r)
 {
        if (flags & NDR_IN) {
                if (r->in.handle == NULL) {
@@ -2074,7 +2098,7 @@ static enum ndr_err_code ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *n
                }
                NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
                NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.watch_subtree));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.notify_filter));
+               NDR_CHECK(ndr_push_winreg_NotifyChangeType(ndr, NDR_SCALARS, r->in.notify_filter));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
                NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.string1));
                NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.string2));
@@ -2086,7 +2110,7 @@ static enum ndr_err_code ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *n
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winreg_NotifyChangeKeyValue(struct ndr_pull *ndr, int flags, struct winreg_NotifyChangeKeyValue *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_NotifyChangeKeyValue(struct ndr_pull *ndr, int flags, struct winreg_NotifyChangeKeyValue *r)
 {
        TALLOC_CTX *_mem_save_handle_0;
        if (flags & NDR_IN) {
@@ -2098,7 +2122,7 @@ static enum ndr_err_code ndr_pull_winreg_NotifyChangeKeyValue(struct ndr_pull *n
                NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.watch_subtree));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.notify_filter));
+               NDR_CHECK(ndr_pull_winreg_NotifyChangeType(ndr, NDR_SCALARS, &r->in.notify_filter));
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
                NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.string1));
                NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.string2));
@@ -2125,7 +2149,7 @@ _PUBLIC_ void ndr_print_winreg_NotifyChangeKeyValue(struct ndr_print *ndr, const
                ndr_print_policy_handle(ndr, "handle", r->in.handle);
                ndr->depth--;
                ndr_print_uint8(ndr, "watch_subtree", r->in.watch_subtree);
-               ndr_print_uint32(ndr, "notify_filter", r->in.notify_filter);
+               ndr_print_winreg_NotifyChangeType(ndr, "notify_filter", r->in.notify_filter);
                ndr_print_uint32(ndr, "unknown", r->in.unknown);
                ndr_print_winreg_String(ndr, "string1", &r->in.string1);
                ndr_print_winreg_String(ndr, "string2", &r->in.string2);
@@ -2141,7 +2165,7 @@ _PUBLIC_ void ndr_print_winreg_NotifyChangeKeyValue(struct ndr_print *ndr, const
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winreg_OpenKey(struct ndr_push *ndr, int flags, const struct winreg_OpenKey *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_OpenKey(struct ndr_push *ndr, int flags, const struct winreg_OpenKey *r)
 {
        if (flags & NDR_IN) {
                if (r->in.parent_handle == NULL) {
@@ -2162,7 +2186,7 @@ static enum ndr_err_code ndr_push_winreg_OpenKey(struct ndr_push *ndr, int flags
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winreg_OpenKey(struct ndr_pull *ndr, int flags, struct winreg_OpenKey *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_OpenKey(struct ndr_pull *ndr, int flags, struct winreg_OpenKey *r)
 {
        TALLOC_CTX *_mem_save_parent_handle_0;
        TALLOC_CTX *_mem_save_handle_0;
@@ -2227,7 +2251,7 @@ _PUBLIC_ void ndr_print_winreg_OpenKey(struct ndr_print *ndr, const char *name,
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winreg_QueryInfoKey(struct ndr_push *ndr, int flags, const struct winreg_QueryInfoKey *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_QueryInfoKey(struct ndr_push *ndr, int flags, const struct winreg_QueryInfoKey *r)
 {
        if (flags & NDR_IN) {
                if (r->in.handle == NULL) {
@@ -2281,7 +2305,7 @@ static enum ndr_err_code ndr_push_winreg_QueryInfoKey(struct ndr_push *ndr, int
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winreg_QueryInfoKey(struct ndr_pull *ndr, int flags, struct winreg_QueryInfoKey *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_QueryInfoKey(struct ndr_pull *ndr, int flags, struct winreg_QueryInfoKey *r)
 {
        TALLOC_CTX *_mem_save_handle_0;
        TALLOC_CTX *_mem_save_classname_0;
@@ -2463,7 +2487,7 @@ _PUBLIC_ void ndr_print_winreg_QueryInfoKey(struct ndr_print *ndr, const char *n
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winreg_QueryValue(struct ndr_push *ndr, int flags, const struct winreg_QueryValue *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_QueryValue(struct ndr_push *ndr, int flags, const struct winreg_QueryValue *r)
 {
        if (flags & NDR_IN) {
                if (r->in.handle == NULL) {
@@ -2482,16 +2506,16 @@ static enum ndr_err_code ndr_push_winreg_QueryValue(struct ndr_push *ndr, int fl
                if (r->in.data) {
                        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.data_size));
                        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
-                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.value_length));
-                       NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, *r->in.value_length));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.data_length));
+                       NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, *r->in.data_length));
                }
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data_size));
                if (r->in.data_size) {
                        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.data_size));
                }
-               NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.value_length));
-               if (r->in.value_length) {
-                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.value_length));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data_length));
+               if (r->in.data_length) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.data_length));
                }
        }
        if (flags & NDR_OUT) {
@@ -2503,34 +2527,34 @@ static enum ndr_err_code ndr_push_winreg_QueryValue(struct ndr_push *ndr, int fl
                if (r->out.data) {
                        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.data_size));
                        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
-                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.value_length));
-                       NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, *r->out.value_length));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.data_length));
+                       NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, *r->out.data_length));
                }
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.data_size));
                if (r->out.data_size) {
                        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.data_size));
                }
-               NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.value_length));
-               if (r->out.value_length) {
-                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.value_length));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.data_length));
+               if (r->out.data_length) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.data_length));
                }
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
        }
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int flags, struct winreg_QueryValue *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int flags, struct winreg_QueryValue *r)
 {
        uint32_t _ptr_type;
        uint32_t _ptr_data;
        uint32_t _ptr_data_size;
-       uint32_t _ptr_value_length;
+       uint32_t _ptr_data_length;
        TALLOC_CTX *_mem_save_handle_0;
        TALLOC_CTX *_mem_save_value_name_0;
        TALLOC_CTX *_mem_save_type_0;
        TALLOC_CTX *_mem_save_data_0;
        TALLOC_CTX *_mem_save_data_size_0;
-       TALLOC_CTX *_mem_save_value_length_0;
+       TALLOC_CTX *_mem_save_data_length_0;
        if (flags & NDR_IN) {
                ZERO_STRUCT(r->out);
 
@@ -2590,25 +2614,25 @@ static enum ndr_err_code ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int fl
                        NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.data_size));
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_size_0, 0);
                }
-               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value_length));
-               if (_ptr_value_length) {
-                       NDR_PULL_ALLOC(ndr, r->in.value_length);
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_length));
+               if (_ptr_data_length) {
+                       NDR_PULL_ALLOC(ndr, r->in.data_length);
                } else {
-                       r->in.value_length = NULL;
+                       r->in.data_length = NULL;
                }
-               if (r->in.value_length) {
-                       _mem_save_value_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->in.value_length, 0);
-                       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.value_length));
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_length_0, 0);
+               if (r->in.data_length) {
+                       _mem_save_data_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->in.data_length, 0);
+                       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.data_length));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_length_0, 0);
                }
                if (r->in.data) {
                        if (r->in.data_size == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for size_is()");
                        NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.data, *r->in.data_size));
                }
                if (r->in.data) {
-                       if (r->in.value_length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()");
-                       NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.data, *r->in.value_length));
+                       if (r->in.data_length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()");
+                       NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.data, *r->in.data_length));
                }
        }
        if (flags & NDR_OUT) {
@@ -2654,17 +2678,17 @@ static enum ndr_err_code ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int fl
                        NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.data_size));
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_size_0, 0);
                }
-               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value_length));
-               if (_ptr_value_length) {
-                       NDR_PULL_ALLOC(ndr, r->out.value_length);
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_length));
+               if (_ptr_data_length) {
+                       NDR_PULL_ALLOC(ndr, r->out.data_length);
                } else {
-                       r->out.value_length = NULL;
+                       r->out.data_length = NULL;
                }
-               if (r->out.value_length) {
-                       _mem_save_value_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->out.value_length, 0);
-                       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.value_length));
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_length_0, 0);
+               if (r->out.data_length) {
+                       _mem_save_data_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->out.data_length, 0);
+                       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.data_length));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_length_0, 0);
                }
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
                if (r->out.data) {
@@ -2672,8 +2696,8 @@ static enum ndr_err_code ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int fl
                        NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.data, *r->out.data_size));
                }
                if (r->out.data) {
-                       if (r->out.value_length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()");
-                       NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.data, *r->out.value_length));
+                       if (r->out.data_length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()");
+                       NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.data, *r->out.data_length));
                }
        }
        return NDR_ERR_SUCCESS;
@@ -2706,8 +2730,8 @@ _PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *nam
                ndr_print_ptr(ndr, "data", r->in.data);
                ndr->depth++;
                if (r->in.data) {
-                       if (r->in.value_length == NULL) return;
-                       ndr_print_array_uint8(ndr, "data", r->in.data, *r->in.value_length);
+                       if (r->in.data_length == NULL) return;
+                       ndr_print_array_uint8(ndr, "data", r->in.data, *r->in.data_length);
                }
                ndr->depth--;
                ndr_print_ptr(ndr, "data_size", r->in.data_size);
@@ -2716,10 +2740,10 @@ _PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *nam
                        ndr_print_uint32(ndr, "data_size", *r->in.data_size);
                }
                ndr->depth--;
-               ndr_print_ptr(ndr, "value_length", r->in.value_length);
+               ndr_print_ptr(ndr, "data_length", r->in.data_length);
                ndr->depth++;
-               if (r->in.value_length) {
-                       ndr_print_uint32(ndr, "value_length", *r->in.value_length);
+               if (r->in.data_length) {
+                       ndr_print_uint32(ndr, "data_length", *r->in.data_length);
                }
                ndr->depth--;
                ndr->depth--;
@@ -2736,8 +2760,8 @@ _PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *nam
                ndr_print_ptr(ndr, "data", r->out.data);
                ndr->depth++;
                if (r->out.data) {
-                       if (r->out.value_length == NULL) return;
-                       ndr_print_array_uint8(ndr, "data", r->out.data, *r->out.value_length);
+                       if (r->out.data_length == NULL) return;
+                       ndr_print_array_uint8(ndr, "data", r->out.data, *r->out.data_length);
                }
                ndr->depth--;
                ndr_print_ptr(ndr, "data_size", r->out.data_size);
@@ -2746,10 +2770,10 @@ _PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *nam
                        ndr_print_uint32(ndr, "data_size", *r->out.data_size);
                }
                ndr->depth--;
-               ndr_print_ptr(ndr, "value_length", r->out.value_length);
+               ndr_print_ptr(ndr, "data_length", r->out.data_length);
                ndr->depth++;
-               if (r->out.value_length) {
-                       ndr_print_uint32(ndr, "value_length", *r->out.value_length);
+               if (r->out.data_length) {
+                       ndr_print_uint32(ndr, "data_length", *r->out.data_length);
                }
                ndr->depth--;
                ndr_print_WERROR(ndr, "result", r->out.result);
@@ -2979,7 +3003,7 @@ static enum ndr_err_code ndr_push_winreg_SetKeySecurity(struct ndr_push *ndr, in
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
                NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
-               NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
+               NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
                if (r->in.sd == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
@@ -3003,7 +3027,7 @@ static enum ndr_err_code ndr_pull_winreg_SetKeySecurity(struct ndr_pull *ndr, in
                NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
+               NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
                        NDR_PULL_ALLOC(ndr, r->in.sd);
                }
@@ -3032,7 +3056,7 @@ _PUBLIC_ void ndr_print_winreg_SetKeySecurity(struct ndr_print *ndr, const char
                ndr->depth++;
                ndr_print_policy_handle(ndr, "handle", r->in.handle);
                ndr->depth--;
-               ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
+               ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info);
                ndr_print_ptr(ndr, "sd", r->in.sd);
                ndr->depth++;
                ndr_print_KeySecurityData(ndr, "sd", r->in.sd);
@@ -3181,7 +3205,7 @@ static enum ndr_err_code ndr_push_winreg_InitiateSystemShutdown(struct ndr_push
                }
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message));
                if (r->in.message) {
-                       NDR_CHECK(ndr_push_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
+                       NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
                }
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout));
                NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps));
@@ -3221,7 +3245,7 @@ static enum ndr_err_code ndr_pull_winreg_InitiateSystemShutdown(struct ndr_pull
                if (r->in.message) {
                        _mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr);
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0);
-                       NDR_CHECK(ndr_pull_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
+                       NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0);
                }
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout));
@@ -3253,7 +3277,7 @@ _PUBLIC_ void ndr_print_winreg_InitiateSystemShutdown(struct ndr_print *ndr, con
                ndr_print_ptr(ndr, "message", r->in.message);
                ndr->depth++;
                if (r->in.message) {
-                       ndr_print_initshutdown_String(ndr, "message", r->in.message);
+                       ndr_print_lsa_StringLarge(ndr, "message", r->in.message);
                }
                ndr->depth--;
                ndr_print_uint32(ndr, "timeout", r->in.timeout);
@@ -3335,7 +3359,7 @@ _PUBLIC_ void ndr_print_winreg_AbortSystemShutdown(struct ndr_print *ndr, const
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winreg_GetVersion(struct ndr_push *ndr, int flags, const struct winreg_GetVersion *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_GetVersion(struct ndr_push *ndr, int flags, const struct winreg_GetVersion *r)
 {
        if (flags & NDR_IN) {
                if (r->in.handle == NULL) {
@@ -3353,7 +3377,7 @@ static enum ndr_err_code ndr_push_winreg_GetVersion(struct ndr_push *ndr, int fl
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winreg_GetVersion(struct ndr_pull *ndr, int flags, struct winreg_GetVersion *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_GetVersion(struct ndr_pull *ndr, int flags, struct winreg_GetVersion *r)
 {
        TALLOC_CTX *_mem_save_handle_0;
        TALLOC_CTX *_mem_save_version_0;
@@ -3588,7 +3612,7 @@ _PUBLIC_ void ndr_print_winreg_OpenHKDD(struct ndr_print *ndr, const char *name,
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_winreg_QueryMultipleValues(struct ndr_push *ndr, int flags, const struct winreg_QueryMultipleValues *r)
+_PUBLIC_ enum ndr_err_code ndr_push_winreg_QueryMultipleValues(struct ndr_push *ndr, int flags, const struct winreg_QueryMultipleValues *r)
 {
        uint32_t cntr_values_1;
        if (flags & NDR_IN) {
@@ -3650,7 +3674,7 @@ static enum ndr_err_code ndr_push_winreg_QueryMultipleValues(struct ndr_push *nd
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *ndr, int flags, struct winreg_QueryMultipleValues *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *ndr, int flags, struct winreg_QueryMultipleValues *r)
 {
        uint32_t cntr_values_1;
        uint32_t _ptr_buffer;
@@ -3872,7 +3896,7 @@ static enum ndr_err_code ndr_push_winreg_InitiateSystemShutdownEx(struct ndr_pus
                }
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message));
                if (r->in.message) {
-                       NDR_CHECK(ndr_push_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
+                       NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
                }
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout));
                NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps));
@@ -3913,7 +3937,7 @@ static enum ndr_err_code ndr_pull_winreg_InitiateSystemShutdownEx(struct ndr_pul
                if (r->in.message) {
                        _mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr);
                        NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0);
-                       NDR_CHECK(ndr_pull_initshutdown_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
+                       NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0);
                }
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout));
@@ -3946,7 +3970,7 @@ _PUBLIC_ void ndr_print_winreg_InitiateSystemShutdownEx(struct ndr_print *ndr, c
                ndr_print_ptr(ndr, "message", r->in.message);
                ndr->depth++;
                if (r->in.message) {
-                       ndr_print_initshutdown_String(ndr, "message", r->in.message);
+                       ndr_print_lsa_StringLarge(ndr, "message", r->in.message);
                }
                ndr->depth--;
                ndr_print_uint32(ndr, "timeout", r->in.timeout);
index c093b0d1e0419c8c181f62bfe120f1dac157c12a..ed988638ff68b177e44e7fdfb4696869f068ed46 100644 (file)
@@ -83,6 +83,8 @@ extern const struct ndr_interface_table ndr_table_winreg;
 
 #define NDR_WINREG_CALL_COUNT (35)
 void ndr_print_winreg_AccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
+enum ndr_err_code ndr_push_winreg_Type(struct ndr_push *ndr, int ndr_flags, enum winreg_Type r);
+enum ndr_err_code ndr_pull_winreg_Type(struct ndr_pull *ndr, int ndr_flags, enum winreg_Type *r);
 void ndr_print_winreg_Type(struct ndr_print *ndr, const char *name, enum winreg_Type r);
 enum ndr_err_code ndr_push_winreg_String(struct ndr_push *ndr, int ndr_flags, const struct winreg_String *r);
 enum ndr_err_code ndr_pull_winreg_String(struct ndr_pull *ndr, int ndr_flags, struct winreg_String *r);
@@ -92,25 +94,52 @@ void ndr_print_winreg_SecBuf(struct ndr_print *ndr, const char *name, const stru
 void ndr_print_winreg_CreateAction(struct ndr_print *ndr, const char *name, enum winreg_CreateAction r);
 void ndr_print_winreg_StringBuf(struct ndr_print *ndr, const char *name, const struct winreg_StringBuf *r);
 void ndr_print_winreg_ValNameBuf(struct ndr_print *ndr, const char *name, const struct winreg_ValNameBuf *r);
+enum ndr_err_code ndr_push_winreg_NotifyChangeType(struct ndr_push *ndr, int ndr_flags, uint32_t r);
+enum ndr_err_code ndr_pull_winreg_NotifyChangeType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
+void ndr_print_winreg_NotifyChangeType(struct ndr_print *ndr, const char *name, uint32_t r);
 void ndr_print_KeySecurityAttribute(struct ndr_print *ndr, const char *name, const struct KeySecurityAttribute *r);
 void ndr_print_QueryMultipleValue(struct ndr_print *ndr, const char *name, const struct QueryMultipleValue *r);
 void ndr_print_winreg_OpenHKCR(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCR *r);
 void ndr_print_winreg_OpenHKCU(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCU *r);
+enum ndr_err_code ndr_push_winreg_OpenHKLM(struct ndr_push *ndr, int flags, const struct winreg_OpenHKLM *r);
+enum ndr_err_code ndr_pull_winreg_OpenHKLM(struct ndr_pull *ndr, int flags, struct winreg_OpenHKLM *r);
 void ndr_print_winreg_OpenHKLM(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKLM *r);
 void ndr_print_winreg_OpenHKPD(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKPD *r);
 void ndr_print_winreg_OpenHKU(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKU *r);
+enum ndr_err_code ndr_push_winreg_CloseKey(struct ndr_push *ndr, int flags, const struct winreg_CloseKey *r);
+enum ndr_err_code ndr_pull_winreg_CloseKey(struct ndr_pull *ndr, int flags, struct winreg_CloseKey *r);
 void ndr_print_winreg_CloseKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_CloseKey *r);
+enum ndr_err_code ndr_push_winreg_CreateKey(struct ndr_push *ndr, int flags, const struct winreg_CreateKey *r);
+enum ndr_err_code ndr_pull_winreg_CreateKey(struct ndr_pull *ndr, int flags, struct winreg_CreateKey *r);
 void ndr_print_winreg_CreateKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_CreateKey *r);
+enum ndr_err_code ndr_push_winreg_DeleteKey(struct ndr_push *ndr, int flags, const struct winreg_DeleteKey *r);
+enum ndr_err_code ndr_pull_winreg_DeleteKey(struct ndr_pull *ndr, int flags, struct winreg_DeleteKey *r);
 void ndr_print_winreg_DeleteKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_DeleteKey *r);
 void ndr_print_winreg_DeleteValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_DeleteValue *r);
+enum ndr_err_code ndr_push_winreg_EnumKey(struct ndr_push *ndr, int flags, const struct winreg_EnumKey *r);
+enum ndr_err_code ndr_pull_winreg_EnumKey(struct ndr_pull *ndr, int flags, struct winreg_EnumKey *r);
 void ndr_print_winreg_EnumKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_EnumKey *r);
+enum ndr_err_code ndr_push_winreg_EnumValue(struct ndr_push *ndr, int flags, const struct winreg_EnumValue *r);
+enum ndr_err_code ndr_pull_winreg_EnumValue(struct ndr_pull *ndr, int flags, struct winreg_EnumValue *r);
 void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_EnumValue *r);
+enum ndr_err_code ndr_push_winreg_FlushKey(struct ndr_push *ndr, int flags, const struct winreg_FlushKey *r);
+enum ndr_err_code ndr_pull_winreg_FlushKey(struct ndr_pull *ndr, int flags, struct winreg_FlushKey *r);
 void ndr_print_winreg_FlushKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_FlushKey *r);
+enum ndr_err_code ndr_push_winreg_GetKeySecurity(struct ndr_push *ndr, int flags, const struct winreg_GetKeySecurity *r);
+enum ndr_err_code ndr_pull_winreg_GetKeySecurity(struct ndr_pull *ndr, int flags, struct winreg_GetKeySecurity *r);
 void ndr_print_winreg_GetKeySecurity(struct ndr_print *ndr, const char *name, int flags, const struct winreg_GetKeySecurity *r);
 void ndr_print_winreg_LoadKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_LoadKey *r);
+enum ndr_err_code ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *ndr, int flags, const struct winreg_NotifyChangeKeyValue *r);
+enum ndr_err_code ndr_pull_winreg_NotifyChangeKeyValue(struct ndr_pull *ndr, int flags, struct winreg_NotifyChangeKeyValue *r);
 void ndr_print_winreg_NotifyChangeKeyValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_NotifyChangeKeyValue *r);
+enum ndr_err_code ndr_push_winreg_OpenKey(struct ndr_push *ndr, int flags, const struct winreg_OpenKey *r);
+enum ndr_err_code ndr_pull_winreg_OpenKey(struct ndr_pull *ndr, int flags, struct winreg_OpenKey *r);
 void ndr_print_winreg_OpenKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenKey *r);
+enum ndr_err_code ndr_push_winreg_QueryInfoKey(struct ndr_push *ndr, int flags, const struct winreg_QueryInfoKey *r);
+enum ndr_err_code ndr_pull_winreg_QueryInfoKey(struct ndr_pull *ndr, int flags, struct winreg_QueryInfoKey *r);
 void ndr_print_winreg_QueryInfoKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryInfoKey *r);
+enum ndr_err_code ndr_push_winreg_QueryValue(struct ndr_push *ndr, int flags, const struct winreg_QueryValue *r);
+enum ndr_err_code ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int flags, struct winreg_QueryValue *r);
 void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryValue *r);
 void ndr_print_winreg_ReplaceKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_ReplaceKey *r);
 void ndr_print_winreg_RestoreKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_RestoreKey *r);
@@ -120,9 +149,13 @@ void ndr_print_winreg_SetValue(struct ndr_print *ndr, const char *name, int flag
 void ndr_print_winreg_UnLoadKey(struct ndr_print *ndr, const char *name, int flags, const struct winreg_UnLoadKey *r);
 void ndr_print_winreg_InitiateSystemShutdown(struct ndr_print *ndr, const char *name, int flags, const struct winreg_InitiateSystemShutdown *r);
 void ndr_print_winreg_AbortSystemShutdown(struct ndr_print *ndr, const char *name, int flags, const struct winreg_AbortSystemShutdown *r);
+enum ndr_err_code ndr_push_winreg_GetVersion(struct ndr_push *ndr, int flags, const struct winreg_GetVersion *r);
+enum ndr_err_code ndr_pull_winreg_GetVersion(struct ndr_pull *ndr, int flags, struct winreg_GetVersion *r);
 void ndr_print_winreg_GetVersion(struct ndr_print *ndr, const char *name, int flags, const struct winreg_GetVersion *r);
 void ndr_print_winreg_OpenHKCC(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKCC *r);
 void ndr_print_winreg_OpenHKDD(struct ndr_print *ndr, const char *name, int flags, const struct winreg_OpenHKDD *r);
+enum ndr_err_code ndr_push_winreg_QueryMultipleValues(struct ndr_push *ndr, int flags, const struct winreg_QueryMultipleValues *r);
+enum ndr_err_code ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *ndr, int flags, struct winreg_QueryMultipleValues *r);
 void ndr_print_winreg_QueryMultipleValues(struct ndr_print *ndr, const char *name, int flags, const struct winreg_QueryMultipleValues *r);
 void ndr_print_winreg_InitiateSystemShutdownEx(struct ndr_print *ndr, const char *name, int flags, const struct winreg_InitiateSystemShutdownEx *r);
 void ndr_print_winreg_SaveKeyEx(struct ndr_print *ndr, const char *name, int flags, const struct winreg_SaveKeyEx *r);
index 92369835cf0b1753375dbadf18b022d3f0911a08..0e9dda9f47f3a2660475e1519bbeabf4c9e6394a 100644 (file)
@@ -3,7 +3,244 @@
 #include "includes.h"
 #include "librpc/gen_ndr/ndr_xattr.h"
 
-_PUBLIC_ enum ndr_err_code ndr_push_tdb_xattr(struct ndr_push *ndr, int ndr_flags, const struct tdb_xattr *r)
+#include "librpc/gen_ndr/ndr_security.h"
+static enum ndr_err_code ndr_push_xattr_DosInfo1(struct ndr_push *ndr, int ndr_flags, const struct xattr_DosInfo1 *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attrib));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ea_size));
+               NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->size));
+               NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->alloc_size));
+               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->create_time));
+               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->change_time));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_xattr_DosInfo1(struct ndr_pull *ndr, int ndr_flags, struct xattr_DosInfo1 *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attrib));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ea_size));
+               NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->size));
+               NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->alloc_size));
+               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->create_time));
+               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->change_time));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_xattr_DosInfo1(struct ndr_print *ndr, const char *name, const struct xattr_DosInfo1 *r)
+{
+       ndr_print_struct(ndr, name, "xattr_DosInfo1");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "attrib", r->attrib);
+       ndr_print_uint32(ndr, "ea_size", r->ea_size);
+       ndr_print_udlong(ndr, "size", r->size);
+       ndr_print_udlong(ndr, "alloc_size", r->alloc_size);
+       ndr_print_NTTIME(ndr, "create_time", r->create_time);
+       ndr_print_NTTIME(ndr, "change_time", r->change_time);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_xattr_DosInfo2Old(struct ndr_push *ndr, int ndr_flags, const struct xattr_DosInfo2Old *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attrib));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ea_size));
+               NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->size));
+               NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->alloc_size));
+               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->create_time));
+               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->change_time));
+               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->write_time));
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name));
+                       ndr->flags = _flags_save_string;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_xattr_DosInfo2Old(struct ndr_pull *ndr, int ndr_flags, struct xattr_DosInfo2Old *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attrib));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ea_size));
+               NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->size));
+               NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->alloc_size));
+               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->create_time));
+               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->change_time));
+               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->write_time));
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name));
+                       ndr->flags = _flags_save_string;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_xattr_DosInfo2Old(struct ndr_print *ndr, const char *name, const struct xattr_DosInfo2Old *r)
+{
+       ndr_print_struct(ndr, name, "xattr_DosInfo2Old");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "flags", r->flags);
+       ndr_print_uint32(ndr, "attrib", r->attrib);
+       ndr_print_uint32(ndr, "ea_size", r->ea_size);
+       ndr_print_udlong(ndr, "size", r->size);
+       ndr_print_udlong(ndr, "alloc_size", r->alloc_size);
+       ndr_print_NTTIME(ndr, "create_time", r->create_time);
+       ndr_print_NTTIME(ndr, "change_time", r->change_time);
+       ndr_print_NTTIME(ndr, "write_time", r->write_time);
+       ndr_print_string(ndr, "name", r->name);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_xattr_DosInfo(struct ndr_push *ndr, int ndr_flags, const union xattr_DosInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               int level = ndr_push_get_switch_value(ndr, r);
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
+               switch (level) {
+                       case 1: {
+                               NDR_CHECK(ndr_push_xattr_DosInfo1(ndr, NDR_SCALARS, &r->info1));
+                       break; }
+
+                       case 2: {
+                               NDR_CHECK(ndr_push_xattr_DosInfo2Old(ndr, NDR_SCALARS, &r->oldinfo2));
+                       break; }
+
+                       default:
+                               return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               int level = ndr_push_get_switch_value(ndr, r);
+               switch (level) {
+                       case 1:
+                       break;
+
+                       case 2:
+                       break;
+
+                       default:
+                               return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_xattr_DosInfo(struct ndr_pull *ndr, int ndr_flags, union xattr_DosInfo *r)
+{
+       int level;
+       uint16_t _level;
+       level = ndr_pull_get_switch_value(ndr, r);
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
+               if (_level != level) {
+                       return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
+               }
+               switch (level) {
+                       case 1: {
+                               NDR_CHECK(ndr_pull_xattr_DosInfo1(ndr, NDR_SCALARS, &r->info1));
+                       break; }
+
+                       case 2: {
+                               NDR_CHECK(ndr_pull_xattr_DosInfo2Old(ndr, NDR_SCALARS, &r->oldinfo2));
+                       break; }
+
+                       default:
+                               return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               switch (level) {
+                       case 1:
+                       break;
+
+                       case 2:
+                       break;
+
+                       default:
+                               return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_xattr_DosInfo(struct ndr_print *ndr, const char *name, const union xattr_DosInfo *r)
+{
+       int level;
+       level = ndr_print_get_switch_value(ndr, r);
+       ndr_print_union(ndr, name, level, "xattr_DosInfo");
+       switch (level) {
+               case 1:
+                       ndr_print_xattr_DosInfo1(ndr, "info1", &r->info1);
+               break;
+
+               case 2:
+                       ndr_print_xattr_DosInfo2Old(ndr, "oldinfo2", &r->oldinfo2);
+               break;
+
+               default:
+                       ndr_print_bad_level(ndr, name, level);
+       }
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_xattr_DosAttrib(struct ndr_push *ndr, int ndr_flags, const struct xattr_DosAttrib *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->version));
+               NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->version));
+               NDR_CHECK(ndr_push_xattr_DosInfo(ndr, NDR_SCALARS, &r->info));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_xattr_DosAttrib(struct ndr_pull *ndr, int ndr_flags, struct xattr_DosAttrib *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->version));
+               NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->version));
+               NDR_CHECK(ndr_pull_xattr_DosInfo(ndr, NDR_SCALARS, &r->info));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_xattr_DosAttrib(struct ndr_print *ndr, const char *name, const struct xattr_DosAttrib *r)
+{
+       ndr_print_struct(ndr, name, "xattr_DosAttrib");
+       ndr->depth++;
+       ndr_print_uint16(ndr, "version", r->version);
+       ndr_print_set_switch_value(ndr, &r->info, r->version);
+       ndr_print_xattr_DosInfo(ndr, "info", &r->info);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_xattr_EA(struct ndr_push *ndr, int ndr_flags, const struct xattr_EA *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
@@ -20,7 +257,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_tdb_xattr(struct ndr_push *ndr, int ndr_flag
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ enum ndr_err_code ndr_pull_tdb_xattr(struct ndr_pull *ndr, int ndr_flags, struct tdb_xattr *r)
+static enum ndr_err_code ndr_pull_xattr_EA(struct ndr_pull *ndr, int ndr_flags, struct xattr_EA *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -37,23 +274,103 @@ _PUBLIC_ enum ndr_err_code ndr_pull_tdb_xattr(struct ndr_pull *ndr, int ndr_flag
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_tdb_xattr(struct ndr_print *ndr, const char *name, const struct tdb_xattr *r)
+_PUBLIC_ void ndr_print_xattr_EA(struct ndr_print *ndr, const char *name, const struct xattr_EA *r)
 {
-       ndr_print_struct(ndr, name, "tdb_xattr");
+       ndr_print_struct(ndr, name, "xattr_EA");
        ndr->depth++;
        ndr_print_string(ndr, "name", r->name);
        ndr_print_DATA_BLOB(ndr, "value", r->value);
        ndr->depth--;
 }
 
+_PUBLIC_ enum ndr_err_code ndr_push_xattr_DosEAs(struct ndr_push *ndr, int ndr_flags, const struct xattr_DosEAs *r)
+{
+       uint32_t cntr_eas_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_eas));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->eas));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->eas) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_eas));
+                       for (cntr_eas_1 = 0; cntr_eas_1 < r->num_eas; cntr_eas_1++) {
+                               NDR_CHECK(ndr_push_xattr_EA(ndr, NDR_SCALARS, &r->eas[cntr_eas_1]));
+                       }
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_xattr_DosEAs(struct ndr_pull *ndr, int ndr_flags, struct xattr_DosEAs *r)
+{
+       uint32_t _ptr_eas;
+       uint32_t cntr_eas_1;
+       TALLOC_CTX *_mem_save_eas_0;
+       TALLOC_CTX *_mem_save_eas_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_eas));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_eas));
+               if (_ptr_eas) {
+                       NDR_PULL_ALLOC(ndr, r->eas);
+               } else {
+                       r->eas = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->eas) {
+                       _mem_save_eas_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->eas, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->eas));
+                       NDR_PULL_ALLOC_N(ndr, r->eas, ndr_get_array_size(ndr, &r->eas));
+                       _mem_save_eas_1 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->eas, 0);
+                       for (cntr_eas_1 = 0; cntr_eas_1 < r->num_eas; cntr_eas_1++) {
+                               NDR_CHECK(ndr_pull_xattr_EA(ndr, NDR_SCALARS, &r->eas[cntr_eas_1]));
+                       }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eas_1, 0);
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eas_0, 0);
+               }
+               if (r->eas) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->eas, r->num_eas));
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_xattr_DosEAs(struct ndr_print *ndr, const char *name, const struct xattr_DosEAs *r)
+{
+       uint32_t cntr_eas_1;
+       ndr_print_struct(ndr, name, "xattr_DosEAs");
+       ndr->depth++;
+       ndr_print_uint16(ndr, "num_eas", r->num_eas);
+       ndr_print_ptr(ndr, "eas", r->eas);
+       ndr->depth++;
+       if (r->eas) {
+               ndr->print(ndr, "%s: ARRAY(%d)", "eas", (int)r->num_eas);
+               ndr->depth++;
+               for (cntr_eas_1=0;cntr_eas_1<r->num_eas;cntr_eas_1++) {
+                       char *idx_1=NULL;
+                       if (asprintf(&idx_1, "[%d]", cntr_eas_1) != -1) {
+                               ndr_print_xattr_EA(ndr, "eas", &r->eas[cntr_eas_1]);
+                               free(idx_1);
+                       }
+               }
+               ndr->depth--;
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
 _PUBLIC_ enum ndr_err_code ndr_push_tdb_xattrs(struct ndr_push *ndr, int ndr_flags, const struct tdb_xattrs *r)
 {
-       uint32_t cntr_xattrs_0;
+       uint32_t cntr_eas_0;
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_xattrs));
-               for (cntr_xattrs_0 = 0; cntr_xattrs_0 < r->num_xattrs; cntr_xattrs_0++) {
-                       NDR_CHECK(ndr_push_tdb_xattr(ndr, NDR_SCALARS, &r->xattrs[cntr_xattrs_0]));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_eas));
+               for (cntr_eas_0 = 0; cntr_eas_0 < r->num_eas; cntr_eas_0++) {
+                       NDR_CHECK(ndr_push_xattr_EA(ndr, NDR_SCALARS, &r->eas[cntr_eas_0]));
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
@@ -63,18 +380,18 @@ _PUBLIC_ enum ndr_err_code ndr_push_tdb_xattrs(struct ndr_push *ndr, int ndr_fla
 
 _PUBLIC_ enum ndr_err_code ndr_pull_tdb_xattrs(struct ndr_pull *ndr, int ndr_flags, struct tdb_xattrs *r)
 {
-       uint32_t cntr_xattrs_0;
-       TALLOC_CTX *_mem_save_xattrs_0;
+       uint32_t cntr_eas_0;
+       TALLOC_CTX *_mem_save_eas_0;
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_xattrs));
-               NDR_PULL_ALLOC_N(ndr, r->xattrs, r->num_xattrs);
-               _mem_save_xattrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->xattrs, 0);
-               for (cntr_xattrs_0 = 0; cntr_xattrs_0 < r->num_xattrs; cntr_xattrs_0++) {
-                       NDR_CHECK(ndr_pull_tdb_xattr(ndr, NDR_SCALARS, &r->xattrs[cntr_xattrs_0]));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_eas));
+               NDR_PULL_ALLOC_N(ndr, r->eas, r->num_eas);
+               _mem_save_eas_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->eas, 0);
+               for (cntr_eas_0 = 0; cntr_eas_0 < r->num_eas; cntr_eas_0++) {
+                       NDR_CHECK(ndr_pull_xattr_EA(ndr, NDR_SCALARS, &r->eas[cntr_eas_0]));
                }
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_xattrs_0, 0);
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eas_0, 0);
        }
        if (ndr_flags & NDR_BUFFERS) {
        }
@@ -83,16 +400,16 @@ _PUBLIC_ enum ndr_err_code ndr_pull_tdb_xattrs(struct ndr_pull *ndr, int ndr_fla
 
 _PUBLIC_ void ndr_print_tdb_xattrs(struct ndr_print *ndr, const char *name, const struct tdb_xattrs *r)
 {
-       uint32_t cntr_xattrs_0;
+       uint32_t cntr_eas_0;
        ndr_print_struct(ndr, name, "tdb_xattrs");
        ndr->depth++;
-       ndr_print_uint32(ndr, "num_xattrs", r->num_xattrs);
-       ndr->print(ndr, "%s: ARRAY(%d)", "xattrs", (int)r->num_xattrs);
+       ndr_print_uint32(ndr, "num_eas", r->num_eas);
+       ndr->print(ndr, "%s: ARRAY(%d)", "eas", (int)r->num_eas);
        ndr->depth++;
-       for (cntr_xattrs_0=0;cntr_xattrs_0<r->num_xattrs;cntr_xattrs_0++) {
+       for (cntr_eas_0=0;cntr_eas_0<r->num_eas;cntr_eas_0++) {
                char *idx_0=NULL;
-               if (asprintf(&idx_0, "[%d]", cntr_xattrs_0) != -1) {
-                       ndr_print_tdb_xattr(ndr, "xattrs", &r->xattrs[cntr_xattrs_0]);
+               if (asprintf(&idx_0, "[%d]", cntr_eas_0) != -1) {
+                       ndr_print_xattr_EA(ndr, "eas", &r->eas[cntr_eas_0]);
                        free(idx_0);
                }
        }
@@ -100,6 +417,135 @@ _PUBLIC_ void ndr_print_tdb_xattrs(struct ndr_print *ndr, const char *name, cons
        ndr->depth--;
 }
 
+static enum ndr_err_code ndr_push_xattr_DosStream(struct ndr_push *ndr, int ndr_flags, const struct xattr_DosStream *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
+               NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->size));
+               NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->alloc_size));
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name));
+                       ndr->flags = _flags_save_string;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_xattr_DosStream(struct ndr_pull *ndr, int ndr_flags, struct xattr_DosStream *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
+               NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->size));
+               NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->alloc_size));
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name));
+                       ndr->flags = _flags_save_string;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_xattr_DosStream(struct ndr_print *ndr, const char *name, const struct xattr_DosStream *r)
+{
+       ndr_print_struct(ndr, name, "xattr_DosStream");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "flags", r->flags);
+       ndr_print_udlong(ndr, "size", r->size);
+       ndr_print_udlong(ndr, "alloc_size", r->alloc_size);
+       ndr_print_string(ndr, "name", r->name);
+       ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_xattr_DosStreams(struct ndr_push *ndr, int ndr_flags, const struct xattr_DosStreams *r)
+{
+       uint32_t cntr_streams_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_streams));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->streams));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->streams) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_streams));
+                       for (cntr_streams_1 = 0; cntr_streams_1 < r->num_streams; cntr_streams_1++) {
+                               NDR_CHECK(ndr_push_xattr_DosStream(ndr, NDR_SCALARS, &r->streams[cntr_streams_1]));
+                       }
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_xattr_DosStreams(struct ndr_pull *ndr, int ndr_flags, struct xattr_DosStreams *r)
+{
+       uint32_t _ptr_streams;
+       uint32_t cntr_streams_1;
+       TALLOC_CTX *_mem_save_streams_0;
+       TALLOC_CTX *_mem_save_streams_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_streams));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_streams));
+               if (_ptr_streams) {
+                       NDR_PULL_ALLOC(ndr, r->streams);
+               } else {
+                       r->streams = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->streams) {
+                       _mem_save_streams_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->streams, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->streams));
+                       NDR_PULL_ALLOC_N(ndr, r->streams, ndr_get_array_size(ndr, &r->streams));
+                       _mem_save_streams_1 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->streams, 0);
+                       for (cntr_streams_1 = 0; cntr_streams_1 < r->num_streams; cntr_streams_1++) {
+                               NDR_CHECK(ndr_pull_xattr_DosStream(ndr, NDR_SCALARS, &r->streams[cntr_streams_1]));
+                       }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_streams_1, 0);
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_streams_0, 0);
+               }
+               if (r->streams) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->streams, r->num_streams));
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_xattr_DosStreams(struct ndr_print *ndr, const char *name, const struct xattr_DosStreams *r)
+{
+       uint32_t cntr_streams_1;
+       ndr_print_struct(ndr, name, "xattr_DosStreams");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "num_streams", r->num_streams);
+       ndr_print_ptr(ndr, "streams", r->streams);
+       ndr->depth++;
+       if (r->streams) {
+               ndr->print(ndr, "%s: ARRAY(%d)", "streams", (int)r->num_streams);
+               ndr->depth++;
+               for (cntr_streams_1=0;cntr_streams_1<r->num_streams;cntr_streams_1++) {
+                       char *idx_1=NULL;
+                       if (asprintf(&idx_1, "[%d]", cntr_streams_1) != -1) {
+                               ndr_print_xattr_DosStream(ndr, "streams", &r->streams[cntr_streams_1]);
+                               free(idx_1);
+                       }
+               }
+               ndr->depth--;
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
 _PUBLIC_ enum ndr_err_code ndr_push_security_descriptor_timestamp(struct ndr_push *ndr, int ndr_flags, const struct security_descriptor_timestamp *r)
 {
        if (ndr_flags & NDR_SCALARS) {
index 21c5ae03b5887021ff6afdfba8631d77fabf747b..38701b1acaf840f7f3cdc6bbcf8bb6e4fa7177a3 100644 (file)
@@ -7,12 +7,23 @@
 #define _HEADER_NDR_xattr
 
 #define NDR_XATTR_CALL_COUNT (0)
-enum ndr_err_code ndr_push_tdb_xattr(struct ndr_push *ndr, int ndr_flags, const struct tdb_xattr *r);
-enum ndr_err_code ndr_pull_tdb_xattr(struct ndr_pull *ndr, int ndr_flags, struct tdb_xattr *r);
-void ndr_print_tdb_xattr(struct ndr_print *ndr, const char *name, const struct tdb_xattr *r);
+void ndr_print_xattr_DosInfo1(struct ndr_print *ndr, const char *name, const struct xattr_DosInfo1 *r);
+void ndr_print_xattr_DosInfo2Old(struct ndr_print *ndr, const char *name, const struct xattr_DosInfo2Old *r);
+void ndr_print_xattr_DosInfo(struct ndr_print *ndr, const char *name, const union xattr_DosInfo *r);
+enum ndr_err_code ndr_push_xattr_DosAttrib(struct ndr_push *ndr, int ndr_flags, const struct xattr_DosAttrib *r);
+enum ndr_err_code ndr_pull_xattr_DosAttrib(struct ndr_pull *ndr, int ndr_flags, struct xattr_DosAttrib *r);
+void ndr_print_xattr_DosAttrib(struct ndr_print *ndr, const char *name, const struct xattr_DosAttrib *r);
+void ndr_print_xattr_EA(struct ndr_print *ndr, const char *name, const struct xattr_EA *r);
+enum ndr_err_code ndr_push_xattr_DosEAs(struct ndr_push *ndr, int ndr_flags, const struct xattr_DosEAs *r);
+enum ndr_err_code ndr_pull_xattr_DosEAs(struct ndr_pull *ndr, int ndr_flags, struct xattr_DosEAs *r);
+void ndr_print_xattr_DosEAs(struct ndr_print *ndr, const char *name, const struct xattr_DosEAs *r);
 enum ndr_err_code ndr_push_tdb_xattrs(struct ndr_push *ndr, int ndr_flags, const struct tdb_xattrs *r);
 enum ndr_err_code ndr_pull_tdb_xattrs(struct ndr_pull *ndr, int ndr_flags, struct tdb_xattrs *r);
 void ndr_print_tdb_xattrs(struct ndr_print *ndr, const char *name, const struct tdb_xattrs *r);
+void ndr_print_xattr_DosStream(struct ndr_print *ndr, const char *name, const struct xattr_DosStream *r);
+enum ndr_err_code ndr_push_xattr_DosStreams(struct ndr_push *ndr, int ndr_flags, const struct xattr_DosStreams *r);
+enum ndr_err_code ndr_pull_xattr_DosStreams(struct ndr_pull *ndr, int ndr_flags, struct xattr_DosStreams *r);
+void ndr_print_xattr_DosStreams(struct ndr_print *ndr, const char *name, const struct xattr_DosStreams *r);
 enum ndr_err_code ndr_push_security_descriptor_timestamp(struct ndr_push *ndr, int ndr_flags, const struct security_descriptor_timestamp *r);
 enum ndr_err_code ndr_pull_security_descriptor_timestamp(struct ndr_pull *ndr, int ndr_flags, struct security_descriptor_timestamp *r);
 void ndr_print_security_descriptor_timestamp(struct ndr_print *ndr, const char *name, const struct security_descriptor_timestamp *r);
index a38deb302a255fb09881b75548d3d8f5eb087e63..cf3959b1999e673cb3db892223bd603c38308f68 100644 (file)
@@ -79,10 +79,41 @@ struct netr_NetworkInfo {
        struct netr_ChallengeResponse lm;
 }/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;
 
-union netr_LogonInfo {
-       struct netr_PasswordInfo *password;/* [unique,case] */
-       struct netr_NetworkInfo *network;/* [unique,case(2)] */
-}/* [public,switch_type(uint16)] */;
+struct netr_GenericInfo {
+       struct netr_IdentityInfo identity_info;
+       struct lsa_String package_name;
+       uint32_t length;
+       uint8_t *data;/* [unique,size_is(length)] */
+}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;
+
+enum netr_LogonInfoClass
+#ifndef USE_UINT_ENUMS
+ {
+       NetlogonInteractiveInformation=1,
+       NetlogonNetworkInformation=2,
+       NetlogonServiceInformation=3,
+       NetlogonGenericInformation=4,
+       NetlogonInteractiveTransitiveInformation=5,
+       NetlogonNetworkTransitiveInformation=6,
+       NetlogonServiceTransitiveInformation=7
+}
+#else
+ { __donnot_use_enum_netr_LogonInfoClass=0x7FFFFFFF}
+#define NetlogonInteractiveInformation ( 1 )
+#define NetlogonNetworkInformation ( 2 )
+#define NetlogonServiceInformation ( 3 )
+#define NetlogonGenericInformation ( 4 )
+#define NetlogonInteractiveTransitiveInformation ( 5 )
+#define NetlogonNetworkTransitiveInformation ( 6 )
+#define NetlogonServiceTransitiveInformation ( 7 )
+#endif
+;
+
+union netr_LogonLevel {
+       struct netr_PasswordInfo *password;/* [unique,case(NetlogonInteractiveInformation)] */
+       struct netr_NetworkInfo *network;/* [unique,case(NetlogonNetworkInformation)] */
+       struct netr_GenericInfo *generic;/* [unique,case(NetlogonGenericInformation)] */
+}/* [public,switch_type(netr_LogonInfoClass)] */;
 
 struct netr_UserSessionKey {
        uint8_t key[16];
@@ -173,11 +204,36 @@ struct netr_PacInfo {
        struct lsa_String unknown4;
 };
 
+struct netr_GenericInfo2 {
+       uint32_t length;
+       uint8_t *data;/* [unique,size_is(length)] */
+}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;
+
+enum netr_ValidationInfoClass
+#ifndef USE_UINT_ENUMS
+ {
+       NetlogonValidationUasInfo=1,
+       NetlogonValidationSamInfo=2,
+       NetlogonValidationSamInfo2=3,
+       NetlogonValidationGenericInfo2=5,
+       NetlogonValidationSamInfo4=6
+}
+#else
+ { __donnot_use_enum_netr_ValidationInfoClass=0x7FFFFFFF}
+#define NetlogonValidationUasInfo ( 1 )
+#define NetlogonValidationSamInfo ( 2 )
+#define NetlogonValidationSamInfo2 ( 3 )
+#define NetlogonValidationGenericInfo2 ( 5 )
+#define NetlogonValidationSamInfo4 ( 6 )
+#endif
+;
+
 union netr_Validation {
-       struct netr_SamInfo2 *sam2;/* [unique,case(2)] */
-       struct netr_SamInfo3 *sam3;/* [unique,case(3)] */
+       struct netr_SamInfo2 *sam2;/* [unique,case(NetlogonValidationSamInfo)] */
+       struct netr_SamInfo3 *sam3;/* [unique,case(NetlogonValidationSamInfo2)] */
        struct netr_PacInfo *pac;/* [unique,case(4)] */
-       struct netr_SamInfo6 *sam6;/* [unique,case(6)] */
+       struct netr_GenericInfo2 *generic;/* [unique,case(NetlogonValidationGenericInfo2)] */
+       struct netr_SamInfo6 *sam6;/* [unique,case(NetlogonValidationSamInfo4)] */
 }/* [public,switch_type(uint16)] */;
 
 struct netr_Credential {
@@ -189,19 +245,6 @@ struct netr_Authenticator {
        time_t timestamp;
 }/* [public] */;
 
-enum netr_LogonLevel
-#ifndef USE_UINT_ENUMS
- {
-       INTERACTIVE_LOGON_TYPE=1,
-       NET_LOGON_TYPE=2
-}
-#else
- { __donnot_use_enum_netr_LogonLevel=0x7FFFFFFF}
-#define INTERACTIVE_LOGON_TYPE ( 1 )
-#define NET_LOGON_TYPE ( 2 )
-#endif
-;
-
 enum netr_SchannelType;
 
 enum netr_SamDatabaseID;
@@ -299,7 +342,7 @@ struct netr_DELTA_USER {
 
 struct netr_DELTA_DOMAIN {
        struct lsa_String domain_name;
-       struct lsa_String comment;
+       struct lsa_String oem_information;
        int64_t force_logoff_time;
        uint16_t min_password_length;
        uint16_t password_history_length;
@@ -737,6 +780,16 @@ struct netr_DsRGetDCNameInfo {
        const char *client_site_name;/* [unique,charset(UTF16)] */
 }/* [public] */;
 
+/* bitmap netr_TrustFlags */
+#define NETR_TRUST_FLAG_IN_FOREST ( 0x00000001 )
+#define NETR_TRUST_FLAG_OUTBOUND ( 0x00000002 )
+#define NETR_TRUST_FLAG_TREEROOT ( 0x00000004 )
+#define NETR_TRUST_FLAG_PRIMARY ( 0x00000008 )
+#define NETR_TRUST_FLAG_NATIVE ( 0x00000010 )
+#define NETR_TRUST_FLAG_INBOUND ( 0x00000020 )
+#define NETR_TRUST_FLAG_MIT_KRB5 ( 0x00000080 )
+#define NETR_TRUST_FLAG_AES ( 0x00000100 )
+
 struct netr_BinaryString {
        uint16_t length;
        uint16_t size;
@@ -762,25 +815,57 @@ union netr_DomainQuery {
        struct netr_DomainQuery1 *query1;/* [unique,case] */
 };
 
+struct netr_trust_extension {
+       uint32_t length;/* [value(8)] */
+       uint32_t dummy;/* [value(0)] */
+       uint32_t size;/* [value(8)] */
+       uint32_t flags;
+       uint32_t parent_index;
+       uint32_t trust_type;
+       uint32_t trust_attributes;
+};
+
+struct netr_trust_extension_container {
+       uint16_t length;
+       uint16_t size;/* [value(length)] */
+       struct netr_trust_extension *info;/* [unique] */
+};
+
 struct netr_DomainTrustInfo {
        struct lsa_String domainname;
        struct lsa_String fulldomainname;
        struct lsa_String forest;
        struct GUID guid;
        struct dom_sid2 *sid;/* [unique] */
-       struct netr_BinaryString unknown1[4];
-       uint32_t unknown[4];
+       struct netr_trust_extension_container trust_extension;
+       struct lsa_String dummystring[3];
+       uint32_t dummy[4];
 };
 
+struct netr_LsaPolicyInfo {
+       uint32_t policy_size;
+       uint8_t *policy;/* [unique,size_is(policy_size)] */
+};
+
+/* bitmap netr_WorkstationFlags */
+#define NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS ( 0x00000001 )
+#define NETR_WS_FLAG_HANDLES_SPN_UPDATE ( 0x00000002 )
+
 struct netr_DomainInfo1 {
        struct netr_DomainTrustInfo domaininfo;
        uint32_t num_trusts;
        struct netr_DomainTrustInfo *trusts;/* [unique,size_is(num_trusts)] */
-       uint32_t unknown[14];
+       struct netr_LsaPolicyInfo lsa_policy;
+       struct lsa_String dns_hostname;
+       struct lsa_String dummystring[3];
+       uint32_t workstation_flags;
+       uint32_t supported_enc_types;
+       uint32_t dummy[2];
 };
 
 union netr_DomainInfo {
        struct netr_DomainInfo1 *info1;/* [unique,case] */
+       struct netr_DomainInfo1 *info2;/* [unique,case(2)] */
 };
 
 struct netr_CryptPassword {
@@ -798,14 +883,6 @@ struct netr_DsRAddress {
        uint32_t size;
 };
 
-/* bitmap netr_TrustFlags */
-#define NETR_TRUST_FLAG_IN_FOREST ( 0x00000001 )
-#define NETR_TRUST_FLAG_OUTBOUND ( 0x00000002 )
-#define NETR_TRUST_FLAG_TREEROOT ( 0x00000004 )
-#define NETR_TRUST_FLAG_PRIMARY ( 0x00000008 )
-#define NETR_TRUST_FLAG_NATIVE ( 0x00000010 )
-#define NETR_TRUST_FLAG_INBOUND ( 0x00000020 )
-
 enum netr_TrustType
 #ifndef USE_UINT_ENUMS
  {
@@ -895,8 +972,8 @@ struct netr_LogonSamLogon {
                const char *server_name;/* [unique,charset(UTF16)] */
                const char *computer_name;/* [unique,charset(UTF16)] */
                struct netr_Authenticator *credential;/* [unique] */
-               enum netr_LogonLevel logon_level;
-               union netr_LogonInfo *logon;/* [ref,switch_is(logon_level)] */
+               enum netr_LogonInfoClass logon_level;
+               union netr_LogonLevel *logon;/* [ref,switch_is(logon_level)] */
                uint16_t validation_level;
                struct netr_Authenticator *return_authenticator;/* [unique] */
        } in;
@@ -916,8 +993,8 @@ struct netr_LogonSamLogoff {
                const char *server_name;/* [unique,charset(UTF16)] */
                const char *computer_name;/* [unique,charset(UTF16)] */
                struct netr_Authenticator *credential;/* [unique] */
-               enum netr_LogonLevel logon_level;
-               union netr_LogonInfo logon;/* [switch_is(logon_level)] */
+               enum netr_LogonInfoClass logon_level;
+               union netr_LogonLevel logon;/* [switch_is(logon_level)] */
                struct netr_Authenticator *return_authenticator;/* [unique] */
        } in;
 
@@ -1481,8 +1558,8 @@ struct netr_LogonSamLogonEx {
        struct {
                const char *server_name;/* [unique,charset(UTF16)] */
                const char *computer_name;/* [unique,charset(UTF16)] */
-               enum netr_LogonLevel logon_level;
-               union netr_LogonInfo *logon;/* [ref,switch_is(logon_level)] */
+               enum netr_LogonInfoClass logon_level;
+               union netr_LogonLevel *logon;/* [ref,switch_is(logon_level)] */
                uint16_t validation_level;
                uint32_t *flags;/* [ref] */
        } in;
@@ -1583,8 +1660,8 @@ struct netr_LogonSamLogonWithFlags {
                const char *server_name;/* [unique,charset(UTF16)] */
                const char *computer_name;/* [unique,charset(UTF16)] */
                struct netr_Authenticator *credential;/* [unique] */
-               enum netr_LogonLevel logon_level;
-               union netr_LogonInfo logon;/* [switch_is(logon_level)] */
+               enum netr_LogonInfoClass logon_level;
+               union netr_LogonLevel logon;/* [switch_is(logon_level)] */
                uint16_t validation_level;
                struct netr_Authenticator *return_authenticator;/* [unique] */
                uint32_t *flags;/* [ref] */
index 8b2eca5004433198a5a7140c3120a5f4006b7de1..46a7e24e0df4f7ca4380fef500ccab5ca471dabf 100644 (file)
@@ -2,7 +2,7 @@
 
 #include <stdint.h>
 
-#include "librpc/gen_ndr/misc.h"
+#include "librpc/gen_ndr/security.h"
 #ifndef _HEADER_notify
 #define _HEADER_notify
 
index 95484e49f5063ff7fc396a9e39fe68a6645652bc..b56b552ae28089d861bacf35a9b7f2cfd39e390c 100644 (file)
@@ -101,6 +101,14 @@ struct PNP_EnumerateSubKeys {
 
 struct PNP_GetDeviceList {
        struct {
+               const char *filter;/* [unique,charset(UTF16)] */
+               uint32_t flags;
+               uint32_t *length;/* [ref] */
+       } in;
+
+       struct {
+               uint16_t *buffer;/* [ref,length_is(*length),size_is(*length)] */
+               uint32_t *length;/* [ref] */
                WERROR result;
        } out;
 
@@ -133,15 +141,15 @@ struct PNP_GetDeviceRegProp {
        struct {
                const char *devicepath;/* [ref,charset(UTF16)] */
                uint32_t property;
-               uint32_t unknown3;
-               uint32_t *unknown1;/* [ref] */
+               uint32_t flags;
+               uint32_t *reg_data_type;/* [ref] */
                uint32_t *buffer_size;/* [ref] */
                uint32_t *needed;/* [ref] */
        } in;
 
        struct {
                uint8_t *buffer;/* [ref,length_is(*buffer_size),size_is(*buffer_size)] */
-               uint32_t *unknown1;/* [ref] */
+               uint32_t *reg_data_type;/* [ref] */
                uint32_t *buffer_size;/* [ref] */
                uint32_t *needed;/* [ref] */
                WERROR result;
index 522c6a9ceca842c2a5d81de1eff7483c598325c3..62f6bf8de6ed36e24d42dfdb119c525d16e7c5a3 100644 (file)
@@ -125,9 +125,9 @@ struct samr_DomInfo1 {
        int64_t min_password_age;
 };
 
-struct samr_DomInfo2 {
+struct samr_DomGeneralInformation {
        NTTIME force_logoff_time;
-       struct lsa_String comment;
+       struct lsa_String oem_information;
        struct lsa_String domain_name;
        struct lsa_String primary;
        uint64_t sequence_num;
@@ -143,8 +143,8 @@ struct samr_DomInfo3 {
        NTTIME force_logoff_time;
 };
 
-struct samr_DomInfo4 {
-       struct lsa_String comment;
+struct samr_DomOEMInformation {
+       struct lsa_String oem_information;
 };
 
 struct samr_DomInfo5 {
@@ -168,8 +168,8 @@ struct samr_DomInfo9 {
        uint32_t unknown;
 };
 
-struct samr_DomInfo11 {
-       struct samr_DomInfo2 info2;
+struct samr_DomGeneralInformation2 {
+       struct samr_DomGeneralInformation general;
        uint64_t lockout_duration;
        uint64_t lockout_window;
        uint16_t lockout_threshold;
@@ -190,15 +190,15 @@ struct samr_DomInfo13 {
 
 union samr_DomainInfo {
        struct samr_DomInfo1 info1;/* [case] */
-       struct samr_DomInfo2 info2;/* [case(2)] */
+       struct samr_DomGeneralInformation general;/* [case(2)] */
        struct samr_DomInfo3 info3;/* [case(3)] */
-       struct samr_DomInfo4 info4;/* [case(4)] */
+       struct samr_DomOEMInformation oem;/* [case(4)] */
        struct samr_DomInfo5 info5;/* [case(5)] */
        struct samr_DomInfo6 info6;/* [case(6)] */
        struct samr_DomInfo7 info7;/* [case(7)] */
        struct samr_DomInfo8 info8;/* [case(8)] */
        struct samr_DomInfo9 info9;/* [case(9)] */
-       struct samr_DomInfo11 info11;/* [case(11)] */
+       struct samr_DomGeneralInformation2 general2;/* [case(11)] */
        struct samr_DomInfo12 info12;/* [case(12)] */
        struct samr_DomInfo13 info13;/* [case(13)] */
 }/* [switch_type(uint16)] */;
index 04655b178e2e6fc26787e98c50b0cce63d59a234..5b77d76b502003c92f498326577e2270d91e443d 100644 (file)
@@ -59,6 +59,7 @@
 #define SEC_ADS_DELETE_TREE    ( 0x00000040 )
 #define SEC_ADS_LIST_OBJECT    ( 0x00000080 )
 #define SEC_ADS_CONTROL_ACCESS ( 0x00000100 )
+#define SEC_MASK_INVALID       ( 0x0ce0fe00 )
 #define SEC_RIGHTS_FILE_READ   ( SEC_STD_READ_CONTROL|SEC_STD_SYNCHRONIZE|SEC_FILE_READ_DATA|SEC_FILE_READ_ATTRIBUTE|SEC_FILE_READ_EA )
 #define SEC_RIGHTS_FILE_WRITE  ( SEC_STD_READ_CONTROL|SEC_STD_SYNCHRONIZE|SEC_FILE_WRITE_DATA|SEC_FILE_WRITE_ATTRIBUTE|SEC_FILE_WRITE_EA|SEC_FILE_APPEND_DATA )
 #define SEC_RIGHTS_FILE_EXECUTE        ( SEC_STD_SYNCHRONIZE|SEC_STD_READ_CONTROL|SEC_FILE_READ_ATTRIBUTE|SEC_FILE_EXECUTE )
@@ -74,6 +75,7 @@
 #define SID_CREATOR_OWNER_DOMAIN       ( "S-1-3" )
 #define SID_CREATOR_OWNER      ( "S-1-3-0" )
 #define SID_CREATOR_GROUP      ( "S-1-3-1" )
+#define SID_OWNER_RIGHTS       ( "S-1-3-4" )
 #define NAME_NT_AUTHORITY      ( "NT AUTHORITY" )
 #define SID_NT_AUTHORITY       ( "S-1-5" )
 #define SID_NT_DIALUP  ( "S-1-5-1" )
 #define SID_NT_TERMINAL_SERVER_USERS   ( "S-1-5-13" )
 #define SID_NT_REMOTE_INTERACTIVE      ( "S-1-5-14" )
 #define SID_NT_THIS_ORGANISATION       ( "S-1-5-15" )
+#define SID_NT_IUSR    ( "S-1-5-17" )
 #define SID_NT_SYSTEM  ( "S-1-5-18" )
 #define SID_NT_LOCAL_SERVICE   ( "S-1-5-19" )
 #define SID_NT_NETWORK_SERVICE ( "S-1-5-20" )
+#define SID_NT_DIGEST_AUTHENTICATION   ( "S-1-5-64-21" )
+#define SID_NT_NTLM_AUTHENTICATION     ( "S-1-5-64-10" )
+#define SID_NT_SCHANNEL_AUTHENTICATION ( "S-1-5-64-14" )
+#define SID_NT_OTHER_ORGANISATION      ( "S-1-5-1000" )
 #define NAME_BUILTIN   ( "BUILTIN" )
 #define SID_BUILTIN    ( "S-1-5-32" )
 #define SID_BUILTIN_ADMINISTRATORS     ( "S-1-5-32-544" )
@@ -324,4 +331,11 @@ struct security_token {
 #define SECINFO_PROTECTED_SACL ( 0x40000000 )
 #define SECINFO_PROTECTED_DACL ( 0x80000000 )
 
+/* bitmap kerb_EncTypes */
+#define KERB_ENCTYPE_DES_CBC_CRC ( 0x00000001 )
+#define KERB_ENCTYPE_DES_CBC_MD5 ( 0x00000002 )
+#define KERB_ENCTYPE_RC4_HMAC_MD5 ( 0x00000004 )
+#define KERB_ENCTYPE_AES128_CTS_HMAC_SHA1_96 ( 0x00000008 )
+#define KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96 ( 0x00000010 )
+
 #endif /* _HEADER_security */
index 631bd82758699c2170b4e98af79964cc5fb64160..d58272084a4cf9985ed99430d9b1926a2eba2da4 100644 (file)
@@ -63,7 +63,7 @@ static bool api_dfs_GetManagerVersion(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_GetManagerVersion, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -136,7 +136,7 @@ static bool api_dfs_Add(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_Add, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -209,7 +209,7 @@ static bool api_dfs_Remove(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_Remove, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -282,7 +282,7 @@ static bool api_dfs_SetInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_SetInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -362,7 +362,7 @@ static bool api_dfs_GetInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_GetInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -438,7 +438,7 @@ static bool api_dfs_Enum(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_Enum, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -511,7 +511,7 @@ static bool api_dfs_Rename(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_Rename, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -584,7 +584,7 @@ static bool api_dfs_Move(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_Move, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -657,7 +657,7 @@ static bool api_dfs_ManagerGetConfigInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_ManagerGetConfigInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -730,7 +730,7 @@ static bool api_dfs_ManagerSendSiteInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_ManagerSendSiteInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -805,7 +805,7 @@ static bool api_dfs_AddFtRoot(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_AddFtRoot, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -880,7 +880,7 @@ static bool api_dfs_RemoveFtRoot(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_RemoveFtRoot, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -953,7 +953,7 @@ static bool api_dfs_AddStdRoot(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_AddStdRoot, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1026,7 +1026,7 @@ static bool api_dfs_RemoveStdRoot(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_RemoveStdRoot, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1099,7 +1099,7 @@ static bool api_dfs_ManagerInitialize(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_ManagerInitialize, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1172,7 +1172,7 @@ static bool api_dfs_AddStdRootForced(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_AddStdRootForced, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1249,7 +1249,7 @@ static bool api_dfs_GetDcAddress(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_GetDcAddress, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1322,7 +1322,7 @@ static bool api_dfs_SetDcAddress(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_SetDcAddress, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1395,7 +1395,7 @@ static bool api_dfs_FlushFtTable(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_FlushFtTable, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1468,7 +1468,7 @@ static bool api_dfs_Add2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_Add2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1541,7 +1541,7 @@ static bool api_dfs_Remove2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_Remove2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1617,7 +1617,7 @@ static bool api_dfs_EnumEx(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_EnumEx, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1690,7 +1690,7 @@ static bool api_dfs_SetInfo2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dfs_SetInfo2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
index 2dca1c8536ecf4016240fa542846108a7c207020..62123b826c4defd6f24ea5e795cb25de82014e1d 100644 (file)
@@ -63,7 +63,7 @@ static bool api_dssetup_DsRoleGetPrimaryDomainInformation(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetPrimaryDomainInformation, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -136,7 +136,7 @@ static bool api_dssetup_DsRoleDnsNameToFlatName(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDnsNameToFlatName, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -209,7 +209,7 @@ static bool api_dssetup_DsRoleDcAsDc(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDcAsDc, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -282,7 +282,7 @@ static bool api_dssetup_DsRoleDcAsReplica(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDcAsReplica, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -355,7 +355,7 @@ static bool api_dssetup_DsRoleDemoteDc(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDemoteDc, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -428,7 +428,7 @@ static bool api_dssetup_DsRoleGetDcOperationProgress(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetDcOperationProgress, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -501,7 +501,7 @@ static bool api_dssetup_DsRoleGetDcOperationResults(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetDcOperationResults, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -574,7 +574,7 @@ static bool api_dssetup_DsRoleCancel(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dssetup_DsRoleCancel, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -647,7 +647,7 @@ static bool api_dssetup_DsRoleServerSaveStateForUpgrade(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dssetup_DsRoleServerSaveStateForUpgrade, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -720,7 +720,7 @@ static bool api_dssetup_DsRoleUpgradeDownlevelServer(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dssetup_DsRoleUpgradeDownlevelServer, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -793,7 +793,7 @@ static bool api_dssetup_DsRoleAbortDownlevelServerUpgrade(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(dssetup_DsRoleAbortDownlevelServerUpgrade, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
index 38e9e194c80af919f6c9217a35d2d92a94d1e641..970398dc715faff7ff294fc6f5a25924faca173e 100644 (file)
@@ -63,7 +63,7 @@ static bool api_echo_AddOne(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(echo_AddOne, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -143,7 +143,7 @@ static bool api_echo_EchoData(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(echo_EchoData, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -216,7 +216,7 @@ static bool api_echo_SinkData(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(echo_SinkData, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -296,7 +296,7 @@ static bool api_echo_SourceData(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(echo_SourceData, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -376,7 +376,7 @@ static bool api_echo_TestCall(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(echo_TestCall, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -456,7 +456,7 @@ static bool api_echo_TestCall2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(echo_TestCall2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -529,7 +529,7 @@ static bool api_echo_TestSleep(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(echo_TestSleep, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -606,7 +606,7 @@ static bool api_echo_TestEnum(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(echo_TestEnum, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -681,7 +681,7 @@ static bool api_echo_TestSurrounding(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(echo_TestSurrounding, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -754,7 +754,7 @@ static bool api_echo_TestDoublePointer(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(echo_TestDoublePointer, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
index 69a47b355d970dc843a55c924ef84492270c3500..a31d89b8e87b62de3a20c9465b2fd0c544332282 100644 (file)
@@ -56,7 +56,7 @@ static bool api_epm_Insert(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(epm_Insert, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -129,7 +129,7 @@ static bool api_epm_Delete(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(epm_Delete, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -216,7 +216,7 @@ static bool api_epm_Lookup(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(epm_Lookup, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -303,7 +303,7 @@ static bool api_epm_Map(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(epm_Map, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -378,7 +378,7 @@ static bool api_epm_LookupHandleFree(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(epm_LookupHandleFree, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -451,7 +451,7 @@ static bool api_epm_InqObject(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(epm_InqObject, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -524,7 +524,7 @@ static bool api_epm_MgmtDelete(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(epm_MgmtDelete, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -597,7 +597,7 @@ static bool api_epm_MapAuth(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(epm_MapAuth, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
index 946be20e0f30f577a50eefc2c40b369afe9d6862..b9a4a2e9ed183216aceb9578a92610c28addf575 100644 (file)
@@ -56,7 +56,7 @@ static bool api_eventlog_ClearEventLogW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -129,7 +129,7 @@ static bool api_eventlog_BackupEventLogW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -204,7 +204,7 @@ static bool api_eventlog_CloseEventLog(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_CloseEventLog, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -277,7 +277,7 @@ static bool api_eventlog_DeregisterEventSource(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_DeregisterEventSource, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -357,7 +357,7 @@ static bool api_eventlog_GetNumRecords(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_GetNumRecords, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -437,7 +437,7 @@ static bool api_eventlog_GetOldestRecord(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_GetOldestRecord, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -510,7 +510,7 @@ static bool api_eventlog_ChangeNotify(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_ChangeNotify, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -590,7 +590,7 @@ static bool api_eventlog_OpenEventLogW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -663,7 +663,7 @@ static bool api_eventlog_RegisterEventSourceW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -736,7 +736,7 @@ static bool api_eventlog_OpenBackupEventLogW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -828,7 +828,7 @@ static bool api_eventlog_ReadEventLogW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -901,7 +901,7 @@ static bool api_eventlog_ReportEventW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_ReportEventW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -974,7 +974,7 @@ static bool api_eventlog_ClearEventLogA(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogA, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1047,7 +1047,7 @@ static bool api_eventlog_BackupEventLogA(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogA, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1120,7 +1120,7 @@ static bool api_eventlog_OpenEventLogA(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogA, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1193,7 +1193,7 @@ static bool api_eventlog_RegisterEventSourceA(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceA, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1266,7 +1266,7 @@ static bool api_eventlog_OpenBackupEventLogA(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogA, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1339,7 +1339,7 @@ static bool api_eventlog_ReadEventLogA(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogA, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1412,7 +1412,7 @@ static bool api_eventlog_ReportEventA(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_ReportEventA, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1485,7 +1485,7 @@ static bool api_eventlog_RegisterClusterSvc(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_RegisterClusterSvc, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1558,7 +1558,7 @@ static bool api_eventlog_DeregisterClusterSvc(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_DeregisterClusterSvc, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1631,7 +1631,7 @@ static bool api_eventlog_WriteClusterEvents(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_WriteClusterEvents, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1704,7 +1704,7 @@ static bool api_eventlog_GetLogIntormation(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_GetLogIntormation, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1777,7 +1777,7 @@ static bool api_eventlog_FlushEventLog(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(eventlog_FlushEventLog, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
index 1fca682c719ccad3064956ed5f0dd55138b71f8c..51098074ac14d85a442b2a53e57e9f6e1f289bee 100644 (file)
@@ -56,7 +56,7 @@ static bool api_initshutdown_Init(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(initshutdown_Init, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -129,7 +129,7 @@ static bool api_initshutdown_Abort(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(initshutdown_Abort, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -202,7 +202,7 @@ static bool api_initshutdown_InitEx(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(initshutdown_InitEx, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
index f55e079773102255b31dfe34a6e8e685b8219c31..b0893623a8b7c51d39e7d46bf3c65be445695769 100644 (file)
@@ -58,7 +58,7 @@ static bool api_lsa_Close(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_Close, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -131,7 +131,7 @@ static bool api_lsa_Delete(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_Delete, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -212,7 +212,7 @@ static bool api_lsa_EnumPrivs(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_EnumPrivs, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -292,7 +292,7 @@ static bool api_lsa_QuerySecurity(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_QuerySecurity, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -365,7 +365,7 @@ static bool api_lsa_SetSecObj(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_SetSecObj, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -438,7 +438,7 @@ static bool api_lsa_ChangePassword(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_ChangePassword, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -518,7 +518,7 @@ static bool api_lsa_OpenPolicy(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -598,7 +598,7 @@ static bool api_lsa_QueryInfoPolicy(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_QueryInfoPolicy, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -671,7 +671,7 @@ static bool api_lsa_SetInfoPolicy(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -744,7 +744,7 @@ static bool api_lsa_ClearAuditLog(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_ClearAuditLog, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -824,7 +824,7 @@ static bool api_lsa_CreateAccount(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_CreateAccount, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -905,7 +905,7 @@ static bool api_lsa_EnumAccounts(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_EnumAccounts, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -985,7 +985,7 @@ static bool api_lsa_CreateTrustedDomain(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomain, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1066,7 +1066,7 @@ static bool api_lsa_EnumTrustDom(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_EnumTrustDom, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1148,7 +1148,7 @@ static bool api_lsa_LookupNames(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_LookupNames, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1230,7 +1230,7 @@ static bool api_lsa_LookupSids(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_LookupSids, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1310,7 +1310,7 @@ static bool api_lsa_CreateSecret(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_CreateSecret, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1390,7 +1390,7 @@ static bool api_lsa_OpenAccount(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_OpenAccount, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1470,7 +1470,7 @@ static bool api_lsa_EnumPrivsAccount(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_EnumPrivsAccount, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1543,7 +1543,7 @@ static bool api_lsa_AddPrivilegesToAccount(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_AddPrivilegesToAccount, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1616,7 +1616,7 @@ static bool api_lsa_RemovePrivilegesFromAccount(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_RemovePrivilegesFromAccount, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1689,7 +1689,7 @@ static bool api_lsa_GetQuotasForAccount(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_GetQuotasForAccount, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1762,7 +1762,7 @@ static bool api_lsa_SetQuotasForAccount(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_SetQuotasForAccount, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1842,7 +1842,7 @@ static bool api_lsa_GetSystemAccessAccount(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_GetSystemAccessAccount, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1915,7 +1915,7 @@ static bool api_lsa_SetSystemAccessAccount(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_SetSystemAccessAccount, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1995,7 +1995,7 @@ static bool api_lsa_OpenTrustedDomain(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomain, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2075,7 +2075,7 @@ static bool api_lsa_QueryTrustedDomainInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2148,7 +2148,7 @@ static bool api_lsa_SetInformationTrustedDomain(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_SetInformationTrustedDomain, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2228,7 +2228,7 @@ static bool api_lsa_OpenSecret(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_OpenSecret, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2301,7 +2301,7 @@ static bool api_lsa_SetSecret(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_SetSecret, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2379,7 +2379,7 @@ static bool api_lsa_QuerySecret(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_QuerySecret, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2459,7 +2459,7 @@ static bool api_lsa_LookupPrivValue(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_LookupPrivValue, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2539,7 +2539,7 @@ static bool api_lsa_LookupPrivName(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_LookupPrivName, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2625,7 +2625,7 @@ static bool api_lsa_LookupPrivDisplayName(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_LookupPrivDisplayName, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2700,7 +2700,7 @@ static bool api_lsa_DeleteObject(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_DeleteObject, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2780,7 +2780,7 @@ static bool api_lsa_EnumAccountsWithUserRight(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_EnumAccountsWithUserRight, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2860,7 +2860,7 @@ static bool api_lsa_EnumAccountRights(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_EnumAccountRights, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2933,7 +2933,7 @@ static bool api_lsa_AddAccountRights(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_AddAccountRights, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3006,7 +3006,7 @@ static bool api_lsa_RemoveAccountRights(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_RemoveAccountRights, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3086,7 +3086,7 @@ static bool api_lsa_QueryTrustedDomainInfoBySid(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfoBySid, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3159,7 +3159,7 @@ static bool api_lsa_SetTrustedDomainInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3232,7 +3232,7 @@ static bool api_lsa_DeleteTrustedDomain(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_DeleteTrustedDomain, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3305,7 +3305,7 @@ static bool api_lsa_StorePrivateData(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_StorePrivateData, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3378,7 +3378,7 @@ static bool api_lsa_RetrievePrivateData(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_RetrievePrivateData, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3458,7 +3458,7 @@ static bool api_lsa_OpenPolicy2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3534,7 +3534,7 @@ static bool api_lsa_GetUserName(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_GetUserName, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3614,7 +3614,7 @@ static bool api_lsa_QueryInfoPolicy2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_QueryInfoPolicy2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3687,7 +3687,7 @@ static bool api_lsa_SetInfoPolicy2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3767,7 +3767,7 @@ static bool api_lsa_QueryTrustedDomainInfoByName(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfoByName, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3840,7 +3840,7 @@ static bool api_lsa_SetTrustedDomainInfoByName(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfoByName, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3921,7 +3921,7 @@ static bool api_lsa_EnumTrustedDomainsEx(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_EnumTrustedDomainsEx, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3982,6 +3982,13 @@ static bool api_lsa_CreateTrustedDomainEx(pipes_struct *p)
                NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx, r);
        }
 
+       ZERO_STRUCT(r->out);
+       r->out.trustdom_handle = talloc_zero(r, struct policy_handle);
+       if (r->out.trustdom_handle == NULL) {
+               talloc_free(r);
+               return false;
+       }
+
        r->out.result = _lsa_CreateTrustedDomainEx(p, r);
 
        if (p->rng_fault_state) {
@@ -3994,7 +4001,7 @@ static bool api_lsa_CreateTrustedDomainEx(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4069,7 +4076,7 @@ static bool api_lsa_CloseTrustedDomainEx(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_CloseTrustedDomainEx, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4149,7 +4156,7 @@ static bool api_lsa_QueryDomainInformationPolicy(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_QueryDomainInformationPolicy, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4222,7 +4229,7 @@ static bool api_lsa_SetDomainInformationPolicy(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_SetDomainInformationPolicy, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4302,7 +4309,7 @@ static bool api_lsa_OpenTrustedDomainByName(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomainByName, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4375,7 +4382,7 @@ static bool api_lsa_TestCall(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_TestCall, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4457,7 +4464,7 @@ static bool api_lsa_LookupSids2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_LookupSids2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4539,7 +4546,7 @@ static bool api_lsa_LookupNames2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_LookupNames2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4600,6 +4607,13 @@ static bool api_lsa_CreateTrustedDomainEx2(pipes_struct *p)
                NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx2, r);
        }
 
+       ZERO_STRUCT(r->out);
+       r->out.trustdom_handle = talloc_zero(r, struct policy_handle);
+       if (r->out.trustdom_handle == NULL) {
+               talloc_free(r);
+               return false;
+       }
+
        r->out.result = _lsa_CreateTrustedDomainEx2(p, r);
 
        if (p->rng_fault_state) {
@@ -4612,7 +4626,7 @@ static bool api_lsa_CreateTrustedDomainEx2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4685,7 +4699,7 @@ static bool api_lsa_CREDRWRITE(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITE, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4758,7 +4772,7 @@ static bool api_lsa_CREDRREAD(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_CREDRREAD, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4831,7 +4845,7 @@ static bool api_lsa_CREDRENUMERATE(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_CREDRENUMERATE, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4904,7 +4918,7 @@ static bool api_lsa_CREDRWRITEDOMAINCREDENTIALS(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITEDOMAINCREDENTIALS, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4977,7 +4991,7 @@ static bool api_lsa_CREDRREADDOMAINCREDENTIALS(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_CREDRREADDOMAINCREDENTIALS, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -5050,7 +5064,7 @@ static bool api_lsa_CREDRDELETE(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_CREDRDELETE, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -5123,7 +5137,7 @@ static bool api_lsa_CREDRGETTARGETINFO(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_CREDRGETTARGETINFO, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -5196,7 +5210,7 @@ static bool api_lsa_CREDRPROFILELOADED(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_CREDRPROFILELOADED, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -5278,7 +5292,7 @@ static bool api_lsa_LookupNames3(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_LookupNames3, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -5351,7 +5365,7 @@ static bool api_lsa_CREDRGETSESSIONTYPES(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_CREDRGETSESSIONTYPES, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -5424,7 +5438,7 @@ static bool api_lsa_LSARREGISTERAUDITEVENT(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_LSARREGISTERAUDITEVENT, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -5497,7 +5511,7 @@ static bool api_lsa_LSARGENAUDITEVENT(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_LSARGENAUDITEVENT, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -5570,7 +5584,7 @@ static bool api_lsa_LSARUNREGISTERAUDITEVENT(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_LSARUNREGISTERAUDITEVENT, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -5650,7 +5664,7 @@ static bool api_lsa_lsaRQueryForestTrustInformation(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_lsaRQueryForestTrustInformation, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -5723,7 +5737,7 @@ static bool api_lsa_LSARSETFORESTTRUSTINFORMATION(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_LSARSETFORESTTRUSTINFORMATION, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -5796,7 +5810,7 @@ static bool api_lsa_CREDRRENAME(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_CREDRRENAME, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -5878,7 +5892,7 @@ static bool api_lsa_LookupSids3(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_LookupSids3, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -5960,7 +5974,7 @@ static bool api_lsa_LookupNames4(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_LookupNames4, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -6033,7 +6047,7 @@ static bool api_lsa_LSAROPENPOLICYSCE(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_LSAROPENPOLICYSCE, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -6106,7 +6120,7 @@ static bool api_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_LSARADTREGISTERSECURITYEVENTSOURCE, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -6179,7 +6193,7 @@ static bool api_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -6252,7 +6266,7 @@ static bool api_lsa_LSARADTREPORTSECURITYEVENT(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(lsa_LSARADTREPORTSECURITYEVENT, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
index 9ec98bf638a9ce6cedd3bcf2bc740071ce0066fa..c14f682c1c2dd7f987c423438c295d219574cbc6 100644 (file)
@@ -63,7 +63,7 @@ static bool api_netr_LogonUasLogon(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_LogonUasLogon, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -143,7 +143,7 @@ static bool api_netr_LogonUasLogoff(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_LogonUasLogoff, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -230,7 +230,7 @@ static bool api_netr_LogonSamLogon(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_LogonSamLogon, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -305,7 +305,7 @@ static bool api_netr_LogonSamLogoff(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_LogonSamLogoff, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -385,7 +385,7 @@ static bool api_netr_ServerReqChallenge(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_ServerReqChallenge, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -465,7 +465,7 @@ static bool api_netr_ServerAuthenticate(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -545,7 +545,7 @@ static bool api_netr_ServerPasswordSet(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -627,7 +627,7 @@ static bool api_netr_DatabaseDeltas(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_DatabaseDeltas, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -709,7 +709,7 @@ static bool api_netr_DatabaseSync(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_DatabaseSync, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -808,7 +808,7 @@ static bool api_netr_AccountDeltas(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_AccountDeltas, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -908,7 +908,7 @@ static bool api_netr_AccountSync(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_AccountSync, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -988,7 +988,7 @@ static bool api_netr_GetDcName(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_GetDcName, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1068,7 +1068,7 @@ static bool api_netr_LogonControl(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_LogonControl, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1148,7 +1148,7 @@ static bool api_netr_GetAnyDCName(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_GetAnyDCName, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1228,7 +1228,7 @@ static bool api_netr_LogonControl2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_LogonControl2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1309,7 +1309,7 @@ static bool api_netr_ServerAuthenticate2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1391,7 +1391,7 @@ static bool api_netr_DatabaseSync2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_DatabaseSync2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1472,7 +1472,7 @@ static bool api_netr_DatabaseRedo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_DatabaseRedo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1552,7 +1552,7 @@ static bool api_netr_LogonControl2Ex(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_LogonControl2Ex, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1632,7 +1632,7 @@ static bool api_netr_NetrEnumerateTrustedDomains(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomains, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1712,7 +1712,7 @@ static bool api_netr_DsRGetDCName(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_DsRGetDCName, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1785,7 +1785,7 @@ static bool api_netr_NETRLOGONDUMMYROUTINE1(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_NETRLOGONDUMMYROUTINE1, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1858,7 +1858,7 @@ static bool api_netr_NETRLOGONSETSERVICEBITS(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSETSERVICEBITS, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1938,7 +1938,7 @@ static bool api_netr_LogonGetTrustRid(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_LogonGetTrustRid, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2011,7 +2011,7 @@ static bool api_netr_NETRLOGONCOMPUTESERVERDIGEST(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2084,7 +2084,7 @@ static bool api_netr_NETRLOGONCOMPUTECLIENTDIGEST(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2166,7 +2166,7 @@ static bool api_netr_ServerAuthenticate3(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate3, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2246,7 +2246,7 @@ static bool api_netr_DsRGetDCNameEx(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2326,7 +2326,7 @@ static bool api_netr_DsRGetSiteName(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_DsRGetSiteName, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2407,7 +2407,7 @@ static bool api_netr_LogonGetDomainInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_LogonGetDomainInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2487,7 +2487,7 @@ static bool api_netr_ServerPasswordSet2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2573,7 +2573,7 @@ static bool api_netr_ServerPasswordGet(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_ServerPasswordGet, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2646,7 +2646,7 @@ static bool api_netr_NETRLOGONSENDTOSAM(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSENDTOSAM, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2726,7 +2726,7 @@ static bool api_netr_DsRAddressToSitenamesW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2806,7 +2806,7 @@ static bool api_netr_DsRGetDCNameEx2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2879,7 +2879,7 @@ static bool api_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2959,7 +2959,7 @@ static bool api_netr_NetrEnumerateTrustedDomainsEx(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomainsEx, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3039,7 +3039,7 @@ static bool api_netr_DsRAddressToSitenamesExW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesExW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3119,7 +3119,7 @@ static bool api_netr_DsrGetDcSiteCoverageW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_DsrGetDcSiteCoverageW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3206,7 +3206,7 @@ static bool api_netr_LogonSamLogonEx(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonEx, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3286,7 +3286,7 @@ static bool api_netr_DsrEnumerateDomainTrusts(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_DsrEnumerateDomainTrusts, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3359,7 +3359,7 @@ static bool api_netr_DsrDeregisterDNSHostRecords(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_DsrDeregisterDNSHostRecords, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3451,7 +3451,7 @@ static bool api_netr_ServerTrustPasswordsGet(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_ServerTrustPasswordsGet, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3531,7 +3531,7 @@ static bool api_netr_DsRGetForestTrustInformation(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_DsRGetForestTrustInformation, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3617,7 +3617,7 @@ static bool api_netr_GetForestTrustInformation(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_GetForestTrustInformation, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3705,7 +3705,7 @@ static bool api_netr_LogonSamLogonWithFlags(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonWithFlags, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3778,7 +3778,7 @@ static bool api_netr_NETRSERVERGETTRUSTINFO(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(netr_NETRSERVERGETTRUSTINFO, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
index cdf8c74eb16f56cb1b6b94e7a204e852283b6a4e..87f5d51695c5d6f8c9d668324dfaafb838db9a05 100644 (file)
@@ -56,7 +56,7 @@ static bool api_PNP_Disconnect(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_Disconnect, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -129,7 +129,7 @@ static bool api_PNP_Connect(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_Connect, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -209,7 +209,7 @@ static bool api_PNP_GetVersion(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetVersion, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -282,7 +282,7 @@ static bool api_PNP_GetGlobalState(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetGlobalState, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -355,7 +355,7 @@ static bool api_PNP_InitDetection(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_InitDetection, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -428,7 +428,7 @@ static bool api_PNP_ReportLogOn(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_ReportLogOn, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -501,7 +501,7 @@ static bool api_PNP_ValidateDeviceInstance(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_ValidateDeviceInstance, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -574,7 +574,7 @@ static bool api_PNP_GetRootDeviceInstance(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetRootDeviceInstance, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -647,7 +647,7 @@ static bool api_PNP_GetRelatedDeviceInstance(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetRelatedDeviceInstance, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -720,7 +720,7 @@ static bool api_PNP_EnumerateSubKeys(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_EnumerateSubKeys, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -781,6 +781,14 @@ static bool api_PNP_GetDeviceList(pipes_struct *p)
                NDR_PRINT_IN_DEBUG(PNP_GetDeviceList, r);
        }
 
+       ZERO_STRUCT(r->out);
+       r->out.buffer = talloc_zero_array(r, uint16_t, *r->out.length);
+       if (r->out.buffer == NULL) {
+               talloc_free(r);
+               return false;
+       }
+
+       r->out.length = r->in.length;
        r->out.result = _PNP_GetDeviceList(p, r);
 
        if (p->rng_fault_state) {
@@ -793,7 +801,7 @@ static bool api_PNP_GetDeviceList(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetDeviceList, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -873,7 +881,7 @@ static bool api_PNP_GetDeviceListSize(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetDeviceListSize, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -946,7 +954,7 @@ static bool api_PNP_GetDepth(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetDepth, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1008,7 +1016,7 @@ static bool api_PNP_GetDeviceRegProp(pipes_struct *p)
        }
 
        ZERO_STRUCT(r->out);
-       r->out.unknown1 = r->in.unknown1;
+       r->out.reg_data_type = r->in.reg_data_type;
        r->out.buffer = talloc_zero_array(r, uint8_t, *r->out.buffer_size);
        if (r->out.buffer == NULL) {
                talloc_free(r);
@@ -1029,7 +1037,7 @@ static bool api_PNP_GetDeviceRegProp(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetDeviceRegProp, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1102,7 +1110,7 @@ static bool api_PNP_SetDeviceRegProp(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_SetDeviceRegProp, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1175,7 +1183,7 @@ static bool api_PNP_GetClassInstance(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetClassInstance, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1248,7 +1256,7 @@ static bool api_PNP_CreateKey(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_CreateKey, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1321,7 +1329,7 @@ static bool api_PNP_DeleteRegistryKey(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_DeleteRegistryKey, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1394,7 +1402,7 @@ static bool api_PNP_GetClassCount(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetClassCount, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1467,7 +1475,7 @@ static bool api_PNP_GetClassName(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetClassName, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1540,7 +1548,7 @@ static bool api_PNP_DeleteClassKey(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_DeleteClassKey, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1613,7 +1621,7 @@ static bool api_PNP_GetInterfaceDeviceAlias(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceAlias, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1686,7 +1694,7 @@ static bool api_PNP_GetInterfaceDeviceList(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceList, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1759,7 +1767,7 @@ static bool api_PNP_GetInterfaceDeviceListSize(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceListSize, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1832,7 +1840,7 @@ static bool api_PNP_RegisterDeviceClassAssociation(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_RegisterDeviceClassAssociation, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1905,7 +1913,7 @@ static bool api_PNP_UnregisterDeviceClassAssociation(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_UnregisterDeviceClassAssociation, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1978,7 +1986,7 @@ static bool api_PNP_GetClassRegProp(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetClassRegProp, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2051,7 +2059,7 @@ static bool api_PNP_SetClassRegProp(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_SetClassRegProp, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2124,7 +2132,7 @@ static bool api_PNP_CreateDevInst(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_CreateDevInst, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2197,7 +2205,7 @@ static bool api_PNP_DeviceInstanceAction(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_DeviceInstanceAction, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2270,7 +2278,7 @@ static bool api_PNP_GetDeviceStatus(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetDeviceStatus, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2343,7 +2351,7 @@ static bool api_PNP_SetDeviceProblem(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_SetDeviceProblem, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2416,7 +2424,7 @@ static bool api_PNP_DisableDevInst(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_DisableDevInst, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2489,7 +2497,7 @@ static bool api_PNP_UninstallDevInst(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_UninstallDevInst, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2562,7 +2570,7 @@ static bool api_PNP_AddID(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_AddID, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2635,7 +2643,7 @@ static bool api_PNP_RegisterDriver(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_RegisterDriver, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2708,7 +2716,7 @@ static bool api_PNP_QueryRemove(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_QueryRemove, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2781,7 +2789,7 @@ static bool api_PNP_RequestDeviceEject(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_RequestDeviceEject, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2854,7 +2862,7 @@ static bool api_PNP_IsDockStationPresent(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_IsDockStationPresent, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2927,7 +2935,7 @@ static bool api_PNP_RequestEjectPC(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_RequestEjectPC, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3009,7 +3017,7 @@ static bool api_PNP_HwProfFlags(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_HwProfFlags, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3084,7 +3092,7 @@ static bool api_PNP_GetHwProfInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetHwProfInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3157,7 +3165,7 @@ static bool api_PNP_AddEmptyLogConf(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_AddEmptyLogConf, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3230,7 +3238,7 @@ static bool api_PNP_FreeLogConf(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_FreeLogConf, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3303,7 +3311,7 @@ static bool api_PNP_GetFirstLogConf(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetFirstLogConf, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3376,7 +3384,7 @@ static bool api_PNP_GetNextLogConf(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetNextLogConf, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3449,7 +3457,7 @@ static bool api_PNP_GetLogConfPriority(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetLogConfPriority, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3522,7 +3530,7 @@ static bool api_PNP_AddResDes(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_AddResDes, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3595,7 +3603,7 @@ static bool api_PNP_FreeResDes(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_FreeResDes, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3668,7 +3676,7 @@ static bool api_PNP_GetNextResDes(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetNextResDes, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3741,7 +3749,7 @@ static bool api_PNP_GetResDesData(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetResDesData, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3814,7 +3822,7 @@ static bool api_PNP_GetResDesDataSize(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetResDesDataSize, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3887,7 +3895,7 @@ static bool api_PNP_ModifyResDes(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_ModifyResDes, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3960,7 +3968,7 @@ static bool api_PNP_DetectResourceLimit(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_DetectResourceLimit, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4033,7 +4041,7 @@ static bool api_PNP_QueryResConfList(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_QueryResConfList, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4106,7 +4114,7 @@ static bool api_PNP_SetHwProf(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_SetHwProf, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4179,7 +4187,7 @@ static bool api_PNP_QueryArbitratorFreeData(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeData, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4252,7 +4260,7 @@ static bool api_PNP_QueryArbitratorFreeSize(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeSize, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4325,7 +4333,7 @@ static bool api_PNP_RunDetection(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_RunDetection, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4398,7 +4406,7 @@ static bool api_PNP_RegisterNotification(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_RegisterNotification, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4471,7 +4479,7 @@ static bool api_PNP_UnregisterNotification(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_UnregisterNotification, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4544,7 +4552,7 @@ static bool api_PNP_GetCustomDevProp(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetCustomDevProp, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4617,7 +4625,7 @@ static bool api_PNP_GetVersionInternal(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetVersionInternal, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4690,7 +4698,7 @@ static bool api_PNP_GetBlockedDriverInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetBlockedDriverInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4763,7 +4771,7 @@ static bool api_PNP_GetServerSideDeviceInstallFlags(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(PNP_GetServerSideDeviceInstallFlags, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
index 7d4f2c11fd4af1f4dbbf4eab7fa9452dcc2909dd..e09c7a3faf6022658c7f9e8af59c60e826d35a87 100644 (file)
@@ -63,7 +63,7 @@ static bool api_samr_Connect(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_Connect, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -138,7 +138,7 @@ static bool api_samr_Close(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_Close, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -211,7 +211,7 @@ static bool api_samr_SetSecurity(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_SetSecurity, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -291,7 +291,7 @@ static bool api_samr_QuerySecurity(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_QuerySecurity, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -364,7 +364,7 @@ static bool api_samr_Shutdown(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_Shutdown, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -444,7 +444,7 @@ static bool api_samr_LookupDomain(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_LookupDomain, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -531,7 +531,7 @@ static bool api_samr_EnumDomains(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_EnumDomains, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -611,7 +611,7 @@ static bool api_samr_OpenDomain(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_OpenDomain, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -691,7 +691,7 @@ static bool api_samr_QueryDomainInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_QueryDomainInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -764,7 +764,7 @@ static bool api_samr_SetDomainInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_SetDomainInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -850,7 +850,7 @@ static bool api_samr_CreateDomainGroup(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_CreateDomainGroup, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -937,7 +937,7 @@ static bool api_samr_EnumDomainGroups(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_EnumDomainGroups, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1023,7 +1023,7 @@ static bool api_samr_CreateUser(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_CreateUser, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1110,7 +1110,7 @@ static bool api_samr_EnumDomainUsers(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_EnumDomainUsers, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1196,7 +1196,7 @@ static bool api_samr_CreateDomAlias(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_CreateDomAlias, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1283,7 +1283,7 @@ static bool api_samr_EnumDomainAliases(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_EnumDomainAliases, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1363,7 +1363,7 @@ static bool api_samr_GetAliasMembership(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_GetAliasMembership, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1449,7 +1449,7 @@ static bool api_samr_LookupNames(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_LookupNames, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1535,7 +1535,7 @@ static bool api_samr_LookupRids(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_LookupRids, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1615,7 +1615,7 @@ static bool api_samr_OpenGroup(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_OpenGroup, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1695,7 +1695,7 @@ static bool api_samr_QueryGroupInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_QueryGroupInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1768,7 +1768,7 @@ static bool api_samr_SetGroupInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_SetGroupInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1841,7 +1841,7 @@ static bool api_samr_AddGroupMember(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_AddGroupMember, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1916,7 +1916,7 @@ static bool api_samr_DeleteDomainGroup(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_DeleteDomainGroup, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1989,7 +1989,7 @@ static bool api_samr_DeleteGroupMember(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_DeleteGroupMember, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2069,7 +2069,7 @@ static bool api_samr_QueryGroupMember(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_QueryGroupMember, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2142,7 +2142,7 @@ static bool api_samr_SetMemberAttributesOfGroup(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_SetMemberAttributesOfGroup, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2222,7 +2222,7 @@ static bool api_samr_OpenAlias(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_OpenAlias, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2302,7 +2302,7 @@ static bool api_samr_QueryAliasInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_QueryAliasInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2375,7 +2375,7 @@ static bool api_samr_SetAliasInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_SetAliasInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2450,7 +2450,7 @@ static bool api_samr_DeleteDomAlias(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_DeleteDomAlias, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2523,7 +2523,7 @@ static bool api_samr_AddAliasMember(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_AddAliasMember, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2596,7 +2596,7 @@ static bool api_samr_DeleteAliasMember(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_DeleteAliasMember, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2676,7 +2676,7 @@ static bool api_samr_GetMembersInAlias(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_GetMembersInAlias, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2756,7 +2756,7 @@ static bool api_samr_OpenUser(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_OpenUser, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2831,7 +2831,7 @@ static bool api_samr_DeleteUser(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_DeleteUser, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2911,7 +2911,7 @@ static bool api_samr_QueryUserInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_QueryUserInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2984,7 +2984,7 @@ static bool api_samr_SetUserInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_SetUserInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3057,7 +3057,7 @@ static bool api_samr_ChangePasswordUser(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_ChangePasswordUser, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3137,7 +3137,7 @@ static bool api_samr_GetGroupsForUser(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_GetGroupsForUser, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3229,7 +3229,7 @@ static bool api_samr_QueryDisplayInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_QueryDisplayInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3309,7 +3309,7 @@ static bool api_samr_GetDisplayEnumerationIndex(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_GetDisplayEnumerationIndex, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3382,7 +3382,7 @@ static bool api_samr_TestPrivateFunctionsDomain(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_TestPrivateFunctionsDomain, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3455,7 +3455,7 @@ static bool api_samr_TestPrivateFunctionsUser(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_TestPrivateFunctionsUser, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3535,7 +3535,7 @@ static bool api_samr_GetUserPwInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_GetUserPwInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3608,7 +3608,7 @@ static bool api_samr_RemoveMemberFromForeignDomain(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_RemoveMemberFromForeignDomain, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3688,7 +3688,7 @@ static bool api_samr_QueryDomainInfo2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_QueryDomainInfo2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3768,7 +3768,7 @@ static bool api_samr_QueryUserInfo2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_QueryUserInfo2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3860,7 +3860,7 @@ static bool api_samr_QueryDisplayInfo2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_QueryDisplayInfo2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3940,7 +3940,7 @@ static bool api_samr_GetDisplayEnumerationIndex2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_GetDisplayEnumerationIndex2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4032,7 +4032,7 @@ static bool api_samr_CreateUser2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_CreateUser2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4124,7 +4124,7 @@ static bool api_samr_QueryDisplayInfo3(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_QueryDisplayInfo3, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4197,7 +4197,7 @@ static bool api_samr_AddMultipleMembersToAlias(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_AddMultipleMembersToAlias, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4270,7 +4270,7 @@ static bool api_samr_RemoveMultipleMembersFromAlias(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_RemoveMultipleMembersFromAlias, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4343,7 +4343,7 @@ static bool api_samr_OemChangePasswordUser2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_OemChangePasswordUser2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4416,7 +4416,7 @@ static bool api_samr_ChangePasswordUser2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_ChangePasswordUser2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4496,7 +4496,7 @@ static bool api_samr_GetDomPwInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_GetDomPwInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4576,7 +4576,7 @@ static bool api_samr_Connect2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_Connect2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4649,7 +4649,7 @@ static bool api_samr_SetUserInfo2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_SetUserInfo2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4722,7 +4722,7 @@ static bool api_samr_SetBootKeyInformation(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_SetBootKeyInformation, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4802,7 +4802,7 @@ static bool api_samr_GetBootKeyInformation(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_GetBootKeyInformation, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4882,7 +4882,7 @@ static bool api_samr_Connect3(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_Connect3, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4962,7 +4962,7 @@ static bool api_samr_Connect4(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_Connect4, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -5048,7 +5048,7 @@ static bool api_samr_ChangePasswordUser3(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_ChangePasswordUser3, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -5140,7 +5140,7 @@ static bool api_samr_Connect5(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_Connect5, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -5220,7 +5220,7 @@ static bool api_samr_RidToSid(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_RidToSid, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -5293,7 +5293,7 @@ static bool api_samr_SetDsrmPassword(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_SetDsrmPassword, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -5373,7 +5373,7 @@ static bool api_samr_ValidatePassword(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(samr_ValidatePassword, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
index 60a7212805c24c1eef365371a847c656c4550721..57d523997125f9e87739e741f91161866df17a57 100644 (file)
@@ -66,7 +66,7 @@ static bool api_srvsvc_NetCharDevEnum(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevEnum, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -146,7 +146,7 @@ static bool api_srvsvc_NetCharDevGetInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevGetInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -219,7 +219,7 @@ static bool api_srvsvc_NetCharDevControl(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevControl, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -302,7 +302,7 @@ static bool api_srvsvc_NetCharDevQEnum(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQEnum, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -382,7 +382,7 @@ static bool api_srvsvc_NetCharDevQGetInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQGetInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -457,7 +457,7 @@ static bool api_srvsvc_NetCharDevQSetInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQSetInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -530,7 +530,7 @@ static bool api_srvsvc_NetCharDevQPurge(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurge, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -603,7 +603,7 @@ static bool api_srvsvc_NetCharDevQPurgeSelf(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurgeSelf, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -685,7 +685,7 @@ static bool api_srvsvc_NetConnEnum(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetConnEnum, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -767,7 +767,7 @@ static bool api_srvsvc_NetFileEnum(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetFileEnum, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -847,7 +847,7 @@ static bool api_srvsvc_NetFileGetInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetFileGetInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -920,7 +920,7 @@ static bool api_srvsvc_NetFileClose(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetFileClose, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1002,7 +1002,7 @@ static bool api_srvsvc_NetSessEnum(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetSessEnum, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1075,7 +1075,7 @@ static bool api_srvsvc_NetSessDel(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetSessDel, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1150,7 +1150,7 @@ static bool api_srvsvc_NetShareAdd(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetShareAdd, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1232,7 +1232,7 @@ static bool api_srvsvc_NetShareEnumAll(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnumAll, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1312,7 +1312,7 @@ static bool api_srvsvc_NetShareGetInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetShareGetInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1387,7 +1387,7 @@ static bool api_srvsvc_NetShareSetInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetShareSetInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1460,7 +1460,7 @@ static bool api_srvsvc_NetShareDel(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDel, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1533,7 +1533,7 @@ static bool api_srvsvc_NetShareDelSticky(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelSticky, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1613,7 +1613,7 @@ static bool api_srvsvc_NetShareCheck(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetShareCheck, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1693,7 +1693,7 @@ static bool api_srvsvc_NetSrvGetInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvGetInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1768,7 +1768,7 @@ static bool api_srvsvc_NetSrvSetInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvSetInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1850,7 +1850,7 @@ static bool api_srvsvc_NetDiskEnum(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetDiskEnum, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1930,7 +1930,7 @@ static bool api_srvsvc_NetServerStatisticsGet(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetServerStatisticsGet, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2003,7 +2003,7 @@ static bool api_srvsvc_NetTransportAdd(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportAdd, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2086,7 +2086,7 @@ static bool api_srvsvc_NetTransportEnum(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportEnum, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2159,7 +2159,7 @@ static bool api_srvsvc_NetTransportDel(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportDel, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2239,7 +2239,7 @@ static bool api_srvsvc_NetRemoteTOD(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetRemoteTOD, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2312,7 +2312,7 @@ static bool api_srvsvc_NetSetServiceBits(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetSetServiceBits, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2392,7 +2392,7 @@ static bool api_srvsvc_NetPathType(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetPathType, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2473,7 +2473,7 @@ static bool api_srvsvc_NetPathCanonicalize(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCanonicalize, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2546,7 +2546,7 @@ static bool api_srvsvc_NetPathCompare(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCompare, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2619,7 +2619,7 @@ static bool api_srvsvc_NetNameValidate(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetNameValidate, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2692,7 +2692,7 @@ static bool api_srvsvc_NETRPRNAMECANONICALIZE(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NETRPRNAMECANONICALIZE, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2765,7 +2765,7 @@ static bool api_srvsvc_NetPRNameCompare(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetPRNameCompare, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2847,7 +2847,7 @@ static bool api_srvsvc_NetShareEnum(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnum, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2927,7 +2927,7 @@ static bool api_srvsvc_NetShareDelStart(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelStart, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3002,7 +3002,7 @@ static bool api_srvsvc_NetShareDelCommit(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelCommit, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3082,7 +3082,7 @@ static bool api_srvsvc_NetGetFileSecurity(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetGetFileSecurity, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3155,7 +3155,7 @@ static bool api_srvsvc_NetSetFileSecurity(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetSetFileSecurity, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3228,7 +3228,7 @@ static bool api_srvsvc_NetServerTransportAddEx(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetServerTransportAddEx, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3301,7 +3301,7 @@ static bool api_srvsvc_NetServerSetServiceBitsEx(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NetServerSetServiceBitsEx, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3374,7 +3374,7 @@ static bool api_srvsvc_NETRDFSGETVERSION(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSGETVERSION, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3447,7 +3447,7 @@ static bool api_srvsvc_NETRDFSCREATELOCALPARTITION(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3520,7 +3520,7 @@ static bool api_srvsvc_NETRDFSDELETELOCALPARTITION(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3593,7 +3593,7 @@ static bool api_srvsvc_NETRDFSSETLOCALVOLUMESTATE(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3666,7 +3666,7 @@ static bool api_srvsvc_NETRDFSSETSERVERINFO(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETSERVERINFO, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3739,7 +3739,7 @@ static bool api_srvsvc_NETRDFSCREATEEXITPOINT(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3812,7 +3812,7 @@ static bool api_srvsvc_NETRDFSDELETEEXITPOINT(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3885,7 +3885,7 @@ static bool api_srvsvc_NETRDFSMODIFYPREFIX(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMODIFYPREFIX, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3958,7 +3958,7 @@ static bool api_srvsvc_NETRDFSFIXLOCALVOLUME(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4031,7 +4031,7 @@ static bool api_srvsvc_NETRDFSMANAGERREPORTSITEINFO(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -4104,7 +4104,7 @@ static bool api_srvsvc_NETRSERVERTRANSPORTDELEX(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
index d371ca2ec6748b3e07dc270c442878633704ece2..2349b4fd938cafdc491ef4cb549b3b82e546665b 100644 (file)
@@ -58,7 +58,7 @@ static bool api_svcctl_CloseServiceHandle(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_CloseServiceHandle, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -138,7 +138,7 @@ static bool api_svcctl_ControlService(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_ControlService, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -211,7 +211,7 @@ static bool api_svcctl_DeleteService(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_DeleteService, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -291,7 +291,7 @@ static bool api_svcctl_LockServiceDatabase(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_LockServiceDatabase, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -377,7 +377,7 @@ static bool api_svcctl_QueryServiceObjectSecurity(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceObjectSecurity, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -450,7 +450,7 @@ static bool api_svcctl_SetServiceObjectSecurity(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_SetServiceObjectSecurity, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -530,7 +530,7 @@ static bool api_svcctl_QueryServiceStatus(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatus, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -603,7 +603,7 @@ static bool api_svcctl_SetServiceStatus(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_SetServiceStatus, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -678,7 +678,7 @@ static bool api_svcctl_UnlockServiceDatabase(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_UnlockServiceDatabase, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -751,7 +751,7 @@ static bool api_svcctl_NotifyBootConfigStatus(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_NotifyBootConfigStatus, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -824,7 +824,7 @@ static bool api_svcctl_SCSetServiceBitsW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -904,7 +904,7 @@ static bool api_svcctl_ChangeServiceConfigW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -985,7 +985,7 @@ static bool api_svcctl_CreateServiceW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1077,7 +1077,7 @@ static bool api_svcctl_EnumDependentServicesW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1170,7 +1170,7 @@ static bool api_svcctl_EnumServicesStatusW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1250,7 +1250,7 @@ static bool api_svcctl_OpenSCManagerW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1330,7 +1330,7 @@ static bool api_svcctl_OpenServiceW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1392,7 +1392,7 @@ static bool api_svcctl_QueryServiceConfigW(pipes_struct *p)
        }
 
        ZERO_STRUCT(r->out);
-       r->out.query = talloc_zero_array(r, uint8_t, r->in.buf_size);
+       r->out.query = talloc_zero(r, struct QUERY_SERVICE_CONFIG);
        if (r->out.query == NULL) {
                talloc_free(r);
                return false;
@@ -1416,7 +1416,7 @@ static bool api_svcctl_QueryServiceConfigW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1502,7 +1502,7 @@ static bool api_svcctl_QueryServiceLockStatusW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1575,7 +1575,7 @@ static bool api_svcctl_StartServiceW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_StartServiceW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1656,7 +1656,7 @@ static bool api_svcctl_GetServiceDisplayNameW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1737,7 +1737,7 @@ static bool api_svcctl_GetServiceKeyNameW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1810,7 +1810,7 @@ static bool api_svcctl_SCSetServiceBitsA(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsA, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1890,7 +1890,7 @@ static bool api_svcctl_ChangeServiceConfigA(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigA, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1970,7 +1970,7 @@ static bool api_svcctl_CreateServiceA(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceA, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2062,7 +2062,7 @@ static bool api_svcctl_EnumDependentServicesA(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesA, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2155,7 +2155,7 @@ static bool api_svcctl_EnumServicesStatusA(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusA, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2235,7 +2235,7 @@ static bool api_svcctl_OpenSCManagerA(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerA, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2308,7 +2308,7 @@ static bool api_svcctl_OpenServiceA(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceA, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2394,7 +2394,7 @@ static bool api_svcctl_QueryServiceConfigA(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigA, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2480,7 +2480,7 @@ static bool api_svcctl_QueryServiceLockStatusA(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusA, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2553,7 +2553,7 @@ static bool api_svcctl_StartServiceA(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_StartServiceA, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2634,7 +2634,7 @@ static bool api_svcctl_GetServiceDisplayNameA(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameA, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2715,7 +2715,7 @@ static bool api_svcctl_GetServiceKeyNameA(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameA, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2788,7 +2788,7 @@ static bool api_svcctl_GetCurrentGroupeStateW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_GetCurrentGroupeStateW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2861,7 +2861,7 @@ static bool api_svcctl_EnumServiceGroupW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_EnumServiceGroupW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2934,7 +2934,7 @@ static bool api_svcctl_ChangeServiceConfig2A(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2A, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3007,7 +3007,7 @@ static bool api_svcctl_ChangeServiceConfig2W(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2W, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3093,7 +3093,7 @@ static bool api_svcctl_QueryServiceConfig2A(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2A, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3179,7 +3179,7 @@ static bool api_svcctl_QueryServiceConfig2W(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2W, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3265,7 +3265,7 @@ static bool api_svcctl_QueryServiceStatusEx(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatusEx, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3364,7 +3364,7 @@ static bool api_EnumServicesStatusExA(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(EnumServicesStatusExA, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3463,7 +3463,7 @@ static bool api_EnumServicesStatusExW(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(EnumServicesStatusExW, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -3536,7 +3536,7 @@ static bool api_svcctl_SCSendTSMessage(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(svcctl_SCSendTSMessage, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
index 2162306322ac10f96ae8b7960846a3b019f4a95c..77b0a1c5d2589e5dd9b9b3e9489d1c5dc884887f 100644 (file)
@@ -63,7 +63,7 @@ static bool api_winreg_OpenHKCR(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_OpenHKCR, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -143,7 +143,7 @@ static bool api_winreg_OpenHKCU(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_OpenHKCU, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -223,7 +223,7 @@ static bool api_winreg_OpenHKLM(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_OpenHKLM, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -303,7 +303,7 @@ static bool api_winreg_OpenHKPD(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_OpenHKPD, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -383,7 +383,7 @@ static bool api_winreg_OpenHKU(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_OpenHKU, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -458,7 +458,7 @@ static bool api_winreg_CloseKey(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_CloseKey, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -539,7 +539,7 @@ static bool api_winreg_CreateKey(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_CreateKey, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -612,7 +612,7 @@ static bool api_winreg_DeleteKey(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_DeleteKey, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -685,7 +685,7 @@ static bool api_winreg_DeleteValue(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_DeleteValue, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -762,7 +762,7 @@ static bool api_winreg_EnumKey(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_EnumKey, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -841,7 +841,7 @@ static bool api_winreg_EnumValue(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_EnumValue, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -914,7 +914,7 @@ static bool api_winreg_FlushKey(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_FlushKey, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -989,7 +989,7 @@ static bool api_winreg_GetKeySecurity(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_GetKeySecurity, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1062,7 +1062,7 @@ static bool api_winreg_LoadKey(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_LoadKey, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1135,7 +1135,7 @@ static bool api_winreg_NotifyChangeKeyValue(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_NotifyChangeKeyValue, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1215,7 +1215,7 @@ static bool api_winreg_OpenKey(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_OpenKey, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1338,7 +1338,7 @@ static bool api_winreg_QueryInfoKey(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_QueryInfoKey, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1403,7 +1403,7 @@ static bool api_winreg_QueryValue(pipes_struct *p)
        r->out.type = r->in.type;
        r->out.data = r->in.data;
        r->out.data_size = r->in.data_size;
-       r->out.value_length = r->in.value_length;
+       r->out.data_length = r->in.data_length;
        r->out.result = _winreg_QueryValue(p, r);
 
        if (p->rng_fault_state) {
@@ -1416,7 +1416,7 @@ static bool api_winreg_QueryValue(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_QueryValue, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1489,7 +1489,7 @@ static bool api_winreg_ReplaceKey(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_ReplaceKey, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1562,7 +1562,7 @@ static bool api_winreg_RestoreKey(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_RestoreKey, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1635,7 +1635,7 @@ static bool api_winreg_SaveKey(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_SaveKey, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1708,7 +1708,7 @@ static bool api_winreg_SetKeySecurity(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_SetKeySecurity, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1781,7 +1781,7 @@ static bool api_winreg_SetValue(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_SetValue, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1854,7 +1854,7 @@ static bool api_winreg_UnLoadKey(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_UnLoadKey, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1927,7 +1927,7 @@ static bool api_winreg_InitiateSystemShutdown(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdown, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2000,7 +2000,7 @@ static bool api_winreg_AbortSystemShutdown(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_AbortSystemShutdown, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2080,7 +2080,7 @@ static bool api_winreg_GetVersion(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_GetVersion, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2160,7 +2160,7 @@ static bool api_winreg_OpenHKCC(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_OpenHKCC, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2240,7 +2240,7 @@ static bool api_winreg_OpenHKDD(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_OpenHKDD, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2317,7 +2317,7 @@ static bool api_winreg_QueryMultipleValues(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2390,7 +2390,7 @@ static bool api_winreg_InitiateSystemShutdownEx(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdownEx, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2463,7 +2463,7 @@ static bool api_winreg_SaveKeyEx(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_SaveKeyEx, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2543,7 +2543,7 @@ static bool api_winreg_OpenHKPT(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_OpenHKPT, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2623,7 +2623,7 @@ static bool api_winreg_OpenHKPN(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_OpenHKPN, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2696,7 +2696,7 @@ static bool api_winreg_QueryMultipleValues2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
index 68813dbba7c280cde16709bc8cba2b2cb233574f..9c07fa86ea329a128bb4ff5cd8c32f6141c9d74b 100644 (file)
@@ -63,7 +63,7 @@ static bool api_wkssvc_NetWkstaGetInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaGetInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -138,7 +138,7 @@ static bool api_wkssvc_NetWkstaSetInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaSetInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -220,7 +220,7 @@ static bool api_wkssvc_NetWkstaEnumUsers(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaEnumUsers, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -300,7 +300,7 @@ static bool api_wkssvc_NetrWkstaUserGetInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaUserGetInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -375,7 +375,7 @@ static bool api_wkssvc_NetrWkstaUserSetInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaUserSetInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -457,7 +457,7 @@ static bool api_wkssvc_NetWkstaTransportEnum(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaTransportEnum, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -532,7 +532,7 @@ static bool api_wkssvc_NetrWkstaTransportAdd(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaTransportAdd, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -605,7 +605,7 @@ static bool api_wkssvc_NetrWkstaTransportDel(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaTransportDel, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -680,7 +680,7 @@ static bool api_wkssvc_NetrUseAdd(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseAdd, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -760,7 +760,7 @@ static bool api_wkssvc_NetrUseGetInfo(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseGetInfo, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -833,7 +833,7 @@ static bool api_wkssvc_NetrUseDel(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseDel, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -915,7 +915,7 @@ static bool api_wkssvc_NetrUseEnum(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseEnum, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -988,7 +988,7 @@ static bool api_wkssvc_NetrMessageBufferSend(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrMessageBufferSend, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1068,7 +1068,7 @@ static bool api_wkssvc_NetrWorkstationStatisticsGet(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrWorkstationStatisticsGet, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1141,7 +1141,7 @@ static bool api_wkssvc_NetrLogonDomainNameAdd(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrLogonDomainNameAdd, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1214,7 +1214,7 @@ static bool api_wkssvc_NetrLogonDomainNameDel(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrLogonDomainNameDel, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1287,7 +1287,7 @@ static bool api_wkssvc_NetrJoinDomain(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1360,7 +1360,7 @@ static bool api_wkssvc_NetrUnjoinDomain(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1433,7 +1433,7 @@ static bool api_wkssvc_NetrRenameMachineInDomain(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1506,7 +1506,7 @@ static bool api_wkssvc_NetrValidateName(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrValidateName, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1587,7 +1587,7 @@ static bool api_wkssvc_NetrGetJoinInformation(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinInformation, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1668,7 +1668,7 @@ static bool api_wkssvc_NetrGetJoinableOus(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinableOus, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1741,7 +1741,7 @@ static bool api_wkssvc_NetrJoinDomain2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1814,7 +1814,7 @@ static bool api_wkssvc_NetrUnjoinDomain2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1887,7 +1887,7 @@ static bool api_wkssvc_NetrRenameMachineInDomain2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -1960,7 +1960,7 @@ static bool api_wkssvc_NetrValidateName2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrValidateName2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2041,7 +2041,7 @@ static bool api_wkssvc_NetrGetJoinableOus2(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinableOus2, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2114,7 +2114,7 @@ static bool api_wkssvc_NetrAddAlternateComputerName(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrAddAlternateComputerName, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2187,7 +2187,7 @@ static bool api_wkssvc_NetrRemoveAlternateComputerName(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrRemoveAlternateComputerName, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2260,7 +2260,7 @@ static bool api_wkssvc_NetrSetPrimaryComputername(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrSetPrimaryComputername, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
@@ -2340,7 +2340,7 @@ static bool api_wkssvc_NetrEnumerateComputerNames(pipes_struct *p)
                NDR_PRINT_OUT_DEBUG(wkssvc_NetrEnumerateComputerNames, r);
        }
 
-       push = ndr_push_init_ctx(r);
+       push = ndr_push_init_ctx(r, NULL);
        if (push == NULL) {
                talloc_free(r);
                return false;
index b7f39a9b029efcf4ffc4e0e8d797f419a019dca7..42ed03978440264512e389db6054077fb1d245e1 100644 (file)
@@ -99,6 +99,18 @@ enum SERVICE_CONTROL
 #define SC_RIGHT_SVC_INTERROGATE ( 0x0080 )
 #define SC_RIGHT_SVC_USER_DEFINED_CONTROL ( 0x0100 )
 
+struct QUERY_SERVICE_CONFIG {
+       uint32_t service_type;
+       uint32_t start_type;
+       uint32_t error_control;
+       const char *executablepath;/* [unique,range(0,8192),charset(UTF16)] */
+       const char *loadordergroup;/* [unique,range(0,8192),charset(UTF16)] */
+       uint32_t tag_id;
+       const char *dependencies;/* [unique,range(0,8192),charset(UTF16)] */
+       const char *startname;/* [unique,range(0,8192),charset(UTF16)] */
+       const char *displayname;/* [unique,range(0,8192),charset(UTF16)] */
+}/* [gensize,public] */;
+
 
 struct svcctl_CloseServiceHandle {
        struct {
@@ -360,12 +372,12 @@ struct svcctl_OpenServiceW {
 struct svcctl_QueryServiceConfigW {
        struct {
                struct policy_handle *handle;/* [ref] */
-               uint32_t buf_size;
+               uint32_t buf_size;/* [range(0,8192)] */
        } in;
 
        struct {
-               uint8_t *query;
-               uint32_t *bytes_needed;/* [ref] */
+               struct QUERY_SERVICE_CONFIG *query;/* [ref] */
+               uint32_t *bytes_needed;/* [ref,range(0,8192)] */
                WERROR result;
        } out;
 
index 4a06e3bc833acac6331c46a27342133253d79050..0f3c45ebb799f8a8ff01b42938965eec9a59f343 100644 (file)
@@ -3,7 +3,6 @@
 #include <stdint.h>
 
 #include "librpc/gen_ndr/lsa.h"
-#include "librpc/gen_ndr/initshutdown.h"
 #include "librpc/gen_ndr/security.h"
 #ifndef _HEADER_winreg
 #define _HEADER_winreg
@@ -96,6 +95,12 @@ struct winreg_ValNameBuf {
        const char *name;/* [unique,length_is(length/2),charset(UTF16),size_is(size/2)] */
 };
 
+/* bitmap winreg_NotifyChangeType */
+#define REG_NOTIFY_CHANGE_NAME ( 0x00000001 )
+#define REG_NOTIFY_CHANGE_ATTRIBUTES ( 0x00000002 )
+#define REG_NOTIFY_CHANGE_LAST_SET ( 0x00000004 )
+#define REG_NOTIFY_CHANGE_SECURITY ( 0x00000008 )
+
 struct KeySecurityAttribute {
        uint32_t data_size;
        struct KeySecurityData sec_data;
@@ -383,16 +388,16 @@ struct winreg_QueryValue {
                struct policy_handle *handle;/* [ref] */
                struct winreg_String *value_name;/* [ref] */
                enum winreg_Type *type;/* [unique] */
-               uint8_t *data;/* [unique,length_is(*value_length),size_is(*data_size)] */
+               uint8_t *data;/* [unique,length_is(*data_length),size_is(*data_size)] */
                uint32_t *data_size;/* [unique] */
-               uint32_t *value_length;/* [unique] */
+               uint32_t *data_length;/* [unique] */
        } in;
 
        struct {
                enum winreg_Type *type;/* [unique] */
-               uint8_t *data;/* [unique,length_is(*value_length),size_is(*data_size)] */
+               uint8_t *data;/* [unique,length_is(*data_length),size_is(*data_size)] */
                uint32_t *data_size;/* [unique] */
-               uint32_t *value_length;/* [unique] */
+               uint32_t *data_length;/* [unique] */
                WERROR result;
        } out;
 
@@ -438,7 +443,7 @@ struct winreg_SaveKey {
 struct winreg_SetKeySecurity {
        struct {
                struct policy_handle *handle;/* [ref] */
-               uint32_t access_mask;
+               uint32_t sec_info;
                struct KeySecurityData *sd;/* [ref] */
        } in;
 
@@ -476,7 +481,7 @@ struct winreg_UnLoadKey {
 struct winreg_InitiateSystemShutdown {
        struct {
                uint16_t *hostname;/* [unique] */
-               struct initshutdown_String *message;/* [unique] */
+               struct lsa_StringLarge *message;/* [unique] */
                uint32_t timeout;
                uint8_t force_apps;
                uint8_t do_reboot;
@@ -564,7 +569,7 @@ struct winreg_QueryMultipleValues {
 struct winreg_InitiateSystemShutdownEx {
        struct {
                uint16_t *hostname;/* [unique] */
-               struct initshutdown_String *message;/* [unique] */
+               struct lsa_StringLarge *message;/* [unique] */
                uint32_t timeout;
                uint8_t force_apps;
                uint8_t do_reboot;
index b0b9db99c1a6cd6456cd95d42c7f0c0f4198666e..1d8da3f5e28f393b1ed7165d6b80adcd23de2312 100644 (file)
@@ -2,18 +2,75 @@
 
 #include <stdint.h>
 
+#include "librpc/gen_ndr/security.h"
 #ifndef _HEADER_xattr
 #define _HEADER_xattr
 
+#define XATTR_DOSATTRIB_NAME   ( "user.DosAttrib" )
+#define XATTR_DOSATTRIB_ESTIMATED_SIZE ( 64 )
+#define XATTR_DOSEAS_NAME      ( "user.DosEAs" )
+#define XATTR_DOSSTREAMS_NAME  ( "user.DosStreams" )
+#define XATTR_STREAM_FLAG_INTERNAL     ( 0x00000001 )
+#define XATTR_DOSSTREAM_PREFIX ( "user.DosStream." )
+#define XATTR_MAX_STREAM_SIZE  ( 0x4000 )
+#define XATTR_MAX_STREAM_SIZE_TDB      ( 0x100000 )
 #define XATTR_NTACL_NAME       ( "security.NTACL" )
-struct tdb_xattr {
+struct xattr_DosInfo1 {
+       uint32_t attrib;
+       uint32_t ea_size;
+       uint64_t size;
+       uint64_t alloc_size;
+       NTTIME create_time;
+       NTTIME change_time;
+};
+
+struct xattr_DosInfo2Old {
+       uint32_t flags;
+       uint32_t attrib;
+       uint32_t ea_size;
+       uint64_t size;
+       uint64_t alloc_size;
+       NTTIME create_time;
+       NTTIME change_time;
+       NTTIME write_time;
+       const char * name;/* [flag(LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM)] */
+};
+
+union xattr_DosInfo {
+       struct xattr_DosInfo1 info1;/* [case] */
+       struct xattr_DosInfo2Old oldinfo2;/* [case(2)] */
+}/* [switch_type(uint16)] */;
+
+struct xattr_DosAttrib {
+       uint16_t version;
+       union xattr_DosInfo info;/* [switch_is(version)] */
+}/* [public] */;
+
+struct xattr_EA {
        const char * name;/* [flag(LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM)] */
        DATA_BLOB value;
+};
+
+struct xattr_DosEAs {
+       uint16_t num_eas;
+       struct xattr_EA *eas;/* [unique,size_is(num_eas)] */
 }/* [public] */;
 
 struct tdb_xattrs {
-       uint32_t num_xattrs;
-       struct tdb_xattr *xattrs;
+       uint32_t num_eas;
+       struct xattr_EA *eas;
+}/* [public] */;
+
+struct xattr_DosStream {
+       uint32_t flags;
+       uint64_t size;
+       uint64_t alloc_size;
+       const char * name;/* [flag(LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM)] */
+};
+
+struct xattr_DosStreams {
+       uint32_t num_streams;
+       struct xattr_DosStream *streams;/* [unique,size_is(num_streams)] */
 }/* [public] */;
 
 struct security_descriptor_timestamp {
diff --git a/source3/librpc/idl/drsblobs.idl b/source3/librpc/idl/drsblobs.idl
deleted file mode 100644 (file)
index 6fdca0e..0000000
+++ /dev/null
@@ -1,436 +0,0 @@
-#include "idl_types.h"
-
-import "drsuapi.idl", "misc.idl";
-
-[
-  uuid("12345778-1234-abcd-0001-00000001"),
-  version(0.0),
-  pointer_default(unique),
-  helpstring("Active Directory Replication LDAP Blobs")
-]
-interface drsblobs {
-       typedef bitmap drsuapi_DsReplicaSyncOptions drsuapi_DsReplicaSyncOptions;
-       typedef bitmap drsuapi_DsReplicaNeighbourFlags drsuapi_DsReplicaNeighbourFlags;
-       typedef [v1_enum] enum drsuapi_DsAttributeId drsuapi_DsAttributeId;
-
-       /*
-        * replPropertyMetaData
-        * w2k  uses version 1
-        * w2k3 uses version 1
-        */
-       typedef struct {
-               drsuapi_DsAttributeId attid;
-               uint32 version;
-               NTTIME_1sec originating_change_time;
-               GUID originating_invocation_id;
-               hyper originating_usn;
-               hyper local_usn;
-       } replPropertyMetaData1;
-
-       typedef struct {
-               uint32 count;
-               uint32 reserved;
-               replPropertyMetaData1 array[count];
-       } replPropertyMetaDataCtr1;
-
-       typedef [nodiscriminant] union {
-               [case(1)] replPropertyMetaDataCtr1 ctr1;
-       } replPropertyMetaDataCtr;
-
-       typedef [public] struct {
-               uint32 version;
-               uint32 reserved;
-               [switch_is(version)] replPropertyMetaDataCtr ctr;
-       } replPropertyMetaDataBlob;
-
-       void decode_replPropertyMetaData(
-               [in] replPropertyMetaDataBlob blob
-               );
-
-       /*
-        * replUpToDateVector
-        * w2k  uses version 1
-        * w2k3 uses version 2
-        */
-       typedef struct {
-               uint32 count;
-               uint32 reserved;
-               drsuapi_DsReplicaCursor cursors[count];
-       } replUpToDateVectorCtr1;
-
-       typedef struct {
-               uint32 count;
-               uint32 reserved;
-               drsuapi_DsReplicaCursor2 cursors[count];
-       } replUpToDateVectorCtr2;
-
-       typedef [nodiscriminant] union {
-               [case(1)] replUpToDateVectorCtr1 ctr1;
-               [case(2)] replUpToDateVectorCtr2 ctr2;
-       } replUpToDateVectorCtr;
-
-       typedef [public] struct {
-               uint32 version;
-               uint32 reserved;
-               [switch_is(version)] replUpToDateVectorCtr ctr;
-       } replUpToDateVectorBlob;
-
-       void decode_replUpToDateVector(
-               [in] replUpToDateVectorBlob blob
-               );
-
-       /*
-        * repsFrom/repsTo
-        * w2k  uses version 1
-        * w2k3 uses version 1
-        */
-       typedef [public,gensize] struct {
-               [value(strlen(dns_name)+1)] uint32 __dns_name_size;
-               [charset(DOS)] uint8 dns_name[__dns_name_size];
-       } repsFromTo1OtherInfo;
-
-       typedef [public,gensize,flag(NDR_PAHEX)] struct {
-               /* this includes the 8 bytes of the repsFromToBlob header */
-               [value(ndr_size_repsFromTo1(this, ndr->flags)+8)] uint32 blobsize;
-               uint32 consecutive_sync_failures;
-               NTTIME_1sec last_success;
-               NTTIME_1sec last_attempt;
-               WERROR result_last_attempt;
-               [relative] repsFromTo1OtherInfo *other_info;
-               [value(ndr_size_repsFromTo1OtherInfo(other_info, ndr->flags))] uint32 other_info_length;
-               drsuapi_DsReplicaNeighbourFlags replica_flags;
-               uint8 schedule[84];
-               uint32 reserved;
-               drsuapi_DsReplicaHighWaterMark highwatermark;
-               GUID source_dsa_obj_guid; /* the 'objectGuid' field of the CN=NTDS Settings object */
-               GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
-               GUID transport_guid;
-       } repsFromTo1;
-
-       typedef [nodiscriminant] union {
-               [case(1)] repsFromTo1 ctr1;
-       } repsFromTo;
-
-       typedef [public] struct {
-               uint32 version;
-               uint32 reserved;
-               [switch_is(version)] repsFromTo ctr;
-       } repsFromToBlob;
-
-       void decode_repsFromTo(
-               [in] repsFromToBlob blob
-               );
-
-       /*
-        * partialAttributeSet
-        * w2k  uses version 1
-        * w2k3 uses version 1
-        */
-       typedef struct {
-               uint32 count;
-               drsuapi_DsAttributeId array[count];
-       } partialAttributeSetCtr1;
-
-       typedef [nodiscriminant] union {
-               [case(1)] partialAttributeSetCtr1 ctr1;
-       } partialAttributeSetCtr;
-
-       typedef [public] struct {
-               uint32 version;
-               uint32 reserved;
-               [switch_is(version)] partialAttributeSetCtr ctr;
-       } partialAttributeSetBlob;
-
-       void decode_partialAttributeSet(
-               [in] partialAttributeSetBlob blob
-               );
-
-       /*
-        * prefixMap
-        * w2k  unknown
-        * w2k3 unknown
-        * samba4 uses 0x44534442 'DSDB'
-        *
-        * as we windows don't return the prefixMap attribute when you ask for
-        * we don't know the format, but the attribute is not replicated
-        * so that we can choose our own format...
-        */
-       typedef [v1_enum] enum {
-               PREFIX_MAP_VERSION_DSDB = 0x44534442
-       } prefixMapVersion;
-
-       typedef [nodiscriminant] union {
-               [case(PREFIX_MAP_VERSION_DSDB)] drsuapi_DsReplicaOIDMapping_Ctr dsdb;
-       } prefixMapCtr;
-
-       typedef [public] struct {
-               prefixMapVersion version;
-               uint32 reserved;
-               [switch_is(version)] prefixMapCtr ctr;
-       } prefixMapBlob;
-
-       void decode_prefixMap(
-               [in] prefixMapBlob blob
-               );
-
-       /*
-        * the cookie for the LDAP dirsync control
-        */
-       typedef [nodiscriminant,gensize] union {
-               [case(0)];
-               [default] replUpToDateVectorBlob uptodateness_vector;
-       } ldapControlDirSyncExtra;
-
-       typedef struct {
-               [value(3)] uint32 u1;
-               NTTIME time;
-               uint32 u2;
-               uint32 u3;
-               [value(ndr_size_ldapControlDirSyncExtra(&extra, extra.uptodateness_vector.version, 0))]
-                       uint32 extra_length;
-               drsuapi_DsReplicaHighWaterMark highwatermark;
-               GUID guid1;
-               [switch_is(extra_length)] ldapControlDirSyncExtra extra;
-       } ldapControlDirSyncBlob;
-
-       typedef [public,relative_base] struct {
-               [charset(DOS),value("MSDS")] uint8 msds[4];
-               [subcontext(0)] ldapControlDirSyncBlob blob;
-       } ldapControlDirSyncCookie;
-
-       void decode_ldapControlDirSync(
-               [in] ldapControlDirSyncCookie cookie
-               );
-
-       typedef struct {
-               [value(2*strlen_m(name))] uint16 name_len;
-               [value(strlen(data))] uint16 data_len;
-               uint16 reserved; /* 2 for 'Packages', 1 for 'Primary:*', but should be ignored */
-               [charset(UTF16)] uint8 name[name_len];
-               /*
-                * the data field contains data as HEX strings
-                *
-                * 'Packages':
-                *   data contains the list of packages
-                *   as non termiated UTF16 strings with
-                *   a UTF16 NULL byte as separator
-                *
-                * 'Primary:Kerberos-Newer-Keys':
-                *    ...
-                *
-                * 'Primary:Kerberos':
-                *    ...
-                *
-                * 'Primary:WDigest':
-                *    ...
-                *
-                * 'Primary:CLEARTEXT':
-                *    data contains the cleartext password
-                *    as UTF16 string encoded as HEX string
-                */
-               [charset(DOS)] uint8 data[data_len];
-       } supplementalCredentialsPackage;
-
-       /* this are 0x30 (48) whitespaces (0x20) */
-       const string SUPPLEMENTAL_CREDENTIALS_PREFIX = "                                                ";
-
-       typedef [flag(NDR_PAHEX)] enum {
-               SUPPLEMENTAL_CREDENTIALS_SIGNATURE = 0x0050
-       } supplementalCredentialsSignature;
-
-       typedef [gensize] struct {
-               [value(SUPPLEMENTAL_CREDENTIALS_PREFIX),charset(UTF16)] uint16 prefix[0x30];
-               [value(SUPPLEMENTAL_CREDENTIALS_SIGNATURE)] supplementalCredentialsSignature signature;
-               uint16 num_packages;
-               supplementalCredentialsPackage packages[num_packages];
-       } supplementalCredentialsSubBlob;
-
-       typedef [public] struct {
-               [value(0)] uint32 unknown1;
-               [value(ndr_size_supplementalCredentialsSubBlob(&sub, ndr->flags))] uint32 __ndr_size;
-               [value(0)] uint32 unknown2;
-               [subcontext(0),subcontext_size(__ndr_size)] supplementalCredentialsSubBlob sub;
-               [value(0)] uint8 unknown3;
-       } supplementalCredentialsBlob;
-
-       void decode_supplementalCredentials(
-               [in] supplementalCredentialsBlob blob
-               );
-
-       typedef [public] struct {
-               [flag(STR_NOTERM|NDR_REMAINING)] string_array names;
-       } package_PackagesBlob;
-
-       void decode_Packages(
-               [in] package_PackagesBlob blob
-               );
-
-       typedef struct {
-               [value(2*strlen_m(string))] uint16 length;
-               [value(2*strlen_m(string))] uint16 size;
-               [relative,subcontext(0),subcontext_size(size),flag(STR_NOTERM|NDR_REMAINING)] string *string;
-       } package_PrimaryKerberosString;
-
-       typedef struct {
-               [value(0)] uint16 reserved1;
-               [value(0)] uint16 reserved2;
-               [value(0)] uint32 reserved3;
-               uint32 keytype;
-               [value((value?value->length:0))] uint32 value_len;
-               [relative,subcontext(0),subcontext_size(value_len),flag(NDR_REMAINING)] DATA_BLOB *value;
-       } package_PrimaryKerberosKey3;
-
-       typedef struct {
-               uint16 num_keys;
-               uint16 num_old_keys;
-               package_PrimaryKerberosString salt;
-               package_PrimaryKerberosKey3 keys[num_keys];
-               package_PrimaryKerberosKey3 old_keys[num_old_keys];
-               [value(0)] uint32 padding1;
-               [value(0)] uint32 padding2;
-               [value(0)] uint32 padding3;
-               [value(0)] uint32 padding4;
-               [value(0)] uint32 padding5;
-       } package_PrimaryKerberosCtr3;
-
-       typedef struct {
-               [value(0)] uint16 reserved1;
-               [value(0)] uint16 reserved2;
-               [value(0)] uint32 reserved3;
-               uint32 iteration_count;
-               uint32 keytype;
-               [value((value?value->length:0))] uint32 value_len;
-               [relative,subcontext(0),subcontext_size(value_len),flag(NDR_REMAINING)] DATA_BLOB *value;
-       } package_PrimaryKerberosKey4;
-
-       typedef struct {
-               uint16 num_keys;
-               [value(0)] uint16 num_service_keys;
-               uint16 num_old_keys;
-               uint16 num_older_keys;
-               package_PrimaryKerberosString salt;
-               uint32 default_iteration_count;
-               package_PrimaryKerberosKey4 keys[num_keys];
-               package_PrimaryKerberosKey4 service_keys[num_service_keys];
-               package_PrimaryKerberosKey4 old_keys[num_old_keys];
-               package_PrimaryKerberosKey4 older_keys[num_older_keys];
-       } package_PrimaryKerberosCtr4;
-
-       typedef [nodiscriminant] union {
-               [case(3)] package_PrimaryKerberosCtr3 ctr3;
-               [case(4)] package_PrimaryKerberosCtr4 ctr4;
-       } package_PrimaryKerberosCtr;
-
-       typedef [public] struct {
-               uint16 version;
-               [value(0)] uint16 flags;
-               [switch_is(version)] package_PrimaryKerberosCtr ctr;
-       } package_PrimaryKerberosBlob;
-
-       void decode_PrimaryKerberos(
-               [in] package_PrimaryKerberosBlob blob
-               );
-
-       typedef [public] struct {
-               [flag(STR_NOTERM|NDR_REMAINING)] string cleartext;
-       } package_PrimaryCLEARTEXTBlob;
-
-       void decode_PrimaryCLEARTEXT(
-               [in] package_PrimaryCLEARTEXTBlob blob
-               );
-
-       typedef [flag(NDR_PAHEX)] struct {
-               uint8 hash[16];
-       } package_PrimaryWDigestHash;
-
-       typedef [public] struct {
-               [value(0x31)] uint16 unknown1;
-               [value(0x01)] uint8  unknown2;
-               uint8  num_hashes;
-               [value(0)] uint32 unknown3;
-               [value(0)] udlong uuknown4;
-               package_PrimaryWDigestHash hashes[num_hashes];
-       } package_PrimaryWDigestBlob;
-
-       void decode_PrimaryWDigest(
-               [in] package_PrimaryWDigestBlob blob
-               );
-
-       typedef struct {
-               NTTIME time1;
-               uint32 unknown1;
-               /*
-                * the secret value is encoded as UTF16 if it's a string
-                * but krb5 trusts have random bytes here, so converting to UTF16
-                * mayfail...
-                *
-                * TODO: We should try handle the case of a random buffer in all places
-                *       we deal with cleartext passwords from windows
-                *
-                * so we don't use this:
-                *
-                * uint32 value_len;
-                * [charset(UTF16)] uint8 value[value_len];
-                */
-               DATA_BLOB value;
-               [flag(NDR_ALIGN4)] DATA_BLOB _pad;
-       } trustAuthInOutSecret1;
-
-       typedef struct {
-               [relative] trustAuthInOutSecret1 *value1;
-               [relative] trustAuthInOutSecret1 *value2;
-       } trustAuthInOutCtr1;
-
-       typedef struct {
-               NTTIME time1;
-               uint32 unknown1;
-               DATA_BLOB value;
-               NTTIME time2;
-               uint32 unknown2;
-               uint32 unknown3;
-               uint32 unknown4;
-               [flag(NDR_ALIGN4)] DATA_BLOB _pad;
-       } trustAuthInOutSecret2V1;
-
-       typedef struct {
-               NTTIME time1;
-               uint32 unknown1;
-               DATA_BLOB value;
-               NTTIME time2;
-               uint32 unknown2;
-               uint32 unknown3;
-               [flag(NDR_ALIGN4)] DATA_BLOB _pad;
-       } trustAuthInOutSecret2V2;
-
-       typedef struct {
-               [relative] trustAuthInOutSecret2V1 *value1;
-               [relative] trustAuthInOutSecret2V2 *value2;
-       } trustAuthInOutCtr2;
-
-       typedef [nodiscriminant] union {
-               [case(1)] trustAuthInOutCtr1 ctr1;
-               [case(2)] trustAuthInOutCtr2 ctr2;
-       } trustAuthInOutCtr;
-
-       typedef [public] struct {
-               uint32 version;
-               [switch_is(version)] trustAuthInOutCtr ctr;
-       } trustAuthInOutBlob;
-
-       void decode_trustAuthInOut(
-               [in] trustAuthInOutBlob blob
-               );
-
-       typedef [public] struct {
-               uint32 marker;
-               DATA_BLOB data;
-       } DsCompressedChunk;
-
-       typedef [public] struct {
-               DsCompressedChunk chunks[5];
-       } DsCompressedBlob;
-
-       void decode_DsCompressed(
-               [in] DsCompressedBlob blob
-               );
-}
diff --git a/source3/librpc/idl/epmapper.idl b/source3/librpc/idl/epmapper.idl
deleted file mode 100644 (file)
index 2cbe3e1..0000000
+++ /dev/null
@@ -1,305 +0,0 @@
-#include "idl_types.h"
-
-/*
-  endpoint mapper interface
-  Related links:
-       http://www.opengroup.org/onlinepubs/9629399/apdxo.htm : The official IDL for this pipe
-       http://www.opengroup.org/onlinepubs/9629399/apdxl.htm : Details on towers
-http://www.opengroup.org/onlinepubs/9629399/chap6.htm#tagcjh_11_02_03_01: binding strings
-
-*/
-
-import "misc.idl";
-
-[
- uuid("e1af8308-5d1f-11c9-91a4-08002b14a0fa"), 
- version(3.0), 
- endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]", 
-                 "ncalrpc:[EPMAPPER]"),
- helpstring("EndPoint Mapper"),
- pointer_default(ptr)
-]
-interface epmapper
-{
-
-       /*
-         note that the following IDL won't work in MIDL, and in fact
-         that the full towers/floors representation of epm cannot be
-         represented in MIDL at all. I decided to represent it using
-         the extended IDL syntax in pidl to make it easier to work
-         with.
-       */
-
-       const int EPMAPPER_STATUS_NO_MORE_ENTRIES = 0x16c9a0d6;
-       const int EPMAPPER_STATUS_NO_MEMORY = 0x16C9A012;
-       const int EPMAPPER_STATUS_OK = 0;
-
-
-
-       typedef [enum8bit] enum {
-               
-               /* Level 4 and higher */
-               EPM_PROTOCOL_DNET_NSP           = 0x04,
-               EPM_PROTOCOL_OSI_TP4            = 0x05,
-               EPM_PROTOCOL_OSI_CLNS           = 0x06,
-               EPM_PROTOCOL_TCP                = 0x07,
-               EPM_PROTOCOL_UDP                = 0x08,
-               EPM_PROTOCOL_IP                 = 0x09,
-               /* These 4 are protocol identifiers, always at level 3 or lower */
-               EPM_PROTOCOL_NCADG                      = 0x0a, /* Connectionless RPC */
-               EPM_PROTOCOL_NCACN                      = 0x0b,
-               EPM_PROTOCOL_NCALRPC            = 0x0c, /* Local RPC */
-               EPM_PROTOCOL_UUID                       = 0x0d,
-               EPM_PROTOCOL_IPX                        = 0x0e,
-               EPM_PROTOCOL_SMB                = 0x0f,
-               EPM_PROTOCOL_PIPE               = 0x10,
-               EPM_PROTOCOL_NETBIOS            = 0x11,
-               EPM_PROTOCOL_NETBEUI            = 0x12,
-               EPM_PROTOCOL_SPX                = 0x13,
-               EPM_PROTOCOL_NB_IPX             = 0x14, /* NetBIOS over IPX */
-               EPM_PROTOCOL_DSP                        = 0x16, /* AppleTalk Data Stream Protocol */
-               EPM_PROTOCOL_DDP                    = 0x17, /* AppleTalk Data Datagram Protocol */
-               EPM_PROTOCOL_APPLETALK          = 0x18, /* AppleTalk */
-               EPM_PROTOCOL_VINES_SPP          = 0x1a, 
-               EPM_PROTOCOL_VINES_IPC          = 0x1b, /* Inter Process Communication */
-               EPM_PROTOCOL_STREETTALK         = 0x1c, /* Vines Streettalk */
-               EPM_PROTOCOL_HTTP               = 0x1f,
-               EPM_PROTOCOL_UNIX_DS            = 0x20, /* Unix domain socket */
-               EPM_PROTOCOL_NULL                       = 0x21
-       } epm_protocol;
-
-       typedef struct {
-               /*FIXME */
-       } epm_rhs_dnet_nsp;
-
-       typedef struct {
-               /*FIXME*/
-       } epm_rhs_osi_tp4;
-
-       typedef struct {
-               /*FIXME*/
-       } epm_rhs_osi_clns;
-       
-       typedef struct {
-               uint16 port;
-       } epm_rhs_udp;
-
-       typedef struct {
-               uint16 port;
-       } epm_rhs_tcp;
-
-       typedef struct {
-               ipv4address ipaddr;
-       } epm_rhs_ip;
-
-       typedef struct {
-               uint16 minor_version;
-       } epm_rhs_ncadg;
-
-       typedef struct {
-               uint16 minor_version;
-       } epm_rhs_ncacn;
-
-       typedef struct {
-               [flag(NDR_REMAINING)] DATA_BLOB unknown;
-       } epm_rhs_uuid;
-
-       typedef struct {
-               /*FIXME */
-       } epm_rhs_ipx;
-
-       typedef struct {
-               astring unc;
-       } epm_rhs_smb;
-
-       typedef struct {
-               astring path;   
-       } epm_rhs_pipe;
-
-       typedef struct {
-               astring name;
-       } epm_rhs_netbios;
-
-       typedef struct {
-       } epm_rhs_netbeui;
-
-       typedef struct {
-       } epm_rhs_spx;
-
-       typedef struct {
-       } epm_rhs_nb_ipx;
-
-       typedef struct {
-               uint16 port;
-       } epm_rhs_http;
-
-       typedef struct {
-               astring path;
-       } epm_rhs_unix_ds;
-
-       typedef struct {
-       } epm_rhs_null;
-
-       typedef struct {
-               uint16 minor_version;
-       } epm_rhs_ncalrpc;
-
-       typedef struct {
-       } epm_rhs_appletalk;
-
-       typedef struct {
-       } epm_rhs_atalk_stream;
-
-       typedef struct {
-       } epm_rhs_atalk_datagram;
-
-       typedef struct {
-               uint16 port;
-       } epm_rhs_vines_spp;
-
-       typedef struct {
-               uint16 port;
-       } epm_rhs_vines_ipc;
-
-       typedef struct {
-               astring streettalk;
-       } epm_rhs_streettalk;
-
-       typedef [flag(NDR_BIG_ENDIAN),nodiscriminant] union {
-               [case(EPM_PROTOCOL_DNET_NSP)] epm_rhs_dnet_nsp dnet_nsp;
-               [case(EPM_PROTOCOL_OSI_TP4)] epm_rhs_osi_tp4 osi_tp4;
-               [case(EPM_PROTOCOL_OSI_CLNS)] epm_rhs_osi_clns osi_clns;
-               [case(EPM_PROTOCOL_TCP)] epm_rhs_tcp tcp;
-               [case(EPM_PROTOCOL_UDP)] epm_rhs_udp udp;
-               [case(EPM_PROTOCOL_IP)] epm_rhs_ip ip;
-               [case(EPM_PROTOCOL_NCADG)] epm_rhs_ncadg ncadg;
-               [case(EPM_PROTOCOL_NCACN)] epm_rhs_ncacn ncacn;
-               [case(EPM_PROTOCOL_NCALRPC)] epm_rhs_ncalrpc ncalrpc;
-               [case(EPM_PROTOCOL_UUID)] epm_rhs_uuid uuid;
-               [case(EPM_PROTOCOL_IPX)] epm_rhs_ipx ipx;
-               [case(EPM_PROTOCOL_SMB)] epm_rhs_smb smb;
-               [case(EPM_PROTOCOL_PIPE)] epm_rhs_pipe pipe;
-               [case(EPM_PROTOCOL_NETBIOS)] epm_rhs_netbios netbios;
-               [case(EPM_PROTOCOL_NETBEUI)] epm_rhs_netbeui netbeui;
-               [case(EPM_PROTOCOL_SPX)] epm_rhs_spx spx;
-               [case(EPM_PROTOCOL_NB_IPX)] epm_rhs_nb_ipx nb_ipx;
-               [case(EPM_PROTOCOL_DSP)] epm_rhs_atalk_stream atalk_stream;
-               [case(EPM_PROTOCOL_DDP)] epm_rhs_atalk_datagram atalk_datagram;
-               [case(EPM_PROTOCOL_APPLETALK)] epm_rhs_appletalk appletalk;
-               [case(EPM_PROTOCOL_VINES_SPP)] epm_rhs_vines_spp vines_spp;
-               [case(EPM_PROTOCOL_VINES_IPC)] epm_rhs_vines_ipc vines_ipc;
-               [case(EPM_PROTOCOL_STREETTALK)] epm_rhs_streettalk streettalk;
-               [case(EPM_PROTOCOL_HTTP)] epm_rhs_http http;
-               [case(EPM_PROTOCOL_UNIX_DS)] epm_rhs_unix_ds unix_ds;
-               [case(EPM_PROTOCOL_NULL)] epm_rhs_null null;
-               [default]  [flag(NDR_REMAINING)] DATA_BLOB unknown;
-       } epm_rhs;
-
-       typedef struct {
-               epm_protocol protocol;
-               [flag(NDR_REMAINING)] DATA_BLOB lhs_data;
-       } epm_lhs;
-
-       typedef struct {
-               [subcontext(2)] epm_lhs lhs;
-               [subcontext(2),switch_is(lhs.protocol)] epm_rhs rhs;
-       } epm_floor;
-
-       /* note that the NDR_NOALIGN flag is inherited by all nested
-          structures. All of the towers/floors stuff is
-          non-aligned. I wonder what sort of wicked substance these
-          guys were smoking?
-       */
-       typedef [gensize,flag(NDR_NOALIGN|NDR_LITTLE_ENDIAN)] struct {
-               uint16 num_floors;
-               epm_floor floors[num_floors];
-       } epm_tower;
-
-       typedef struct {
-               [value(ndr_size_epm_tower(&tower, ndr->flags))] uint32  tower_length;
-               [subcontext(4)] epm_tower tower;
-       } epm_twr_t;
-
-       typedef struct {
-               GUID        object;
-               epm_twr_t   *tower;
-               ascstr2     annotation;
-       } epm_entry_t;
-
-       typedef struct {
-               GUID                uuid;
-               uint16              vers_major;
-               uint16              vers_minor;
-       } rpc_if_id_t;
-    
-       /**********************/
-       /* Function 0x0       */
-       error_status_t epm_Insert(
-               [in]            uint32          num_ents,
-               [in,size_is(num_ents)]  epm_entry_t         entries[],
-               [in]            uint32          replace
-               );
-    
-       /**********************/
-       /* Function 0x1       */
-       error_status_t epm_Delete(
-               [in]            uint32          num_ents,
-               [in, size_is(num_ents)]  epm_entry_t entries[]
-               );
-    
-       /**********************/
-       /* Function 0x02      */
-       error_status_t epm_Lookup(
-               [in]            uint32          inquiry_type,
-               [in,ptr]       GUID            *object,
-               [in,ptr]       rpc_if_id_t     *interface_id,
-               [in]            uint32          vers_option,
-               [in,out]        policy_handle   *entry_handle,
-               [in]            uint32          max_ents,
-               [out]           uint32          *num_ents,
-               [out, length_is(*num_ents), size_is(max_ents)]  epm_entry_t entries[]
-               );
-
-
-       /**********************/
-       /* Function 0x03      */
-
-       typedef struct {
-               epm_twr_t *twr;
-       } epm_twr_p_t;
-
-       [public] error_status_t epm_Map(
-               [in,ptr]       GUID            *object,
-               [in,ptr]       epm_twr_t       *map_tower,
-               [in,out]        policy_handle   *entry_handle,
-               [in]            uint32          max_towers,
-               [out]           uint32          *num_towers,
-               [out, length_is(*num_towers), size_is(max_towers)]  epm_twr_p_t towers[]
-               );
-    
-
-       /**********************/
-       /* Function 0x04      */
-       error_status_t epm_LookupHandleFree(
-               [in,out]        policy_handle   *entry_handle
-               );
-    
-       /**********************/
-       /* Function 0x05      */
-       error_status_t epm_InqObject(
-               [in]            GUID            *epm_object
-               );
-    
-
-       /**********************/
-       /* Function 0x06      */
-       error_status_t epm_MgmtDelete(
-               [in]            uint32          object_speced,
-               [in,ptr]       GUID            *object,
-               [in,ptr]       epm_twr_t       *tower
-               );
-
-       /**********************/
-       /* Function 0x07      */
-       [todo] error_status_t epm_MapAuth();
-}
diff --git a/source3/librpc/idl/idl_types.h b/source3/librpc/idl/idl_types.h
deleted file mode 100644 (file)
index f21f3e6..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-#define STR_ASCII      LIBNDR_FLAG_STR_ASCII
-#define STR_LEN4       LIBNDR_FLAG_STR_LEN4
-#define STR_SIZE4      LIBNDR_FLAG_STR_SIZE4
-#define STR_SIZE2      LIBNDR_FLAG_STR_SIZE2
-#define STR_NOTERM     LIBNDR_FLAG_STR_NOTERM
-#define STR_NULLTERM   LIBNDR_FLAG_STR_NULLTERM
-#define STR_BYTESIZE   LIBNDR_FLAG_STR_BYTESIZE
-#define STR_FIXLEN32   LIBNDR_FLAG_STR_FIXLEN32
-#define STR_FIXLEN15   LIBNDR_FLAG_STR_FIXLEN15
-#define STR_CONFORMANT  LIBNDR_FLAG_STR_CONFORMANT
-#define STR_CHARLEN    LIBNDR_FLAG_STR_CHARLEN
-#define STR_UTF8       LIBNDR_FLAG_STR_UTF8
-
-/*
-  a UCS2 string prefixed with [size], 32 bits
-*/
-#define lstring                [flag(STR_SIZE4)] string
-
-/*
-  a null terminated UCS2 string
-*/
-#define nstring                [flag(STR_NULLTERM)] string
-
-/*
-  fixed length 32 character UCS-2 string
-*/
-#define string32       [flag(STR_FIXLEN32)] string
-
-/*
-  fixed length 16 character ascii string
-*/
-#define astring15       [flag(STR_ASCII|STR_FIXLEN15)] string
-
-/*
-  an ascii string prefixed with [offset] [length], both 32 bits
-  null terminated
-*/
-#define ascstr2                [flag(STR_ASCII|STR_LEN4)] string
-
-/*
-  an ascii string prefixed with [size], 32 bits
-*/
-#define asclstr                [flag(STR_ASCII|STR_SIZE4)] string
-
-/*
-  an ascii string prefixed with [size], 16 bits
-  null terminated
-*/
-#define ascstr3                [flag(STR_ASCII|STR_SIZE2)] string
-
-/*
-  an ascii string prefixed with [size] [offset] [length], all 32 bits
-  not null terminated
-*/
-#define ascstr_noterm  [flag(STR_NOTERM|STR_ASCII|STR_SIZE4|STR_LEN4)] string
-
-/*
-  a null terminated ascii string
-*/
-#define astring                [flag(STR_ASCII|STR_NULLTERM)] string
-
-/*
-  a null terminated UTF8 string
-*/
-#define utf8string     [flag(STR_UTF8|STR_NULLTERM)] string
-
-/*
-  a null terminated UCS2 string
-*/
-#define nstring_array  [flag(STR_NULLTERM)] string_array
-
-#define NDR_NOALIGN       LIBNDR_FLAG_NOALIGN
-#define NDR_REMAINING     LIBNDR_FLAG_REMAINING
-#define NDR_ALIGN2        LIBNDR_FLAG_ALIGN2
-#define NDR_ALIGN4        LIBNDR_FLAG_ALIGN4
-#define NDR_ALIGN8        LIBNDR_FLAG_ALIGN8
-
-/* this flag is used to force a section of IDL as little endian. It is
-   needed for the epmapper IDL, which is defined as always being LE */
-#define NDR_LITTLE_ENDIAN LIBNDR_FLAG_LITTLE_ENDIAN
-#define NDR_BIG_ENDIAN LIBNDR_FLAG_BIGENDIAN
-
-/*
-  this is used to control formatting of uint8 arrays
-*/
-#define NDR_PAHEX LIBNDR_PRINT_ARRAY_HEX
diff --git a/source3/librpc/idl/initshutdown.idl b/source3/librpc/idl/initshutdown.idl
deleted file mode 100644 (file)
index dfc5271..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#include "idl_types.h"
-
-/*
-  initshutdown interface definition
-*/
-
-import "lsa.idl";
-
-[ 
-  uuid("894de0c0-0d55-11d3-a322-00c04fa321a1"),
-  version(1.0),
-  endpoint("ncacn_np:[\\pipe\\InitShutdown]"),
-  pointer_default(unique),
-  helpstring("Init shutdown service")
-] interface initshutdown
-{
-       typedef struct {
-               [value(strlen_m_term(name))] uint32 name_size;
-               [flag(STR_LEN4|STR_NOTERM)] string name;
-       } initshutdown_String_sub;
-
-       typedef [public] struct {
-               [value(strlen_m(name->name)*2)] uint16 name_len;
-               [value(strlen_m_term(name->name)*2)] uint16 name_size;
-               initshutdown_String_sub *name;
-       } initshutdown_String;
-
-       WERROR initshutdown_Init(
-               [in,unique] uint16 *hostname,
-               [in,unique] initshutdown_String *message,
-               [in] uint32 timeout,
-               [in] uint8 force_apps,
-               [in] uint8 do_reboot
-       );
-
-       WERROR initshutdown_Abort(
-               [in,unique] uint16 *server
-       );
-
-       WERROR initshutdown_InitEx(
-               [in,unique] uint16 *hostname,
-               [in,unique] initshutdown_String *message,
-               [in] uint32 timeout,
-               [in] uint8 force_apps,
-               [in] uint8 do_reboot,
-               [in] uint32 reason
-       );
-}
index ff4aafa0bdfcf6813a19763acfd0cf73f98fbad4..98c27cb717340333808c1b961cd3c24320d97bdc 100644 (file)
@@ -14,6 +14,7 @@ import "misc.idl", "security.idl";
 ] interface lsarpc
 {
        typedef bitmap security_secinfo security_secinfo;
+       typedef bitmap kerb_EncTypes kerb_EncTypes;
 
        typedef [public,noejs] struct {
                [value(2*strlen_m(string))] uint16 length;
@@ -224,7 +225,7 @@ import "misc.idl", "security.idl";
 
        typedef struct {
                hyper modified_id;
-               NTTIME db_create_time;
+               NTTIME_hyper db_create_time;
        } lsa_ModificationInfo;
 
        typedef struct {
@@ -263,7 +264,8 @@ import "misc.idl", "security.idl";
                LSA_POLICY_INFO_DB=9,
                LSA_POLICY_INFO_AUDIT_FULL_SET=10,
                LSA_POLICY_INFO_AUDIT_FULL_QUERY=11,
-               LSA_POLICY_INFO_DNS=12
+               LSA_POLICY_INFO_DNS=12,
+               LSA_POLICY_INFO_DNS_INT=13
        } lsa_PolicyInfo;
 
        typedef [switch_type(uint16)] union {
@@ -279,6 +281,7 @@ import "misc.idl", "security.idl";
                [case(LSA_POLICY_INFO_AUDIT_FULL_SET)]   lsa_AuditFullSetInfo   auditfullset;
                [case(LSA_POLICY_INFO_AUDIT_FULL_QUERY)] lsa_AuditFullQueryInfo auditfullquery;
                [case(LSA_POLICY_INFO_DNS)]              lsa_DnsDomainInfo      dns;
+               [case(LSA_POLICY_INFO_DNS_INT)]          lsa_DnsDomainInfo      dns;
        } lsa_PolicyInformation;
 
        NTSTATUS lsa_QueryInfoPolicy(
@@ -409,7 +412,8 @@ import "misc.idl", "security.idl";
                LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY = 3,
                LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY = 4,
                LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY = 5,
-               LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2 = 6
+               LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2 = 6,
+               LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC = 7
        } lsa_LookupNamesLevel;
 
        [public] NTSTATUS lsa_LookupNames (
@@ -543,22 +547,53 @@ import "misc.idl", "security.idl";
        } lsa_DATA_BUF2;
 
        typedef enum {
-               LSA_TRUSTED_DOMAIN_INFO_NAME             = 1,
-               LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS_INFO = 2,
-               LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET     = 3,
-               LSA_TRUSTED_DOMAIN_INFO_PASSWORD         = 4,
-               LSA_TRUSTED_DOMAIN_INFO_BASIC            = 5,
-               LSA_TRUSTED_DOMAIN_INFO_INFO_EX          = 6,
-               LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO        = 7,
-               LSA_TRUSTED_DOMAIN_INFO_FULL_INFO        = 8,
-               LSA_TRUSTED_DOMAIN_INFO_11               = 11,
-               LSA_TRUSTED_DOMAIN_INFO_INFO_ALL         = 12
+               LSA_TRUSTED_DOMAIN_INFO_NAME                  = 1,
+               LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS           = 2,
+               LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET          = 3,
+               LSA_TRUSTED_DOMAIN_INFO_PASSWORD              = 4,
+               LSA_TRUSTED_DOMAIN_INFO_BASIC                 = 5,
+               LSA_TRUSTED_DOMAIN_INFO_INFO_EX               = 6,
+               LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO             = 7,
+               LSA_TRUSTED_DOMAIN_INFO_FULL_INFO             = 8,
+               LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL    = 9,
+               LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL    = 10,
+               LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL     = 11,
+               LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL  = 12,
+               LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES = 13
        } lsa_TrustDomInfoEnum;
 
+       typedef [public,bitmap32bit] bitmap {
+               LSA_TRUST_DIRECTION_INBOUND  = 0x00000001,
+               LSA_TRUST_DIRECTION_OUTBOUND = 0x00000002
+       } lsa_TrustDirection;
+
+       typedef [v1_enum] enum {
+               LSA_TRUST_TYPE_DOWNLEVEL  = 0x00000001,
+               LSA_TRUST_TYPE_UPLEVEL    = 0x00000002,
+               LSA_TRUST_TYPE_MIT        = 0x00000003
+       } lsa_TrustType;
+
+       typedef [public,bitmap32bit] bitmap {
+               LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE      = 0x00000001,
+               LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY        = 0x00000002,
+               LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN  = 0x00000004,
+               LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE   = 0x00000008,
+               LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION  = 0x00000010,
+               LSA_TRUST_ATTRIBUTE_WITHIN_FOREST       = 0x00000020,
+               LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL   = 0x00000040,
+               LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION = 0x00000080
+       } lsa_TrustAttributes;
+
        typedef struct {
                lsa_StringLarge  netbios_name;
        } lsa_TrustDomainInfoName;
 
+
+       typedef struct {
+               uint32 entries;
+               [size_is(entries)] lsa_StringLarge  *netbios_names;
+       } lsa_TrustDomainInfoControllers;
+
        typedef struct {
                uint32         posix_offset;
        } lsa_TrustDomainInfoPosixOffset;
@@ -576,15 +611,22 @@ import "misc.idl", "security.idl";
        typedef struct {
                lsa_StringLarge     domain_name;
                lsa_StringLarge     netbios_name;
-               dom_sid2      *sid;
-               uint32         trust_direction;
-               uint32         trust_type;
-               uint32         trust_attributes;
+               dom_sid2           *sid;
+               lsa_TrustDirection  trust_direction;
+               lsa_TrustType       trust_type;
+               lsa_TrustAttributes trust_attributes;
        } lsa_TrustDomainInfoInfoEx;
 
+       typedef [public,v1_enum] enum {
+               TRUST_AUTH_TYPE_NONE = 0,
+               TRUST_AUTH_TYPE_NT4OWF = 1,
+               TRUST_AUTH_TYPE_CLEAR = 2,
+               TRUST_AUTH_TYPE_VERSION = 3
+       } lsa_TrustAuthType;
+
        typedef struct {
                NTTIME_hyper   last_update_time;
-               uint32         secret_type;
+               lsa_TrustAuthType AuthType;
                lsa_DATA_BUF2  data;
        } lsa_TrustDomainInfoBuffer;
 
@@ -604,27 +646,58 @@ import "misc.idl", "security.idl";
        } lsa_TrustDomainInfoFullInfo;
 
        typedef struct {
-               lsa_TrustDomainInfoInfoEx      info_ex;
-               lsa_DATA_BUF2                  data1;
-       } lsa_TrustDomainInfo11;
+               lsa_DATA_BUF2                          auth_blob;
+       } lsa_TrustDomainInfoAuthInfoInternal;
+
+       typedef struct {
+               lsa_TrustDomainInfoInfoEx              info_ex;
+               lsa_TrustDomainInfoPosixOffset         posix_offset;
+               lsa_TrustDomainInfoAuthInfoInternal    auth_info;
+       } lsa_TrustDomainInfoFullInfoInternal;
 
        typedef struct {
                lsa_TrustDomainInfoInfoEx      info_ex;
-               lsa_DATA_BUF2                  data1;
+               uint32 forest_trust_length;
+               [size_is(forest_trust_length)] uint8 *forest_trust_data;
+       } lsa_TrustDomainInfoInfoEx2Internal;
+
+       typedef struct {
+               lsa_TrustDomainInfoInfoEx2Internal     info;
                lsa_TrustDomainInfoPosixOffset posix_offset;
                lsa_TrustDomainInfoAuthInfo    auth_info;
-       } lsa_TrustDomainInfoInfoAll;
+       } lsa_TrustDomainInfoFullInfo2Internal;
+
+       typedef struct {
+               kerb_EncTypes enc_types;
+       } lsa_TrustDomainInfoSupportedEncTypes;
 
        typedef [switch_type(lsa_TrustDomInfoEnum)] union {
-               [case(LSA_TRUSTED_DOMAIN_INFO_NAME)]         lsa_TrustDomainInfoName        name;
-               [case(LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET)] lsa_TrustDomainInfoPosixOffset posix_offset;
-               [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD)]     lsa_TrustDomainInfoPassword    password;
-               [case(LSA_TRUSTED_DOMAIN_INFO_BASIC)]        lsa_TrustDomainInfoBasic       info_basic;
-               [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX)]      lsa_TrustDomainInfoInfoEx      info_ex;
-               [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO)]    lsa_TrustDomainInfoAuthInfo    auth_info;
-               [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO)]    lsa_TrustDomainInfoFullInfo    full_info;
-               [case(LSA_TRUSTED_DOMAIN_INFO_11)]           lsa_TrustDomainInfo11          info11;
-               [case(LSA_TRUSTED_DOMAIN_INFO_INFO_ALL)]     lsa_TrustDomainInfoInfoAll     info_all;
+               [case(LSA_TRUSTED_DOMAIN_INFO_NAME)]
+                       lsa_TrustDomainInfoName              name;
+               [case(LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS)]
+                       lsa_TrustDomainInfoControllers   controllers;
+               [case(LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET)]
+                       lsa_TrustDomainInfoPosixOffset       posix_offset;
+               [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD)]
+                       lsa_TrustDomainInfoPassword          password;
+               [case(LSA_TRUSTED_DOMAIN_INFO_BASIC)]
+                       lsa_TrustDomainInfoBasic             info_basic;
+               [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX)]
+                       lsa_TrustDomainInfoInfoEx            info_ex;
+               [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO)]
+                       lsa_TrustDomainInfoAuthInfo          auth_info;
+               [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO)]
+                       lsa_TrustDomainInfoFullInfo          full_info;
+               [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL)]
+                       lsa_TrustDomainInfoAuthInfoInternal  auth_info_internal;
+               [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL)]
+                       lsa_TrustDomainInfoFullInfoInternal  full_info_internal;
+               [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL)]
+                       lsa_TrustDomainInfoInfoEx2Internal   info_ex2_internal;
+               [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL)]
+                       lsa_TrustDomainInfoFullInfo2Internal     full_info2_internal;
+               [case(LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES)]
+                       lsa_TrustDomainInfoSupportedEncTypes enc_types;
        } lsa_TrustedDomainInfo;
 
        /* Function:       0x1a */
@@ -635,7 +708,11 @@ import "misc.idl", "security.idl";
                );
 
        /* Function:     0x1b */
-       NTSTATUS lsa_SetInformationTrustedDomain();
+       NTSTATUS lsa_SetInformationTrustedDomain(
+               [in]                  policy_handle         *trustdom_handle,
+               [in]                  lsa_TrustDomInfoEnum   level,
+               [in,switch_is(level)] lsa_TrustedDomainInfo *info
+               );
 
        /* Function:          0x1c */
        [public] NTSTATUS lsa_OpenSecret(
@@ -696,10 +773,11 @@ import "misc.idl", "security.idl";
                );
 
        /* Function:        0x22 */
-       NTSTATUS lsa_DeleteObject(
-               [in,out] policy_handle *handle
+       NTSTATUS lsa_DeleteObject (
+               [in,out]     policy_handle *handle
                );
 
+
        /*******************/
        /* Function:      0x23 */
        NTSTATUS lsa_EnumAccountsWithUserRight (
@@ -732,7 +810,7 @@ import "misc.idl", "security.idl";
                [in,ref] dom_sid2 *sid,
                [in,ref] lsa_RightSet *rights
                );
-       
+
        /**********************/
        /* Function:       0x26 */
        NTSTATUS lsa_RemoveAccountRights (
@@ -751,7 +829,13 @@ import "misc.idl", "security.idl";
         );
 
        /* Function:     0x28 */
-       NTSTATUS lsa_SetTrustedDomainInfo();
+       NTSTATUS lsa_SetTrustedDomainInfo(
+               [in]               policy_handle         *handle,
+               [in]               dom_sid2              *dom_sid,
+               [in]                   lsa_TrustDomInfoEnum  level,
+               [in,switch_is(level)] lsa_TrustedDomainInfo *info
+        );
+
        /* Function:      0x29 */
        NTSTATUS lsa_DeleteTrustedDomain(
                [in]               policy_handle         *handle,
@@ -832,9 +916,15 @@ import "misc.idl", "security.idl";
                [in]               uint32 max_size
                );
 
-
        /* Function 0x33 */
-       NTSTATUS lsa_CreateTrustedDomainEx();
+       NTSTATUS lsa_CreateTrustedDomainEx(
+               [in]  policy_handle               *policy_handle,
+               [in]  lsa_TrustDomainInfoInfoEx   *info,
+               [in]  lsa_TrustDomainInfoAuthInfoInternal *auth_info,
+               [in]  uint32 access_mask,
+               [out] policy_handle               *trustdom_handle
+               );
+
 
        /* Function 0x34 */
        NTSTATUS lsa_CloseTrustedDomainEx(
@@ -943,12 +1033,18 @@ import "misc.idl", "security.idl";
                [in,out,ref] lsa_TransSidArray2 *sids,
                [in]         lsa_LookupNamesLevel level,
                [in,out,ref] uint32 *count,
-               [in]         uint32 unknown1,
-               [in]         uint32 unknown2
+               [in]         uint32 lookup_options,
+               [in]         uint32 client_revision /* LSA_CLIENT_REVISION* */
                );
 
        /* Function 0x3b */
-       NTSTATUS lsa_CreateTrustedDomainEx2();
+       NTSTATUS lsa_CreateTrustedDomainEx2(
+               [in]  policy_handle               *policy_handle,
+               [in]  lsa_TrustDomainInfoInfoEx   *info,
+               [in]  lsa_TrustDomainInfoAuthInfoInternal *auth_info,
+               [in]  uint32                       access_mask,
+               [out] policy_handle               *trustdom_handle
+               );
 
        /* Function 0x3c */
        [todo] NTSTATUS lsa_CREDRWRITE();
@@ -980,7 +1076,7 @@ import "misc.idl", "security.idl";
                lsa_SidType sid_type;
                dom_sid2 *sid;
                uint32 sid_index;
-               uint32 unknown;
+               uint32 flags;
        } lsa_TranslatedSid3;
 
        typedef struct {
@@ -996,8 +1092,8 @@ import "misc.idl", "security.idl";
                [in,out,ref] lsa_TransSidArray3 *sids,
                [in]         lsa_LookupNamesLevel level,
                [in,out,ref] uint32 *count,
-               [in]         uint32 unknown1,
-               [in]         uint32 unknown2
+               [in]         uint32 lookup_options,
+               [in]         uint32 client_revision /* LSA_CLIENT_REVISION* */
                );
 
        /* Function 0x45 */
@@ -1076,6 +1172,11 @@ import "misc.idl", "security.idl";
                [in]         uint32 unknown2
                );
 
+       const int LSA_CLIENT_REVISION_NO_DNS     = 0x00000001;
+       const int LSA_CLIENT_REVISION_DNS        = 0x00000002;
+
+       const int LSA_LOOKUP_OPTIONS_NO_ISOLATED = 0x80000000;
+
        /* Function 0x4d */
        NTSTATUS lsa_LookupNames4(
                [in,range(0,1000)] uint32 num_names,
@@ -1084,8 +1185,8 @@ import "misc.idl", "security.idl";
                [in,out,ref] lsa_TransSidArray3 *sids,
                [in]         lsa_LookupNamesLevel level,
                [in,out,ref] uint32 *count,
-               [in]         uint32 unknown1,
-               [in]         uint32 unknown2
+               [in]         uint32 lookup_options,
+               [in]         uint32 client_revision /* LSA_CLIENT_REVISION* */
                );
 
        /* Function 0x4e */
diff --git a/source3/librpc/idl/misc.idl b/source3/librpc/idl/misc.idl
deleted file mode 100644 (file)
index 132a81f..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-  miscellaneous IDL structures
-*/
-
-
-[
-       pointer_default(unique)
-]
-interface misc
-{
-       typedef [public,noprint,gensize,noejs] struct {
-               uint32 time_low;
-               uint16 time_mid;
-               uint16 time_hi_and_version;
-               uint8  clock_seq[2];
-               uint8  node[6];
-       } GUID;
-
-       typedef [public] struct {
-               GUID uuid;
-               uint32 if_version;
-       } ndr_syntax_id;
-
-       typedef [public] struct {
-               uint32 handle_type;
-               GUID   uuid;
-       } policy_handle;
-
-       /* secure channel types */
-       /* Only SEC_CHAN_WKSTA can forward requests to other domains. */
-
-       typedef [public] enum {
-               SEC_CHAN_WKSTA   = 2,
-               SEC_CHAN_DOMAIN  = 4,
-               SEC_CHAN_BDC     = 6
-       } netr_SchannelType;
-
-       /* SAM database types */
-       typedef [public,v1_enum] enum {
-               SAM_DATABASE_DOMAIN  = 0, /* Domain users and groups */
-               SAM_DATABASE_BUILTIN = 1, /* BUILTIN users and groups */
-               SAM_DATABASE_PRIVS   = 2 /* Privileges */
-       } netr_SamDatabaseID;
-
-       typedef [public,v1_enum] enum {
-               SAMR_REJECT_OTHER      = 0,
-               SAMR_REJECT_TOO_SHORT  = 1,
-               SAMR_REJECT_IN_HISTORY = 2,
-               SAMR_REJECT_COMPLEXITY = 5
-       } samr_RejectReason;
-}
index eaa4ed14daf9fff71c71133a201666ead59c6e37..b4e34a07ab33955180949723e333992905b428ce 100644 (file)
@@ -135,13 +135,32 @@ interface netlogon
                netr_ChallengeResponse lm;
        } netr_NetworkInfo;
 
-       typedef [public,switch_type(uint16)] union {
-               [case(1)] netr_PasswordInfo *password;
-               [case(2)] netr_NetworkInfo  *network;
-               [case(3)] netr_PasswordInfo *password;
-               [case(5)] netr_PasswordInfo *password;
-               [case(6)] netr_NetworkInfo  *network;
-       } netr_LogonInfo;
+       typedef [flag(NDR_PAHEX)] struct {
+               netr_IdentityInfo identity_info;
+               lsa_String  package_name;
+               uint32 length;
+               [size_is(length)] uint8 *data;
+       } netr_GenericInfo;
+
+       typedef enum {
+               NetlogonInteractiveInformation = 1,
+               NetlogonNetworkInformation = 2,
+               NetlogonServiceInformation = 3,
+               NetlogonGenericInformation = 4,
+               NetlogonInteractiveTransitiveInformation = 5,
+               NetlogonNetworkTransitiveInformation = 6,
+               NetlogonServiceTransitiveInformation = 7
+       } netr_LogonInfoClass;
+
+       typedef [public,switch_type(netr_LogonInfoClass)] union {
+               [case(NetlogonInteractiveInformation)]           netr_PasswordInfo *password;
+               [case(NetlogonNetworkInformation)]               netr_NetworkInfo  *network;
+               [case(NetlogonServiceInformation)]               netr_PasswordInfo *password;
+               [case(NetlogonGenericInformation)]               netr_GenericInfo  *generic;
+               [case(NetlogonInteractiveTransitiveInformation)] netr_PasswordInfo *password;
+               [case(NetlogonNetworkTransitiveInformation)]     netr_NetworkInfo  *network;
+               [case(NetlogonServiceTransitiveInformation)]     netr_PasswordInfo *password;
+       } netr_LogonLevel;
 
        typedef [public,flag(NDR_PAHEX)] struct {
                uint8 key[16];
@@ -234,12 +253,25 @@ interface netlogon
                lsa_String unknown4;
        } netr_PacInfo;
 
+       typedef [flag(NDR_PAHEX)] struct {
+               uint32 length;
+               [size_is(length)] uint8 *data;
+       } netr_GenericInfo2;
+
+       typedef enum {
+               NetlogonValidationUasInfo = 1,
+               NetlogonValidationSamInfo = 2,
+               NetlogonValidationSamInfo2 = 3,
+               NetlogonValidationGenericInfo2 = 5,
+               NetlogonValidationSamInfo4 = 6
+       } netr_ValidationInfoClass;
+
        typedef [public,switch_type(uint16)] union {
-               [case(2)] netr_SamInfo2 *sam2;
-               [case(3)] netr_SamInfo3 *sam3;
+               [case(NetlogonValidationSamInfo)] netr_SamInfo2 *sam2;
+               [case(NetlogonValidationSamInfo2)] netr_SamInfo3 *sam3;
                [case(4)] netr_PacInfo  *pac;
-               [case(5)] netr_PacInfo  *pac;
-               [case(6)] netr_SamInfo6 *sam6;
+               [case(NetlogonValidationGenericInfo2)] netr_GenericInfo2  *generic;
+               [case(NetlogonValidationSamInfo4)] netr_SamInfo6 *sam6;
        } netr_Validation;
 
        typedef [public, flag(NDR_PAHEX)] struct {
@@ -251,21 +283,16 @@ interface netlogon
                time_t timestamp;
        } netr_Authenticator;
 
-       typedef enum {
-               INTERACTIVE_LOGON_TYPE = 1,
-               NET_LOGON_TYPE = 2
-       } netr_LogonLevel;
-
        NTSTATUS netr_LogonSamLogon(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,unique] [string,charset(UTF16)] uint16 *computer_name,
-               [in,unique] netr_Authenticator *credential,
-               [in,out,unique] netr_Authenticator *return_authenticator,
-               [in]  netr_LogonLevel logon_level,
-               [in,ref]  [switch_is(logon_level)] netr_LogonInfo *logon,
-               [in]  uint16 validation_level,
+               [in,unique] [string,charset(UTF16)] uint16         *server_name,
+               [in,unique] [string,charset(UTF16)] uint16         *computer_name,
+               [in,unique] netr_Authenticator                     *credential,
+               [in,out,unique] netr_Authenticator                 *return_authenticator,
+               [in]  netr_LogonInfoClass                           logon_level,
+               [in,ref]  [switch_is(logon_level)] netr_LogonLevel *logon,
+               [in]  uint16                                        validation_level,
                [out,ref] [switch_is(validation_level)] netr_Validation *validation,
-               [out,ref] uint8 *authoritative
+               [out,ref] uint8                                    *authoritative
                );
 
 
@@ -277,8 +304,8 @@ interface netlogon
                [in,unique] [string,charset(UTF16)] uint16 *computer_name,
                [in,unique] netr_Authenticator *credential,
                [in,out,unique] netr_Authenticator *return_authenticator,
-               [in] netr_LogonLevel logon_level,
-               [in] [switch_is(logon_level)] netr_LogonInfo logon
+               [in] netr_LogonInfoClass logon_level,
+               [in] [switch_is(logon_level)] netr_LogonLevel logon
                );
        
 
@@ -423,7 +450,7 @@ interface netlogon
 
        typedef struct {
                lsa_String domain_name;
-               lsa_String comment;
+               lsa_String oem_information; /* comment */
                dlong force_logoff_time;
                uint16 min_password_length;
                uint16 password_history_length;
@@ -1111,6 +1138,16 @@ interface netlogon
 
        /****************/
        /* Function 0x1d */
+       typedef [bitmap32bit] bitmap {
+               NETR_TRUST_FLAG_IN_FOREST = 0x00000001,
+               NETR_TRUST_FLAG_OUTBOUND  = 0x00000002,
+               NETR_TRUST_FLAG_TREEROOT  = 0x00000004,
+               NETR_TRUST_FLAG_PRIMARY   = 0x00000008,
+               NETR_TRUST_FLAG_NATIVE    = 0x00000010,
+               NETR_TRUST_FLAG_INBOUND   = 0x00000020,
+               NETR_TRUST_FLAG_MIT_KRB5  = 0x00000080,
+               NETR_TRUST_FLAG_AES       = 0x00000100
+       } netr_TrustFlags;
 
        typedef [flag(NDR_PAHEX)] struct {
                uint16 length;
@@ -1138,26 +1175,61 @@ interface netlogon
                [case(2)] netr_DomainQuery1 *query1;
        } netr_DomainQuery;
 
+       typedef struct {
+               /* these first 3 values come from the fact windows
+                  actually encodes this structure as a UNICODE_STRING
+                  - see MS-NRPC section 2.2.1.3.9 */
+               [value(8)] uint32 length;
+               [value(0)] uint32 dummy;
+               [value(8)] uint32 size;
+               netr_TrustFlags flags;
+               uint32 parent_index;
+               uint32 trust_type;
+               uint32 trust_attributes;
+       } netr_trust_extension;
+
+       typedef struct {
+               uint16 length; /* value is 16 when info != NULL, otherwise 0 */
+               [value(length)] uint16 size;   /* value is 16 when info != NULL, otherwise 0 */
+               netr_trust_extension *info;
+       } netr_trust_extension_container;
+
        typedef struct {
                lsa_String domainname;
                lsa_String fulldomainname;
                lsa_String forest;
                GUID        guid;
                dom_sid2    *sid;
-               netr_BinaryString unknown1[4];
-               uint32      unknown[4];
+               netr_trust_extension_container trust_extension;
+               lsa_String dummystring[3];
+               uint32     dummy[4];
        } netr_DomainTrustInfo;
 
+       typedef struct {
+               uint32 policy_size;
+               [size_is(policy_size)] uint8 *policy;
+       } netr_LsaPolicyInfo;
+
+       typedef [public,bitmap32bit] bitmap {
+               NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS = 0x00000001,
+               NETR_WS_FLAG_HANDLES_SPN_UPDATE     = 0x00000002
+       } netr_WorkstationFlags;
+
        typedef struct {
                netr_DomainTrustInfo domaininfo;
                uint32 num_trusts;
                [size_is(num_trusts)] netr_DomainTrustInfo *trusts;
-               uint32 unknown[14]; /* room for expansion? */
+               netr_LsaPolicyInfo lsa_policy;
+               lsa_String dns_hostname;
+               lsa_String dummystring[3];
+               netr_WorkstationFlags workstation_flags;
+               uint32 supported_enc_types;
+               uint32 dummy[2];
        } netr_DomainInfo1;
 
        typedef union {
                [case(1)] netr_DomainInfo1 *info1;
-               [case(2)] netr_DomainInfo1 *info1;
+               [case(2)] netr_DomainInfo1 *info2;
        } netr_DomainInfo;
        
        NTSTATUS netr_LogonGetDomainInfo(
@@ -1241,15 +1313,6 @@ interface netlogon
 
        /****************/
        /* Function 0x24 */
-       typedef [bitmap32bit] bitmap {
-               NETR_TRUST_FLAG_IN_FOREST = 0x00000001,
-               NETR_TRUST_FLAG_OUTBOUND  = 0x00000002,
-               NETR_TRUST_FLAG_TREEROOT  = 0x00000004,
-               NETR_TRUST_FLAG_PRIMARY   = 0x00000008,
-               NETR_TRUST_FLAG_NATIVE    = 0x00000010,
-               NETR_TRUST_FLAG_INBOUND   = 0x00000020
-       } netr_TrustFlags;
-
        typedef [v1_enum] enum {
                NETR_TRUST_TYPE_DOWNLEVEL       = 1,
                NETR_TRUST_TYPE_UPLEVEL         = 2,
@@ -1321,8 +1384,8 @@ interface netlogon
        NTSTATUS netr_LogonSamLogonEx(
                [in,unique] [string,charset(UTF16)] uint16 *server_name,
                [in,unique] [string,charset(UTF16)] uint16 *computer_name,
-               [in]  netr_LogonLevel logon_level,
-               [in,ref]  [switch_is(logon_level)] netr_LogonInfo *logon,
+               [in]  netr_LogonInfoClass logon_level,
+               [in,ref]  [switch_is(logon_level)] netr_LogonLevel *logon,
                [in]  uint16 validation_level,
                [out,ref] [switch_is(validation_level)] netr_Validation *validation,
                [out,ref] uint8 *authoritative,
@@ -1394,8 +1457,8 @@ interface netlogon
                [in,unique] [string,charset(UTF16)] uint16 *computer_name,
                [in,unique] netr_Authenticator *credential,
                [in,out,unique] netr_Authenticator *return_authenticator,
-               [in]  netr_LogonLevel logon_level,
-               [in]  [switch_is(logon_level)] netr_LogonInfo logon,
+               [in]  netr_LogonInfoClass logon_level,
+               [in]  [switch_is(logon_level)] netr_LogonLevel logon,
                [in]  uint16 validation_level,
                [out,ref] [switch_is(validation_level)] netr_Validation *validation,
                [out,ref] uint8 *authoritative,
index e823d1d77b24d7e5726bb19fe1783a937e422a87..cd5fe0784546a73663a0a968c8daf9505bcfbfd0 100644 (file)
@@ -208,7 +208,7 @@ import "misc.idl", "lsa.idl", "security.idl";
 
        typedef struct {
                NTTIME force_logoff_time;
-               lsa_String comment;
+               lsa_String oem_information; /* comment */
                lsa_String domain_name;
                lsa_String primary; /* PDC name if this is a BDC */
                udlong sequence_num;
@@ -218,15 +218,15 @@ import "misc.idl", "lsa.idl", "security.idl";
                uint32 num_users;
                uint32 num_groups;
                uint32 num_aliases;
-       } samr_DomInfo2;
+       } samr_DomGeneralInformation;
 
        typedef struct {
                NTTIME force_logoff_time;
        } samr_DomInfo3;
 
        typedef struct {
-               lsa_String comment;
-       } samr_DomInfo4;
+               lsa_String oem_information; /* comment */
+       } samr_DomOEMInformation;
 
        typedef struct {
                lsa_String domain_name;
@@ -250,11 +250,11 @@ import "misc.idl", "lsa.idl", "security.idl";
        } samr_DomInfo9;
 
        typedef struct {
-               samr_DomInfo2 info2;
+               samr_DomGeneralInformation general;
                hyper lockout_duration;
                hyper lockout_window;
                uint16 lockout_threshold;
-       } samr_DomInfo11;
+       } samr_DomGeneralInformation2;
 
        typedef struct {
                hyper lockout_duration;
@@ -271,15 +271,15 @@ import "misc.idl", "lsa.idl", "security.idl";
 
        typedef [switch_type(uint16)] union {
                [case(1)] samr_DomInfo1 info1;
-               [case(2)] samr_DomInfo2 info2;
+               [case(2)] samr_DomGeneralInformation general;
                [case(3)] samr_DomInfo3 info3;
-               [case(4)] samr_DomInfo4 info4;
+               [case(4)] samr_DomOEMInformation oem;
                [case(5)] samr_DomInfo5 info5;
                [case(6)] samr_DomInfo6 info6;
                [case(7)] samr_DomInfo7 info7;
                [case(8)] samr_DomInfo8 info8;
                [case(9)] samr_DomInfo9 info9;
-               [case(11)] samr_DomInfo11 info11;
+               [case(11)] samr_DomGeneralInformation2 general2;
                [case(12)] samr_DomInfo12 info12;
                [case(13)] samr_DomInfo13 info13;
        } samr_DomainInfo;
index 0d651800a521317cec5521a60af0443e57b63e17..58f5eab805e9d8e36d3025da21a710c102743bef 100644 (file)
@@ -2,7 +2,7 @@
   winreg interface definition
 */
 
-import "lsa.idl", "initshutdown.idl", "security.idl";
+import "lsa.idl", "security.idl";
 
 [ 
   uuid("338cd001-2244-31f1-aaaa-900038001003"),
@@ -18,14 +18,14 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
                KEY_QUERY_VALUE                 = 0x00001,
                KEY_SET_VALUE                   = 0x00002,
                KEY_CREATE_SUB_KEY              = 0x00004,
-               KEY_ENUMERATE_SUB_KEYS  = 0x00008,
-               KEY_NOTIFY                              = 0x00010,
+               KEY_ENUMERATE_SUB_KEYS          = 0x00008,
+               KEY_NOTIFY                      = 0x00010,
                KEY_CREATE_LINK                 = 0x00020,
                KEY_WOW64_64KEY                 = 0x00100,
                KEY_WOW64_32KEY                 = 0x00200
        } winreg_AccessMask;
 
-       typedef [v1_enum] enum {
+       typedef [public,v1_enum] enum {
                REG_NONE                       = 0,
                REG_SZ                         = 1,
                REG_EXPAND_SZ                  = 2,
@@ -64,7 +64,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
 
        /******************/
        /* Function: 0x02 */
-       WERROR winreg_OpenHKLM(
+       [public] WERROR winreg_OpenHKLM(
                [in,unique] uint16 *system_name,
                [in]      winreg_AccessMask access_mask,
                [out,ref] policy_handle *handle
@@ -88,7 +88,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
 
        /******************/
        /* Function: 0x05 */
-       WERROR winreg_CloseKey(
+       [public] WERROR winreg_CloseKey(
                [in,out,ref] policy_handle *handle
        );
 
@@ -113,7 +113,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
                REG_OPENED_EXISTING_KEY = 2
        } winreg_CreateAction;
 
-       WERROR winreg_CreateKey(
+       [public] WERROR winreg_CreateKey(
                [in,ref] policy_handle *handle,
                [in] winreg_String name,
                [in] winreg_String keyclass,
@@ -126,7 +126,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
 
        /******************/
        /* Function: 0x07 */
-       WERROR winreg_DeleteKey(
+       [public] WERROR winreg_DeleteKey(
                [in,ref] policy_handle *handle,
                [in]     winreg_String key
        );
@@ -149,7 +149,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
 
        /******************/
        /* Function: 0x09 */
-       WERROR winreg_EnumKey(
+       [public] WERROR winreg_EnumKey(
                [in,ref]        policy_handle    *handle,
                [in]            uint32           enum_index,
                [in,out,ref]    winreg_StringBuf *name,
@@ -169,7 +169,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
        /******************/
        /* Function: 0x0a */
 
-       WERROR winreg_EnumValue(
+       [public] WERROR winreg_EnumValue(
                [in,ref]        policy_handle *handle,
                [in]            uint32 enum_index,
                [in,out,ref]    winreg_ValNameBuf *name,
@@ -181,13 +181,13 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
 
        /******************/
        /* Function: 0x0b */
-       WERROR winreg_FlushKey(
+       [public] WERROR winreg_FlushKey(
                [in,ref] policy_handle *handle
        );
 
        /******************/
        /* Function: 0x0c */
-       WERROR winreg_GetKeySecurity(
+       [public] WERROR winreg_GetKeySecurity(
                [in,ref] policy_handle *handle,
                [in] security_secinfo sec_info,
                [in,out,ref] KeySecurityData *sd
@@ -203,19 +203,26 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
 
        /******************/
        /* Function: 0x0e */
-       WERROR winreg_NotifyChangeKeyValue(
+       typedef [public,bitmap32bit] bitmap {
+               REG_NOTIFY_CHANGE_NAME          = 0x00000001,
+               REG_NOTIFY_CHANGE_ATTRIBUTES    = 0x00000002,
+               REG_NOTIFY_CHANGE_LAST_SET      = 0x00000004,
+               REG_NOTIFY_CHANGE_SECURITY      = 0x00000008
+       } winreg_NotifyChangeType;
+
+       [public] WERROR winreg_NotifyChangeKeyValue(
                [in,ref] policy_handle *handle,
-               [in] uint8 watch_subtree,
-               [in] uint32 notify_filter,
+               [in] boolean8 watch_subtree,
+               [in] winreg_NotifyChangeType notify_filter,
                [in] uint32 unknown,
                [in] winreg_String string1,
-               [in] winreg_String string2, 
+               [in] winreg_String string2,
                [in] uint32 unknown2
        );
 
        /******************/
        /* Function: 0x0f */
-       WERROR winreg_OpenKey(
+       [public] WERROR winreg_OpenKey(
                [in,ref] policy_handle *parent_handle,
                [in] winreg_String keyname,
                [in] uint32 unknown,
@@ -225,7 +232,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
 
        /******************/
        /* Function: 0x10 */
-       WERROR winreg_QueryInfoKey(
+       [public] WERROR winreg_QueryInfoKey(
                [in,ref] policy_handle *handle,
                [in,out,ref] winreg_String *classname,
                [out,ref] uint32 *num_subkeys,
@@ -240,18 +247,18 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
 
        /******************/
        /* Function: 0x11 */
-       WERROR winreg_QueryValue(
+       [public] WERROR winreg_QueryValue(
                [in,ref] policy_handle *handle,
                [in,ref] winreg_String *value_name,
                [in,out,unique] winreg_Type *type,
-               [in,out,unique,size_is(*data_size),length_is(*value_length)] uint8 *data,
+               [in,out,unique,size_is(*data_size),length_is(*data_length)] uint8 *data,
                [in,out,unique] uint32 *data_size,
-               [in,out,unique] uint32 *value_length
+               [in,out,unique] uint32 *data_length
        );
 
        /******************/
        /* Function: 0x12 */
-       WERROR winreg_ReplaceKey(
+       [todo] WERROR winreg_ReplaceKey(
        );
 
        /******************/
@@ -281,7 +288,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
        /* Function: 0x15 */
        WERROR winreg_SetKeySecurity(
                [in,ref] policy_handle *handle,
-               [in] winreg_AccessMask access_mask,
+               [in] security_secinfo sec_info,
                [in,ref] KeySecurityData *sd
        );
 
@@ -304,7 +311,11 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
        /* Function: 0x18 */
        WERROR winreg_InitiateSystemShutdown(
                [in,unique] uint16 *hostname,
-               [in,unique] initshutdown_String *message,
+               /*
+                * Note: lsa_String and winreg_String both result
+                *       in WERR_INVALID_PARAM
+                */
+               [in,unique] lsa_StringLarge *message,
                [in]    uint32 timeout,
                [in]    uint8 force_apps,
                [in]    uint8 do_reboot
@@ -318,7 +329,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
 
        /******************/
        /* Function: 0x1a */
-       WERROR winreg_GetVersion(
+       [public] WERROR winreg_GetVersion(
                [in,ref]     policy_handle *handle,
                [out,ref]    uint32 *version
        );
@@ -348,7 +359,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
        
        /******************/
        /* Function: 0x1d */
-       WERROR winreg_QueryMultipleValues(
+       [public] WERROR winreg_QueryMultipleValues(
                [in,ref] policy_handle *key_handle, 
                [in,out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values,
                [in] uint32 num_values,
@@ -360,7 +371,11 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
        /* Function: 0x1e */
        WERROR winreg_InitiateSystemShutdownEx(
                [in,unique] uint16 *hostname,
-               [in,unique] initshutdown_String *message,
+               /*
+                * Note: lsa_String and winreg_String both result
+                *       in WERR_INVALID_PARAM
+                */
+               [in,unique] lsa_StringLarge *message,
                [in] uint32 timeout,
                [in] uint8 force_apps,
                [in] uint8 do_reboot,
diff --git a/source3/librpc/idl/xattr.idl b/source3/librpc/idl/xattr.idl
deleted file mode 100644 (file)
index 23af2df..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#include "idl_types.h"
-
-/*
-   IDL structures for xattrs
-*/
-
-[
-  pointer_default(unique)
-]
-interface xattr
-{
-       /* xattrs for file systems that don't have any */
-
-       typedef [public] struct {
-               utf8string name;
-               DATA_BLOB value;
-       } tdb_xattr;
-
-       typedef [public] struct {
-               uint32 num_xattrs;
-               tdb_xattr xattrs[num_xattrs];
-       } tdb_xattrs;
-
-       /* we store the NT ACL a NTACL xattr. It is versioned so we
-          can later add other acl attribs (such as posix acl mapping)
-
-          we put this xattr in the security namespace to ensure that
-          only trusted users can write to the ACL
-
-          stored in "security.NTACL"
-
-          Version 1. raw SD stored as Samba4 does it.
-          Version 2. raw SD + last changed timestamp so we
-                     can discard if this doesn't match the POSIX st_ctime.
-        */
-
-       const char *XATTR_NTACL_NAME = "security.NTACL";
-
-       typedef [public] struct {
-               security_descriptor *sd;
-               NTTIME last_changed;
-       } security_descriptor_timestamp;
-
-        typedef [switch_type(uint16)] union {
-                [case(1)] security_descriptor *sd;
-               [case(2)] security_descriptor_timestamp *sd_ts;
-        } xattr_NTACL_Info;
-
-        typedef [public] struct {
-                uint16 version;
-                [switch_is(version)] xattr_NTACL_Info info;
-        } xattr_NTACL;
-
-}
diff --git a/source3/librpc/ndr/libndr.h b/source3/librpc/ndr/libndr.h
deleted file mode 100644 (file)
index 155f5f1..0000000
+++ /dev/null
@@ -1,354 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-   rpc interface definitions
-   Copyright (C) Andrew Tridgell 2003
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef __LIBNDR_H__
-#define __LIBNDR_H__
-
-#define _PRINTF_ATTRIBUTE(a,b) 
-
-#include "librpc/gen_ndr/misc.h"
-#include "librpc/gen_ndr/security.h"
-
-/*
-  this provides definitions for the libcli/rpc/ MSRPC library
-*/
-
-
-/*
-  this is used by the token store/retrieve code
-*/
-struct ndr_token_list {
-       struct ndr_token_list *next, *prev;
-       const void *key;
-       uint32_t value;
-};
-
-/* this is the base structure passed to routines that 
-   parse MSRPC formatted data 
-
-   note that in Samba4 we use separate routines and structures for
-   MSRPC marshalling and unmarshalling. Also note that these routines
-   are being kept deliberately very simple, and are not tied to a
-   particular transport
-*/
-struct ndr_pull {
-       uint32_t flags; /* LIBNDR_FLAG_* */
-       uint8_t *data;
-       uint32_t data_size;
-       uint32_t offset;
-
-       uint32_t relative_base_offset;
-       struct ndr_token_list *relative_base_list;
-
-       struct ndr_token_list *relative_list;
-       struct ndr_token_list *array_size_list;
-       struct ndr_token_list *array_length_list;
-       struct ndr_token_list *switch_list;
-
-       TALLOC_CTX *current_mem_ctx;
-
-       /* this is used to ensure we generate unique reference IDs
-          between request and reply */
-       uint32_t ptr_count;
-};
-
-struct ndr_pull_save {
-       uint32_t data_size;
-       uint32_t offset;
-       struct ndr_pull_save *next;
-};
-
-/* structure passed to functions that generate NDR formatted data */
-struct ndr_push {
-       uint32_t flags; /* LIBNDR_FLAG_* */
-       uint8_t *data;
-       uint32_t alloc_size;
-       uint32_t offset;
-
-       uint32_t relative_base_offset;
-       struct ndr_token_list *relative_base_list;
-
-       struct ndr_token_list *switch_list;
-       struct ndr_token_list *relative_list;
-       struct ndr_token_list *nbt_string_list;
-       struct ndr_token_list *full_ptr_list;
-
-       /* this is used to ensure we generate unique reference IDs */
-       uint32_t ptr_count;
-};
-
-struct ndr_push_save {
-       uint32_t offset;
-       struct ndr_push_save *next;
-};
-
-
-/* structure passed to functions that print IDL structures */
-struct ndr_print {
-       uint32_t flags; /* LIBNDR_FLAG_* */
-       uint32_t depth;
-       struct ndr_token_list *switch_list;
-       void (*print)(struct ndr_print *, const char *, ...) PRINTF_ATTRIBUTE(2,3);
-       void *private_data;
-};
-
-#define LIBNDR_FLAG_BIGENDIAN  (1<<0)
-#define LIBNDR_FLAG_NOALIGN    (1<<1)
-
-#define LIBNDR_FLAG_STR_ASCII          (1<<2)
-#define LIBNDR_FLAG_STR_LEN4           (1<<3)
-#define LIBNDR_FLAG_STR_SIZE4          (1<<4)
-#define LIBNDR_FLAG_STR_NOTERM         (1<<5)
-#define LIBNDR_FLAG_STR_NULLTERM       (1<<6)
-#define LIBNDR_FLAG_STR_SIZE2          (1<<7)
-#define LIBNDR_FLAG_STR_BYTESIZE       (1<<8)
-#define LIBNDR_FLAG_STR_FIXLEN32       (1<<9)
-#define LIBNDR_FLAG_STR_CONFORMANT     (1<<10)
-#define LIBNDR_FLAG_STR_CHARLEN                (1<<11)
-#define LIBNDR_FLAG_STR_UTF8           (1<<12)
-#define LIBNDR_FLAG_STR_FIXLEN15       (1<<13)
-#define LIBNDR_STRING_FLAGS            (0x7FFC)
-
-
-#define LIBNDR_FLAG_REF_ALLOC    (1<<20)
-#define LIBNDR_FLAG_REMAINING    (1<<21)
-#define LIBNDR_FLAG_ALIGN2       (1<<22)
-#define LIBNDR_FLAG_ALIGN4       (1<<23)
-#define LIBNDR_FLAG_ALIGN8       (1<<24)
-
-#define LIBNDR_ALIGN_FLAGS (LIBNDR_FLAG_ALIGN2|LIBNDR_FLAG_ALIGN4|LIBNDR_FLAG_ALIGN8)
-
-#define LIBNDR_PRINT_ARRAY_HEX   (1<<25)
-#define LIBNDR_PRINT_SET_VALUES  (1<<26)
-
-/* used to force a section of IDL to be little-endian */
-#define LIBNDR_FLAG_LITTLE_ENDIAN (1<<27)
-
-/* used to check if alignment padding is zero */
-#define LIBNDR_FLAG_PAD_CHECK     (1<<28)
-
-/* set if an object uuid will be present */
-#define LIBNDR_FLAG_OBJECT_PRESENT    (1<<30)
-
-/* set to avoid recursion in ndr_size_*() calculation */
-#define LIBNDR_FLAG_NO_NDR_SIZE                (1<<31)
-
-/* useful macro for debugging with DEBUG */
-#define NDR_PRINT_DEBUG(type, p) ndr_print_debug((ndr_print_fn_t)ndr_print_ ##type, #p, p)
-#define NDR_PRINT_UNION_DEBUG(type, level, p) ndr_print_union_debug((ndr_print_fn_t)ndr_print_ ##type, #p, level, p)
-#define NDR_PRINT_FUNCTION_DEBUG(type, flags, p) ndr_print_function_debug((ndr_print_function_t)ndr_print_ ##type, #type, flags, p)
-#define NDR_PRINT_BOTH_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_BOTH, p)
-#define NDR_PRINT_OUT_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_OUT, p)
-#define NDR_PRINT_IN_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_IN | NDR_SET_VALUES, p)
-
-/* useful macro for debugging in strings */
-#define NDR_PRINT_STRUCT_STRING(ctx, type, p) ndr_print_struct_string(ctx, (ndr_print_fn_t)ndr_print_ ##type, #p, p)
-#define NDR_PRINT_UNION_STRING(ctx, type, level, p) ndr_print_union_string(ctx, (ndr_print_fn_t)ndr_print_ ##type, #p, level, p)
-#define NDR_PRINT_FUNCTION_STRING(ctx, type, flags, p) ndr_print_function_string(ctx, (ndr_print_function_t)ndr_print_ ##type, #type, flags, p)
-#define NDR_PRINT_BOTH_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_BOTH, p)
-#define NDR_PRINT_OUT_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_OUT, p)
-#define NDR_PRINT_IN_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_IN | NDR_SET_VALUES, p)
-
-#define NDR_BE(ndr) (((ndr)->flags & (LIBNDR_FLAG_BIGENDIAN|LIBNDR_FLAG_LITTLE_ENDIAN)) == LIBNDR_FLAG_BIGENDIAN)
-
-enum ndr_err_code {
-       NDR_ERR_SUCCESS = 0,
-       NDR_ERR_ARRAY_SIZE,
-       NDR_ERR_BAD_SWITCH,
-       NDR_ERR_OFFSET,
-       NDR_ERR_RELATIVE,
-       NDR_ERR_CHARCNV,
-       NDR_ERR_LENGTH,
-       NDR_ERR_SUBCONTEXT,
-       NDR_ERR_COMPRESSION,
-       NDR_ERR_STRING,
-       NDR_ERR_VALIDATE,
-       NDR_ERR_BUFSIZE,
-       NDR_ERR_ALLOC,
-       NDR_ERR_RANGE,
-       NDR_ERR_TOKEN,
-       NDR_ERR_IPV4ADDRESS,
-       NDR_ERR_INVALID_POINTER,
-       NDR_ERR_UNREAD_BYTES
-};
-
-#define NDR_ERR_CODE_IS_SUCCESS(x) (x == NDR_ERR_SUCCESS)
-
-#define NDR_ERR_HAVE_NO_MEMORY(x) do { \
-       if (NULL == (x)) { \
-               return NDR_ERR_ALLOC; \
-       } \
-} while (0)
-
-enum ndr_compression_alg {
-       NDR_COMPRESSION_MSZIP   = 2,
-       NDR_COMPRESSION_XPRESS  = 3
-};
-
-/*
-  flags passed to control parse flow
-*/
-#define NDR_SCALARS 1
-#define NDR_BUFFERS 2
-
-/*
-  flags passed to ndr_print_*()
-*/
-#define NDR_IN 1
-#define NDR_OUT 2
-#define NDR_BOTH 3
-#define NDR_SET_VALUES 4
-
-#define NDR_PULL_NEED_BYTES(ndr, n) do { \
-       if ((n) > ndr->data_size || ndr->offset + (n) > ndr->data_size) { \
-               return ndr_pull_error(ndr, NDR_ERR_BUFSIZE, "Pull bytes %u", (unsigned)n); \
-       } \
-} while(0)
-
-#define NDR_ALIGN(ndr, n) ndr_align_size(ndr->offset, n)
-
-#define NDR_ROUND(size, n) (((size)+((n)-1)) & ~((n)-1))
-
-#define NDR_PULL_ALIGN(ndr, n) do { \
-       if (!(ndr->flags & LIBNDR_FLAG_NOALIGN)) { \
-               if (ndr->flags & LIBNDR_FLAG_PAD_CHECK) { \
-                       ndr_check_padding(ndr, n); \
-               } \
-               ndr->offset = (ndr->offset + (n-1)) & ~(n-1); \
-       } \
-       if (ndr->offset > ndr->data_size) { \
-               return ndr_pull_error(ndr, NDR_ERR_BUFSIZE, "Pull align %u", (unsigned)n); \
-       } \
-} while(0)
-
-#define NDR_PUSH_NEED_BYTES(ndr, n) NDR_CHECK(ndr_push_expand(ndr, n))
-
-#define NDR_PUSH_ALIGN(ndr, n) do { \
-       if (!(ndr->flags & LIBNDR_FLAG_NOALIGN)) { \
-               uint32_t _pad = ((ndr->offset + (n-1)) & ~(n-1)) - ndr->offset; \
-               while (_pad--) NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0)); \
-       } \
-} while(0)
-
-/* these are used to make the error checking on each element in libndr
-   less tedious, hopefully making the code more readable */
-#define NDR_CHECK(call) do { \
-       enum ndr_err_code _status; \
-       _status = call; \
-       if (!NDR_ERR_CODE_IS_SUCCESS(_status)) { \
-               return _status; \
-       } \
-} while (0)
-
-#define NDR_PULL_GET_MEM_CTX(ndr) (ndr->current_mem_ctx)
-
-#define NDR_PULL_SET_MEM_CTX(ndr, mem_ctx, flgs) do {\
-       if ( !(flgs) || (ndr->flags & flgs) ) {\
-               if (!(mem_ctx)) {\
-                       return ndr_pull_error(ndr, NDR_ERR_ALLOC, "NDR_PULL_SET_MEM_CTX(NULL): %s\n", __location__); \
-               }\
-               ndr->current_mem_ctx = discard_const(mem_ctx);\
-       }\
-} while(0)
-
-#define _NDR_PULL_FIX_CURRENT_MEM_CTX(ndr) do {\
-       if (!ndr->current_mem_ctx) {\
-               ndr->current_mem_ctx = talloc_new(ndr);\
-               if (!ndr->current_mem_ctx) {\
-                       return ndr_pull_error(ndr, NDR_ERR_ALLOC, "_NDR_PULL_FIX_CURRENT_MEM_CTX() failed: %s\n", __location__); \
-               }\
-       }\
-} while(0)
-
-#define NDR_PULL_ALLOC(ndr, s) do { \
-       _NDR_PULL_FIX_CURRENT_MEM_CTX(ndr);\
-       (s) = talloc_ptrtype(ndr->current_mem_ctx, (s)); \
-       if (!(s)) return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Alloc %s failed: %s\n", # s, __location__); \
-} while (0)
-
-#define NDR_PULL_ALLOC_N(ndr, s, n) do { \
-       _NDR_PULL_FIX_CURRENT_MEM_CTX(ndr);\
-       (s) = talloc_array_ptrtype(ndr->current_mem_ctx, (s), n); \
-       if (!(s)) return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Alloc %u * %s failed: %s\n", (unsigned)n, # s, __location__); \
-} while (0)
-
-
-#define NDR_PUSH_ALLOC_SIZE(ndr, s, size) do { \
-       (s) = talloc_array(ndr, uint8_t, size); \
-       if (!(s)) return ndr_push_error(ndr, NDR_ERR_ALLOC, "push alloc %u failed: %s\n", (unsigned)size, __location__); \
-} while (0)
-
-#define NDR_PUSH_ALLOC(ndr, s) do { \
-       (s) = talloc_ptrtype(ndr, (s)); \
-       if (!(s)) return ndr_push_error(ndr, NDR_ERR_ALLOC, "push alloc %s failed: %s\n", # s, __location__); \
-} while (0)
-
-/* these are used when generic fn pointers are needed for ndr push/pull fns */
-typedef enum ndr_err_code (*ndr_push_flags_fn_t)(struct ndr_push *, int ndr_flags, const void *);
-typedef enum ndr_err_code (*ndr_pull_flags_fn_t)(struct ndr_pull *, int ndr_flags, void *);
-typedef void (*ndr_print_fn_t)(struct ndr_print *, const char *, const void *);
-typedef void (*ndr_print_function_t)(struct ndr_print *, const char *, int, const void *);
-
-extern const struct ndr_syntax_id ndr_transfer_syntax;
-extern const struct ndr_syntax_id ndr64_transfer_syntax;
-
-struct ndr_interface_call {
-       const char *name;
-       size_t struct_size;
-       ndr_push_flags_fn_t ndr_push;
-       ndr_pull_flags_fn_t ndr_pull;
-       ndr_print_function_t ndr_print;
-       bool async;
-};
-
-struct ndr_interface_string_array {
-       uint32_t count;
-       const char * const *names;
-};
-
-struct ndr_interface_table {
-       const char *name;
-       struct ndr_syntax_id syntax_id;
-       const char *helpstring;
-       uint32_t num_calls;
-       const struct ndr_interface_call *calls;
-       const struct ndr_interface_string_array *endpoints;
-       const struct ndr_interface_string_array *authservices;
-};
-
-struct ndr_interface_list {
-       struct ndr_interface_list *prev, *next;
-       const struct ndr_interface_table *table;
-};
-
-#define NDR_SCALAR_PROTO(name, type) \
-enum ndr_err_code ndr_push_ ## name(struct ndr_push *ndr, int ndr_flags, type v); \
-enum ndr_err_code ndr_pull_ ## name(struct ndr_pull *ndr, int ndr_flags, type *v); \
-void ndr_print_ ## name(struct ndr_print *ndr, const char *var_name, type v);
-
-#define NDR_BUFFER_PROTO(name, type) \
-enum ndr_err_code ndr_push_ ## name(struct ndr_push *ndr, int ndr_flags, const type *v); \
-enum ndr_err_code ndr_pull_ ## name(struct ndr_pull *ndr, int ndr_flags, type *v); \
-void ndr_print_ ## name(struct ndr_print *ndr, const char *var_name, const type *v);
-
-
-void ndr_print_dom_sid28(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
-size_t ndr_size_dom_sid28(const struct dom_sid *sid, int flags);
-
-#endif /* __LIBNDR_H__ */
diff --git a/source3/librpc/ndr/ndr.c b/source3/librpc/ndr/ndr.c
deleted file mode 100644 (file)
index 56d5967..0000000
+++ /dev/null
@@ -1,1108 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-
-   libndr interface
-
-   Copyright (C) Andrew Tridgell 2003
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
-  this provides the core routines for NDR parsing functions
-
-  see http://www.opengroup.org/onlinepubs/9629399/chap14.htm for details
-  of NDR encoding rules
-*/
-
-#include "includes.h"
-
-#define NDR_BASE_MARSHALL_SIZE 1024
-
-/* this guid indicates NDR encoding in a protocol tower */
-const struct ndr_syntax_id ndr_transfer_syntax = {
-  { 0x8a885d04, 0x1ceb, 0x11c9, {0x9f, 0xe8}, {0x08,0x00,0x2b,0x10,0x48,0x60} },
-  2
-};
-
-const struct ndr_syntax_id ndr64_transfer_syntax = {
-  { 0x71710533, 0xbeba, 0x4937, {0x83, 0x19}, {0xb5,0xdb,0xef,0x9c,0xcc,0x36} },
-  1
-};
-
-/*
-  work out the number of bytes needed to align on a n byte boundary
-*/
-_PUBLIC_ size_t ndr_align_size(uint32_t offset, size_t n)
-{
-       if ((offset & (n-1)) == 0) return 0;
-       return n - (offset & (n-1));
-}
-
-/*
-  initialise a ndr parse structure from a data blob
-*/
-_PUBLIC_ struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience)
-{
-       struct ndr_pull *ndr;
-
-       ndr = talloc_zero(mem_ctx, struct ndr_pull);
-       if (!ndr) return NULL;
-       ndr->current_mem_ctx = mem_ctx;
-
-       ndr->data = blob->data;
-       ndr->data_size = blob->length;
-
-       return ndr;
-}
-
-/*
-  advance by 'size' bytes
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_advance(struct ndr_pull *ndr, uint32_t size)
-{
-       ndr->offset += size;
-       if (ndr->offset > ndr->data_size) {
-               return ndr_pull_error(ndr, NDR_ERR_BUFSIZE, 
-                                     "ndr_pull_advance by %u failed",
-                                     size);
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  set the parse offset to 'ofs'
-*/
-static enum ndr_err_code ndr_pull_set_offset(struct ndr_pull *ndr, uint32_t ofs)
-{
-       ndr->offset = ofs;
-       if (ndr->offset > ndr->data_size) {
-               return ndr_pull_error(ndr, NDR_ERR_BUFSIZE, 
-                                     "ndr_pull_set_offset %u failed",
-                                     ofs);
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-/* save the offset/size of the current ndr state */
-_PUBLIC_ void ndr_pull_save(struct ndr_pull *ndr, struct ndr_pull_save *save)
-{
-       save->offset = ndr->offset;
-       save->data_size = ndr->data_size;
-}
-
-/* restore the size/offset of a ndr structure */
-_PUBLIC_ void ndr_pull_restore(struct ndr_pull *ndr, struct ndr_pull_save *save)
-{
-       ndr->offset = save->offset;
-       ndr->data_size = save->data_size;
-}
-
-
-/* create a ndr_push structure, ready for some marshalling */
-_PUBLIC_ struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx)
-{
-       struct ndr_push *ndr;
-
-       ndr = talloc_zero(mem_ctx, struct ndr_push);
-       if (!ndr) {
-               return NULL;
-       }
-
-       ndr->flags = 0;
-       ndr->alloc_size = NDR_BASE_MARSHALL_SIZE;
-       ndr->data = talloc_array(ndr, uint8_t, ndr->alloc_size);
-       if (!ndr->data) {
-               return NULL;
-       }
-
-       return ndr;
-}
-
-/* return a DATA_BLOB structure for the current ndr_push marshalled data */
-_PUBLIC_ DATA_BLOB ndr_push_blob(struct ndr_push *ndr)
-{
-       DATA_BLOB blob;
-       blob = data_blob_const(ndr->data, ndr->offset);
-       if (ndr->alloc_size > ndr->offset) {
-               ndr->data[ndr->offset] = 0;
-       }
-       return blob;
-}
-
-
-/*
-  expand the available space in the buffer to ndr->offset + extra_size
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_expand(struct ndr_push *ndr, uint32_t extra_size)
-{
-       uint32_t size = extra_size + ndr->offset;
-
-       if (size < ndr->offset) {
-               /* extra_size overflowed the offset */
-               return ndr_push_error(ndr, NDR_ERR_BUFSIZE, "Overflow in push_expand to %u",
-                                     size);
-       }
-
-       if (ndr->alloc_size > size) {
-               return NDR_ERR_SUCCESS;
-       }
-
-       ndr->alloc_size += NDR_BASE_MARSHALL_SIZE;
-       if (size+1 > ndr->alloc_size) {
-               ndr->alloc_size = size+1;
-       }
-       ndr->data = talloc_realloc(ndr, ndr->data, uint8_t, ndr->alloc_size);
-       if (!ndr->data) {
-               return ndr_push_error(ndr, NDR_ERR_ALLOC, "Failed to push_expand to %u",
-                                     ndr->alloc_size);
-       }
-
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_debug_helper(struct ndr_print *ndr, const char *format, ...) _PRINTF_ATTRIBUTE(2,3)
-{
-       va_list ap;
-       char *s = NULL;
-       int i, ret;
-
-       va_start(ap, format);
-       ret = vasprintf(&s, format, ap);
-       va_end(ap);
-
-       if (ret == -1) {
-               return;
-       }
-
-       for (i=0;i<ndr->depth;i++) {
-               DEBUGADD(0,("    "));
-       }
-
-       DEBUGADD(0,("%s\n", s));
-       free(s);
-}
-
-_PUBLIC_ void ndr_print_string_helper(struct ndr_print *ndr, const char *format, ...) _PRINTF_ATTRIBUTE(2,3)
-{
-       va_list ap;
-       int i;
-
-       for (i=0;i<ndr->depth;i++) {
-               ndr->private_data = talloc_asprintf_append_buffer(
-                                       (char *)ndr->private_data, "    ");
-       }
-
-       va_start(ap, format);
-       ndr->private_data = talloc_vasprintf_append_buffer((char *)ndr->private_data, 
-                                                   format, ap);
-       va_end(ap);
-       ndr->private_data = talloc_asprintf_append_buffer((char *)ndr->private_data, 
-                                                  "\n");
-}
-
-/*
-  a useful helper function for printing idl structures via DEBUG()
-*/
-_PUBLIC_ void ndr_print_debug(ndr_print_fn_t fn, const char *name, void *ptr)
-{
-       struct ndr_print *ndr;
-
-       ndr = talloc_zero(NULL, struct ndr_print);
-       if (!ndr) return;
-       ndr->print = ndr_print_debug_helper;
-       ndr->depth = 1;
-       ndr->flags = 0;
-       fn(ndr, name, ptr);
-       talloc_free(ndr);
-}
-
-/*
-  a useful helper function for printing idl unions via DEBUG()
-*/
-_PUBLIC_ void ndr_print_union_debug(ndr_print_fn_t fn, const char *name, uint32_t level, void *ptr)
-{
-       struct ndr_print *ndr;
-
-       ndr = talloc_zero(NULL, struct ndr_print);
-       if (!ndr) return;
-       ndr->print = ndr_print_debug_helper;
-       ndr->depth = 1;
-       ndr->flags = 0;
-       ndr_print_set_switch_value(ndr, ptr, level);
-       fn(ndr, name, ptr);
-       talloc_free(ndr);
-}
-
-/*
-  a useful helper function for printing idl function calls via DEBUG()
-*/
-_PUBLIC_ void ndr_print_function_debug(ndr_print_function_t fn, const char *name, int flags, void *ptr)
-{
-       struct ndr_print *ndr;
-
-       ndr = talloc_zero(NULL, struct ndr_print);
-       if (!ndr) return;
-       ndr->print = ndr_print_debug_helper;
-       ndr->depth = 1;
-       ndr->flags = 0;
-       fn(ndr, name, flags, ptr);
-       talloc_free(ndr);
-}
-
-/*
-  a useful helper function for printing idl structures to a string
-*/
-_PUBLIC_ char *ndr_print_struct_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, const char *name, void *ptr)
-{
-       struct ndr_print *ndr;
-       char *ret = NULL;
-
-       ndr = talloc_zero(mem_ctx, struct ndr_print);
-       if (!ndr) return NULL;
-       ndr->private_data = talloc_strdup(ndr, "");
-       if (!ndr->private_data) {
-               goto failed;
-       }
-       ndr->print = ndr_print_string_helper;
-       ndr->depth = 1;
-       ndr->flags = 0;
-       fn(ndr, name, ptr);
-       ret = talloc_steal(mem_ctx, (char *)ndr->private_data);
-failed:
-       talloc_free(ndr);
-       return ret;
-}
-
-/*
-  a useful helper function for printing idl unions to a string
-*/
-_PUBLIC_ char *ndr_print_union_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, const char *name, uint32_t level, void *ptr)
-{
-       struct ndr_print *ndr;
-       char *ret = NULL;
-
-       ndr = talloc_zero(mem_ctx, struct ndr_print);
-       if (!ndr) return NULL;
-       ndr->private_data = talloc_strdup(ndr, "");
-       if (!ndr->private_data) {
-               goto failed;
-       }
-       ndr->print = ndr_print_string_helper;
-       ndr->depth = 1;
-       ndr->flags = 0;
-       ndr_print_set_switch_value(ndr, ptr, level);
-       fn(ndr, name, ptr);
-       ret = talloc_steal(mem_ctx, (char *)ndr->private_data);
-failed:
-       talloc_free(ndr);
-       return ret;
-}
-
-/*
-  a useful helper function for printing idl function calls to a string
-*/
-_PUBLIC_ char *ndr_print_function_string(TALLOC_CTX *mem_ctx,
-                               ndr_print_function_t fn, const char *name, 
-                               int flags, void *ptr)
-{
-       struct ndr_print *ndr;
-       char *ret = NULL;
-
-       ndr = talloc_zero(mem_ctx, struct ndr_print);
-       if (!ndr) return NULL;
-       ndr->private_data = talloc_strdup(ndr, "");
-       if (!ndr->private_data) {
-               goto failed;
-       }
-       ndr->print = ndr_print_string_helper;
-       ndr->depth = 1;
-       ndr->flags = 0;
-       fn(ndr, name, flags, ptr);
-       ret = talloc_steal(mem_ctx, (char *)ndr->private_data);
-failed:
-       talloc_free(ndr);
-       return ret;
-}
-
-_PUBLIC_ void ndr_set_flags(uint32_t *pflags, uint32_t new_flags)
-{
-       /* the big/little endian flags are inter-dependent */
-       if (new_flags & LIBNDR_FLAG_LITTLE_ENDIAN) {
-               (*pflags) &= ~LIBNDR_FLAG_BIGENDIAN;
-       }
-       if (new_flags & LIBNDR_FLAG_BIGENDIAN) {
-               (*pflags) &= ~LIBNDR_FLAG_LITTLE_ENDIAN;
-       }
-       if (new_flags & LIBNDR_FLAG_REMAINING) {
-               (*pflags) &= ~LIBNDR_ALIGN_FLAGS;
-       }
-       if (new_flags & LIBNDR_ALIGN_FLAGS) {
-               (*pflags) &= ~LIBNDR_FLAG_REMAINING;
-       }
-       (*pflags) |= new_flags;
-}
-
-NTSTATUS ndr_map_error2ntstatus(enum ndr_err_code ndr_err)
-{
-       switch (ndr_err) {
-       case NDR_ERR_SUCCESS:
-               return NT_STATUS_OK;
-       case NDR_ERR_BUFSIZE:
-               return NT_STATUS_BUFFER_TOO_SMALL;
-       case NDR_ERR_TOKEN:
-               return NT_STATUS_INTERNAL_ERROR;
-       case NDR_ERR_ALLOC:
-               return NT_STATUS_NO_MEMORY;
-       case NDR_ERR_ARRAY_SIZE:
-               return NT_STATUS_ARRAY_BOUNDS_EXCEEDED;
-       case NDR_ERR_INVALID_POINTER:
-               return NT_STATUS_INVALID_PARAMETER_MIX;
-       case NDR_ERR_UNREAD_BYTES:
-               return NT_STATUS_PORT_MESSAGE_TOO_LONG;
-       default:
-               break;
-       }
-
-       /* we should map all error codes to different status codes */
-       return NT_STATUS_INVALID_PARAMETER;
-}
-
-/*
- * Convert an ndr error to string
- */
-
-const char *ndr_errstr(enum ndr_err_code err)
-{
-       switch (err) {
-       case NDR_ERR_SUCCESS:
-               return "NDR_ERR_SUCCESS";
-               break;
-       case NDR_ERR_ARRAY_SIZE:
-               return "NDR_ERR_ARRAY_SIZE";
-               break;
-       case NDR_ERR_BAD_SWITCH:
-               return "NDR_ERR_BAD_SWITCH";
-               break;
-       case NDR_ERR_OFFSET:
-               return "NDR_ERR_OFFSET";
-               break;
-       case NDR_ERR_RELATIVE:
-               return "NDR_ERR_RELATIVE";
-               break;
-       case NDR_ERR_CHARCNV:
-               return "NDR_ERR_CHARCNV";
-               break;
-       case NDR_ERR_LENGTH:
-               return "NDR_ERR_LENGTH";
-               break;
-       case NDR_ERR_SUBCONTEXT:
-               return "NDR_ERR_SUBCONTEXT";
-               break;
-       case NDR_ERR_COMPRESSION:
-               return "NDR_ERR_COMPRESSION";
-               break;
-       case NDR_ERR_STRING:
-               return "NDR_ERR_STRING";
-               break;
-       case NDR_ERR_VALIDATE:
-               return "NDR_ERR_VALIDATE";
-               break;
-       case NDR_ERR_BUFSIZE:
-               return "NDR_ERR_BUFSIZE";
-               break;
-       case NDR_ERR_ALLOC:
-               return "NDR_ERR_ALLOC";
-               break;
-       case NDR_ERR_RANGE:
-               return "NDR_ERR_RANGE";
-               break;
-       case NDR_ERR_TOKEN:
-               return "NDR_ERR_TOKEN";
-               break;
-       case NDR_ERR_IPV4ADDRESS:
-               return "NDR_ERR_IPV4ADDRESS";
-               break;
-       case NDR_ERR_INVALID_POINTER:
-               return "NDR_ERR_INVALID_POINTER";
-               break;
-       case NDR_ERR_UNREAD_BYTES:
-               return "NDR_ERR_UNREAD_BYTES";
-               break;
-       }
-
-       return talloc_asprintf(talloc_tos(), "Unknown NDR error: %d", err);
-}
-
-/*
-  return and possibly log an NDR error
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_error(struct ndr_pull *ndr,
-                                enum ndr_err_code ndr_err,
-                                const char *format, ...) _PRINTF_ATTRIBUTE(3,4)
-{
-       char *s=NULL;
-       va_list ap;
-       int ret;
-
-       va_start(ap, format);
-       ret = vasprintf(&s, format, ap);
-       va_end(ap);
-
-       if (ret == -1) {
-               return NDR_ERR_ALLOC;
-       }
-
-       DEBUG(1,("ndr_pull_error(%u): %s\n", ndr_err, s));
-
-       free(s);
-
-       return ndr_err;
-}
-
-/*
-  return and possibly log an NDR error
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_error(struct ndr_push *ndr,
-                                enum ndr_err_code ndr_err,
-                                const char *format, ...)  _PRINTF_ATTRIBUTE(3,4)
-{
-       char *s=NULL;
-       va_list ap;
-       int ret;
-
-       va_start(ap, format);
-       ret = vasprintf(&s, format, ap);
-       va_end(ap);
-
-       if (ret == -1) {
-               return NDR_ERR_ALLOC;
-       }
-
-       DEBUG(1,("ndr_push_error(%u): %s\n", ndr_err, s));
-
-       free(s);
-
-       return ndr_err;
-}
-
-/*
-  handle subcontext buffers, which in midl land are user-marshalled, but
-  we use magic in pidl to make them easier to cope with
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_subcontext_start(struct ndr_pull *ndr,
-                                  struct ndr_pull **_subndr,
-                                  size_t header_size,
-                                  ssize_t size_is)
-{
-       struct ndr_pull *subndr;
-       uint32_t r_content_size;
-
-       switch (header_size) {
-       case 0: {
-               uint32_t content_size = ndr->data_size - ndr->offset;
-               if (size_is >= 0) {
-                       content_size = size_is;
-               }
-               r_content_size = content_size;
-               break;
-       }
-
-       case 2: {
-               uint16_t content_size;
-               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &content_size));
-               if (size_is >= 0 && size_is != content_size) {
-                       return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PULL) size_is(%d) mismatch content_size %d", 
-                                               (int)size_is, (int)content_size);
-               }
-               r_content_size = content_size;
-               break;
-       }
-
-       case 4: {
-               uint32_t content_size;
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &content_size));
-               if (size_is >= 0 && size_is != content_size) {
-                       return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PULL) size_is(%d) mismatch content_size %d", 
-                                               (int)size_is, (int)content_size);
-               }
-               r_content_size = content_size;
-               break;
-       }
-       default:
-               return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PULL) header_size %d", 
-                                     (int)header_size);
-       }
-
-       NDR_PULL_NEED_BYTES(ndr, r_content_size);
-
-       subndr = talloc_zero(ndr, struct ndr_pull);
-       NDR_ERR_HAVE_NO_MEMORY(subndr);
-       subndr->flags           = ndr->flags;
-       subndr->current_mem_ctx = ndr->current_mem_ctx;
-
-       subndr->data = ndr->data + ndr->offset;
-       subndr->offset = 0;
-       subndr->data_size = r_content_size;
-
-       *_subndr = subndr;
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ enum ndr_err_code ndr_pull_subcontext_end(struct ndr_pull *ndr,
-                                struct ndr_pull *subndr,
-                                size_t header_size,
-                                ssize_t size_is)
-{
-       uint32_t advance;
-       if (size_is >= 0) {
-               advance = size_is;
-       } else if (header_size > 0) {
-               advance = subndr->data_size;
-       } else {
-               advance = subndr->offset;
-       }
-       NDR_CHECK(ndr_pull_advance(ndr, advance));
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ enum ndr_err_code ndr_push_subcontext_start(struct ndr_push *ndr,
-                                  struct ndr_push **_subndr,
-                                  size_t header_size,
-                                  ssize_t size_is)
-{
-       struct ndr_push *subndr;
-
-       subndr = ndr_push_init_ctx(ndr);
-       NDR_ERR_HAVE_NO_MEMORY(subndr);
-       subndr->flags   = ndr->flags;
-
-       *_subndr = subndr;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push a subcontext header 
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_subcontext_end(struct ndr_push *ndr,
-                                struct ndr_push *subndr,
-                                size_t header_size,
-                                ssize_t size_is)
-{
-       if (size_is >= 0) {
-               ssize_t padding_len = size_is - subndr->offset;
-               if (padding_len > 0) {
-                       NDR_CHECK(ndr_push_zero(subndr, padding_len));
-               } else if (padding_len < 0) {
-                       return ndr_push_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PUSH) content_size %d is larger than size_is(%d)",
-                                             (int)subndr->offset, (int)size_is);
-               }
-       }
-
-       switch (header_size) {
-       case 0: 
-               break;
-
-       case 2: 
-               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, subndr->offset));
-               break;
-
-       case 4: 
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, subndr->offset));
-               break;
-
-       default:
-               return ndr_push_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext header size %d", 
-                                     (int)header_size);
-       }
-
-       NDR_CHECK(ndr_push_bytes(ndr, subndr->data, subndr->offset));
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  store a token in the ndr context, for later retrieval
-*/
-_PUBLIC_ enum ndr_err_code ndr_token_store(TALLOC_CTX *mem_ctx,
-                        struct ndr_token_list **list, 
-                        const void *key, 
-                        uint32_t value)
-{
-       struct ndr_token_list *tok;
-       tok = talloc(mem_ctx, struct ndr_token_list);
-       NDR_ERR_HAVE_NO_MEMORY(tok);
-       tok->key = key;
-       tok->value = value;
-       DLIST_ADD((*list), tok);
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  retrieve a token from a ndr context, using cmp_fn to match the tokens
-*/
-_PUBLIC_ enum ndr_err_code ndr_token_retrieve_cmp_fn(struct ndr_token_list **list, const void *key, uint32_t *v,
-                                  comparison_fn_t _cmp_fn, bool _remove_tok)
-{
-       struct ndr_token_list *tok;
-       for (tok=*list;tok;tok=tok->next) {
-               if (_cmp_fn && _cmp_fn(tok->key,key)==0) goto found;
-               else if (!_cmp_fn && tok->key == key) goto found;
-       }
-       return NDR_ERR_TOKEN;
-found:
-       *v = tok->value;
-       if (_remove_tok) {
-               DLIST_REMOVE((*list), tok);
-               talloc_free(tok);
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  retrieve a token from a ndr context
-*/
-_PUBLIC_ enum ndr_err_code ndr_token_retrieve(struct ndr_token_list **list, const void *key, uint32_t *v)
-{
-       return ndr_token_retrieve_cmp_fn(list, key, v, NULL, true);
-}
-
-/*
-  peek at but don't removed a token from a ndr context
-*/
-_PUBLIC_ uint32_t ndr_token_peek(struct ndr_token_list **list, const void *key)
-{
-       enum ndr_err_code status;
-       uint32_t v;
-
-       status = ndr_token_retrieve_cmp_fn(list, key, &v, NULL, false);
-       if (!NDR_ERR_CODE_IS_SUCCESS(status)) {
-               return 0;
-       }
-
-       return v;
-}
-
-/*
-  pull an array size field and add it to the array_size_list token list
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_array_size(struct ndr_pull *ndr, const void *p)
-{
-       uint32_t size;
-       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &size));
-       return ndr_token_store(ndr, &ndr->array_size_list, p, size);
-}
-
-/*
-  get the stored array size field
-*/
-_PUBLIC_ uint32_t ndr_get_array_size(struct ndr_pull *ndr, const void *p)
-{
-       return ndr_token_peek(&ndr->array_size_list, p);
-}
-
-/*
-  check the stored array size field
-*/
-_PUBLIC_ enum ndr_err_code ndr_check_array_size(struct ndr_pull *ndr, void *p, uint32_t size)
-{
-       uint32_t stored;
-       stored = ndr_token_peek(&ndr->array_size_list, p);
-       if (stored != size) {
-               return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, 
-                                     "Bad array size - got %u expected %u\n",
-                                     stored, size);
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  pull an array length field and add it to the array_length_list token list
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_array_length(struct ndr_pull *ndr, const void *p)
-{
-       uint32_t length, offset;
-       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &offset));
-       if (offset != 0) {
-               return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, 
-                                     "non-zero array offset %u\n", offset);
-       }
-       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &length));
-       return ndr_token_store(ndr, &ndr->array_length_list, p, length);
-}
-
-/*
-  get the stored array length field
-*/
-_PUBLIC_ uint32_t ndr_get_array_length(struct ndr_pull *ndr, const void *p)
-{
-       return ndr_token_peek(&ndr->array_length_list, p);
-}
-
-/*
-  check the stored array length field
-*/
-_PUBLIC_ enum ndr_err_code ndr_check_array_length(struct ndr_pull *ndr, void *p, uint32_t length)
-{
-       uint32_t stored;
-       stored = ndr_token_peek(&ndr->array_length_list, p);
-       if (stored != length) {
-               return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, 
-                                     "Bad array length - got %u expected %u\n",
-                                     stored, length);
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  store a switch value
- */
-_PUBLIC_ enum ndr_err_code ndr_push_set_switch_value(struct ndr_push *ndr, const void *p, uint32_t val)
-{
-       return ndr_token_store(ndr, &ndr->switch_list, p, val);
-}
-
-_PUBLIC_ enum ndr_err_code ndr_pull_set_switch_value(struct ndr_pull *ndr, const void *p, uint32_t val)
-{
-       return ndr_token_store(ndr, &ndr->switch_list, p, val);
-}
-
-_PUBLIC_ enum ndr_err_code ndr_print_set_switch_value(struct ndr_print *ndr, const void *p, uint32_t val)
-{
-       return ndr_token_store(ndr, &ndr->switch_list, p, val);
-}
-
-/*
-  retrieve a switch value
- */
-_PUBLIC_ uint32_t ndr_push_get_switch_value(struct ndr_push *ndr, const void *p)
-{
-       return ndr_token_peek(&ndr->switch_list, p);
-}
-
-_PUBLIC_ uint32_t ndr_pull_get_switch_value(struct ndr_pull *ndr, const void *p)
-{
-       return ndr_token_peek(&ndr->switch_list, p);
-}
-
-_PUBLIC_ uint32_t ndr_print_get_switch_value(struct ndr_print *ndr, const void *p)
-{
-       return ndr_token_peek(&ndr->switch_list, p);
-}
-
-/*
-  pull a struct from a blob using NDR
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_struct_blob(const DATA_BLOB *blob,
-                                               TALLOC_CTX *mem_ctx,
-                                               struct smb_iconv_convenience *iconv_convenience,
-                                               void *p,
-                                               ndr_pull_flags_fn_t fn)
-{
-       struct ndr_pull *ndr;
-       ndr = ndr_pull_init_blob(blob, mem_ctx, iconv_convenience);
-       NDR_ERR_HAVE_NO_MEMORY(ndr);
-       NDR_CHECK(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p));
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  pull a struct from a blob using NDR - failing if all bytes are not consumed
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_struct_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
-                                                   struct smb_iconv_convenience *iconv_convenience,
-                                                   void *p, ndr_pull_flags_fn_t fn)
-{
-       struct ndr_pull *ndr;
-       ndr = ndr_pull_init_blob(blob, mem_ctx, iconv_convenience);
-       NDR_ERR_HAVE_NO_MEMORY(ndr);
-       NDR_CHECK(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p));
-       if (ndr->offset < ndr->data_size) {
-               return ndr_pull_error(ndr, NDR_ERR_UNREAD_BYTES,
-                                     "not all bytes consumed ofs[%u] size[%u]",
-                                     ndr->offset, ndr->data_size);
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  pull a union from a blob using NDR, given the union discriminator
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_union_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
-                            uint32_t level, ndr_pull_flags_fn_t fn)
-{
-       struct ndr_pull *ndr;
-       ndr = ndr_pull_init_blob(blob, mem_ctx, NULL);
-       NDR_ERR_HAVE_NO_MEMORY(ndr);
-       NDR_CHECK(ndr_pull_set_switch_value(ndr, p, level));
-       NDR_CHECK(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p));
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  pull a union from a blob using NDR, given the union discriminator,
-  failing if all bytes are not consumed
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_union_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
-                            uint32_t level, ndr_pull_flags_fn_t fn)
-{
-       struct ndr_pull *ndr;
-       ndr = ndr_pull_init_blob(blob, mem_ctx, NULL);
-       NDR_ERR_HAVE_NO_MEMORY(ndr);
-       NDR_CHECK(ndr_pull_set_switch_value(ndr, p, level));
-       NDR_CHECK(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p));
-       if (ndr->offset < ndr->data_size) {
-               return ndr_pull_error(ndr, NDR_ERR_UNREAD_BYTES,
-                                     "not all bytes consumed ofs[%u] size[%u]",
-                                     ndr->offset, ndr->data_size);
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push a struct to a blob using NDR
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_struct_blob(DATA_BLOB *blob,
-                                               TALLOC_CTX *mem_ctx,
-                                               struct smb_iconv_convenience *iconv_convenience,
-                                               const void *p,
-                                               ndr_push_flags_fn_t fn)
-{
-       struct ndr_push *ndr;
-       ndr = ndr_push_init_ctx(mem_ctx);
-       NDR_ERR_HAVE_NO_MEMORY(ndr);
-
-       NDR_CHECK(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p));
-
-       *blob = ndr_push_blob(ndr);
-       talloc_steal(mem_ctx, blob->data);
-       talloc_free(ndr);
-
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push a union to a blob using NDR
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p,
-                            uint32_t level, ndr_push_flags_fn_t fn)
-{
-       struct ndr_push *ndr;
-       ndr = ndr_push_init_ctx(mem_ctx);
-       NDR_ERR_HAVE_NO_MEMORY(ndr);
-
-       NDR_CHECK(ndr_push_set_switch_value(ndr, p, level));
-       NDR_CHECK(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p));
-
-       *blob = ndr_push_blob(ndr);
-       talloc_steal(mem_ctx, blob->data);
-       talloc_free(ndr);
-
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  generic ndr_size_*() handler for structures
-*/
-_PUBLIC_ size_t ndr_size_struct(const void *p, int flags, ndr_push_flags_fn_t push)
-{
-       struct ndr_push *ndr;
-       enum ndr_err_code status;
-       size_t ret;
-
-       /* avoid recursion */
-       if (flags & LIBNDR_FLAG_NO_NDR_SIZE) return 0;
-
-       ndr = ndr_push_init_ctx(NULL);
-       if (!ndr) return 0;
-       ndr->flags |= flags | LIBNDR_FLAG_NO_NDR_SIZE;
-       status = push(ndr, NDR_SCALARS|NDR_BUFFERS, discard_const(p));
-       if (!NDR_ERR_CODE_IS_SUCCESS(status)) {
-               talloc_free(ndr);
-               return 0;
-       }
-       ret = ndr->offset;
-       talloc_free(ndr);
-       return ret;
-}
-
-/*
-  generic ndr_size_*() handler for unions
-*/
-_PUBLIC_ size_t ndr_size_union(const void *p, int flags, uint32_t level, ndr_push_flags_fn_t push)
-{
-       struct ndr_push *ndr;
-       enum ndr_err_code status;
-       size_t ret;
-
-       /* avoid recursion */
-       if (flags & LIBNDR_FLAG_NO_NDR_SIZE) return 0;
-
-       ndr = ndr_push_init_ctx(NULL);
-       if (!ndr) return 0;
-       ndr->flags |= flags | LIBNDR_FLAG_NO_NDR_SIZE;
-
-       status = ndr_push_set_switch_value(ndr, p, level);
-       if (!NDR_ERR_CODE_IS_SUCCESS(status)) {
-               talloc_free(ndr);
-               return 0;
-       }
-       status = push(ndr, NDR_SCALARS|NDR_BUFFERS, p);
-       if (!NDR_ERR_CODE_IS_SUCCESS(status)) {
-               talloc_free(ndr);
-               return 0;
-       }
-       ret = ndr->offset;
-       talloc_free(ndr);
-       return ret;
-}
-
-/*
-  get the current base for relative pointers for the push
-*/
-_PUBLIC_ uint32_t ndr_push_get_relative_base_offset(struct ndr_push *ndr)
-{
-       return ndr->relative_base_offset;
-}
-
-/*
-  restore the old base for relative pointers for the push
-*/
-_PUBLIC_ void ndr_push_restore_relative_base_offset(struct ndr_push *ndr, uint32_t offset)
-{
-       ndr->relative_base_offset = offset;
-}
-
-/*
-  setup the current base for relative pointers for the push
-  called in the NDR_SCALAR stage
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_setup_relative_base_offset1(struct ndr_push *ndr, const void *p, uint32_t offset)
-{
-       ndr->relative_base_offset = offset;
-       return ndr_token_store(ndr, &ndr->relative_base_list, p, offset);
-}
-
-/*
-  setup the current base for relative pointers for the push
-  called in the NDR_BUFFERS stage
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_setup_relative_base_offset2(struct ndr_push *ndr, const void *p)
-{
-       return ndr_token_retrieve(&ndr->relative_base_list, p, &ndr->relative_base_offset);
-}
-
-/*
-  push a relative object - stage1
-  this is called during SCALARS processing
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_relative_ptr1(struct ndr_push *ndr, const void *p)
-{
-       if (p == NULL) {
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
-               return NDR_ERR_SUCCESS;
-       }
-       NDR_CHECK(ndr_push_align(ndr, 4));
-       NDR_CHECK(ndr_token_store(ndr, &ndr->relative_list, p, ndr->offset));
-       return ndr_push_uint32(ndr, NDR_SCALARS, 0xFFFFFFFF);
-}
-
-/*
-  push a relative object - stage2
-  this is called during buffers processing
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_relative_ptr2(struct ndr_push *ndr, const void *p)
-{
-       struct ndr_push_save save;
-       uint32_t ptr_offset = 0xFFFFFFFF;
-       if (p == NULL) {
-               return NDR_ERR_SUCCESS;
-       }
-       ndr_push_save(ndr, &save);
-       NDR_CHECK(ndr_token_retrieve(&ndr->relative_list, p, &ptr_offset));
-       if (ptr_offset > ndr->offset) {
-               return ndr_push_error(ndr, NDR_ERR_BUFSIZE, 
-                                     "ndr_push_relative_ptr2 ptr_offset(%u) > ndr->offset(%u)",
-                                     ptr_offset, ndr->offset);
-       }
-       ndr->offset = ptr_offset;
-       if (save.offset < ndr->relative_base_offset) {
-               return ndr_push_error(ndr, NDR_ERR_BUFSIZE, 
-                                     "ndr_push_relative_ptr2 save.offset(%u) < ndr->relative_base_offset(%u)",
-                                     save.offset, ndr->relative_base_offset);
-       }       
-       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, save.offset - ndr->relative_base_offset));
-       ndr_push_restore(ndr, &save);
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  get the current base for relative pointers for the pull
-*/
-_PUBLIC_ uint32_t ndr_pull_get_relative_base_offset(struct ndr_pull *ndr)
-{
-       return ndr->relative_base_offset;
-}
-
-/*
-  restore the old base for relative pointers for the pull
-*/
-_PUBLIC_ void ndr_pull_restore_relative_base_offset(struct ndr_pull *ndr, uint32_t offset)
-{
-       ndr->relative_base_offset = offset;
-}
-
-/*
-  setup the current base for relative pointers for the pull
-  called in the NDR_SCALAR stage
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_setup_relative_base_offset1(struct ndr_pull *ndr, const void *p, uint32_t offset)
-{
-       ndr->relative_base_offset = offset;
-       return ndr_token_store(ndr, &ndr->relative_base_list, p, offset);
-}
-
-/*
-  setup the current base for relative pointers for the pull
-  called in the NDR_BUFFERS stage
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_setup_relative_base_offset2(struct ndr_pull *ndr, const void *p)
-{
-       return ndr_token_retrieve(&ndr->relative_base_list, p, &ndr->relative_base_offset);
-}
-
-/*
-  pull a relative object - stage1
-  called during SCALARS processing
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_relative_ptr1(struct ndr_pull *ndr, const void *p, uint32_t rel_offset)
-{
-       rel_offset += ndr->relative_base_offset;
-       if (rel_offset > ndr->data_size) {
-               return ndr_pull_error(ndr, NDR_ERR_BUFSIZE, 
-                                     "ndr_pull_relative_ptr1 rel_offset(%u) > ndr->data_size(%u)",
-                                     rel_offset, ndr->data_size);
-       }
-       return ndr_token_store(ndr, &ndr->relative_list, p, rel_offset);
-}
-
-/*
-  pull a relative object - stage2
-  called during BUFFERS processing
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_relative_ptr2(struct ndr_pull *ndr, const void *p)
-{
-       uint32_t rel_offset;
-       NDR_CHECK(ndr_token_retrieve(&ndr->relative_list, p, &rel_offset));
-       return ndr_pull_set_offset(ndr, rel_offset);
-}
diff --git a/source3/librpc/ndr/ndr_basic.c b/source3/librpc/ndr/ndr_basic.c
deleted file mode 100644 (file)
index c8fa70b..0000000
+++ /dev/null
@@ -1,859 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-
-   routines for marshalling/unmarshalling basic types
-
-   Copyright (C) Andrew Tridgell 2003
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-#include "system/network.h"
-#include "librpc/ndr/libndr.h"
-
-#define NDR_SVAL(ndr, ofs) (NDR_BE(ndr)?RSVAL(ndr->data,ofs):SVAL(ndr->data,ofs))
-#define NDR_IVAL(ndr, ofs) (NDR_BE(ndr)?RIVAL(ndr->data,ofs):IVAL(ndr->data,ofs))
-#define NDR_IVALS(ndr, ofs) (NDR_BE(ndr)?RIVALS(ndr->data,ofs):IVALS(ndr->data,ofs))
-#define NDR_SSVAL(ndr, ofs, v) do { if (NDR_BE(ndr))  { RSSVAL(ndr->data,ofs,v); } else SSVAL(ndr->data,ofs,v); } while (0)
-#define NDR_SIVAL(ndr, ofs, v) do { if (NDR_BE(ndr))  { RSIVAL(ndr->data,ofs,v); } else SIVAL(ndr->data,ofs,v); } while (0)
-#define NDR_SIVALS(ndr, ofs, v) do { if (NDR_BE(ndr))  { RSIVALS(ndr->data,ofs,v); } else SIVALS(ndr->data,ofs,v); } while (0)
-
-
-/*
-  check for data leaks from the server by looking for non-zero pad bytes
-  these could also indicate that real structure elements have been
-  mistaken for padding in the IDL
-*/
-_PUBLIC_ void ndr_check_padding(struct ndr_pull *ndr, size_t n)
-{
-       size_t ofs2 = (ndr->offset + (n-1)) & ~(n-1);
-       int i;
-       for (i=ndr->offset;i<ofs2;i++) {
-               if (ndr->data[i] != 0) {
-                       break;
-               }
-       }
-       if (i<ofs2) {
-               DEBUG(0,("WARNING: Non-zero padding to %d: ", (int)n));
-               for (i=ndr->offset;i<ofs2;i++) {
-                       DEBUG(0,("%02x ", ndr->data[i]));
-               }
-               DEBUG(0,("\n"));
-       }
-
-}
-
-/*
-  parse a int8_t
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_int8(struct ndr_pull *ndr, int ndr_flags, int8_t *v)
-{
-       NDR_PULL_NEED_BYTES(ndr, 1);
-       *v = (int8_t)CVAL(ndr->data, ndr->offset);
-       ndr->offset += 1;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  parse a uint8_t
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *v)
-{
-       NDR_PULL_NEED_BYTES(ndr, 1);
-       *v = CVAL(ndr->data, ndr->offset);
-       ndr->offset += 1;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  parse a int16_t
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_int16(struct ndr_pull *ndr, int ndr_flags, int16_t *v)
-{
-       NDR_PULL_ALIGN(ndr, 2);
-       NDR_PULL_NEED_BYTES(ndr, 2);
-       *v = (uint16_t)NDR_SVAL(ndr, ndr->offset);
-       ndr->offset += 2;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  parse a uint16_t
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_uint16(struct ndr_pull *ndr, int ndr_flags, uint16_t *v)
-{
-       NDR_PULL_ALIGN(ndr, 2);
-       NDR_PULL_NEED_BYTES(ndr, 2);
-       *v = NDR_SVAL(ndr, ndr->offset);
-       ndr->offset += 2;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  parse a int32_t
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_int32(struct ndr_pull *ndr, int ndr_flags, int32_t *v)
-{
-       NDR_PULL_ALIGN(ndr, 4);
-       NDR_PULL_NEED_BYTES(ndr, 4);
-       *v = NDR_IVALS(ndr, ndr->offset);
-       ndr->offset += 4;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  parse a uint32_t
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *v)
-{
-       NDR_PULL_ALIGN(ndr, 4);
-       NDR_PULL_NEED_BYTES(ndr, 4);
-       *v = NDR_IVAL(ndr, ndr->offset);
-       ndr->offset += 4;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  parse a pointer referent identifier
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_generic_ptr(struct ndr_pull *ndr, uint32_t *v)
-{
-       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, v));
-       if (*v != 0) {
-               ndr->ptr_count++;
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  parse a ref pointer referent identifier
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_ref_ptr(struct ndr_pull *ndr, uint32_t *v)
-{
-       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, v));
-       /* ref pointers always point to data */
-       *v = 1;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  parse a udlong
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_udlong(struct ndr_pull *ndr, int ndr_flags, uint64_t *v)
-{
-       NDR_PULL_ALIGN(ndr, 4);
-       NDR_PULL_NEED_BYTES(ndr, 8);
-       *v = NDR_IVAL(ndr, ndr->offset);
-       *v |= (uint64_t)(NDR_IVAL(ndr, ndr->offset+4)) << 32;
-       ndr->offset += 8;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  parse a udlongr
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_udlongr(struct ndr_pull *ndr, int ndr_flags, uint64_t *v)
-{
-       NDR_PULL_ALIGN(ndr, 4);
-       NDR_PULL_NEED_BYTES(ndr, 8);
-       *v = ((uint64_t)NDR_IVAL(ndr, ndr->offset)) << 32;
-       *v |= NDR_IVAL(ndr, ndr->offset+4);
-       ndr->offset += 8;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  parse a dlong
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_dlong(struct ndr_pull *ndr, int ndr_flags, int64_t *v)
-{
-       return ndr_pull_udlong(ndr, ndr_flags, (uint64_t *)v);
-}
-
-/*
-  parse a hyper
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_hyper(struct ndr_pull *ndr, int ndr_flags, uint64_t *v)
-{
-       NDR_PULL_ALIGN(ndr, 8);
-       return ndr_pull_udlong(ndr, ndr_flags, v);
-}
-
-/*
-  parse a pointer
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_pointer(struct ndr_pull *ndr, int ndr_flags, void* *v)
-{
-       uintptr_t h;
-       NDR_PULL_ALIGN(ndr, sizeof(h));
-       NDR_PULL_NEED_BYTES(ndr, sizeof(h));
-       memcpy(&h, ndr->data+ndr->offset, sizeof(h));
-       ndr->offset += sizeof(h);
-       *v = (void *)h;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  pull a NTSTATUS
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_NTSTATUS(struct ndr_pull *ndr, int ndr_flags, NTSTATUS *status)
-{
-       uint32_t v;
-       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
-       *status = NT_STATUS(v);
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push a NTSTATUS
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_NTSTATUS(struct ndr_push *ndr, int ndr_flags, NTSTATUS status)
-{
-       return ndr_push_uint32(ndr, ndr_flags, NT_STATUS_V(status));
-}
-
-_PUBLIC_ void ndr_print_NTSTATUS(struct ndr_print *ndr, const char *name, NTSTATUS r)
-{
-       ndr->print(ndr, "%-25s: %s", name, nt_errstr(r));
-}
-
-/*
-  pull a WERROR
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_WERROR(struct ndr_pull *ndr, int ndr_flags, WERROR *status)
-{
-       uint32_t v;
-       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
-       *status = W_ERROR(v);
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push a WERROR
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_WERROR(struct ndr_push *ndr, int ndr_flags, WERROR status)
-{
-       return ndr_push_uint32(ndr, NDR_SCALARS, W_ERROR_V(status));
-}
-
-_PUBLIC_ void ndr_print_WERROR(struct ndr_print *ndr, const char *name, WERROR r)
-{
-       ndr->print(ndr, "%-25s: %s", name, win_errstr(r));
-}
-
-/*
-  parse a set of bytes
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_bytes(struct ndr_pull *ndr, uint8_t *data, uint32_t n)
-{
-       NDR_PULL_NEED_BYTES(ndr, n);
-       memcpy(data, ndr->data + ndr->offset, n);
-       ndr->offset += n;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  pull an array of uint8
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *data, uint32_t n)
-{
-       if (!(ndr_flags & NDR_SCALARS)) {
-               return NDR_ERR_SUCCESS;
-       }
-       return ndr_pull_bytes(ndr, data, n);
-}
-
-/*
-  push a int8_t
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_int8(struct ndr_push *ndr, int ndr_flags, int8_t v)
-{
-       NDR_PUSH_NEED_BYTES(ndr, 1);
-       SCVAL(ndr->data, ndr->offset, (uint8_t)v);
-       ndr->offset += 1;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push a uint8_t
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_uint8(struct ndr_push *ndr, int ndr_flags, uint8_t v)
-{
-       NDR_PUSH_NEED_BYTES(ndr, 1);
-       SCVAL(ndr->data, ndr->offset, v);
-       ndr->offset += 1;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push a int16_t
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_int16(struct ndr_push *ndr, int ndr_flags, int16_t v)
-{
-       NDR_PUSH_ALIGN(ndr, 2);
-       NDR_PUSH_NEED_BYTES(ndr, 2);
-       NDR_SSVAL(ndr, ndr->offset, (uint16_t)v);
-       ndr->offset += 2;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push a uint16_t
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_uint16(struct ndr_push *ndr, int ndr_flags, uint16_t v)
-{
-       NDR_PUSH_ALIGN(ndr, 2);
-       NDR_PUSH_NEED_BYTES(ndr, 2);
-       NDR_SSVAL(ndr, ndr->offset, v);
-       ndr->offset += 2;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push a int32_t
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_int32(struct ndr_push *ndr, int ndr_flags, int32_t v)
-{
-       NDR_PUSH_ALIGN(ndr, 4);
-       NDR_PUSH_NEED_BYTES(ndr, 4);
-       NDR_SIVALS(ndr, ndr->offset, v);
-       ndr->offset += 4;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push a uint32_t
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_uint32(struct ndr_push *ndr, int ndr_flags, uint32_t v)
-{
-       NDR_PUSH_ALIGN(ndr, 4);
-       NDR_PUSH_NEED_BYTES(ndr, 4);
-       NDR_SIVAL(ndr, ndr->offset, v);
-       ndr->offset += 4;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push a udlong
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_udlong(struct ndr_push *ndr, int ndr_flags, uint64_t v)
-{
-       NDR_PUSH_ALIGN(ndr, 4);
-       NDR_PUSH_NEED_BYTES(ndr, 8);
-       NDR_SIVAL(ndr, ndr->offset, (v & 0xFFFFFFFF));
-       NDR_SIVAL(ndr, ndr->offset+4, (v>>32));
-       ndr->offset += 8;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push a udlongr
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_udlongr(struct ndr_push *ndr, int ndr_flags, uint64_t v)
-{
-       NDR_PUSH_ALIGN(ndr, 4);
-       NDR_PUSH_NEED_BYTES(ndr, 8);
-       NDR_SIVAL(ndr, ndr->offset, (v>>32));
-       NDR_SIVAL(ndr, ndr->offset+4, (v & 0xFFFFFFFF));
-       ndr->offset += 8;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push a dlong
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_dlong(struct ndr_push *ndr, int ndr_flags, int64_t v)
-{
-       return ndr_push_udlong(ndr, NDR_SCALARS, (uint64_t)v);
-}
-
-/*
-  push a hyper
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_hyper(struct ndr_push *ndr, int ndr_flags, uint64_t v)
-{
-       NDR_PUSH_ALIGN(ndr, 8);
-       return ndr_push_udlong(ndr, NDR_SCALARS, v);
-}
-
-/*
-  push a pointer
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_pointer(struct ndr_push *ndr, int ndr_flags, void* v)
-{
-       uintptr_t h = (intptr_t)v;
-       NDR_PUSH_ALIGN(ndr, sizeof(h));
-       NDR_PUSH_NEED_BYTES(ndr, sizeof(h));
-       memcpy(ndr->data+ndr->offset, &h, sizeof(h));
-       ndr->offset += sizeof(h);
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ enum ndr_err_code ndr_push_align(struct ndr_push *ndr, size_t size)
-{
-       NDR_PUSH_ALIGN(ndr, size);
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ enum ndr_err_code ndr_pull_align(struct ndr_pull *ndr, size_t size)
-{
-       NDR_PULL_ALIGN(ndr, size);
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push some bytes
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_bytes(struct ndr_push *ndr, const uint8_t *data, uint32_t n)
-{
-       NDR_PUSH_NEED_BYTES(ndr, n);
-       memcpy(ndr->data + ndr->offset, data, n);
-       ndr->offset += n;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push some zero bytes
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_zero(struct ndr_push *ndr, uint32_t n)
-{
-       NDR_PUSH_NEED_BYTES(ndr, n);
-       memset(ndr->data + ndr->offset, 0, n);
-       ndr->offset += n;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push an array of uint8
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const uint8_t *data, uint32_t n)
-{
-       if (!(ndr_flags & NDR_SCALARS)) {
-               return NDR_ERR_SUCCESS;
-       }
-       return ndr_push_bytes(ndr, data, n);
-}
-
-/*
-  save the current position
- */
-_PUBLIC_ void ndr_push_save(struct ndr_push *ndr, struct ndr_push_save *save)
-{
-       save->offset = ndr->offset;
-}
-
-/*
-  restore the position
- */
-_PUBLIC_ void ndr_push_restore(struct ndr_push *ndr, struct ndr_push_save *save)
-{
-       ndr->offset = save->offset;
-}
-
-/*
-  push a unique non-zero value if a pointer is non-NULL, otherwise 0
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_unique_ptr(struct ndr_push *ndr, const void *p)
-{
-       uint32_t ptr = 0;
-       if (p) {
-               ptr = ndr->ptr_count * 4;
-               ptr |= 0x00020000;
-               ndr->ptr_count++;
-       }
-       return ndr_push_uint32(ndr, NDR_SCALARS, ptr);
-}
-
-/*
-  push a 'simple' full non-zero value if a pointer is non-NULL, otherwise 0
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_full_ptr(struct ndr_push *ndr, const void *p)
-{
-       uint32_t ptr = 0;
-       if (p) {
-               /* Check if the pointer already exists and has an id */
-               ptr = ndr_token_peek(&ndr->full_ptr_list, p);
-               if (ptr == 0) {
-                       ndr->ptr_count++;
-                       ptr = ndr->ptr_count;
-                       ndr_token_store(ndr, &ndr->full_ptr_list, p, ptr);
-               }
-       }
-       return ndr_push_uint32(ndr, NDR_SCALARS, ptr);
-}
-
-/*
-  push always a 0, if a pointer is NULL it's a fatal error
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_ref_ptr(struct ndr_push *ndr)
-{
-       return ndr_push_uint32(ndr, NDR_SCALARS, 0xAEF1AEF1);
-}
-
-
-/*
-  push a NTTIME
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_NTTIME(struct ndr_push *ndr, int ndr_flags, NTTIME t)
-{
-       NDR_CHECK(ndr_push_udlong(ndr, ndr_flags, t));
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  pull a NTTIME
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_NTTIME(struct ndr_pull *ndr, int ndr_flags, NTTIME *t)
-{
-       NDR_CHECK(ndr_pull_udlong(ndr, ndr_flags, t));
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push a NTTIME
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_NTTIME_1sec(struct ndr_push *ndr, int ndr_flags, NTTIME t)
-{
-       t /= 10000000;
-       NDR_CHECK(ndr_push_hyper(ndr, ndr_flags, t));
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  pull a NTTIME_1sec
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_NTTIME_1sec(struct ndr_pull *ndr, int ndr_flags, NTTIME *t)
-{
-       NDR_CHECK(ndr_pull_hyper(ndr, ndr_flags, t));
-       (*t) *= 10000000;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  pull a NTTIME_hyper
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_NTTIME_hyper(struct ndr_pull *ndr, int ndr_flags, NTTIME *t)
-{
-       NDR_CHECK(ndr_pull_hyper(ndr, ndr_flags, t));
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push a NTTIME_hyper
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_NTTIME_hyper(struct ndr_push *ndr, int ndr_flags, NTTIME t)
-{
-       NDR_CHECK(ndr_push_hyper(ndr, ndr_flags, t));
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push a time_t
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_time_t(struct ndr_push *ndr, int ndr_flags, time_t t)
-{
-       return ndr_push_uint32(ndr, ndr_flags, t);
-}
-
-/*
-  pull a time_t
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_time_t(struct ndr_pull *ndr, int ndr_flags, time_t *t)
-{
-       uint32_t tt;
-       NDR_CHECK(ndr_pull_uint32(ndr, ndr_flags, &tt));
-       *t = tt;
-       return NDR_ERR_SUCCESS;
-}
-
-
-/*
-  pull a ipv4address
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_ipv4address(struct ndr_pull *ndr, int ndr_flags, const char **address)
-{
-       struct in_addr in;
-       NDR_CHECK(ndr_pull_uint32(ndr, ndr_flags, &in.s_addr));
-       in.s_addr = htonl(in.s_addr);
-       *address = talloc_strdup(ndr->current_mem_ctx, inet_ntoa(in));
-       NDR_ERR_HAVE_NO_MEMORY(*address);
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push a ipv4address
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_ipv4address(struct ndr_push *ndr, int ndr_flags, const char *address)
-{
-       uint32_t addr;
-       if (!is_ipaddress(address)) {
-               return ndr_push_error(ndr, NDR_ERR_IPV4ADDRESS,
-                                     "Invalid IPv4 address: '%s'", 
-                                     address);
-       }
-       addr = inet_addr(address);
-       NDR_CHECK(ndr_push_uint32(ndr, ndr_flags, htonl(addr)));
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  print a ipv4address
-*/
-_PUBLIC_ void ndr_print_ipv4address(struct ndr_print *ndr, const char *name, 
-                          const char *address)
-{
-       ndr->print(ndr, "%-25s: %s", name, address);
-}
-
-
-_PUBLIC_ void ndr_print_struct(struct ndr_print *ndr, const char *name, const char *type)
-{
-       ndr->print(ndr, "%s: struct %s", name, type);
-}
-
-_PUBLIC_ void ndr_print_enum(struct ndr_print *ndr, const char *name, const char *type, 
-                   const char *val, uint32_t value)
-{
-       if (ndr->flags & LIBNDR_PRINT_ARRAY_HEX) {
-               ndr->print(ndr, "%-25s: %s (0x%X)", name, val?val:"UNKNOWN_ENUM_VALUE", value);
-       } else {
-               ndr->print(ndr, "%-25s: %s (%d)", name, val?val:"UNKNOWN_ENUM_VALUE", value);
-       }
-}
-
-_PUBLIC_ void ndr_print_bitmap_flag(struct ndr_print *ndr, size_t size, const char *flag_name, uint32_t flag, uint32_t value)
-{
-       /* this is an attempt to support multi-bit bitmap masks */
-       value &= flag;
-
-       while (!(flag & 1)) {
-               flag >>= 1;
-               value >>= 1;
-       }       
-       if (flag == 1) {
-               ndr->print(ndr, "   %d: %-25s", value, flag_name);
-       } else {
-               ndr->print(ndr, "0x%02x: %-25s (%d)", value, flag_name, value);
-       }
-}
-
-_PUBLIC_ void ndr_print_int8(struct ndr_print *ndr, const char *name, int8_t v)
-{
-       ndr->print(ndr, "%-25s: %d", name, v);
-}
-
-_PUBLIC_ void ndr_print_uint8(struct ndr_print *ndr, const char *name, uint8_t v)
-{
-       ndr->print(ndr, "%-25s: 0x%02x (%u)", name, v, v);
-}
-
-_PUBLIC_ void ndr_print_int16(struct ndr_print *ndr, const char *name, int16_t v)
-{
-       ndr->print(ndr, "%-25s: %d", name, v);
-}
-
-_PUBLIC_ void ndr_print_uint16(struct ndr_print *ndr, const char *name, uint16_t v)
-{
-       ndr->print(ndr, "%-25s: 0x%04x (%u)", name, v, v);
-}
-
-_PUBLIC_ void ndr_print_int32(struct ndr_print *ndr, const char *name, int32_t v)
-{
-       ndr->print(ndr, "%-25s: %d", name, v);
-}
-
-_PUBLIC_ void ndr_print_uint32(struct ndr_print *ndr, const char *name, uint32_t v)
-{
-       ndr->print(ndr, "%-25s: 0x%08x (%u)", name, v, v);
-}
-
-_PUBLIC_ void ndr_print_udlong(struct ndr_print *ndr, const char *name, uint64_t v)
-{
-       ndr->print(ndr, "%-25s: 0x%016llx (%llu)", name, (unsigned long long)v, (unsigned long long)v);
-}
-
-_PUBLIC_ void ndr_print_udlongr(struct ndr_print *ndr, const char *name, uint64_t v)
-{
-       ndr_print_udlong(ndr, name, v);
-}
-
-_PUBLIC_ void ndr_print_dlong(struct ndr_print *ndr, const char *name, int64_t v)
-{
-       ndr->print(ndr, "%-25s: 0x%016llx (%lld)", name, (unsigned long long)v, (long long)v);
-}
-
-_PUBLIC_ void ndr_print_hyper(struct ndr_print *ndr, const char *name, uint64_t v)
-{
-       ndr_print_dlong(ndr, name, v);
-}
-
-_PUBLIC_ void ndr_print_pointer(struct ndr_print *ndr, const char *name, void *v)
-{
-       ndr->print(ndr, "%-25s: %p", name, v);
-}
-
-_PUBLIC_ void ndr_print_ptr(struct ndr_print *ndr, const char *name, const void *p)
-{
-       if (p) {
-               ndr->print(ndr, "%-25s: *", name);
-       } else {
-               ndr->print(ndr, "%-25s: NULL", name);
-       }
-}
-
-_PUBLIC_ void ndr_print_NTTIME(struct ndr_print *ndr, const char *name, NTTIME t)
-{
-       ndr->print(ndr, "%-25s: %s", name, nt_time_string(ndr, t));
-}
-
-_PUBLIC_ void ndr_print_NTTIME_1sec(struct ndr_print *ndr, const char *name, NTTIME t)
-{
-       /* this is a standard NTTIME here
-        * as it's already converted in the pull/push code
-        */
-       ndr_print_NTTIME(ndr, name, t);
-}
-
-_PUBLIC_ void ndr_print_NTTIME_hyper(struct ndr_print *ndr, const char *name, NTTIME t)
-{
-       ndr_print_NTTIME(ndr, name, t);
-}
-
-_PUBLIC_ void ndr_print_time_t(struct ndr_print *ndr, const char *name, time_t t)
-{
-       if (t == (time_t)-1 || t == 0) {
-               ndr->print(ndr, "%-25s: (time_t)%d", name, (int)t);
-       } else {
-               ndr->print(ndr, "%-25s: %s", name, timestring(ndr, t));
-       }
-}
-
-_PUBLIC_ void ndr_print_union(struct ndr_print *ndr, const char *name, int level, const char *type)
-{
-       if (ndr->flags & LIBNDR_PRINT_ARRAY_HEX) {
-               ndr->print(ndr, "%-25s: union %s(case 0x%X)", name, type, level);
-       } else {
-               ndr->print(ndr, "%-25s: union %s(case %d)", name, type, level);
-       }
-}
-
-_PUBLIC_ void ndr_print_bad_level(struct ndr_print *ndr, const char *name, uint16_t level)
-{
-       ndr->print(ndr, "UNKNOWN LEVEL %u", level);
-}
-
-_PUBLIC_ void ndr_print_array_uint8(struct ndr_print *ndr, const char *name, 
-                          const uint8_t *data, uint32_t count)
-{
-       int i;
-
-       if (count <= 600 && (ndr->flags & LIBNDR_PRINT_ARRAY_HEX)) {
-               char s[1202];
-               for (i=0;i<count;i++) {
-                       snprintf(&s[i*2], 3, "%02x", data[i]);
-               }
-               s[i*2] = 0;
-               ndr->print(ndr, "%-25s: %s", name, s);
-               return;
-       }
-
-       ndr->print(ndr, "%s: ARRAY(%d)", name, count);
-       ndr->depth++;
-       for (i=0;i<count;i++) {
-               char *idx=NULL;
-               if (asprintf(&idx, "[%d]", i) != -1) {
-                       ndr_print_uint8(ndr, idx, data[i]);
-                       free(idx);
-               }
-       }
-       ndr->depth--;   
-}
-
-_PUBLIC_ void ndr_print_DATA_BLOB(struct ndr_print *ndr, const char *name, DATA_BLOB r)
-{
-       ndr->print(ndr, "%-25s: DATA_BLOB length=%u", name, (unsigned)r.length);
-       if (r.length) {
-               dump_data(10, r.data, r.length);
-       }
-}
-
-
-/*
-  push a DATA_BLOB onto the wire. 
-*/
-_PUBLIC_ enum ndr_err_code ndr_push_DATA_BLOB(struct ndr_push *ndr, int ndr_flags, DATA_BLOB blob)
-{
-       if (ndr->flags & LIBNDR_ALIGN_FLAGS) {
-               if (ndr->flags & LIBNDR_FLAG_ALIGN2) {
-                       blob.length = NDR_ALIGN(ndr, 2);
-               } else if (ndr->flags & LIBNDR_FLAG_ALIGN4) {
-                       blob.length = NDR_ALIGN(ndr, 4);
-               } else if (ndr->flags & LIBNDR_FLAG_ALIGN8) {
-                       blob.length = NDR_ALIGN(ndr, 8);
-               }
-               NDR_PUSH_ALLOC_SIZE(ndr, blob.data, blob.length);
-               data_blob_clear(&blob);
-       } else if (!(ndr->flags & LIBNDR_FLAG_REMAINING)) {
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, blob.length));
-       }
-       NDR_CHECK(ndr_push_bytes(ndr, blob.data, blob.length));
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  pull a DATA_BLOB from the wire. 
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_DATA_BLOB(struct ndr_pull *ndr, int ndr_flags, DATA_BLOB *blob)
-{
-       uint32_t length = 0;
-
-       if (ndr->flags & LIBNDR_ALIGN_FLAGS) {
-               if (ndr->flags & LIBNDR_FLAG_ALIGN2) {
-                       length = NDR_ALIGN(ndr, 2);
-               } else if (ndr->flags & LIBNDR_FLAG_ALIGN4) {
-                       length = NDR_ALIGN(ndr, 4);
-               } else if (ndr->flags & LIBNDR_FLAG_ALIGN8) {
-                       length = NDR_ALIGN(ndr, 8);
-               }
-               if (ndr->data_size - ndr->offset < length) {
-                       length = ndr->data_size - ndr->offset;
-               }
-       } else if (ndr->flags & LIBNDR_FLAG_REMAINING) {
-               length = ndr->data_size - ndr->offset;
-       } else {
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &length));
-       }
-       NDR_PULL_NEED_BYTES(ndr, length);
-       *blob = data_blob_talloc(ndr->current_mem_ctx, ndr->data+ndr->offset, length);
-       ndr->offset += length;
-       return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ uint32_t ndr_size_DATA_BLOB(int ret, const DATA_BLOB *data, int flags)
-{
-       if (!data) return ret;
-       return ret + data->length;
-}
-
-_PUBLIC_ void ndr_print_bool(struct ndr_print *ndr, const char *name, const bool b)
-{
-       ndr->print(ndr, "%-25s: %s", name, b?"true":"false");
-}
-
-_PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss)
-{
-       char addr[INET6_ADDRSTRLEN];
-       ndr->print(ndr, "%-25s: %s", name, print_sockaddr(addr, sizeof(addr), ss));
-}
diff --git a/source3/librpc/ndr/ndr_compression.c b/source3/librpc/ndr/ndr_compression.c
deleted file mode 100644 (file)
index c1eae0b..0000000
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
-   Unix SMB/CIFS implementation.
-
-   libndr compression support
-
-   Copyright (C) Stefan Metzmacher 2005
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-#include "../compression/mszip.h"
-#include "librpc/ndr/libndr.h"
-#include "librpc/ndr/ndr_compression.h"
-
-static enum ndr_err_code ndr_pull_compression_mszip_chunk(struct ndr_pull *ndrpull,
-                                                struct ndr_push *ndrpush,
-                                                struct decomp_state *decomp_state,
-                                                bool *last)
-{
-       DATA_BLOB comp_chunk;
-       uint32_t comp_chunk_offset;
-       uint32_t comp_chunk_size;
-       DATA_BLOB plain_chunk;
-       uint32_t plain_chunk_offset;
-       uint32_t plain_chunk_size;
-       int ret;
-
-       NDR_CHECK(ndr_pull_uint32(ndrpull, NDR_SCALARS, &plain_chunk_size));
-       if (plain_chunk_size > 0x00008000) {
-               return ndr_pull_error(ndrpull, NDR_ERR_COMPRESSION, "Bad MSZIP plain chunk size %08X > 0x00008000 (PULL)",
-                                     plain_chunk_size);
-       }
-
-       NDR_CHECK(ndr_pull_uint32(ndrpull, NDR_SCALARS, &comp_chunk_size));
-
-       DEBUG(10,("MSZIP plain_chunk_size: %08X (%u) comp_chunk_size: %08X (%u)\n",
-                 plain_chunk_size, plain_chunk_size, comp_chunk_size, comp_chunk_size));
-
-       comp_chunk_offset = ndrpull->offset;
-       NDR_CHECK(ndr_pull_advance(ndrpull, comp_chunk_size));
-       comp_chunk.length = comp_chunk_size;
-       comp_chunk.data = ndrpull->data + comp_chunk_offset;
-
-       plain_chunk_offset = ndrpush->offset;
-       NDR_CHECK(ndr_push_zero(ndrpush, plain_chunk_size));
-       plain_chunk.length = plain_chunk_size;
-       plain_chunk.data = ndrpush->data + plain_chunk_offset;
-
-       ret = ZIPdecompress(decomp_state, &comp_chunk, &plain_chunk);
-       if (ret != DECR_OK) {
-               return ndr_pull_error(ndrpull, NDR_ERR_COMPRESSION, "Bad ZIPdecompress() error %d (PULL)",
-                                     ret);
-       }
-
-       if ((plain_chunk_size < 0x00008000) || (ndrpull->offset+4 >= ndrpull->data_size)) {
-               /* this is the last chunk */
-               *last = true;
-       }
-
-       return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_compression_mszip(struct ndr_pull *subndr,
-                                          struct ndr_pull **_comndr,
-                                          ssize_t decompressed_len)
-{
-       struct ndr_push *ndrpush;
-       struct ndr_pull *comndr;
-       DATA_BLOB uncompressed;
-       uint32_t payload_header[4];
-       uint32_t payload_size;
-       uint32_t payload_offset;
-       uint8_t *payload;
-       struct decomp_state *decomp_state;
-       bool last = false;
-
-       ndrpush = ndr_push_init_ctx(subndr);
-       NDR_ERR_HAVE_NO_MEMORY(ndrpush);
-
-       decomp_state = ZIPdecomp_state(subndr);
-       NDR_ERR_HAVE_NO_MEMORY(decomp_state);
-
-       while (!last) {
-               NDR_CHECK(ndr_pull_compression_mszip_chunk(subndr, ndrpush, decomp_state, &last));
-       }
-
-       uncompressed = ndr_push_blob(ndrpush);
-
-       if (uncompressed.length != decompressed_len) {
-               return ndr_pull_error(subndr, NDR_ERR_COMPRESSION, "Bad MSZIP uncompressed_len [%u] != [%d] (PULL)",
-                                     (int)uncompressed.length, (int)decompressed_len);
-       }
-
-       comndr = talloc_zero(subndr, struct ndr_pull);
-       NDR_ERR_HAVE_NO_MEMORY(comndr);
-       comndr->flags           = subndr->flags;
-       comndr->current_mem_ctx = subndr->current_mem_ctx;
-
-       comndr->data            = uncompressed.data;
-       comndr->data_size       = uncompressed.length;
-       comndr->offset          = 0;
-
-       NDR_CHECK(ndr_pull_uint32(comndr, NDR_SCALARS, &payload_header[0]));
-       NDR_CHECK(ndr_pull_uint32(comndr, NDR_SCALARS, &payload_header[1]));
-       NDR_CHECK(ndr_pull_uint32(comndr, NDR_SCALARS, &payload_header[2]));
-       NDR_CHECK(ndr_pull_uint32(comndr, NDR_SCALARS, &payload_header[3]));
-
-       if (payload_header[0] != 0x00081001) {
-               return ndr_pull_error(subndr, NDR_ERR_COMPRESSION, "Bad MSZIP payload_header[0] [0x%08X] != [0x00081001] (PULL)",
-                                     payload_header[0]);
-       }
-       if (payload_header[1] != 0xCCCCCCCC) {
-               return ndr_pull_error(subndr, NDR_ERR_COMPRESSION, "Bad MSZIP payload_header[1] [0x%08X] != [0xCCCCCCCC] (PULL)",
-                                     payload_header[1]);
-       }
-
-       payload_size = payload_header[2];
-
-       if (payload_header[3] != 0x00000000) {
-               return ndr_pull_error(subndr, NDR_ERR_COMPRESSION, "Bad MSZIP payload_header[3] [0x%08X] != [0x00000000] (PULL)",
-                                     payload_header[3]);
-       }
-
-       payload_offset = comndr->offset;
-       NDR_CHECK(ndr_pull_advance(comndr, payload_size));
-       payload = comndr->data + payload_offset;
-
-       comndr->data            = payload;
-       comndr->data_size       = payload_size;
-       comndr->offset          = 0;
-
-       *_comndr = comndr;
-       return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_push_compression_mszip(struct ndr_push *subndr,
-                                          struct ndr_push *comndr)
-{
-       return ndr_push_error(subndr, NDR_ERR_COMPRESSION, "Sorry MSZIP compression is not supported yet (PUSH)");
-}
-
-static enum ndr_err_code ndr_pull_compression_xpress_chunk(struct ndr_pull *ndrpull,
-                                                 struct ndr_push *ndrpush,
-                                                 bool *last)
-{
-       DATA_BLOB comp_chunk;
-       uint32_t comp_chunk_offset;
-       uint32_t comp_chunk_size;
-       uint32_t plain_chunk_size;
-
-       comp_chunk_offset = ndrpull->offset;
-
-       NDR_CHECK(ndr_pull_uint32(ndrpull, NDR_SCALARS, &plain_chunk_size));
-       if (plain_chunk_size > 0x00010000) {
-               return ndr_pull_error(ndrpull, NDR_ERR_COMPRESSION, "Bad XPRESS plain chunk size %08X > 0x00010000 (PULL)",
-                                     plain_chunk_size);
-       }
-
-       NDR_CHECK(ndr_pull_uint32(ndrpull, NDR_SCALARS, &comp_chunk_size));
-
-       NDR_CHECK(ndr_pull_advance(ndrpull, comp_chunk_size));
-       comp_chunk.length = comp_chunk_size + 8;
-       comp_chunk.data = ndrpull->data + comp_chunk_offset;
-
-       DEBUG(10,("XPRESS plain_chunk_size: %08X (%u) comp_chunk_size: %08X (%u)\n",
-                 plain_chunk_size, plain_chunk_size, comp_chunk_size, comp_chunk_size));
-
-       /* For now, we just copy over the compressed blob */
-       NDR_CHECK(ndr_push_bytes(ndrpush, comp_chunk.data, comp_chunk.length));
-
-       if ((plain_chunk_size < 0x00010000) || (ndrpull->offset+4 >= ndrpull->data_size)) {
-               /* this is the last chunk */
-               *last = true;
-       }
-
-       return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_compression_xpress(struct ndr_pull *subndr,
-                                           struct ndr_pull **_comndr,
-                                           ssize_t decompressed_len)
-{
-       struct ndr_push *ndrpush;
-       struct ndr_pull *comndr;
-       DATA_BLOB uncompressed;
-       bool last = false;
-
-       ndrpush = ndr_push_init_ctx(subndr);
-       NDR_ERR_HAVE_NO_MEMORY(ndrpush);
-
-       while (!last) {
-               NDR_CHECK(ndr_pull_compression_xpress_chunk(subndr, ndrpush, &last));
-       }
-
-       uncompressed = ndr_push_blob(ndrpush);
-
-       comndr = talloc_zero(subndr, struct ndr_pull);
-       NDR_ERR_HAVE_NO_MEMORY(comndr);
-       comndr->flags           = subndr->flags;
-       comndr->current_mem_ctx = subndr->current_mem_ctx;
-
-       comndr->data            = uncompressed.data;
-       comndr->data_size       = uncompressed.length;
-       comndr->offset          = 0;
-
-       *_comndr = comndr;
-       return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_push_compression_xpress(struct ndr_push *subndr,
-                                           struct ndr_push *comndr)
-{
-       return ndr_push_error(subndr, NDR_ERR_COMPRESSION, "XPRESS compression is not supported yet (PUSH)");
-}
-
-/*
-  handle compressed subcontext buffers, which in midl land are user-marshalled, but
-  we use magic in pidl to make them easier to cope with
-*/
-enum ndr_err_code ndr_pull_compression_start(struct ndr_pull *subndr,
-                                   struct ndr_pull **_comndr,
-                                   enum ndr_compression_alg compression_alg,
-                                   ssize_t decompressed_len)
-{
-       switch (compression_alg) {
-       case NDR_COMPRESSION_MSZIP:
-               return ndr_pull_compression_mszip(subndr, _comndr, decompressed_len);
-       case NDR_COMPRESSION_XPRESS:
-               return ndr_pull_compression_xpress(subndr, _comndr, decompressed_len);
-       default:
-               return ndr_pull_error(subndr, NDR_ERR_COMPRESSION, "Bad compression algorithm %d (PULL)",
-                                     compression_alg);
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_pull_compression_end(struct ndr_pull *subndr,
-                                 struct ndr_pull *comndr,
-                                 enum ndr_compression_alg compression_alg,
-                                 ssize_t decompressed_len)
-{
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push a compressed subcontext
-*/
-enum ndr_err_code ndr_push_compression_start(struct ndr_push *subndr,
-                                   struct ndr_push **_comndr,
-                                   enum ndr_compression_alg compression_alg,
-                                   ssize_t decompressed_len)
-{
-       struct ndr_push *comndr;
-
-       comndr = ndr_push_init_ctx(subndr);
-       NDR_ERR_HAVE_NO_MEMORY(comndr);
-       comndr->flags   = subndr->flags;
-
-       *_comndr = comndr;
-       return NDR_ERR_SUCCESS;
-}
-
-/*
-  push a compressed subcontext
-*/
-enum ndr_err_code ndr_push_compression_end(struct ndr_push *subndr,
-                                 struct ndr_push *comndr,
-                                 enum ndr_compression_alg compression_alg,
-                                 ssize_t decompressed_len)
-{
-       switch (compression_alg) {
-       case NDR_COMPRESSION_MSZIP:
-               return ndr_push_compression_mszip(subndr, comndr);
-       case NDR_COMPRESSION_XPRESS:
-               return ndr_push_compression_xpress(subndr, comndr);
-       default:
-               return ndr_push_error(subndr, NDR_ERR_COMPRESSION, "Bad compression algorithm %d (PUSH)",
-                                     compression_alg);
-       }
-       return NDR_ERR_SUCCESS;
-}
diff --git a/source3/librpc/ndr/ndr_drsuapi.c b/source3/librpc/ndr/ndr_drsuapi.c
deleted file mode 100644 (file)
index aeb81c8..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
-   Unix SMB/CIFS implementation.
-
-   routines for printing some linked list structs in DRSUAPI
-
-   Copyright (C) Stefan (metze) Metzmacher 2005
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-#include "includes.h"
-#include "librpc/gen_ndr/ndr_drsuapi.h"
-#include "librpc/gen_ndr/ndr_misc.h"
-
-void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char *name,
-                                              const struct drsuapi_DsReplicaObjectListItem *r)
-{
-       ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectListItem");
-       ndr->depth++;
-       ndr_print_ptr(ndr, "next_object", r->next_object);
-       ndr_print_drsuapi_DsReplicaObject(ndr, "object", &r->object);
-       ndr->depth--;
-       if (r->next_object) {
-               ndr_print_drsuapi_DsReplicaObjectListItem(ndr, "next_object", r->next_object);
-       }
-}
-
-void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectListItemEx *r)
-{
-       ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectListItemEx");
-       ndr->depth++;
-       ndr_print_ptr(ndr, "next_object", r->next_object);
-       ndr_print_drsuapi_DsReplicaObject(ndr, "object", &r->object);
-       ndr_print_uint32(ndr, "is_nc_prefix", r->is_nc_prefix);
-       ndr_print_ptr(ndr, "parent_object_guid", r->parent_object_guid);
-       ndr->depth++;
-       if (r->parent_object_guid) {
-               ndr_print_GUID(ndr, "parent_object_guid", r->parent_object_guid);
-       }
-       ndr->depth--;
-       ndr_print_ptr(ndr, "meta_data_ctr", r->meta_data_ctr);
-       ndr->depth++;
-       if (r->meta_data_ctr) {
-               ndr_print_drsuapi_DsReplicaMetaDataCtr(ndr, "meta_data_ctr", r->meta_data_ctr);
-       }
-       ndr->depth--;
-       ndr->depth--;
-       if (r->next_object) {
-               ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr, "next_object", r->next_object);
-       }
-}
-
-#define _OID_PUSH_CHECK(call) do { \
-       bool _status; \
-       _status = call; \
-       if (_status != true) { \
-               return ndr_push_error(ndr, NDR_ERR_SUBCONTEXT, "OID Conversion Error: %s\n", __location__); \
-       } \
-} while (0)
-
-#define _OID_PULL_CHECK(call) do { \
-       bool _status; \
-       _status = call; \
-       if (_status != true) { \
-               return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "OID Conversion Error: %s\n", __location__); \
-       } \
-} while (0)
-
-enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOID *r)
-{
-       if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaOID_oid(r->oid, 0)));
-               NDR_CHECK(ndr_push_unique_ptr(ndr, r->oid));
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-               if (r->oid) {
-                       DATA_BLOB blob;
-
-                       if (StrnCaseCmp("ff", r->oid, 2) == 0) {
-                               blob = strhex_to_data_blob(NULL, r->oid);
-                               if (!blob.data) {
-                                       return ndr_push_error(ndr, NDR_ERR_SUBCONTEXT,
-                                                             "HEX String Conversion Error: %s\n",
-                                                             __location__);
-                               }
-                       } else {
-                               _OID_PUSH_CHECK(ber_write_OID_String(&blob, r->oid));
-                       }
-                       talloc_steal(ndr, blob.data);
-
-                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, blob.length));
-                       NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, blob.data, blob.length));
-               }
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOID *r)
-{
-       uint32_t _ptr_oid;
-       TALLOC_CTX *_mem_save_oid_0;
-       if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
-               if (r->__ndr_size < 0 || r->__ndr_size > 10000) {
-                       return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
-               }
-               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_oid));
-               if (_ptr_oid) {
-                       NDR_PULL_ALLOC(ndr, r->oid);
-               } else {
-                       r->oid = NULL;
-               }
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-               if (r->oid) {
-                       DATA_BLOB _oid_array;
-                       const char *_oid;
-
-                       _mem_save_oid_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, ndr, 0);
-                       NDR_CHECK(ndr_pull_array_size(ndr, &r->oid));
-                       _oid_array.length = ndr_get_array_size(ndr, &r->oid);
-                       NDR_PULL_ALLOC_N(ndr, _oid_array.data, _oid_array.length);
-                       NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, _oid_array.data, _oid_array.length));
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_oid_0, 0);
-
-                       if (_oid_array.length && _oid_array.data[0] == 0xFF) {
-                               _oid = data_blob_hex_string(ndr, &_oid_array);
-                               NDR_ERR_HAVE_NO_MEMORY(_oid);
-                       } else {
-                               _OID_PULL_CHECK(ber_read_OID_String(ndr, _oid_array, &_oid));
-                       }
-                       TALLOC_FREE(_oid_array.data);
-                       talloc_steal(r->oid, _oid);
-                       r->oid = _oid;
-               }
-               if (r->oid) {
-                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->oid, r->__ndr_size));
-               }
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-size_t ndr_size_drsuapi_DsReplicaOID_oid(const char *oid, int flags)
-{
-       DATA_BLOB _blob;
-       size_t ret = 0;
-
-       if (!oid) return 0;
-
-       if (StrnCaseCmp("ff", oid, 2) == 0) {
-               _blob = strhex_to_data_blob(NULL, oid);
-               if (_blob.data) {
-                       ret = _blob.length;
-               }
-       } else {
-               if (ber_write_OID_String(&_blob, oid)) {
-                       ret = _blob.length;
-               }
-       }
-       data_blob_free(&_blob);
-       return ret;
-}
diff --git a/source3/librpc/ndr/ndr_drsuapi.h b/source3/librpc/ndr/ndr_drsuapi.h
deleted file mode 100644 (file)
index c663ead..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-
-   routines for printing some linked list structs in DRSUAPI
-
-   Copyright (C) Stefan (metze) Metzmacher 2005-2006
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _LIBRPC_NDR_NDR_DRSUAPI_H
-#define _LIBRPC_NDR_NDR_DRSUAPI_H
-
-void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char *name, 
-                                              const struct drsuapi_DsReplicaObjectListItem *r);
-
-void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const char *name,
-                                                const struct drsuapi_DsReplicaObjectListItemEx *r);
-
-enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOID *r);
-enum ndr_err_code ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOID *r);
-size_t ndr_size_drsuapi_DsReplicaOID_oid(const char *oid, int flags);
-
-#endif /* _LIBRPC_NDR_NDR_DRSUAPI_H */
diff --git a/source3/librpc/ndr/ndr_krb5pac.c b/source3/librpc/ndr/ndr_krb5pac.c
deleted file mode 100644 (file)
index b0eab44..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
-   Unix SMB/CIFS implementation.
-
-   routines for marshalling/unmarshalling spoolss subcontext buffer structures
-
-   Copyright (C) Stefan Metzmacher 2005
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-#include "includes.h"
-
-#include "librpc/gen_ndr/ndr_krb5pac.h"
-
-static size_t _ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags)
-{
-       size_t s = ndr_size_PAC_INFO(r, level, flags);
-       switch (level) {
-               case PAC_TYPE_LOGON_INFO:
-                       return NDR_ROUND(s,8);
-               default:
-                       return s;
-       }
-}
-
-static size_t _subcontext_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags)
-{
-       size_t s = ndr_size_PAC_INFO(r, level, flags);
-       return NDR_ROUND(s,8);
-}
-
-enum ndr_err_code ndr_push_PAC_BUFFER(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER *r)
-{
-       if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_PAC_TYPE(ndr, NDR_SCALARS, r->type));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, _ndr_size_PAC_INFO(r->info,r->type,0)));
-               {
-                       uint32_t _flags_save_PAC_INFO = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
-                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->info));
-                       ndr->flags = _flags_save_PAC_INFO;
-               }
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-               {
-                       uint32_t _flags_save_PAC_INFO = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
-                       if (r->info) {
-                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->info));
-                               {
-                                       struct ndr_push *_ndr_info;
-                                       NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 0, _subcontext_size_PAC_INFO(r->info,r->type,0)));
-                                       NDR_CHECK(ndr_push_set_switch_value(_ndr_info, r->info, r->type));
-                                       NDR_CHECK(ndr_push_PAC_INFO(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->info));
-                                       NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 0, _subcontext_size_PAC_INFO(r->info,r->type,0)));
-                               }
-                       }
-                       ndr->flags = _flags_save_PAC_INFO;
-               }
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_pull_PAC_BUFFER(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER *r)
-{
-       uint32_t _ptr_info;
-       TALLOC_CTX *_mem_save_info_0;
-       if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_PAC_TYPE(ndr, NDR_SCALARS, &r->type));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size));
-               {
-                       uint32_t _flags_save_PAC_INFO = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
-                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
-                       if (_ptr_info) {
-                               NDR_PULL_ALLOC(ndr, r->info);
-                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->info, _ptr_info));
-                       } else {
-                               r->info = NULL;
-                       }
-                       ndr->flags = _flags_save_PAC_INFO;
-               }
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_pad));
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-               {
-                       uint32_t _flags_save_PAC_INFO = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
-                       if (r->info) {
-                               uint32_t _relative_save_offset;
-                               _relative_save_offset = ndr->offset;
-                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->info));
-                               _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                               NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
-                               {
-                                       struct ndr_pull *_ndr_info;
-                                       NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 0, r->_ndr_size));
-                                       NDR_CHECK(ndr_pull_set_switch_value(_ndr_info, r->info, r->type));
-                                       NDR_CHECK(ndr_pull_PAC_INFO(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->info));
-                                       NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 0, r->_ndr_size));
-                               }
-                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
-                               ndr->offset = _relative_save_offset;
-                       }
-                       ndr->flags = _flags_save_PAC_INFO;
-               }
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-void ndr_print_PAC_BUFFER(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER *r)
-{
-       ndr_print_struct(ndr, name, "PAC_BUFFER");
-       ndr->depth++;
-       ndr_print_PAC_TYPE(ndr, "type", r->type);
-       ndr_print_uint32(ndr, "_ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?_ndr_size_PAC_INFO(r->info,r->type,0):r->_ndr_size);
-       ndr_print_ptr(ndr, "info", r->info);
-       ndr->depth++;
-       if (r->info) {
-               ndr_print_set_switch_value(ndr, r->info, r->type);
-               ndr_print_PAC_INFO(ndr, "info", r->info);
-       }
-       ndr->depth--;
-       ndr_print_uint32(ndr, "_pad", r->_pad);
-       ndr->depth--;
-}
diff --git a/source3/librpc/ndr/ndr_misc.c b/source3/librpc/ndr/ndr_misc.c
deleted file mode 100644 (file)
index e868425..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-
-   UUID/GUID/policy_handle functions
-
-   Copyright (C) Theodore Ts'o               1996, 1997,
-   Copyright (C) Jim McDonough                     2002.
-   Copyright (C) Andrew Tridgell                   2003.
-   Copyright (C) Stefan (metze) Metzmacher         2004.
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-
-/**
- * see if a range of memory is all zero. A NULL pointer is considered
- * to be all zero 
- */
-bool all_zero(const uint8_t *ptr, size_t size)
-{
-       int i;
-       if (!ptr) return True;
-       for (i=0;i<size;i++) {
-               if (ptr[i]) return False;
-       }
-       return True;
-}
-
-void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *guid)
-{
-       ndr->print(ndr, "%-25s: %s", name, GUID_string(ndr, guid));
-}
-
-bool ndr_syntax_id_equal(const struct ndr_syntax_id *i1,
-                        const struct ndr_syntax_id *i2)
-{
-       return GUID_equal(&i1->uuid, &i2->uuid)
-               && (i1->if_version == i2->if_version);
-}
-
-enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct server_id *r)
-{
-       if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS,
-                                         (uint32_t)r->pid));
-#ifdef CLUSTER_SUPPORT
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS,
-                                         (uint32_t)r->vnn));
-#endif
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, struct server_id *r)
-{
-       if (ndr_flags & NDR_SCALARS) {
-               uint32_t pid;
-               NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &pid));
-#ifdef CLUSTER_SUPPORT
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vnn));
-#endif
-               r->pid = (pid_t)pid;
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct server_id *r)
-{
-       ndr_print_struct(ndr, name, "server_id");
-       ndr->depth++;
-       ndr_print_uint32(ndr, "id", (uint32_t)r->pid);
-#ifdef CLUSTER_SUPPORT
-       ndr_print_uint32(ndr, "vnn", (uint32_t)r->vnn);
-#endif
-       ndr->depth--;
-}
index e2c9ed59466035abe6831ca9d951e0b53cb96f04..86d7b265863d6198f3a7a7b148d2e2aa5cef8daa 100644 (file)
@@ -89,7 +89,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
                                                   &converted_size, false))
                        {
                                return ndr_pull_error(ndr, NDR_ERR_CHARCNV,
-                                                     "Bad char conversion");
+                                                     "Bad character conversion");
                        }
                }
                NDR_CHECK(ndr_pull_advance(ndr, (len2 + c_len_term)*byte_mul));
@@ -127,7 +127,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
                                                   &converted_size, false))
                        {
                                return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 
-                                                     "Bad char conversion");
+                                                     "Bad character conversion");
                        }
                }
                NDR_CHECK(ndr_pull_advance(ndr, (len1 + c_len_term)*byte_mul));
@@ -166,7 +166,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
                                                   &converted_size, false))
                        {
                                return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 
-                                                     "Bad char conversion");
+                                                     "Bad character conversion");
                        }
                }
                NDR_CHECK(ndr_pull_advance(ndr, (len1 + c_len_term)*byte_mul));
@@ -201,7 +201,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
                                                   &converted_size, false))
                        {
                                return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 
-                                                     "Bad char conversion");
+                                                     "Bad character conversion");
                        }
                }
                NDR_CHECK(ndr_pull_advance(ndr, (len3 + c_len_term)*byte_mul));
@@ -233,7 +233,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
                                                   &converted_size, false))
                        {
                                return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 
-                                                     "Bad char conversion");
+                                                     "Bad character conversion");
                        }
                }
                NDR_CHECK(ndr_pull_advance(ndr, len3));
@@ -252,28 +252,12 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
                                           &converted_size, false))
                {
                        return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 
-                                             "Bad char conversion");
+                                             "Bad character conversion");
                }
                NDR_CHECK(ndr_pull_advance(ndr, len1));
                *s = as;
                break;
 
-       case LIBNDR_FLAG_STR_FIXLEN15:
-       case LIBNDR_FLAG_STR_FIXLEN32:
-               len1 = (flags & LIBNDR_FLAG_STR_FIXLEN32)?32:15;
-               NDR_PULL_NEED_BYTES(ndr, len1*byte_mul);
-               if (!convert_string_talloc(ndr->current_mem_ctx, chset, CH_UNIX,
-                                          ndr->data+ndr->offset, len1*byte_mul,
-                                          (void **)(void *)&as,
-                                          &converted_size, false))
-               {
-                       return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 
-                                             "Bad char conversion");
-               }
-               NDR_CHECK(ndr_pull_advance(ndr, len1*byte_mul));
-               *s = as;
-               break;
-
        case LIBNDR_FLAG_STR_NOTERM:
                if (!(ndr->flags & LIBNDR_FLAG_REMAINING)) {
                        return ndr_pull_error(ndr, NDR_ERR_STRING, "Bad string flags 0x%x (missing NDR_REMAINING)\n",
@@ -293,7 +277,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
                                                   &converted_size, false))
                        {
                                return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 
-                                                     "Bad char conversion");
+                                                     "Bad character conversion");
                        }
                }
                NDR_CHECK(ndr_pull_advance(ndr, len1));
@@ -346,17 +330,14 @@ _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push *ndr, int ndr_flags,
 
        flags &= ~LIBNDR_FLAG_STR_CONFORMANT;
 
-       if (!(flags & 
-             (LIBNDR_FLAG_STR_NOTERM |
-              LIBNDR_FLAG_STR_FIXLEN15 |
-              LIBNDR_FLAG_STR_FIXLEN32))) {
+       if (!(flags & LIBNDR_FLAG_STR_NOTERM)) {
                s_len++;
        }
        if (!convert_string_talloc(ndr, CH_UNIX, chset, s, s_len,
                                   (void **)(void *)&dest, &d_len, false))
        {
                return ndr_push_error(ndr, NDR_ERR_CHARCNV, 
-                                     "Bad char conversion");
+                                     "Bad character conversion");
        }
 
        if (flags & LIBNDR_FLAG_STR_BYTESIZE) {
@@ -397,21 +378,6 @@ _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push *ndr, int ndr_flags,
                NDR_CHECK(ndr_push_bytes(ndr, dest, d_len));
                break;
 
-       case LIBNDR_FLAG_STR_FIXLEN15:
-       case LIBNDR_FLAG_STR_FIXLEN32: {
-               ssize_t fix_len = (flags & LIBNDR_FLAG_STR_FIXLEN32)?32:15;
-               uint32_t pad_len = fix_len - d_len;
-               if (d_len > fix_len) {
-                       return ndr_push_error(ndr, NDR_ERR_CHARCNV, 
-                                             "Bad char conversion");
-               }
-               NDR_CHECK(ndr_push_bytes(ndr, dest, d_len));
-               if (pad_len != 0) {
-                       NDR_CHECK(ndr_push_zero(ndr, pad_len));
-               }
-               break;
-       }
-
        default:
                if (ndr->flags & LIBNDR_FLAG_REMAINING) {
                        NDR_CHECK(ndr_push_bytes(ndr, dest, d_len));
@@ -437,13 +403,6 @@ _PUBLIC_ size_t ndr_string_array_size(struct ndr_push *ndr, const char *s)
        unsigned byte_mul = 2;
        unsigned c_len_term = 1;
 
-       if (flags & LIBNDR_FLAG_STR_FIXLEN32) {
-               return 32;
-       }
-       if (flags & LIBNDR_FLAG_STR_FIXLEN15) {
-               return 15;
-       }
-       
        c_len = s?strlen_m(s):0;
 
        if (flags & (LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_UTF8)) {
@@ -653,21 +612,21 @@ _PUBLIC_ uint32_t ndr_string_length(const void *_var, uint32_t element_size)
 _PUBLIC_ enum ndr_err_code ndr_check_string_terminator(struct ndr_pull *ndr, uint32_t count, uint32_t element_size)
 {
        uint32_t i;
-       struct ndr_pull_save save_offset;
+       uint32_t save_offset;
 
-       ndr_pull_save(ndr, &save_offset);
+       save_offset = ndr->offset;
        ndr_pull_advance(ndr, (count - 1) * element_size);
        NDR_PULL_NEED_BYTES(ndr, element_size);
 
        for (i = 0; i < element_size; i++) {
                 if (ndr->data[ndr->offset+i] != 0) {
-                       ndr_pull_restore(ndr, &save_offset);
+                       ndr->offset = save_offset;
 
                        return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "String terminator not present or outside string boundaries");
                 }
        }
 
-       ndr_pull_restore(ndr, &save_offset);
+       ndr->offset = save_offset;
 
        return NDR_ERR_SUCCESS;
 }
@@ -693,7 +652,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_charset(struct ndr_pull *ndr, int ndr_flags,
                                   &converted_size, false))
        {
                return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 
-                                     "Bad char conversion");
+                                     "Bad character conversion");
        }
        NDR_CHECK(ndr_pull_advance(ndr, length*byte_mul));
 
@@ -716,7 +675,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_charset(struct ndr_push *ndr, int ndr_flags,
                             ndr->data+ndr->offset, required, false);
        if (ret == -1) {
                return ndr_push_error(ndr, NDR_ERR_CHARCNV, 
-                                     "Bad char conversion");
+                                     "Bad character conversion");
        }
 
        /* Make sure the remaining part of the string is filled with zeroes */
diff --git a/source3/librpc/ndr/util.c b/source3/librpc/ndr/util.c
new file mode 100644 (file)
index 0000000..457615c
--- /dev/null
@@ -0,0 +1,174 @@
+/* 
+   Unix SMB/CIFS implementation.
+
+   libndr interface
+
+   Copyright (C) Andrew Tridgell 2003
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "includes.h"
+
+NTSTATUS ndr_map_error2ntstatus(enum ndr_err_code ndr_err)
+{
+       switch (ndr_err) {
+       case NDR_ERR_SUCCESS:
+               return NT_STATUS_OK;
+       case NDR_ERR_BUFSIZE:
+               return NT_STATUS_BUFFER_TOO_SMALL;
+       case NDR_ERR_TOKEN:
+               return NT_STATUS_INTERNAL_ERROR;
+       case NDR_ERR_ALLOC:
+               return NT_STATUS_NO_MEMORY;
+       case NDR_ERR_ARRAY_SIZE:
+               return NT_STATUS_ARRAY_BOUNDS_EXCEEDED;
+       case NDR_ERR_INVALID_POINTER:
+               return NT_STATUS_INVALID_PARAMETER_MIX;
+       case NDR_ERR_UNREAD_BYTES:
+               return NT_STATUS_PORT_MESSAGE_TOO_LONG;
+       default:
+               break;
+       }
+
+       /* we should map all error codes to different status codes */
+       return NT_STATUS_INVALID_PARAMETER;
+}
+
+/*
+ * Convert an ndr error to string
+ */
+
+const char *ndr_errstr(enum ndr_err_code err)
+{
+       switch (err) {
+       case NDR_ERR_SUCCESS:
+               return "NDR_ERR_SUCCESS";
+               break;
+       case NDR_ERR_ARRAY_SIZE:
+               return "NDR_ERR_ARRAY_SIZE";
+               break;
+       case NDR_ERR_BAD_SWITCH:
+               return "NDR_ERR_BAD_SWITCH";
+               break;
+       case NDR_ERR_OFFSET:
+               return "NDR_ERR_OFFSET";
+               break;
+       case NDR_ERR_RELATIVE:
+               return "NDR_ERR_RELATIVE";
+               break;
+       case NDR_ERR_CHARCNV:
+               return "NDR_ERR_CHARCNV";
+               break;
+       case NDR_ERR_LENGTH:
+               return "NDR_ERR_LENGTH";
+               break;
+       case NDR_ERR_SUBCONTEXT:
+               return "NDR_ERR_SUBCONTEXT";
+               break;
+       case NDR_ERR_COMPRESSION:
+               return "NDR_ERR_COMPRESSION";
+               break;
+       case NDR_ERR_STRING:
+               return "NDR_ERR_STRING";
+               break;
+       case NDR_ERR_VALIDATE:
+               return "NDR_ERR_VALIDATE";
+               break;
+       case NDR_ERR_BUFSIZE:
+               return "NDR_ERR_BUFSIZE";
+               break;
+       case NDR_ERR_ALLOC:
+               return "NDR_ERR_ALLOC";
+               break;
+       case NDR_ERR_RANGE:
+               return "NDR_ERR_RANGE";
+               break;
+       case NDR_ERR_TOKEN:
+               return "NDR_ERR_TOKEN";
+               break;
+       case NDR_ERR_IPV4ADDRESS:
+               return "NDR_ERR_IPV4ADDRESS";
+               break;
+       case NDR_ERR_INVALID_POINTER:
+               return "NDR_ERR_INVALID_POINTER";
+               break;
+       case NDR_ERR_UNREAD_BYTES:
+               return "NDR_ERR_UNREAD_BYTES";
+               break;
+       }
+
+       return talloc_asprintf(talloc_tos(), "Unknown NDR error: %d", err);
+}
+
+enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct server_id *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS,
+                                         (uint32_t)r->pid));
+#ifdef CLUSTER_SUPPORT
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS,
+                                         (uint32_t)r->vnn));
+#endif
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+enum ndr_err_code ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, struct server_id *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               uint32_t pid;
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &pid));
+#ifdef CLUSTER_SUPPORT
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vnn));
+#endif
+               r->pid = (pid_t)pid;
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct server_id *r)
+{
+       ndr_print_struct(ndr, name, "server_id");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "id", (uint32_t)r->pid);
+#ifdef CLUSTER_SUPPORT
+       ndr_print_uint32(ndr, "vnn", (uint32_t)r->vnn);
+#endif
+       ndr->depth--;
+}
+
+_PUBLIC_ void ndr_print_bool(struct ndr_print *ndr, const char *name, const bool b)
+{
+       ndr->print(ndr, "%-25s: %s", name, b?"true":"false");
+}
+
+_PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss)
+{
+       char addr[INET6_ADDRSTRLEN];
+       ndr->print(ndr, "%-25s: %s", name, print_sockaddr(addr, sizeof(addr), ss));
+}
+
+void *global_loadparm;
+void *cmdline_lp_ctx;
+struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx)
+{
+       return NULL;
+}
diff --git a/source3/librpc/ndr/uuid.c b/source3/librpc/ndr/uuid.c
deleted file mode 100644 (file)
index e92df22..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-
-   UUID/GUID functions
-
-   Copyright (C) Theodore Ts'o               1996, 1997,
-   Copyright (C) Jim McDonough                     2002.
-   Copyright (C) Andrew Tridgell                   2003.
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-#include "librpc/ndr/libndr.h"
-
-/**
-  build a GUID from a string
-*/
-_PUBLIC_ NTSTATUS GUID_from_string(const char *s, struct GUID *guid)
-{
-       NTSTATUS status = NT_STATUS_INVALID_PARAMETER;
-       uint32_t time_low;
-       uint32_t time_mid, time_hi_and_version;
-       uint32_t clock_seq[2];
-       uint32_t node[6];
-       int i;
-
-       if (s == NULL) {
-               return NT_STATUS_INVALID_PARAMETER;
-       }
-
-       if (11 == sscanf(s, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
-                        &time_low, &time_mid, &time_hi_and_version, 
-                        &clock_seq[0], &clock_seq[1],
-                        &node[0], &node[1], &node[2], &node[3], &node[4], &node[5])) {
-               status = NT_STATUS_OK;
-       } else if (11 == sscanf(s, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
-                               &time_low, &time_mid, &time_hi_and_version, 
-                               &clock_seq[0], &clock_seq[1],
-                               &node[0], &node[1], &node[2], &node[3], &node[4], &node[5])) {
-               status = NT_STATUS_OK;
-       }
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       guid->time_low = time_low;
-       guid->time_mid = time_mid;
-       guid->time_hi_and_version = time_hi_and_version;
-       guid->clock_seq[0] = clock_seq[0];
-       guid->clock_seq[1] = clock_seq[1];
-       for (i=0;i<6;i++) {
-               guid->node[i] = node[i];
-       }
-
-       return NT_STATUS_OK;
-}
-
-/**
-  build a GUID from a string
-*/
-_PUBLIC_ NTSTATUS NS_GUID_from_string(const char *s, struct GUID *guid)
-{
-       NTSTATUS status = NT_STATUS_INVALID_PARAMETER;
-       uint32_t time_low;
-       uint32_t time_mid, time_hi_and_version;
-       uint32_t clock_seq[2];
-       uint32_t node[6];
-       int i;
-
-       if (s == NULL) {
-               return NT_STATUS_INVALID_PARAMETER;
-       }
-
-       if (11 == sscanf(s, "%08x-%04x%04x-%02x%02x%02x%02x-%02x%02x%02x%02x",
-                        &time_low, &time_mid, &time_hi_and_version, 
-                        &clock_seq[0], &clock_seq[1],
-                        &node[0], &node[1], &node[2], &node[3], &node[4], &node[5])) {
-               status = NT_STATUS_OK;
-       }
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       guid->time_low = time_low;
-       guid->time_mid = time_mid;
-       guid->time_hi_and_version = time_hi_and_version;
-       guid->clock_seq[0] = clock_seq[0];
-       guid->clock_seq[1] = clock_seq[1];
-       for (i=0;i<6;i++) {
-               guid->node[i] = node[i];
-       }
-
-       return NT_STATUS_OK;
-}
-
-/**
- * generate a random GUID
- */
-struct GUID GUID_random(void)
-{
-       struct GUID guid;
-
-       generate_random_buffer((uint8_t *)&guid, sizeof(guid));
-       guid.clock_seq[0] = (guid.clock_seq[0] & 0x3F) | 0x80;
-       guid.time_hi_and_version = (guid.time_hi_and_version & 0x0FFF) | 0x4000;
-
-       return guid;
-}
-
-/**
- * generate an empty GUID 
- */
-_PUBLIC_ struct GUID GUID_zero(void)
-{
-       struct GUID guid;
-
-       ZERO_STRUCT(guid);
-
-       return guid;
-}
-
-_PUBLIC_ bool GUID_all_zero(const struct GUID *u)
-{
-       if (u->time_low != 0 ||
-           u->time_mid != 0 ||
-           u->time_hi_and_version != 0 ||
-           u->clock_seq[0] != 0 ||
-           u->clock_seq[1] != 0 ||
-           !all_zero(u->node, 6)) {
-               return false;
-       }
-       return true;
-}
-
-_PUBLIC_ bool GUID_equal(const struct GUID *u1, const struct GUID *u2)
-{
-       if (u1->time_low != u2->time_low ||
-           u1->time_mid != u2->time_mid ||
-           u1->time_hi_and_version != u2->time_hi_and_version ||
-           u1->clock_seq[0] != u2->clock_seq[0] ||
-           u1->clock_seq[1] != u2->clock_seq[1] ||
-           memcmp(u1->node, u2->node, 6) != 0) {
-               return false;
-       }
-       return true;
-}
-
-_PUBLIC_ int GUID_compare(const struct GUID *u1, const struct GUID *u2)
-{
-       if (u1->time_low != u2->time_low) {
-               return u1->time_low - u2->time_low;
-       }
-
-       if (u1->time_mid != u2->time_mid) {
-               return u1->time_mid - u2->time_mid;
-       }
-
-       if (u1->time_hi_and_version != u2->time_hi_and_version) {
-               return u1->time_hi_and_version - u2->time_hi_and_version;
-       }
-
-       if (u1->clock_seq[0] != u2->clock_seq[0]) {
-               return u1->clock_seq[0] - u2->clock_seq[0];
-       }
-
-       if (u1->clock_seq[1] != u2->clock_seq[1]) {
-               return u1->clock_seq[1] - u2->clock_seq[1];
-       }
-
-       return memcmp(u1->node, u2->node, 6);
-}
-
-/**
-  its useful to be able to display these in debugging messages
-*/
-_PUBLIC_ char *GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid)
-{
-       return talloc_asprintf(mem_ctx, 
-                              "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
-                              guid->time_low, guid->time_mid,
-                              guid->time_hi_and_version,
-                              guid->clock_seq[0],
-                              guid->clock_seq[1],
-                              guid->node[0], guid->node[1],
-                              guid->node[2], guid->node[3],
-                              guid->node[4], guid->node[5]);
-}
-
-_PUBLIC_ char *GUID_string2(TALLOC_CTX *mem_ctx, const struct GUID *guid)
-{
-       char *ret, *s = GUID_string(mem_ctx, guid);
-       ret = talloc_asprintf(mem_ctx, "{%s}", s);
-       talloc_free(s);
-       return ret;
-}
-
-_PUBLIC_ char *NS_GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid)
-{
-       return talloc_asprintf(mem_ctx, 
-                              "%08x-%04x%04x-%02x%02x%02x%02x-%02x%02x%02x%02x",
-                              guid->time_low, guid->time_mid,
-                              guid->time_hi_and_version,
-                              guid->clock_seq[0],
-                              guid->clock_seq[1],
-                              guid->node[0], guid->node[1],
-                              guid->node[2], guid->node[3],
-                              guid->node[4], guid->node[5]);
-}
-
-_PUBLIC_ bool policy_handle_empty(struct policy_handle *h) 
-{
-       return (h->handle_type == 0 && GUID_all_zero(&h->uuid));
-}
diff --git a/source3/librpc/rpc/binding.c b/source3/librpc/rpc/binding.c
deleted file mode 100644 (file)
index 469c5db..0000000
+++ /dev/null
@@ -1,709 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-
-   dcerpc utility functions
-
-   Copyright (C) Andrew Tridgell 2003
-   Copyright (C) Jelmer Vernooij 2004
-   Copyright (C) Andrew Bartlett <abartlet@samba.org> 2005
-   Copyright (C) Rafal Szczesniak 2006
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-
-#define MAX_PROTSEQ            10
-
-static const struct {
-       const char *name;
-       enum dcerpc_transport_t transport;
-       int num_protocols;
-       enum epm_protocol protseq[MAX_PROTSEQ];
-} transports[] = {
-       { "ncacn_np",     NCACN_NP, 3, 
-               { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_SMB, EPM_PROTOCOL_NETBIOS }},
-       { "ncacn_ip_tcp", NCACN_IP_TCP, 3, 
-               { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_TCP, EPM_PROTOCOL_IP } }, 
-       { "ncacn_http", NCACN_HTTP, 3, 
-               { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_HTTP, EPM_PROTOCOL_IP } }, 
-       { "ncadg_ip_udp", NCACN_IP_UDP, 3, 
-               { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_UDP, EPM_PROTOCOL_IP } },
-       { "ncalrpc", NCALRPC, 2, 
-               { EPM_PROTOCOL_NCALRPC, EPM_PROTOCOL_PIPE } },
-       { "ncacn_unix_stream", NCACN_UNIX_STREAM, 2, 
-               { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_UNIX_DS } },
-       { "ncadg_unix_dgram", NCADG_UNIX_DGRAM, 2, 
-               { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_UNIX_DS } },
-       { "ncacn_at_dsp", NCACN_AT_DSP, 3, 
-               { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_APPLETALK, EPM_PROTOCOL_DSP } },
-       { "ncadg_at_ddp", NCADG_AT_DDP, 3, 
-               { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_APPLETALK, EPM_PROTOCOL_DDP } },
-       { "ncacn_vns_ssp", NCACN_VNS_SPP, 3, 
-               { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_STREETTALK, EPM_PROTOCOL_VINES_SPP } },
-       { "ncacn_vns_ipc", NCACN_VNS_IPC, 3, 
-               { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_STREETTALK, EPM_PROTOCOL_VINES_IPC }, },
-       { "ncadg_ipx", NCADG_IPX, 2,
-               { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_IPX },
-       },
-       { "ncacn_spx", NCACN_SPX, 3,
-               /* I guess some MS programmer confused the identifier for 
-                * EPM_PROTOCOL_UUID (0x0D or 13) with the one for 
-                * EPM_PROTOCOL_SPX (0x13) here. -- jelmer*/
-               { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_NCALRPC, EPM_PROTOCOL_UUID },
-       },
-};
-
-static const struct {
-       const char *name;
-       uint32_t flag;
-} ncacn_options[] = {
-       { "", 0 }
-};
-
-const char *epm_floor_string(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor)
-{
-       struct ndr_syntax_id syntax;
-       NTSTATUS status;
-
-       switch(epm_floor->lhs.protocol) {
-               case EPM_PROTOCOL_UUID:
-                       status = dcerpc_floor_get_lhs_data(epm_floor, &syntax);
-                       if (NT_STATUS_IS_OK(status)) {
-                               /* lhs is used: UUID */
-                               char *uuidstr;
-
-                               if (GUID_equal(&syntax.uuid, &ndr_transfer_syntax.uuid)) {
-                                       return "NDR";
-                               } 
-
-                               if (GUID_equal(&syntax.uuid, &ndr64_transfer_syntax.uuid)) {
-                                       return "NDR64";
-                               } 
-
-                               uuidstr = GUID_string(mem_ctx, &syntax.uuid);
-
-                               return talloc_asprintf(mem_ctx, " uuid %s/0x%02x", uuidstr, syntax.if_version);
-                       } else { /* IPX */
-                               return NULL;
-                       }
-
-               case EPM_PROTOCOL_NCACN:
-                       return "RPC-C";
-
-               case EPM_PROTOCOL_NCADG:
-                       return "RPC";
-
-               case EPM_PROTOCOL_NCALRPC:
-                       return "NCALRPC";
-
-               case EPM_PROTOCOL_DNET_NSP:
-                       return "DNET/NSP";
-
-               case EPM_PROTOCOL_IP:
-                       return talloc_asprintf(mem_ctx, "IP:%s", epm_floor->rhs.ip.ipaddr);
-
-               case EPM_PROTOCOL_PIPE:
-                       return talloc_asprintf(mem_ctx, "PIPE:%s", epm_floor->rhs.pipe.path);
-
-               case EPM_PROTOCOL_SMB:
-                       return talloc_asprintf(mem_ctx, "SMB:%s", epm_floor->rhs.smb.unc);
-
-               case EPM_PROTOCOL_UNIX_DS:
-                       return talloc_asprintf(mem_ctx, "Unix:%s", epm_floor->rhs.unix_ds.path);
-
-               case EPM_PROTOCOL_NETBIOS:
-                       return talloc_asprintf(mem_ctx, "NetBIOS:%s", epm_floor->rhs.netbios.name);
-
-               case EPM_PROTOCOL_NETBEUI:
-                       return "NETBeui";
-
-               case EPM_PROTOCOL_SPX:
-                       return "SPX";
-
-               case EPM_PROTOCOL_NB_IPX:
-                       return "NB_IPX";
-
-               case EPM_PROTOCOL_HTTP:
-                       return talloc_asprintf(mem_ctx, "HTTP:%d", epm_floor->rhs.http.port);
-
-               case EPM_PROTOCOL_TCP:
-                       return talloc_asprintf(mem_ctx, "TCP:%d", epm_floor->rhs.tcp.port);
-
-               case EPM_PROTOCOL_UDP:
-                       return talloc_asprintf(mem_ctx, "UDP:%d", epm_floor->rhs.udp.port);
-
-               default:
-                       return talloc_asprintf(mem_ctx, "UNK(%02x):", epm_floor->lhs.protocol);
-       }
-}
-
-
-/*
-  form a binding string from a binding structure
-*/
-_PUBLIC_ char *dcerpc_binding_string(TALLOC_CTX *mem_ctx, const struct dcerpc_binding *b)
-{
-       char *s = talloc_strdup(mem_ctx, "");
-       int i;
-       const char *t_name = NULL;
-
-       if (b->transport != NCA_UNKNOWN) {
-               for (i=0;i<ARRAY_SIZE(transports);i++) {
-                       if (transports[i].transport == b->transport) {
-                               t_name = transports[i].name;
-                       }
-               }
-               if (!t_name) {
-                       return NULL;
-               }
-       }
-
-       if (!GUID_all_zero(&b->object.uuid)) { 
-               s = talloc_asprintf(s, "%s@",
-                                   GUID_string(mem_ctx, &b->object.uuid));
-       }
-
-       if (t_name != NULL) {
-               s = talloc_asprintf_append_buffer(s, "%s:", t_name);
-               if (s == NULL) {
-                       return NULL;
-               }
-       }
-
-       if (b->host) {
-               s = talloc_asprintf_append_buffer(s, "%s", b->host);
-       }
-
-       if (!b->endpoint && !b->options && !b->flags) {
-               return s;
-       }
-
-       s = talloc_asprintf_append_buffer(s, "[");
-
-       if (b->endpoint) {
-               s = talloc_asprintf_append_buffer(s, "%s", b->endpoint);
-       }
-
-       /* this is a *really* inefficent way of dealing with strings,
-          but this is rarely called and the strings are always short,
-          so I don't care */
-       for (i=0;b->options && b->options[i];i++) {
-               s = talloc_asprintf_append_buffer(s, ",%s", b->options[i]);
-               if (!s) return NULL;
-       }
-
-       for (i=0;i<ARRAY_SIZE(ncacn_options);i++) {
-               if (b->flags & ncacn_options[i].flag) {
-                       s = talloc_asprintf_append_buffer(s, ",%s", ncacn_options[i].name);
-                       if (!s) return NULL;
-               }
-       }
-
-       s = talloc_asprintf_append_buffer(s, "]");
-
-       return s;
-}
-
-/*
-  parse a binding string into a dcerpc_binding structure
-*/
-_PUBLIC_ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_binding **b_out)
-{
-       struct dcerpc_binding *b;
-       char *options;
-       char *p;
-       int i, j, comma_count;
-
-       b = talloc(mem_ctx, struct dcerpc_binding);
-       if (!b) {
-               return NT_STATUS_NO_MEMORY;
-       }
-
-       p = strchr(s, '@');
-
-       if (p && PTR_DIFF(p, s) == 36) { /* 36 is the length of a UUID */
-               NTSTATUS status;
-
-               status = GUID_from_string(s, &b->object.uuid);
-
-               if (NT_STATUS_IS_ERR(status)) {
-                       DEBUG(0, ("Failed parsing UUID\n"));
-                       return status;
-               }
-
-               s = p + 1;
-       } else {
-               ZERO_STRUCT(b->object);
-       }
-
-       b->object.if_version = 0;
-
-       p = strchr(s, ':');
-
-       if (p == NULL) {
-               b->transport = NCA_UNKNOWN;
-       } else {
-               char *type = talloc_strndup(mem_ctx, s, PTR_DIFF(p, s));
-               if (!type) {
-                       return NT_STATUS_NO_MEMORY;
-               }
-
-               for (i=0;i<ARRAY_SIZE(transports);i++) {
-                       if (strcmp(type, transports[i].name) == 0) {
-                               b->transport = transports[i].transport;
-                               break;
-                       }
-               }
-
-               if (i==ARRAY_SIZE(transports)) {
-                       DEBUG(0,("Unknown dcerpc transport '%s'\n", type));
-                       return NT_STATUS_INVALID_PARAMETER;
-               }
-
-               talloc_free(type);
-       
-               s = p+1;
-       }
-
-       p = strchr(s, '[');
-       if (p) {
-               b->host = talloc_strndup(b, s, PTR_DIFF(p, s));
-               options = talloc_strdup(mem_ctx, p+1);
-               if (options[strlen(options)-1] != ']') {
-                       return NT_STATUS_INVALID_PARAMETER;
-               }
-               options[strlen(options)-1] = 0;
-       } else {
-               b->host = talloc_strdup(b, s);
-               options = NULL;
-       }
-       if (!b->host) {
-               return NT_STATUS_NO_MEMORY;
-       }
-
-       b->target_hostname = b->host;
-
-       b->options = NULL;
-       b->flags = 0;
-       b->assoc_group_id = 0;
-       b->endpoint = NULL;
-
-       if (!options) {
-               *b_out = b;
-               return NT_STATUS_OK;
-       }
-
-       comma_count = count_chars(options, ',');
-
-       b->options = talloc_array(b, const char *, comma_count+2);
-       if (!b->options) {
-               return NT_STATUS_NO_MEMORY;
-       }
-
-       for (i=0; (p = strchr(options, ',')); i++) {
-               b->options[i] = talloc_strndup(b, options, PTR_DIFF(p, options));
-               if (!b->options[i]) {
-                       return NT_STATUS_NO_MEMORY;
-               }
-               options = p+1;
-       }
-       b->options[i] = options;
-       b->options[i+1] = NULL;
-
-       /* some options are pre-parsed for convenience */
-       for (i=0;b->options[i];i++) {
-               for (j=0;j<ARRAY_SIZE(ncacn_options);j++) {
-                       if (strcmp(ncacn_options[j].name, b->options[i]) == 0) {
-                               int k;
-                               b->flags |= ncacn_options[j].flag;
-                               for (k=i;b->options[k];k++) {
-                                       b->options[k] = b->options[k+1];
-                               }
-                               i--;
-                               break;
-                       }
-               }
-       }
-
-       if (b->options[0]) {
-               /* Endpoint is first option */
-               b->endpoint = b->options[0];
-               if (strlen(b->endpoint) == 0) b->endpoint = NULL;
-
-               for (i=0;b->options[i];i++) {
-                       b->options[i] = b->options[i+1];
-               }
-       }
-
-       if (b->options[0] == NULL)
-               b->options = NULL;
-       
-       *b_out = b;
-       return NT_STATUS_OK;
-}
-
-_PUBLIC_ NTSTATUS dcerpc_floor_get_lhs_data(struct epm_floor *epm_floor, struct ndr_syntax_id *syntax)
-{
-       TALLOC_CTX *mem_ctx = talloc_init("floor_get_lhs_data");
-       struct ndr_pull *ndr = ndr_pull_init_blob(&epm_floor->lhs.lhs_data, mem_ctx, NULL);
-       enum ndr_err_code ndr_err;
-       uint16_t if_version=0;
-
-       ndr->flags |= LIBNDR_FLAG_NOALIGN;
-
-       ndr_err = ndr_pull_GUID(ndr, NDR_SCALARS | NDR_BUFFERS, &syntax->uuid);
-       if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
-               talloc_free(mem_ctx);
-               return ndr_map_error2ntstatus(ndr_err);
-       }
-
-       ndr_err = ndr_pull_uint16(ndr, NDR_SCALARS, &if_version);
-       if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
-               talloc_free(mem_ctx);
-               return ndr_map_error2ntstatus(ndr_err);
-       }
-
-       syntax->if_version = if_version;
-
-       talloc_free(mem_ctx);
-
-       return NT_STATUS_OK;
-}
-
-static DATA_BLOB dcerpc_floor_pack_lhs_data(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *syntax)
-{
-       struct ndr_push *ndr = ndr_push_init_ctx(mem_ctx);
-
-       ndr->flags |= LIBNDR_FLAG_NOALIGN;
-
-       ndr_push_GUID(ndr, NDR_SCALARS | NDR_BUFFERS, &syntax->uuid);
-       ndr_push_uint16(ndr, NDR_SCALARS, syntax->if_version);
-
-       return ndr_push_blob(ndr);
-}
-
-const char *dcerpc_floor_get_rhs_data(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor)
-{
-       switch (epm_floor->lhs.protocol) {
-       case EPM_PROTOCOL_TCP:
-               if (epm_floor->rhs.tcp.port == 0) return NULL;
-               return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.tcp.port);
-               
-       case EPM_PROTOCOL_UDP:
-               if (epm_floor->rhs.udp.port == 0) return NULL;
-               return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.udp.port);
-
-       case EPM_PROTOCOL_HTTP:
-               if (epm_floor->rhs.http.port == 0) return NULL;
-               return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.http.port);
-
-       case EPM_PROTOCOL_IP:
-               return talloc_strdup(mem_ctx, epm_floor->rhs.ip.ipaddr);
-
-       case EPM_PROTOCOL_NCACN:
-               return NULL;
-
-       case EPM_PROTOCOL_NCADG:
-               return NULL;
-
-       case EPM_PROTOCOL_SMB:
-               if (strlen(epm_floor->rhs.smb.unc) == 0) return NULL;
-               return talloc_strdup(mem_ctx, epm_floor->rhs.smb.unc);
-
-       case EPM_PROTOCOL_PIPE:
-               if (strlen(epm_floor->rhs.pipe.path) == 0) return NULL;
-               return talloc_strdup(mem_ctx, epm_floor->rhs.pipe.path);
-
-       case EPM_PROTOCOL_NETBIOS:
-               if (strlen(epm_floor->rhs.netbios.name) == 0) return NULL;
-               return talloc_strdup(mem_ctx, epm_floor->rhs.netbios.name);
-
-       case EPM_PROTOCOL_NCALRPC:
-               return NULL;
-               
-       case EPM_PROTOCOL_VINES_SPP:
-               return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.vines_spp.port);
-               
-       case EPM_PROTOCOL_VINES_IPC:
-               return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.vines_ipc.port);
-               
-       case EPM_PROTOCOL_STREETTALK:
-               return talloc_strdup(mem_ctx, epm_floor->rhs.streettalk.streettalk);
-               
-       case EPM_PROTOCOL_UNIX_DS:
-               if (strlen(epm_floor->rhs.unix_ds.path) == 0) return NULL;
-               return talloc_strdup(mem_ctx, epm_floor->rhs.unix_ds.path);
-               
-       case EPM_PROTOCOL_NULL:
-               return NULL;
-
-       default:
-               DEBUG(0,("Unsupported lhs protocol %d\n", epm_floor->lhs.protocol));
-               break;
-       }
-
-       return NULL;
-}
-
-static NTSTATUS dcerpc_floor_set_rhs_data(TALLOC_CTX *mem_ctx, 
-                                         struct epm_floor *epm_floor,  
-                                         const char *data)
-{
-       switch (epm_floor->lhs.protocol) {
-       case EPM_PROTOCOL_TCP:
-               epm_floor->rhs.tcp.port = atoi(data);
-               return NT_STATUS_OK;
-               
-       case EPM_PROTOCOL_UDP:
-               epm_floor->rhs.udp.port = atoi(data);
-               return NT_STATUS_OK;
-
-       case EPM_PROTOCOL_HTTP:
-               epm_floor->rhs.http.port = atoi(data);
-               return NT_STATUS_OK;
-
-       case EPM_PROTOCOL_IP:
-               epm_floor->rhs.ip.ipaddr = talloc_strdup(mem_ctx, data);
-               NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.ip.ipaddr);
-               return NT_STATUS_OK;
-
-       case EPM_PROTOCOL_NCACN:
-               epm_floor->rhs.ncacn.minor_version = 0;
-               return NT_STATUS_OK;
-
-       case EPM_PROTOCOL_NCADG:
-               epm_floor->rhs.ncadg.minor_version = 0;
-               return NT_STATUS_OK;
-
-       case EPM_PROTOCOL_SMB:
-               epm_floor->rhs.smb.unc = talloc_strdup(mem_ctx, data);
-               NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.smb.unc);
-               return NT_STATUS_OK;
-
-       case EPM_PROTOCOL_PIPE:
-               epm_floor->rhs.pipe.path = talloc_strdup(mem_ctx, data);
-               NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.pipe.path);
-               return NT_STATUS_OK;
-
-       case EPM_PROTOCOL_NETBIOS:
-               epm_floor->rhs.netbios.name = talloc_strdup(mem_ctx, data);
-               NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.netbios.name);
-               return NT_STATUS_OK;
-
-       case EPM_PROTOCOL_NCALRPC:
-               return NT_STATUS_OK;
-               
-       case EPM_PROTOCOL_VINES_SPP:
-               epm_floor->rhs.vines_spp.port = atoi(data);
-               return NT_STATUS_OK;
-               
-       case EPM_PROTOCOL_VINES_IPC:
-               epm_floor->rhs.vines_ipc.port = atoi(data);
-               return NT_STATUS_OK;
-               
-       case EPM_PROTOCOL_STREETTALK:
-               epm_floor->rhs.streettalk.streettalk = talloc_strdup(mem_ctx, data);
-               NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.streettalk.streettalk);
-               return NT_STATUS_OK;
-               
-       case EPM_PROTOCOL_UNIX_DS:
-               epm_floor->rhs.unix_ds.path = talloc_strdup(mem_ctx, data);
-               NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.unix_ds.path);
-               return NT_STATUS_OK;
-               
-       case EPM_PROTOCOL_NULL:
-               return NT_STATUS_OK;
-
-       default:
-               DEBUG(0,("Unsupported lhs protocol %d\n", epm_floor->lhs.protocol));
-               break;
-       }
-
-       return NT_STATUS_NOT_SUPPORTED;
-}
-
-enum dcerpc_transport_t dcerpc_transport_by_endpoint_protocol(int prot)
-{
-       int i;
-
-       /* Find a transport that has 'prot' as 4th protocol */
-       for (i=0;i<ARRAY_SIZE(transports);i++) {
-               if (transports[i].num_protocols >= 2 && 
-                       transports[i].protseq[1] == prot) {
-                       return transports[i].transport;
-               }
-       }
-       
-       /* Unknown transport */
-       return (unsigned int)-1;
-}
-
-_PUBLIC_ enum dcerpc_transport_t dcerpc_transport_by_tower(struct epm_tower *tower)
-{
-       int i;
-
-       /* Find a transport that matches this tower */
-       for (i=0;i<ARRAY_SIZE(transports);i++) {
-               int j;
-               if (transports[i].num_protocols != tower->num_floors - 2) {
-                       continue; 
-               }
-
-               for (j = 0; j < transports[i].num_protocols; j++) {
-                       if (transports[i].protseq[j] != tower->floors[j+2].lhs.protocol) {
-                               break;
-                       }
-               }
-
-               if (j == transports[i].num_protocols) {
-                       return transports[i].transport;
-               }
-       }
-       
-       /* Unknown transport */
-       return (unsigned int)-1;
-}
-
-_PUBLIC_ NTSTATUS dcerpc_binding_from_tower(TALLOC_CTX *mem_ctx, 
-                                  struct epm_tower *tower, 
-                                  struct dcerpc_binding **b_out)
-{
-       NTSTATUS status;
-       struct dcerpc_binding *binding;
-
-       binding = talloc(mem_ctx, struct dcerpc_binding);
-       NT_STATUS_HAVE_NO_MEMORY(binding);
-
-       ZERO_STRUCT(binding->object);
-       binding->options = NULL;
-       binding->host = NULL;
-       binding->target_hostname = NULL;
-       binding->flags = 0;
-       binding->assoc_group_id = 0;
-
-       binding->transport = dcerpc_transport_by_tower(tower);
-
-       if (binding->transport == (unsigned int)-1) {
-               return NT_STATUS_NOT_SUPPORTED;
-       }
-
-       if (tower->num_floors < 1) {
-               return NT_STATUS_OK;
-       }
-
-       /* Set object uuid */
-       status = dcerpc_floor_get_lhs_data(&tower->floors[0], &binding->object);
-       
-       if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(1, ("Error pulling object uuid and version: %s", nt_errstr(status)));     
-               return status;
-       }
-
-       /* Ignore floor 1, it contains the NDR version info */
-       
-       binding->options = NULL;
-
-       /* Set endpoint */
-       if (tower->num_floors >= 4) {
-               binding->endpoint = dcerpc_floor_get_rhs_data(mem_ctx, &tower->floors[3]);
-       } else {
-               binding->endpoint = NULL;
-       }
-
-       /* Set network address */
-       if (tower->num_floors >= 5) {
-               binding->host = dcerpc_floor_get_rhs_data(mem_ctx, &tower->floors[4]);
-               NT_STATUS_HAVE_NO_MEMORY(binding->host);
-               binding->target_hostname = binding->host;
-       }
-       *b_out = binding;
-       return NT_STATUS_OK;
-}
-
-_PUBLIC_ NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx, struct dcerpc_binding *binding, struct epm_tower *tower)
-{
-       const enum epm_protocol *protseq = NULL;
-       int num_protocols = -1, i;
-       NTSTATUS status;
-       
-       /* Find transport */
-       for (i=0;i<ARRAY_SIZE(transports);i++) {
-               if (transports[i].transport == binding->transport) {
-                       protseq = transports[i].protseq;
-                       num_protocols = transports[i].num_protocols;
-                       break;
-               }
-       }
-
-       if (num_protocols == -1) {
-               DEBUG(0, ("Unable to find transport with id '%d'\n", binding->transport));
-               return NT_STATUS_UNSUCCESSFUL;
-       }
-
-       tower->num_floors = 2 + num_protocols;
-       tower->floors = talloc_array(mem_ctx, struct epm_floor, tower->num_floors);
-
-       /* Floor 0 */
-       tower->floors[0].lhs.protocol = EPM_PROTOCOL_UUID;
-
-       tower->floors[0].lhs.lhs_data = dcerpc_floor_pack_lhs_data(mem_ctx, &binding->object);
-
-       tower->floors[0].rhs.uuid.unknown = data_blob_talloc_zero(mem_ctx, 2);
-       
-       /* Floor 1 */
-       tower->floors[1].lhs.protocol = EPM_PROTOCOL_UUID;
-
-       tower->floors[1].lhs.lhs_data = dcerpc_floor_pack_lhs_data(mem_ctx, 
-                                                               &ndr_transfer_syntax);
-       
-       tower->floors[1].rhs.uuid.unknown = data_blob_talloc_zero(mem_ctx, 2);
-       
-       /* Floor 2 to num_protocols */
-       for (i = 0; i < num_protocols; i++) {
-               tower->floors[2 + i].lhs.protocol = protseq[i];
-               tower->floors[2 + i].lhs.lhs_data = data_blob_talloc(mem_ctx, NULL, 0);
-               ZERO_STRUCT(tower->floors[2 + i].rhs);
-               dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[2 + i], "");
-       }
-
-       /* The 4th floor contains the endpoint */
-       if (num_protocols >= 2 && binding->endpoint) {
-               status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[3], binding->endpoint);
-               if (NT_STATUS_IS_ERR(status)) {
-                       return status;
-               }
-       }
-       
-       /* The 5th contains the network address */
-       if (num_protocols >= 3 && binding->host) {
-               if (is_ipaddress(binding->host)) {
-                       status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[4], 
-                                                          binding->host);
-               } else {
-                       /* note that we don't attempt to resolve the
-                          name here - when we get a hostname here we
-                          are in the client code, and want to put in
-                          a wildcard all-zeros IP for the server to
-                          fill in */
-                       status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[4], 
-                                                          "0.0.0.0");
-               }
-               if (NT_STATUS_IS_ERR(status)) {
-                       return status;
-               }
-       }
-
-       return NT_STATUS_OK;
-}
index 7a870981fd223bd15788feed520e626f4e739d02..77bb7b33a2f9a8113faee6b03f33438ab1972172 100644 (file)
@@ -43,7 +43,7 @@ struct rpc_request *dcerpc_ndr_request_send(struct dcerpc_pipe *p, const struct
        ret->call = call;
        ret->r = r;
 
-       push = ndr_push_init_ctx(mem_ctx);
+       push = ndr_push_init_ctx(mem_ctx, NULL);
        if (!push) {
                return NULL;
        }
index 739e60a341ac260f96e81a2fb01f6a8c0e068338..1a1fd83060833a87fed49e42d8d0a8d886021c96 100644 (file)
@@ -72,4 +72,52 @@ struct dcerpc_binding {
        uint32_t assoc_group_id;
 };
 
+
+/* dcerpc pipe flags */
+#define DCERPC_DEBUG_PRINT_IN          (1<<0)
+#define DCERPC_DEBUG_PRINT_OUT         (1<<1)
+#define DCERPC_DEBUG_PRINT_BOTH (DCERPC_DEBUG_PRINT_IN | DCERPC_DEBUG_PRINT_OUT)
+
+#define DCERPC_DEBUG_VALIDATE_IN       (1<<2)
+#define DCERPC_DEBUG_VALIDATE_OUT      (1<<3)
+#define DCERPC_DEBUG_VALIDATE_BOTH (DCERPC_DEBUG_VALIDATE_IN | DCERPC_DEBUG_VALIDATE_OUT)
+
+#define DCERPC_CONNECT                 (1<<4)
+#define DCERPC_SIGN                    (1<<5)
+#define DCERPC_SEAL                    (1<<6)
+
+#define DCERPC_PUSH_BIGENDIAN          (1<<7)
+#define DCERPC_PULL_BIGENDIAN          (1<<8)
+
+#define DCERPC_SCHANNEL                (1<<9)
+
+/* use a 128 bit session key */
+#define DCERPC_SCHANNEL_128            (1<<12)
+
+/* check incoming pad bytes */
+#define DCERPC_DEBUG_PAD_CHECK         (1<<13)
+
+/* set LIBNDR_FLAG_REF_ALLOC flag when decoding NDR */
+#define DCERPC_NDR_REF_ALLOC           (1<<14)
+
+#define DCERPC_AUTH_OPTIONS    (DCERPC_SEAL|DCERPC_SIGN|DCERPC_SCHANNEL|DCERPC_AUTH_SPNEGO|DCERPC_AUTH_KRB5|DCERPC_AUTH_NTLM)
+
+/* select spnego auth */
+#define DCERPC_AUTH_SPNEGO             (1<<15)
+
+/* select krb5 auth */
+#define DCERPC_AUTH_KRB5               (1<<16)
+
+#define DCERPC_SMB2                    (1<<17)
+
+/* select NTLM auth */
+#define DCERPC_AUTH_NTLM               (1<<18)
+
+/* this triggers the DCERPC_PFC_FLAG_CONC_MPX flag in the bind request */
+#define DCERPC_CONCURRENT_MULTIPLEX     (1<<19)
+
+/* this triggers the DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN flag in the bind request */
+#define DCERPC_HEADER_SIGNING          (1<<20)
+
+
 #endif /* __DCERPC_H__ */
diff --git a/source3/librpc/rpc/dcerpc_util.c b/source3/librpc/rpc/dcerpc_util.c
deleted file mode 100644 (file)
index 3b8768c..0000000
+++ /dev/null
@@ -1,1438 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-
-   dcerpc utility functions
-
-   Copyright (C) Andrew Tridgell 2003
-   Copyright (C) Jelmer Vernooij 2004
-   Copyright (C) Andrew Bartlett <abartlet@samba.org> 2005
-   Copyright (C) Rafal Szczesniak 2006
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-#include "lib/events/events.h"
-#include "libcli/composite/composite.h"
-#include "librpc/gen_ndr/ndr_epmapper_c.h"
-#include "librpc/gen_ndr/ndr_dcerpc.h"
-#include "librpc/gen_ndr/ndr_misc.h"
-#include "librpc/rpc/dcerpc_proto.h"
-#include "auth/credentials/credentials.h"
-#include "param/param.h"
-
-/*
-  find a dcerpc call on an interface by name
-*/
-const struct ndr_interface_call *dcerpc_iface_find_call(const struct ndr_interface_table *iface,
-                                                       const char *name)
-{
-       int i;
-       for (i=0;i<iface->num_calls;i++) {
-               if (strcmp(iface->calls[i].name, name) == 0) {
-                       return &iface->calls[i];
-               }
-       }
-       return NULL;
-}
-
-/* 
-   push a ncacn_packet into a blob, potentially with auth info
-*/
-NTSTATUS ncacn_push_auth(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, 
-                        struct smb_iconv_convenience *iconv_convenience,
-                         struct ncacn_packet *pkt,
-                         struct dcerpc_auth *auth_info)
-{
-       struct ndr_push *ndr;
-       enum ndr_err_code ndr_err;
-
-       ndr = ndr_push_init_ctx(mem_ctx, iconv_convenience);
-       if (!ndr) {
-               return NT_STATUS_NO_MEMORY;
-       }
-
-       if (!(pkt->drep[0] & DCERPC_DREP_LE)) {
-               ndr->flags |= LIBNDR_FLAG_BIGENDIAN;
-       }
-
-       if (pkt->pfc_flags & DCERPC_PFC_FLAG_OBJECT_UUID) {
-               ndr->flags |= LIBNDR_FLAG_OBJECT_PRESENT;
-       }
-
-       if (auth_info) {
-               pkt->auth_length = auth_info->credentials.length;
-       } else {
-               pkt->auth_length = 0;
-       }
-
-       ndr_err = ndr_push_ncacn_packet(ndr, NDR_SCALARS|NDR_BUFFERS, pkt);
-       if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
-               return ndr_map_error2ntstatus(ndr_err);
-       }
-
-       if (auth_info) {
-               ndr_err = ndr_push_dcerpc_auth(ndr, NDR_SCALARS|NDR_BUFFERS, auth_info);
-               if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
-                       return ndr_map_error2ntstatus(ndr_err);
-               }
-       }
-
-       *blob = ndr_push_blob(ndr);
-
-       /* fill in the frag length */
-       dcerpc_set_frag_length(blob, blob->length);
-
-       return NT_STATUS_OK;
-}
-
-#define MAX_PROTSEQ            10
-
-static const struct {
-       const char *name;
-       enum dcerpc_transport_t transport;
-       int num_protocols;
-       enum epm_protocol protseq[MAX_PROTSEQ];
-} transports[] = {
-       { "ncacn_np",     NCACN_NP, 3, 
-               { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_SMB, EPM_PROTOCOL_NETBIOS }},
-       { "ncacn_ip_tcp", NCACN_IP_TCP, 3, 
-               { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_TCP, EPM_PROTOCOL_IP } }, 
-       { "ncacn_http", NCACN_HTTP, 3, 
-               { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_HTTP, EPM_PROTOCOL_IP } }, 
-       { "ncadg_ip_udp", NCACN_IP_UDP, 3, 
-               { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_UDP, EPM_PROTOCOL_IP } },
-       { "ncalrpc", NCALRPC, 2, 
-               { EPM_PROTOCOL_NCALRPC, EPM_PROTOCOL_PIPE } },
-       { "ncacn_unix_stream", NCACN_UNIX_STREAM, 2, 
-               { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_UNIX_DS } },
-       { "ncadg_unix_dgram", NCADG_UNIX_DGRAM, 2, 
-               { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_UNIX_DS } },
-       { "ncacn_at_dsp", NCACN_AT_DSP, 3, 
-               { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_APPLETALK, EPM_PROTOCOL_DSP } },
-       { "ncadg_at_ddp", NCADG_AT_DDP, 3, 
-               { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_APPLETALK, EPM_PROTOCOL_DDP } },
-       { "ncacn_vns_ssp", NCACN_VNS_SPP, 3, 
-               { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_STREETTALK, EPM_PROTOCOL_VINES_SPP } },
-       { "ncacn_vns_ipc", NCACN_VNS_IPC, 3, 
-               { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_STREETTALK, EPM_PROTOCOL_VINES_IPC }, },
-       { "ncadg_ipx", NCADG_IPX, 2,
-               { EPM_PROTOCOL_NCADG, EPM_PROTOCOL_IPX },
-       },
-       { "ncacn_spx", NCACN_SPX, 3,
-               /* I guess some MS programmer confused the identifier for 
-                * EPM_PROTOCOL_UUID (0x0D or 13) with the one for 
-                * EPM_PROTOCOL_SPX (0x13) here. -- jelmer*/
-               { EPM_PROTOCOL_NCACN, EPM_PROTOCOL_NCALRPC, EPM_PROTOCOL_UUID },
-       },
-};
-
-static const struct {
-       const char *name;
-       uint32_t flag;
-} ncacn_options[] = {
-       {"sign", DCERPC_SIGN},
-       {"seal", DCERPC_SEAL},
-       {"connect", DCERPC_CONNECT},
-       {"spnego", DCERPC_AUTH_SPNEGO},
-       {"ntlm", DCERPC_AUTH_NTLM},
-       {"krb5", DCERPC_AUTH_KRB5},
-       {"validate", DCERPC_DEBUG_VALIDATE_BOTH},
-       {"print", DCERPC_DEBUG_PRINT_BOTH},
-       {"padcheck", DCERPC_DEBUG_PAD_CHECK},
-       {"bigendian", DCERPC_PUSH_BIGENDIAN},
-       {"smb2", DCERPC_SMB2}
-};
-
-const char *epm_floor_string(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor)
-{
-       struct ndr_syntax_id syntax;
-       NTSTATUS status;
-
-       switch(epm_floor->lhs.protocol) {
-               case EPM_PROTOCOL_UUID:
-                       status = dcerpc_floor_get_lhs_data(epm_floor, &syntax);
-                       if (NT_STATUS_IS_OK(status)) {
-                               /* lhs is used: UUID */
-                               char *uuidstr;
-
-                               if (GUID_equal(&syntax.uuid, &ndr_transfer_syntax.uuid)) {
-                                       return "NDR";
-                               } 
-
-                               if (GUID_equal(&syntax.uuid, &ndr64_transfer_syntax.uuid)) {
-                                       return "NDR64";
-                               } 
-
-                               uuidstr = GUID_string(mem_ctx, &syntax.uuid);
-
-                               return talloc_asprintf(mem_ctx, " uuid %s/0x%02x", uuidstr, syntax.if_version);
-                       } else { /* IPX */
-                               return talloc_asprintf(mem_ctx, "IPX:%s", 
-                                               data_blob_hex_string(mem_ctx, &epm_floor->rhs.uuid.unknown));
-                       }
-
-               case EPM_PROTOCOL_NCACN:
-                       return "RPC-C";
-
-               case EPM_PROTOCOL_NCADG:
-                       return "RPC";
-
-               case EPM_PROTOCOL_NCALRPC:
-                       return "NCALRPC";
-
-               case EPM_PROTOCOL_DNET_NSP:
-                       return "DNET/NSP";
-
-               case EPM_PROTOCOL_IP:
-                       return talloc_asprintf(mem_ctx, "IP:%s", epm_floor->rhs.ip.ipaddr);
-
-               case EPM_PROTOCOL_PIPE:
-                       return talloc_asprintf(mem_ctx, "PIPE:%s", epm_floor->rhs.pipe.path);
-
-               case EPM_PROTOCOL_SMB:
-                       return talloc_asprintf(mem_ctx, "SMB:%s", epm_floor->rhs.smb.unc);
-
-               case EPM_PROTOCOL_UNIX_DS:
-                       return talloc_asprintf(mem_ctx, "Unix:%s", epm_floor->rhs.unix_ds.path);
-
-               case EPM_PROTOCOL_NETBIOS:
-                       return talloc_asprintf(mem_ctx, "NetBIOS:%s", epm_floor->rhs.netbios.name);
-
-               case EPM_PROTOCOL_NETBEUI:
-                       return "NETBeui";
-
-               case EPM_PROTOCOL_SPX:
-                       return "SPX";
-
-               case EPM_PROTOCOL_NB_IPX:
-                       return "NB_IPX";
-
-               case EPM_PROTOCOL_HTTP:
-                       return talloc_asprintf(mem_ctx, "HTTP:%d", epm_floor->rhs.http.port);
-
-               case EPM_PROTOCOL_TCP:
-                       return talloc_asprintf(mem_ctx, "TCP:%d", epm_floor->rhs.tcp.port);
-
-               case EPM_PROTOCOL_UDP:
-                       return talloc_asprintf(mem_ctx, "UDP:%d", epm_floor->rhs.udp.port);
-
-               default:
-                       return talloc_asprintf(mem_ctx, "UNK(%02x):", epm_floor->lhs.protocol);
-       }
-}
-
-
-/*
-  form a binding string from a binding structure
-*/
-_PUBLIC_ char *dcerpc_binding_string(TALLOC_CTX *mem_ctx, const struct dcerpc_binding *b)
-{
-       char *s = talloc_strdup(mem_ctx, "");
-       int i;
-       const char *t_name = NULL;
-
-       if (b->transport != NCA_UNKNOWN) {
-               for (i=0;i<ARRAY_SIZE(transports);i++) {
-                       if (transports[i].transport == b->transport) {
-                               t_name = transports[i].name;
-                       }
-               }
-               if (!t_name) {
-                       return NULL;
-               }
-       }
-
-       if (!GUID_all_zero(&b->object.uuid)) { 
-               s = talloc_asprintf(s, "%s@",
-                                   GUID_string(mem_ctx, &b->object.uuid));
-       }
-
-       if (t_name != NULL) {
-               s = talloc_asprintf_append_buffer(s, "%s:", t_name);
-               if (s == NULL) {
-                       return NULL;
-               }
-       }
-
-       if (b->host) {
-               s = talloc_asprintf_append_buffer(s, "%s", b->host);
-       }
-
-       if (!b->endpoint && !b->options && !b->flags) {
-               return s;
-       }
-
-       s = talloc_asprintf_append_buffer(s, "[");
-
-       if (b->endpoint) {
-               s = talloc_asprintf_append_buffer(s, "%s", b->endpoint);
-       }
-
-       /* this is a *really* inefficent way of dealing with strings,
-          but this is rarely called and the strings are always short,
-          so I don't care */
-       for (i=0;b->options && b->options[i];i++) {
-               s = talloc_asprintf_append_buffer(s, ",%s", b->options[i]);
-               if (!s) return NULL;
-       }
-
-       for (i=0;i<ARRAY_SIZE(ncacn_options);i++) {
-               if (b->flags & ncacn_options[i].flag) {
-                       s = talloc_asprintf_append_buffer(s, ",%s", ncacn_options[i].name);
-                       if (!s) return NULL;
-               }
-       }
-
-       s = talloc_asprintf_append_buffer(s, "]");
-
-       return s;
-}
-
-/*
-  parse a binding string into a dcerpc_binding structure
-*/
-_PUBLIC_ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_binding **b_out)
-{
-       struct dcerpc_binding *b;
-       char *options;
-       char *p;
-       int i, j, comma_count;
-
-       b = talloc(mem_ctx, struct dcerpc_binding);
-       if (!b) {
-               return NT_STATUS_NO_MEMORY;
-       }
-
-       p = strchr(s, '@');
-
-       if (p && PTR_DIFF(p, s) == 36) { /* 36 is the length of a UUID */
-               NTSTATUS status;
-
-               status = GUID_from_string(s, &b->object.uuid);
-
-               if (NT_STATUS_IS_ERR(status)) {
-                       DEBUG(0, ("Failed parsing UUID\n"));
-                       return status;
-               }
-
-               s = p + 1;
-       } else {
-               ZERO_STRUCT(b->object);
-       }
-
-       b->object.if_version = 0;
-
-       p = strchr(s, ':');
-
-       if (p == NULL) {
-               b->transport = NCA_UNKNOWN;
-       } else {
-               char *type = talloc_strndup(mem_ctx, s, PTR_DIFF(p, s));
-               if (!type) {
-                       return NT_STATUS_NO_MEMORY;
-               }
-
-               for (i=0;i<ARRAY_SIZE(transports);i++) {
-                       if (strcasecmp(type, transports[i].name) == 0) {
-                               b->transport = transports[i].transport;
-                               break;
-                       }
-               }
-
-               if (i==ARRAY_SIZE(transports)) {
-                       DEBUG(0,("Unknown dcerpc transport '%s'\n", type));
-                       return NT_STATUS_INVALID_PARAMETER;
-               }
-
-               talloc_free(type);
-       
-               s = p+1;
-       }
-
-       p = strchr(s, '[');
-       if (p) {
-               b->host = talloc_strndup(b, s, PTR_DIFF(p, s));
-               options = talloc_strdup(mem_ctx, p+1);
-               if (options[strlen(options)-1] != ']') {
-                       return NT_STATUS_INVALID_PARAMETER;
-               }
-               options[strlen(options)-1] = 0;
-       } else {
-               b->host = talloc_strdup(b, s);
-               options = NULL;
-       }
-       if (!b->host) {
-               return NT_STATUS_NO_MEMORY;
-       }
-
-       b->target_hostname = b->host;
-
-       b->options = NULL;
-       b->flags = 0;
-       b->assoc_group_id = 0;
-       b->endpoint = NULL;
-
-       if (!options) {
-               *b_out = b;
-               return NT_STATUS_OK;
-       }
-
-       comma_count = count_chars(options, ',');
-
-       b->options = talloc_array(b, const char *, comma_count+2);
-       if (!b->options) {
-               return NT_STATUS_NO_MEMORY;
-       }
-
-       for (i=0; (p = strchr(options, ',')); i++) {
-               b->options[i] = talloc_strndup(b, options, PTR_DIFF(p, options));
-               if (!b->options[i]) {
-                       return NT_STATUS_NO_MEMORY;
-               }
-               options = p+1;
-       }
-       b->options[i] = options;
-       b->options[i+1] = NULL;
-
-       /* some options are pre-parsed for convenience */
-       for (i=0;b->options[i];i++) {
-               for (j=0;j<ARRAY_SIZE(ncacn_options);j++) {
-                       if (strcasecmp(ncacn_options[j].name, b->options[i]) == 0) {
-                               int k;
-                               b->flags |= ncacn_options[j].flag;
-                               for (k=i;b->options[k];k++) {
-                                       b->options[k] = b->options[k+1];
-                               }
-                               i--;
-                               break;
-                       }
-               }
-       }
-
-       if (b->options[0]) {
-               /* Endpoint is first option */
-               b->endpoint = b->options[0];
-               if (strlen(b->endpoint) == 0) b->endpoint = NULL;
-
-               for (i=0;b->options[i];i++) {
-                       b->options[i] = b->options[i+1];
-               }
-       }
-
-       if (b->options[0] == NULL)
-               b->options = NULL;
-       
-       *b_out = b;
-       return NT_STATUS_OK;
-}
-
-_PUBLIC_ NTSTATUS dcerpc_floor_get_lhs_data(struct epm_floor *epm_floor, struct ndr_syntax_id *syntax)
-{
-       TALLOC_CTX *mem_ctx = talloc_init("floor_get_lhs_data");
-       struct ndr_pull *ndr = ndr_pull_init_blob(&epm_floor->lhs.lhs_data, mem_ctx, NULL);
-       enum ndr_err_code ndr_err;
-       uint16_t if_version=0;
-
-       ndr->flags |= LIBNDR_FLAG_NOALIGN;
-
-       ndr_err = ndr_pull_GUID(ndr, NDR_SCALARS | NDR_BUFFERS, &syntax->uuid);
-       if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
-               talloc_free(mem_ctx);
-               return ndr_map_error2ntstatus(ndr_err);
-       }
-
-       ndr_err = ndr_pull_uint16(ndr, NDR_SCALARS, &if_version);
-       if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
-               talloc_free(mem_ctx);
-               return ndr_map_error2ntstatus(ndr_err);
-       }
-
-       syntax->if_version = if_version;
-
-       talloc_free(mem_ctx);
-
-       return NT_STATUS_OK;
-}
-
-static DATA_BLOB dcerpc_floor_pack_lhs_data(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *syntax)
-{
-       struct ndr_push *ndr = ndr_push_init_ctx(mem_ctx, NULL);
-
-       ndr->flags |= LIBNDR_FLAG_NOALIGN;
-
-       ndr_push_GUID(ndr, NDR_SCALARS | NDR_BUFFERS, &syntax->uuid);
-       ndr_push_uint16(ndr, NDR_SCALARS, syntax->if_version);
-
-       return ndr_push_blob(ndr);
-}
-
-const char *dcerpc_floor_get_rhs_data(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor)
-{
-       switch (epm_floor->lhs.protocol) {
-       case EPM_PROTOCOL_TCP:
-               if (epm_floor->rhs.tcp.port == 0) return NULL;
-               return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.tcp.port);
-               
-       case EPM_PROTOCOL_UDP:
-               if (epm_floor->rhs.udp.port == 0) return NULL;
-               return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.udp.port);
-
-       case EPM_PROTOCOL_HTTP:
-               if (epm_floor->rhs.http.port == 0) return NULL;
-               return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.http.port);
-
-       case EPM_PROTOCOL_IP:
-               return talloc_strdup(mem_ctx, epm_floor->rhs.ip.ipaddr);
-
-       case EPM_PROTOCOL_NCACN:
-               return NULL;
-
-       case EPM_PROTOCOL_NCADG:
-               return NULL;
-
-       case EPM_PROTOCOL_SMB:
-               if (strlen(epm_floor->rhs.smb.unc) == 0) return NULL;
-               return talloc_strdup(mem_ctx, epm_floor->rhs.smb.unc);
-
-       case EPM_PROTOCOL_PIPE:
-               if (strlen(epm_floor->rhs.pipe.path) == 0) return NULL;
-               return talloc_strdup(mem_ctx, epm_floor->rhs.pipe.path);
-
-       case EPM_PROTOCOL_NETBIOS:
-               if (strlen(epm_floor->rhs.netbios.name) == 0) return NULL;
-               return talloc_strdup(mem_ctx, epm_floor->rhs.netbios.name);
-
-       case EPM_PROTOCOL_NCALRPC:
-               return NULL;
-               
-       case EPM_PROTOCOL_VINES_SPP:
-               return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.vines_spp.port);
-               
-       case EPM_PROTOCOL_VINES_IPC:
-               return talloc_asprintf(mem_ctx, "%d", epm_floor->rhs.vines_ipc.port);
-               
-       case EPM_PROTOCOL_STREETTALK:
-               return talloc_strdup(mem_ctx, epm_floor->rhs.streettalk.streettalk);
-               
-       case EPM_PROTOCOL_UNIX_DS:
-               if (strlen(epm_floor->rhs.unix_ds.path) == 0) return NULL;
-               return talloc_strdup(mem_ctx, epm_floor->rhs.unix_ds.path);
-               
-       case EPM_PROTOCOL_NULL:
-               return NULL;
-
-       default:
-               DEBUG(0,("Unsupported lhs protocol %d\n", epm_floor->lhs.protocol));
-               break;
-       }
-
-       return NULL;
-}
-
-static NTSTATUS dcerpc_floor_set_rhs_data(TALLOC_CTX *mem_ctx, 
-                                         struct epm_floor *epm_floor,  
-                                         const char *data)
-{
-       switch (epm_floor->lhs.protocol) {
-       case EPM_PROTOCOL_TCP:
-               epm_floor->rhs.tcp.port = atoi(data);
-               return NT_STATUS_OK;
-               
-       case EPM_PROTOCOL_UDP:
-               epm_floor->rhs.udp.port = atoi(data);
-               return NT_STATUS_OK;
-
-       case EPM_PROTOCOL_HTTP:
-               epm_floor->rhs.http.port = atoi(data);
-               return NT_STATUS_OK;
-
-       case EPM_PROTOCOL_IP:
-               epm_floor->rhs.ip.ipaddr = talloc_strdup(mem_ctx, data);
-               NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.ip.ipaddr);
-               return NT_STATUS_OK;
-
-       case EPM_PROTOCOL_NCACN:
-               epm_floor->rhs.ncacn.minor_version = 0;
-               return NT_STATUS_OK;
-
-       case EPM_PROTOCOL_NCADG:
-               epm_floor->rhs.ncadg.minor_version = 0;
-               return NT_STATUS_OK;
-
-       case EPM_PROTOCOL_SMB:
-               epm_floor->rhs.smb.unc = talloc_strdup(mem_ctx, data);
-               NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.smb.unc);
-               return NT_STATUS_OK;
-
-       case EPM_PROTOCOL_PIPE:
-               epm_floor->rhs.pipe.path = talloc_strdup(mem_ctx, data);
-               NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.pipe.path);
-               return NT_STATUS_OK;
-
-       case EPM_PROTOCOL_NETBIOS:
-               epm_floor->rhs.netbios.name = talloc_strdup(mem_ctx, data);
-               NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.netbios.name);
-               return NT_STATUS_OK;
-
-       case EPM_PROTOCOL_NCALRPC:
-               return NT_STATUS_OK;
-               
-       case EPM_PROTOCOL_VINES_SPP:
-               epm_floor->rhs.vines_spp.port = atoi(data);
-               return NT_STATUS_OK;
-               
-       case EPM_PROTOCOL_VINES_IPC:
-               epm_floor->rhs.vines_ipc.port = atoi(data);
-               return NT_STATUS_OK;
-               
-       case EPM_PROTOCOL_STREETTALK:
-               epm_floor->rhs.streettalk.streettalk = talloc_strdup(mem_ctx, data);
-               NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.streettalk.streettalk);
-               return NT_STATUS_OK;
-               
-       case EPM_PROTOCOL_UNIX_DS:
-               epm_floor->rhs.unix_ds.path = talloc_strdup(mem_ctx, data);
-               NT_STATUS_HAVE_NO_MEMORY(epm_floor->rhs.unix_ds.path);
-               return NT_STATUS_OK;
-               
-       case EPM_PROTOCOL_NULL:
-               return NT_STATUS_OK;
-
-       default:
-               DEBUG(0,("Unsupported lhs protocol %d\n", epm_floor->lhs.protocol));
-               break;
-       }
-
-       return NT_STATUS_NOT_SUPPORTED;
-}
-
-enum dcerpc_transport_t dcerpc_transport_by_endpoint_protocol(int prot)
-{
-       int i;
-
-       /* Find a transport that has 'prot' as 4th protocol */
-       for (i=0;i<ARRAY_SIZE(transports);i++) {
-               if (transports[i].num_protocols >= 2 && 
-                       transports[i].protseq[1] == prot) {
-                       return transports[i].transport;
-               }
-       }
-       
-       /* Unknown transport */
-       return (unsigned int)-1;
-}
-
-_PUBLIC_ enum dcerpc_transport_t dcerpc_transport_by_tower(struct epm_tower *tower)
-{
-       int i;
-
-       /* Find a transport that matches this tower */
-       for (i=0;i<ARRAY_SIZE(transports);i++) {
-               int j;
-               if (transports[i].num_protocols != tower->num_floors - 2) {
-                       continue; 
-               }
-
-               for (j = 0; j < transports[i].num_protocols; j++) {
-                       if (transports[i].protseq[j] != tower->floors[j+2].lhs.protocol) {
-                               break;
-                       }
-               }
-
-               if (j == transports[i].num_protocols) {
-                       return transports[i].transport;
-               }
-       }
-       
-       /* Unknown transport */
-       return (unsigned int)-1;
-}
-
-_PUBLIC_ NTSTATUS dcerpc_binding_from_tower(TALLOC_CTX *mem_ctx, 
-                                  struct epm_tower *tower, 
-                                  struct dcerpc_binding **b_out)
-{
-       NTSTATUS status;
-       struct dcerpc_binding *binding;
-
-       binding = talloc(mem_ctx, struct dcerpc_binding);
-       NT_STATUS_HAVE_NO_MEMORY(binding);
-
-       ZERO_STRUCT(binding->object);
-       binding->options = NULL;
-       binding->host = NULL;
-       binding->target_hostname = NULL;
-       binding->flags = 0;
-       binding->assoc_group_id = 0;
-
-       binding->transport = dcerpc_transport_by_tower(tower);
-
-       if (binding->transport == (unsigned int)-1) {
-               return NT_STATUS_NOT_SUPPORTED;
-       }
-
-       if (tower->num_floors < 1) {
-               return NT_STATUS_OK;
-       }
-
-       /* Set object uuid */
-       status = dcerpc_floor_get_lhs_data(&tower->floors[0], &binding->object);
-       
-       if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(1, ("Error pulling object uuid and version: %s", nt_errstr(status)));     
-               return status;
-       }
-
-       /* Ignore floor 1, it contains the NDR version info */
-       
-       binding->options = NULL;
-
-       /* Set endpoint */
-       if (tower->num_floors >= 4) {
-               binding->endpoint = dcerpc_floor_get_rhs_data(mem_ctx, &tower->floors[3]);
-       } else {
-               binding->endpoint = NULL;
-       }
-
-       /* Set network address */
-       if (tower->num_floors >= 5) {
-               binding->host = dcerpc_floor_get_rhs_data(mem_ctx, &tower->floors[4]);
-               NT_STATUS_HAVE_NO_MEMORY(binding->host);
-               binding->target_hostname = binding->host;
-       }
-       *b_out = binding;
-       return NT_STATUS_OK;
-}
-
-_PUBLIC_ NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx, struct dcerpc_binding *binding, struct epm_tower *tower)
-{
-       const enum epm_protocol *protseq = NULL;
-       int num_protocols = -1, i;
-       NTSTATUS status;
-       
-       /* Find transport */
-       for (i=0;i<ARRAY_SIZE(transports);i++) {
-               if (transports[i].transport == binding->transport) {
-                       protseq = transports[i].protseq;
-                       num_protocols = transports[i].num_protocols;
-                       break;
-               }
-       }
-
-       if (num_protocols == -1) {
-               DEBUG(0, ("Unable to find transport with id '%d'\n", binding->transport));
-               return NT_STATUS_UNSUCCESSFUL;
-       }
-
-       tower->num_floors = 2 + num_protocols;
-       tower->floors = talloc_array(mem_ctx, struct epm_floor, tower->num_floors);
-
-       /* Floor 0 */
-       tower->floors[0].lhs.protocol = EPM_PROTOCOL_UUID;
-
-       tower->floors[0].lhs.lhs_data = dcerpc_floor_pack_lhs_data(mem_ctx, &binding->object);
-
-       tower->floors[0].rhs.uuid.unknown = data_blob_talloc_zero(mem_ctx, 2);
-       
-       /* Floor 1 */
-       tower->floors[1].lhs.protocol = EPM_PROTOCOL_UUID;
-
-       tower->floors[1].lhs.lhs_data = dcerpc_floor_pack_lhs_data(mem_ctx, 
-                                                               &ndr_transfer_syntax);
-       
-       tower->floors[1].rhs.uuid.unknown = data_blob_talloc_zero(mem_ctx, 2);
-       
-       /* Floor 2 to num_protocols */
-       for (i = 0; i < num_protocols; i++) {
-               tower->floors[2 + i].lhs.protocol = protseq[i];
-               tower->floors[2 + i].lhs.lhs_data = data_blob_talloc(mem_ctx, NULL, 0);
-               ZERO_STRUCT(tower->floors[2 + i].rhs);
-               dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[2 + i], "");
-       }
-
-       /* The 4th floor contains the endpoint */
-       if (num_protocols >= 2 && binding->endpoint) {
-               status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[3], binding->endpoint);
-               if (NT_STATUS_IS_ERR(status)) {
-                       return status;
-               }
-       }
-       
-       /* The 5th contains the network address */
-       if (num_protocols >= 3 && binding->host) {
-               if (is_ipaddress(binding->host)) {
-                       status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[4], 
-                                                          binding->host);
-               } else {
-                       /* note that we don't attempt to resolve the
-                          name here - when we get a hostname here we
-                          are in the client code, and want to put in
-                          a wildcard all-zeros IP for the server to
-                          fill in */
-                       status = dcerpc_floor_set_rhs_data(mem_ctx, &tower->floors[4], 
-                                                          "0.0.0.0");
-               }
-               if (NT_STATUS_IS_ERR(status)) {
-                       return status;
-               }
-       }
-
-       return NT_STATUS_OK;
-}
-
-
-struct epm_map_binding_state {
-       struct dcerpc_binding *binding;
-       const struct ndr_interface_table *table;
-       struct dcerpc_pipe *pipe;
-       struct policy_handle handle;
-       struct GUID guid;
-       struct epm_twr_t twr;
-       struct epm_twr_t *twr_r;
-       struct epm_Map r;
-};
-
-
-static void continue_epm_recv_binding(struct composite_context *ctx);
-static void continue_epm_map(struct rpc_request *req);
-
-
-/*
-  Stage 2 of epm_map_binding: Receive connected rpc pipe and send endpoint
-  mapping rpc request
-*/
-static void continue_epm_recv_binding(struct composite_context *ctx)
-{
-       struct rpc_request *map_req;
-
-       struct composite_context *c = talloc_get_type(ctx->async.private_data,
-                                                     struct composite_context);
-       struct epm_map_binding_state *s = talloc_get_type(c->private_data,
-                                                         struct epm_map_binding_state);
-
-       /* receive result of rpc pipe connect request */
-       c->status = dcerpc_pipe_connect_b_recv(ctx, c, &s->pipe);
-       if (!composite_is_ok(c)) return;
-
-       s->pipe->conn->flags |= DCERPC_NDR_REF_ALLOC;
-
-       /* prepare requested binding parameters */
-       s->binding->object         = s->table->syntax_id;
-
-       c->status = dcerpc_binding_build_tower(s->pipe, s->binding, &s->twr.tower);
-       if (!composite_is_ok(c)) return;
-       
-       /* with some nice pretty paper around it of course */
-       s->r.in.object        = &s->guid;
-       s->r.in.map_tower     = &s->twr;
-       s->r.in.entry_handle  = &s->handle;
-       s->r.in.max_towers    = 1;
-       s->r.out.entry_handle = &s->handle;
-
-       /* send request for an endpoint mapping - a rpc request on connected pipe */
-       map_req = dcerpc_epm_Map_send(s->pipe, c, &s->r);
-       if (composite_nomem(map_req, c)) return;
-       
-       composite_continue_rpc(c, map_req, continue_epm_map, c);
-}
-
-
-/*
-  Stage 3 of epm_map_binding: Receive endpoint mapping and provide binding details
-*/
-static void continue_epm_map(struct rpc_request *req)
-{
-       struct composite_context *c = talloc_get_type(req->async.private_data,
-                                                     struct composite_context);
-       struct epm_map_binding_state *s = talloc_get_type(c->private_data,
-                                                         struct epm_map_binding_state);
-
-       /* receive result of a rpc request */
-       c->status = dcerpc_ndr_request_recv(req);
-       if (!composite_is_ok(c)) return;
-
-       /* check the details */
-       if (s->r.out.result != 0 || *s->r.out.num_towers != 1) {
-               composite_error(c, NT_STATUS_PORT_UNREACHABLE);
-               return;
-       }
-       
-       s->twr_r = s->r.out.towers[0].twr;
-       if (s->twr_r == NULL) {
-               composite_error(c, NT_STATUS_PORT_UNREACHABLE);
-               return;
-       }
-
-       if (s->twr_r->tower.num_floors != s->twr.tower.num_floors ||
-           s->twr_r->tower.floors[3].lhs.protocol != s->twr.tower.floors[3].lhs.protocol) {
-               composite_error(c, NT_STATUS_PORT_UNREACHABLE);
-               return;
-       }
-
-       /* get received endpoint */
-       s->binding->endpoint = talloc_reference(s->binding,
-                                               dcerpc_floor_get_rhs_data(c, &s->twr_r->tower.floors[3]));
-       if (composite_nomem(s->binding->endpoint, c)) return;
-
-       composite_done(c);
-}
-
-
-/*
-  Request for endpoint mapping of dcerpc binding - try to request for endpoint
-  unless there is default one.
-*/
-struct composite_context *dcerpc_epm_map_binding_send(TALLOC_CTX *mem_ctx,
-                                                     struct dcerpc_binding *binding,
-                                                     const struct ndr_interface_table *table,
-                                                     struct event_context *ev,
-                                                     struct loadparm_context *lp_ctx)
-{
-       struct composite_context *c;
-       struct epm_map_binding_state *s;
-       struct composite_context *pipe_connect_req;
-       struct cli_credentials *anon_creds;
-       struct event_context *new_ev = NULL;
-
-       NTSTATUS status;
-       struct dcerpc_binding *epmapper_binding;
-       int i;
-
-       /* Try to find event context in memory context in case passed
-        * event_context (argument) was NULL. If there's none, just
-        * create a new one.
-        */
-       if (ev == NULL) {
-               ev = event_context_find(mem_ctx);
-               if (ev == NULL) {
-                       new_ev = event_context_init(mem_ctx);
-                       if (new_ev == NULL) return NULL;
-                       ev = new_ev;
-               }
-       }
-
-       /* composite context allocation and setup */
-       c = composite_create(mem_ctx, ev);
-       if (c == NULL) {
-               talloc_free(new_ev);
-               return NULL;
-       }
-       talloc_steal(c, new_ev);
-
-       s = talloc_zero(c, struct epm_map_binding_state);
-       if (composite_nomem(s, c)) return c;
-       c->private_data = s;
-
-       s->binding = binding;
-       s->table   = table;
-
-       /* anonymous credentials for rpc connection used to get endpoint mapping */
-       anon_creds = cli_credentials_init(mem_ctx);
-       cli_credentials_set_event_context(anon_creds, ev);
-       cli_credentials_set_anonymous(anon_creds);
-
-       /*
-         First, check if there is a default endpoint specified in the IDL
-       */
-       if (table != NULL) {
-               struct dcerpc_binding *default_binding;
-
-               /* Find one of the default pipes for this interface */
-               for (i = 0; i < table->endpoints->count; i++) {
-                       status = dcerpc_parse_binding(mem_ctx, table->endpoints->names[i], &default_binding);
-
-                       if (NT_STATUS_IS_OK(status)) {
-                               if (binding->transport == NCA_UNKNOWN) 
-                                       binding->transport = default_binding->transport;
-                               if (default_binding->transport == binding->transport && 
-                                       default_binding->endpoint) {
-                                       binding->endpoint = talloc_reference(binding, default_binding->endpoint);
-                                       talloc_free(default_binding);
-
-                                       composite_done(c);
-                                       return c;
-
-                               } else {
-                                       talloc_free(default_binding);
-                               }
-                       }
-               }
-       }
-
-       epmapper_binding = talloc_zero(c, struct dcerpc_binding);
-       if (composite_nomem(epmapper_binding, c)) return c;
-
-       /* basic endpoint mapping data */
-       epmapper_binding->transport             = binding->transport;
-       epmapper_binding->host                  = talloc_reference(epmapper_binding, binding->host);
-       epmapper_binding->target_hostname       = epmapper_binding->host;
-       epmapper_binding->options               = NULL;
-       epmapper_binding->flags                 = 0;
-       epmapper_binding->assoc_group_id        = 0;
-       epmapper_binding->endpoint              = NULL;
-
-       /* initiate rpc pipe connection */
-       pipe_connect_req = dcerpc_pipe_connect_b_send(c, epmapper_binding, 
-                                                     &ndr_table_epmapper,
-                                                     anon_creds, c->event_ctx,
-                                                     lp_ctx);
-       if (composite_nomem(pipe_connect_req, c)) return c;
-       
-       composite_continue(c, pipe_connect_req, continue_epm_recv_binding, c);
-       return c;
-}
-
-
-/*
-  Receive result of endpoint mapping request
- */
-NTSTATUS dcerpc_epm_map_binding_recv(struct composite_context *c)
-{
-       NTSTATUS status = composite_wait(c);
-       
-       talloc_free(c);
-       return status;
-}
-
-
-/*
-  Get endpoint mapping for rpc connection
-*/
-_PUBLIC_ NTSTATUS dcerpc_epm_map_binding(TALLOC_CTX *mem_ctx, struct dcerpc_binding *binding,
-                               const struct ndr_interface_table *table, struct event_context *ev,
-                               struct loadparm_context *lp_ctx)
-{
-       struct composite_context *c;
-
-       c = dcerpc_epm_map_binding_send(mem_ctx, binding, table, ev, lp_ctx);
-       return dcerpc_epm_map_binding_recv(c);
-}
-
-
-struct pipe_auth_state {
-       struct dcerpc_pipe *pipe;
-       struct dcerpc_binding *binding;
-       const struct ndr_interface_table *table;
-       struct loadparm_context *lp_ctx;
-       struct cli_credentials *credentials;
-};
-
-
-static void continue_auth_schannel(struct composite_context *ctx);
-static void continue_auth(struct composite_context *ctx);
-static void continue_auth_none(struct composite_context *ctx);
-static void continue_ntlmssp_connection(struct composite_context *ctx);
-static void continue_spnego_after_wrong_pass(struct composite_context *ctx);
-
-
-/*
-  Stage 2 of pipe_auth: Receive result of schannel bind request
-*/
-static void continue_auth_schannel(struct composite_context *ctx)
-{
-       struct composite_context *c = talloc_get_type(ctx->async.private_data,
-                                                     struct composite_context);
-
-       c->status = dcerpc_bind_auth_schannel_recv(ctx);
-       if (!composite_is_ok(c)) return;
-
-       composite_done(c);
-}
-
-
-/*
-  Stage 2 of pipe_auth: Receive result of authenticated bind request
-*/
-static void continue_auth(struct composite_context *ctx)
-{
-       struct composite_context *c = talloc_get_type(ctx->async.private_data,
-                                                     struct composite_context);
-
-       c->status = dcerpc_bind_auth_recv(ctx);
-       if (!composite_is_ok(c)) return;
-       
-       composite_done(c);
-}
-/*
-  Stage 2 of pipe_auth: Receive result of authenticated bind request, but handle fallbacks:
-  SPNEGO -> NTLMSSP
-*/
-static void continue_auth_auto(struct composite_context *ctx)
-{
-       struct composite_context *c = talloc_get_type(ctx->async.private_data,
-                                                     struct composite_context);
-       struct pipe_auth_state *s = talloc_get_type(c->private_data, struct pipe_auth_state);
-       struct composite_context *sec_conn_req;
-
-       c->status = dcerpc_bind_auth_recv(ctx);
-       if (NT_STATUS_EQUAL(c->status, NT_STATUS_INVALID_PARAMETER)) {
-               /*
-                * Retry with NTLMSSP auth as fallback
-                * send a request for secondary rpc connection
-                */
-               sec_conn_req = dcerpc_secondary_connection_send(s->pipe,
-                                                               s->binding);
-               composite_continue(c, sec_conn_req, continue_ntlmssp_connection, c);
-               return;
-       } else if (NT_STATUS_EQUAL(c->status, NT_STATUS_LOGON_FAILURE)) {
-               if (cli_credentials_wrong_password(s->credentials)) {
-                       /*
-                        * Retry SPNEGO with a better password
-                        * send a request for secondary rpc connection
-                        */
-                       sec_conn_req = dcerpc_secondary_connection_send(s->pipe,
-                                                                       s->binding);
-                       composite_continue(c, sec_conn_req, continue_spnego_after_wrong_pass, c);
-                       return;
-               }
-       }
-
-       if (!composite_is_ok(c)) return;
-
-       composite_done(c);
-}
-
-/*
-  Stage 3 of pipe_auth (fallback to NTLMSSP case): Receive secondary
-  rpc connection (the first one can't be used any more, due to the
-  bind nak) and perform authenticated bind request
-*/
-static void continue_ntlmssp_connection(struct composite_context *ctx)
-{
-       struct composite_context *c;
-       struct pipe_auth_state *s;
-       struct composite_context *auth_req;
-       struct dcerpc_pipe *p2;
-
-       c = talloc_get_type(ctx->async.private_data, struct composite_context);
-       s = talloc_get_type(c->private_data, struct pipe_auth_state);
-
-       /* receive secondary rpc connection */
-       c->status = dcerpc_secondary_connection_recv(ctx, &p2);
-       if (!composite_is_ok(c)) return;
-
-       talloc_steal(s, p2);
-       talloc_steal(p2, s->pipe);
-       s->pipe = p2;
-
-       /* initiate a authenticated bind */
-       auth_req = dcerpc_bind_auth_send(c, s->pipe, s->table,
-                                        s->credentials, s->lp_ctx,
-                                        DCERPC_AUTH_TYPE_NTLMSSP,
-                                        dcerpc_auth_level(s->pipe->conn),
-                                        s->table->authservices->names[0]);
-       composite_continue(c, auth_req, continue_auth, c);
-}
-
-/*
-  Stage 3 of pipe_auth (retry on wrong password): Receive secondary
-  rpc connection (the first one can't be used any more, due to the
-  bind nak) and perform authenticated bind request
-*/
-static void continue_spnego_after_wrong_pass(struct composite_context *ctx)
-{
-       struct composite_context *c;
-       struct pipe_auth_state *s;
-       struct composite_context *auth_req;
-       struct dcerpc_pipe *p2;
-
-       c = talloc_get_type(ctx->async.private_data, struct composite_context);
-       s = talloc_get_type(c->private_data, struct pipe_auth_state);
-
-       /* receive secondary rpc connection */
-       c->status = dcerpc_secondary_connection_recv(ctx, &p2);
-       if (!composite_is_ok(c)) return;
-
-       talloc_steal(s, p2);
-       talloc_steal(p2, s->pipe);
-       s->pipe = p2;
-
-       /* initiate a authenticated bind */
-       auth_req = dcerpc_bind_auth_send(c, s->pipe, s->table,
-                                        s->credentials, s->lp_ctx, DCERPC_AUTH_TYPE_SPNEGO,
-                                        dcerpc_auth_level(s->pipe->conn),
-                                        s->table->authservices->names[0]);
-       composite_continue(c, auth_req, continue_auth, c);
-}
-
-
-/*
-  Stage 2 of pipe_auth: Receive result of non-authenticated bind request
-*/
-static void continue_auth_none(struct composite_context *ctx)
-{
-       struct composite_context *c = talloc_get_type(ctx->async.private_data,
-                                                     struct composite_context);
-
-       c->status = dcerpc_bind_auth_none_recv(ctx);
-       if (!composite_is_ok(c)) return;
-       
-       composite_done(c);
-}
-
-
-/*
-  Request to perform an authenticated bind if required. Authentication
-  is determined using credentials passed and binding flags.
-*/
-struct composite_context *dcerpc_pipe_auth_send(struct dcerpc_pipe *p, 
-                                               struct dcerpc_binding *binding,
-                                               const struct ndr_interface_table *table,
-                                               struct cli_credentials *credentials,
-                                               struct loadparm_context *lp_ctx)
-{
-       struct composite_context *c;
-       struct pipe_auth_state *s;
-       struct composite_context *auth_schannel_req;
-       struct composite_context *auth_req;
-       struct composite_context *auth_none_req;
-       struct dcerpc_connection *conn;
-       uint8_t auth_type;
-
-       /* composite context allocation and setup */
-       c = composite_create(p, p->conn->event_ctx);
-       if (c == NULL) return NULL;
-
-       s = talloc_zero(c, struct pipe_auth_state);
-       if (composite_nomem(s, c)) return c;
-       c->private_data = s;
-
-       /* store parameters in state structure */
-       s->binding      = binding;
-       s->table        = table;
-       s->credentials  = credentials;
-       s->pipe         = p;
-       s->lp_ctx       = lp_ctx;
-
-       conn = s->pipe->conn;
-       conn->flags = binding->flags;
-       
-       /* remember the binding string for possible secondary connections */
-       conn->binding_string = dcerpc_binding_string(p, binding);
-
-       if (cli_credentials_is_anonymous(s->credentials)) {
-               auth_none_req = dcerpc_bind_auth_none_send(c, s->pipe, s->table);
-               composite_continue(c, auth_none_req, continue_auth_none, c);
-               return c;
-       }
-
-       if ((binding->flags & DCERPC_SCHANNEL) &&
-           !cli_credentials_get_netlogon_creds(s->credentials)) {
-               /* If we don't already have netlogon credentials for
-                * the schannel bind, then we have to get these
-                * first */
-               auth_schannel_req = dcerpc_bind_auth_schannel_send(c, s->pipe, s->table,
-                                                                  s->credentials, s->lp_ctx,
-                                                                  dcerpc_auth_level(conn));
-               composite_continue(c, auth_schannel_req, continue_auth_schannel, c);
-               return c;
-       }
-
-       /*
-        * we rely on the already authenticated CIFS connection
-        * if not doing sign or seal
-        */
-       if (conn->transport.transport == NCACN_NP &&
-           !(s->binding->flags & (DCERPC_SIGN|DCERPC_SEAL))) {
-               auth_none_req = dcerpc_bind_auth_none_send(c, s->pipe, s->table);
-               composite_continue(c, auth_none_req, continue_auth_none, c);
-               return c;
-       }
-
-
-       /* Perform an authenticated DCE-RPC bind
-        */
-       if (!(conn->flags & (DCERPC_SIGN|DCERPC_SEAL))) {
-               /*
-                 we are doing an authenticated connection,
-                 but not using sign or seal. We must force
-                 the CONNECT dcerpc auth type as a NONE auth
-                 type doesn't allow authentication
-                 information to be passed.
-               */
-               conn->flags |= DCERPC_CONNECT;
-       }
-
-       if (s->binding->flags & DCERPC_AUTH_SPNEGO) {
-               auth_type = DCERPC_AUTH_TYPE_SPNEGO;
-
-       } else if (s->binding->flags & DCERPC_AUTH_KRB5) {
-               auth_type = DCERPC_AUTH_TYPE_KRB5;
-
-       } else if (s->binding->flags & DCERPC_SCHANNEL) {
-               auth_type = DCERPC_AUTH_TYPE_SCHANNEL;
-
-       } else if (s->binding->flags & DCERPC_AUTH_NTLM) {
-               auth_type = DCERPC_AUTH_TYPE_NTLMSSP;
-
-       } else {
-               /* try SPNEGO with fallback to NTLMSSP */
-               auth_req = dcerpc_bind_auth_send(c, s->pipe, s->table,
-                                                s->credentials, s->lp_ctx, DCERPC_AUTH_TYPE_SPNEGO,
-                                                dcerpc_auth_level(conn),
-                                                s->table->authservices->names[0]);
-               composite_continue(c, auth_req, continue_auth_auto, c);
-               return c;
-       }
-
-       auth_req = dcerpc_bind_auth_send(c, s->pipe, s->table,
-                                        s->credentials, s->lp_ctx, auth_type,
-                                        dcerpc_auth_level(conn),
-                                        s->table->authservices->names[0]);
-       composite_continue(c, auth_req, continue_auth, c);
-       return c;
-}
-
-
-/*
-  Receive result of authenticated bind request on dcerpc pipe
-
-  This returns *p, which may be different to the one originally
-  supllied, as it rebinds to a new pipe due to authentication fallback
-
-*/
-NTSTATUS dcerpc_pipe_auth_recv(struct composite_context *c, TALLOC_CTX *mem_ctx, 
-                              struct dcerpc_pipe **p)
-{
-       NTSTATUS status;
-
-       struct pipe_auth_state *s = talloc_get_type(c->private_data,
-                                                   struct pipe_auth_state);
-       status = composite_wait(c);
-       if (!NT_STATUS_IS_OK(status)) {
-               char *uuid_str = GUID_string(s->pipe, &s->table->syntax_id.uuid);
-               DEBUG(0, ("Failed to bind to uuid %s - %s\n", uuid_str, nt_errstr(status)));
-               talloc_free(uuid_str);
-       } else {
-               talloc_steal(mem_ctx, s->pipe);
-               *p = s->pipe;
-       }
-
-       talloc_free(c);
-       return status;
-}
-
-
-/* 
-   Perform an authenticated bind if needed - sync version
-
-   This may change *p, as it rebinds to a new pipe due to authentication fallback
-*/
-_PUBLIC_ NTSTATUS dcerpc_pipe_auth(TALLOC_CTX *mem_ctx,
-                         struct dcerpc_pipe **p, 
-                         struct dcerpc_binding *binding,
-                         const struct ndr_interface_table *table,
-                         struct cli_credentials *credentials,
-                         struct loadparm_context *lp_ctx)
-{
-       struct composite_context *c;
-
-       c = dcerpc_pipe_auth_send(*p, binding, table, credentials, lp_ctx);
-       return dcerpc_pipe_auth_recv(c, mem_ctx, p);
-}
-
-
-NTSTATUS dcerpc_generic_session_key(struct dcerpc_connection *c,
-                                   DATA_BLOB *session_key)
-{
-       /* this took quite a few CPU cycles to find ... */
-       session_key->data = discard_const_p(unsigned char, "SystemLibraryDTC");
-       session_key->length = 16;
-       return NT_STATUS_OK;
-}
-
-/*
-  fetch the user session key - may be default (above) or the SMB session key
-*/
-_PUBLIC_ NTSTATUS dcerpc_fetch_session_key(struct dcerpc_pipe *p,
-                                 DATA_BLOB *session_key)
-{
-       return p->conn->security_state.session_key(p->conn, session_key);
-}
-
-
-/*
-  log a rpc packet in a format suitable for ndrdump. This is especially useful
-  for sealed packets, where ethereal cannot easily see the contents
-
-  this triggers on a debug level of >= 10
-*/
-_PUBLIC_ void dcerpc_log_packet(const struct ndr_interface_table *ndr,
-                      uint32_t opnum, uint32_t flags, 
-                      DATA_BLOB *pkt)
-{
-       const int num_examples = 20;
-       int i;
-
-       if (DEBUGLEVEL < 10) return;
-
-       for (i=0;i<num_examples;i++) {
-               char *name=NULL;
-               asprintf(&name, "%s/rpclog/%s-%u.%d.%s", 
-                        lp_lockdir(global_loadparm), ndr->name, opnum, i,
-                        (flags&NDR_IN)?"in":"out");
-               if (name == NULL) {
-                       return;
-               }
-               if (!file_exist(name)) {
-                       if (file_save(name, pkt->data, pkt->length)) {
-                               DEBUG(10,("Logged rpc packet to %s\n", name));
-                       }
-                       free(name);
-                       break;
-               }
-               free(name);
-       }
-}
-
-
-
-/*
-  create a secondary context from a primary connection
-
-  this uses dcerpc_alter_context() to create a new dcerpc context_id
-*/
-_PUBLIC_ NTSTATUS dcerpc_secondary_context(struct dcerpc_pipe *p, 
-                                 struct dcerpc_pipe **pp2,
-                                 const struct ndr_interface_table *table)
-{
-       NTSTATUS status;
-       struct dcerpc_pipe *p2;
-       
-       p2 = talloc_zero(p, struct dcerpc_pipe);
-       if (p2 == NULL) {
-               return NT_STATUS_NO_MEMORY;
-       }
-       p2->conn = talloc_reference(p2, p->conn);
-       p2->request_timeout = p->request_timeout;
-
-       p2->context_id = ++p->conn->next_context_id;
-
-       p2->syntax = table->syntax_id;
-
-       p2->transfer_syntax = ndr_transfer_syntax;
-
-       p2->binding = talloc_reference(p2, p->binding);
-
-       status = dcerpc_alter_context(p2, p2, &p2->syntax, &p2->transfer_syntax);
-       if (!NT_STATUS_IS_OK(status)) {
-               talloc_free(p2);
-               return status;
-       }
-
-       *pp2 = p2;
-
-       return NT_STATUS_OK;
-}
index 08b969ae76ed025c25899c649f6fa814d2b47ec6..5b96e152bb3df7d8ead96f7f682b8da96a4edddc 100644 (file)
@@ -281,11 +281,7 @@ static const struct ndr_interface_table *load_iface_from_plugin(const char *plug
                        exit(1);
                }
                        
-#if (_SAMBA_BUILD_ >= 4)
-               data = (uint8_t *)file_load(ctx_filename, &size, mem_ctx);
-#else
-               data = (uint8_t *)file_load(ctx_filename, &size, 0);
-#endif
+               data = (uint8_t *)file_load(ctx_filename, &size, 0, mem_ctx);
                if (!data) {
                        perror(ctx_filename);
                        exit(1);
@@ -312,11 +308,7 @@ static const struct ndr_interface_table *load_iface_from_plugin(const char *plug
        } 
 
        if (filename)
-#if (_SAMBA_BUILD_ >= 4)
-               data = (uint8_t *)file_load(filename, &size, mem_ctx);
-#else
-               data = (uint8_t *)file_load(filename, &size, 0);
-#endif
+               data = (uint8_t *)file_load(filename, &size, 0, mem_ctx);
        else
                data = (uint8_t *)stdin_load(mem_ctx, &size);
 
@@ -368,7 +360,7 @@ static const struct ndr_interface_table *load_iface_from_plugin(const char *plug
                uint8_t byte_a, byte_b;
                bool differ;
 
-               ndr_v_push = ndr_push_init_ctx(mem_ctx);
+               ndr_v_push = ndr_push_init_ctx(mem_ctx, NULL);
                
                ndr_err = f->ndr_push(ndr_v_push, flags, st);
                status = ndr_map_error2ntstatus(ndr_err);
index 68495076b636b34df260c2b85a33ad2792153116..d371e057e370f7d2ab837183114763669ab98e85 100644 (file)
@@ -697,7 +697,7 @@ NTSTATUS cli_pull_reply(struct async_req *req,
  */
 
 
-static NTSTATUS validate_smb_crypto(struct cli_state *cli, uint8_t *pdu)
+static NTSTATUS validate_smb_crypto(struct cli_state *cli, char *pdu)
 {
        NTSTATUS status;
 
@@ -710,7 +710,7 @@ static NTSTATUS validate_smb_crypto(struct cli_state *cli, uint8_t *pdu)
        if (cli_encryption_on(cli) && CVAL(pdu, 0) == 0) {
                uint16_t enc_ctx_num;
 
-               status = get_enc_ctx_num(pdu, &enc_ctx_num);
+               status = get_enc_ctx_num((uint8_t *)pdu, &enc_ctx_num);
                if (!NT_STATUS_IS_OK(status)) {
                        DEBUG(10, ("get_enc_ctx_num returned %s\n",
                                   nt_errstr(status)));
index 611ae0870c4f2bf6e8eb3a683dea3f8e87d1b364..349a8331b47c97e2091800d66245aeb28d4deb5d 100644 (file)
@@ -249,7 +249,7 @@ bool receive_getdc_response(TALLOC_CTX *mem_ctx,
        blob.data += 4;
        blob.length -= 4;
 
-       ndr_err = ndr_pull_union_blob_all(&blob, mem_ctx, &p, DGRAM_SMB,
+       ndr_err = ndr_pull_union_blob_all(&blob, mem_ctx, NULL, &p, DGRAM_SMB,
                       (ndr_pull_flags_fn_t)ndr_pull_dgram_smb_packet);
        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
                DEBUG(0,("failed to parse packet\n"));
index d3819af444825f301f046f079e35c1e392f89dfe..1c525363f76297ecb1ea567d6495afd6f3acde30 100644 (file)
@@ -1234,7 +1234,7 @@ bool cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len)
 ****************************************************************************/
 
 bool cli_lock64(struct cli_state *cli, int fnum,
-               SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type)
+               uint64_t offset, uint64_t len, int timeout, enum brl_type lock_type)
 {
        char *p;
         int saved_timeout = cli->timeout;
@@ -1294,7 +1294,7 @@ bool cli_lock64(struct cli_state *cli, int fnum,
  Unlock a file with 64 bit offsets.
 ****************************************************************************/
 
-bool cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len)
+bool cli_unlock64(struct cli_state *cli, int fnum, uint64_t offset, uint64_t len)
 {
        char *p;
 
@@ -1341,7 +1341,7 @@ bool cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_
 ****************************************************************************/
 
 static bool cli_posix_lock_internal(struct cli_state *cli, int fnum,
-               SMB_BIG_UINT offset, SMB_BIG_UINT len, bool wait_lock, enum brl_type lock_type)
+               uint64_t offset, uint64_t len, bool wait_lock, enum brl_type lock_type)
 {
        unsigned int param_len = 4;
        unsigned int data_len = POSIX_LOCK_DATA_SIZE;
@@ -1412,7 +1412,7 @@ static bool cli_posix_lock_internal(struct cli_state *cli, int fnum,
 ****************************************************************************/
 
 bool cli_posix_lock(struct cli_state *cli, int fnum,
-                       SMB_BIG_UINT offset, SMB_BIG_UINT len,
+                       uint64_t offset, uint64_t len,
                        bool wait_lock, enum brl_type lock_type)
 {
        if (lock_type != READ_LOCK && lock_type != WRITE_LOCK) {
@@ -1425,7 +1425,7 @@ bool cli_posix_lock(struct cli_state *cli, int fnum,
  POSIX Unlock a file.
 ****************************************************************************/
 
-bool cli_posix_unlock(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len)
+bool cli_posix_unlock(struct cli_state *cli, int fnum, uint64_t offset, uint64_t len)
 {
        return cli_posix_lock_internal(cli, fnum, offset, len, False, UNLOCK_LOCK);
 }
@@ -1434,7 +1434,7 @@ bool cli_posix_unlock(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_
  POSIX Get any lock covering a file.
 ****************************************************************************/
 
-bool cli_posix_getlock(struct cli_state *cli, int fnum, SMB_BIG_UINT *poffset, SMB_BIG_UINT *plen)
+bool cli_posix_getlock(struct cli_state *cli, int fnum, uint64_t *poffset, uint64_t *plen)
 {
        return True;
 }
index b8afb579778ffe9557963b32d9f6c872a7d76a58..790e8d53698fe550221c7b65129a6130890ee741 100644 (file)
@@ -607,7 +607,7 @@ static bool ads_cleanup_expired_creds(krb5_context context,
 
        DEBUG(3, ("ads_cleanup_expired_creds: Ticket in ccache[%s:%s] expiration %s\n",
                  cc_type, krb5_cc_get_name(context, ccache),
-                 http_timestring(credsp->times.endtime)));
+                 http_timestring(talloc_tos(), credsp->times.endtime)));
 
        /* we will probably need new tickets if the current ones
           will expire within 10 seconds.
@@ -704,7 +704,7 @@ static krb5_error_code ads_krb5_mk_req(krb5_context context,
 
        DEBUG(10,("ads_krb5_mk_req: Ticket (%s) in ccache (%s:%s) is valid until: (%s - %u)\n",
                  principal, krb5_cc_get_type(context, ccache), krb5_cc_get_name(context, ccache),
-                 http_timestring((unsigned)credsp->times.endtime), 
+                 http_timestring(talloc_tos(), (unsigned)credsp->times.endtime), 
                  (unsigned)credsp->times.endtime));
 
        if (expire_time) {
index dcdfec241d915b5694895fe5a5f5775d395ecbbd..1462aa7a6ab5ec3b3b9ffee14984b64504904c1d 100644 (file)
@@ -78,10 +78,10 @@ static bool parse_user_quota_record(const char *rdata, unsigned int rdata_count,
         * maybe its the change time in NTTIME
         */
 
-       /* the used space 8 bytes (SMB_BIG_UINT)*/
-       qt.usedspace = (SMB_BIG_UINT)IVAL(rdata,16);
+       /* the used space 8 bytes (uint64_t)*/
+       qt.usedspace = (uint64_t)IVAL(rdata,16);
 #ifdef LARGE_SMB_OFF_T
-       qt.usedspace |= (((SMB_BIG_UINT)IVAL(rdata,20)) << 32);
+       qt.usedspace |= (((uint64_t)IVAL(rdata,20)) << 32);
 #else /* LARGE_SMB_OFF_T */
        if ((IVAL(rdata,20) != 0)&&
                ((qt.usedspace != 0xFFFFFFFF)||
@@ -91,10 +91,10 @@ static bool parse_user_quota_record(const char *rdata, unsigned int rdata_count,
        }
 #endif /* LARGE_SMB_OFF_T */
 
-       /* the soft quotas 8 bytes (SMB_BIG_UINT)*/
-       qt.softlim = (SMB_BIG_UINT)IVAL(rdata,24);
+       /* the soft quotas 8 bytes (uint64_t)*/
+       qt.softlim = (uint64_t)IVAL(rdata,24);
 #ifdef LARGE_SMB_OFF_T
-       qt.softlim |= (((SMB_BIG_UINT)IVAL(rdata,28)) << 32);
+       qt.softlim |= (((uint64_t)IVAL(rdata,28)) << 32);
 #else /* LARGE_SMB_OFF_T */
        if ((IVAL(rdata,28) != 0)&&
                ((qt.softlim != 0xFFFFFFFF)||
@@ -104,10 +104,10 @@ static bool parse_user_quota_record(const char *rdata, unsigned int rdata_count,
        }
 #endif /* LARGE_SMB_OFF_T */
 
-       /* the hard quotas 8 bytes (SMB_BIG_UINT)*/
-       qt.hardlim = (SMB_BIG_UINT)IVAL(rdata,32);
+       /* the hard quotas 8 bytes (uint64_t)*/
+       qt.hardlim = (uint64_t)IVAL(rdata,32);
 #ifdef LARGE_SMB_OFF_T
-       qt.hardlim |= (((SMB_BIG_UINT)IVAL(rdata,36)) << 32);
+       qt.hardlim |= (((uint64_t)IVAL(rdata,36)) << 32);
 #else /* LARGE_SMB_OFF_T */
        if ((IVAL(rdata,36) != 0)&&
                ((qt.hardlim != 0xFFFFFFFF)||
@@ -216,7 +216,7 @@ bool cli_set_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUC
        sid_len = ndr_size_dom_sid(&pqt->sid, 0);
        SIVAL(data,0,0);
        SIVAL(data,4,sid_len);
-       SBIG_UINT(data, 8,(SMB_BIG_UINT)0);
+       SBIG_UINT(data, 8,(uint64_t)0);
        SBIG_UINT(data,16,pqt->usedspace);
        SBIG_UINT(data,24,pqt->softlim);
        SBIG_UINT(data,32,pqt->hardlim);
@@ -458,10 +458,10 @@ bool cli_get_fs_quota_info(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_ST
 
        /* unknown_1 24 NULL bytes in pdata*/
 
-       /* the soft quotas 8 bytes (SMB_BIG_UINT)*/
-       qt.softlim = (SMB_BIG_UINT)IVAL(rdata,24);
+       /* the soft quotas 8 bytes (uint64_t)*/
+       qt.softlim = (uint64_t)IVAL(rdata,24);
 #ifdef LARGE_SMB_OFF_T
-       qt.softlim |= (((SMB_BIG_UINT)IVAL(rdata,28)) << 32);
+       qt.softlim |= (((uint64_t)IVAL(rdata,28)) << 32);
 #else /* LARGE_SMB_OFF_T */
        if ((IVAL(rdata,28) != 0)&&
                ((qt.softlim != 0xFFFFFFFF)||
@@ -471,10 +471,10 @@ bool cli_get_fs_quota_info(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_ST
        }
 #endif /* LARGE_SMB_OFF_T */
 
-       /* the hard quotas 8 bytes (SMB_BIG_UINT)*/
-       qt.hardlim = (SMB_BIG_UINT)IVAL(rdata,32);
+       /* the hard quotas 8 bytes (uint64_t)*/
+       qt.hardlim = (uint64_t)IVAL(rdata,32);
 #ifdef LARGE_SMB_OFF_T
-       qt.hardlim |= (((SMB_BIG_UINT)IVAL(rdata,36)) << 32);
+       qt.hardlim |= (((uint64_t)IVAL(rdata,36)) << 32);
 #else /* LARGE_SMB_OFF_T */
        if ((IVAL(rdata,36) != 0)&&
                ((qt.hardlim != 0xFFFFFFFF)||
@@ -562,18 +562,14 @@ cleanup:
        return ret;     
 }
 
-static const char *quota_str_static(SMB_BIG_UINT val, bool special, bool _numeric)
+static const char *quota_str_static(uint64_t val, bool special, bool _numeric)
 {
        const char *result;
 
        if (!_numeric&&special&&(val == SMB_NTQUOTAS_NO_LIMIT)) {
                return "NO LIMIT";
        }
-#if defined(HAVE_LONGLONG)
-       result = talloc_asprintf(talloc_tos(), "%llu", val);
-#else
-       result = talloc_asprintf(talloc_tos(), "%lu", val);
-#endif
+       result = talloc_asprintf(talloc_tos(), "%"PRIu64, val);
        SMB_ASSERT(result != NULL);
        return result;
 }
index ec632816303bd37e06f22740c4bbf2c595263c3f..cc982683d0896807cef3b1fb51142f9aaf842cf3 100644 (file)
@@ -70,10 +70,10 @@ struct async_req *cli_read_andx_send(TALLOC_CTX *mem_ctx,
        SSVAL(vwv + 8, 0, 0);
        SSVAL(vwv + 9, 0, 0);
 
-       if ((SMB_BIG_UINT)offset >> 32) {
+       if ((uint64_t)offset >> 32) {
                bigoffset = True;
                SIVAL(vwv + 10, 0,
-                     (((SMB_BIG_UINT)offset)>>32) & 0xffffffff);
+                     (((uint64_t)offset)>>32) & 0xffffffff);
                wct += 2;
        }
 
@@ -543,7 +543,7 @@ static bool cli_issue_write(struct cli_state *cli,
              smb_buf(cli->outbuf) - smb_base(cli->outbuf) + 1);
 
        if (large_writex) {
-               SIVAL(cli->outbuf,smb_vwv12,(((SMB_BIG_UINT)offset)>>32) & 0xffffffff);
+               SIVAL(cli->outbuf,smb_vwv12,(((uint64_t)offset)>>32) & 0xffffffff);
        }
 
        p = smb_base(cli->outbuf) + SVAL(cli->outbuf,smb_vwv11) -1;
index 1abdf61b7f9e2a4e58cc4416d9e1cd851f3bd480..d3d358d33267f05b12430cd7deeb1a67dbb38a93 100644 (file)
  *
  */
 
+static void dump_arc4_state(const char *description, 
+                           struct arcfour_state *state)
+{
+       dump_data_pw(description, state->sbox, sizeof(state->sbox));
+}
+
 static void calc_ntlmv2_key(unsigned char subkey[16],
                                DATA_BLOB session_key,
                                const char *constant)
@@ -101,10 +107,10 @@ static NTSTATUS ntlmssp_make_packet_signature(NTLMSSP_STATE *ntlmssp_state,
                if (encrypt_sig && (ntlmssp_state->neg_flags & NTLMSSP_NEGOTIATE_KEY_EXCH)) {
                        switch (direction) {
                        case NTLMSSP_SEND:
-                               smb_arc4_crypt(ntlmssp_state->send_seal_arc4_state,  digest, 8);
+                               arcfour_crypt_sbox(&ntlmssp_state->send_seal_arc4_state, digest, 8);
                                break;
                        case NTLMSSP_RECEIVE:
-                               smb_arc4_crypt(ntlmssp_state->recv_seal_arc4_state,  digest, 8);
+                               arcfour_crypt_sbox(&ntlmssp_state->recv_seal_arc4_state, digest, 8);
                                break;
                        }
                }
@@ -124,9 +130,8 @@ static NTSTATUS ntlmssp_make_packet_signature(NTLMSSP_STATE *ntlmssp_state,
                
                ntlmssp_state->ntlmv1_seq_num++;
 
-               dump_data_pw("ntlmssp hash:\n", ntlmssp_state->ntlmv1_arc4_state,
-                            sizeof(ntlmssp_state->ntlmv1_arc4_state));
-               smb_arc4_crypt(ntlmssp_state->ntlmv1_arc4_state, sig->data+4, sig->length-4);
+               dump_arc4_state("ntlmssp hash: \n", &ntlmssp_state->ntlmv1_arc4_state);
+               arcfour_crypt_sbox(&ntlmssp_state->ntlmv1_arc4_state, sig->data+4, sig->length-4);
        }
        return NT_STATUS_OK;
 }
@@ -259,9 +264,9 @@ NTSTATUS ntlmssp_seal_packet(NTLMSSP_STATE *ntlmssp_state,
                        return nt_status;
                }
 
-               smb_arc4_crypt(ntlmssp_state->send_seal_arc4_state, data, length);
+               arcfour_crypt_sbox(&ntlmssp_state->send_seal_arc4_state, data, length);
                if (ntlmssp_state->neg_flags & NTLMSSP_NEGOTIATE_KEY_EXCH) {
-                       smb_arc4_crypt(ntlmssp_state->send_seal_arc4_state, sig->data+4, 8);
+                       arcfour_crypt_sbox(&ntlmssp_state->send_seal_arc4_state, sig->data+4, 8);
                }
        } else {
                uint32 crc;
@@ -274,14 +279,14 @@ NTSTATUS ntlmssp_seal_packet(NTLMSSP_STATE *ntlmssp_state,
                   then seal the sequence number - this is becouse the ntlmv1_arc4_state is not
                   constant, but is is rather updated with each iteration */
                
-               dump_data_pw("ntlmv1 arc4 state:\n", ntlmssp_state->ntlmv1_arc4_state,
-                            sizeof(ntlmssp_state->ntlmv1_arc4_state));
-               smb_arc4_crypt(ntlmssp_state->ntlmv1_arc4_state, data, length);
+               dump_arc4_state("ntlmv1 arc4 state:\n", 
+                                               &ntlmssp_state->ntlmv1_arc4_state);
+               arcfour_crypt_sbox(&ntlmssp_state->ntlmv1_arc4_state, data, length);
 
-               dump_data_pw("ntlmv1 arc4 state:\n", ntlmssp_state->ntlmv1_arc4_state,
-                            sizeof(ntlmssp_state->ntlmv1_arc4_state));
+               dump_arc4_state("ntlmv1 arc4 state:\n", 
+                                               &ntlmssp_state->ntlmv1_arc4_state);
 
-               smb_arc4_crypt(ntlmssp_state->ntlmv1_arc4_state, sig->data+4, sig->length-4);
+               arcfour_crypt_sbox(&ntlmssp_state->ntlmv1_arc4_state, sig->data+4, sig->length-4);
 
                ntlmssp_state->ntlmv1_seq_num++;
        }
@@ -311,10 +316,10 @@ NTSTATUS ntlmssp_unseal_packet(NTLMSSP_STATE *ntlmssp_state,
 
        if (ntlmssp_state->neg_flags & NTLMSSP_NEGOTIATE_NTLM2) {
                /* First unseal the data. */
-               smb_arc4_crypt(ntlmssp_state->recv_seal_arc4_state, data, length);
+               arcfour_crypt_sbox(&ntlmssp_state->recv_seal_arc4_state, data, length);
                dump_data_pw("ntlmv2 clear data\n", data, length);
        } else {
-               smb_arc4_crypt(ntlmssp_state->ntlmv1_arc4_state, data, length);
+               arcfour_crypt_sbox(&ntlmssp_state->ntlmv1_arc4_state, data, length);
                dump_data_pw("ntlmv1 clear data\n", data, length);
        }
        return ntlmssp_check_packet(ntlmssp_state, data, length, whole_pdu, pdu_length, sig);
@@ -349,6 +354,7 @@ NTSTATUS ntlmssp_sign_init(NTLMSSP_STATE *ntlmssp_state)
                const char *send_seal_const;
                const char *recv_sign_const;
                const char *recv_seal_const;
+               DATA_BLOB send_seal_key_blob, recv_seal_blob;
 
                switch (ntlmssp_state->role) {
                case NTLMSSP_CLIENT:
@@ -397,12 +403,13 @@ NTSTATUS ntlmssp_sign_init(NTLMSSP_STATE *ntlmssp_state)
                dump_data_pw("NTLMSSP send seal key:\n",
                                ntlmssp_state->send_seal_key, 16);
 
-               smb_arc4_init(ntlmssp_state->send_seal_arc4_state,
-                               ntlmssp_state->send_seal_key, 16);
+               send_seal_key_blob.data = ntlmssp_state->send_seal_key;
+               send_seal_key_blob.length = 16;
+               arcfour_init(&ntlmssp_state->send_seal_arc4_state, 
+                            &send_seal_key_blob);
 
-               dump_data_pw("NTLMSSP send seal arc4 state:\n", 
-                            ntlmssp_state->send_seal_arc4_state, 
-                            sizeof(ntlmssp_state->send_seal_arc4_state));
+               dump_arc4_state("NTLMSSP send seal arc4 state:\n", 
+                            &ntlmssp_state->send_seal_arc4_state);
 
                /* RECV: sign key */
                calc_ntlmv2_key(ntlmssp_state->recv_sign_key,
@@ -417,12 +424,13 @@ NTSTATUS ntlmssp_sign_init(NTLMSSP_STATE *ntlmssp_state)
                dump_data_pw("NTLMSSP recv seal key:\n",
                                ntlmssp_state->recv_seal_key, 16);
                                
-               smb_arc4_init(ntlmssp_state->recv_seal_arc4_state,
-                               ntlmssp_state->recv_seal_key, 16);
+               recv_seal_blob.data = ntlmssp_state->recv_seal_key;
+               recv_seal_blob.length = 16;
+               arcfour_init(&ntlmssp_state->recv_seal_arc4_state,
+                               &recv_seal_blob);
 
-               dump_data_pw("NTLMSSP recv seal arc4 state:\n", 
-                            ntlmssp_state->recv_seal_arc4_state, 
-                            sizeof(ntlmssp_state->recv_seal_arc4_state));
+               dump_arc4_state("NTLMSSP recv seal arc4 state:\n", 
+                            &ntlmssp_state->recv_seal_arc4_state);
 
                ntlmssp_state->ntlm2_send_seq_num = 0;
                ntlmssp_state->ntlm2_recv_seq_num = 0;
@@ -454,11 +462,11 @@ NTSTATUS ntlmssp_sign_init(NTLMSSP_STATE *ntlmssp_state)
 
                DEBUG(5, ("NTLMSSP Sign/Seal - using NTLM1\n"));
 
-               smb_arc4_init(ntlmssp_state->ntlmv1_arc4_state,
-                             weak_session_key.data, weak_session_key.length);
+               arcfour_init(&ntlmssp_state->ntlmv1_arc4_state, 
+                            &weak_session_key);
 
-                dump_data_pw("NTLMv1 arc4 state:\n", ntlmssp_state->ntlmv1_arc4_state,
-                               sizeof(ntlmssp_state->ntlmv1_arc4_state));
+                dump_arc4_state("NTLMv1 arc4 state:\n", 
+                               &ntlmssp_state->ntlmv1_arc4_state);
 
                ntlmssp_state->ntlmv1_seq_num = 0;
        }
index 98d5cd05b7e1c9c8eabf7c8bbab6ea3b12ad0775..8087d66799fb874a9e2727156ce0c3d4dfe17449 100644 (file)
@@ -388,18 +388,19 @@ void des_crypt112_16(unsigned char out[16], unsigned char in[16], const unsigned
 
 void SamOEMhash( unsigned char *data, const unsigned char key[16], size_t len)
 {
-       unsigned char arc4_state[258];
+       struct arcfour_state arc4_state;
+       const DATA_BLOB keyblob = data_blob_const(key, 16);
 
-       smb_arc4_init(arc4_state, key, 16);
-       smb_arc4_crypt(arc4_state, data, len);
+       arcfour_init(&arc4_state, &keyblob);
+       arcfour_crypt_sbox(&arc4_state, data, len);
 }
 
 void SamOEMhashBlob( unsigned char *data, size_t len, DATA_BLOB *key)
 {
-       unsigned char arc4_state[258];
+       struct arcfour_state arc4_state;
 
-       smb_arc4_init(arc4_state, key->data, key->length);
-       smb_arc4_crypt(arc4_state, data, len);
+       arcfour_init(&arc4_state, key);
+       arcfour_crypt_sbox(&arc4_state, data, len);
 }
 
 /* Decode a sam password hash into a password.  The password hash is the
index 05fd808a329533d5b9c5893661e7b1e37cafd33a..ee162b1b2d64837a5780df1da4b81bdb7bd0113b 100644 (file)
@@ -22,7 +22,7 @@
 */
 
 #include "includes.h"
-#include "byteorder.h"
+#include "../lib/util/byteorder.h"
 
 void SMBencrypt_hash(const uchar lm_hash[16], const uchar *c8, uchar p24[24])
 {
index 2f336f14e6d58b41380a53cda23e34eb1d4585db..f0595695d2279920c04497f3a46941fea6fcca4c 100644 (file)
@@ -33,13 +33,12 @@ NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client *cli, TALLOC_CTX *m
 {
        unsigned char new_trust_passwd_hash[16];
        char *new_trust_passwd;
-       char *str;
        NTSTATUS nt_status;
                
        /* Create a random machine account password */
-       str = generate_random_str(DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
+       new_trust_passwd = generate_random_str(mem_ctx, DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
 
-       if ((new_trust_passwd = talloc_strdup(mem_ctx, str)) == NULL) {
+       if (new_trust_passwd == NULL) {
                DEBUG(0, ("talloc_strdup failed\n"));
                return NT_STATUS_NO_MEMORY;
        }
index 368ab1687cc3d3dbfd1eb87c122df9035bf160d4..33717f1bb98c112a3f9a23bbafba6583c5e8fce7 100644 (file)
@@ -77,8 +77,8 @@ const char *lock_flav_name(enum brl_flavour lock_flav)
 
 bool is_locked(files_struct *fsp,
                uint32 smbpid,
-               SMB_BIG_UINT count,
-               SMB_BIG_UINT offset, 
+               uint64_t count,
+               uint64_t offset, 
                enum brl_type lock_type)
 {
        int strict_locking = lp_strict_locking(fsp->conn->params);
@@ -144,8 +144,8 @@ bool is_locked(files_struct *fsp,
 
 NTSTATUS query_lock(files_struct *fsp,
                        uint32 *psmbpid,
-                       SMB_BIG_UINT *pcount,
-                       SMB_BIG_UINT *poffset,
+                       uint64_t *pcount,
+                       uint64_t *poffset,
                        enum brl_type *plock_type,
                        enum brl_flavour lock_flav)
 {
@@ -184,8 +184,8 @@ NTSTATUS query_lock(files_struct *fsp,
 struct byte_range_lock *do_lock(struct messaging_context *msg_ctx,
                        files_struct *fsp,
                        uint32 lock_pid,
-                       SMB_BIG_UINT count,
-                       SMB_BIG_UINT offset,
+                       uint64_t count,
+                       uint64_t offset,
                        enum brl_type lock_type,
                        enum brl_flavour lock_flav,
                        bool blocking_lock,
@@ -251,8 +251,8 @@ struct byte_range_lock *do_lock(struct messaging_context *msg_ctx,
 NTSTATUS do_unlock(struct messaging_context *msg_ctx,
                        files_struct *fsp,
                        uint32 lock_pid,
-                       SMB_BIG_UINT count,
-                       SMB_BIG_UINT offset,
+                       uint64_t count,
+                       uint64_t offset,
                        enum brl_flavour lock_flav)
 {
        bool ok = False;
@@ -304,8 +304,8 @@ NTSTATUS do_unlock(struct messaging_context *msg_ctx,
 
 NTSTATUS do_lock_cancel(files_struct *fsp,
                        uint32 lock_pid,
-                       SMB_BIG_UINT count,
-                       SMB_BIG_UINT offset,
+                       uint64_t count,
+                       uint64_t offset,
                        enum brl_flavour lock_flav)
 {
        bool ok = False;
index 32e1ee9fbfd85c80d432bc06bb9e667dcee7bf87..c036ee597c5f76403653b2bbc3401cdccdda8ec8 100644 (file)
@@ -79,7 +79,7 @@ static const char *posix_lock_type_name(int lock_type)
 ****************************************************************************/
 
 static bool posix_lock_in_range(SMB_OFF_T *offset_out, SMB_OFF_T *count_out,
-                               SMB_BIG_UINT u_offset, SMB_BIG_UINT u_count)
+                               uint64_t u_offset, uint64_t u_count)
 {
        SMB_OFF_T offset = (SMB_OFF_T)u_offset;
        SMB_OFF_T count = (SMB_OFF_T)u_count;
@@ -132,9 +132,9 @@ static bool posix_lock_in_range(SMB_OFF_T *offset_out, SMB_OFF_T *count_out,
         * ignore this lock.
         */
 
-       if (u_offset & ~((SMB_BIG_UINT)max_positive_lock_offset)) {
+       if (u_offset & ~((uint64_t)max_positive_lock_offset)) {
                DEBUG(10,("posix_lock_in_range: (offset = %.0f) offset > %.0f and we cannot handle this. Ignoring lock.\n",
-                               (double)u_offset, (double)((SMB_BIG_UINT)max_positive_lock_offset) ));
+                               (double)u_offset, (double)((uint64_t)max_positive_lock_offset) ));
                return False;
        }
 
@@ -142,7 +142,7 @@ static bool posix_lock_in_range(SMB_OFF_T *offset_out, SMB_OFF_T *count_out,
         * We must truncate the count to less than max_positive_lock_offset.
         */
 
-       if (u_count & ~((SMB_BIG_UINT)max_positive_lock_offset)) {
+       if (u_count & ~((uint64_t)max_positive_lock_offset)) {
                count = max_positive_lock_offset;
        }
 
@@ -271,8 +271,8 @@ static bool posix_fcntl_getlock(files_struct *fsp, SMB_OFF_T *poffset, SMB_OFF_T
 ****************************************************************************/
 
 bool is_posix_locked(files_struct *fsp,
-                       SMB_BIG_UINT *pu_offset,
-                       SMB_BIG_UINT *pu_count,
+                       uint64_t *pu_offset,
+                       uint64_t *pu_count,
                        enum brl_type *plock_type,
                        enum brl_flavour lock_flav)
 {
@@ -302,8 +302,8 @@ bool is_posix_locked(files_struct *fsp,
 
        if (lock_flav == POSIX_LOCK) {
                /* Only POSIX lock queries need to know the details. */
-               *pu_offset = (SMB_BIG_UINT)offset;
-               *pu_count = (SMB_BIG_UINT)count;
+               *pu_offset = (uint64_t)offset;
+               *pu_count = (uint64_t)count;
                *plock_type = (posix_lock_type == F_RDLCK) ? READ_LOCK : WRITE_LOCK;
        }
        return True;
@@ -929,8 +929,8 @@ lock: start = %.0f, size = %.0f", (double)l_curr->start, (double)l_curr->size, (
 ****************************************************************************/
 
 bool set_posix_lock_windows_flavour(files_struct *fsp,
-                       SMB_BIG_UINT u_offset,
-                       SMB_BIG_UINT u_count,
+                       uint64_t u_offset,
+                       uint64_t u_count,
                        enum brl_type lock_type,
                        const struct lock_context *lock_ctx,
                        const struct lock_struct *plocks,
@@ -1066,8 +1066,8 @@ bool set_posix_lock_windows_flavour(files_struct *fsp,
 ****************************************************************************/
 
 bool release_posix_lock_windows_flavour(files_struct *fsp,
-                               SMB_BIG_UINT u_offset,
-                               SMB_BIG_UINT u_count,
+                               uint64_t u_offset,
+                               uint64_t u_count,
                                enum brl_type deleted_lock_type,
                                const struct lock_context *lock_ctx,
                                const struct lock_struct *plocks,
@@ -1189,8 +1189,8 @@ bool release_posix_lock_windows_flavour(files_struct *fsp,
 ****************************************************************************/
 
 bool set_posix_lock_posix_flavour(files_struct *fsp,
-                       SMB_BIG_UINT u_offset,
-                       SMB_BIG_UINT u_count,
+                       uint64_t u_offset,
+                       uint64_t u_count,
                        enum brl_type lock_type,
                        int *errno_ret)
 {
@@ -1229,8 +1229,8 @@ bool set_posix_lock_posix_flavour(files_struct *fsp,
 ****************************************************************************/
 
 bool release_posix_lock_posix_flavour(files_struct *fsp,
-                               SMB_BIG_UINT u_offset,
-                               SMB_BIG_UINT u_count,
+                               uint64_t u_offset,
+                               uint64_t u_count,
                                const struct lock_context *lock_ctx,
                                const struct lock_struct *plocks,
                                int num_locks)
index 79537367d69c5b728d8623f431379d1a9888afac..6950ab21685b46d28a791e1f3fd2cc00becaebb9 100644 (file)
 static char *capencode(TALLOC_CTX *ctx, const char *from);
 static char *capdecode(TALLOC_CTX *ctx, const char *from);
 
-static SMB_BIG_UINT cap_disk_free(vfs_handle_struct *handle, const char *path,
-       bool small_query, SMB_BIG_UINT *bsize,
-       SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+static uint64_t cap_disk_free(vfs_handle_struct *handle, const char *path,
+       bool small_query, uint64_t *bsize,
+       uint64_t *dfree, uint64_t *dsize)
 {
        char *cappath = capencode(talloc_tos(), path);
 
        if (!cappath) {
                errno = ENOMEM;
-               return (SMB_BIG_UINT)-1;
+               return (uint64_t)-1;
        }
        return SMB_VFS_NEXT_DISK_FREE(handle, cappath, small_query, bsize,
                                        dfree, dsize);
index 372cdf2d5334923457bce21542ba97e1be6a84d1..275c2f53c417bd13d60bc8c2ee3ea4ffcacbe506 100644 (file)
@@ -40,10 +40,10 @@ static void vfswrap_disconnect(vfs_handle_struct *handle)
 
 /* Disk operations */
 
-static SMB_BIG_UINT vfswrap_disk_free(vfs_handle_struct *handle,  const char *path, bool small_query, SMB_BIG_UINT *bsize,
-                              SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+static uint64_t vfswrap_disk_free(vfs_handle_struct *handle,  const char *path, bool small_query, uint64_t *bsize,
+                              uint64_t *dfree, uint64_t *dsize)
 {
-       SMB_BIG_UINT result;
+       uint64_t result;
 
        result = sys_disk_free(handle->conn, path, small_query, bsize, dfree, dsize);
        return result;
index 9fadcd9e0cb994471fd5dd02f8520c6586defcd7..6342c4a14e457c2347b79458d6ab1f5a722d03f3 100644 (file)
@@ -74,10 +74,10 @@ struct vfs_full_audit_private_data {
 static int smb_full_audit_connect(vfs_handle_struct *handle,
                         const char *svc, const char *user);
 static void smb_full_audit_disconnect(vfs_handle_struct *handle);
-static SMB_BIG_UINT smb_full_audit_disk_free(vfs_handle_struct *handle,
+static uint64_t smb_full_audit_disk_free(vfs_handle_struct *handle,
                                    const char *path,
-                                   bool small_query, SMB_BIG_UINT *bsize, 
-                                   SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
+                                   bool small_query, uint64_t *bsize, 
+                                   uint64_t *dfree, uint64_t *dsize);
 static int smb_full_audit_get_quota(struct vfs_handle_struct *handle,
                           enum SMB_QUOTA_TYPE qtype, unid_t id,
                           SMB_DISK_QUOTA *qt);
@@ -910,12 +910,12 @@ static void smb_full_audit_disconnect(vfs_handle_struct *handle)
        return;
 }
 
-static SMB_BIG_UINT smb_full_audit_disk_free(vfs_handle_struct *handle,
+static uint64_t smb_full_audit_disk_free(vfs_handle_struct *handle,
                                    const char *path,
-                                   bool small_query, SMB_BIG_UINT *bsize, 
-                                   SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+                                   bool small_query, uint64_t *bsize, 
+                                   uint64_t *dfree, uint64_t *dsize)
 {
-       SMB_BIG_UINT result;
+       uint64_t result;
 
        result = SMB_VFS_NEXT_DISK_FREE(handle, path, small_query, bsize,
                                        dfree, dsize);
index 9b4c1b3e25512c6f92b396ea80ce0bf526d50374..9456afb81128cfa0527a4a9fcd67ee218fdf79f3 100644 (file)
@@ -42,6 +42,7 @@ static enum sock_type smb_traffic_analyzer_connMode(vfs_handle_struct *handle)
        }
 }
 
+
 /* Connect to an internet socket */
 
 static int smb_traffic_analyzer_connect_inet_socket(vfs_handle_struct *handle,
@@ -160,6 +161,8 @@ static void smb_traffic_analyzer_send_data(vfs_handle_struct *handle,
        struct tm *tm = NULL;
        int seconds;
        char *str = NULL;
+       char *username = NULL;
+       const char *anon_prefix = NULL;
        size_t len;
 
        SMB_VFS_HANDLE_GET_DATA(handle, rf_sock, struct refcounted_sock, return);
@@ -178,11 +181,29 @@ static void smb_traffic_analyzer_send_data(vfs_handle_struct *handle,
        }
        seconds=(float) (tv.tv_usec / 1000);
 
+       /* check if anonymization is required */
+
+       anon_prefix=lp_parm_const_string(SNUM(handle->conn),"smb_traffic_analyzer",\
+                                       "anonymize_prefix", NULL );
+       if (anon_prefix!=NULL) {
+               username = talloc_asprintf(talloc_tos(),
+                       "%s%i",
+                       anon_prefix,
+                       str_checksum(
+                               handle->conn->server_info->sanitized_username ) ); 
+       } else {
+               username = handle->conn->server_info->sanitized_username;
+       }
+
+       if (!username) {
+               return;
+       }
+
        str = talloc_asprintf(talloc_tos(),
                        "V1,%u,\"%s\",\"%s\",\"%c\",\"%s\",\"%s\","
                        "\"%04d-%02d-%02d %02d:%02d:%02d.%03d\"\n",
                        (unsigned int)result,
-                       handle->conn->server_info->sanitized_username,
+                       username,
                        pdb_get_domain(handle->conn->server_info->sam_account),
                        Write ? 'W' : 'R',
                        handle->conn->connectpath,
index c707a1828f146641d1b2482cbabc58b3421f64d1..8320a5820a244340870beefcdbda47ed80207931 100644 (file)
@@ -177,25 +177,25 @@ static ssize_t xattr_tdb_getattr(struct db_context *db_ctx,
                return -1;
        }
 
-       for (i=0; i<attribs->num_xattrs; i++) {
-               if (strcmp(attribs->xattrs[i].name, name) == 0) {
+       for (i=0; i<attribs->num_eas; i++) {
+               if (strcmp(attribs->eas[i].name, name) == 0) {
                        break;
                }
        }
 
-       if (i == attribs->num_xattrs) {
+       if (i == attribs->num_eas) {
                errno = ENOATTR;
                goto fail;
        }
 
-       if (attribs->xattrs[i].value.length > size) {
+       if (attribs->eas[i].value.length > size) {
                errno = ERANGE;
                goto fail;
        }
 
-       memcpy(value, attribs->xattrs[i].value.data,
-              attribs->xattrs[i].value.length);
-       result = attribs->xattrs[i].value.length;
+       memcpy(value, attribs->eas[i].value.data,
+              attribs->eas[i].value.length);
+       result = attribs->eas[i].value.length;
 
  fail:
        TALLOC_FREE(attribs);
@@ -273,8 +273,8 @@ static int xattr_tdb_setattr(struct db_context *db_ctx,
                return -1;
        }
 
-       for (i=0; i<attribs->num_xattrs; i++) {
-               if (strcmp(attribs->xattrs[i].name, name) == 0) {
+       for (i=0; i<attribs->num_eas; i++) {
+               if (strcmp(attribs->eas[i].name, name) == 0) {
                        if (flags & XATTR_CREATE) {
                                TALLOC_FREE(rec);
                                errno = EEXIST;
@@ -284,8 +284,8 @@ static int xattr_tdb_setattr(struct db_context *db_ctx,
                }
        }
 
-       if (i == attribs->num_xattrs) {
-               struct tdb_xattr *tmp;
+       if (i == attribs->num_eas) {
+               struct xattr_EA *tmp;
 
                if (flags & XATTR_REPLACE) {
                        TALLOC_FREE(rec);
@@ -294,8 +294,8 @@ static int xattr_tdb_setattr(struct db_context *db_ctx,
                }
 
                tmp = TALLOC_REALLOC_ARRAY(
-                       attribs, attribs->xattrs, struct tdb_xattr,
-                       attribs->num_xattrs + 1);
+                       attribs, attribs->eas, struct xattr_EA,
+                       attribs->num_eas+ 1);
 
                if (tmp == NULL) {
                        DEBUG(0, ("TALLOC_REALLOC_ARRAY failed\n"));
@@ -304,13 +304,13 @@ static int xattr_tdb_setattr(struct db_context *db_ctx,
                        return -1;
                }
 
-               attribs->xattrs = tmp;
-               attribs->num_xattrs += 1;
+               attribs->eas = tmp;
+               attribs->num_eas += 1;
        }
 
-       attribs->xattrs[i].name = name;
-       attribs->xattrs[i].value.data = CONST_DISCARD(uint8 *, value);
-       attribs->xattrs[i].value.length = size;
+       attribs->eas[i].name = name;
+       attribs->eas[i].value.data = CONST_DISCARD(uint8 *, value);
+       attribs->eas[i].value.length = size;
 
        status = xattr_tdb_save_attrs(rec, attribs);
 
@@ -386,15 +386,15 @@ static ssize_t xattr_tdb_listattr(struct db_context *db_ctx,
        }
 
        DEBUG(10, ("xattr_tdb_listattr: Found %d xattrs\n",
-                  attribs->num_xattrs));
+                  attribs->num_eas));
 
-       for (i=0; i<attribs->num_xattrs; i++) {
+       for (i=0; i<attribs->num_eas; i++) {
                size_t tmp;
 
                DEBUG(10, ("xattr_tdb_listattr: xattrs[i].name: %s\n",
-                          attribs->xattrs[i].name));
+                          attribs->eas[i].name));
 
-               tmp = strlen(attribs->xattrs[i].name);
+               tmp = strlen(attribs->eas[i].name);
 
                /*
                 * Try to protect against overflow
@@ -420,10 +420,10 @@ static ssize_t xattr_tdb_listattr(struct db_context *db_ctx,
 
        len = 0;
 
-       for (i=0; i<attribs->num_xattrs; i++) {
-               strlcpy(list+len, attribs->xattrs[i].name,
+       for (i=0; i<attribs->num_eas; i++) {
+               strlcpy(list+len, attribs->eas[i].name,
                        size-len);
-               len += (strlen(attribs->xattrs[i].name) + 1);
+               len += (strlen(attribs->eas[i].name) + 1);
        }
 
        TALLOC_FREE(attribs);
@@ -496,23 +496,23 @@ static int xattr_tdb_removeattr(struct db_context *db_ctx,
                return -1;
        }
 
-       for (i=0; i<attribs->num_xattrs; i++) {
-               if (strcmp(attribs->xattrs[i].name, name) == 0) {
+       for (i=0; i<attribs->num_eas; i++) {
+               if (strcmp(attribs->eas[i].name, name) == 0) {
                        break;
                }
        }
 
-       if (i == attribs->num_xattrs) {
+       if (i == attribs->num_eas) {
                TALLOC_FREE(rec);
                errno = ENOATTR;
                return -1;
        }
 
-       attribs->xattrs[i] =
-               attribs->xattrs[attribs->num_xattrs-1];
-       attribs->num_xattrs -= 1;
+       attribs->eas[i] =
+               attribs->eas[attribs->num_eas-1];
+       attribs->num_eas -= 1;
 
-       if (attribs->num_xattrs == 0) {
+       if (attribs->num_eas == 0) {
                rec->delete_rec(rec);
                TALLOC_FREE(rec);
                return 0;
index d9f2af4c10bdf2ec6e67ec9910fab6804c35646a..28de212d694b772b7c4deb00a6966ef68384cb09 100644 (file)
@@ -332,7 +332,7 @@ static bool reload_nmbd_services(bool test)
 
        if ( lp_loaded() ) {
                const char *fname = lp_configfile();
-               if (file_exist(fname,NULL) && !strcsequal(fname,get_dyn_CONFIGFILE())) {
+               if (file_exist(fname) && !strcsequal(fname,get_dyn_CONFIGFILE())) {
                        set_dyn_CONFIGFILE(fname);
                        test = False;
                }
@@ -905,7 +905,7 @@ static bool open_sockets(bool isdaemon, int port)
        }
 #endif
 
-       if (!directory_exist(lp_lockdir(), NULL)) {
+       if (!directory_exist(lp_lockdir())) {
                mkdir(lp_lockdir(), 0755);
        }
 
index 814eaf7ca84984856a5ee53dd0998a63d7253d48..9ee0709cb577089e51db7660db35c29c74db39f2 100644 (file)
@@ -442,7 +442,7 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
                                                ("get_mydnsdomname failed.\n"));
                                                return;
                                        }
-                                       hostname = get_myname(talloc_tos());
+                                       hostname = talloc_get_myname(talloc_tos());
                                        if (!hostname) {
                                                DEBUG(2,
                                                ("get_myname failed.\n"));
index 96938b011a26c05d888653dc003f27477baa2df7..5ee6e831382f365c39bd798a4c61ee630d154932 100644 (file)
@@ -124,7 +124,7 @@ static struct name_record *wins_record_to_name_record(TDB_DATA key, TDB_DATA dat
        namerec->data.refresh_time = (time_t)refresh_time;
        namerec->data.id = id_low;
 #if defined(HAVE_LONGLONG)
-       namerec->data.id |= ((SMB_BIG_UINT)id_high << 32);
+       namerec->data.id |= ((uint64_t)id_high << 32);
 #endif
        namerec->data.wins_ip.s_addr = saddr;
        namerec->data.wins_flags = wins_flags,
@@ -412,14 +412,14 @@ static void update_wins_flag(struct name_record *namerec, int flags)
  Return the general ID value and increase it if requested.
 *****************************************************************************/
 
-static void get_global_id_and_update(SMB_BIG_UINT *current_id, bool update)
+static void get_global_id_and_update(uint64_t *current_id, bool update)
 {
        /*
         * it's kept as a static here, to prevent people from messing
         * with the value directly
         */
 
-       static SMB_BIG_UINT general_id = 1;
+       static uint64_t general_id = 1;
 
        DEBUG(5,("get_global_id_and_update: updating version ID: %d\n", (int)general_id));
        
index 4726c1e13f3165172773556e1b95baec51738131..5bc0fa54da9a00d0fd68e64f877ff42fa3487758 100644 (file)
@@ -32,7 +32,6 @@ int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3);
 #endif
 
 #ifdef HAVE_NS_API_H
-#undef VOLATILE
 #undef STATIC
 #undef DYNAMIC
 #include <ns_daemon.h>
index 7d42381986df537ab9f22fd1ea14c642ea9d8087..2f82997aafbe4c1bdfe56ed2444c384d81531bf9 100644 (file)
@@ -20,7 +20,6 @@
 
 #include "includes.h"
 #ifdef HAVE_NS_API_H
-#undef VOLATILE
 
 #include <ns_daemon.h>
 #endif
index 1191c3d3aa690905a0a7b11f79d0ebb61b0cc174..d91d34d29bfab55e42e7bbd488346cee699e7ea1 100644 (file)
@@ -6529,7 +6529,7 @@ static void copy_service(struct service *pserviceDest, struct service *pserviceS
                                        break;
                                case P_LIST:
                                        TALLOC_FREE(*((char ***)dest_ptr));
-                                       str_list_copy(NULL, (char ***)dest_ptr,
+                                       *((char ***)dest_ptr) = str_list_copy(NULL, 
                                                      *(const char ***)src_ptr);
                                        break;
                                default:
@@ -6930,7 +6930,7 @@ static bool handle_include(int snum, const char *pszParmValue, char **ptr)
 
        string_set(ptr, fname);
 
-       if (file_exist(fname, NULL)) {
+       if (file_exist(fname)) {
                bool ret = pm_process(fname, do_section, do_parameter, NULL);
                SAFE_FREE(fname);
                return ret;
@@ -7423,7 +7423,7 @@ static bool equal_parameter(parm_type type, void *ptr1, void *ptr2)
                        return (*((char *)ptr1) == *((char *)ptr2));
 
                case P_LIST:
-                       return str_list_compare(*(char ***)ptr1, *(char ***)ptr2);
+                       return str_list_equal(*(const char ***)ptr1, *(const char ***)ptr2);
 
                case P_STRING:
                case P_USTRING:
@@ -7512,8 +7512,8 @@ static bool is_default(int i)
                return False;
        switch (parm_table[i].type) {
                case P_LIST:
-                       return str_list_compare (parm_table[i].def.lvalue, 
-                                               *(char ***)parm_table[i].ptr);
+                       return str_list_equal((const char **)parm_table[i].def.lvalue, 
+                                               *(const char ***)parm_table[i].ptr);
                case P_STRING:
                case P_USTRING:
                        return strequal(parm_table[i].def.svalue,
@@ -7927,9 +7927,8 @@ static void lp_save_defaults(void)
                        continue;
                switch (parm_table[i].type) {
                        case P_LIST:
-                               str_list_copy(
-                                       NULL, &(parm_table[i].def.lvalue),
-                                       *(const char ***)parm_table[i].ptr);
+                               parm_table[i].def.lvalue = str_list_copy(
+                                       NULL, *(const char ***)parm_table[i].ptr);
                                break;
                        case P_STRING:
                        case P_USTRING:
@@ -8386,7 +8385,7 @@ static int process_usershare_file(const char *dir_name, const char *file_name, i
                return -1;
        }
 
-       lines = fd_lines_load(fd, &numlines, MAX_USERSHARE_FILE_SIZE);
+       lines = fd_lines_load(fd, &numlines, MAX_USERSHARE_FILE_SIZE, NULL);
 
        close(fd);
        if (lines == NULL) {
@@ -8401,7 +8400,7 @@ static int process_usershare_file(const char *dir_name, const char *file_name, i
        /* Should we allow printers to be shared... ? */
        ctx = talloc_init("usershare_sd_xctx");
        if (!ctx) {
-               file_lines_free(lines);
+               TALLOC_FREE(lines);
                return 1;
        }
 
@@ -8409,11 +8408,11 @@ static int process_usershare_file(const char *dir_name, const char *file_name, i
                        iService, lines, numlines, &sharepath,
                        &comment, &psd, &guest_ok) != USERSHARE_OK) {
                talloc_destroy(ctx);
-               file_lines_free(lines);
+               TALLOC_FREE(lines);
                return -1;
        }
 
-       file_lines_free(lines);
+       TALLOC_FREE(lines);
 
        /* Everything ok - add the service possibly using a template. */
        if (iService < 0) {
diff --git a/source3/param/params.c b/source3/param/params.c
deleted file mode 100644 (file)
index 478376c..0000000
+++ /dev/null
@@ -1,590 +0,0 @@
-/* -------------------------------------------------------------------------- **
- * Microsoft Network Services for Unix, AKA., Andrew Tridgell's SAMBA.
- *
- * This module Copyright (C) 1990-1998 Karl Auer
- *
- * Rewritten almost completely by Christopher R. Hertel, 1997.
- * This module Copyright (C) 1997-1998 by Christopher R. Hertel
- * 
- * -------------------------------------------------------------------------- **
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- *
- * -------------------------------------------------------------------------- **
- *
- * Module name: params
- *
- * -------------------------------------------------------------------------- **
- *
- *  This module performs lexical analysis and initial parsing of a
- *  Windows-like parameter file.  It recognizes and handles four token
- *  types:  section-name, parameter-name, parameter-value, and
- *  end-of-file.  Comments and line continuation are handled
- *  internally.
- *
- *  The entry point to the module is function pm_process().  This
- *  function opens the source file, calls the Parse() function to parse
- *  the input, and then closes the file when either the EOF is reached
- *  or a fatal error is encountered.
- *
- *  A sample parameter file might look like this:
- *
- *  [section one]
- *  parameter one = value string
- *  parameter two = another value
- *  [section two]
- *  new parameter = some value or t'other
- *
- *  The parameter file is divided into sections by section headers:
- *  section names enclosed in square brackets (eg. [section one]).
- *  Each section contains parameter lines, each of which consist of a
- *  parameter name and value delimited by an equal sign.  Roughly, the
- *  syntax is:
- *
- *    <file>            :==  { <section> } EOF
- *
- *    <section>         :==  <section header> { <parameter line> }
- *
- *    <section header>  :==  '[' NAME ']'
- *
- *    <parameter line>  :==  NAME '=' VALUE '\n'
- *
- *  Blank lines and comment lines are ignored.  Comment lines are lines
- *  beginning with either a semicolon (';') or a pound sign ('#').
- *
- *  All whitespace in section names and parameter names is compressed
- *  to single spaces.  Leading and trailing whitespace is stipped from
- *  both names and values.
- *
- *  Only the first equals sign in a parameter line is significant.
- *  Parameter values may contain equals signs, square brackets and
- *  semicolons.  Internal whitespace is retained in parameter values,
- *  with the exception of the '\r' character, which is stripped for
- *  historic reasons.  Parameter names may not start with a left square
- *  bracket, an equal sign, a pound sign, or a semicolon, because these
- *  are used to identify other tokens.
- *
- * -------------------------------------------------------------------------- **
- */
-
-#include "includes.h"
-
-/* -------------------------------------------------------------------------- **
- * Constants...
- */
-
-#define BUFR_INC 1024
-
-
-/* -------------------------------------------------------------------------- **
- * Variables...
- *
- *  DEBUGLEVEL  - The ubiquitous DEBUGLEVEL.  This determines which DEBUG()
- *                messages will be produced.
- *  bufr        - pointer to a global buffer.  This is probably a kludge,
- *                but it was the nicest kludge I could think of (for now).
- *  bSize       - The size of the global buffer <bufr>.
- */
-
-/* we can't use FILE* due to the 256 fd limit - use this cheap hack
-   instead */
-typedef struct {
-       char *buf;
-       char *p;
-       size_t size;
-       char *end_section_p;
-} myFILE;
-
-static int mygetc(myFILE *f)
-{
-       if (f->p >= f->buf+f->size)
-               return EOF;
-        /* be sure to return chars >127 as positive values */
-       return (int)( *(f->p++) & 0x00FF );
-}
-
-static void myfile_close(myFILE *f)
-{
-       if (!f)
-               return;
-       SAFE_FREE(f->buf);
-       SAFE_FREE(f);
-}
-
-/* Find the end of the section. We must use mb functions for this. */
-static int FindSectionEnd(myFILE *f)
-{
-       f->end_section_p = strchr_m(f->p, ']');
-       return f->end_section_p ? 1 : 0;
-}
-
-static int AtSectionEnd(myFILE *f)
-{
-       if (f->p == f->end_section_p + 1) {
-               f->end_section_p = NULL;
-               return 1;
-       }
-       return 0;
-}
-
-/* -------------------------------------------------------------------------- **
- * Functions...
- */
-  /* ------------------------------------------------------------------------ **
-   * Scan past whitespace (see ctype(3C)) and return the first non-whitespace
-   * character, or newline, or EOF.
-   *
-   *  Input:  InFile  - Input source.
-   *
-   *  Output: The next non-whitespace character in the input stream.
-   *
-   *  Notes:  Because the config files use a line-oriented grammar, we
-   *          explicitly exclude the newline character from the list of
-   *          whitespace characters.
-   *        - Note that both EOF (-1) and the nul character ('\0') are
-   *          considered end-of-file markers.
-   *
-   * ------------------------------------------------------------------------ **
-   */
-static int EatWhitespace( myFILE *InFile )
-{
-       int c;
-
-       for( c = mygetc( InFile ); isspace( c ) && ('\n' != c); c = mygetc( InFile ) )
-               ;
-       return( c );
-}
-
-  /* ------------------------------------------------------------------------ **
-   * Scan to the end of a comment.
-   *
-   *  Input:  InFile  - Input source.
-   *
-   *  Output: The character that marks the end of the comment.  Normally,
-   *          this will be a newline, but it *might* be an EOF.
-   *
-   *  Notes:  Because the config files use a line-oriented grammar, we
-   *          explicitly exclude the newline character from the list of
-   *          whitespace characters.
-   *        - Note that both EOF (-1) and the nul character ('\0') are
-   *          considered end-of-file markers.
-   *
-   * ------------------------------------------------------------------------ **
-   */
-
-static int EatComment( myFILE *InFile )
-{
-       int c;
-
-       for( c = mygetc( InFile ); ('\n'!=c) && (EOF!=c) && (c>0); c = mygetc( InFile ) )
-               ;
-       return( c );
-}
-
-/*****************************************************************************
- * Scan backards within a string to discover if the last non-whitespace
- * character is a line-continuation character ('\\').
- *
- *  Input:  line  - A pointer to a buffer containing the string to be
- *                  scanned.
- *          pos   - This is taken to be the offset of the end of the
- *                  string.  This position is *not* scanned.
- *
- *  Output: The offset of the '\\' character if it was found, or -1 to
- *          indicate that it was not.
- *
- *****************************************************************************/
-
-static int Continuation(uint8_t *line, int pos )
-{
-       pos--;
-       while( (pos >= 0) && isspace((int)line[pos]))
-               pos--;
-
-       return (((pos >= 0) && ('\\' == line[pos])) ? pos : -1 );
-}
-
-/* ------------------------------------------------------------------------ **
- * Scan a section name, and pass the name to function sfunc().
- *
- *  Input:  InFile  - Input source.
- *          sfunc   - Pointer to the function to be called if the section
- *                    name is successfully read.
- *
- *  Output: True if the section name was read and True was returned from
- *          <sfunc>.  False if <sfunc> failed or if a lexical error was
- *          encountered.
- *
- * ------------------------------------------------------------------------ **
- */
-
-static bool Section( DATA_BLOB *buf, myFILE *InFile, bool (*sfunc)(const char *, void *), void *userdata )
-{
-       int   c;
-       int   i;
-       int   end;
-       const char *func  = "params.c:Section() -";
-
-       i = 0;      /* <i> is the offset of the next free byte in bufr[] and  */
-       end = 0;    /* <end> is the current "end of string" offset.  In most  */
-                   /* cases these will be the same, but if the last          */
-                   /* character written to bufr[] is a space, then <end>     */
-                   /* will be one less than <i>.                             */
-
-
-       /* Find the end of the section. We must use mb functions for this. */
-       if (!FindSectionEnd(InFile)) {
-               DEBUG(0, ("%s No terminating ']' character in section.\n", func) );
-               return False;
-       }
-
-       c = EatWhitespace( InFile );    /* We've already got the '['.  Scan */
-                                       /* past initial white space.        */
-
-       while( (EOF != c) && (c > 0) ) {
-               /* Check that the buffer is big enough for the next character. */
-               if( i > (buf->length - 2) ) {
-                       uint8_t *tb = (uint8_t *)SMB_REALLOC_KEEP_OLD_ON_ERROR(buf->data, buf->length+BUFR_INC );
-                       if(!tb) {
-                               DEBUG(0, ("%s Memory re-allocation failure.", func) );
-                               return False;
-                       }
-                       buf->data = tb;
-                       buf->length += BUFR_INC;
-               }
-
-               /* Handle a single character other than section end. */
-               switch( c ) {
-                       case '\n': /* Got newline before closing ']'.    */
-                               i = Continuation( buf->data, i );    /* Check for line continuation.     */
-                               if( i < 0 ) {
-                                       buf->data[end] = '\0';
-                                       DEBUG(0, ("%s Badly formed line in configuration file: %s\n", func, buf->data ));
-                                       return False;
-                               }
-                               end = ( (i > 0) && (' ' == buf->data[i - 1]) ) ? (i - 1) : (i);
-                                       c = mygetc( InFile );             /* Continue with next line.         */
-                               break;
-
-                       default: /* All else are a valid name chars.   */
-                               if(isspace( c )) {
-                                       /* One space per whitespace region. */
-                                       buf->data[end] = ' ';
-                                       i = end + 1;
-                                       c = EatWhitespace( InFile );
-                               } else {
-                                       buf->data[i++] = c;
-                                       end = i;
-                                       c = mygetc( InFile );
-                               }
-               }
-
-               if (AtSectionEnd(InFile)) {
-                       /* Got to the closing bracket. */
-                       buf->data[end] = '\0';
-                       if( 0 == end ) {
-                               /* Don't allow an empty name.       */
-                               DEBUG(0, ("%s Empty section name in configuration file.\n", func ));
-                               return False;
-                       }
-                       if( !sfunc((char *)buf->data, userdata) )            /* Got a valid name.  Deal with it. */
-                               return False;
-                       EatComment( InFile );     /* Finish off the line.             */
-                       return True;
-               }
-
-       }
-
-       /* We arrive here if we've met the EOF before the closing bracket. */
-       DEBUG(0, ("%s Unexpected EOF in the configuration file: %s\n", func, buf->data ));
-       return False;
-}
-
-/* ------------------------------------------------------------------------ **
- * Scan a parameter name and value, and pass these two fields to pfunc().
- *
- *  Input:  InFile  - The input source.
- *          pfunc   - A pointer to the function that will be called to
- *                    process the parameter, once it has been scanned.
- *          c       - The first character of the parameter name, which
- *                    would have been read by Parse().  Unlike a comment
- *                    line or a section header, there is no lead-in
- *                    character that can be discarded.
- *
- *  Output: True if the parameter name and value were scanned and processed
- *          successfully, else False.
- *
- *  Notes:  This function is in two parts.  The first loop scans the
- *          parameter name.  Internal whitespace is compressed, and an
- *          equal sign (=) terminates the token.  Leading and trailing
- *          whitespace is discarded.  The second loop scans the parameter
- *          value.  When both have been successfully identified, they are
- *          passed to pfunc() for processing.
- *
- * ------------------------------------------------------------------------ **
- */
-
-static bool Parameter( DATA_BLOB *buf, myFILE *InFile, bool (*pfunc)(const char *, const char *, void *), int c, void *userdata )
-{
-       int   i       = 0;    /* Position within bufr. */
-       int   end     = 0;    /* bufr[end] is current end-of-string. */
-       int   vstart  = 0;    /* Starting position of the parameter value. */
-       const char *func    = "params.c:Parameter() -";
-
-       /* Read the parameter name. */
-       while( 0 == vstart ) {
-               /* Loop until we've found the start of the value. */
-               if( i > (buf->length - 2) ) {
-                       /* Ensure there's space for next char.    */
-                       uint8_t *tb = (uint8_t *)SMB_REALLOC_KEEP_OLD_ON_ERROR( buf->data, buf->length + BUFR_INC );
-                       if (!tb) {
-                               DEBUG(0, ("%s Memory re-allocation failure.", func) );
-                               return False;
-                       }
-                       buf->data = tb;
-                       buf->length += BUFR_INC;
-               }
-
-               switch(c) {
-                       case '=': /* Equal sign marks end of param name. */
-                               if( 0 == end ) {
-                                       /* Don't allow an empty name.      */
-                                       DEBUG(0, ("%s Invalid parameter name in config. file.\n", func ));
-                                       return False;
-                               }
-                               buf->data[end++] = '\0';         /* Mark end of string & advance.   */
-                               i       = end;              /* New string starts here.         */
-                               vstart  = end;              /* New string is parameter value.  */
-                               buf->data[i] = '\0';             /* New string is nul, for now.     */
-                               break;
-
-                       case '\n': /* Find continuation char, else error. */
-                               i = Continuation( buf->data, i );
-                               if( i < 0 ) {
-                                       buf->data[end] = '\0';
-                                       DEBUG(1,("%s Ignoring badly formed line in configuration file: %s\n", func, buf->data ));
-                                       return True;
-                               }
-                               end = ( (i > 0) && (' ' == buf->data[i - 1]) ) ? (i - 1) : (i);
-                               c = mygetc( InFile );       /* Read past eoln.                   */
-                               break;
-
-                       case '\0': /* Shouldn't have EOF within param name. */
-                       case EOF:
-                               buf->data[i] = '\0';
-                               DEBUG(1,("%s Unexpected end-of-file at: %s\n", func, buf->data ));
-                               return True;
-
-                       default:
-                               if(isspace( c )) {
-                                       /* One ' ' per whitespace region.       */
-                                       buf->data[end] = ' ';
-                                       i = end + 1;
-                                       c = EatWhitespace( InFile );
-                               } else {
-                                       buf->data[i++] = c;
-                                       end = i;
-                                       c = mygetc( InFile );
-                               }
-               }
-       }
-
-       /* Now parse the value. */
-       c = EatWhitespace( InFile );  /* Again, trim leading whitespace. */
-       while( (EOF !=c) && (c > 0) ) {
-               if( i > (buf->length - 2) ) {
-                       /* Make sure there's enough room. */
-                       uint8_t *tb = (uint8_t *)SMB_REALLOC_KEEP_OLD_ON_ERROR( buf->data, buf->length + BUFR_INC );
-                       if (!tb) {
-                               DEBUG(0, ("%s Memory re-allocation failure.", func));
-                               return False;
-                       }
-                       buf->data = tb;
-                       buf->length += BUFR_INC;
-               }
-
-               switch(c) {
-                       case '\r': /* Explicitly remove '\r' because the older */
-                               c = mygetc( InFile );   /* version called fgets_slash() which also  */
-                               break;                /* removes them.                            */
-
-                       case '\n': /* Marks end of value unless there's a '\'. */
-                               i = Continuation( buf->data, i );
-                               if( i < 0 ) {
-                                       c = 0;
-                               } else {
-                                       for( end = i; (end >= 0) && isspace((int)buf->data[end]); end-- )
-                                               ;
-                                       c = mygetc( InFile );
-                               }
-                               break;
-
-                       default: /* All others verbatim.  Note that spaces do not advance <end>.  This allows trimming  */
-                               buf->data[i++] = c;
-                               if( !isspace( c ) )  /* of whitespace at the end of the line.     */
-                                       end = i;
-                               c = mygetc( InFile );
-                               break;
-               }
-       }
-       buf->data[end] = '\0';          /* End of value. */
-
-       return( pfunc( (char *)buf->data, (char *)&buf->data[vstart], userdata ) );   /* Pass name & value to pfunc().  */
-}
-
-/* ------------------------------------------------------------------------ **
- * Scan & parse the input.
- *
- *  Input:  InFile  - Input source.
- *          sfunc   - Function to be called when a section name is scanned.
- *                    See Section().
- *          pfunc   - Function to be called when a parameter is scanned.
- *                    See Parameter().
- *
- *  Output: True if the file was successfully scanned, else False.
- *
- *  Notes:  The input can be viewed in terms of 'lines'.  There are four
- *          types of lines:
- *            Blank      - May contain whitespace, otherwise empty.
- *            Comment    - First non-whitespace character is a ';' or '#'.
- *                         The remainder of the line is ignored.
- *            Section    - First non-whitespace character is a '['.
- *            Parameter  - The default case.
- * 
- * ------------------------------------------------------------------------ **
- */
-
-static bool Parse( DATA_BLOB *buf, myFILE *InFile,
-                   bool (*sfunc)(const char *, void *),
-                   bool (*pfunc)(const char *, const char *, void *),
-                  void *userdata)
-{
-       int    c;
-
-       c = EatWhitespace( InFile );
-       while( (EOF != c) && (c > 0) ) {
-               switch( c ) {
-                       case '\n': /* Blank line. */
-                               c = EatWhitespace( InFile );
-                               break;
-
-                       case ';': /* Comment line. */
-                       case '#':
-                               c = EatComment( InFile );
-                               break;
-
-                       case '[': /* Section Header. */
-                               if( !Section( buf, InFile, sfunc, userdata ) )
-                                       return False;
-                               c = EatWhitespace( InFile );
-                               break;
-
-                       case '\\': /* Bogus backslash. */
-                               c = EatWhitespace( InFile );
-                               break;
-
-                       default: /* Parameter line. */
-                               if( !Parameter( buf, InFile, pfunc, c, userdata ) )
-                                       return False;
-                               c = EatWhitespace( InFile );
-                               break;
-               }
-       }
-       return True;
-}
-
-/* ------------------------------------------------------------------------ **
- * Open a configuration file.
- *
- *  Input:  FileName  - The pathname of the config file to be opened.
- *
- *  Output: A pointer of type (char **) to the lines of the file
- *
- * ------------------------------------------------------------------------ **
- */
-
-static myFILE *OpenConfFile( const char *FileName )
-{
-       const char *func = "params.c:OpenConfFile() -";
-       int lvl = lp_is_in_client() ? 1 : 0;
-       myFILE *ret;
-
-       ret = SMB_MALLOC_P(myFILE);
-       if (!ret)
-               return NULL;
-
-       ret->buf = file_load(FileName, &ret->size, 0);
-       if( NULL == ret->buf ) {
-               DEBUG( lvl, ("%s Unable to open configuration file \"%s\":\n\t%s\n",
-                       func, FileName, strerror(errno)) );
-               SAFE_FREE(ret);
-               return NULL;
-       }
-
-       ret->p = ret->buf;
-       ret->end_section_p = NULL;
-       return( ret );
-}
-
-/* ------------------------------------------------------------------------ **
- * Process the named parameter file.
- *
- *  Input:  FileName  - The pathname of the parameter file to be opened.
- *          sfunc     - A pointer to a function that will be called when
- *                      a section name is discovered.
- *          pfunc     - A pointer to a function that will be called when
- *                      a parameter name and value are discovered.
- *
- *  Output: TRUE if the file was successfully parsed, else FALSE.
- *
- * ------------------------------------------------------------------------ **
- */
-
-bool pm_process( const char *FileName,
-               bool (*sfunc)(const char *, void *),
-               bool (*pfunc)(const char *, const char *, void *),
-               void *userdata)
-{
-       int   result;
-       myFILE *InFile;
-       const char *func = "params.c:pm_process() -";
-       DATA_BLOB buf;
-
-       InFile = OpenConfFile( FileName );          /* Open the config file. */
-       if( NULL == InFile )
-               return False;
-
-       DEBUG( 3, ("%s Processing configuration file \"%s\"\n", func, FileName) );
-
-       buf = data_blob(NULL, 256);
-
-       if (buf.data == NULL) {
-               DEBUG(0,("%s memory allocation failure.\n", func));
-               myfile_close(InFile);
-               return False;
-       }
-
-       result = Parse( &buf, InFile, sfunc, pfunc, userdata );
-       data_blob_free(&buf);
-
-       myfile_close(InFile);
-
-       if( !result ) {
-               DEBUG(0,("%s Failed.  Error returned from params.c:parse().\n", func));
-               return False;
-       }
-
-       return True;
-}
index db1bad4726a142fc12c28c0a6625eabe94843a85..1ec123e70a62cf20cc69e70ee229b35778151bfb 100644 (file)
@@ -81,8 +81,8 @@ int main(int argc, const char **argv)
 
 
 done:
-       TALLOC_FREE(frame);
        gfree_loadparm();
+       TALLOC_FREE(frame);
        return ret;
 }
 
index ff2c9bcb0d9fd46870f10753c684c0760689142e..c7c3cc474b9dcb213036191fa1b716e0ceb2d1d4 100644 (file)
@@ -41,15 +41,15 @@ static bool read_sid_from_file(const char *fname, DOM_SID *sid)
        int numlines;
        bool ret;
 
-       lines = file_lines_load(fname, &numlines,0);
+       lines = file_lines_load(fname, &numlines,0, NULL);
        
        if (!lines || numlines < 1) {
-               if (lines) file_lines_free(lines);
+               if (lines) TALLOC_FREE(lines);
                return False;
        }
        
        ret = string_to_sid(sid, lines[0]);
-       file_lines_free(lines);
+       TALLOC_FREE(lines);
        return ret;
 }
 
index 306d4d0a35c5ce5cb4477c78973ff35a341604dc..a6adb904e23356b3e4f959442a66511bbaa4408b 100644 (file)
@@ -238,7 +238,7 @@ bool secrets_fetch_domain_guid(const char *domain, struct GUID *guid)
 
        if (!dyn_guid) {
                if (lp_server_role() == ROLE_DOMAIN_PDC) {
-                       smb_uuid_generate_random(&new_guid);
+                       new_guid = GUID_random();
                        if (!secrets_store_domain_guid(domain, &new_guid))
                                return False;
                        dyn_guid = (struct GUID *)secrets_fetch(key, &size);
index 850375e82b300a6e0a205fb42fafdc24425206fe..c0e62eac194a9f27a7beb15c18790034860964b7 100644 (file)
@@ -1376,7 +1376,7 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
                        DEBUGADD(6,("file_version_is_newer: mod time = %ld sec\n", old_create_time));
                }
        }
-       close_file(fsp, NORMAL_CLOSE);
+       close_file(NULL, fsp, NORMAL_CLOSE);
        fsp = NULL;
 
        /* Get file version info (if available) for new file */
@@ -1417,7 +1417,7 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
                        DEBUGADD(6,("file_version_is_newer: mod time = %ld sec\n", new_create_time));
                }
        }
-       close_file(fsp, NORMAL_CLOSE);
+       close_file(NULL, fsp, NORMAL_CLOSE);
        fsp = NULL;
 
        if (use_version && (new_major != old_major || new_minor != old_minor)) {
@@ -1447,7 +1447,7 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
 
        error_exit:
                if(fsp)
-                       close_file(fsp, NORMAL_CLOSE);
+                       close_file(NULL, fsp, NORMAL_CLOSE);
                return -1;
 }
 
@@ -1583,7 +1583,7 @@ static uint32 get_correct_cversion(const char *architecture, fstring driverpath_
        DEBUG(10,("get_correct_cversion: Driver file [%s] cversion = %d\n",
                driverpath, cversion));
 
-       close_file(fsp, NORMAL_CLOSE);
+       close_file(NULL, fsp, NORMAL_CLOSE);
        close_cnum(conn, user->vuid);
        unbecome_user();
        *perr = WERR_OK;
@@ -1593,7 +1593,7 @@ static uint32 get_correct_cversion(const char *architecture, fstring driverpath_
   error_exit:
 
        if(fsp)
-               close_file(fsp, NORMAL_CLOSE);
+               close_file(NULL, fsp, NORMAL_CLOSE);
 
        close_cnum(conn, user->vuid);
        unbecome_user();
@@ -3221,7 +3221,7 @@ static void store_printer_guid(NT_PRINTER_INFO_LEVEL_2 *info2,
 
        ZERO_STRUCT( unistr_guid );     
        
-       init_unistr2( &unistr_guid, smb_uuid_string(talloc_tos(), guid),
+       init_unistr2( &unistr_guid, GUID_string(talloc_tos(), &guid),
                      UNI_STR_TERMINATE );
 
        regval_ctr_addvalue(ctr, "objectGUID", REG_SZ, 
@@ -3536,7 +3536,7 @@ bool is_printer_published(Printer_entry *print_hnd, int snum,
                case REG_SZ:            
                        rpcstr_pull( guid_str, regval_data_p(guid_val), 
                                     sizeof(guid_str)-1, -1, STR_TERMINATE );
-                       ret = smb_string_to_uuid( guid_str, guid );
+                       ret = NT_STATUS_IS_OK(GUID_from_string( guid_str, guid ));
                        break;                  
                case REG_BINARY:
                        if ( regval_size(guid_val) != sizeof(struct GUID) ) {
@@ -3841,7 +3841,7 @@ static int unpack_values(NT_PRINTER_DATA *printer_data, const uint8 *buf, int bu
                        memcpy( &guid, data_p, sizeof(struct GUID) );
 
                        init_unistr2( &unistr_guid,
-                                     smb_uuid_string(talloc_tos(), guid), 
+                                     GUID_string(talloc_tos(), &guid), 
                                      UNI_STR_TERMINATE );
 
                        regval_ctr_addvalue( printer_data->keys[key_index].values, 
@@ -3925,10 +3925,10 @@ static void map_to_os2_driver(fstring drivername)
                return;
        }
 
-       lines = file_lines_load(mapfile, &numlines,0);
+       lines = file_lines_load(mapfile, &numlines,0,NULL);
        if (numlines == 0 || lines == NULL) {
                DEBUG(0,("No entries in OS/2 driver map %s\n",mapfile));
-               SAFE_FREE(lines);
+               TALLOC_FREE(lines);
                return;
        }
 
@@ -3972,12 +3972,12 @@ static void map_to_os2_driver(fstring drivername)
                        DEBUG(3,("Mapped windows driver %s to os2 driver%s\n",drivername,os2_name));
                        set_last_from_to(drivername,os2_name);
                        fstrcpy(drivername,os2_name);
-                       file_lines_free(lines);
+                       TALLOC_FREE(lines);
                        return;
                }
        }
 
-       file_lines_free(lines);
+       TALLOC_FREE(lines);
 }
 
 /****************************************************************************
index 10c1a2d608bf8df9ea8173440b11707ef2b3a258..b9e5ad56adfd73e85b94498b17dbda8e144ea98b 100644 (file)
@@ -282,5 +282,5 @@ void pcap_printer_fn_specific(const struct pcap_cache *pc,
 
 void pcap_printer_fn(void (*fn)(const char *, const char *, void *), void *pdata)
 {
-       return pcap_printer_fn_specific(pcap_cache, fn, pdata);
+       pcap_printer_fn_specific(pcap_cache, fn, pdata);
 }
index 2a324fdd5c3d9aeefacd56faaa43898df012cf29..5806b292064821254d5c723ce0ff204ab98daf4e 100644 (file)
@@ -104,7 +104,7 @@ static int generic_job_delete( const char *sharename, const char *lprm_command,
        slprintf(jobstr, sizeof(jobstr)-1, "%d", pjob->sysjob);
        return print_run_command( -1, sharename, False, lprm_command, NULL,
                   "%j", jobstr,
-                  "%T", http_timestring(pjob->starttime),
+                  "%T", http_timestring(talloc_tos(), pjob->starttime),
                   NULL);
 }
 
@@ -238,7 +238,7 @@ static int generic_queue_get(const char *printer_name,
        }
        
        numlines = 0;
-       qlines = fd_lines_load(fd, &numlines,0);
+       qlines = fd_lines_load(fd, &numlines,0,NULL);
        close(fd);
 
        /* turn the lpq output into a series of job structures */
@@ -247,7 +247,7 @@ static int generic_queue_get(const char *printer_name,
        if (numlines && qlines) {
                queue = SMB_MALLOC_ARRAY(print_queue_struct, numlines+1);
                if (!queue) {
-                       file_lines_free(qlines);
+                       TALLOC_FREE(qlines);
                        *q = NULL;
                        return 0;
                }
@@ -262,7 +262,7 @@ static int generic_queue_get(const char *printer_name,
                }               
        }
 
-       file_lines_free(qlines);
+       TALLOC_FREE(qlines);
         *q = queue;
        return qcount;
 }
index 7e91d3a677acb98c96f88f2b969a702c6f8dccd7..681b2bf459b93bc30e4e1e6547d6a8f5763f5387 100644 (file)
@@ -59,12 +59,12 @@ bool sysv_cache_reload(void)
                 scheduler = file_lines_pload("/usr/bin/lpstat -r", NULL);
                 if(!strcmp(*scheduler,"scheduler is running")){
                         DEBUG(3,("No Printers found!!!\n"));
-                       file_lines_free(scheduler);
+                       TALLOC_FREE(scheduler);
                         return True;
                 }
                 else{
                         DEBUG(3,("Scheduler is not running!!!\n"));
-                       file_lines_free(scheduler);
+                       TALLOC_FREE(scheduler);
                        return False;
                }
 #else
@@ -111,12 +111,12 @@ bool sysv_cache_reload(void)
                
                /* add it to the cache */
                if (!pcap_cache_add(name, NULL)) {
-                       file_lines_free(lines);
+                       TALLOC_FREE(lines);
                        return False;
                }
        }
 
-       file_lines_free(lines);
+       TALLOC_FREE(lines);
        return True;
 }
 
index c6749226fd1319f0c6cac4bee72ff63fb206b00b..a247cd84276106e7a819bffdc0b9789b15fd0eb3 100644 (file)
@@ -25,7 +25,8 @@ open a print file and setup a fsp for it. This is a wrapper around
 print_job_start().
 ***************************************************************************/
 
-NTSTATUS print_fsp_open(connection_struct *conn, const char *fname,
+NTSTATUS print_fsp_open(struct smb_request *req, connection_struct *conn,
+                       const char *fname,
                        uint16_t current_vuid, files_struct **result)
 {
        int jobid;
@@ -34,7 +35,7 @@ NTSTATUS print_fsp_open(connection_struct *conn, const char *fname,
        fstring name;
        NTSTATUS status;
 
-       status = file_new(conn, &fsp);
+       status = file_new(req, conn, &fsp);
        if(!NT_STATUS_IS_OK(status)) {
                return status;
        }
@@ -52,7 +53,7 @@ NTSTATUS print_fsp_open(connection_struct *conn, const char *fname,
        jobid = print_job_start(conn->server_info, SNUM(conn), name, NULL);
        if (jobid == -1) {
                status = map_nt_error_from_unix(errno);
-               file_free(fsp);
+               file_free(req, fsp);
                return status;
        }
 
@@ -61,7 +62,7 @@ NTSTATUS print_fsp_open(connection_struct *conn, const char *fname,
        if (fsp->rap_print_jobid == 0) {
                /* We need to delete the entry in the tdb. */
                pjob_delete(lp_const_servicename(SNUM(conn)), jobid);
-               file_free(fsp);
+               file_free(req, fsp);
                return NT_STATUS_ACCESS_DENIED; /* No errno around here */
        }
 
index 1016e6183d453155185aec8ff6fcea346914ab33..3c8c60f0e07204bc29b26ec7fcc53365b2fbaacb 100644 (file)
@@ -2389,9 +2389,9 @@ uint32 print_job_start(struct auth_serversupplied_info *server_info, int snum,
 
        /* see if we have sufficient disk space */
        if (lp_minprintspace(snum)) {
-               SMB_BIG_UINT dspace, dsize;
+               uint64_t dspace, dsize;
                if (sys_fsusage(path, &dspace, &dsize) == 0 &&
-                   dspace < 2*(SMB_BIG_UINT)lp_minprintspace(snum)) {
+                   dspace < 2*(uint64_t)lp_minprintspace(snum)) {
                        DEBUG(3, ("print_job_start: disk space check failed.\n"));
                        release_print_db(pdb);
                        errno = ENOSPC;
index e6088470481c3cc29745538e0b7856d9a3e360c9..eda44ace19a21c81eb0e484b3adef3f119a416ac 100644 (file)
@@ -63,7 +63,7 @@ void perfcount_init_keys( void )
 
        /* no registry keys; just create the perfmon directory */
        
-       if ( !directory_exist( p, NULL ) )
+       if ( !directory_exist( p ) )
                mkdir( p, 0755 );
        
        return;
@@ -450,7 +450,7 @@ static uint32 _reg_perfcount_get_size_field(uint32 CounterType)
 /*********************************************************************
 *********************************************************************/
 
-static uint32 _reg_perfcount_compute_scale(SMB_BIG_INT data)
+static uint32 _reg_perfcount_compute_scale(int64_t data)
 {
        int scale = 0;
        if(data == 0)
@@ -482,7 +482,7 @@ static bool _reg_perfcount_get_counter_info(PERF_DATA_BLOCK *block,
        char buf[PERFCOUNT_MAX_LEN];
        size_t dsize, padding;
        long int data32, dbuf[2];
-       SMB_BIG_INT data64;
+       int64_t data64;
        uint32 counter_size;
 
        obj->counters[obj->NumCounters].DefaultScale = 0;
@@ -521,7 +521,7 @@ static bool _reg_perfcount_get_counter_info(PERF_DATA_BLOCK *block,
                memcpy(buf, data.dptr, data.dsize);
                data32 = strtol(buf, NULL, 0);
                if((obj->counters[obj->NumCounters].CounterType & 0x00000F00) == PERF_TYPE_NUMBER)
-                       obj->counters[obj->NumCounters].DefaultScale = _reg_perfcount_compute_scale((SMB_BIG_INT)data32);
+                       obj->counters[obj->NumCounters].DefaultScale = _reg_perfcount_compute_scale((int64_t)data32);
                else
                        obj->counters[obj->NumCounters].DefaultScale = 0;
                dbuf[0] = data32;
@@ -823,7 +823,7 @@ static int _reg_perfcount_assemble_global(PERF_DATA_BLOCK *block,
 /*********************************************************************
 *********************************************************************/
 
-static bool _reg_perfcount_get_64(SMB_BIG_UINT *retval,
+static bool _reg_perfcount_get_64(uint64_t *retval,
                                  TDB_CONTEXT *tdb,
                                  int key_part1,
                                  const char *key_part2)
@@ -855,7 +855,7 @@ static bool _reg_perfcount_get_64(SMB_BIG_UINT *retval,
 static bool _reg_perfcount_init_data_block_perf(PERF_DATA_BLOCK *block,
                                                TDB_CONTEXT *names)
 {
-       SMB_BIG_UINT PerfFreq, PerfTime, PerfTime100nSec;
+       uint64_t PerfFreq, PerfTime, PerfTime100nSec;
        TDB_CONTEXT *counters;
        bool status = False;
        const char *fname = counters_directory( DATA_DB );
index 23618efd9fc9482a4a5037ed23176976e5fcc461..5f115e537bbe24a2177975c3593ec3988c97dcc3 100644 (file)
@@ -146,7 +146,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli,
        NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
        struct netr_Authenticator clnt_creds;
        struct netr_Authenticator ret_creds;
-       union netr_LogonInfo *logon;
+       union netr_LogonLevel *logon;
        union netr_Validation validation;
        uint8_t authoritative;
        int validation_level = 3;
@@ -156,7 +156,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli,
        ZERO_STRUCT(ret_creds);
        ZERO_STRUCT(zeros);
 
-       logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonInfo);
+       logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonLevel);
        if (!logon) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -172,7 +172,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli,
        netlogon_creds_client_step(cli->dc, &clnt_creds);
 
        switch (logon_type) {
-       case INTERACTIVE_LOGON_TYPE: {
+       case NetlogonInteractiveInformation: {
 
                struct netr_PasswordInfo *password_info;
 
@@ -231,7 +231,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli,
 
                break;
        }
-       case NET_LOGON_TYPE: {
+       case NetlogonNetworkInformation: {
                struct netr_NetworkInfo *network_info;
                uint8 chal[8];
                unsigned char local_lm_response[24];
@@ -327,7 +327,7 @@ NTSTATUS rpccli_netlogon_sam_network_logon(struct rpc_pipe_client *cli,
        uint8 zeros[16];
        struct netr_Authenticator clnt_creds;
        struct netr_Authenticator ret_creds;
-       union netr_LogonInfo *logon = NULL;
+       union netr_LogonLevel *logon = NULL;
        struct netr_NetworkInfo *network_info;
        uint8_t authoritative;
        union netr_Validation validation;
@@ -342,7 +342,7 @@ NTSTATUS rpccli_netlogon_sam_network_logon(struct rpc_pipe_client *cli,
        ZERO_STRUCT(lm);
        ZERO_STRUCT(nt);
 
-       logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonInfo);
+       logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonLevel);
        if (!logon) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -398,7 +398,7 @@ NTSTATUS rpccli_netlogon_sam_network_logon(struct rpc_pipe_client *cli,
                                           global_myname(),
                                           &clnt_creds,
                                           &ret_creds,
-                                          NET_LOGON_TYPE,
+                                          NetlogonNetworkInformation,
                                           logon,
                                           validation_level,
                                           &validation,
@@ -447,7 +447,7 @@ NTSTATUS rpccli_netlogon_sam_network_logon_ex(struct rpc_pipe_client *cli,
        const char *workstation_name_slash;
        const char *server_name_slash;
        uint8 zeros[16];
-       union netr_LogonInfo *logon = NULL;
+       union netr_LogonLevel *logon = NULL;
        struct netr_NetworkInfo *network_info;
        uint8_t authoritative;
        union netr_Validation validation;
@@ -462,7 +462,7 @@ NTSTATUS rpccli_netlogon_sam_network_logon_ex(struct rpc_pipe_client *cli,
        ZERO_STRUCT(lm);
        ZERO_STRUCT(nt);
 
-       logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonInfo);
+       logon = TALLOC_ZERO_P(mem_ctx, union netr_LogonLevel);
        if (!logon) {
                return NT_STATUS_NO_MEMORY;
        }
@@ -514,7 +514,7 @@ NTSTATUS rpccli_netlogon_sam_network_logon_ex(struct rpc_pipe_client *cli,
        result = rpccli_netr_LogonSamLogonEx(cli, mem_ctx,
                                             server_name_slash,
                                             global_myname(),
-                                            NET_LOGON_TYPE,
+                                            NetlogonNetworkInformation,
                                             logon,
                                             validation_level,
                                             &validation,
index f32a33fdb647d0474bdd8f2e46259ef3f6446c5a..ca9d3392e7b9c72e1f4ae38c412ae6736c89aeec 100644 (file)
@@ -2810,7 +2810,7 @@ NTSTATUS rpc_pipe_open_ncalrpc(TALLOC_CTX *mem_ctx, const char *socket_path,
        result->abstract_syntax = *abstract_syntax;
        result->transfer_syntax = ndr_transfer_syntax;
 
-       result->desthost = get_myname(result);
+       result->desthost = talloc_get_myname(result);
        result->srv_name_slash = talloc_asprintf_strupper_m(
                result, "\\\\%s", result->desthost);
        if ((result->desthost == NULL) || (result->srv_name_slash == NULL)) {
@@ -2906,7 +2906,7 @@ static NTSTATUS rpc_pipe_open_np(struct cli_state *cli,
        fnum = cli_nt_create(cli, result->trans.np.pipe_name,
                             DESIRED_ACCESS_PIPE);
        if (fnum == -1) {
-               DEBUG(1,("rpc_pipe_open_np: cli_nt_create failed on pipe %s "
+               DEBUG(3,("rpc_pipe_open_np: cli_nt_create failed on pipe %s "
                         "to machine %s.  Error was %s\n",
                         result->trans.np.pipe_name, cli->desthost,
                         cli_errstr(cli)));
index 3c29dcdee85eb3a711531e198fb6a1b4bb2f1b1d..51678083d33b7aed8a374823b48c5b75b2d85eac 100644 (file)
@@ -90,79 +90,3 @@ WERROR rpccli_svcctl_enumerate_services( struct rpc_pipe_client *cli, TALLOC_CTX
        
        return out.status;
 }
-
-/*******************************************************************
-*******************************************************************/
-
-WERROR rpccli_svcctl_query_config(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
-                                POLICY_HND *hService, SERVICE_CONFIG *config )
-{
-       SVCCTL_Q_QUERY_SERVICE_CONFIG in;
-       SVCCTL_R_QUERY_SERVICE_CONFIG out;
-       prs_struct qbuf, rbuf;
-       
-       ZERO_STRUCT(in);
-       ZERO_STRUCT(out);
-       
-       memcpy( &in.handle, hService, sizeof(POLICY_HND) );
-       in.buffer_size = 0;
-       
-       
-       CLI_DO_RPC_WERR( cli, mem_ctx, &ndr_table_svcctl.syntax_id,
-                        SVCCTL_QUERY_SERVICE_CONFIG_W,
-                   in, out, 
-                   qbuf, rbuf,
-                   svcctl_io_q_query_service_config,
-                   svcctl_io_r_query_service_config, 
-                   WERR_GENERAL_FAILURE );
-       
-       if ( W_ERROR_EQUAL( out.status, WERR_INSUFFICIENT_BUFFER ) ) {
-               in.buffer_size = out.needed;
-
-               CLI_DO_RPC_WERR( cli, mem_ctx, &ndr_table_svcctl.syntax_id,
-                                SVCCTL_QUERY_SERVICE_CONFIG_W,
-                           in, out, 
-                           qbuf, rbuf,
-                           svcctl_io_q_query_service_config,
-                           svcctl_io_r_query_service_config, 
-                           WERR_GENERAL_FAILURE );
-       }
-       
-       if ( !W_ERROR_IS_OK( out.status ) )
-               return out.status;
-
-       memcpy( config, &out.config, sizeof(SERVICE_CONFIG) );
-       
-       config->executablepath = TALLOC_ZERO_P( mem_ctx, UNISTR2 );
-       config->loadordergroup = TALLOC_ZERO_P( mem_ctx, UNISTR2 );
-       config->dependencies   = TALLOC_ZERO_P( mem_ctx, UNISTR2 );
-       config->startname      = TALLOC_ZERO_P( mem_ctx, UNISTR2 );
-       config->displayname    = TALLOC_ZERO_P( mem_ctx, UNISTR2 );
-       
-       if ( out.config.executablepath ) {
-               config->executablepath = TALLOC_ZERO_P( mem_ctx, UNISTR2 );
-               copy_unistr2( config->executablepath, out.config.executablepath );
-       }
-
-       if ( out.config.loadordergroup ) {
-               config->loadordergroup = TALLOC_ZERO_P( mem_ctx, UNISTR2 );
-               copy_unistr2( config->loadordergroup, out.config.loadordergroup );
-       }
-
-       if ( out.config.dependencies ) {
-               config->dependencies = TALLOC_ZERO_P( mem_ctx, UNISTR2 );
-               copy_unistr2( config->dependencies, out.config.dependencies );
-       }
-
-       if ( out.config.startname ) {
-               config->startname = TALLOC_ZERO_P( mem_ctx, UNISTR2 );
-               copy_unistr2( config->startname, out.config.startname );
-       }
-
-       if ( out.config.displayname ) {
-               config->displayname = TALLOC_ZERO_P( mem_ctx, UNISTR2 );
-               copy_unistr2( config->displayname, out.config.displayname );
-       }
-       
-       return out.status;
-}
index 2e757531ce3f16fd48a740b54c4801257139f446..283be0d98b9c03b4b81162663011d8f889ca9a13 100644 (file)
@@ -41,21 +41,21 @@ void init_samr_DomInfo1(struct samr_DomInfo1 *r,
  inits a structure.
 ********************************************************************/
 
-void init_samr_DomInfo2(struct samr_DomInfo2 *r,
-                       NTTIME force_logoff_time,
-                       const char *comment,
-                       const char *domain_name,
-                       const char *primary,
-                       uint64_t sequence_num,
-                       uint32_t unknown2,
-                       enum samr_Role role,
-                       uint32_t unknown3,
-                       uint32_t num_users,
-                       uint32_t num_groups,
-                       uint32_t num_aliases)
+void init_samr_DomGeneralInformation(struct samr_DomGeneralInformation *r,
+                                    NTTIME force_logoff_time,
+                                    const char *oem_information,
+                                    const char *domain_name,
+                                    const char *primary,
+                                    uint64_t sequence_num,
+                                    uint32_t unknown2,
+                                    enum samr_Role role,
+                                    uint32_t unknown3,
+                                    uint32_t num_users,
+                                    uint32_t num_groups,
+                                    uint32_t num_aliases)
 {
        r->force_logoff_time = force_logoff_time;
-       init_lsa_String(&r->comment, comment);
+       init_lsa_String(&r->oem_information, oem_information);
        init_lsa_String(&r->domain_name, domain_name);
        init_lsa_String(&r->primary, primary);
        r->sequence_num = sequence_num;
@@ -81,10 +81,10 @@ void init_samr_DomInfo3(struct samr_DomInfo3 *r,
  inits a structure.
 ********************************************************************/
 
-void init_samr_DomInfo4(struct samr_DomInfo4 *r,
-                       const char *comment)
+void init_samr_DomOEMInformation(struct samr_DomOEMInformation *r,
+                                const char *oem_information)
 {
-       init_lsa_String(&r->comment, comment);
+       init_lsa_String(&r->oem_information, oem_information);
 }
 
 /*******************************************************************
index 5565ae3dc3fd831856647a3e54f4e2e5be81ca5b..9ada47a3f5d901aeecbe456dd82a990e4ee0b771 100644 (file)
@@ -41,7 +41,7 @@ NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli,
 
        call = &table->calls[opnum];
 
-       push = ndr_push_init_ctx(mem_ctx);
+       push = ndr_push_init_ctx(mem_ctx, NULL);
        if (!push) {
                return NT_STATUS_NO_MEMORY;
        }
index c5d93864ba6f142a1c515b0dd2364f89a9af788e..7d31f4b2f01b936addd42e83d5642c62f8026ac3 100644 (file)
@@ -58,51 +58,6 @@ static bool svcctl_io_service_status( const char *desc, SERVICE_STATUS *status,
 /*******************************************************************
 ********************************************************************/
 
-static bool svcctl_io_service_config( const char *desc, SERVICE_CONFIG *config, prs_struct *ps, int depth )
-{
-
-       prs_debug(ps, depth, desc, "svcctl_io_service_config");
-       depth++;
-
-       if(!prs_uint32("service_type", ps, depth, &config->service_type))
-               return False;
-       if(!prs_uint32("start_type", ps, depth, &config->start_type))
-               return False;
-       if(!prs_uint32("error_control", ps, depth, &config->error_control))
-               return False;
-
-       if (!prs_io_unistr2_p("", ps, depth, &config->executablepath))
-               return False;
-       if (!prs_io_unistr2_p("", ps, depth, &config->loadordergroup))
-               return False;
-
-       if(!prs_uint32("tag_id", ps, depth, &config->tag_id))
-               return False;
-
-       if (!prs_io_unistr2_p("", ps, depth, &config->dependencies))
-               return False;
-       if (!prs_io_unistr2_p("", ps, depth, &config->startname))
-               return False;
-       if (!prs_io_unistr2_p("", ps, depth, &config->displayname))
-               return False;
-
-       if (!prs_io_unistr2("", ps, depth, config->executablepath))
-               return False;
-       if (!prs_io_unistr2("", ps, depth, config->loadordergroup))
-               return False;
-       if (!prs_io_unistr2("", ps, depth, config->dependencies))
-               return False;
-       if (!prs_io_unistr2("", ps, depth, config->startname))
-               return False;
-       if (!prs_io_unistr2("", ps, depth, config->displayname))
-               return False;
-
-       return True;
-}
-
-/*******************************************************************
-********************************************************************/
-
 bool svcctl_io_enum_services_status( const char *desc, ENUM_SERVICES_STATUS *enum_status, RPC_BUFFER *buffer, int depth )
 {
        prs_struct *ps=&buffer->prs;
@@ -175,26 +130,6 @@ static uint32 sizeof_unistr2( UNISTR2 *string )
        return size;
 }
 
-/********************************************************************
-********************************************************************/
-
-uint32 svcctl_sizeof_service_config( SERVICE_CONFIG *config )
-{
-       uint32 size = 0;
-
-       size = sizeof(uint32) * 4;      /* static uint32 fields */
-
-       /* now add the UNISTR2 + pointer sizes */
-
-       size += sizeof(uint32) * sizeof_unistr2(config->executablepath);
-       size += sizeof(uint32) * sizeof_unistr2(config->loadordergroup);
-       size += sizeof(uint32) * sizeof_unistr2(config->dependencies);
-       size += sizeof(uint32) * sizeof_unistr2(config->startname);
-       size += sizeof(uint32) * sizeof_unistr2(config->displayname);
-       
-       return size;
-}
-
 /*******************************************************************
 ********************************************************************/
 
@@ -262,57 +197,6 @@ bool svcctl_io_r_enum_services_status(const char *desc, SVCCTL_R_ENUM_SERVICES_S
 /*******************************************************************
 ********************************************************************/
 
-bool svcctl_io_q_query_service_config(const char *desc, SVCCTL_Q_QUERY_SERVICE_CONFIG *q_u, prs_struct *ps, int depth)
-{
-       if (q_u == NULL)
-               return False;
-
-       prs_debug(ps, depth, desc, "svcctl_io_q_query_service_config");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
-
-       if(!smb_io_pol_hnd("service_pol", &q_u->handle, ps, depth))
-               return False;
-
-       if(!prs_uint32("buffer_size", ps, depth, &q_u->buffer_size))
-               return False;
-
-       return True;
-}
-
-/*******************************************************************
-********************************************************************/
-
-bool svcctl_io_r_query_service_config(const char *desc, SVCCTL_R_QUERY_SERVICE_CONFIG *r_u, prs_struct *ps, int depth)
-{
-       if (r_u == NULL)
-               return False;
-
-       prs_debug(ps, depth, desc, "svcctl_io_r_query_service_config");
-       depth++;
-
-
-       if(!prs_align(ps))
-               return False;
-
-       if(!svcctl_io_service_config("config", &r_u->config, ps, depth))
-               return False;
-
-       if(!prs_uint32("needed", ps, depth, &r_u->needed))
-               return False;
-
-       if(!prs_werror("status", ps, depth, &r_u->status))
-               return False;
-
-
-       return True;
-}
-
-/*******************************************************************
-********************************************************************/
-
 bool svcctl_io_q_query_service_config2(const char *desc, SVCCTL_Q_QUERY_SERVICE_CONFIG2 *q_u, prs_struct *ps, int depth)
 {
        if (q_u == NULL)
index e232a30078244bb4dd186d9e7e7b714bdf7bc8dc..9215a86d3ff442ae575c9b57b8acd97322f33504 100644 (file)
@@ -344,7 +344,7 @@ ELOG_TDB *elog_open_tdb( char *logname, bool force_clear )
        /* make sure that the eventlog dir exists */
 
        eventlogdir = state_path( "eventlog" );
-       if ( !directory_exist( eventlogdir, NULL ) )
+       if ( !directory_exist( eventlogdir ) )
                mkdir( eventlogdir, 0755 );
 
        /* get the path on disk */
index 0e9d12124217112162ae344e3c5e63bad3c1329b..317c1c17bb249002ea075689e65f2ba769991d75 100644 (file)
@@ -430,7 +430,7 @@ NTSTATUS _lsa_OpenPolicy(pipes_struct *p,
        lsa_get_generic_sd(p->mem_ctx, &psd, &sd_size);
 
        if(!se_access_check(psd, p->pipe_user.nt_user_token, des_access, &acc_granted, &status)) {
-               if (geteuid() != 0) {
+               if (p->pipe_user.ut.uid != sec_initial_uid()) {
                        return status;
                }
                DEBUG(4,("ACCESS should be DENIED (granted: %#010x;  required: %#010x)\n",
@@ -1202,8 +1202,8 @@ NTSTATUS _lsa_LookupNames4(pipes_struct *p,
        q.in.num_names          = r->in.num_names;
        q.in.names              = r->in.names;
        q.in.level              = r->in.level;
-       q.in.unknown1           = r->in.unknown1;
-       q.in.unknown2           = r->in.unknown2;
+       q.in.lookup_options     = r->in.lookup_options;
+       q.in.client_revision    = r->in.client_revision;
        q.in.sids               = r->in.sids;
        q.in.count              = r->in.count;
 
@@ -1522,7 +1522,8 @@ NTSTATUS _lsa_CreateAccount(pipes_struct *p,
        /* check to see if the pipe_user is a Domain Admin since
           account_pol.tdb was already opened as root, this is all we have */
 
-       if ( !nt_token_check_domain_rid( p->pipe_user.nt_user_token, DOMAIN_GROUP_RID_ADMINS ) )
+       if ( p->pipe_user.ut.uid != sec_initial_uid()
+               && !nt_token_check_domain_rid( p->pipe_user.nt_user_token, DOMAIN_GROUP_RID_ADMINS ) )
                return NT_STATUS_ACCESS_DENIED;
 
        if ( is_privileged_sid( r->in.sid ) )
@@ -1608,6 +1609,9 @@ NTSTATUS _lsa_EnumPrivsAccount(pipes_struct *p,
        if (!find_policy_by_hnd(p, r->in.handle, (void **)(void *)&info))
                return NT_STATUS_INVALID_HANDLE;
 
+       if (!(info->access & LSA_POLICY_VIEW_LOCAL_INFORMATION))
+               return NT_STATUS_ACCESS_DENIED;
+
        if ( !get_privileges_for_sids( &mask, &info->sid, 1 ) )
                return NT_STATUS_OBJECT_NAME_NOT_FOUND;
 
@@ -1668,6 +1672,9 @@ NTSTATUS _lsa_GetSystemAccessAccount(pipes_struct *p,
        if (!find_policy_by_hnd(p, r->in.handle, (void **)(void *)&info))
                return NT_STATUS_INVALID_HANDLE;
 
+       if (!(info->access & LSA_POLICY_VIEW_LOCAL_INFORMATION))
+               return NT_STATUS_ACCESS_DENIED;
+
        if (!lookup_sid(p->mem_ctx, &info->sid, NULL, NULL, NULL))
                return NT_STATUS_ACCESS_DENIED;
 
@@ -1702,7 +1709,8 @@ NTSTATUS _lsa_SetSystemAccessAccount(pipes_struct *p,
        /* check to see if the pipe_user is a Domain Admin since
           account_pol.tdb was already opened as root, this is all we have */
 
-       if ( !nt_token_check_domain_rid( p->pipe_user.nt_user_token, DOMAIN_GROUP_RID_ADMINS ) )
+       if ( p->pipe_user.ut.uid != sec_initial_uid()
+               && !nt_token_check_domain_rid( p->pipe_user.nt_user_token, DOMAIN_GROUP_RID_ADMINS ) )
                return NT_STATUS_ACCESS_DENIED;
 
        if (!pdb_getgrsid(&map, info->sid))
@@ -1812,7 +1820,6 @@ NTSTATUS _lsa_QuerySecurity(pipes_struct *p,
        if (!(handle->access & LSA_POLICY_VIEW_LOCAL_INFORMATION))
                return NT_STATUS_ACCESS_DENIED;
 
-
        switch (r->in.sec_info) {
        case 1:
                /* SD contains only the owner */
@@ -2070,6 +2077,9 @@ NTSTATUS _lsa_EnumAccountRights(pipes_struct *p,
        if (!find_policy_by_hnd(p, r->in.handle, (void **)(void *)&info))
                return NT_STATUS_INVALID_HANDLE;
 
+       if (!(info->access & LSA_POLICY_VIEW_LOCAL_INFORMATION))
+               return NT_STATUS_ACCESS_DENIED;
+
        /* according to an NT4 PDC, you can add privileges to SIDs even without
           call_lsa_create_account() first.  And you can use any arbitrary SID. */
 
@@ -2112,6 +2122,9 @@ NTSTATUS _lsa_LookupPrivValue(pipes_struct *p,
        if (!find_policy_by_hnd(p, r->in.handle, (void **)(void *)&info))
                return NT_STATUS_INVALID_HANDLE;
 
+       if (!(info->access & LSA_POLICY_VIEW_LOCAL_INFORMATION))
+               return NT_STATUS_ACCESS_DENIED;
+
        name = r->in.name->string;
 
        DEBUG(10,("_lsa_lookup_priv_value: name = %s\n", name));
index 4e211cfb81fa3555f60c9e301f639e4cd35eefcb..2dc6cd639383fee09eb0003a592743e8e870f39d 100644 (file)
@@ -756,7 +756,7 @@ NTSTATUS _netr_LogonSamLogon(pipes_struct *p,
 {
        NTSTATUS status = NT_STATUS_OK;
        struct netr_SamInfo3 *sam3 = NULL;
-       union netr_LogonInfo *logon = r->in.logon;
+       union netr_LogonLevel *logon = r->in.logon;
        fstring nt_username, nt_domain, nt_workstation;
        auth_usersupplied_info *user_info = NULL;
        auth_serversupplied_info *server_info = NULL;
@@ -838,7 +838,7 @@ NTSTATUS _netr_LogonSamLogon(pipes_struct *p,
        }
 
        switch (r->in.logon_level) {
-       case INTERACTIVE_LOGON_TYPE:
+       case NetlogonInteractiveInformation:
                fstrcpy(nt_username,
                        logon->password->identity_info.account_name.string);
                fstrcpy(nt_domain,
@@ -848,7 +848,7 @@ NTSTATUS _netr_LogonSamLogon(pipes_struct *p,
 
                DEBUG(3,("SAM Logon (Interactive). Domain:[%s].  ", lp_workgroup()));
                break;
-       case NET_LOGON_TYPE:
+       case NetlogonNetworkInformation:
                fstrcpy(nt_username,
                        logon->network->identity_info.account_name.string);
                fstrcpy(nt_domain,
@@ -873,7 +873,7 @@ NTSTATUS _netr_LogonSamLogon(pipes_struct *p,
        status = NT_STATUS_OK;
 
        switch (r->in.logon_level) {
-       case NET_LOGON_TYPE:
+       case NetlogonNetworkInformation:
        {
                const char *wksname = nt_workstation;
 
@@ -902,7 +902,7 @@ NTSTATUS _netr_LogonSamLogon(pipes_struct *p,
                }
                break;
        }
-       case INTERACTIVE_LOGON_TYPE:
+       case NetlogonInteractiveInformation:
                /* 'Interactive' authentication, supplies the password in its
                   MD4 form, encrypted with the session key.  We will convert
                   this to challenge/response for the auth subsystem to chew
index 3968d4116882e897454b2d096d7453321cecb2e9..c8037e6e4321a524340d23477457b8575e9527ca 100644 (file)
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_RPC_SRV
 
-#define        PIPE            "\\PIPE\\"
-#define        PIPELEN         strlen(PIPE)
-
-static smb_np_struct *chain_p;
 static int pipes_open;
 
-/*
- * Sometimes I can't decide if I hate Windows printer driver
- * writers more than I hate the Windows spooler service driver
- * writers. This gets around a combination of bugs in the spooler
- * and the HP 8500 PCL driver that causes a spooler spin. JRA.
- *
- * bumped up from 20 -> 64 after viewing traffic from WordPerfect
- * 2002 running on NT 4.- SP6
- * bumped up from 64 -> 256 after viewing traffic from con2prt
- * for lots of printers on a WinNT 4.x SP6 box.
- */
-#ifndef MAX_OPEN_SPOOLSS_PIPES
-#define MAX_OPEN_SPOOLSS_PIPES 256
-#endif
-static int current_spoolss_pipes_open;
-
-static smb_np_struct *Pipes;
 static pipes_struct *InternalPipes;
 static struct bitmap *bmap;
 
@@ -93,15 +71,6 @@ void set_pipe_handle_offset(int max_open_files)
        }
 }
 
-/****************************************************************************
- Reset pipe chain handle number.
-****************************************************************************/
-
-void reset_chain_p(void)
-{
-       chain_p = NULL;
-}
-
 /****************************************************************************
  Initialise pipe handle states.
 ****************************************************************************/
@@ -144,133 +113,21 @@ static bool pipe_init_outgoing_data(pipes_struct *p)
        return True;
 }
 
-/****************************************************************************
- Find first available pipe slot.
-****************************************************************************/
-
-smb_np_struct *open_rpc_pipe_p(const char *pipe_name, 
-                             connection_struct *conn, uint16 vuid)
-{
-       int i;
-       smb_np_struct *p, *p_it;
-       static int next_pipe;
-       bool is_spoolss_pipe = False;
-
-       DEBUG(4,("Open pipe requested %s (pipes_open=%d)\n",
-                pipe_name, pipes_open));
-
-       if (strstr(pipe_name, "spoolss")) {
-               is_spoolss_pipe = True;
-       }
-       if (is_spoolss_pipe && current_spoolss_pipes_open >= MAX_OPEN_SPOOLSS_PIPES) {
-               DEBUG(10,("open_rpc_pipe_p: spooler bug workaround. Denying open on pipe %s\n",
-                       pipe_name ));
-               return NULL;
-       }
-
-       /* not repeating pipe numbers makes it easier to track things in 
-          log files and prevents client bugs where pipe numbers are reused
-          over connection restarts */
-
-       if (next_pipe == 0) {
-               next_pipe = (sys_getpid() ^ time(NULL)) % MAX_OPEN_PIPES;
-       }
-
-       i = bitmap_find(bmap, next_pipe);
-
-       if (i == -1) {
-               DEBUG(0,("ERROR! Out of pipe structures\n"));
-               return NULL;
-       }
-
-       next_pipe = (i+1) % MAX_OPEN_PIPES;
-
-       for (p = Pipes; p; p = p->next) {
-               DEBUG(5,("open_rpc_pipe_p: name %s pnum=%x\n", p->name, p->pnum));  
-       }
-
-       p = talloc(NULL, smb_np_struct);
-       if (!p) {
-               DEBUG(0,("ERROR! no memory for smb_np_struct!\n"));
-               return NULL;
-       }
-
-       ZERO_STRUCTP(p);
-
-       p->name = talloc_strdup(p, pipe_name);
-       if (p->name == NULL) {
-               TALLOC_FREE(p);
-               DEBUG(0,("ERROR! no memory for pipe name!\n"));
-               return NULL;
-       }
-
-       /* add a dso mechanism instead of this, here */
-
-       p->namedpipe_create = make_internal_rpc_pipe_p;
-       p->namedpipe_read = read_from_internal_pipe;
-       p->namedpipe_write = write_to_internal_pipe;
-
-       p->np_state = p->namedpipe_create(pipe_name, conn->client_address,
-                                         conn->server_info, vuid);
-
-       if (p->np_state == NULL) {
-               DEBUG(0,("open_rpc_pipe_p: make_internal_rpc_pipe_p failed.\n"));
-               TALLOC_FREE(p);
-               return NULL;
-       }
-
-       DLIST_ADD(Pipes, p);
-
-       /*
-        * Initialize the incoming RPC data buffer with one PDU worth of memory.
-        * We cheat here and say we're marshalling, as we intend to add incoming
-        * data directly into the prs_struct and we want it to auto grow. We will
-        * change the type to UNMARSALLING before processing the stream.
-        */
-
-       bitmap_set(bmap, i);
-       i += pipe_handle_offset;
-
-       pipes_open++;
-
-       p->pnum = i;
-
-       p->open = True;
-       p->device_state = 0;
-       p->priority = 0;
-       p->conn = conn;
-       p->vuid  = vuid;
-
-       p->max_trans_reply = 0;
-
-       DEBUG(4,("Opened pipe %s with handle %x (pipes_open=%d)\n",
-                pipe_name, i, pipes_open));
-       
-       chain_p = p;
-       
-       /* Iterate over p_it as a temp variable, to display all open pipes */ 
-       for (p_it = Pipes; p_it; p_it = p_it->next) {
-               DEBUG(5,("open pipes: name %s pnum=%x\n", p_it->name, p_it->pnum));  
-       }
-
-       return chain_p;
-}
-
 /****************************************************************************
  Make an internal namedpipes structure
 ****************************************************************************/
 
-struct pipes_struct *make_internal_rpc_pipe_p(const char *pipe_name,
-                                             const char *client_address,
-                                             struct auth_serversupplied_info *server_info,
-                                             uint16_t vuid)
+static struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
+                                                    const char *pipe_name,
+                                                    const char *client_address,
+                                                    struct auth_serversupplied_info *server_info,
+                                                    uint16_t vuid)
 {
        pipes_struct *p;
 
        DEBUG(4,("Create pipe requested %s\n", pipe_name));
 
-       p = TALLOC_ZERO_P(NULL, pipes_struct);
+       p = TALLOC_ZERO_P(mem_ctx, struct pipes_struct);
 
        if (!p) {
                DEBUG(0,("ERROR! no memory for pipes_struct!\n"));
@@ -902,27 +759,11 @@ incoming data size = %u\n", (unsigned int)p->in_data.pdu_received_len, (unsigned
        return (ssize_t)data_to_copy;
 }
 
-/****************************************************************************
- Accepts incoming data on an rpc pipe.
-****************************************************************************/
-
-ssize_t write_to_pipe(smb_np_struct *p, char *data, size_t n)
-{
-       DEBUG(6,("write_to_pipe: %x", p->pnum));
-
-       DEBUG(6,(" name: %s open: %s len: %d\n",
-                p->name, BOOLSTR(p->open), (int)n));
-
-       dump_data(50, (uint8 *)data, n);
-
-       return p->namedpipe_write(p->np_state, data, n);
-}
-
 /****************************************************************************
  Accepts incoming data on an internal rpc pipe.
 ****************************************************************************/
 
-ssize_t write_to_internal_pipe(struct pipes_struct *p, char *data, size_t n)
+static ssize_t write_to_internal_pipe(struct pipes_struct *p, char *data, size_t n)
 {
        size_t data_left = n;
 
@@ -957,32 +798,8 @@ ssize_t write_to_internal_pipe(struct pipes_struct *p, char *data, size_t n)
  have been prepared into arrays of headers + data stream sections.
 ****************************************************************************/
 
-ssize_t read_from_pipe(smb_np_struct *p, char *data, size_t n,
-               bool *is_data_outstanding)
-{
-       if (!p || !p->open) {
-               DEBUG(0,("read_from_pipe: pipe not open\n"));
-               return -1;              
-       }
-
-       DEBUG(6,("read_from_pipe: %x", p->pnum));
-
-       return p->namedpipe_read(p->np_state, data, n, is_data_outstanding);
-}
-
-/****************************************************************************
- Replies to a request to read data from a pipe.
-
- Headers are interspersed with the data at PDU intervals. By the time
- this function is called, the start of the data could possibly have been
- read by an SMBtrans (file_offset != 0).
-
- Calling create_rpc_reply() here is a hack. The data should already
- have been prepared into arrays of headers + data stream sections.
-****************************************************************************/
-
-ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, size_t n,
-                               bool *is_data_outstanding)
+static ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, size_t n,
+                                      bool *is_data_outstanding)
 {
        uint32 pdu_remaining = 0;
        ssize_t data_returned = 0;
@@ -1071,106 +888,6 @@ returning %d bytes.\n", p->name, (unsigned int)p->out_data.current_pdu_len,
        return data_returned;
 }
 
-/****************************************************************************
- Wait device state on a pipe. Exactly what this is for is unknown...
-****************************************************************************/
-
-bool wait_rpc_pipe_hnd_state(smb_np_struct *p, uint16 priority)
-{
-       if (p == NULL) {
-               return False;
-       }
-
-       if (p->open) {
-               DEBUG(3,("wait_rpc_pipe_hnd_state: Setting pipe wait state priority=%x on pipe (name=%s)\n",
-                        priority, p->name));
-
-               p->priority = priority;
-               
-               return True;
-       } 
-
-       DEBUG(3,("wait_rpc_pipe_hnd_state: Error setting pipe wait state priority=%x (name=%s)\n",
-                priority, p->name));
-       return False;
-}
-
-
-/****************************************************************************
- Set device state on a pipe. Exactly what this is for is unknown...
-****************************************************************************/
-
-bool set_rpc_pipe_hnd_state(smb_np_struct *p, uint16 device_state)
-{
-       if (p == NULL) {
-               return False;
-       }
-
-       if (p->open) {
-               DEBUG(3,("set_rpc_pipe_hnd_state: Setting pipe device state=%x on pipe (name=%s)\n",
-                        device_state, p->name));
-
-               p->device_state = device_state;
-               
-               return True;
-       } 
-
-       DEBUG(3,("set_rpc_pipe_hnd_state: Error setting pipe device state=%x (name=%s)\n",
-                device_state, p->name));
-       return False;
-}
-
-
-/****************************************************************************
- Close an rpc pipe.
-****************************************************************************/
-
-bool close_rpc_pipe_hnd(smb_np_struct *p)
-{
-       if (!p) {
-               DEBUG(0,("Invalid pipe in close_rpc_pipe_hnd\n"));
-               return False;
-       }
-
-       TALLOC_FREE(p->np_state);
-
-       bitmap_clear(bmap, p->pnum - pipe_handle_offset);
-
-       pipes_open--;
-
-       DEBUG(4,("closed pipe name %s pnum=%x (pipes_open=%d)\n", 
-                p->name, p->pnum, pipes_open));  
-
-       DLIST_REMOVE(Pipes, p);
-       
-       /* TODO: Remove from pipe open db */
-       
-       if ( !delete_pipe_opendb( p ) ) {
-               DEBUG(3,("close_rpc_pipe_hnd: failed to delete %s "
-                       "pipe from open db.\n", p->name));
-       }
-
-       TALLOC_FREE(p);
-
-       return True;
-}
-
-/****************************************************************************
- Close all pipes on a connection.
-****************************************************************************/
-
-void pipe_close_conn(connection_struct *conn)
-{
-       smb_np_struct *p, *next;
-
-       for (p=Pipes;p;p=next) {
-               next = p->next;
-               if (p->conn == conn) {
-                       close_rpc_pipe_hnd(p);
-               }
-       }
-}
-
 /****************************************************************************
  Close an rpc pipe.
 ****************************************************************************/
@@ -1210,40 +927,92 @@ static int close_internal_rpc_pipe_hnd(struct pipes_struct *p)
        return True;
 }
 
-/****************************************************************************
- Find an rpc pipe given a pipe handle in a buffer and an offset.
-****************************************************************************/
+bool fsp_is_np(struct files_struct *fsp)
+{
+       return ((fsp != NULL)
+               && (fsp->fake_file_handle != NULL)
+               && (fsp->fake_file_handle->type == FAKE_FILE_TYPE_NAMED_PIPE));
+}
 
-smb_np_struct *get_rpc_pipe_p(uint16 pnum)
+NTSTATUS np_open(struct smb_request *smb_req, struct connection_struct *conn,
+                const char *name, struct files_struct **pfsp)
 {
-       if (chain_p) {
-               return chain_p;
+       NTSTATUS status;
+       struct files_struct *fsp;
+       struct pipes_struct *p;
+
+       status = file_new(smb_req, conn, &fsp);
+       if (!NT_STATUS_IS_OK(status)) {
+               DEBUG(0, ("file_new failed: %s\n", nt_errstr(status)));
+               return status;
        }
 
-       return get_rpc_pipe(pnum);
-}
+       fsp->conn = conn;
+       fsp->fh->fd = -1;
+       fsp->vuid = smb_req->vuid;
+       fsp->can_lock = false;
+       fsp->access_mask = FILE_READ_DATA | FILE_WRITE_DATA;
+       string_set(&fsp->fsp_name, name);
 
-/****************************************************************************
- Find an rpc pipe given a pipe handle.
-****************************************************************************/
+       fsp->fake_file_handle = talloc(NULL, struct fake_file_handle);
+       if (fsp->fake_file_handle == NULL) {
+               file_free(smb_req, fsp);
+               return NT_STATUS_NO_MEMORY;
+       }
+       fsp->fake_file_handle->type = FAKE_FILE_TYPE_NAMED_PIPE;
 
-smb_np_struct *get_rpc_pipe(int pnum)
-{
-       smb_np_struct *p;
+       p = make_internal_rpc_pipe_p(fsp->fake_file_handle, name,
+                                    conn->client_address, conn->server_info,
+                                    smb_req->vuid);
+       if (p == NULL) {
+               file_free(smb_req, fsp);
+               return NT_STATUS_PIPE_NOT_AVAILABLE;
+       }
+       fsp->fake_file_handle->private_data = p;
+
+       *pfsp = fsp;
 
-       DEBUG(4,("search for pipe pnum=%x\n", pnum));
+       return NT_STATUS_OK;
+}
+
+NTSTATUS np_write(struct files_struct *fsp, uint8_t *data, size_t len,
+                 ssize_t *nwritten)
+{
+       struct pipes_struct *p;
 
-       for (p=Pipes;p;p=p->next) {
-               DEBUG(5,("pipe name %s pnum=%x (pipes_open=%d)\n", 
-                         p->name, p->pnum, pipes_open));  
+       if (!fsp_is_np(fsp)) {
+               return NT_STATUS_INVALID_HANDLE;
        }
 
-       for (p=Pipes;p;p=p->next) {
-               if (p->pnum == pnum) {
-                       chain_p = p;
-                       return p;
-               }
+       p = talloc_get_type_abort(
+               fsp->fake_file_handle->private_data, struct pipes_struct);
+
+       DEBUG(6, ("np_write: %x name: %s len: %d\n", (int)fsp->fnum,
+                 fsp->fsp_name, (int)len));
+       dump_data(50, data, len);
+
+       *nwritten = write_to_internal_pipe(p, (char *)data, len);
+
+       return ((*nwritten) >= 0)
+               ? NT_STATUS_OK : NT_STATUS_UNEXPECTED_IO_ERROR;
+}
+
+NTSTATUS np_read(struct files_struct *fsp, uint8_t *data, size_t len,
+                ssize_t *nread, bool *is_data_outstanding)
+{
+       struct pipes_struct *p;
+
+       if (!fsp_is_np(fsp)) {
+               return NT_STATUS_INVALID_HANDLE;
        }
 
-       return NULL;
+       p = talloc_get_type_abort(
+               fsp->fake_file_handle->private_data, struct pipes_struct);
+
+       *nread = read_from_internal_pipe(p, (char *)data, len,
+                                        is_data_outstanding);
+
+       return ((*nread) >= 0)
+               ? NT_STATUS_OK : NT_STATUS_UNEXPECTED_IO_ERROR;
+
 }
index 6455f0237496dd1f8d4ab4a9df9ae14554ab1627..6cf90be6d9bad07b86bd2be7a94684592df09f91 100644 (file)
@@ -2437,7 +2437,7 @@ static NTSTATUS get_user_info_20(TALLOC_CTX *mem_ctx,
        if (munged_dial) {
                blob = base64_decode_data_blob(munged_dial);
        } else {
-               blob = data_blob_string_const("");
+               blob = data_blob_string_const_null("");
        }
 
        status = init_samr_parameters_string(mem_ctx, &blob, &parameters);
@@ -2546,7 +2546,7 @@ static NTSTATUS get_user_info_21(TALLOC_CTX *mem_ctx,
        if (munged_dial) {
                blob = base64_decode_data_blob(munged_dial);
        } else {
-               blob = data_blob_string_const("");
+               blob = data_blob_string_const_null("");
        }
 
        status = init_samr_parameters_string(mem_ctx, &blob, &parameters);
@@ -2942,18 +2942,18 @@ static NTSTATUS samr_QueryDomainInfo_internal(const char *fn_name,
                        if (lp_server_role() == ROLE_DOMAIN_BDC)
                                server_role = ROLE_DOMAIN_BDC;
 
-                       init_samr_DomInfo2(&dom_info->info2,
-                                          nt_logout,
-                                          lp_serverstring(),
-                                          lp_workgroup(),
-                                          global_myname(),
-                                          seq_num,
-                                          1,
-                                          server_role,
-                                          1,
-                                          num_users,
-                                          num_groups,
-                                          num_aliases);
+                       init_samr_DomGeneralInformation(&dom_info->general,
+                                                       nt_logout,
+                                                       lp_serverstring(),
+                                                       lp_workgroup(),
+                                                       global_myname(),
+                                                       seq_num,
+                                                       1,
+                                                       server_role,
+                                                       1,
+                                                       num_users,
+                                                       num_groups,
+                                                       num_aliases);
                        break;
                case 0x03:
 
@@ -2978,8 +2978,8 @@ static NTSTATUS samr_QueryDomainInfo_internal(const char *fn_name,
 
                        break;
                case 0x04:
-                       init_samr_DomInfo4(&dom_info->info4,
-                                          lp_serverstring());
+                       init_samr_DomOEMInformation(&dom_info->oem,
+                                                   lp_serverstring());
                        break;
                case 0x05:
                        init_samr_DomInfo5(&dom_info->info5,
index 635898a9d5769e12b8b07987767f561b00d4a5dd..af9246c49f240cb2d6810ed6cf5595a63f1fc358 100644 (file)
@@ -4373,7 +4373,7 @@ static bool construct_printer_info_7(Printer_entry *print_hnd, PRINTER_INFO_7 *p
 
        if (is_printer_published(print_hnd, snum, &guid)) {
                if (asprintf(&guid_str, "{%s}",
-                            smb_uuid_string(talloc_tos(), guid)) == -1) {
+                            GUID_string(talloc_tos(), &guid)) == -1) {
                        return false;
                }
                strupper_m(guid_str);
@@ -6280,7 +6280,7 @@ bool add_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, NT_PRINTER_INFO_LEV
 
        numlines = 0;
        /* Get lines and convert them back to dos-codepage */
-       qlines = fd_lines_load(fd, &numlines, 0);
+       qlines = fd_lines_load(fd, &numlines, 0, NULL);
        DEBUGADD(10,("Lines returned = [%d]\n", numlines));
        close(fd);
 
@@ -6293,7 +6293,7 @@ bool add_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, NT_PRINTER_INFO_LEV
                DEBUGADD(6,("Line[0] = [%s]\n", qlines[0]));
        }
 
-       file_lines_free(qlines);
+       TALLOC_FREE(qlines);
        return True;
 }
 
@@ -7512,7 +7512,7 @@ WERROR enumports_hook(TALLOC_CTX *ctx, int *count, char ***lines )
                }
 
                numlines = 0;
-               qlines = fd_lines_load(fd, &numlines, 0);
+               qlines = fd_lines_load(fd, &numlines, 0, NULL);
                DEBUGADD(10,("Lines returned = [%d]\n", numlines));
                close(fd);
        }
@@ -7537,7 +7537,7 @@ static WERROR enumports_level_1(RPC_BUFFER *buffer, uint32 offered, uint32 *need
 
        result = enumports_hook(talloc_tos(), &numlines, &qlines );
        if (!W_ERROR_IS_OK(result)) {
-               file_lines_free(qlines);
+               TALLOC_FREE(qlines);
                return result;
        }
 
@@ -7545,7 +7545,7 @@ static WERROR enumports_level_1(RPC_BUFFER *buffer, uint32 offered, uint32 *need
                if((ports=SMB_MALLOC_ARRAY( PORT_INFO_1, numlines )) == NULL) {
                        DEBUG(10,("Returning WERR_NOMEM [%s]\n",
                                  dos_errstr(WERR_NOMEM)));
-                       file_lines_free(qlines);
+                       TALLOC_FREE(qlines);
                        return WERR_NOMEM;
                }
 
@@ -7554,7 +7554,7 @@ static WERROR enumports_level_1(RPC_BUFFER *buffer, uint32 offered, uint32 *need
                        fill_port_1(&ports[i], qlines[i]);
                }
        }
-       file_lines_free(qlines);
+       TALLOC_FREE(qlines);
 
        *returned = numlines;
 
@@ -7603,13 +7603,13 @@ static WERROR enumports_level_2(RPC_BUFFER *buffer, uint32 offered, uint32 *need
 
        result = enumports_hook(talloc_tos(), &numlines, &qlines );
        if ( !W_ERROR_IS_OK(result)) {
-               file_lines_free(qlines);
+               TALLOC_FREE(qlines);
                return result;
        }
 
        if(numlines) {
                if((ports=SMB_MALLOC_ARRAY( PORT_INFO_2, numlines)) == NULL) {
-                       file_lines_free(qlines);
+                       TALLOC_FREE(qlines);
                        return WERR_NOMEM;
                }
 
@@ -7619,7 +7619,7 @@ static WERROR enumports_level_2(RPC_BUFFER *buffer, uint32 offered, uint32 *need
                }
        }
 
-       file_lines_free(qlines);
+       TALLOC_FREE(qlines);
 
        *returned = numlines;
 
index 47688b114c8ad7246209aa54b58c46357811d3d7..b99c77c9b86d92603ca9c58904525b6432150231 100644 (file)
@@ -2112,7 +2112,7 @@ WERROR _srvsvc_NetGetFileSecurity(pipes_struct *p,
 
        psd->dacl->revision = NT4_ACL_REVISION;
 
-       close_file(fsp, NORMAL_CLOSE);
+       close_file(NULL, fsp, NORMAL_CLOSE);
        vfs_ChDir(conn, oldcwd);
        conn_free_internal(conn);
        return WERR_OK;
@@ -2120,7 +2120,7 @@ WERROR _srvsvc_NetGetFileSecurity(pipes_struct *p,
 error_exit:
 
        if (fsp) {
-               close_file(fsp, NORMAL_CLOSE);
+               close_file(NULL, fsp, NORMAL_CLOSE);
        }
 
        if (oldcwd) {
@@ -2231,7 +2231,7 @@ WERROR _srvsvc_NetSetFileSecurity(pipes_struct *p,
                goto error_exit;
        }
 
-       close_file(fsp, NORMAL_CLOSE);
+       close_file(NULL, fsp, NORMAL_CLOSE);
        vfs_ChDir(conn, oldcwd);
        conn_free_internal(conn);
        return WERR_OK;
@@ -2239,7 +2239,7 @@ WERROR _srvsvc_NetSetFileSecurity(pipes_struct *p,
 error_exit:
 
        if (fsp) {
-               close_file(fsp, NORMAL_CLOSE);
+               close_file(NULL, fsp, NORMAL_CLOSE);
        }
 
        if (oldcwd) {
index 483fb8e1e9b65b096d5464ee1f92e665fba70e16..84864364f706ae2deb83e8ec5d963475cef58618 100644 (file)
@@ -155,23 +155,7 @@ static bool api_svcctl_control_service(pipes_struct *p)
 
 static bool api_svcctl_query_service_config(pipes_struct *p)
 {
-       SVCCTL_Q_QUERY_SERVICE_CONFIG q_u;
-       SVCCTL_R_QUERY_SERVICE_CONFIG r_u;
-       prs_struct *data = &p->in_data.data;
-       prs_struct *rdata = &p->out_data.rdata;
-
-       ZERO_STRUCT(q_u);
-       ZERO_STRUCT(r_u);
-
-       if(!svcctl_io_q_query_service_config("", &q_u, data, 0))
-               return False;
-
-       r_u.status = _svcctl_query_service_config(p, &q_u, &r_u);
-
-       if(!svcctl_io_r_query_service_config("", &r_u, rdata, 0))
-               return False;
-
-       return True;
+       return proxy_svcctl_call(p, SVCCTL_QUERY_SERVICE_CONFIG_W);
 }
 
 /*******************************************************************
index a57d0ff4a4f914135762f690ec8d0846e2cb692d..a7215ac68601d4e600bbc0a9662df945c9725965 100644 (file)
@@ -6,6 +6,7 @@
  *
  *  Largely Rewritten (Again) by:
  *  Copyright (C) Gerald (Jerry) Carter             2005.
+ *  Copyright (C) Guenther Deschner                 2008.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -61,7 +62,7 @@ static const struct generic_mapping svc_generic_map =
 bool init_service_op_table( void )
 {
        const char **service_list = lp_svcctl_list();
-       int num_services = SVCCTL_NUM_INTERNAL_SERVICES + str_list_count( service_list );
+       int num_services = SVCCTL_NUM_INTERNAL_SERVICES + str_list_length( service_list );
        int i;
 
        if ( !(svcctl_ops = TALLOC_ARRAY( NULL, struct service_control_op, num_services+1)) ) {
@@ -610,7 +611,9 @@ WERROR _svcctl_query_service_status_ex( pipes_struct *p, SVCCTL_Q_QUERY_SERVICE_
 /********************************************************************
 ********************************************************************/
 
-static WERROR fill_svc_config( TALLOC_CTX *ctx, const char *name, SERVICE_CONFIG *config, NT_USER_TOKEN *token )
+static WERROR fill_svc_config( TALLOC_CTX *ctx, const char *name,
+                              struct QUERY_SERVICE_CONFIG *config,
+                              NT_USER_TOKEN *token )
 {
        REGVAL_CTR *values;
        REGISTRY_VALUE *val;
@@ -622,20 +625,17 @@ static WERROR fill_svc_config( TALLOC_CTX *ctx, const char *name, SERVICE_CONFIG
 
        /* now fill in the individual values */
 
-       config->displayname = TALLOC_ZERO_P( ctx, UNISTR2 );
        if ( (val = regval_ctr_getvalue( values, "DisplayName" )) != NULL )
-               init_unistr2( config->displayname, regval_sz( val ), UNI_STR_TERMINATE );
+               config->displayname = regval_sz(val);
        else
-               init_unistr2( config->displayname, name, UNI_STR_TERMINATE );
+               config->displayname = name;
 
        if ( (val = regval_ctr_getvalue( values, "ObjectName" )) != NULL ) {
-               config->startname = TALLOC_ZERO_P( ctx, UNISTR2 );
-               init_unistr2( config->startname, regval_sz( val ), UNI_STR_TERMINATE );
+               config->startname = regval_sz(val);
        }
 
        if ( (val = regval_ctr_getvalue( values, "ImagePath" )) != NULL ) {
-               config->executablepath = TALLOC_ZERO_P( ctx, UNISTR2 );
-               init_unistr2( config->executablepath, regval_sz( val ), UNI_STR_TERMINATE );
+               config->executablepath = regval_sz(val);
        }
 
        /* a few hard coded values */
@@ -663,11 +663,13 @@ static WERROR fill_svc_config( TALLOC_CTX *ctx, const char *name, SERVICE_CONFIG
 }
 
 /********************************************************************
+ _svcctl_QueryServiceConfigW
 ********************************************************************/
 
-WERROR _svcctl_query_service_config( pipes_struct *p, SVCCTL_Q_QUERY_SERVICE_CONFIG *q_u, SVCCTL_R_QUERY_SERVICE_CONFIG *r_u )
+WERROR _svcctl_QueryServiceConfigW(pipes_struct *p,
+                                  struct svcctl_QueryServiceConfigW *r)
 {
-       SERVICE_INFO *info = find_service_info_by_hnd( p, &q_u->handle );
+       SERVICE_INFO *info = find_service_info_by_hnd( p, r->in.handle );
        uint32 buffer_size;
        WERROR wresult;
 
@@ -682,17 +684,17 @@ WERROR _svcctl_query_service_config( pipes_struct *p, SVCCTL_Q_QUERY_SERVICE_CON
        /* we have to set the outgoing buffer size to the same as the
           incoming buffer size (even in the case of failure */
 
-       r_u->needed      = q_u->buffer_size;
+       *r->out.bytes_needed = r->in.buf_size;
 
-       wresult = fill_svc_config( p->mem_ctx, info->name, &r_u->config, p->pipe_user.nt_user_token );
+       wresult = fill_svc_config( p->mem_ctx, info->name, r->out.query, p->pipe_user.nt_user_token );
        if ( !W_ERROR_IS_OK(wresult) )
                return wresult;
 
-       buffer_size = svcctl_sizeof_service_config( &r_u->config );
-       r_u->needed = (buffer_size > q_u->buffer_size) ? buffer_size : q_u->buffer_size;
+       buffer_size = ndr_size_QUERY_SERVICE_CONFIG(r->out.query, 0);
+       *r->out.bytes_needed = (buffer_size > r->in.buf_size) ? buffer_size : r->in.buf_size;
 
-        if (buffer_size > q_u->buffer_size ) {
-               ZERO_STRUCTP( &r_u->config );
+        if (buffer_size > r->in.buf_size ) {
+               TALLOC_FREE(r->out.query);
                 return WERR_INSUFFICIENT_BUFFER;
        }
 
@@ -956,12 +958,6 @@ WERROR _svcctl_EnumServicesStatusW(pipes_struct *p, struct svcctl_EnumServicesSt
        return WERR_NOT_SUPPORTED;
 }
 
-WERROR _svcctl_QueryServiceConfigW(pipes_struct *p, struct svcctl_QueryServiceConfigW *r)
-{
-       p->rng_fault_state = True;
-       return WERR_NOT_SUPPORTED;
-}
-
 WERROR _svcctl_QueryServiceLockStatusW(pipes_struct *p, struct svcctl_QueryServiceLockStatusW *r)
 {
        p->rng_fault_state = True;
index 3991c5ae02470e7361dc7d4a83c075971f1134f1..7e842ed54d3a8c5bed32c855e55fe6b5e7d075df 100644 (file)
@@ -230,11 +230,11 @@ WERROR _winreg_QueryValue(pipes_struct *p, struct winreg_QueryValue *r)
        if ( !regkey )
                return WERR_BADFID;
 
-       if ((r->out.value_length == NULL) || (r->out.type == NULL)) {
+       if ((r->out.data_length == NULL) || (r->out.type == NULL)) {
                return WERR_INVALID_PARAM;
        }
 
-       *r->out.value_length = *r->out.type = REG_NONE;
+       *r->out.data_length = *r->out.type = REG_NONE;
        
        DEBUG(7,("_reg_info: policy key name = [%s]\n", regkey->key->name));
        DEBUG(7,("_reg_info: policy key type = [%08x]\n", regkey->key->type));
@@ -290,8 +290,8 @@ WERROR _winreg_QueryValue(pipes_struct *p, struct winreg_QueryValue *r)
                        if (r->out.data_size) {
                                *r->out.data_size = 0;
                        }
-                       if (r->out.value_length) {
-                               *r->out.value_length = 0;
+                       if (r->out.data_length) {
+                               *r->out.data_length = 0;
                        }
                        return status;
                }
@@ -306,18 +306,18 @@ WERROR _winreg_QueryValue(pipes_struct *p, struct winreg_QueryValue *r)
                *r->out.type = val->type;
        }
 
-       *r->out.value_length = outbuf_size;
+       *r->out.data_length = outbuf_size;
 
        if ( *r->in.data_size == 0 || !r->out.data ) {
                status = WERR_OK;
-       } else if ( *r->out.value_length > *r->in.data_size ) {
+       } else if ( *r->out.data_length > *r->in.data_size ) {
                status = WERR_MORE_DATA;
        } else {
-               memcpy( r->out.data, outbuf, *r->out.value_length );
+               memcpy( r->out.data, outbuf, *r->out.data_length );
                status = WERR_OK;
        }
 
-       *r->out.data_size = *r->out.value_length;
+       *r->out.data_size = *r->out.data_length;
 
        if (free_prs) prs_mem_free(&prs_hkpd);
        if (free_buf) SAFE_FREE(outbuf);
@@ -514,8 +514,8 @@ WERROR _winreg_InitiateSystemShutdownEx(pipes_struct *p, struct winreg_InitiateS
 
        /* pull the message string and perform necessary sanity checks on it */
 
-       if ( r->in.message && r->in.message->name && r->in.message->name->name ) {
-               if ( (msg = talloc_strdup(p->mem_ctx, r->in.message->name->name )) == NULL ) {
+       if ( r->in.message && r->in.message->string ) {
+               if ( (msg = talloc_strdup(p->mem_ctx, r->in.message->string )) == NULL ) {
                        return WERR_NOMEM;
                }
                chkmsg = TALLOC_ARRAY(p->mem_ctx, char, strlen(msg)+1);
index 71757f5ea370f0e5ac65ce6ff285d43ac665a842..8fbd798ed0de31c3ddee9ccaaba09c263e2abb79 100644 (file)
@@ -103,7 +103,7 @@ static WERROR cmd_drsuapi_cracknames(struct rpc_pipe_client *cli,
 
        werr = cracknames(cli, mem_ctx,
                          &bind_handle,
-                         DRSUAPI_DS_NAME_FORMAT_UKNOWN,
+                         DRSUAPI_DS_NAME_FORMAT_UNKNOWN,
                          DRSUAPI_DS_NAME_FORMAT_FQDN_1779,
                          1,
                          argv+1,
@@ -419,7 +419,7 @@ static WERROR cmd_drsuapi_getncchanges(struct rpc_pipe_client *cli,
 
                werr = cracknames(cli, mem_ctx,
                                  &bind_handle,
-                                 DRSUAPI_DS_NAME_FORMAT_UKNOWN,
+                                 DRSUAPI_DS_NAME_FORMAT_UNKNOWN,
                                  DRSUAPI_DS_NAME_FORMAT_FQDN_1779,
                                  1,
                                  &name,
@@ -495,9 +495,9 @@ static WERROR cmd_drsuapi_getncchanges(struct rpc_pipe_client *cli,
                if (level_out == 1) {
                        out_level = 1;
                        ctr1 = &ctr.ctr1;
-               } else if (level_out == 2) {
+               } else if (level_out == 2 && ctr.ctr2.mszip1.ts) {
                        out_level = 1;
-                       ctr1 = ctr.ctr2.ctr.mszip1.ctr1;
+                       ctr1 = &ctr.ctr2.mszip1.ts->ctr1;
                }
 
                status = cli_get_session_key(mem_ctx, cli, &session_key);
@@ -527,9 +527,16 @@ static WERROR cmd_drsuapi_getncchanges(struct rpc_pipe_client *cli,
                        ctr6 = &ctr.ctr6;
                } else if (level_out == 7
                           && ctr.ctr7.level == 6
-                          && ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP) {
+                          && ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP
+                          && ctr.ctr7.ctr.mszip6.ts) {
                        out_level = 6;
-                       ctr6 = ctr.ctr7.ctr.mszip6.ctr6;
+                       ctr6 = &ctr.ctr7.ctr.mszip6.ts->ctr6;
+               } else if (level_out == 7
+                          && ctr.ctr7.level == 6
+                          && ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS
+                          && ctr.ctr7.ctr.xpress6.ts) {
+                       out_level = 6;
+                       ctr6 = &ctr.ctr7.ctr.xpress6.ts->ctr6;
                }
 
                if (out_level == 6) {
index 5b5b4ff78cb604d45eb6e1d588c8ea498b26bf9d..746fc25d7d50fadd401db90bcf0ec5a655737982 100644 (file)
@@ -112,8 +112,8 @@ static void display_query_info_12(struct lsa_DnsDomainInfo *r)
        d_printf("Domain DNS Name: %s\n", r->dns_domain.string);
        d_printf("Domain Forest Name: %s\n", r->dns_forest.string);
        d_printf("Domain Sid: %s\n", sid_string_tos(r->sid));
-       d_printf("Domain GUID: %s\n", smb_uuid_string(talloc_tos(),
-                                                     r->domain_guid));
+       d_printf("Domain GUID: %s\n", GUID_string(talloc_tos(),
+                                                     &r->domain_guid));
 }
 
 static void display_lsa_query_info(union lsa_PolicyInformation *info,
index 87ba65c14b57da2daa275810b711c4c5a03456b6..cdcc0ec28dbccf32b201cc9ec9d185866b9f2393 100644 (file)
@@ -688,7 +688,7 @@ static NTSTATUS cmd_netlogon_sam_logon(struct rpc_pipe_client *cli,
                                       const char **argv)
 {
        NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-       int logon_type = NET_LOGON_TYPE;
+       int logon_type = NetlogonNetworkInformation;
        const char *username, *password;
        int auth_level = 2;
        uint32 logon_param = 0;
index fa1e0fda4d0a414368ddc7134a7e383ecae05764..3494e9123a0c6b005aa4f372cdb41b30f008e367 100644 (file)
@@ -79,17 +79,17 @@ static void display_samr_user_info_21(struct samr_UserInfo21 *r)
        dump_data(0, (uint8_t *)r->parameters.array, r->parameters.length*2);
 
        printf("\tLogon Time               :\t%s\n",
-              http_timestring(nt_time_to_unix(r->last_logon)));
+              http_timestring(talloc_tos(), nt_time_to_unix(r->last_logon)));
        printf("\tLogoff Time              :\t%s\n",
-              http_timestring(nt_time_to_unix(r->last_logoff)));
+              http_timestring(talloc_tos(), nt_time_to_unix(r->last_logoff)));
        printf("\tKickoff Time             :\t%s\n",
-              http_timestring(nt_time_to_unix(r->acct_expiry)));
+              http_timestring(talloc_tos(), nt_time_to_unix(r->acct_expiry)));
        printf("\tPassword last set Time   :\t%s\n",
-              http_timestring(nt_time_to_unix(r->last_password_change)));
+              http_timestring(talloc_tos(), nt_time_to_unix(r->last_password_change)));
        printf("\tPassword can change Time :\t%s\n",
-              http_timestring(nt_time_to_unix(r->allow_password_change)));
+              http_timestring(talloc_tos(), nt_time_to_unix(r->allow_password_change)));
        printf("\tPassword must change Time:\t%s\n",
-              http_timestring(nt_time_to_unix(r->force_password_change)));
+              http_timestring(talloc_tos(), nt_time_to_unix(r->force_password_change)));
 
        printf("\tunknown_2[0..31]...\n"); /* user passwords? */
 
@@ -146,24 +146,24 @@ static void display_sam_dom_info_1(struct samr_DomInfo1 *info1)
                display_time(info1->min_password_age));
 }
 
-static void display_sam_dom_info_2(struct samr_DomInfo2 *info2)
+static void display_sam_dom_info_2(struct samr_DomGeneralInformation *general)
 {
-       printf("Domain:\t\t%s\n", info2->domain_name.string);
-       printf("Server:\t\t%s\n", info2->primary.string);
-       printf("Comment:\t%s\n", info2->comment.string);
+       printf("Domain:\t\t%s\n", general->domain_name.string);
+       printf("Server:\t\t%s\n", general->primary.string);
+       printf("Comment:\t%s\n", general->oem_information.string);
 
-       printf("Total Users:\t%d\n", info2->num_users);
-       printf("Total Groups:\t%d\n", info2->num_groups);
-       printf("Total Aliases:\t%d\n", info2->num_aliases);
+       printf("Total Users:\t%d\n", general->num_users);
+       printf("Total Groups:\t%d\n", general->num_groups);
+       printf("Total Aliases:\t%d\n", general->num_aliases);
 
-       printf("Sequence No:\t%llu\n", (unsigned long long)info2->sequence_num);
+       printf("Sequence No:\t%llu\n", (unsigned long long)general->sequence_num);
 
        printf("Force Logoff:\t%d\n",
-               (int)nt_time_to_unix_abs(&info2->force_logoff_time));
+               (int)nt_time_to_unix_abs(&general->force_logoff_time));
 
-       printf("Unknown 2:\t0x%x\n", info2->unknown2);
-       printf("Server Role:\t%s\n", server_role_str(info2->role));
-       printf("Unknown 3:\t0x%x\n", info2->unknown3);
+       printf("Unknown 2:\t0x%x\n", general->unknown2);
+       printf("Server Role:\t%s\n", server_role_str(general->role));
+       printf("Unknown 3:\t0x%x\n", general->unknown3);
 }
 
 static void display_sam_dom_info_3(struct samr_DomInfo3 *info3)
@@ -172,9 +172,9 @@ static void display_sam_dom_info_3(struct samr_DomInfo3 *info3)
                (int)nt_time_to_unix_abs(&info3->force_logoff_time));
 }
 
-static void display_sam_dom_info_4(struct samr_DomInfo4 *info4)
+static void display_sam_dom_info_4(struct samr_DomOEMInformation *oem)
 {
-       printf("Comment:\t%s\n", info4->comment.string);
+       printf("Comment:\t%s\n", oem->oem_information.string);
 }
 
 static void display_sam_dom_info_5(struct samr_DomInfo5 *info5)
@@ -196,7 +196,7 @@ static void display_sam_dom_info_8(struct samr_DomInfo8 *info8)
 {
        printf("Sequence No:\t%llu\n", (unsigned long long)info8->sequence_num);
        printf("Domain Create Time:\t%s\n",
-               http_timestring(nt_time_to_unix(info8->domain_create_time)));
+               http_timestring(talloc_tos(), nt_time_to_unix(info8->domain_create_time)));
 }
 
 static void display_sam_dom_info_9(struct samr_DomInfo9 *info9)
@@ -218,7 +218,7 @@ static void display_sam_dom_info_13(struct samr_DomInfo13 *info13)
 {
        printf("Sequence No:\t%llu\n", (unsigned long long)info13->sequence_num);
        printf("Domain Create Time:\t%s\n",
-               http_timestring(nt_time_to_unix(info13->domain_create_time)));
+               http_timestring(talloc_tos(), nt_time_to_unix(info13->domain_create_time)));
        printf("Unknown1:\t%d\n", info13->unknown1);
        printf("Unknown2:\t%d\n", info13->unknown2);
 
@@ -1607,13 +1607,13 @@ static NTSTATUS cmd_samr_query_dominfo(struct rpc_pipe_client *cli,
                display_sam_dom_info_1(&info->info1);
                break;
        case 2:
-               display_sam_dom_info_2(&info->info2);
+               display_sam_dom_info_2(&info->general);
                break;
        case 3:
                display_sam_dom_info_3(&info->info3);
                break;
        case 4:
-               display_sam_dom_info_4(&info->info4);
+               display_sam_dom_info_4(&info->oem);
                break;
        case 5:
                display_sam_dom_info_5(&info->info5);
index 2a9f2b82bb2c0bf1ba8c7dd2bfa86296736f66c3..378ec891a7ed8193db2c6cda61362e53e60edb17 100644 (file)
@@ -691,7 +691,7 @@ static void display_reg_value(REGISTRY_VALUE value)
                printf("%s: REG_SZ: %s\n", value.valuename, text ? text : "");
                break;
        case REG_BINARY: {
-               char *hex = hex_encode(NULL, value.data_p, value.size);
+               char *hex = hex_encode_talloc(NULL, value.data_p, value.size);
                size_t i, len;
                printf("%s: REG_BINARY:", value.valuename);
                len = strlen(hex);
index 81f1809210c7e49fc23c65bc2dc339313641be7c..05d655217fddd357e50ab615076c1ab9fcb9974a 100644 (file)
@@ -3,25 +3,51 @@ AC_SUBST(BLDSHARED)
 smbtorture4_path=bin/smbtorture4
 m4_include(build/m4/public.m4)
 
+m4_include(build/m4/check_python.m4)
+
+m4_include(build/m4/ac_pkg_swig.m4)
+
+AC_PROG_SWIG(1.3.36)
+
+AC_SAMBA_PYTHON_DEVEL([
+SMB_EXT_LIB(EXT_LIB_PYTHON, [$PYTHON_LDFLAGS], [$PYTHON_CFLAGS])
+SMB_ENABLE(EXT_LIB_PYTHON,YES)
+SMB_ENABLE(LIBPYTHON,YES)
+],[
+AC_MSG_ERROR([Python not found. Please install Python 2.x and its development headers/libraries.])
+])
+
+AC_MSG_CHECKING(python library directory)
+pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1, 0, '\\${prefix}')"`
+AC_MSG_RESULT($pythondir)
+
+AC_SUBST(pythondir)
+
 m4_include(lib/smbreadline/readline.m4)
 m4_include(heimdal_build/internal.m4)
-m4_include(lib/util/fault.m4)
-m4_include(lib/util/signal.m4)
-m4_include(lib/util/util.m4)
-m4_include(lib/util/fsusage.m4)
-m4_include(lib/util/xattr.m4)
-m4_include(lib/util/capability.m4)
-m4_include(lib/util/time.m4)
+m4_include(../lib/util/fault.m4)
+m4_include(../lib/util/signal.m4)
+m4_include(../lib/util/util.m4)
+m4_include(../lib/util/fsusage.m4)
+m4_include(../lib/util/xattr.m4)
+m4_include(../lib/util/capability.m4)
+m4_include(../lib/util/time.m4)
 m4_include(../lib/popt/samba.m4)
 m4_include(lib/charset/config.m4)
 m4_include(lib/socket/config.m4)
 m4_include(nsswitch/nsstest.m4)
 m4_include(../pidl/config.m4)
-m4_include(lib/zlib.m4)
+m4_include(../lib/zlib/zlib.m4)
+AC_ZLIB([
+SMB_EXT_LIB(ZLIB, [${ZLIB_LIBS}])
+],[
+SMB_INCLUDE_MK(lib/zlib.mk)
+])
+
 
 AC_CONFIG_FILES(../source4/lib/registry/registry.pc)
 AC_CONFIG_FILES(../source4/librpc/dcerpc.pc)
-AC_CONFIG_FILES(../source4/librpc/ndr.pc)
+AC_CONFIG_FILES(../librpc/ndr.pc)
 AC_CONFIG_FILES(../source4/lib/torture/torture.pc)
 AC_CONFIG_FILES(../source4/auth/gensec/gensec.pc)
 AC_CONFIG_FILES(../source4/param/samba-hostconfig.pc)
@@ -87,7 +113,6 @@ eventsdir="../source4/lib/events"
 m4_include(lib/events/libevents.m4)
 
 dnl m4_include(auth/kerberos/config.m4)
-m4_include(scripting/python/config.m4)
 m4_include(auth/gensec/config.m4)
 m4_include(smbd/process_model.m4)
 m4_include(ntvfs/posix/config.m4)
index 524fc9f64ce1ed7f761395734167c6cfae0a5492..93022c5239975c894cf7d333d1e70087c093a705 100644 (file)
@@ -11,7 +11,7 @@ samba4srcdir = $(srcdir)/../source4
 
 # Flags used for the samba 4 files
 # $(srcdir)/include is required for config.h
-SAMBA4_CFLAGS = -I$(samba4srcdir) -I$(samba4srcdir)/include \
+SAMBA4_CFLAGS = -I.. -I$(samba4srcdir) -I$(samba4srcdir)/include \
                 -I$(samba4srcdir)/../lib/replace -I$(samba4srcdir)/lib \
                 -I$(heimdalsrcdir)/lib/hcrypto -I$(tallocdir) \
                 -I$(srcdir)/include -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H
@@ -62,7 +62,7 @@ include $(pidldir)/config.mk
 include samba4-config.mk
 include samba4-templates.mk
 
-zlibsrcdir := $(samba4srcdir)/lib/zlib
+zlibsrcdir := $(samba4srcdir)/../lib/zlib
 dynconfigsrcdir := $(samba4srcdir)/dynconfig
 heimdalsrcdir := $(samba4srcdir)/heimdal
 dsdbsrcdir := $(samba4srcdir)/dsdb
@@ -84,7 +84,7 @@ poptsrcdir := $(samba4srcdir)/../lib/popt
 socketwrappersrcdir := $(samba4srcdir)/../lib/socket_wrapper
 nsswrappersrcdir := $(samba4srcdir)/../lib/nss_wrapper
 libstreamsrcdir := $(samba4srcdir)/lib/stream
-libutilsrcdir := $(samba4srcdir)/lib/util
+libutilsrcdir := $(samba4srcdir)/../lib/util
 libtdrsrcdir := $(samba4srcdir)/lib/tdr
 libdbwrapsrcdir := $(samba4srcdir)/lib/dbwrap
 libcryptosrcdir := $(samba4srcdir)/../lib/crypto
index 2027fd3937b7b491bc2efdb6152a41d39d58247a..34f262ee0063496a8ae88d3106d5c0f22bb0134b 100755 (executable)
@@ -1,14 +1,14 @@
 #!/bin/sh
 
-PIDL_ARGS="--outputdir librpc/gen_ndr --header --ndr-parser --samba3-ndr-server --samba3-ndr-client --"
-PIDL_EXTRA_ARGS="$*"
+ARGS="--includedir=../librpc/idl --outputdir librpc/gen_ndr --header --ndr-parser --samba3-ndr-server --samba3-ndr-client $PIDL_ARGS --"
+IDL_FILES="$*"
 
 oldpwd=`pwd`
 cd ${srcdir}
 
 [ -d librpc/gen_ndr ] || mkdir -p librpc/gen_ndr || exit 1
 
-PIDL="$PIDL ${PIDL_ARGS} ${PIDL_EXTRA_ARGS}"
+PIDL="$PIDL $ARGS"
 
 ##
 ## Find newer files rather than rebuild all of them
@@ -20,11 +20,11 @@ for f in ${IDL_FILES}; do
        ndr="librpc/gen_ndr/ndr_$basename.c"
 
        if [ -f $ndr ]; then
-               if [ "x`find librpc/idl/$f -newer $ndr -print`" = "xlibrpc/idl/$f" ]; then
-                       list="$list librpc/idl/$f"
+               if [ "x`find $f -newer $ndr -print`" = "x$f" ]; then
+                       list="$list $f"
                fi
        else 
-               list="$list librpc/idl/$f"
+               list="$list $f"
        fi
 done
 
index 479361a8c1020117f29c2d251dab1029c3f6e02d..4374b50eac98e6073470a6dea2cd6dc7851f2d49 100644 (file)
@@ -33,10 +33,10 @@ typedef struct _blocking_lock_record {
        files_struct *fsp;
        struct timeval expire_time;
        int lock_num;
-       SMB_BIG_UINT offset;
-       SMB_BIG_UINT count;
-       uint32 lock_pid;
-       uint32 blocking_pid; /* PID that blocks us. */
+       uint64_t offset;
+       uint64_t count;
+       uint32_t lock_pid;
+       uint32_t blocking_pid; /* PID that blocks us. */
        enum brl_flavour lock_flav;
        enum brl_type lock_type;
        char *inbuf;
@@ -154,12 +154,12 @@ bool push_blocking_lock_request( struct byte_range_lock *br_lck,
                files_struct *fsp,
                int lock_timeout,
                int lock_num,
-               uint32 lock_pid,
+               uint32_t lock_pid,
                enum brl_type lock_type,
                enum brl_flavour lock_flav,
-               SMB_BIG_UINT offset,
-               SMB_BIG_UINT count,
-               uint32 blocking_pid)
+               uint64_t offset,
+               uint64_t count,
+               uint32_t blocking_pid)
 {
        static bool set_lock_msg;
        size_t length = smb_len(req->inbuf)+4;
@@ -331,7 +331,7 @@ static void reply_lockingX_error(blocking_lock_record *blr, NTSTATUS status)
        char *inbuf = blr->inbuf;
        files_struct *fsp = blr->fsp;
        uint16 num_ulocks = SVAL(inbuf,smb_vwv6);
-       SMB_BIG_UINT count = (SMB_BIG_UINT)0, offset = (SMB_BIG_UINT) 0;
+       uint64_t count = (uint64_t)0, offset = (uint64_t) 0;
        uint32 lock_pid;
        unsigned char locktype = CVAL(inbuf,smb_vwv3);
        bool large_file_format = (locktype & LOCKING_ANDX_LARGE_FILES);
@@ -420,7 +420,7 @@ static bool process_lockingX(blocking_lock_record *blr)
        files_struct *fsp = blr->fsp;
        uint16 num_ulocks = SVAL(inbuf,smb_vwv6);
        uint16 num_locks = SVAL(inbuf,smb_vwv7);
-       SMB_BIG_UINT count = (SMB_BIG_UINT)0, offset = (SMB_BIG_UINT)0;
+       uint64_t count = (uint64_t)0, offset = (uint64_t)0;
        uint32 lock_pid;
        bool large_file_format = (locktype & LOCKING_ANDX_LARGE_FILES);
        char *data;
@@ -704,7 +704,6 @@ static void process_blocking_lock_queue(void)
                 * sitting around....
                 */
                chain_size = 0;
-               file_chain_reset();
                fsp = blr->fsp;
 
                conn = conn_find(SVAL(blr->inbuf,smb_tid));
@@ -875,8 +874,8 @@ static void process_blocking_lock_cancel_message(struct messaging_context *ctx,
 
 bool blocking_lock_cancel(files_struct *fsp,
                        uint32 lock_pid,
-                       SMB_BIG_UINT offset,
-                       SMB_BIG_UINT count,
+                       uint64_t offset,
+                       uint64_t count,
                        enum brl_flavour lock_flav,
                        unsigned char locktype,
                         NTSTATUS err)
index 2596e7338031144de1ac593c848bba0b8d9d039f..64a4311256b4328a1b69bcfe128f7d3104167d2a 100644 (file)
@@ -1131,7 +1131,7 @@ NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passw
        if ((can_change_time != 0) && (time(NULL) < can_change_time)) {
                DEBUG(1, ("user %s cannot change password now, must "
                          "wait until %s\n", username,
-                         http_timestring(can_change_time)));
+                         http_timestring(talloc_tos(), can_change_time)));
                if (samr_reject_reason) {
                        *samr_reject_reason = SAMR_REJECT_OTHER;
                }
index 818b4c70a8ce1cff6ff15caf0c4dcf97091d4142..d4c531ab1955cbca0fe3e5c48d5951f7ae07ba46 100644 (file)
@@ -505,7 +505,8 @@ static NTSTATUS update_write_time_on_close(struct files_struct *fsp)
  delete on close is done on normal and shutdown close.
 ****************************************************************************/
 
-static NTSTATUS close_normal_file(files_struct *fsp, enum file_close_type close_type)
+static NTSTATUS close_normal_file(struct smb_request *req, files_struct *fsp,
+                                 enum file_close_type close_type)
 {
        NTSTATUS status = NT_STATUS_OK;
        NTSTATUS saved_status1 = NT_STATUS_OK;
@@ -536,7 +537,7 @@ static NTSTATUS close_normal_file(files_struct *fsp, enum file_close_type close_
 
        if (fsp->print_file) {
                print_fsp_end(fsp, close_type);
-               file_free(fsp);
+               file_free(req, fsp);
                return NT_STATUS_OK;
        }
 
@@ -585,7 +586,7 @@ static NTSTATUS close_normal_file(files_struct *fsp, enum file_close_type close_
                conn->num_files_open,
                nt_errstr(status) ));
 
-       file_free(fsp);
+       file_free(req, fsp);
        return status;
 }
 
@@ -593,7 +594,8 @@ static NTSTATUS close_normal_file(files_struct *fsp, enum file_close_type close_
  Close a directory opened by an NT SMB call. 
 ****************************************************************************/
   
-static NTSTATUS close_directory(files_struct *fsp, enum file_close_type close_type)
+static NTSTATUS close_directory(struct smb_request *req, files_struct *fsp,
+                               enum file_close_type close_type)
 {
        struct share_mode_lock *lck = 0;
        bool delete_dir = False;
@@ -698,7 +700,7 @@ static NTSTATUS close_directory(files_struct *fsp, enum file_close_type close_ty
         * Do the code common to files and directories.
         */
        close_filestruct(fsp);
-       file_free(fsp);
+       file_free(req, fsp);
        return status;
 }
 
@@ -706,17 +708,18 @@ static NTSTATUS close_directory(files_struct *fsp, enum file_close_type close_ty
  Close a files_struct.
 ****************************************************************************/
   
-NTSTATUS close_file(files_struct *fsp, enum file_close_type close_type)
+NTSTATUS close_file(struct smb_request *req, files_struct *fsp,
+                   enum file_close_type close_type)
 {
        NTSTATUS status;
        struct files_struct *base_fsp = fsp->base_fsp;
 
        if(fsp->is_directory) {
-               status = close_directory(fsp, close_type);
+               status = close_directory(req, fsp, close_type);
        } else if (fsp->fake_file_handle != NULL) {
-               status = close_fake_file(fsp);
+               status = close_fake_file(req, fsp);
        } else {
-               status = close_normal_file(fsp, close_type);
+               status = close_normal_file(req, fsp, close_type);
        }
 
        if ((base_fsp != NULL) && (close_type != SHUTDOWN_CLOSE)) {
@@ -731,7 +734,7 @@ NTSTATUS close_file(files_struct *fsp, enum file_close_type close_type)
                 */
 
                SMB_ASSERT(base_fsp->base_fsp == NULL);
-               close_file(base_fsp, close_type);
+               close_file(req, base_fsp, close_type);
        }
 
        return status;
@@ -768,5 +771,5 @@ void msg_close_file(struct messaging_context *msg_ctx,
                DEBUG(10,("msg_close_file: failed to find file.\n"));
                return;
        }
-       close_file(fsp, NORMAL_CLOSE);
+       close_file(NULL, fsp, NORMAL_CLOSE);
 }
index 8dd5964f5f4d0472451e15c022b9c019d1d6c5f6..3b72a9505a13d33c5c0f4a969ce30bcf1483edc7 100644 (file)
@@ -2,17 +2,17 @@
    Unix SMB/CIFS implementation.
    connection claim routines
    Copyright (C) Andrew Tridgell 1998
-   
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
@@ -63,7 +63,7 @@ static int count_fn(struct db_record *rec,
                    void *udp)
 {
        struct count_stat *cs = (struct count_stat *)udp;
+
        if (crec->cnum == -1) {
                return 0;
        }
@@ -159,7 +159,7 @@ bool claim_connection(connection_struct *conn, const char *name,
        }
        crec.start = time(NULL);
        crec.bcast_msg_flags = msg_flags;
-       
+
        strlcpy(crec.machine,get_remote_machine_name(),sizeof(crec.machine));
        strlcpy(crec.addr,conn?conn->client_address:
                        client_addr(get_client_fd(),addr,sizeof(addr)),
@@ -224,109 +224,3 @@ bool register_message_flags(bool doreg, uint32 msg_flags)
 
        return True;
 }
-
-/*********************************************************************
-*********************************************************************/
-
-static TDB_DATA* make_pipe_rec_key( struct pipe_open_rec *prec )
-{
-       TDB_DATA *kbuf = NULL;
-       fstring key_string;
-       
-       if ( !prec )
-               return NULL;
-       
-       if ( (kbuf = TALLOC_P(prec, TDB_DATA)) == NULL ) {
-               return NULL;
-       }
-       
-       snprintf( key_string, sizeof(key_string), "%s/%d/%d",
-               prec->name, procid_to_pid(&prec->pid), prec->pnum );
-               
-       *kbuf = string_term_tdb_data(talloc_strdup(prec, key_string));
-       if (kbuf->dptr == NULL )
-               return NULL;
-
-       return kbuf;
-}
-
-/*********************************************************************
-*********************************************************************/
-
-static void fill_pipe_open_rec( struct pipe_open_rec *prec, smb_np_struct *p )
-{
-       prec->pid = pid_to_procid(sys_getpid());
-       prec->pnum = p->pnum;
-       prec->uid = geteuid();
-       fstrcpy( prec->name, p->name );
-
-       return;
-}
-
-/*********************************************************************
-*********************************************************************/
-
-bool store_pipe_opendb( smb_np_struct *p )
-{
-       struct db_record *dbrec;
-       struct pipe_open_rec *prec;
-       TDB_DATA *key;
-       TDB_DATA data;
-       bool ret = False;
-       
-       if ( (prec = TALLOC_P( NULL, struct pipe_open_rec)) == NULL ) {
-               DEBUG(0,("store_pipe_opendb: talloc failed!\n"));
-               return False;
-       }
-       
-       fill_pipe_open_rec( prec, p );
-       if ( (key = make_pipe_rec_key( prec )) == NULL ) {
-               goto done;
-       }
-       
-       data.dptr = (uint8 *)prec;
-       data.dsize = sizeof(struct pipe_open_rec);
-
-       if (!(dbrec = connections_fetch_record(prec, *key))) {
-               DEBUG(0, ("connections_fetch_record failed\n"));
-               goto done;
-       }
-
-       ret = NT_STATUS_IS_OK(dbrec->store(dbrec, data, TDB_REPLACE));
-       
-done:
-       TALLOC_FREE( prec );    
-       return ret;
-}
-
-/*********************************************************************
-*********************************************************************/
-
-bool delete_pipe_opendb( smb_np_struct *p )
-{
-       struct db_record *dbrec;
-       struct pipe_open_rec *prec;
-       TDB_DATA *key;
-       bool ret = False;
-       
-       if ( (prec = TALLOC_P( NULL, struct pipe_open_rec)) == NULL ) {
-               DEBUG(0,("store_pipe_opendb: talloc failed!\n"));
-               return False;
-       }
-       
-       fill_pipe_open_rec( prec, p );
-       if ( (key = make_pipe_rec_key( prec )) == NULL ) {
-               goto done;
-       }
-       
-       if (!(dbrec = connections_fetch_record(prec, *key))) {
-               DEBUG(0, ("connections_fetch_record failed\n"));
-               goto done;
-       }
-
-       ret = NT_STATUS_IS_OK(dbrec->delete_rec(dbrec));
-       
-done:
-       TALLOC_FREE( prec );
-       return ret;
-}
index 1ddcd48d40469b8d049e8ea51b13946315b53fa1..cd09d739236c2aaa39ecde1557c249773a757729 100644 (file)
  Normalise for DOS usage.
 ****************************************************************************/
 
-static void disk_norm(bool small_query, SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize)
+static void disk_norm(bool small_query, uint64_t *bsize,uint64_t *dfree,uint64_t *dsize)
 {
        /* check if the disk is beyond the max disk size */
-       SMB_BIG_UINT maxdisksize = lp_maxdisksize();
+       uint64_t maxdisksize = lp_maxdisksize();
        if (maxdisksize) {
                /* convert to blocks - and don't overflow */
                maxdisksize = ((maxdisksize*1024)/(*bsize))*1024;
@@ -62,13 +62,13 @@ static void disk_norm(bool small_query, SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,
  Return number of 1K blocks available on a path and total number.
 ****************************************************************************/
 
-SMB_BIG_UINT sys_disk_free(connection_struct *conn, const char *path, bool small_query, 
-                              SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize)
+uint64_t sys_disk_free(connection_struct *conn, const char *path, bool small_query, 
+                              uint64_t *bsize,uint64_t *dfree,uint64_t *dsize)
 {
-       SMB_BIG_UINT dfree_retval;
-       SMB_BIG_UINT dfree_q = 0;
-       SMB_BIG_UINT bsize_q = 0;
-       SMB_BIG_UINT dsize_q = 0;
+       uint64_t dfree_retval;
+       uint64_t dfree_q = 0;
+       uint64_t bsize_q = 0;
+       uint64_t dsize_q = 0;
        const char *dfree_command;
 
        (*dfree) = (*dsize) = 0;
@@ -90,7 +90,7 @@ SMB_BIG_UINT sys_disk_free(connection_struct *conn, const char *path, bool small
                                path);
 
                if (!syscmd) {
-                       return (SMB_BIG_UINT)-1;
+                       return (uint64_t)-1;
                }
 
                DEBUG (3, ("disk_free: Running command %s\n", syscmd));
@@ -112,7 +112,7 @@ SMB_BIG_UINT sys_disk_free(connection_struct *conn, const char *path, bool small
                                *bsize = STR_TO_SMB_BIG_UINT(p, NULL);
                        else
                                *bsize = 1024;
-                       file_lines_free(lines);
+                       TALLOC_FREE(lines);
                        DEBUG (3, ("Parsed output of dfree, dsize=%u, dfree=%u, bsize=%u\n",
                                (unsigned int)*dsize, (unsigned int)*dfree, (unsigned int)*bsize));
 
@@ -126,14 +126,14 @@ SMB_BIG_UINT sys_disk_free(connection_struct *conn, const char *path, bool small
                        if (sys_fsusage(path, dfree, dsize) != 0) {
                                DEBUG (0, ("disk_free: sys_fsusage() failed. Error was : %s\n",
                                        strerror(errno) ));
-                               return (SMB_BIG_UINT)-1;
+                               return (uint64_t)-1;
                        }
                }
        } else {
                if (sys_fsusage(path, dfree, dsize) != 0) {
                        DEBUG (0, ("disk_free: sys_fsusage() failed. Error was : %s\n",
                                strerror(errno) ));
-                       return (SMB_BIG_UINT)-1;
+                       return (uint64_t)-1;
                }
        }
 
@@ -174,16 +174,16 @@ SMB_BIG_UINT sys_disk_free(connection_struct *conn, const char *path, bool small
  Potentially returned cached dfree info.
 ****************************************************************************/
 
-SMB_BIG_UINT get_dfree_info(connection_struct *conn,
+uint64_t get_dfree_info(connection_struct *conn,
                        const char *path,
                        bool small_query,
-                       SMB_BIG_UINT *bsize,
-                       SMB_BIG_UINT *dfree,
-                       SMB_BIG_UINT *dsize)
+                       uint64_t *bsize,
+                       uint64_t *dfree,
+                       uint64_t *dsize)
 {
        int dfree_cache_time = lp_dfree_cache_time(SNUM(conn));
        struct dfree_cached_info *dfc = conn->dfree_info;
-       SMB_BIG_UINT dfree_ret;
+       uint64_t dfree_ret;
 
        if (!dfree_cache_time) {
                return SMB_VFS_DISK_FREE(conn,path,small_query,bsize,dfree,dsize);
@@ -199,7 +199,7 @@ SMB_BIG_UINT get_dfree_info(connection_struct *conn,
 
        dfree_ret = SMB_VFS_DISK_FREE(conn,path,small_query,bsize,dfree,dsize);
 
-       if (dfree_ret == (SMB_BIG_UINT)-1) {
+       if (dfree_ret == (uint64_t)-1) {
                /* Don't cache bad data. */
                return dfree_ret;
        }
index 88c6a51770e290b1f71a63191ac710e326b2d18f..784b36d9bde0de62366a685466eef2c1d6b325bf 100644 (file)
@@ -277,14 +277,15 @@ static bool set_ea_dos_attribute(connection_struct *conn, const char *path, SMB_
                 * are not violating security in doing the setxattr.
                 */
 
-               if (!NT_STATUS_IS_OK(open_file_fchmod(conn,path,sbuf,&fsp)))
+               if (!NT_STATUS_IS_OK(open_file_fchmod(NULL, conn, path, sbuf,
+                                                     &fsp)))
                        return ret;
                become_root();
                if (SMB_VFS_SETXATTR(conn, path, SAMBA_XATTR_DOS_ATTRIB, attrstr, strlen(attrstr), 0) == 0) {
                        ret = True;
                }
                unbecome_root();
-               close_file_fchmod(fsp);
+               close_file_fchmod(NULL, fsp);
                return ret;
        }
        DEBUG(10,("set_ea_dos_attribute: set EA %s on file %s\n", attrstr, path));
@@ -540,12 +541,13 @@ int file_set_dosmode(connection_struct *conn, const char *fname,
                 * break batch oplocks open by others. JRA.
                 */
                files_struct *fsp;
-               if (!NT_STATUS_IS_OK(open_file_fchmod(conn,fname,st,&fsp)))
+               if (!NT_STATUS_IS_OK(open_file_fchmod(NULL, conn, fname, st,
+                                                     &fsp)))
                        return -1;
                become_root();
                ret = SMB_VFS_FCHMOD(fsp, unixmode);
                unbecome_root();
-               close_file_fchmod(fsp);
+               close_file_fchmod(NULL, fsp);
                if (!newfile) {
                        notify_fname(conn, NOTIFY_ACTION_MODIFIED,
                                FILE_NOTIFY_CHANGE_ATTRIBUTES, fname);
index 1761cb66a85c17b3a1b32e6a6dbd490d98150cb9..58b09604c4f4d12feecb0ea843102e5d07b05375 100644 (file)
@@ -98,7 +98,7 @@ enum FAKE_FILE_TYPE is_fake_file(const char *fname)
  Open a fake quota file with a share mode.
 ****************************************************************************/
 
-NTSTATUS open_fake_file(connection_struct *conn,
+NTSTATUS open_fake_file(struct smb_request *req, connection_struct *conn,
                                uint16_t current_vuid,
                                enum FAKE_FILE_TYPE fake_file_type,
                                const char *fname,
@@ -118,7 +118,7 @@ NTSTATUS open_fake_file(connection_struct *conn,
 
        }
 
-       status = file_new(conn, &fsp);
+       status = file_new(req, conn, &fsp);
        if(!NT_STATUS_IS_OK(status)) {
                return status;
        }
@@ -137,7 +137,7 @@ NTSTATUS open_fake_file(connection_struct *conn,
        fsp->fake_file_handle = init_fake_file_handle(fake_file_type);
        
        if (fsp->fake_file_handle==NULL) {
-               file_free(fsp);
+               file_free(req, fsp);
                return NT_STATUS_NO_MEMORY;
        }
 
@@ -146,8 +146,8 @@ NTSTATUS open_fake_file(connection_struct *conn,
        return NT_STATUS_OK;
 }
 
-NTSTATUS close_fake_file(files_struct *fsp)
+NTSTATUS close_fake_file(struct smb_request *req, files_struct *fsp)
 {
-       file_free(fsp);
+       file_free(req, fsp);
        return NT_STATUS_OK;
 }
index 519f4945f2268bc4c1d4c91b4fe0005d687c7eea..4a27d02cfec2891b1af1b3ff75ff86d4a300e3cf 100644 (file)
@@ -28,9 +28,6 @@ static int real_max_open_files;
 static struct bitmap *file_bmap;
 
 static files_struct *Files;
-/* a fsp to use when chaining */
-static files_struct *chain_fsp = NULL;
 
 static int files_used;
 
@@ -57,7 +54,8 @@ static unsigned long get_gen_count(void)
  Find first available file slot.
 ****************************************************************************/
 
-NTSTATUS file_new(connection_struct *conn, files_struct **result)
+NTSTATUS file_new(struct smb_request *req, connection_struct *conn,
+                 files_struct **result)
 {
        int i;
        static int first_file;
@@ -120,7 +118,9 @@ NTSTATUS file_new(connection_struct *conn, files_struct **result)
        DEBUG(5,("allocated file structure %d, fnum = %d (%d used)\n",
                 i, fsp->fnum, files_used));
 
-       chain_fsp = fsp;
+       if (req != NULL) {
+               req->chain_fsp = fsp;
+       }
 
        /* A new fsp invalidates the positive and
          negative fsp_fi_cache as the new fsp is pushed
@@ -144,7 +144,7 @@ void file_close_conn(connection_struct *conn)
        for (fsp=Files;fsp;fsp=next) {
                next = fsp->next;
                if (fsp->conn == conn) {
-                       close_file(fsp,SHUTDOWN_CLOSE); 
+                       close_file(NULL, fsp, SHUTDOWN_CLOSE);
                }
        }
 }
@@ -160,7 +160,7 @@ void file_close_pid(uint16 smbpid, int vuid)
        for (fsp=Files;fsp;fsp=next) {
                next = fsp->next;
                if ((fsp->file_pid == smbpid) && (fsp->vuid == vuid)) {
-                       close_file(fsp,SHUTDOWN_CLOSE); 
+                       close_file(NULL, fsp, SHUTDOWN_CLOSE);
                }
        }
 }
@@ -218,7 +218,7 @@ void file_close_user(int vuid)
        for (fsp=Files;fsp;fsp=next) {
                next=fsp->next;
                if (fsp->vuid == vuid) {
-                       close_file(fsp,SHUTDOWN_CLOSE);
+                       close_file(NULL, fsp, SHUTDOWN_CLOSE);
                }
        }
 }
@@ -394,7 +394,7 @@ void file_sync_all(connection_struct *conn)
  Free up a fsp.
 ****************************************************************************/
 
-void file_free(files_struct *fsp)
+void file_free(struct smb_request *req, files_struct *fsp)
 {
        DLIST_REMOVE(Files, fsp);
 
@@ -429,8 +429,8 @@ void file_free(files_struct *fsp)
           information */
        ZERO_STRUCTP(fsp);
 
-       if (fsp == chain_fsp) {
-               chain_fsp = NULL;
+       if ((req != NULL) && (fsp == req->chain_fsp)) {
+               req->chain_fsp = NULL;
        }
 
        /* Closing a file can invalidate the positive cache. */
@@ -470,44 +470,33 @@ files_struct *file_fnum(uint16 fnum)
  Get an fsp from a packet given the offset of a 16 bit fnum.
 ****************************************************************************/
 
-files_struct *file_fsp(uint16 fid)
+files_struct *file_fsp(struct smb_request *req, uint16 fid)
 {
        files_struct *fsp;
 
-       if (chain_fsp) {
-               return chain_fsp;
+       if ((req != NULL) && (req->chain_fsp != NULL)) {
+               return req->chain_fsp;
        }
 
        fsp = file_fnum(fid);
-       if (fsp) {
-               chain_fsp = fsp;
+       if ((fsp != NULL) && (req != NULL)) {
+               req->chain_fsp = fsp;
        }
        return fsp;
 }
 
-/****************************************************************************
- Reset the chained fsp - done at the start of a packet reply.
-****************************************************************************/
-
-void file_chain_reset(void)
-{
-       chain_fsp = NULL;
-}
-
 /****************************************************************************
  Duplicate the file handle part for a DOS or FCB open.
 ****************************************************************************/
 
-NTSTATUS dup_file_fsp(files_struct *fsp,
-                               uint32 access_mask,
-                               uint32 share_access,
-                               uint32 create_options,
-                               files_struct **result)
+NTSTATUS dup_file_fsp(struct smb_request *req, files_struct *fsp,
+                     uint32 access_mask, uint32 share_access,
+                     uint32 create_options, files_struct **result)
 {
        NTSTATUS status;
        files_struct *dup_fsp;
 
-       status = file_new(fsp->conn, &dup_fsp);
+       status = file_new(NULL, fsp->conn, &dup_fsp);
 
        if (!NT_STATUS_IS_OK(status)) {
                return status;
index 0f2caad86f3b9e87f74414530ab71b4fee5d8d72..0ce226809e1dde8630adf649bc2e59e000fce562 100644 (file)
@@ -5,17 +5,17 @@
 
    SMB Version handling
    Copyright (C) John H Terpstra 1995-1998
-   
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    */
@@ -162,7 +162,7 @@ void send_trans_reply(connection_struct *conn, const uint8_t *inbuf,
                copy_trans_params_and_data(outbuf, align,
                                           rparam, tot_param_sent, this_lparam,
                                           rdata, tot_data_sent, this_ldata);
-               
+
                SSVAL(outbuf,smb_vwv3,this_lparam);
                SSVAL(outbuf,smb_vwv4,smb_offset(smb_buf(outbuf)+1,outbuf));
                SSVAL(outbuf,smb_vwv5,tot_param_sent);
@@ -194,11 +194,15 @@ void send_trans_reply(connection_struct *conn, const uint8_t *inbuf,
  Start the first part of an RPC reply which began with an SMBtrans request.
 ****************************************************************************/
 
-static void api_rpc_trans_reply(connection_struct *conn, struct smb_request *req, smb_np_struct *p)
+static void api_rpc_trans_reply(connection_struct *conn,
+                               struct smb_request *req,
+                               files_struct *fsp,
+                               int max_trans_reply)
 {
        bool is_data_outstanding;
-       char *rdata = (char *)SMB_MALLOC(p->max_trans_reply);
-       int data_len;
+       uint8_t *rdata = SMB_MALLOC_ARRAY(uint8_t, max_trans_reply);
+       ssize_t data_len;
+       NTSTATUS status;
 
        if(rdata == NULL) {
                DEBUG(0,("api_rpc_trans_reply: malloc fail.\n"));
@@ -206,14 +210,15 @@ static void api_rpc_trans_reply(connection_struct *conn, struct smb_request *req
                return;
        }
 
-       if((data_len = read_from_pipe( p, rdata, p->max_trans_reply,
-                                       &is_data_outstanding)) < 0) {
+       status = np_read(fsp, rdata, max_trans_reply, &data_len,
+                        &is_data_outstanding);
+       if (!NT_STATUS_IS_OK(status)) {
                SAFE_FREE(rdata);
                api_no_reply(conn,req);
                return;
        }
 
-       send_trans_reply(conn, req->inbuf, NULL, 0, rdata, data_len,
+       send_trans_reply(conn, req->inbuf, NULL, 0, (char *)rdata, data_len,
                         is_data_outstanding);
        SAFE_FREE(rdata);
        return;
@@ -223,25 +228,18 @@ static void api_rpc_trans_reply(connection_struct *conn, struct smb_request *req
  WaitNamedPipeHandleState 
 ****************************************************************************/
 
-static void api_WNPHS(connection_struct *conn, struct smb_request *req, smb_np_struct *p,
-                     char *param, int param_len)
+static void api_WNPHS(connection_struct *conn, struct smb_request *req,
+                     struct files_struct *fsp, char *param, int param_len)
 {
-       uint16 priority;
-
        if (!param || param_len < 2) {
                reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
                return;
        }
 
-       priority = SVAL(param,0);
-       DEBUG(4,("WaitNamedPipeHandleState priority %x\n", priority));
+       DEBUG(4,("WaitNamedPipeHandleState priority %x\n",
+                (int)SVAL(param,0)));
 
-       if (wait_rpc_pipe_hnd_state(p, priority)) {
-               /* now send the reply */
-               send_trans_reply(conn, req->inbuf, NULL, 0, NULL, 0, False);
-               return;
-       }
-       api_no_reply(conn,req);
+       send_trans_reply(conn, req->inbuf, NULL, 0, NULL, 0, False);
 }
 
 
@@ -249,25 +247,17 @@ static void api_WNPHS(connection_struct *conn, struct smb_request *req, smb_np_s
  SetNamedPipeHandleState 
 ****************************************************************************/
 
-static void api_SNPHS(connection_struct *conn, struct smb_request *req, smb_np_struct *p,
-                     char *param, int param_len)
+static void api_SNPHS(connection_struct *conn, struct smb_request *req,
+                     struct files_struct *fsp, char *param, int param_len)
 {
-       uint16 id;
-
        if (!param || param_len < 2) {
                reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
                return;
        }
 
-       id = SVAL(param,0);
-       DEBUG(4,("SetNamedPipeHandleState to code %x\n", id));
+       DEBUG(4,("SetNamedPipeHandleState to code %x\n", (int)SVAL(param,0)));
 
-       if (set_rpc_pipe_hnd_state(p, id)) {
-               /* now send the reply */
-               send_trans_reply(conn, req->inbuf, NULL, 0, NULL, 0, False);
-               return;
-       }
-       api_no_reply(conn,req);
+       send_trans_reply(conn, req->inbuf, NULL, 0, NULL, 0, False);
 }
 
 
@@ -297,14 +287,14 @@ static void api_no_reply(connection_struct *conn, struct smb_request *req)
 
 static void api_fd_reply(connection_struct *conn, uint16 vuid,
                         struct smb_request *req,
-                        uint16 *setup, char *data, char *params,
+                        uint16 *setup, uint8_t *data, char *params,
                         int suwcnt, int tdscnt, int tpscnt,
                         int mdrcnt, int mprcnt)
 {
-       bool reply = False;
-       smb_np_struct *p = NULL;
+       struct files_struct *fsp;
        int pnum;
        int subcommand;
+       NTSTATUS status;
 
        DEBUG(5,("api_fd_reply\n"));
 
@@ -323,7 +313,9 @@ static void api_fd_reply(connection_struct *conn, uint16 vuid,
        pnum = ((int)setup[1]) & 0xFFFF;
        subcommand = ((int)setup[0]) & 0xFFFF;
 
-       if(!(p = get_rpc_pipe(pnum))) {
+       fsp = file_fsp(req, pnum);
+
+       if (!fsp_is_np(fsp)) {
                if (subcommand == TRANSACT_WAITNAMEDPIPEHANDLESTATE) {
                        /* Win9x does this call with a unicode pipe name, not a pnum. */
                        /* Just return success for now... */
@@ -338,37 +330,37 @@ static void api_fd_reply(connection_struct *conn, uint16 vuid,
                return;
        }
 
-       if (vuid != p->vuid) {
+       if (vuid != fsp->vuid) {
                DEBUG(1, ("Got pipe request (pnum %x) using invalid VUID %d, "
-                         "expected %d\n", pnum, vuid, p->vuid));
+                         "expected %d\n", pnum, vuid, fsp->vuid));
                reply_nterror(req, NT_STATUS_INVALID_HANDLE);
                return;
        }
 
-       DEBUG(3,("Got API command 0x%x on pipe \"%s\" (pnum %x)\n", subcommand, p->name, pnum));
-
-       /* record maximum data length that can be transmitted in an SMBtrans */
-       p->max_trans_reply = mdrcnt;
+       DEBUG(3,("Got API command 0x%x on pipe \"%s\" (pnum %x)\n",
+                subcommand, fsp->fsp_name, pnum));
 
-       DEBUG(10,("api_fd_reply: p:%p max_trans_reply: %d\n", p, p->max_trans_reply));
+       DEBUG(10, ("api_fd_reply: p:%p max_trans_reply: %d\n", fsp, mdrcnt));
 
        switch (subcommand) {
-       case TRANSACT_DCERPCCMD:
+       case TRANSACT_DCERPCCMD: {
                /* dce/rpc command */
-               reply = write_to_pipe(p, data, tdscnt);
-               if (!reply) {
+               ssize_t nwritten;
+               status = np_write(fsp, data, tdscnt, &nwritten);
+               if (!NT_STATUS_IS_OK(status)) {
                        api_no_reply(conn, req);
                        return;
                }
-               api_rpc_trans_reply(conn, req, p);
+               api_rpc_trans_reply(conn, req, fsp, mdrcnt);
                break;
+       }
        case TRANSACT_WAITNAMEDPIPEHANDLESTATE:
                /* Wait Named Pipe Handle state */
-               api_WNPHS(conn, req, p, params, tpscnt);
+               api_WNPHS(conn, req, fsp, params, tpscnt);
                break;
        case TRANSACT_SETNAMEDPIPEHANDLESTATE:
                /* Set Named Pipe Handle state */
-               api_SNPHS(conn, req, p, params, tpscnt);
+               api_SNPHS(conn, req, fsp, params, tpscnt);
                break;
        default:
                reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
@@ -406,7 +398,7 @@ static void named_pipe(connection_struct *conn, uint16 vuid,
                DEBUG(4,("named pipe command from Win95 (wow!)\n"));
 
                api_fd_reply(conn, vuid, req,
-                            setup, data, params,
+                            setup, (uint8_t *)data, params,
                             suwcnt, tdscnt, tpscnt,
                             mdrcnt, mprcnt);
                return;
@@ -414,7 +406,7 @@ static void named_pipe(connection_struct *conn, uint16 vuid,
 
        if (strlen(name) < 1) {
                api_fd_reply(conn, vuid, req,
-                            setup, data,
+                            setup, (uint8_t *)data,
                             params, suwcnt, tdscnt,
                             tpscnt, mdrcnt, mprcnt);
                return;
@@ -735,11 +727,11 @@ void reply_transs(struct smb_request *req)
 
        state->received_param += pcnt;
        state->received_data += dcnt;
-               
+
        if ((state->received_data > state->total_data) ||
            (state->received_param > state->total_param))
                goto bad_param;
-               
+
        if (pcnt) {
                if (pdisp > state->total_param ||
                                pcnt > state->total_param ||
index fe1d766b9d38cc47607abdcd3fbd8ceffc338549..0c866da7069b5fd7de1fc1bb2036f2db8f256689 100644 (file)
@@ -1154,7 +1154,7 @@ static int get_server_info(uint32 servertype,
        bool local_list_only;
        int i;
 
-       lines = file_lines_load(lock_path(SERVER_LIST), NULL, 0);
+       lines = file_lines_load(lock_path(SERVER_LIST), NULL, 0, NULL);
        if (!lines) {
                DEBUG(4,("Can't open %s - %s\n",lock_path(SERVER_LIST),strerror(errno)));
                return 0;
@@ -1186,7 +1186,7 @@ static int get_server_info(uint32 servertype,
                        *servers = SMB_REALLOC_ARRAY(*servers,struct srv_info_struct, alloced);
                        if (!*servers) {
                                DEBUG(0,("get_server_info: failed to enlarge servers info struct!\n"));
-                               file_lines_free(lines);
+                               TALLOC_FREE(lines);
                                return 0;
                        }
                        memset((char *)((*servers)+count),'\0',sizeof(**servers)*(alloced-count));
@@ -1267,7 +1267,7 @@ static int get_server_info(uint32 servertype,
                }
        }
   
-       file_lines_free(lines);
+       TALLOC_FREE(lines);
        return count;
 }
 
index 7536758bcb68ee9fc5f89f25559228b24381e569..a8899dd538af118bf45c7b9aeb02d1daaccce91e 100644 (file)
@@ -116,7 +116,7 @@ bool map_username(fstring user)
                }
 
                numlines = 0;
-               qlines = fd_lines_load(fd, &numlines,0);
+               qlines = fd_lines_load(fd, &numlines,0, NULL);
                DEBUGADD(10,("Lines returned = [%d]\n", numlines));
                close(fd);
 
@@ -127,7 +127,7 @@ bool map_username(fstring user)
                        fstrcpy( user, qlines[0] );
                }
 
-               file_lines_free(qlines);
+               TALLOC_FREE(qlines);
 
                return numlines != 0;
        }
index c8ff8edf627c78f1786a5031d94e810a76c36288..392b32437a2fb7b25484e1f78dd7e03e853bcc0f 100644 (file)
  * Needed for auto generation of proto.h.
  */
 
-bool disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize)
+bool disk_quotas(const char *path,uint64_t *bsize,uint64_t *dfree,uint64_t *dsize)
 {
   (*bsize) = 512; /* This value should be ignored */
 
   /* And just to be sure we set some values that hopefully */
   /* will be larger that any possible real-world value     */
-  (*dfree) = (SMB_BIG_UINT)-1;
-  (*dsize) = (SMB_BIG_UINT)-1;
+  (*dfree) = (uint64_t)-1;
+  (*dsize) = (uint64_t)-1;
 
   /* As we have select not to use quotas, allways fail */
   return False;
index c616c494dc40e29de6b190c510298102f064aae4..ae7034011eb4e9005da88fbfa1dd9816a8b7e15a 100644 (file)
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_QUOTA
 
-static SMB_BIG_UINT limit_nt2unix(SMB_BIG_UINT in, SMB_BIG_UINT bsize)
+static uint64_t limit_nt2unix(uint64_t in, uint64_t bsize)
 {
-       SMB_BIG_UINT ret = (SMB_BIG_UINT)0;
+       uint64_t ret = (uint64_t)0;
 
-       ret =   (SMB_BIG_UINT)(in/bsize);
+       ret =   (uint64_t)(in/bsize);
        if (in>0 && ret==0) {
                /* we have to make sure that a overflow didn't set NO_LIMIT */
-               ret = (SMB_BIG_UINT)1;
+               ret = (uint64_t)1;
        }
 
        if (in == SMB_NTQUOTAS_NO_LIMIT)
@@ -42,11 +42,11 @@ static SMB_BIG_UINT limit_nt2unix(SMB_BIG_UINT in, SMB_BIG_UINT bsize)
        return ret;
 }
 
-static SMB_BIG_UINT limit_unix2nt(SMB_BIG_UINT in, SMB_BIG_UINT bsize)
+static uint64_t limit_unix2nt(uint64_t in, uint64_t bsize)
 {
-       SMB_BIG_UINT ret = (SMB_BIG_UINT)0;
+       uint64_t ret = (uint64_t)0;
 
-       ret = (SMB_BIG_UINT)(in*bsize);
+       ret = (uint64_t)(in*bsize);
        
        if (ret < in) {
                /* we overflow */
@@ -59,14 +59,14 @@ static SMB_BIG_UINT limit_unix2nt(SMB_BIG_UINT in, SMB_BIG_UINT bsize)
        return ret;
 }
 
-static SMB_BIG_UINT limit_blk2inodes(SMB_BIG_UINT in)
+static uint64_t limit_blk2inodes(uint64_t in)
 {
-       SMB_BIG_UINT ret = (SMB_BIG_UINT)0;
+       uint64_t ret = (uint64_t)0;
        
-       ret = (SMB_BIG_UINT)(in/2);
+       ret = (uint64_t)(in/2);
        
        if (ret == 0 && in != 0)
-               ret = (SMB_BIG_UINT)1;
+               ret = (uint64_t)1;
 
        return ret;     
 }
@@ -100,7 +100,7 @@ int vfs_get_ntquota(files_struct *fsp, enum SMB_QUOTA_TYPE qtype, DOM_SID *psid,
                return ret;
        }
                
-       qt->usedspace = (SMB_BIG_UINT)D.curblocks*D.bsize;
+       qt->usedspace = (uint64_t)D.curblocks*D.bsize;
        qt->softlim = limit_unix2nt(D.softlimit, D.bsize);
        qt->hardlim = limit_unix2nt(D.hardlimit, D.bsize);
        qt->qflags = D.qflags;
@@ -121,7 +121,7 @@ int vfs_set_ntquota(files_struct *fsp, enum SMB_QUOTA_TYPE qtype, DOM_SID *psid,
 
        id.uid = -1;
 
-       D.bsize     = (SMB_BIG_UINT)QUOTABLOCK_SIZE;
+       D.bsize     = (uint64_t)QUOTABLOCK_SIZE;
 
        D.softlimit = limit_nt2unix(qt->softlim,D.bsize);
        D.hardlimit = limit_nt2unix(qt->hardlim,D.bsize);
index 061855876ce3fa5b3b79ca16f0935b6d0d16d024..69ddcdae8dccc7cb9cbf0e603990b188bad03ae6 100644 (file)
@@ -22,6 +22,7 @@
 
 extern int max_send;
 extern enum protocol_types Protocol;
+extern const struct generic_mapping file_generic_mapping;
 
 static char *nttrans_realloc(char **ptr, size_t size)
 {
@@ -267,7 +268,8 @@ bool is_ntfs_stream_name(const char *fname)
 static void nt_open_pipe(char *fname, connection_struct *conn,
                         struct smb_request *req, int *ppnum)
 {
-       smb_np_struct *p = NULL;
+       files_struct *fsp;
+       NTSTATUS status;
 
        DEBUG(4,("nt_open_pipe: Opening pipe %s.\n", fname));
 
@@ -284,19 +286,13 @@ static void nt_open_pipe(char *fname, connection_struct *conn,
 
        DEBUG(3,("nt_open_pipe: Known pipe %s opening.\n", fname));
 
-       p = open_rpc_pipe_p(fname, conn, req->vuid);
-       if (!p) {
-               reply_doserror(req, ERRSRV, ERRnofids);
+       status = np_open(req, conn, fname, &fsp);
+       if (!NT_STATUS_IS_OK(status)) {
+               reply_nterror(req, status);
                return;
        }
 
-       /* TODO: Add pipe to db */
-
-       if ( !store_pipe_opendb( p ) ) {
-               DEBUG(3,("nt_open_pipe: failed to store %s pipe open.\n", fname));
-       }
-
-       *ppnum = p->pnum;
+       *ppnum = fsp->fnum;
        return;
 }
 
@@ -390,7 +386,7 @@ void reply_ntcreate_and_X(struct smb_request *req)
        uint32 create_disposition;
        uint32 create_options;
        uint16 root_dir_fid;
-       SMB_BIG_UINT allocation_size;
+       uint64_t allocation_size;
        /* Breakout the oplock request bits so we can set the
           reply bits separately. */
        uint32 fattr=0;
@@ -422,10 +418,10 @@ void reply_ntcreate_and_X(struct smb_request *req)
        create_options = IVAL(req->inbuf,smb_ntcreate_CreateOptions);
        root_dir_fid = (uint16)IVAL(req->inbuf,smb_ntcreate_RootDirectoryFid);
 
-       allocation_size = (SMB_BIG_UINT)IVAL(req->inbuf,
+       allocation_size = (uint64_t)IVAL(req->inbuf,
                                             smb_ntcreate_AllocationSize);
 #ifdef LARGE_SMB_OFF_T
-       allocation_size |= (((SMB_BIG_UINT)IVAL(
+       allocation_size |= (((uint64_t)IVAL(
                                     req->inbuf,
                                     smb_ntcreate_AllocationSize + 4)) << 32);
 #endif
@@ -713,7 +709,6 @@ static void do_nt_transact_create_pipe(connection_struct *conn,
 static NTSTATUS set_sd(files_struct *fsp, uint8 *data, uint32 sd_len,
                       uint32 security_info_sent)
 {
-       extern const struct generic_mapping file_generic_mapping;
        SEC_DESC *psd = NULL;
        NTSTATUS status;
 
@@ -819,7 +814,7 @@ static void call_nt_transact_create(connection_struct *conn,
        struct ea_list *ea_list = NULL;
        NTSTATUS status;
        size_t param_len;
-       SMB_BIG_UINT allocation_size;
+       uint64_t allocation_size;
        int oplock_request;
        uint8_t oplock_granted;
        TALLOC_CTX *ctx = talloc_tos();
@@ -862,9 +857,9 @@ static void call_nt_transact_create(connection_struct *conn,
        sd_len = IVAL(params,36);
        ea_len = IVAL(params,40);
        root_dir_fid = (uint16)IVAL(params,4);
-       allocation_size = (SMB_BIG_UINT)IVAL(params,12);
+       allocation_size = (uint64_t)IVAL(params,12);
 #ifdef LARGE_SMB_OFF_T
-       allocation_size |= (((SMB_BIG_UINT)IVAL(params,16)) << 32);
+       allocation_size |= (((uint64_t)IVAL(params,16)) << 32);
 #endif
 
        /*
@@ -1188,7 +1183,7 @@ static NTSTATUS copy_internals(TALLOC_CTX *ctx,
                        &info, &fsp2);
 
        if (!NT_STATUS_IS_OK(status)) {
-               close_file(fsp1,ERROR_CLOSE);
+               close_file(NULL, fsp1, ERROR_CLOSE);
                return status;
        }
 
@@ -1202,12 +1197,12 @@ static NTSTATUS copy_internals(TALLOC_CTX *ctx,
         * Thus we don't look at the error return from the
         * close of fsp1.
         */
-       close_file(fsp1,NORMAL_CLOSE);
+       close_file(NULL, fsp1, NORMAL_CLOSE);
 
        /* Ensure the modtime is set correctly on the destination file. */
        set_close_write_time(fsp2, get_mtimespec(&sbuf1));
 
-       status = close_file(fsp2,NORMAL_CLOSE);
+       status = close_file(NULL, fsp2, NORMAL_CLOSE);
 
        /* Grrr. We have to do this as open_file_ntcreate adds aARCH when it
           creates the file. This isn't the correct thing to do in the copy
@@ -1399,7 +1394,7 @@ static void call_nt_transact_notify_change(connection_struct *conn,
                return;
        }
 
-       fsp = file_fsp(SVAL(setup,4));
+       fsp = file_fsp(req, SVAL(setup,4));
        filter = IVAL(setup, 0);
        recursive = (SVAL(setup, 6) != 0) ? True : False;
 
@@ -1499,7 +1494,7 @@ static void call_nt_transact_rename(connection_struct *conn,
                return;
        }
 
-       fsp = file_fsp(SVAL(params, 0));
+       fsp = file_fsp(req, SVAL(params, 0));
        if (!check_fsp(conn, req, fsp)) {
                return;
        }
@@ -1568,7 +1563,7 @@ static void call_nt_transact_query_security_desc(connection_struct *conn,
                return;
        }
 
-       fsp = file_fsp(SVAL(params,0));
+       fsp = file_fsp(req, SVAL(params,0));
        if(!fsp) {
                reply_doserror(req, ERRDOS, ERRbadfid);
                return;
@@ -1664,7 +1659,7 @@ static void call_nt_transact_set_security_desc(connection_struct *conn,
                return;
        }
 
-       if((fsp = file_fsp(SVAL(params,0))) == NULL) {
+       if((fsp = file_fsp(req, SVAL(params,0))) == NULL) {
                reply_doserror(req, ERRDOS, ERRbadfid);
                return;
        }
@@ -1728,7 +1723,7 @@ static void call_nt_transact_ioctl(connection_struct *conn,
        DEBUG(10,("call_nt_transact_ioctl: function[0x%08X] FID[0x%04X] isFSctl[0x%02X] compfilter[0x%02X]\n", 
                 function, fidnum, isFSctl, compfilter));
 
-       fsp=file_fsp(fidnum);
+       fsp=file_fsp(req, fidnum);
        /* this check is done in each implemented function case for now
           because I don't want to break anything... --metze
        FSP_BELONGS_CONN(fsp,conn);*/
@@ -2035,7 +2030,7 @@ static void call_nt_transact_get_user_quota(connection_struct *conn,
        }
 
        /* maybe we can check the quota_fnum */
-       fsp = file_fsp(SVAL(params,0));
+       fsp = file_fsp(req, SVAL(params,0));
        if (!check_fsp_ntquota_handle(conn, req, fsp)) {
                DEBUG(3,("TRANSACT_GET_USER_QUOTA: no valid QUOTA HANDLE\n"));
                reply_nterror(req, NT_STATUS_INVALID_HANDLE);
@@ -2132,16 +2127,16 @@ static void call_nt_transact_get_user_quota(connection_struct *conn,
                                /* then the len of the SID 4 bytes */
                                SIVAL(entry,4,sid_len);
 
-                               /* unknown data 8 bytes SMB_BIG_UINT */
-                               SBIG_UINT(entry,8,(SMB_BIG_UINT)0); /* this is not 0 in windows...-metze*/
+                               /* unknown data 8 bytes uint64_t */
+                               SBIG_UINT(entry,8,(uint64_t)0); /* this is not 0 in windows...-metze*/
 
-                               /* the used disk space 8 bytes SMB_BIG_UINT */
+                               /* the used disk space 8 bytes uint64_t */
                                SBIG_UINT(entry,16,tmp_list->quotas->usedspace);
 
-                               /* the soft quotas 8 bytes SMB_BIG_UINT */
+                               /* the soft quotas 8 bytes uint64_t */
                                SBIG_UINT(entry,24,tmp_list->quotas->softlim);
 
-                               /* the hard quotas 8 bytes SMB_BIG_UINT */
+                               /* the hard quotas 8 bytes uint64_t */
                                SBIG_UINT(entry,32,tmp_list->quotas->hardlim);
 
                                /* and now the SID */
@@ -2230,16 +2225,16 @@ static void call_nt_transact_get_user_quota(connection_struct *conn,
                        /* then the len of the SID 4 bytes */
                        SIVAL(entry,4,sid_len);
 
-                       /* unknown data 8 bytes SMB_BIG_UINT */
-                       SBIG_UINT(entry,8,(SMB_BIG_UINT)0); /* this is not 0 in windows...-mezte*/
+                       /* unknown data 8 bytes uint64_t */
+                       SBIG_UINT(entry,8,(uint64_t)0); /* this is not 0 in windows...-mezte*/
 
-                       /* the used disk space 8 bytes SMB_BIG_UINT */
+                       /* the used disk space 8 bytes uint64_t */
                        SBIG_UINT(entry,16,qt.usedspace);
 
-                       /* the soft quotas 8 bytes SMB_BIG_UINT */
+                       /* the soft quotas 8 bytes uint64_t */
                        SBIG_UINT(entry,24,qt.softlim);
 
-                       /* the hard quotas 8 bytes SMB_BIG_UINT */
+                       /* the hard quotas 8 bytes uint64_t */
                        SBIG_UINT(entry,32,qt.hardlim);
 
                        /* and now the SID */
@@ -2302,7 +2297,7 @@ static void call_nt_transact_set_user_quota(connection_struct *conn,
        }
 
        /* maybe we can check the quota_fnum */
-       fsp = file_fsp(SVAL(params,0));
+       fsp = file_fsp(req, SVAL(params,0));
        if (!check_fsp_ntquota_handle(conn, req, fsp)) {
                DEBUG(3,("TRANSACT_GET_USER_QUOTA: no valid QUOTA HANDLE\n"));
                reply_nterror(req, NT_STATUS_INVALID_HANDLE);
@@ -2333,10 +2328,10 @@ static void call_nt_transact_set_user_quota(connection_struct *conn,
         * maybe its the change time in NTTIME
         */
 
-       /* the used space 8 bytes (SMB_BIG_UINT)*/
-       qt.usedspace = (SMB_BIG_UINT)IVAL(pdata,16);
+       /* the used space 8 bytes (uint64_t)*/
+       qt.usedspace = (uint64_t)IVAL(pdata,16);
 #ifdef LARGE_SMB_OFF_T
-       qt.usedspace |= (((SMB_BIG_UINT)IVAL(pdata,20)) << 32);
+       qt.usedspace |= (((uint64_t)IVAL(pdata,20)) << 32);
 #else /* LARGE_SMB_OFF_T */
        if ((IVAL(pdata,20) != 0)&&
                ((qt.usedspace != 0xFFFFFFFF)||
@@ -2347,10 +2342,10 @@ static void call_nt_transact_set_user_quota(connection_struct *conn,
        }
 #endif /* LARGE_SMB_OFF_T */
 
-       /* the soft quotas 8 bytes (SMB_BIG_UINT)*/
-       qt.softlim = (SMB_BIG_UINT)IVAL(pdata,24);
+       /* the soft quotas 8 bytes (uint64_t)*/
+       qt.softlim = (uint64_t)IVAL(pdata,24);
 #ifdef LARGE_SMB_OFF_T
-       qt.softlim |= (((SMB_BIG_UINT)IVAL(pdata,28)) << 32);
+       qt.softlim |= (((uint64_t)IVAL(pdata,28)) << 32);
 #else /* LARGE_SMB_OFF_T */
        if ((IVAL(pdata,28) != 0)&&
                ((qt.softlim != 0xFFFFFFFF)||
@@ -2361,10 +2356,10 @@ static void call_nt_transact_set_user_quota(connection_struct *conn,
        }
 #endif /* LARGE_SMB_OFF_T */
 
-       /* the hard quotas 8 bytes (SMB_BIG_UINT)*/
-       qt.hardlim = (SMB_BIG_UINT)IVAL(pdata,32);
+       /* the hard quotas 8 bytes (uint64_t)*/
+       qt.hardlim = (uint64_t)IVAL(pdata,32);
 #ifdef LARGE_SMB_OFF_T
-       qt.hardlim |= (((SMB_BIG_UINT)IVAL(pdata,36)) << 32);
+       qt.hardlim |= (((uint64_t)IVAL(pdata,36)) << 32);
 #else /* LARGE_SMB_OFF_T */
        if ((IVAL(pdata,36) != 0)&&
                ((qt.hardlim != 0xFFFFFFFF)||
index 8727e80d5f740353f4d5900e31bd35d1efb4114c..d858fb969f97fb7ad40de80ed3f7eaaaf913a898 100644 (file)
@@ -890,7 +890,8 @@ static bool open_match_attributes(connection_struct *conn,
  Try and find a duplicated file handle.
 ****************************************************************************/
 
-static files_struct *fcb_or_dos_open(connection_struct *conn,
+static files_struct *fcb_or_dos_open(struct smb_request *req,
+                                    connection_struct *conn,
                                     const char *fname, 
                                     struct file_id id,
                                     uint16 file_pid,
@@ -940,7 +941,7 @@ static files_struct *fcb_or_dos_open(connection_struct *conn,
        }
 
        /* We need to duplicate this fsp. */
-       if (!NT_STATUS_IS_OK(dup_file_fsp(fsp, access_mask, share_access,
+       if (!NT_STATUS_IS_OK(dup_file_fsp(req, fsp, access_mask, share_access,
                                          create_options, &dup_fsp))) {
                return NULL;
        }
@@ -1178,7 +1179,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
 
                DEBUG(10, ("open_file_ntcreate: printer open fname=%s\n", fname));
 
-               return print_fsp_open(conn, fname, req->vuid, result);
+               return print_fsp_open(req, conn, fname, req->vuid, result);
        }
 
        if (!parent_dirname_talloc(talloc_tos(), fname, &parent_dir,
@@ -1435,7 +1436,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
                return NT_STATUS_ACCESS_DENIED;
        }
 
-       status = file_new(conn, &fsp);
+       status = file_new(req, conn, &fsp);
        if(!NT_STATUS_IS_OK(status)) {
                return status;
        }
@@ -1464,7 +1465,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
                                          fname, &old_write_time);
 
                if (lck == NULL) {
-                       file_free(fsp);
+                       file_free(req, fsp);
                        DEBUG(0, ("Could not get share mode lock\n"));
                        return NT_STATUS_SHARING_VIOLATION;
                }
@@ -1475,7 +1476,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
                                         oplock_request)) {
                        schedule_defer_open(lck, request_time, req);
                        TALLOC_FREE(lck);
-                       file_free(fsp);
+                       file_free(req, fsp);
                        return NT_STATUS_SHARING_VIOLATION;
                }
 
@@ -1495,7 +1496,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
                                                  oplock_request)) {
                                schedule_defer_open(lck, request_time, req);
                                TALLOC_FREE(lck);
-                               file_free(fsp);
+                               file_free(req, fsp);
                                return NT_STATUS_SHARING_VIOLATION;
                        }
                }
@@ -1503,7 +1504,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
                if (NT_STATUS_EQUAL(status, NT_STATUS_DELETE_PENDING)) {
                        /* DELETE_PENDING is not deferred for a second */
                        TALLOC_FREE(lck);
-                       file_free(fsp);
+                       file_free(req, fsp);
                        return status;
                }
 
@@ -1524,13 +1525,13 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
                                        DEBUG(0, ("DOS open without an SMB "
                                                  "request!\n"));
                                        TALLOC_FREE(lck);
-                                       file_free(fsp);
+                                       file_free(req, fsp);
                                        return NT_STATUS_INTERNAL_ERROR;
                                }
 
                                /* Use the client requested access mask here,
                                 * not the one we open with. */
-                               fsp_dup = fcb_or_dos_open(conn, fname, id,
+                               fsp_dup = fcb_or_dos_open(req, conn, fname, id,
                                                          req->smbpid,
                                                          req->vuid,
                                                          access_mask,
@@ -1539,7 +1540,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
 
                                if (fsp_dup) {
                                        TALLOC_FREE(lck);
-                                       file_free(fsp);
+                                       file_free(req, fsp);
                                        if (pinfo) {
                                                *pinfo = FILE_WAS_OPENED;
                                        }
@@ -1625,7 +1626,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
                        } else {
                                status = NT_STATUS_ACCESS_DENIED;
                        }
-                       file_free(fsp);
+                       file_free(req, fsp);
                        return status;
                }
 
@@ -1663,7 +1664,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
                if (lck != NULL) {
                        TALLOC_FREE(lck);
                }
-               file_free(fsp);
+               file_free(req, fsp);
                return fsp_open;
        }
 
@@ -1694,7 +1695,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
                        DEBUG(0, ("open_file_ntcreate: Could not get share "
                                  "mode lock for %s\n", fname));
                        fd_close(fsp);
-                       file_free(fsp);
+                       file_free(req, fsp);
                        return NT_STATUS_SHARING_VIOLATION;
                }
 
@@ -1705,7 +1706,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
                        schedule_defer_open(lck, request_time, req);
                        TALLOC_FREE(lck);
                        fd_close(fsp);
-                       file_free(fsp);
+                       file_free(req, fsp);
                        return NT_STATUS_SHARING_VIOLATION;
                }
 
@@ -1724,7 +1725,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
                                schedule_defer_open(lck, request_time, req);
                                TALLOC_FREE(lck);
                                fd_close(fsp);
-                               file_free(fsp);
+                               file_free(req, fsp);
                                return NT_STATUS_SHARING_VIOLATION;
                        }
                }
@@ -1733,7 +1734,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
                        struct deferred_open_record state;
 
                        fd_close(fsp);
-                       file_free(fsp);
+                       file_free(req, fsp);
 
                        state.delayed_for_oplocks = False;
                        state.id = id;
@@ -1775,7 +1776,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
 
                        TALLOC_FREE(lck);
                        fd_close(fsp);
-                       file_free(fsp);
+                       file_free(req, fsp);
 
                        return NT_STATUS_SHARING_VIOLATION;
                }
@@ -1801,7 +1802,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
                        status = map_nt_error_from_unix(errno);
                        TALLOC_FREE(lck);
                        fd_close(fsp);
-                       file_free(fsp);
+                       file_free(req, fsp);
                        return status;
                }
        }
@@ -1862,7 +1863,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
                        del_share_mode(lck, fsp);
                        TALLOC_FREE(lck);
                        fd_close(fsp);
-                       file_free(fsp);
+                       file_free(req, fsp);
                        return status;
                }
                /* Note that here we set the *inital* delete on close flag,
@@ -1948,7 +1949,8 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
  Open a file for for write to ensure that we can fchmod it.
 ****************************************************************************/
 
-NTSTATUS open_file_fchmod(connection_struct *conn, const char *fname,
+NTSTATUS open_file_fchmod(struct smb_request *req, connection_struct *conn,
+                         const char *fname,
                          SMB_STRUCT_STAT *psbuf, files_struct **result)
 {
        files_struct *fsp = NULL;
@@ -1958,7 +1960,7 @@ NTSTATUS open_file_fchmod(connection_struct *conn, const char *fname,
                return NT_STATUS_INVALID_PARAMETER;
        }
 
-       status = file_new(conn, &fsp);
+       status = file_new(req, conn, &fsp);
        if(!NT_STATUS_IS_OK(status)) {
                return status;
        }
@@ -1975,7 +1977,7 @@ NTSTATUS open_file_fchmod(connection_struct *conn, const char *fname,
         */
 
        if (!NT_STATUS_IS_OK(status)) {
-               file_free(fsp);
+               file_free(req, fsp);
                return status;
        }
 
@@ -1987,10 +1989,10 @@ NTSTATUS open_file_fchmod(connection_struct *conn, const char *fname,
  Close the fchmod file fd - ensure no locks are lost.
 ****************************************************************************/
 
-NTSTATUS close_file_fchmod(files_struct *fsp)
+NTSTATUS close_file_fchmod(struct smb_request *req, files_struct *fsp)
 {
        NTSTATUS status = fd_close(fsp);
-       file_free(fsp);
+       file_free(req, fsp);
        return status;
 }
 
@@ -2198,7 +2200,7 @@ NTSTATUS open_directory(connection_struct *conn,
                return NT_STATUS_NOT_A_DIRECTORY;
        }
 
-       status = file_new(conn, &fsp);
+       status = file_new(req, conn, &fsp);
        if(!NT_STATUS_IS_OK(status)) {
                return status;
        }
@@ -2236,7 +2238,7 @@ NTSTATUS open_directory(connection_struct *conn,
 
        if (lck == NULL) {
                DEBUG(0, ("open_directory: Could not get share mode lock for %s\n", fname));
-               file_free(fsp);
+               file_free(req, fsp);
                return NT_STATUS_SHARING_VIOLATION;
        }
 
@@ -2246,7 +2248,7 @@ NTSTATUS open_directory(connection_struct *conn,
 
        if (!NT_STATUS_IS_OK(status)) {
                TALLOC_FREE(lck);
-               file_free(fsp);
+               file_free(req, fsp);
                return status;
        }
 
@@ -2259,7 +2261,7 @@ NTSTATUS open_directory(connection_struct *conn,
                status = can_set_delete_on_close(fsp, True, 0);
                if (!NT_STATUS_IS_OK(status) && !NT_STATUS_EQUAL(status, NT_STATUS_DIRECTORY_NOT_EMPTY)) {
                        TALLOC_FREE(lck);
-                       file_free(fsp);
+                       file_free(req, fsp);
                        return status;
                }
 
@@ -2300,7 +2302,7 @@ NTSTATUS create_directory(connection_struct *conn, struct smb_request *req, cons
                                &fsp);
 
        if (NT_STATUS_IS_OK(status)) {
-               close_file(fsp, NORMAL_CLOSE);
+               close_file(req, fsp, NORMAL_CLOSE);
        }
 
        return status;
@@ -2510,7 +2512,7 @@ static NTSTATUS open_streams_for_delete(connection_struct *conn,
 
                DEBUG(10, ("Closing stream # %d, %s\n", i,
                           streams[i]->fsp_name));
-               close_file(streams[i], NORMAL_CLOSE);
+               close_file(NULL, streams[i], NORMAL_CLOSE);
        }
 
  fail:
@@ -2531,7 +2533,7 @@ NTSTATUS create_file_unixpath(connection_struct *conn,
                              uint32_t create_options,
                              uint32_t file_attributes,
                              uint32_t oplock_request,
-                             SMB_BIG_UINT allocation_size,
+                             uint64_t allocation_size,
                              struct security_descriptor *sd,
                              struct ea_list *ea_list,
 
@@ -2807,7 +2809,7 @@ NTSTATUS create_file_unixpath(connection_struct *conn,
                        }
                } else {
                        fsp->initial_allocation_size = smb_roundup(
-                               fsp->conn, (SMB_BIG_UINT)sbuf.st_size);
+                               fsp->conn, (uint64_t)sbuf.st_size);
                }
        }
 
@@ -2841,11 +2843,11 @@ NTSTATUS create_file_unixpath(connection_struct *conn,
        DEBUG(10, ("create_file_unixpath: %s\n", nt_errstr(status)));
 
        if (fsp != NULL) {
-               close_file(fsp, ERROR_CLOSE);
+               close_file(req, fsp, ERROR_CLOSE);
                fsp = NULL;
        }
        if (base_fsp != NULL) {
-               close_file(base_fsp, ERROR_CLOSE);
+               close_file(req, base_fsp, ERROR_CLOSE);
                base_fsp = NULL;
        }
        return status;
@@ -2861,7 +2863,7 @@ NTSTATUS create_file(connection_struct *conn,
                     uint32_t create_options,
                     uint32_t file_attributes,
                     uint32_t oplock_request,
-                    SMB_BIG_UINT allocation_size,
+                    uint64_t allocation_size,
                     struct security_descriptor *sd,
                     struct ea_list *ea_list,
 
@@ -2899,7 +2901,7 @@ NTSTATUS create_file(connection_struct *conn,
                 * This filename is relative to a directory fid.
                 */
                char *parent_fname = NULL;
-               files_struct *dir_fsp = file_fsp(root_dir_fid);
+               files_struct *dir_fsp = file_fsp(req, root_dir_fid);
 
                if (dir_fsp == NULL) {
                        status = NT_STATUS_INVALID_HANDLE;
@@ -3000,7 +3002,7 @@ NTSTATUS create_file(connection_struct *conn,
                         * also tries a QUERY_FILE_INFO on the file and then
                         * close it
                         */
-                       status = open_fake_file(conn, req->vuid,
+                       status = open_fake_file(req, conn, req->vuid,
                                                fake_file_type, fname,
                                                access_mask, &fsp);
                        if (!NT_STATUS_IS_OK(status)) {
@@ -3092,7 +3094,7 @@ NTSTATUS create_file(connection_struct *conn,
        DEBUG(10, ("create_file: %s\n", nt_errstr(status)));
 
        if (fsp != NULL) {
-               close_file(fsp, ERROR_CLOSE);
+               close_file(req, fsp, ERROR_CLOSE);
                fsp = NULL;
        }
        return status;
index 1d3514429f33d5c74d3aae06dc12b93b5c841b97..88e7b766beda625b4d22a1bfb5771ad6a2d39810 100644 (file)
@@ -545,7 +545,7 @@ static bool user_ok(const char *user, int snum)
        ret = True;
 
        if (lp_invalid_users(snum)) {
-               str_list_copy(talloc_tos(), &invalid, lp_invalid_users(snum));
+               invalid = str_list_copy(talloc_tos(), lp_invalid_users(snum));
                if (invalid &&
                    str_list_substitute(invalid, "%S", lp_servicename(snum))) {
 
@@ -561,7 +561,7 @@ static bool user_ok(const char *user, int snum)
        TALLOC_FREE(invalid);
 
        if (ret && lp_valid_users(snum)) {
-               str_list_copy(talloc_tos(), &valid, lp_valid_users(snum));
+               valid = str_list_copy(talloc_tos(), lp_valid_users(snum));
                if ( valid &&
                     str_list_substitute(valid, "%S", lp_servicename(snum)) ) {
 
index 4fdcdcc557def83358c34377bf8f2dad414acd07..25a1fe2e634045259cc00b118ffff0eb33eb5a5e 100644 (file)
 
 #define MAX_PIPE_NAME_LEN      24
 
-/* PIPE/<name>/<pid>/<pnum> */
-#define PIPEDB_KEY_FORMAT "PIPE/%s/%u/%d"
-
-struct pipe_dbrec {
-       struct server_id pid;
-       int pnum;
-       uid_t uid;
-
-       char name[MAX_PIPE_NAME_LEN];
-       fstring user;
-};
-
 /****************************************************************************
  Reply to an open and X on a named pipe.
  This code is basically stolen from reply_open_and_X with some
@@ -54,9 +42,10 @@ void reply_open_pipe_and_X(connection_struct *conn, struct smb_request *req)
 {
        const char *fname = NULL;
        char *pipe_name = NULL;
-       smb_np_struct *p;
+       files_struct *fsp;
        int size=0,fmode=0,mtime=0,rmode=0;
        TALLOC_CTX *ctx = talloc_tos();
+       NTSTATUS status;
 
        /* XXXX we need to handle passed times, sattr and flags */
        srvstr_pull_buf_talloc(ctx, req->inbuf, req->flags2, &pipe_name,
@@ -101,9 +90,9 @@ void reply_open_pipe_and_X(connection_struct *conn, struct smb_request *req)
        /* can be opened and add it in after the open. */
        DEBUG(3,("Known pipe %s opening.\n",fname));
 
-       p = open_rpc_pipe_p(fname, conn, req->vuid);
-       if (!p) {
-               reply_doserror(req, ERRSRV, ERRnofids);
+       status = np_open(req, conn, fname, &fsp);
+       if (!NT_STATUS_IS_OK(status)) {
+               reply_nterror(req, status);
                return;
        }
 
@@ -119,7 +108,7 @@ void reply_open_pipe_and_X(connection_struct *conn, struct smb_request *req)
                rmode = 1;
        }
 
-       SSVAL(req->outbuf,smb_vwv2, p->pnum);
+       SSVAL(req->outbuf,smb_vwv2, fsp->fnum);
        SSVAL(req->outbuf,smb_vwv3,fmode);
        srv_put_dos_date3((char *)req->outbuf,smb_vwv4,mtime);
        SIVAL(req->outbuf,smb_vwv6,size);
@@ -136,27 +125,32 @@ void reply_open_pipe_and_X(connection_struct *conn, struct smb_request *req)
 
 void reply_pipe_write(struct smb_request *req)
 {
-       smb_np_struct *p = get_rpc_pipe_p(SVAL(req->inbuf,smb_vwv0));
+       files_struct *fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
        size_t numtowrite = SVAL(req->inbuf,smb_vwv1);
-       int nwritten;
-       char *data;
+       ssize_t nwritten;
+       uint8_t *data;
 
-       if (!p) {
+       if (!fsp_is_np(fsp)) {
                reply_doserror(req, ERRDOS, ERRbadfid);
                return;
        }
 
-       if (p->vuid != req->vuid) {
+       if (fsp->vuid != req->vuid) {
                reply_nterror(req, NT_STATUS_INVALID_HANDLE);
                return;
        }
 
-       data = smb_buf(req->inbuf) + 3;
+       data = (uint8_t *)smb_buf(req->inbuf) + 3;
 
        if (numtowrite == 0) {
                nwritten = 0;
        } else {
-               nwritten = write_to_pipe(p, data, numtowrite);
+               NTSTATUS status;
+               status = np_write(fsp, data, numtowrite, &nwritten);
+               if (!NT_STATUS_IS_OK(status)) {
+                       reply_nterror(req, status);
+                       return;
+               }
        }
 
        if ((nwritten == 0 && numtowrite != 0) || (nwritten < 0)) {
@@ -168,7 +162,8 @@ void reply_pipe_write(struct smb_request *req)
 
        SSVAL(req->outbuf,smb_vwv0,nwritten);
   
-       DEBUG(3,("write-IPC pnum=%04x nwritten=%d\n", p->pnum, nwritten));
+       DEBUG(3,("write-IPC pnum=%04x nwritten=%d\n", fsp->fnum,
+                (int)nwritten));
 
        return;
 }
@@ -182,31 +177,33 @@ void reply_pipe_write(struct smb_request *req)
 
 void reply_pipe_write_and_X(struct smb_request *req)
 {
-       smb_np_struct *p = get_rpc_pipe_p(SVAL(req->inbuf,smb_vwv2));
+       files_struct *fsp = file_fsp(req, SVAL(req->inbuf, smb_vwv2));
        size_t numtowrite = SVAL(req->inbuf,smb_vwv10);
-       int nwritten = -1;
+       ssize_t nwritten;
        int smb_doff = SVAL(req->inbuf, smb_vwv11);
        bool pipe_start_message_raw =
                ((SVAL(req->inbuf, smb_vwv7)
                  & (PIPE_START_MESSAGE|PIPE_RAW_MODE))
                 == (PIPE_START_MESSAGE|PIPE_RAW_MODE));
-       char *data;
+       uint8_t *data;
 
-       if (!p) {
+       if (!fsp_is_np(fsp)) {
                reply_doserror(req, ERRDOS, ERRbadfid);
                return;
        }
 
-       if (p->vuid != req->vuid) {
+       if (fsp->vuid != req->vuid) {
                reply_nterror(req, NT_STATUS_INVALID_HANDLE);
                return;
        }
 
-       data = smb_base(req->inbuf) + smb_doff;
+       data = (uint8_t *)smb_base(req->inbuf) + smb_doff;
 
        if (numtowrite == 0) {
                nwritten = 0;
        } else {
+               NTSTATUS status;
+
                if(pipe_start_message_raw) {
                        /*
                         * For the start of a message in named pipe byte mode,
@@ -225,7 +222,11 @@ void reply_pipe_write_and_X(struct smb_request *req)
                        data += 2;
                        numtowrite -= 2;
                }                        
-               nwritten = write_to_pipe(p, data, numtowrite);
+               status = np_write(fsp, data, numtowrite, &nwritten);
+               if (!NT_STATUS_IS_OK(status)) {
+                       reply_nterror(req, status);
+                       return;
+               }
        }
 
        if ((nwritten == 0 && numtowrite != 0) || (nwritten < 0)) {
@@ -238,7 +239,8 @@ void reply_pipe_write_and_X(struct smb_request *req)
        nwritten = (pipe_start_message_raw ? nwritten + 2 : nwritten);
        SSVAL(req->outbuf,smb_vwv2,nwritten);
   
-       DEBUG(3,("writeX-IPC pnum=%04x nwritten=%d\n", p->pnum, nwritten));
+       DEBUG(3,("writeX-IPC pnum=%04x nwritten=%d\n", fsp->fnum,
+                (int)nwritten));
 
        chain_reply(req);
 }
@@ -251,12 +253,13 @@ void reply_pipe_write_and_X(struct smb_request *req)
 
 void reply_pipe_read_and_X(struct smb_request *req)
 {
-       smb_np_struct *p = get_rpc_pipe_p(SVAL(req->inbuf,smb_vwv2));
+       files_struct *fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
        int smb_maxcnt = SVAL(req->inbuf,smb_vwv5);
        int smb_mincnt = SVAL(req->inbuf,smb_vwv6);
-       int nread = -1;
-       char *data;
+       ssize_t nread;
+       uint8_t *data;
        bool unused;
+       NTSTATUS status;
 
        /* we don't use the offset given to use for pipe reads. This
            is deliberate, instead we always return the next lump of
@@ -265,18 +268,23 @@ void reply_pipe_read_and_X(struct smb_request *req)
        uint32 smb_offs = IVAL(req->inbuf,smb_vwv3);
 #endif
 
-       if (!p) {
+       if (!fsp_is_np(fsp)) {
                reply_doserror(req, ERRDOS, ERRbadfid);
                return;
        }
 
+       if (fsp->vuid != req->vuid) {
+               reply_nterror(req, NT_STATUS_INVALID_HANDLE);
+               return;
+       }
+
        reply_outbuf(req, 12, smb_maxcnt);
 
-       data = smb_buf(req->outbuf);
+       data = (uint8_t *)smb_buf(req->outbuf);
 
-       nread = read_from_pipe(p, data, smb_maxcnt, &unused);
+       status = np_read(fsp, data, smb_maxcnt, &nread, &unused);
 
-       if (nread < 0) {
+       if (!NT_STATUS_IS_OK(status)) {
                reply_doserror(req, ERRDOS, ERRnoaccess);
                return;
        }
@@ -288,33 +296,7 @@ void reply_pipe_read_and_X(struct smb_request *req)
        SSVAL(smb_buf(req->outbuf),-2,nread);
   
        DEBUG(3,("readX-IPC pnum=%04x min=%d max=%d nread=%d\n",
-                p->pnum, smb_mincnt, smb_maxcnt, nread));
+                fsp->fnum, smb_mincnt, smb_maxcnt, (int)nread));
 
        chain_reply(req);
 }
-
-/****************************************************************************
- Reply to a close.
-****************************************************************************/
-
-void reply_pipe_close(connection_struct *conn, struct smb_request *req)
-{
-       smb_np_struct *p = get_rpc_pipe_p(SVAL(req->inbuf,smb_vwv0));
-
-       if (!p) {
-               reply_doserror(req, ERRDOS, ERRbadfid);
-               return;
-       }
-
-       DEBUG(5,("reply_pipe_close: pnum:%x\n", p->pnum));
-
-       if (!close_rpc_pipe_hnd(p)) {
-               reply_doserror(req, ERRDOS, ERRbadfid);
-               return;
-       }
-       
-       /* TODO: REMOVE PIPE FROM DB */
-
-       reply_outbuf(req, 0, 0);
-       return;
-}
index 4e35e9deaabd342b3a2d1d5c6814acfdb12c838e..848d3e4a6dd06f561c298bea7f295c812ff165e6 100644 (file)
@@ -3191,7 +3191,7 @@ int try_chown(connection_struct *conn, const char *fname, uid_t uid, gid_t gid)
                return -1;
        }
 
-       if (!NT_STATUS_IS_OK(open_file_fchmod(conn,fname,&st,&fsp))) {
+       if (!NT_STATUS_IS_OK(open_file_fchmod(NULL, conn, fname, &st, &fsp))) {
                return -1;
        }
 
@@ -3206,7 +3206,7 @@ int try_chown(connection_struct *conn, const char *fname, uid_t uid, gid_t gid)
        ret = SMB_VFS_FCHOWN(fsp, uid, (gid_t)-1);
        unbecome_root();
 
-       close_file_fchmod(fsp);
+       close_file_fchmod(NULL, fsp);
 
        return ret;
 }
@@ -3264,7 +3264,7 @@ NTSTATUS append_parent_acl(files_struct *fsp,
        status = SMB_VFS_GET_NT_ACL(parent_fsp->conn, parent_fsp->fsp_name,
                                    DACL_SECURITY_INFORMATION, &parent_sd );
 
-       close_file(parent_fsp, NORMAL_CLOSE);
+       close_file(NULL, parent_fsp, NORMAL_CLOSE);
 
        if (!NT_STATUS_IS_OK(status)) {
                return status;
@@ -3510,6 +3510,10 @@ NTSTATUS set_nt_acl(files_struct *fsp, uint32 security_info_sent, const SEC_DESC
 
        create_file_sids(&sbuf, &file_owner_sid, &file_grp_sid);
 
+       /* See here: http://www.codeproject.com/KB/winsdk/accessctrl2.aspx
+        * for details. JRA.
+        */
+
        if ((security_info_sent & DACL_SECURITY_INFORMATION) &&
                psd->dacl != NULL &&
                (psd->type & (SE_DESC_DACL_AUTO_INHERITED|
index 32629fd3929191e9aa74d6b9a0266fac49dfdd4a..ceffd6f46ca0e18382ff36c466377a6b919bd70a 100644 (file)
@@ -376,6 +376,7 @@ void init_smb_request(struct smb_request *req,
        req->unread_bytes = unread_bytes;
        req->encrypted = encrypted;
        req->conn = conn_find(req->tid);
+       req->chain_fsp = NULL;
 
        /* Ensure we have at least wct words and 2 bytes of bcc. */
        if (smb_size + req->wct*2 > req_size) {
@@ -742,7 +743,7 @@ static NTSTATUS receive_message_or_smb(TALLOC_CTX *mem_ctx, char **buffer,
                        pop_message = True;
                } else {
                        struct timeval tv;
-                       SMB_BIG_INT tdif;
+                       int64_t tdif;
 
                        GetTimeOfDay(&tv);
                        tdif = usec_time_diff(&msg->end_time, &tv);
@@ -1486,8 +1487,6 @@ static void construct_reply(char *inbuf, int size, size_t unread_bytes, bool enc
        struct smb_request *req;
 
        chain_size = 0;
-       file_chain_reset();
-       reset_chain_p();
 
        if (!(req = talloc(talloc_tos(), struct smb_request))) {
                smb_panic("could not allocate smb_request");
@@ -1733,6 +1732,7 @@ void chain_reply(struct smb_request *req)
                smb_panic("could not allocate smb_request");
        }
        init_smb_request(req2, (uint8 *)inbuf2,0, req->encrypted);
+       req2->chain_fsp = req->chain_fsp;
 
        /* process the request */
        switch_message(smb_com2, req2, new_size);
index b6f748da33b784b9fb4f7c0cf668c0db8ef8ee8a..3aa46525088bb019b4b2c82b88ceccbbf0faf314 100644 (file)
@@ -45,7 +45,7 @@
  * Declare here, define at end: reduces likely "include" interaction problems.
  *     David Lee <T.D.Lee@durham.ac.uk>
  */
-bool disk_quotas_vxfs(const char *name, char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
+bool disk_quotas_vxfs(const char *name, char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize);
 
 #endif /* VXFS_QUOTA */
 
@@ -63,13 +63,13 @@ bool disk_quotas_vxfs(const char *name, char *path, SMB_BIG_UINT *bsize, SMB_BIG
 #include "samba_linux_quota.h"
 
 typedef struct _LINUX_SMB_DISK_QUOTA {
-       SMB_BIG_UINT bsize;
-       SMB_BIG_UINT hardlimit; /* In bsize units. */
-       SMB_BIG_UINT softlimit; /* In bsize units. */
-       SMB_BIG_UINT curblocks; /* In bsize units. */
-       SMB_BIG_UINT ihardlimit; /* inode hard limit. */
-       SMB_BIG_UINT isoftlimit; /* inode soft limit. */
-       SMB_BIG_UINT curinodes; /* Current used inodes. */
+       uint64_t bsize;
+       uint64_t hardlimit; /* In bsize units. */
+       uint64_t softlimit; /* In bsize units. */
+       uint64_t curblocks; /* In bsize units. */
+       uint64_t ihardlimit; /* inode hard limit. */
+       uint64_t isoftlimit; /* inode soft limit. */
+       uint64_t curinodes; /* Current used inodes. */
 } LINUX_SMB_DISK_QUOTA;
 
 
@@ -95,13 +95,13 @@ static int get_smb_linux_xfs_quota(char *path, uid_t euser_id, gid_t egrp_id, LI
        if (ret)
                return ret;
 
-       dp->bsize = (SMB_BIG_UINT)512;
-       dp->softlimit = (SMB_BIG_UINT)D.d_blk_softlimit;
-       dp->hardlimit = (SMB_BIG_UINT)D.d_blk_hardlimit;
-       dp->ihardlimit = (SMB_BIG_UINT)D.d_ino_hardlimit;
-       dp->isoftlimit = (SMB_BIG_UINT)D.d_ino_softlimit;
-       dp->curinodes = (SMB_BIG_UINT)D.d_icount;
-       dp->curblocks = (SMB_BIG_UINT)D.d_bcount;
+       dp->bsize = (uint64_t)512;
+       dp->softlimit = (uint64_t)D.d_blk_softlimit;
+       dp->hardlimit = (uint64_t)D.d_blk_hardlimit;
+       dp->ihardlimit = (uint64_t)D.d_ino_hardlimit;
+       dp->isoftlimit = (uint64_t)D.d_ino_softlimit;
+       dp->curinodes = (uint64_t)D.d_icount;
+       dp->curblocks = (uint64_t)D.d_bcount;
 
        return ret;
 }
@@ -134,13 +134,13 @@ static int get_smb_linux_v1_quota(char *path, uid_t euser_id, gid_t egrp_id, LIN
        if (ret && errno != EDQUOT)
                return ret;
 
-       dp->bsize = (SMB_BIG_UINT)QUOTABLOCK_SIZE;
-       dp->softlimit = (SMB_BIG_UINT)D.dqb_bsoftlimit;
-       dp->hardlimit = (SMB_BIG_UINT)D.dqb_bhardlimit;
-       dp->ihardlimit = (SMB_BIG_UINT)D.dqb_ihardlimit;
-       dp->isoftlimit = (SMB_BIG_UINT)D.dqb_isoftlimit;
-       dp->curinodes = (SMB_BIG_UINT)D.dqb_curinodes;
-       dp->curblocks = (SMB_BIG_UINT)D.dqb_curblocks;
+       dp->bsize = (uint64_t)QUOTABLOCK_SIZE;
+       dp->softlimit = (uint64_t)D.dqb_bsoftlimit;
+       dp->hardlimit = (uint64_t)D.dqb_bhardlimit;
+       dp->ihardlimit = (uint64_t)D.dqb_ihardlimit;
+       dp->isoftlimit = (uint64_t)D.dqb_isoftlimit;
+       dp->curinodes = (uint64_t)D.dqb_curinodes;
+       dp->curblocks = (uint64_t)D.dqb_curblocks;
 
        return ret;
 }
@@ -160,13 +160,13 @@ static int get_smb_linux_v2_quota(char *path, uid_t euser_id, gid_t egrp_id, LIN
        if (ret && errno != EDQUOT)
                return ret;
 
-       dp->bsize = (SMB_BIG_UINT)QUOTABLOCK_SIZE;
-       dp->softlimit = (SMB_BIG_UINT)D.dqb_bsoftlimit;
-       dp->hardlimit = (SMB_BIG_UINT)D.dqb_bhardlimit;
-       dp->ihardlimit = (SMB_BIG_UINT)D.dqb_ihardlimit;
-       dp->isoftlimit = (SMB_BIG_UINT)D.dqb_isoftlimit;
-       dp->curinodes = (SMB_BIG_UINT)D.dqb_curinodes;
-       dp->curblocks = ((SMB_BIG_UINT)D.dqb_curspace) / dp->bsize;
+       dp->bsize = (uint64_t)QUOTABLOCK_SIZE;
+       dp->softlimit = (uint64_t)D.dqb_bsoftlimit;
+       dp->hardlimit = (uint64_t)D.dqb_bhardlimit;
+       dp->ihardlimit = (uint64_t)D.dqb_ihardlimit;
+       dp->isoftlimit = (uint64_t)D.dqb_isoftlimit;
+       dp->curinodes = (uint64_t)D.dqb_curinodes;
+       dp->curblocks = ((uint64_t)D.dqb_curspace) / dp->bsize;
 
        return ret;
 }
@@ -190,13 +190,13 @@ static int get_smb_linux_gen_quota(char *path, uid_t euser_id, gid_t egrp_id, LI
        if (ret && errno != EDQUOT)
                return ret;
 
-       dp->bsize = (SMB_BIG_UINT)QUOTABLOCK_SIZE;
-       dp->softlimit = (SMB_BIG_UINT)D.dqb_bsoftlimit;
-       dp->hardlimit = (SMB_BIG_UINT)D.dqb_bhardlimit;
-       dp->ihardlimit = (SMB_BIG_UINT)D.dqb_ihardlimit;
-       dp->isoftlimit = (SMB_BIG_UINT)D.dqb_isoftlimit;
-       dp->curinodes = (SMB_BIG_UINT)D.dqb_curinodes;
-       dp->curblocks = ((SMB_BIG_UINT)D.dqb_curspace) / dp->bsize;
+       dp->bsize = (uint64_t)QUOTABLOCK_SIZE;
+       dp->softlimit = (uint64_t)D.dqb_bsoftlimit;
+       dp->hardlimit = (uint64_t)D.dqb_bhardlimit;
+       dp->ihardlimit = (uint64_t)D.dqb_ihardlimit;
+       dp->isoftlimit = (uint64_t)D.dqb_isoftlimit;
+       dp->curinodes = (uint64_t)D.dqb_curinodes;
+       dp->curblocks = ((uint64_t)D.dqb_curspace) / dp->bsize;
 
        return ret;
 }
@@ -205,7 +205,7 @@ static int get_smb_linux_gen_quota(char *path, uid_t euser_id, gid_t egrp_id, LI
  Try to get the disk space from disk quotas (LINUX version).
 ****************************************************************************/
 
-bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize)
 {
        int r;
        SMB_STRUCT_STAT S;
@@ -306,7 +306,7 @@ bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB
 try to get the disk space from disk quotas (CRAY VERSION)
 ****************************************************************************/
 
-bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize)
 {
        struct mntent *mnt;
        FILE *fd;
@@ -454,7 +454,7 @@ static int my_xdr_getquota_rslt(XDR *xdrsp, struct getquota_rslt *gqr)
 }
 
 /* Restricted to SUNOS5 for the moment, I haven`t access to others to test. */
-static bool nfs_quotas(char *nfspath, uid_t euser_id, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+static bool nfs_quotas(char *nfspath, uid_t euser_id, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize)
 {
        uid_t uid = euser_id;
        struct dqblk D;
@@ -468,7 +468,7 @@ static bool nfs_quotas(char *nfspath, uid_t euser_id, SMB_BIG_UINT *bsize, SMB_B
        enum clnt_stat clnt_stat;
        bool ret = True;
 
-       *bsize = *dfree = *dsize = (SMB_BIG_UINT)0;
+       *bsize = *dfree = *dsize = (uint64_t)0;
 
        len=strcspn(mnttype, ":");
        pathname=strstr(mnttype, ":");
@@ -575,9 +575,9 @@ Quota code by Peter Urbanec (amiga@cse.unsw.edu.au).
 ****************************************************************************/
 
 bool disk_quotas(const char *path,
-               SMB_BIG_UINT *bsize,
-               SMB_BIG_UINT *dfree,
-               SMB_BIG_UINT *dsize)
+               uint64_t *bsize,
+               uint64_t *dfree,
+               uint64_t *dsize)
 {
        uid_t euser_id;
        int ret;
@@ -750,7 +750,7 @@ bool disk_quotas(const char *path,
 try to get the disk space from disk quotas - OSF1 version
 ****************************************************************************/
 
-bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize)
 {
   int r, save_errno;
   struct dqblk D;
@@ -816,7 +816,7 @@ try to get the disk space from disk quotas (IRIX 6.2 version)
 #include <sys/quota.h>
 #include <mntent.h>
 
-bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize)
 {
   uid_t euser_id;
   int r;
@@ -1009,7 +1009,7 @@ static int my_xdr_getquota_rslt(XDR *xdrsp, struct getquota_rslt *gqr)
 }
 
 /* Works on FreeBSD, too. :-) */
-static bool nfs_quotas(char *nfspath, uid_t euser_id, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+static bool nfs_quotas(char *nfspath, uid_t euser_id, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize)
 {
        uid_t uid = euser_id;
        struct dqblk D;
@@ -1023,7 +1023,7 @@ static bool nfs_quotas(char *nfspath, uid_t euser_id, SMB_BIG_UINT *bsize, SMB_B
        enum clnt_stat clnt_stat;
        bool ret = True;
 
-       *bsize = *dfree = *dsize = (SMB_BIG_UINT)0;
+       *bsize = *dfree = *dsize = (uint64_t)0;
 
        len=strcspn(mnttype, ":");
        pathname=strstr(mnttype, ":");
@@ -1134,7 +1134,7 @@ static bool nfs_quotas(char *nfspath, uid_t euser_id, SMB_BIG_UINT *bsize, SMB_B
 try to get the disk space from disk quotas - default version
 ****************************************************************************/
 
-bool disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize)
 {
   int r;
   struct dqblk D;
@@ -1353,7 +1353,7 @@ Hints for porting:
 #include <sys/fs/vx_aioctl.h>
 #include <sys/fs/vx_ioctl.h>
 
-bool disk_quotas_vxfs(const char *name, char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+bool disk_quotas_vxfs(const char *name, char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize)
 {
   uid_t user_id, euser_id;
   int ret;
@@ -1437,14 +1437,14 @@ bool disk_quotas_vxfs(const char *name, char *path, SMB_BIG_UINT *bsize, SMB_BIG
 
 #else /* WITH_QUOTAS */
 
-bool disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize)
+bool disk_quotas(const char *path,uint64_t *bsize,uint64_t *dfree,uint64_t *dsize)
 {
        (*bsize) = 512; /* This value should be ignored */
 
        /* And just to be sure we set some values that hopefully */
        /* will be larger that any possible real-world value     */
-       (*dfree) = (SMB_BIG_UINT)-1;
-       (*dsize) = (SMB_BIG_UINT)-1;
+       (*dfree) = (uint64_t)-1;
+       (*dsize) = (uint64_t)-1;
 
        /* As we have select not to use quotas, allways fail */
        return false;
@@ -1455,7 +1455,7 @@ bool disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BI
 /* wrapper to the new sys_quota interface
    this file should be removed later
    */
-bool disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize)
+bool disk_quotas(const char *path,uint64_t *bsize,uint64_t *dfree,uint64_t *dsize)
 {
        int r;
        SMB_DISK_QUOTA D;
index 48403073f73222f5750abe3c141e5ba7f67aa59b..9ccfaa7bcbfda94e505576e7795a0024d74e948a 100644 (file)
@@ -825,8 +825,8 @@ void reply_ioctl(struct smb_request *req)
        switch (ioctl_code) {
                case IOCTL_QUERY_JOB_INFO:                  
                {
-                       files_struct *fsp = file_fsp(SVAL(req->inbuf,
-                                                         smb_vwv0));
+                       files_struct *fsp = file_fsp(
+                               req, SVAL(req->inbuf, smb_vwv0));
                        if (!fsp) {
                                reply_doserror(req, ERRDOS, ERRbadfid);
                                END_PROFILE(SMBioctl);
@@ -1178,10 +1178,10 @@ void reply_setatr(struct smb_request *req)
 void reply_dskattr(struct smb_request *req)
 {
        connection_struct *conn = req->conn;
-       SMB_BIG_UINT dfree,dsize,bsize;
+       uint64_t dfree,dsize,bsize;
        START_PROFILE(SMBdskattr);
 
-       if (get_dfree_info(conn,".",True,&bsize,&dfree,&dsize) == (SMB_BIG_UINT)-1) {
+       if (get_dfree_info(conn,".",True,&bsize,&dfree,&dsize) == (uint64_t)-1) {
                reply_unixerror(req, ERRHRD, ERRgeneral);
                END_PROFILE(SMBdskattr);
                return;
@@ -1200,8 +1200,8 @@ void reply_dskattr(struct smb_request *req)
                total_space = dsize * (double)bsize;
                free_space = dfree * (double)bsize;
 
-               dsize = (SMB_BIG_UINT)((total_space+63*512) / (64*512));
-               dfree = (SMB_BIG_UINT)((free_space+63*512) / (64*512));
+               dsize = (uint64_t)((total_space+63*512) / (64*512));
+               dfree = (uint64_t)((free_space+63*512) / (64*512));
                
                if (dsize > 0xFFFF) dsize = 0xFFFF;
                if (dfree > 0xFFFF) dfree = 0xFFFF;
@@ -1687,7 +1687,7 @@ void reply_open(struct smb_request *req)
 
        if (fattr & aDIR) {
                DEBUG(3,("attempt to open a directory %s\n",fsp->fsp_name));
-               close_file(fsp,ERROR_CLOSE);
+               close_file(req, fsp, ERROR_CLOSE);
                reply_doserror(req, ERRDOS,ERRnoaccess);
                END_PROFILE(SMBopen);
                return;
@@ -1744,7 +1744,7 @@ void reply_open_and_X(struct smb_request *req)
        int smb_action = 0;
        files_struct *fsp;
        NTSTATUS status;
-       SMB_BIG_UINT allocation_size;
+       uint64_t allocation_size;
        ssize_t retval = -1;
        uint32 access_mask;
        uint32 share_mode;
@@ -1767,7 +1767,7 @@ void reply_open_and_X(struct smb_request *req)
        core_oplock_request = CORE_OPLOCK_REQUEST(req->inbuf);
        oplock_request = ex_oplock_request | core_oplock_request;
        smb_ofun = SVAL(req->inbuf,smb_vwv8);
-       allocation_size = (SMB_BIG_UINT)IVAL(req->inbuf,smb_vwv9);
+       allocation_size = (uint64_t)IVAL(req->inbuf,smb_vwv9);
 
        /* If it's an IPC, pass off the pipe handler. */
        if (IS_IPC(conn)) {
@@ -1830,14 +1830,14 @@ void reply_open_and_X(struct smb_request *req)
        if (((smb_action == FILE_WAS_CREATED) || (smb_action == FILE_WAS_OVERWRITTEN)) && allocation_size) {
                fsp->initial_allocation_size = smb_roundup(fsp->conn, allocation_size);
                if (vfs_allocate_file_space(fsp, fsp->initial_allocation_size) == -1) {
-                       close_file(fsp,ERROR_CLOSE);
+                       close_file(req, fsp, ERROR_CLOSE);
                        reply_nterror(req, NT_STATUS_DISK_FULL);
                        END_PROFILE(SMBopenX);
                        return;
                }
                retval = vfs_set_filelen(fsp, (SMB_OFF_T)allocation_size);
                if (retval < 0) {
-                       close_file(fsp,ERROR_CLOSE);
+                       close_file(req, fsp, ERROR_CLOSE);
                        reply_nterror(req, NT_STATUS_DISK_FULL);
                        END_PROFILE(SMBopenX);
                        return;
@@ -1848,7 +1848,7 @@ void reply_open_and_X(struct smb_request *req)
        fattr = dos_mode(conn,fsp->fsp_name,&sbuf);
        mtime = sbuf.st_mtime;
        if (fattr & aDIR) {
-               close_file(fsp,ERROR_CLOSE);
+               close_file(req, fsp, ERROR_CLOSE);
                reply_doserror(req, ERRDOS, ERRnoaccess);
                END_PROFILE(SMBopenX);
                return;
@@ -2363,11 +2363,11 @@ static NTSTATUS do_unlink(connection_struct *conn,
 
        /* The set is across all open files on this dev/inode pair. */
        if (!set_delete_on_close(fsp, True, &conn->server_info->utok)) {
-               close_file(fsp, NORMAL_CLOSE);
+               close_file(req, fsp, NORMAL_CLOSE);
                return NT_STATUS_ACCESS_DENIED;
        }
 
-       return close_file(fsp,NORMAL_CLOSE);
+       return close_file(req, fsp, NORMAL_CLOSE);
 }
 
 /****************************************************************************
@@ -2808,7 +2808,7 @@ void reply_readbraw(struct smb_request *req)
         * return a zero length response here.
         */
 
-       fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+       fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
 
        /*
         * We have to do a check_fsp by hand here, as
@@ -2887,8 +2887,8 @@ void reply_readbraw(struct smb_request *req)
        maxcount = MIN(65535,maxcount);
 
        if (is_locked(fsp,(uint32)req->smbpid,
-                       (SMB_BIG_UINT)maxcount,
-                       (SMB_BIG_UINT)startpos,
+                       (uint64_t)maxcount,
+                       (uint64_t)startpos,
                        READ_LOCK)) {
                reply_readbraw_error();
                END_PROFILE(SMBreadbraw);
@@ -2950,7 +2950,7 @@ void reply_lockread(struct smb_request *req)
                return;
        }
 
-       fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+       fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
 
        if (!check_fsp(conn, req, fsp)) {
                END_PROFILE(SMBlockread);
@@ -2985,8 +2985,8 @@ void reply_lockread(struct smb_request *req)
        br_lck = do_lock(smbd_messaging_context(),
                        fsp,
                        req->smbpid,
-                       (SMB_BIG_UINT)numtoread,
-                       (SMB_BIG_UINT)startpos,
+                       (uint64_t)numtoread,
+                       (uint64_t)startpos,
                        WRITE_LOCK,
                        WINDOWS_LOCK,
                        False, /* Non-blocking lock. */
@@ -3058,7 +3058,7 @@ void reply_read(struct smb_request *req)
                return;
        }
 
-       fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+       fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
 
        if (!check_fsp(conn, req, fsp)) {
                END_PROFILE(SMBread);
@@ -3090,8 +3090,8 @@ Returning short read of maximum allowed for compatibility with Windows 2000.\n",
 
        data = smb_buf(req->outbuf) + 3;
   
-       if (is_locked(fsp, (uint32)req->smbpid, (SMB_BIG_UINT)numtoread,
-                     (SMB_BIG_UINT)startpos, READ_LOCK)) {
+       if (is_locked(fsp, (uint32)req->smbpid, (uint64_t)numtoread,
+                     (uint64_t)startpos, READ_LOCK)) {
                reply_doserror(req, ERRDOS,ERRlock);
                END_PROFILE(SMBread);
                return;
@@ -3302,7 +3302,7 @@ void reply_read_and_X(struct smb_request *req)
                return;
        }
 
-       fsp = file_fsp(SVAL(req->inbuf,smb_vwv2));
+       fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv2));
        startpos = IVAL_TO_SMB_OFF_T(req->inbuf,smb_vwv3);
        smb_maxcnt = SVAL(req->inbuf,smb_vwv5);
 
@@ -3377,8 +3377,8 @@ void reply_read_and_X(struct smb_request *req)
 
        }
 
-       if (is_locked(fsp, (uint32)req->smbpid, (SMB_BIG_UINT)smb_maxcnt,
-                     (SMB_BIG_UINT)startpos, READ_LOCK)) {
+       if (is_locked(fsp, (uint32)req->smbpid, (uint64_t)smb_maxcnt,
+                     (uint64_t)startpos, READ_LOCK)) {
                END_PROFILE(SMBreadX);
                reply_doserror(req, ERRDOS, ERRlock);
                return;
@@ -3450,7 +3450,7 @@ void reply_writebraw(struct smb_request *req)
                return;
        }
 
-       fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+       fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
        if (!check_fsp(conn, req, fsp)) {
                error_to_writebrawerr(req);
                END_PROFILE(SMBwritebraw);
@@ -3487,8 +3487,8 @@ void reply_writebraw(struct smb_request *req)
                return;
        }
 
-       if (is_locked(fsp,(uint32)req->smbpid,(SMB_BIG_UINT)tcount,
-                               (SMB_BIG_UINT)startpos, WRITE_LOCK)) {
+       if (is_locked(fsp,(uint32)req->smbpid,(uint64_t)tcount,
+                               (uint64_t)startpos, WRITE_LOCK)) {
                reply_doserror(req, ERRDOS, ERRlock);
                error_to_writebrawerr(req);
                END_PROFILE(SMBwritebraw);
@@ -3655,7 +3655,7 @@ void reply_writeunlock(struct smb_request *req)
                return;
        }
        
-       fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+       fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
 
        if (!check_fsp(conn, req, fsp)) {
                END_PROFILE(SMBwriteunlock);
@@ -3673,8 +3673,8 @@ void reply_writeunlock(struct smb_request *req)
        data = smb_buf(req->inbuf) + 3;
   
        if (numtowrite
-           && is_locked(fsp, (uint32)req->smbpid, (SMB_BIG_UINT)numtowrite,
-                        (SMB_BIG_UINT)startpos, WRITE_LOCK)) {
+           && is_locked(fsp, (uint32)req->smbpid, (uint64_t)numtowrite,
+                        (uint64_t)startpos, WRITE_LOCK)) {
                reply_doserror(req, ERRDOS, ERRlock);
                END_PROFILE(SMBwriteunlock);
                return;
@@ -3708,8 +3708,8 @@ void reply_writeunlock(struct smb_request *req)
                status = do_unlock(smbd_messaging_context(),
                                fsp,
                                req->smbpid,
-                               (SMB_BIG_UINT)numtowrite, 
-                               (SMB_BIG_UINT)startpos,
+                               (uint64_t)numtowrite, 
+                               (uint64_t)startpos,
                                WINDOWS_LOCK);
 
                if (NT_STATUS_V(status)) {
@@ -3762,7 +3762,7 @@ void reply_write(struct smb_request *req)
                return;
        }
 
-       fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+       fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
 
        if (!check_fsp(conn, req, fsp)) {
                END_PROFILE(SMBwrite);
@@ -3779,8 +3779,8 @@ void reply_write(struct smb_request *req)
        startpos = IVAL_TO_SMB_OFF_T(req->inbuf,smb_vwv2);
        data = smb_buf(req->inbuf) + 3;
   
-       if (is_locked(fsp, (uint32)req->smbpid, (SMB_BIG_UINT)numtowrite,
-                     (SMB_BIG_UINT)startpos, WRITE_LOCK)) {
+       if (is_locked(fsp, (uint32)req->smbpid, (uint64_t)numtowrite,
+                     (uint64_t)startpos, WRITE_LOCK)) {
                reply_doserror(req, ERRDOS, ERRlock);
                END_PROFILE(SMBwrite);
                return;
@@ -3992,7 +3992,7 @@ void reply_write_and_X(struct smb_request *req)
                return;
        }
 
-       fsp = file_fsp(SVAL(req->inbuf,smb_vwv2));
+       fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv2));
        startpos = IVAL_TO_SMB_OFF_T(req->inbuf,smb_vwv3);
        write_through = BITSETW(req->inbuf+smb_vwv7,0);
 
@@ -4035,8 +4035,8 @@ void reply_write_and_X(struct smb_request *req)
        }
 
        if (is_locked(fsp,(uint32)req->smbpid,
-                     (SMB_BIG_UINT)numtowrite,
-                     (SMB_BIG_UINT)startpos, WRITE_LOCK)) {
+                     (uint64_t)numtowrite,
+                     (uint64_t)startpos, WRITE_LOCK)) {
                reply_doserror(req, ERRDOS, ERRlock);
                END_PROFILE(SMBwriteX);
                return;
@@ -4113,7 +4113,7 @@ void reply_lseek(struct smb_request *req)
                return;
        }
 
-       fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+       fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
 
        if (!check_fsp(conn, req, fsp)) {
                return;
@@ -4199,7 +4199,7 @@ void reply_flush(struct smb_request *req)
        }
 
        fnum = SVAL(req->inbuf,smb_vwv0);
-       fsp = file_fsp(fnum);
+       fsp = file_fsp(req, fnum);
 
        if ((fnum != 0xFFFF) && !check_fsp(conn, req, fsp)) {
                return;
@@ -4261,14 +4261,7 @@ void reply_close(struct smb_request *req)
                return;
        }
 
-       /* If it's an IPC, pass off to the pipe handler. */
-       if (IS_IPC(conn)) {
-               reply_pipe_close(conn, req);
-               END_PROFILE(SMBclose);
-               return;
-       }
-
-       fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+       fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
 
        /*
         * We can only use check_fsp if we know it's not a directory.
@@ -4285,7 +4278,7 @@ void reply_close(struct smb_request *req)
                 * Special case - close NT SMB directory handle.
                 */
                DEBUG(3,("close directory fnum=%d\n", fsp->fnum));
-               status = close_file(fsp,NORMAL_CLOSE);
+               status = close_file(req, fsp, NORMAL_CLOSE);
        } else {
                time_t t;
                /*
@@ -4309,7 +4302,7 @@ void reply_close(struct smb_request *req)
                 * a disk full error. If not then it was probably an I/O error.
                 */
  
-               status = close_file(fsp,NORMAL_CLOSE);
+               status = close_file(req, fsp, NORMAL_CLOSE);
        }  
 
        if (!NT_STATUS_IS_OK(status)) {
@@ -4346,7 +4339,7 @@ void reply_writeclose(struct smb_request *req)
                return;
        }
 
-       fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+       fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
 
        if (!check_fsp(conn, req, fsp)) {
                END_PROFILE(SMBwriteclose);
@@ -4365,8 +4358,8 @@ void reply_writeclose(struct smb_request *req)
        data = smb_buf(req->inbuf) + 1;
   
        if (numtowrite
-           && is_locked(fsp, (uint32)req->smbpid, (SMB_BIG_UINT)numtowrite,
-                        (SMB_BIG_UINT)startpos, WRITE_LOCK)) {
+           && is_locked(fsp, (uint32)req->smbpid, (uint64_t)numtowrite,
+                        (uint64_t)startpos, WRITE_LOCK)) {
                reply_doserror(req, ERRDOS,ERRlock);
                END_PROFILE(SMBwriteclose);
                return;
@@ -4384,7 +4377,7 @@ void reply_writeclose(struct smb_request *req)
        if (numtowrite) {
                DEBUG(3,("reply_writeclose: zero length write doesn't close file %s\n",
                        fsp->fsp_name ));
-               close_status = close_file(fsp,NORMAL_CLOSE);
+               close_status = close_file(req, fsp, NORMAL_CLOSE);
        }
 
        DEBUG(3,("writeclose fnum=%d num=%d wrote=%d (numopen=%d)\n",
@@ -4420,7 +4413,7 @@ void reply_writeclose(struct smb_request *req)
 void reply_lock(struct smb_request *req)
 {
        connection_struct *conn = req->conn;
-       SMB_BIG_UINT count,offset;
+       uint64_t count,offset;
        NTSTATUS status;
        files_struct *fsp;
        struct byte_range_lock *br_lck = NULL;
@@ -4433,7 +4426,7 @@ void reply_lock(struct smb_request *req)
                return;
        }
 
-       fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+       fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
 
        if (!check_fsp(conn, req, fsp)) {
                END_PROFILE(SMBlock);
@@ -4442,8 +4435,8 @@ void reply_lock(struct smb_request *req)
 
        release_level_2_oplocks_on_change(fsp);
 
-       count = (SMB_BIG_UINT)IVAL(req->inbuf,smb_vwv1);
-       offset = (SMB_BIG_UINT)IVAL(req->inbuf,smb_vwv3);
+       count = (uint64_t)IVAL(req->inbuf,smb_vwv1);
+       offset = (uint64_t)IVAL(req->inbuf,smb_vwv3);
 
        DEBUG(3,("lock fd=%d fnum=%d offset=%.0f count=%.0f\n",
                 fsp->fh->fd, fsp->fnum, (double)offset, (double)count));
@@ -4480,7 +4473,7 @@ void reply_lock(struct smb_request *req)
 void reply_unlock(struct smb_request *req)
 {
        connection_struct *conn = req->conn;
-       SMB_BIG_UINT count,offset;
+       uint64_t count,offset;
        NTSTATUS status;
        files_struct *fsp;
 
@@ -4492,15 +4485,15 @@ void reply_unlock(struct smb_request *req)
                return;
        }
 
-       fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+       fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
 
        if (!check_fsp(conn, req, fsp)) {
                END_PROFILE(SMBunlock);
                return;
        }
        
-       count = (SMB_BIG_UINT)IVAL(req->inbuf,smb_vwv1);
-       offset = (SMB_BIG_UINT)IVAL(req->inbuf,smb_vwv3);
+       count = (uint64_t)IVAL(req->inbuf,smb_vwv1);
+       offset = (uint64_t)IVAL(req->inbuf,smb_vwv3);
        
        status = do_unlock(smbd_messaging_context(),
                        fsp,
@@ -4638,7 +4631,7 @@ void reply_printopen(struct smb_request *req)
        }
 
        /* Open for exclusive use, write only. */
-       status = print_fsp_open(conn, NULL, req->vuid, &fsp);
+       status = print_fsp_open(req, conn, NULL, req->vuid, &fsp);
 
        if (!NT_STATUS_IS_OK(status)) {
                reply_nterror(req, status);
@@ -4674,7 +4667,7 @@ void reply_printclose(struct smb_request *req)
                return;
        }
 
-       fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+       fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
 
        if (!check_fsp(conn, req, fsp)) {
                END_PROFILE(SMBsplclose);
@@ -4690,7 +4683,7 @@ void reply_printclose(struct smb_request *req)
        DEBUG(3,("printclose fd=%d fnum=%d\n",
                 fsp->fh->fd,fsp->fnum));
   
-       status = close_file(fsp,NORMAL_CLOSE);
+       status = close_file(req, fsp, NORMAL_CLOSE);
 
        if(!NT_STATUS_IS_OK(status)) {
                reply_nterror(req, status);
@@ -4816,7 +4809,7 @@ void reply_printwrite(struct smb_request *req)
                return;
        }
   
-       fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+       fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
 
        if (!check_fsp(conn, req, fsp)) {
                END_PROFILE(SMBsplwr);
@@ -5785,7 +5778,7 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx,
                                              last_component_dest,
                                              attrs, replace_if_exists);
 
-               close_file(fsp, NORMAL_CLOSE);
+               close_file(req, fsp, NORMAL_CLOSE);
 
                DEBUG(3, ("rename_internals: Error %s rename %s -> %s\n",
                          nt_errstr(status), directory,newname));
@@ -5889,7 +5882,7 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx,
                status = rename_internals_fsp(conn, fsp, destname, dname,
                                              attrs, replace_if_exists);
 
-               close_file(fsp, NORMAL_CLOSE);
+               close_file(req, fsp, NORMAL_CLOSE);
 
                if (!NT_STATUS_IS_OK(status)) {
                        DEBUG(3, ("rename_internals_fsp returned %s for "
@@ -6104,7 +6097,7 @@ NTSTATUS copy_file(TALLOC_CTX *ctx,
        TALLOC_FREE(dest);
 
        if (!NT_STATUS_IS_OK(status)) {
-               close_file(fsp1,ERROR_CLOSE);
+               close_file(NULL, fsp1, ERROR_CLOSE);
                return status;
        }
 
@@ -6123,7 +6116,7 @@ NTSTATUS copy_file(TALLOC_CTX *ctx,
                ret = vfs_transfer_file(fsp1, fsp2, src_sbuf.st_size);
        }
 
-       close_file(fsp1,NORMAL_CLOSE);
+       close_file(NULL, fsp1, NORMAL_CLOSE);
 
        /* Ensure the modtime is set correctly on the destination file. */
        set_close_write_time(fsp2, get_mtimespec(&src_sbuf));
@@ -6134,7 +6127,7 @@ NTSTATUS copy_file(TALLOC_CTX *ctx,
         * Thus we don't look at the error return from the
         * close of fsp1.
         */
-       status = close_file(fsp2,NORMAL_CLOSE);
+       status = close_file(NULL, fsp2, NORMAL_CLOSE);
 
        if (!NT_STATUS_IS_OK(status)) {
                return status;
@@ -6498,17 +6491,17 @@ uint32 get_lock_pid( char *data, int data_offset, bool large_file_format)
  Get a lock count, dealing with large count requests.
 ****************************************************************************/
 
-SMB_BIG_UINT get_lock_count( char *data, int data_offset, bool large_file_format)
+uint64_t get_lock_count( char *data, int data_offset, bool large_file_format)
 {
-       SMB_BIG_UINT count = 0;
+       uint64_t count = 0;
 
        if(!large_file_format) {
-               count = (SMB_BIG_UINT)IVAL(data,SMB_LKLEN_OFFSET(data_offset));
+               count = (uint64_t)IVAL(data,SMB_LKLEN_OFFSET(data_offset));
        } else {
 
 #if defined(HAVE_LONGLONG)
-               count = (((SMB_BIG_UINT) IVAL(data,SMB_LARGE_LKLEN_OFFSET_HIGH(data_offset))) << 32) |
-                       ((SMB_BIG_UINT) IVAL(data,SMB_LARGE_LKLEN_OFFSET_LOW(data_offset)));
+               count = (((uint64_t) IVAL(data,SMB_LARGE_LKLEN_OFFSET_HIGH(data_offset))) << 32) |
+                       ((uint64_t) IVAL(data,SMB_LARGE_LKLEN_OFFSET_LOW(data_offset)));
 #else /* HAVE_LONGLONG */
 
                /*
@@ -6525,7 +6518,7 @@ SMB_BIG_UINT get_lock_count( char *data, int data_offset, bool large_file_format
                                SIVAL(data,SMB_LARGE_LKLEN_OFFSET_HIGH(data_offset),0);
                }
 
-               count = (SMB_BIG_UINT)IVAL(data,SMB_LARGE_LKLEN_OFFSET_LOW(data_offset));
+               count = (uint64_t)IVAL(data,SMB_LARGE_LKLEN_OFFSET_LOW(data_offset));
 #endif /* HAVE_LONGLONG */
        }
 
@@ -6570,19 +6563,19 @@ static uint32 map_lock_offset(uint32 high, uint32 low)
  Get a lock offset, dealing with large offset requests.
 ****************************************************************************/
 
-SMB_BIG_UINT get_lock_offset( char *data, int data_offset, bool large_file_format, bool *err)
+uint64_t get_lock_offset( char *data, int data_offset, bool large_file_format, bool *err)
 {
-       SMB_BIG_UINT offset = 0;
+       uint64_t offset = 0;
 
        *err = False;
 
        if(!large_file_format) {
-               offset = (SMB_BIG_UINT)IVAL(data,SMB_LKOFF_OFFSET(data_offset));
+               offset = (uint64_t)IVAL(data,SMB_LKOFF_OFFSET(data_offset));
        } else {
 
 #if defined(HAVE_LONGLONG)
-               offset = (((SMB_BIG_UINT) IVAL(data,SMB_LARGE_LKOFF_OFFSET_HIGH(data_offset))) << 32) |
-                               ((SMB_BIG_UINT) IVAL(data,SMB_LARGE_LKOFF_OFFSET_LOW(data_offset)));
+               offset = (((uint64_t) IVAL(data,SMB_LARGE_LKOFF_OFFSET_HIGH(data_offset))) << 32) |
+                               ((uint64_t) IVAL(data,SMB_LARGE_LKOFF_OFFSET_LOW(data_offset)));
 #else /* HAVE_LONGLONG */
 
                /*
@@ -6599,7 +6592,7 @@ SMB_BIG_UINT get_lock_offset( char *data, int data_offset, bool large_file_forma
 
                        if((new_low = map_lock_offset(high, low)) == 0) {
                                *err = True;
-                               return (SMB_BIG_UINT)-1;
+                               return (uint64_t)-1;
                        }
 
                        DEBUG(3,("get_lock_offset: truncating lock offset (high)0x%x (low)0x%x to offset 0x%x.\n",
@@ -6608,7 +6601,7 @@ SMB_BIG_UINT get_lock_offset( char *data, int data_offset, bool large_file_forma
                        SIVAL(data,SMB_LARGE_LKOFF_OFFSET_LOW(data_offset),new_low);
                }
 
-               offset = (SMB_BIG_UINT)IVAL(data,SMB_LARGE_LKOFF_OFFSET_LOW(data_offset));
+               offset = (uint64_t)IVAL(data,SMB_LARGE_LKOFF_OFFSET_LOW(data_offset));
 #endif /* HAVE_LONGLONG */
        }
 
@@ -6627,7 +6620,7 @@ void reply_lockingX(struct smb_request *req)
        unsigned char oplocklevel;
        uint16 num_ulocks;
        uint16 num_locks;
-       SMB_BIG_UINT count = 0, offset = 0;
+       uint64_t count = 0, offset = 0;
        uint32 lock_pid;
        int32 lock_timeout;
        int i;
@@ -6644,7 +6637,7 @@ void reply_lockingX(struct smb_request *req)
                return;
        }
        
-       fsp = file_fsp(SVAL(req->inbuf,smb_vwv2));
+       fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv2));
        locktype = CVAL(req->inbuf,smb_vwv3);
        oplocklevel = CVAL(req->inbuf,smb_vwv3+1);
        num_ulocks = SVAL(req->inbuf,smb_vwv6);
@@ -7020,7 +7013,7 @@ void reply_setattrE(struct smb_request *req)
                return;
        }
 
-       fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+       fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
 
        if(!fsp || (fsp->conn != conn)) {
                reply_doserror(req, ERRDOS, ERRbadfid);
@@ -7131,7 +7124,7 @@ void reply_getattrE(struct smb_request *req)
                return;
        }
 
-       fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+       fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
 
        if(!fsp || (fsp->conn != conn)) {
                reply_doserror(req, ERRDOS, ERRbadfid);
index e9dc46aa3cd6cc133a809592323ff8d2e71e9ff2..3822ee191ea5582e586ad55766de316cb38cad79 100644 (file)
@@ -426,9 +426,14 @@ static NTSTATUS srv_enc_spnego_gss_negotiate(unsigned char **ppdata, size_t *p_d
        data_blob_free(&auth_reply);
 
        SAFE_FREE(*ppdata);
-       *ppdata = response.data;
+       *ppdata = (unsigned char *)memdup(response.data, response.length);
+       if ((*ppdata) == NULL && response.length > 0) {
+               status = NT_STATUS_NO_MEMORY;
+       }
        *p_data_size = response.length;
 
+       data_blob_free(&response);
+
        return status;
 }
 #endif
@@ -463,8 +468,13 @@ static NTSTATUS srv_enc_ntlm_negotiate(unsigned char **ppdata, size_t *p_data_si
        }
 
        SAFE_FREE(*ppdata);
-       *ppdata = response.data;
+       *ppdata = (unsigned char *)memdup(response.data, response.length);
+       if ((*ppdata) == NULL && response.length > 0) {
+               status = NT_STATUS_NO_MEMORY;
+       }
        *p_data_size = response.length;
+       data_blob_free(&response);
+
        return status;
 }
 
@@ -585,8 +595,11 @@ static NTSTATUS srv_enc_spnego_ntlm_auth(connection_struct *conn,
        }
 
        SAFE_FREE(*ppdata);
-       *ppdata = response.data;
+       *ppdata = (unsigned char *)memdup(response.data, response.length);
+       if ((*ppdata) == NULL && response.length > 0)
+               return NT_STATUS_NO_MEMORY;
        *p_data_size = response.length;
+       data_blob_free(&response);
        return status;
 }
 
@@ -636,8 +649,11 @@ static NTSTATUS srv_enc_raw_ntlm_auth(connection_struct *conn,
 
        /* Return the raw blob. */
        SAFE_FREE(*ppdata);
-       *ppdata = response.data;
+       *ppdata = (unsigned char *)memdup(response.data, response.length);
+       if ((*ppdata) == NULL && response.length > 0)
+               return NT_STATUS_NO_MEMORY;
        *p_data_size = response.length;
+       data_blob_free(&response);
        return status;
 }
 
index 69a483e4fca894e97cf056d3b13093212a3e1bbf..4e81263ee4c30082486d21e96b6cfbed9eb0d8ba 100644 (file)
@@ -840,7 +840,7 @@ bool reload_services(bool test)
 
        if (lp_loaded()) {
                char *fname = lp_configfile();
-               if (file_exist(fname, NULL) &&
+               if (file_exist(fname) &&
                    !strcsequal(fname, get_dyn_CONFIGFILE())) {
                        set_dyn_CONFIGFILE(fname);
                        test = False;
@@ -888,7 +888,7 @@ bool reload_services(bool test)
 enum server_exit_reason { SERVER_EXIT_NORMAL, SERVER_EXIT_ABNORMAL };
 
 static void exit_server_common(enum server_exit_reason how,
-       const char *const reason) NORETURN_ATTRIBUTE;
+       const char *const reason) _NORETURN_;
 
 static void exit_server_common(enum server_exit_reason how,
        const char *const reason)
@@ -1319,7 +1319,7 @@ extern void build_options(bool screen);
                setpgid( (pid_t)0, (pid_t)0);
 #endif
 
-       if (!directory_exist(lp_lockdir(), NULL))
+       if (!directory_exist(lp_lockdir()))
                mkdir(lp_lockdir(), 0755);
 
        if (is_daemon)
index 0b851f1e481b71a3b743474ae65fedcd8c561d05..05197021a3242d1186e1a4e7f70f630c28261025 100644 (file)
@@ -1296,10 +1296,9 @@ connection_struct *make_connection(const char *service_in, DATA_BLOB password,
 
 void close_cnum(connection_struct *conn, uint16 vuid)
 {
-       if (IS_IPC(conn)) {
-               pipe_close_conn(conn);
-       } else {
-               file_close_conn(conn);
+       file_close_conn(conn);
+
+       if (!IS_IPC(conn)) {
                dptr_closecnum(conn);
        }
 
index 3b431a19be006ef7f5accb0ce4cf18e2a4d6afdd..8163eb30af63b4522767587d1ab50f6eef070d8b 100644 (file)
@@ -113,7 +113,10 @@ bool session_claim(user_struct *vuser)
                                break;
                        }
 
-                       sess_pid = ((struct sessionid *)rec->value.dptr)->pid;
+                       memcpy(&sess_pid,
+                              ((char *)rec->value.dptr)
+                              + offsetof(struct sessionid, pid),
+                              sizeof(sess_pid));
 
                        if (!process_exists(sess_pid)) {
                                DEBUG(5, ("%s has died -- re-using session\n",
index 0e9a2c2ebe0b316ad979a9a5a8317a06ce508694..ee33e13a48dd5341242ce9ef954936f8da8263c6 100644 (file)
@@ -118,7 +118,7 @@ static int darwin_statvfs(const char *path, vfs_statvfs_struct *statbuf)
        statbuf->UserBlocksAvail = sbuf.f_bavail;
        statbuf->TotalFileNodes = sbuf.f_files;
        statbuf->FreeFileNodes = sbuf.f_ffree;
-       statbuf->FsIdentifier = *(SMB_BIG_UINT *)(&sbuf.f_fsid); /* Ick. */
+       statbuf->FsIdentifier = *(uint64_t *)(&sbuf.f_fsid); /* Ick. */
        statbuf->FsCapabilities = darwin_fs_capabilities(sbuf.f_mntonname);
 
        return 0;
index 1e2095a3ea3550ad575029425371a1d2fbd6e9ba..1da45a8b58c8ca645a69e48727647737e7025820 100644 (file)
@@ -47,9 +47,9 @@ static char *store_file_unix_basic_info2(connection_struct *conn,
  Only do this for Windows clients.
 ********************************************************************/
 
-SMB_BIG_UINT smb_roundup(connection_struct *conn, SMB_BIG_UINT val)
+uint64_t smb_roundup(connection_struct *conn, uint64_t val)
 {
-       SMB_BIG_UINT rval = lp_allocation_roundup_size(SNUM(conn));
+       uint64_t rval = lp_allocation_roundup_size(SNUM(conn));
 
        /* Only roundup for Windows clients. */
        enum remote_arch_types ra_type = get_remote_arch();
@@ -64,18 +64,18 @@ SMB_BIG_UINT smb_roundup(connection_struct *conn, SMB_BIG_UINT val)
  account sparse files.
 ********************************************************************/
 
-SMB_BIG_UINT get_allocation_size(connection_struct *conn, files_struct *fsp, const SMB_STRUCT_STAT *sbuf)
+uint64_t get_allocation_size(connection_struct *conn, files_struct *fsp, const SMB_STRUCT_STAT *sbuf)
 {
-       SMB_BIG_UINT ret;
+       uint64_t ret;
 
        if(S_ISDIR(sbuf->st_mode)) {
                return 0;
        }
 
 #if defined(HAVE_STAT_ST_BLOCKS) && defined(STAT_ST_BLOCKSIZE)
-       ret = (SMB_BIG_UINT)STAT_ST_BLOCKSIZE * (SMB_BIG_UINT)sbuf->st_blocks;
+       ret = (uint64_t)STAT_ST_BLOCKSIZE * (uint64_t)sbuf->st_blocks;
 #else
-       ret = (SMB_BIG_UINT)get_file_size(*sbuf);
+       ret = (uint64_t)get_file_size(*sbuf);
 #endif
 
        if (fsp && fsp->initial_allocation_size)
@@ -1031,7 +1031,7 @@ static void call_trans2open(connection_struct *conn,
        mtime = sbuf.st_mtime;
        inode = sbuf.st_ino;
        if (fattr & aDIR) {
-               close_file(fsp,ERROR_CLOSE);
+               close_file(req, fsp, ERROR_CLOSE);
                reply_doserror(req, ERRDOS,ERRnoaccess);
                return;
        }
@@ -1264,7 +1264,7 @@ static bool get_lanman2_dir_entry(TALLOC_CTX *ctx,
        long prev_dirpos=0;
        uint32 mode=0;
        SMB_OFF_T file_size = 0;
-       SMB_BIG_UINT allocation_size = 0;
+       uint64_t allocation_size = 0;
        uint32 len;
        struct timespec mdate_ts, adate_ts, create_date_ts;
        time_t mdate = (time_t)0, adate = (time_t)0, create_date = (time_t)0;
@@ -2613,22 +2613,22 @@ static void call_trans2qfsinfo(connection_struct *conn,
        switch (info_level) {
                case SMB_INFO_ALLOCATION:
                {
-                       SMB_BIG_UINT dfree,dsize,bsize,block_size,sectors_per_unit,bytes_per_sector;
+                       uint64_t dfree,dsize,bsize,block_size,sectors_per_unit,bytes_per_sector;
                        data_len = 18;
-                       if (get_dfree_info(conn,".",False,&bsize,&dfree,&dsize) == (SMB_BIG_UINT)-1) {
+                       if (get_dfree_info(conn,".",False,&bsize,&dfree,&dsize) == (uint64_t)-1) {
                                reply_unixerror(req, ERRHRD, ERRgeneral);
                                return;
                        }
 
                        block_size = lp_block_size(snum);
                        if (bsize < block_size) {
-                               SMB_BIG_UINT factor = block_size/bsize;
+                               uint64_t factor = block_size/bsize;
                                bsize = block_size;
                                dsize /= factor;
                                dfree /= factor;
                        }
                        if (bsize > block_size) {
-                               SMB_BIG_UINT factor = bsize/block_size;
+                               uint64_t factor = bsize/block_size;
                                bsize = block_size;
                                dsize *= factor;
                                dfree *= factor;
@@ -2733,21 +2733,21 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)st.st_dev, (unsi
                case SMB_QUERY_FS_SIZE_INFO:
                case SMB_FS_SIZE_INFORMATION:
                {
-                       SMB_BIG_UINT dfree,dsize,bsize,block_size,sectors_per_unit,bytes_per_sector;
+                       uint64_t dfree,dsize,bsize,block_size,sectors_per_unit,bytes_per_sector;
                        data_len = 24;
-                       if (get_dfree_info(conn,".",False,&bsize,&dfree,&dsize) == (SMB_BIG_UINT)-1) {
+                       if (get_dfree_info(conn,".",False,&bsize,&dfree,&dsize) == (uint64_t)-1) {
                                reply_unixerror(req, ERRHRD, ERRgeneral);
                                return;
                        }
                        block_size = lp_block_size(snum);
                        if (bsize < block_size) {
-                               SMB_BIG_UINT factor = block_size/bsize;
+                               uint64_t factor = block_size/bsize;
                                bsize = block_size;
                                dsize /= factor;
                                dfree /= factor;
                        }
                        if (bsize > block_size) {
-                               SMB_BIG_UINT factor = bsize/block_size;
+                               uint64_t factor = bsize/block_size;
                                bsize = block_size;
                                dsize *= factor;
                                dfree *= factor;
@@ -2766,21 +2766,21 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
 
                case SMB_FS_FULL_SIZE_INFORMATION:
                {
-                       SMB_BIG_UINT dfree,dsize,bsize,block_size,sectors_per_unit,bytes_per_sector;
+                       uint64_t dfree,dsize,bsize,block_size,sectors_per_unit,bytes_per_sector;
                        data_len = 32;
-                       if (get_dfree_info(conn,".",False,&bsize,&dfree,&dsize) == (SMB_BIG_UINT)-1) {
+                       if (get_dfree_info(conn,".",False,&bsize,&dfree,&dsize) == (uint64_t)-1) {
                                reply_unixerror(req, ERRHRD, ERRgeneral);
                                return;
                        }
                        block_size = lp_block_size(snum);
                        if (bsize < block_size) {
-                               SMB_BIG_UINT factor = block_size/bsize;
+                               uint64_t factor = block_size/bsize;
                                bsize = block_size;
                                dsize /= factor;
                                dfree /= factor;
                        }
                        if (bsize > block_size) {
-                               SMB_BIG_UINT factor = bsize/block_size;
+                               uint64_t factor = bsize/block_size;
                                bsize = block_size;
                                dsize *= factor;
                                dfree *= factor;
@@ -2811,8 +2811,8 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
                 * what we have to send --metze:
                 *
                 * Unknown1:            24 NULL bytes
-                * Soft Quota Treshold: 8 bytes seems like SMB_BIG_UINT or so
-                * Hard Quota Limit:    8 bytes seems like SMB_BIG_UINT or so
+                * Soft Quota Treshold: 8 bytes seems like uint64_t or so
+                * Hard Quota Limit:    8 bytes seems like uint64_t or so
                 * Quota Flags:         2 byte :
                 * Unknown3:            6 NULL bytes
                 *
@@ -2860,9 +2860,9 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
                        DEBUG(10,("SMB_FS_QUOTA_INFORMATION: for service [%s]\n",lp_servicename(SNUM(conn))));          
                
                        /* Unknown1 24 NULL bytes*/
-                       SBIG_UINT(pdata,0,(SMB_BIG_UINT)0);
-                       SBIG_UINT(pdata,8,(SMB_BIG_UINT)0);
-                       SBIG_UINT(pdata,16,(SMB_BIG_UINT)0);
+                       SBIG_UINT(pdata,0,(uint64_t)0);
+                       SBIG_UINT(pdata,8,(uint64_t)0);
+                       SBIG_UINT(pdata,16,(uint64_t)0);
                
                        /* Default Soft Quota 8 bytes */
                        SBIG_UINT(pdata,24,quotas.softlim);
@@ -2935,7 +2935,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
                        /* We have POSIX ACLs, pathname, encryption, 
                         * large read/write, and locking capability. */
 
-                       SBIG_UINT(pdata,4,((SMB_BIG_UINT)(
+                       SBIG_UINT(pdata,4,((uint64_t)(
                                        CIFS_UNIX_POSIX_ACLS_CAP|
                                        CIFS_UNIX_POSIX_PATHNAMES_CAP|
                                        CIFS_UNIX_FCNTL_LOCKS_CAP|
@@ -3037,9 +3037,9 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
                        SIVAL(pdata, 0, flags);
                        SIVAL(pdata, 4, SMB_WHOAMI_MASK);
                        SBIG_UINT(pdata, 8,
-                                 (SMB_BIG_UINT)conn->server_info->utok.uid);
+                                 (uint64_t)conn->server_info->utok.uid);
                        SBIG_UINT(pdata, 16,
-                                 (SMB_BIG_UINT)conn->server_info->utok.gid);
+                                 (uint64_t)conn->server_info->utok.gid);
 
 
                        if (data_len >= max_data_bytes) {
@@ -3078,7 +3078,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
                        /* GID list */
                        for (i = 0; i < conn->server_info->utok.ngroups; ++i) {
                                SBIG_UINT(pdata, data_len,
-                                         (SMB_BIG_UINT)conn->server_info->utok.groups[i]);
+                                         (uint64_t)conn->server_info->utok.groups[i]);
                                data_len += 8;
                        }
 
@@ -3298,7 +3298,7 @@ cap_low = 0x%x, cap_high = 0x%x\n",
                                 * but we didn't use the last 6 bytes for now 
                                 * --metze 
                                 */
-                               fsp = file_fsp(SVAL(params,0));
+                               fsp = file_fsp(req, SVAL(params,0));
 
                                if (!check_fsp_ntquota_handle(conn, req,
                                                              fsp)) {
@@ -3319,10 +3319,10 @@ cap_low = 0x%x, cap_high = 0x%x\n",
                        
                                /* unknown_1 24 NULL bytes in pdata*/
                
-                               /* the soft quotas 8 bytes (SMB_BIG_UINT)*/
-                               quotas.softlim = (SMB_BIG_UINT)IVAL(pdata,24);
+                               /* the soft quotas 8 bytes (uint64_t)*/
+                               quotas.softlim = (uint64_t)IVAL(pdata,24);
 #ifdef LARGE_SMB_OFF_T
-                               quotas.softlim |= (((SMB_BIG_UINT)IVAL(pdata,28)) << 32);
+                               quotas.softlim |= (((uint64_t)IVAL(pdata,28)) << 32);
 #else /* LARGE_SMB_OFF_T */
                                if ((IVAL(pdata,28) != 0)&&
                                        ((quotas.softlim != 0xFFFFFFFF)||
@@ -3335,10 +3335,10 @@ cap_low = 0x%x, cap_high = 0x%x\n",
                                }
 #endif /* LARGE_SMB_OFF_T */
                
-                               /* the hard quotas 8 bytes (SMB_BIG_UINT)*/
-                               quotas.hardlim = (SMB_BIG_UINT)IVAL(pdata,32);
+                               /* the hard quotas 8 bytes (uint64_t)*/
+                               quotas.hardlim = (uint64_t)IVAL(pdata,32);
 #ifdef LARGE_SMB_OFF_T
-                               quotas.hardlim |= (((SMB_BIG_UINT)IVAL(pdata,36)) << 32);
+                               quotas.hardlim |= (((uint64_t)IVAL(pdata,36)) << 32);
 #else /* LARGE_SMB_OFF_T */
                                if ((IVAL(pdata,36) != 0)&&
                                        ((quotas.hardlim != 0xFFFFFFFF)||
@@ -3754,7 +3754,7 @@ static void call_trans2qpipeinfo(connection_struct *conn,
        unsigned int data_size = 0;
        unsigned int param_size = 2;
        uint16 info_level;
-       smb_np_struct *p_pipe = NULL;
+       files_struct *fsp;
 
        if (!params) {
                reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
@@ -3766,8 +3766,8 @@ static void call_trans2qpipeinfo(connection_struct *conn,
                return;
        }
 
-       p_pipe = get_rpc_pipe_p(SVAL(params,0));
-       if (p_pipe == NULL) {
+       fsp = file_fsp(req, SVAL(params,0));
+       if (!fsp_is_np(fsp)) {
                reply_nterror(req, NT_STATUS_INVALID_HANDLE);
                return;
        }
@@ -3828,7 +3828,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
        int mode=0;
        int nlink;
        SMB_OFF_T file_size=0;
-       SMB_BIG_UINT allocation_size=0;
+       uint64_t allocation_size=0;
        unsigned int data_size = 0;
        unsigned int param_size = 2;
        SMB_STRUCT_STAT sbuf;
@@ -3873,7 +3873,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
                        return;
                }
 
-               fsp = file_fsp(SVAL(params,0));
+               fsp = file_fsp(req, SVAL(params,0));
                info_level = SVAL(params,2);
 
                DEBUG(3,("call_trans2qfilepathinfo: TRANSACT2_QFILEINFO: level = %d\n", info_level));
@@ -4682,8 +4682,8 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
                case SMB_QUERY_POSIX_LOCK:
                {
                        NTSTATUS status = NT_STATUS_INVALID_LEVEL;
-                       SMB_BIG_UINT count;
-                       SMB_BIG_UINT offset;
+                       uint64_t count;
+                       uint64_t offset;
                        uint32 lock_pid;
                        enum brl_type lock_type;
 
@@ -4711,13 +4711,13 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
 
                        lock_pid = IVAL(pdata, POSIX_LOCK_PID_OFFSET);
 #if defined(HAVE_LONGLONG)
-                       offset = (((SMB_BIG_UINT) IVAL(pdata,(POSIX_LOCK_START_OFFSET+4))) << 32) |
-                                       ((SMB_BIG_UINT) IVAL(pdata,POSIX_LOCK_START_OFFSET));
-                       count = (((SMB_BIG_UINT) IVAL(pdata,(POSIX_LOCK_LEN_OFFSET+4))) << 32) |
-                                       ((SMB_BIG_UINT) IVAL(pdata,POSIX_LOCK_LEN_OFFSET));
+                       offset = (((uint64_t) IVAL(pdata,(POSIX_LOCK_START_OFFSET+4))) << 32) |
+                                       ((uint64_t) IVAL(pdata,POSIX_LOCK_START_OFFSET));
+                       count = (((uint64_t) IVAL(pdata,(POSIX_LOCK_LEN_OFFSET+4))) << 32) |
+                                       ((uint64_t) IVAL(pdata,POSIX_LOCK_LEN_OFFSET));
 #else /* HAVE_LONGLONG */
-                       offset = (SMB_BIG_UINT)IVAL(pdata,POSIX_LOCK_START_OFFSET);
-                       count = (SMB_BIG_UINT)IVAL(pdata,POSIX_LOCK_LEN_OFFSET);
+                       offset = (uint64_t)IVAL(pdata,POSIX_LOCK_START_OFFSET);
+                       count = (uint64_t)IVAL(pdata,POSIX_LOCK_LEN_OFFSET);
 #endif /* HAVE_LONGLONG */
 
                        status = query_lock(fsp,
@@ -5016,12 +5016,12 @@ static NTSTATUS smb_set_file_size(connection_struct *conn,
 
        if (vfs_set_filelen(new_fsp, size) == -1) {
                status = map_nt_error_from_unix(errno);
-               close_file(new_fsp,NORMAL_CLOSE);
+               close_file(req, new_fsp,NORMAL_CLOSE);
                return status;
        }
 
        trigger_write_time_update_immediate(new_fsp);
-       close_file(new_fsp,NORMAL_CLOSE);
+       close_file(req, new_fsp,NORMAL_CLOSE);
        return NT_STATUS_OK;
 }
 
@@ -5123,7 +5123,7 @@ static NTSTATUS smb_file_position_information(connection_struct *conn,
                                int total_data,
                                files_struct *fsp)
 {
-       SMB_BIG_UINT position_information;
+       uint64_t position_information;
 
        if (total_data < 8) {
                return NT_STATUS_INVALID_PARAMETER;
@@ -5134,9 +5134,9 @@ static NTSTATUS smb_file_position_information(connection_struct *conn,
                return NT_STATUS_OK;
        }
 
-       position_information = (SMB_BIG_UINT)IVAL(pdata,0);
+       position_information = (uint64_t)IVAL(pdata,0);
 #ifdef LARGE_SMB_OFF_T
-       position_information |= (((SMB_BIG_UINT)IVAL(pdata,4)) << 32);
+       position_information |= (((uint64_t)IVAL(pdata,4)) << 32);
 #else /* LARGE_SMB_OFF_T */
        if (IVAL(pdata,4) != 0) {
                /* more than 32 bits? */
@@ -5475,8 +5475,8 @@ static NTSTATUS smb_set_posix_lock(connection_struct *conn,
                                int total_data,
                                files_struct *fsp)
 {
-       SMB_BIG_UINT count;
-       SMB_BIG_UINT offset;
+       uint64_t count;
+       uint64_t offset;
        uint32 lock_pid;
        bool blocking_lock = False;
        enum brl_type lock_type;
@@ -5523,13 +5523,13 @@ static NTSTATUS smb_set_posix_lock(connection_struct *conn,
 
        lock_pid = IVAL(pdata, POSIX_LOCK_PID_OFFSET);
 #if defined(HAVE_LONGLONG)
-       offset = (((SMB_BIG_UINT) IVAL(pdata,(POSIX_LOCK_START_OFFSET+4))) << 32) |
-                       ((SMB_BIG_UINT) IVAL(pdata,POSIX_LOCK_START_OFFSET));
-       count = (((SMB_BIG_UINT) IVAL(pdata,(POSIX_LOCK_LEN_OFFSET+4))) << 32) |
-                       ((SMB_BIG_UINT) IVAL(pdata,POSIX_LOCK_LEN_OFFSET));
+       offset = (((uint64_t) IVAL(pdata,(POSIX_LOCK_START_OFFSET+4))) << 32) |
+                       ((uint64_t) IVAL(pdata,POSIX_LOCK_START_OFFSET));
+       count = (((uint64_t) IVAL(pdata,(POSIX_LOCK_LEN_OFFSET+4))) << 32) |
+                       ((uint64_t) IVAL(pdata,POSIX_LOCK_LEN_OFFSET));
 #else /* HAVE_LONGLONG */
-       offset = (SMB_BIG_UINT)IVAL(pdata,POSIX_LOCK_START_OFFSET);
-       count = (SMB_BIG_UINT)IVAL(pdata,POSIX_LOCK_LEN_OFFSET);
+       offset = (uint64_t)IVAL(pdata,POSIX_LOCK_START_OFFSET);
+       count = (uint64_t)IVAL(pdata,POSIX_LOCK_LEN_OFFSET);
 #endif /* HAVE_LONGLONG */
 
        DEBUG(10,("smb_set_posix_lock: file %s, lock_type = %u,"
@@ -5702,7 +5702,7 @@ static NTSTATUS smb_set_file_allocation_info(connection_struct *conn,
                                        const char *fname,
                                        SMB_STRUCT_STAT *psbuf)
 {
-       SMB_BIG_UINT allocation_size = 0;
+       uint64_t allocation_size = 0;
        NTSTATUS status = NT_STATUS_OK;
        files_struct *new_fsp = NULL;
 
@@ -5714,9 +5714,9 @@ static NTSTATUS smb_set_file_allocation_info(connection_struct *conn,
                return NT_STATUS_INVALID_PARAMETER;
        }
 
-       allocation_size = (SMB_BIG_UINT)IVAL(pdata,0);
+       allocation_size = (uint64_t)IVAL(pdata,0);
 #ifdef LARGE_SMB_OFF_T
-       allocation_size |= (((SMB_BIG_UINT)IVAL(pdata,4)) << 32);
+       allocation_size |= (((uint64_t)IVAL(pdata,4)) << 32);
 #else /* LARGE_SMB_OFF_T */
        if (IVAL(pdata,4) != 0) {
                /* more than 32 bits? */
@@ -5771,7 +5771,7 @@ static NTSTATUS smb_set_file_allocation_info(connection_struct *conn,
        if (allocation_size != get_file_size(*psbuf)) {
                if (vfs_allocate_file_space(new_fsp, allocation_size) == -1) {
                        status = map_nt_error_from_unix(errno);
-                       close_file(new_fsp,NORMAL_CLOSE);
+                       close_file(req, new_fsp, NORMAL_CLOSE);
                        return status;
                }
        }
@@ -5783,7 +5783,7 @@ static NTSTATUS smb_set_file_allocation_info(connection_struct *conn,
         */
        trigger_write_time_update_immediate(new_fsp);
 
-       close_file(new_fsp,NORMAL_CLOSE);
+       close_file(req, new_fsp, NORMAL_CLOSE);
        return NT_STATUS_OK;
 }
 
@@ -6196,7 +6196,7 @@ static NTSTATUS smb_posix_mkdir(connection_struct *conn,
                                &fsp);
 
         if (NT_STATUS_IS_OK(status)) {
-                close_file(fsp, NORMAL_CLOSE);
+                close_file(req, fsp, NORMAL_CLOSE);
         }
 
        info_level_return = SVAL(pdata,16);
@@ -6389,7 +6389,7 @@ static NTSTATUS smb_posix_open(connection_struct *conn,
        /* Realloc the data size */
        *ppdata = (char *)SMB_REALLOC(*ppdata,*pdata_return_size);
        if (*ppdata == NULL) {
-               close_file(fsp,ERROR_CLOSE);
+               close_file(req, fsp, ERROR_CLOSE);
                *pdata_return_size = 0;
                return NT_STATUS_NO_MEMORY;
        }
@@ -6507,7 +6507,7 @@ static NTSTATUS smb_posix_unlink(connection_struct *conn,
        if (lck == NULL) {
                DEBUG(0, ("smb_posix_unlink: Could not get share mode "
                        "lock for file %s\n", fsp->fsp_name));
-               close_file(fsp, NORMAL_CLOSE);
+               close_file(req, fsp, NORMAL_CLOSE);
                return NT_STATUS_INVALID_PARAMETER;
        }
 
@@ -6523,7 +6523,7 @@ static NTSTATUS smb_posix_unlink(connection_struct *conn,
                                continue;
                        }
                        /* Fail with sharing violation. */
-                       close_file(fsp, NORMAL_CLOSE);
+                       close_file(req, fsp, NORMAL_CLOSE);
                        TALLOC_FREE(lck);
                        return NT_STATUS_SHARING_VIOLATION;
                }
@@ -6540,12 +6540,12 @@ static NTSTATUS smb_posix_unlink(connection_struct *conn,
                                                psbuf);
 
        if (!NT_STATUS_IS_OK(status)) {
-               close_file(fsp, NORMAL_CLOSE);
+               close_file(req, fsp, NORMAL_CLOSE);
                TALLOC_FREE(lck);
                return status;
        }
        TALLOC_FREE(lck);
-       return close_file(fsp, NORMAL_CLOSE);
+       return close_file(req, fsp, NORMAL_CLOSE);
 }
 
 /****************************************************************************
@@ -6582,7 +6582,7 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
                        return;
                }
 
-               fsp = file_fsp(SVAL(params,0));
+               fsp = file_fsp(req, SVAL(params,0));
                /* Basic check for non-null fsp. */
                if (!check_fsp_open(conn, req, fsp)) {
                        return;
@@ -7065,10 +7065,11 @@ static void call_trans2mkdir(connection_struct *conn, struct smb_request *req,
                        reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
                        return;
                }
-       } else if (IVAL(pdata,0) != 4) {
-               reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
-               return;
        }
+       /* If total_data == 4 Windows doesn't care what values
+        * are placed in that field, it just ignores them.
+        * The System i QNTC IBM SMB client puts bad values here,
+        * so ignore them. */
 
        status = create_directory(conn, req, directory);
 
@@ -7250,7 +7251,7 @@ static void call_trans2ioctl(connection_struct *conn,
                             unsigned int max_data_bytes)
 {
        char *pdata = *ppdata;
-       files_struct *fsp = file_fsp(SVAL(req->inbuf,smb_vwv15));
+       files_struct *fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv15));
 
        /* check for an invalid fid before proceeding */
 
index 1e137dd9089160616d022f9e435486a87cc6b899..011f31dd24c531d698ede308bea6ee90c1a040d7 100644 (file)
@@ -501,13 +501,13 @@ ssize_t vfs_pwrite_data(struct smb_request *req,
  Returns 0 on success, -1 on failure.
 ****************************************************************************/
 
-int vfs_allocate_file_space(files_struct *fsp, SMB_BIG_UINT len)
+int vfs_allocate_file_space(files_struct *fsp, uint64_t len)
 {
        int ret;
        SMB_STRUCT_STAT st;
        connection_struct *conn = fsp->conn;
-       SMB_BIG_UINT space_avail;
-       SMB_BIG_UINT bsize,dfree,dsize;
+       uint64_t space_avail;
+       uint64_t bsize,dfree,dsize;
 
        release_level_2_oplocks_on_change(fsp);
 
@@ -527,10 +527,10 @@ int vfs_allocate_file_space(files_struct *fsp, SMB_BIG_UINT len)
        if (ret == -1)
                return ret;
 
-       if (len == (SMB_BIG_UINT)st.st_size)
+       if (len == (uint64_t)st.st_size)
                return 0;
 
-       if (len < (SMB_BIG_UINT)st.st_size) {
+       if (len < (uint64_t)st.st_size) {
                /* Shrink - use ftruncate. */
 
                DEBUG(10,("vfs_allocate_file_space: file %s, shrink. Current size %.0f\n",
@@ -551,7 +551,7 @@ int vfs_allocate_file_space(files_struct *fsp, SMB_BIG_UINT len)
        len -= st.st_size;
        len /= 1024; /* Len is now number of 1k blocks needed. */
        space_avail = get_dfree_info(conn,fsp->fsp_name,False,&bsize,&dfree,&dsize);
-       if (space_avail == (SMB_BIG_UINT)-1) {
+       if (space_avail == (uint64_t)-1) {
                return -1;
        }
 
index dddd5bef29f4b7eeef7380888ceeca17cd90fae6..d984dd661c50a71c54a796e04d1f3acaba0086e2 100644 (file)
@@ -105,7 +105,7 @@ static NTSTATUS cmd_disconnect(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int a
 
 static NTSTATUS cmd_disk_free(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv)
 {
-       SMB_BIG_UINT diskfree, bsize, dfree, dsize;
+       uint64_t diskfree, bsize, dfree, dsize;
        if (argc != 2) {
                printf("Usage: disk_free <path>\n");
                return NT_STATUS_OK;
index 2ba5ab8f06e3003e6b27b4fa88901b48a053c8b8..b58cb3deec84e5e04d5a448dd4f59f8a9208fe99 100644 (file)
@@ -71,7 +71,7 @@ struct record {
        enum lock_op lock_op;
        enum brl_type lock_type;
        char conn, f;
-       SMB_BIG_UINT start, len;
+       uint64_t start, len;
        char needed;
 };
 
@@ -303,8 +303,8 @@ static bool test_one(struct cli_state *cli[NSERVERS][NCONNECTIONS],
 {
        unsigned conn = rec->conn;
        unsigned f = rec->f;
-       SMB_BIG_UINT start = rec->start;
-       SMB_BIG_UINT len = rec->len;
+       uint64_t start = rec->start;
+       uint64_t len = rec->len;
        enum brl_type op = rec->lock_type;
        int server;
        bool ret[NSERVERS];
index d8942e42b9b1b82cc6f5d973208a3cb228ec8b7b..904fb5c26252c0af35de3cc99e0be72d58c799b1 100644 (file)
@@ -294,15 +294,6 @@ static bool torture_open_connection_share(struct cli_state **c,
        return True;
 }
 
-void torture_open_connection_free_unclist(char **unc_list)
-{
-       if (unc_list!=NULL)
-       {
-               SAFE_FREE(unc_list[0]);
-               SAFE_FREE(unc_list);
-       }
-}
-
 bool torture_open_connection(struct cli_state **c, int conn_index)
 {
        char **unc_list = NULL;
@@ -311,7 +302,7 @@ bool torture_open_connection(struct cli_state **c, int conn_index)
 
        if (use_multishare_conn==True) {
                char *h, *s;
-               unc_list = file_lines_load(multishare_conn_fname, &num_unc_names, 0);
+               unc_list = file_lines_load(multishare_conn_fname, &num_unc_names, 0, NULL);
                if (!unc_list || num_unc_names <= 0) {
                        printf("Failed to load unc names list from '%s'\n", multishare_conn_fname);
                        exit(1);
@@ -321,14 +312,14 @@ bool torture_open_connection(struct cli_state **c, int conn_index)
                                      NULL, &h, &s)) {
                        printf("Failed to parse UNC name %s\n",
                               unc_list[conn_index % num_unc_names]);
-                       torture_open_connection_free_unclist(unc_list);
+                       TALLOC_FREE(unc_list);
                        exit(1);
                }
 
                result = torture_open_connection_share(c, h, s);
 
                /* h, s were copied earlier */
-               torture_open_connection_free_unclist(unc_list);
+               TALLOC_FREE(unc_list);
                return result;
        }
 
@@ -5075,7 +5066,7 @@ static bool run_local_gencache(int dummy)
                return False;
        }
 
-       blob = data_blob_string_const("bar");
+       blob = data_blob_string_const_null("bar");
        tm = time(NULL);
 
        if (!gencache_set_data_blob("foo", &blob, tm)) {
@@ -5649,7 +5640,7 @@ static void usage(void)
        *p = 0;
        fstrcpy(share, p+1);
 
-       fstrcpy(myname, get_myname(talloc_tos()));
+       fstrcpy(myname, talloc_get_myname(talloc_tos()));
        if (!*myname) {
                fprintf(stderr, "Failed to get my hostname.\n");
                return 1;
index 56e27eec1dc388d558ff83335cf38ea76669b8d0..bb4dc35d2b2446d232c2f31604afcd8e36b2c29a 100644 (file)
@@ -433,7 +433,7 @@ bool reload_services(bool test)
 
        if (lp_loaded()) {
                const char *fname = lp_configfile();
-               if (file_exist(fname, NULL) &&
+               if (file_exist(fname) &&
                    !strcsequal(fname, get_dyn_CONFIGFILE())) {
                        set_dyn_CONFIGFILE(fname);
                        test = False;
index 627374cb96bb82162a7f31f01849479ad8fb52f3..8e8dd7e7672d4046484dcdc2e2afb68aed4bd37c 100644 (file)
@@ -67,7 +67,7 @@ static int net_ads_cldap_netlogon(struct net_context *c, ADS_STRUCT *ads)
                break;
        }
 
-       d_printf("GUID: %s\n", smb_uuid_string(talloc_tos(), reply.domain_uuid));
+       d_printf("GUID: %s\n", GUID_string(talloc_tos(), &reply.domain_uuid));
 
        d_printf("Flags:\n"
                 "\tIs a PDC:                                   %s\n"
@@ -182,7 +182,8 @@ static int net_ads_info(struct net_context *c, int argc, const char **argv)
        d_printf("Realm: %s\n", ads->config.realm);
        d_printf("Bind Path: %s\n", ads->config.bind_path);
        d_printf("LDAP port: %d\n", ads->ldap.port);
-       d_printf("Server time: %s\n", http_timestring(ads->config.current_time));
+       d_printf("Server time: %s\n", 
+                        http_timestring(talloc_tos(), ads->config.current_time));
 
        d_printf("KDC server: %s\n", ads->auth.kdc_server );
        d_printf("Server time offset: %d\n", ads->auth.time_offset );
index 278377867aa8bd58df48ed0beeb0812ba325429f..cd291b5c74b1790eb678bad9135f8df47f83e467 100644 (file)
@@ -27,7 +27,7 @@ void print_registry_key(const char *keyname, NTTIME *modtime)
        d_printf("Keyname   = %s\n", keyname);
        d_printf("Modtime   = %s\n",
                 modtime
-                ? http_timestring(nt_time_to_unix(*modtime))
+                ? http_timestring(talloc_tos(), nt_time_to_unix(*modtime))
                 : "None");
        d_printf("\n");
 }
index 0e91144d339d218e69c60d280d5d9fc3db42969b..5f5a21dfbb7141a285cc8ab72a19741e227fd511 100644 (file)
@@ -504,13 +504,13 @@ NTSTATUS rpc_info_internals(struct net_context *c,
                                             2,
                                             &info);
        if (NT_STATUS_IS_OK(result)) {
-               d_printf("Domain Name: %s\n", info->info2.domain_name.string);
+               d_printf("Domain Name: %s\n", info->general.domain_name.string);
                d_printf("Domain SID: %s\n", sid_str);
                d_printf("Sequence number: %llu\n",
-                       (unsigned long long)info->info2.sequence_num);
-               d_printf("Num users: %u\n", info->info2.num_users);
-               d_printf("Num domain groups: %u\n", info->info2.num_groups);
-               d_printf("Num local groups: %u\n", info->info2.num_aliases);
+                       (unsigned long long)info->general.sequence_num);
+               d_printf("Num users: %u\n", info->general.num_users);
+               d_printf("Num domain groups: %u\n", info->general.num_groups);
+               d_printf("Num local groups: %u\n", info->general.num_aliases);
        }
 
  done:
@@ -5012,8 +5012,7 @@ NTSTATUS rpc_init_shutdown_internals(struct net_context *c,
        NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
         const char *msg = "This machine will be shutdown shortly";
        uint32 timeout = 20;
-       struct initshutdown_String msg_string;
-       struct initshutdown_String_sub s;
+       struct lsa_StringLarge msg_string;
 
        if (c->opt_comment) {
                msg = c->opt_comment;
@@ -5022,8 +5021,7 @@ NTSTATUS rpc_init_shutdown_internals(struct net_context *c,
                timeout = c->opt_timeout;
        }
 
-       s.name = msg;
-       msg_string.name = &s;
+       msg_string.string = msg;
 
        /* create an entry */
        result = rpccli_initshutdown_Init(pipe_hnd, mem_ctx, NULL,
@@ -5067,16 +5065,14 @@ NTSTATUS rpc_reg_shutdown_internals(struct net_context *c,
 {
         const char *msg = "This machine will be shutdown shortly";
        uint32 timeout = 20;
-       struct initshutdown_String msg_string;
-       struct initshutdown_String_sub s;
+       struct lsa_StringLarge msg_string;
        NTSTATUS result;
        WERROR werr;
 
        if (c->opt_comment) {
                msg = c->opt_comment;
        }
-       s.name = msg;
-       msg_string.name = &s;
+       msg_string.string = msg;
 
        if (c->opt_timeout) {
                timeout = c->opt_timeout;
index 5bc38f979f4a891342db5f84e73c5023d076fb5b..2fe464a0005a08a5a3f33bf0af48ad8952450e6b 100644 (file)
@@ -330,12 +330,8 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv)
        
        /* Create a random machine account password */
 
-       { 
-               char *str;
-               str = generate_random_str(DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
-               clear_trust_password = SMB_STRDUP(str);
-               E_md4hash(clear_trust_password, md4_trust_password);
-       }
+       clear_trust_password = generate_random_str(talloc_tos(), DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
+       E_md4hash(clear_trust_password, md4_trust_password);
 
        /* Set password on machine account */
 
@@ -468,7 +464,7 @@ done:
 
        cli_shutdown(cli);
 
-       SAFE_FREE(clear_trust_password);
+       TALLOC_FREE(clear_trust_password);
 
        return retval;
 }
index d1349a903d0e4e8c70f8db8fb8548c8a3d764336..133173116c3338eb3662133d9e83690584c9ea44 100644 (file)
@@ -264,8 +264,9 @@ static NTSTATUS rpc_service_status_internal(struct net_context *c,
        WERROR result = WERR_GENERAL_FAILURE;
        NTSTATUS status;
        SERVICE_STATUS service_status;
-       SERVICE_CONFIG config;
-       fstring ascii_string;
+       struct QUERY_SERVICE_CONFIG config;
+       uint32_t buf_size = sizeof(config);
+       uint32_t ret_size = 0;
 
        if (argc != 1 ) {
                d_printf("Usage: net rpc service status <service>\n");
@@ -314,8 +315,23 @@ static NTSTATUS rpc_service_status_internal(struct net_context *c,
 
        /* get the config */
 
-       result = rpccli_svcctl_query_config(pipe_hnd, mem_ctx, &hService, &config  );
-       if ( !W_ERROR_IS_OK(result) ) {
+       status = rpccli_svcctl_QueryServiceConfigW(pipe_hnd, mem_ctx,
+                                                  &hService,
+                                                  &config,
+                                                  buf_size,
+                                                  &ret_size,
+                                                  &result);
+       if (W_ERROR_EQUAL(result, WERR_INSUFFICIENT_BUFFER)) {
+               buf_size = ret_size;
+               status = rpccli_svcctl_QueryServiceConfigW(pipe_hnd, mem_ctx,
+                                                          &hService,
+                                                          &config,
+                                                          buf_size,
+                                                          &ret_size,
+                                                          &result);
+       }
+
+       if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(result) ) {
                d_fprintf(stderr, "Query config request failed.  [%s]\n", dos_errstr(result));
                goto done;
        }
@@ -329,29 +345,24 @@ static NTSTATUS rpc_service_status_internal(struct net_context *c,
        d_printf("\tError Control        = 0x%x\n", config.error_control);
        d_printf("\tTag ID               = 0x%x\n", config.tag_id);
 
-       if ( config.executablepath ) {
-               rpcstr_pull( ascii_string, config.executablepath->buffer, sizeof(ascii_string), -1, STR_TERMINATE );
-               d_printf("\tExecutable Path      = %s\n", ascii_string);
+       if (config.executablepath) {
+               d_printf("\tExecutable Path      = %s\n", config.executablepath);
        }
 
-       if ( config.loadordergroup ) {
-               rpcstr_pull( ascii_string, config.loadordergroup->buffer, sizeof(ascii_string), -1, STR_TERMINATE );
-               d_printf("\tLoad Order Group     = %s\n", ascii_string);
+       if (config.loadordergroup) {
+               d_printf("\tLoad Order Group     = %s\n", config.loadordergroup);
        }
 
-       if ( config.dependencies ) {
-               rpcstr_pull( ascii_string, config.dependencies->buffer, sizeof(ascii_string), -1, STR_TERMINATE );
-               d_printf("\tDependencies         = %s\n", ascii_string);
+       if (config.dependencies) {
+               d_printf("\tDependencies         = %s\n", config.dependencies);
        }
 
-       if ( config.startname ) {
-               rpcstr_pull( ascii_string, config.startname->buffer, sizeof(ascii_string), -1, STR_TERMINATE );
-               d_printf("\tStart Name           = %s\n", ascii_string);
+       if (config.startname) {
+               d_printf("\tStart Name           = %s\n", config.startname);
        }
 
-       if ( config.displayname ) {
-               rpcstr_pull( ascii_string, config.displayname->buffer, sizeof(ascii_string), -1, STR_TERMINATE );
-               d_printf("\tDisplay Name         = %s\n", ascii_string);
+       if (config.displayname) {
+               d_printf("\tDisplay Name         = %s\n", config.displayname);
        }
 
 done:
index 8f263c636ccd13f95502014c526af39bc95fe130..ce8e82182e83e76934240d8634a1c22e1f28c068 100644 (file)
@@ -371,7 +371,7 @@ static int info_fn(struct file_list *fl, void *priv)
                return -1;
        }
 
-       lines = fd_lines_load(fd, &numlines, 10240);
+       lines = fd_lines_load(fd, &numlines, 10240, NULL);
        close(fd);
 
        if (lines == NULL) {
@@ -385,7 +385,7 @@ static int info_fn(struct file_list *fl, void *priv)
                                &psd,
                                &guest_ok);
 
-       file_lines_free(lines);
+       TALLOC_FREE(lines);
 
        if (us_err != USERSHARE_OK) {
                d_fprintf(stderr, "info_fn: file %s is not a well formed usershare file.\n",
index 4586086d73fcf1a418119cda55952f3a6c0a77a5..0a76761cb27e270664f3a0722928ebf6c071d159 100644 (file)
@@ -1813,7 +1813,7 @@ static void manage_ntlm_server_1_request(struct ntlm_auth_state *state,
                                if (ntlm_server_1_lm_session_key 
                                    && (memcmp(zeros, lm_key, 
                                               sizeof(lm_key)) != 0)) {
-                                       hex_lm_key = hex_encode(NULL,
+                                       hex_lm_key = hex_encode_talloc(NULL,
                                                                (const unsigned char *)lm_key,
                                                                sizeof(lm_key));
                                        x_fprintf(x_stdout, "LANMAN-Session-Key: %s\n", hex_lm_key);
@@ -1823,7 +1823,7 @@ static void manage_ntlm_server_1_request(struct ntlm_auth_state *state,
                                if (ntlm_server_1_user_session_key 
                                    && (memcmp(zeros, user_session_key, 
                                               sizeof(user_session_key)) != 0)) {
-                                       hex_user_session_key = hex_encode(NULL,
+                                       hex_user_session_key = hex_encode_talloc(NULL,
                                                                          (const unsigned char *)user_session_key, 
                                                                          sizeof(user_session_key));
                                        x_fprintf(x_stdout, "User-Session-Key: %s\n", hex_user_session_key);
@@ -2262,7 +2262,7 @@ static bool check_auth_crap(void)
        if (request_lm_key 
            && (memcmp(zeros, lm_key, 
                       sizeof(lm_key)) != 0)) {
-               hex_lm_key = hex_encode(NULL, (const unsigned char *)lm_key,
+               hex_lm_key = hex_encode_talloc(NULL, (const unsigned char *)lm_key,
                                        sizeof(lm_key));
                x_fprintf(x_stdout, "LM_KEY: %s\n", hex_lm_key);
                TALLOC_FREE(hex_lm_key);
@@ -2270,7 +2270,7 @@ static bool check_auth_crap(void)
        if (request_user_session_key 
            && (memcmp(zeros, user_session_key, 
                       sizeof(user_session_key)) != 0)) {
-               hex_user_session_key = hex_encode(NULL, (const unsigned char *)user_session_key, 
+               hex_user_session_key = hex_encode_talloc(NULL, (const unsigned char *)user_session_key, 
                                                  sizeof(user_session_key));
                x_fprintf(x_stdout, "NT_KEY: %s\n", hex_user_session_key);
                TALLOC_FREE(hex_user_session_key);
index e1d6709073aee32bdca32469e8f776ddd0f9166f..6a7189e636a316df8d1fb2294e8229d623dbf463 100644 (file)
@@ -235,7 +235,7 @@ static int print_sam_info (struct samu *sam_pwent, bool verbosity, bool smbpwdst
        uid_t uid;
        time_t tmp;
 
-       /* TODO: chaeck if entry is a user or a workstation */
+       /* TODO: check if entry is a user or a workstation */
        if (!sam_pwent) return -1;
 
        if (verbosity) {
@@ -260,25 +260,32 @@ static int print_sam_info (struct samu *sam_pwent, bool verbosity, bool smbpwdst
                printf ("Munged dial:          %s\n", pdb_get_munged_dial(sam_pwent));
 
                tmp = pdb_get_logon_time(sam_pwent);
-               printf ("Logon time:           %s\n", tmp ? http_timestring(tmp) : "0");
+               printf ("Logon time:           %s\n", 
+                               tmp ? http_timestring(talloc_tos(), tmp) : "0");
 
                tmp = pdb_get_logoff_time(sam_pwent);
-               printf ("Logoff time:          %s\n", tmp ? http_timestring(tmp) : "0");
+               printf ("Logoff time:          %s\n", 
+                               tmp ? http_timestring(talloc_tos(), tmp) : "0");
 
                tmp = pdb_get_kickoff_time(sam_pwent);
-               printf ("Kickoff time:         %s\n", tmp ? http_timestring(tmp) : "0");
+               printf ("Kickoff time:         %s\n", 
+                               tmp ? http_timestring(talloc_tos(), tmp) : "0");
 
                tmp = pdb_get_pass_last_set_time(sam_pwent);
-               printf ("Password last set:    %s\n", tmp ? http_timestring(tmp) : "0");
+               printf ("Password last set:    %s\n", 
+                               tmp ? http_timestring(talloc_tos(), tmp) : "0");
 
                tmp = pdb_get_pass_can_change_time(sam_pwent);
-               printf ("Password can change:  %s\n", tmp ? http_timestring(tmp) : "0");
+               printf ("Password can change:  %s\n", 
+                               tmp ? http_timestring(talloc_tos(), tmp) : "0");
 
                tmp = pdb_get_pass_must_change_time(sam_pwent);
-               printf ("Password must change: %s\n", tmp ? http_timestring(tmp) : "0");
+               printf ("Password must change: %s\n", 
+                               tmp ? http_timestring(talloc_tos(), tmp) : "0");
 
                tmp = pdb_get_bad_password_time(sam_pwent);
-               printf ("Last bad password   : %s\n", tmp ? http_timestring(tmp) : "0");
+               printf ("Last bad password   : %s\n", 
+                               tmp ? http_timestring(talloc_tos(), tmp) : "0");
                printf ("Bad password count  : %d\n",
                        pdb_get_bad_password_count(sam_pwent));
 
index eda8732c8914ef290ab113271fdd8a78b4575f08..10b55014c227c2b05d0a7c078fec7a873bfe7d8b 100644 (file)
 
 #include "includes.h"
 
-static int test_args = False;
+static int test_args;
 
 #define CREATE_ACCESS_READ READ_CONTROL_ACCESS
 
 /* numeric is set when the user wants numeric SIDs and ACEs rather
    than going via LSA calls to resolve them */
-static int numeric = False;
+static int numeric;
 
 enum acl_mode {SMB_ACL_SET, SMB_ACL_DELETE, SMB_ACL_MODIFY, SMB_ACL_ADD };
 enum chown_mode {REQUEST_NONE, REQUEST_CHOWN, REQUEST_CHGRP};
@@ -179,9 +179,12 @@ static void SidToString(struct cli_state *cli, fstring str, const DOM_SID *sid)
                return;
        }
 
-       slprintf(str, sizeof(fstring) - 1, "%s%s%s",
-                domain, lp_winbind_separator(), name);
-       
+       if (*domain) {
+               slprintf(str, sizeof(fstring) - 1, "%s%s%s",
+                       domain, lp_winbind_separator(), name);
+       } else {
+               fstrcpy(str, name);
+       }
 }
 
 /* convert a string to a SID, either numeric or username/group */
@@ -196,6 +199,65 @@ static bool StringToSid(struct cli_state *cli, DOM_SID *sid, const char *str)
        return NT_STATUS_IS_OK(cli_lsa_lookup_name(cli, str, &type, sid));
 }
 
+static void print_ace_flags(FILE *f, uint8_t flags)
+{
+       char *str = talloc_strdup(NULL, "");
+
+       if (!str) {
+               goto out;
+       }
+
+       if (flags & SEC_ACE_FLAG_OBJECT_INHERIT) {
+               str = talloc_asprintf(str, "%s%s",
+                               str, "OI|");
+               if (!str) {
+                       goto out;
+               }
+       }
+       if (flags & SEC_ACE_FLAG_CONTAINER_INHERIT) {
+               str = talloc_asprintf(str, "%s%s",
+                               str, "CI|");
+               if (!str) {
+                       goto out;
+               }
+       }
+       if (flags & SEC_ACE_FLAG_NO_PROPAGATE_INHERIT) {
+               str = talloc_asprintf(str, "%s%s",
+                               str, "NP|");
+               if (!str) {
+                       goto out;
+               }
+       }
+       if (flags & SEC_ACE_FLAG_INHERIT_ONLY) {
+               str = talloc_asprintf(str, "%s%s",
+                               str, "IO|");
+               if (!str) {
+                       goto out;
+               }
+       }
+       if (flags & SEC_ACE_FLAG_INHERITED_ACE) {
+               str = talloc_asprintf(str, "%s%s",
+                               str, "I|");
+               if (!str) {
+                       goto out;
+               }
+       }
+       /* Ignore define SEC_ACE_FLAG_SUCCESSFUL_ACCESS ( 0x40 )
+          and SEC_ACE_FLAG_FAILED_ACCESS ( 0x80 ) as they're
+          audit ace flags. */
+
+       if (str[strlen(str)-1] == '|') {
+               str[strlen(str)-1] = '\0';
+               fprintf(f, "/%s/", str);
+       } else {
+               fprintf(f, "/0x%x/", flags);
+       }
+       TALLOC_FREE(str);
+       return;
+
+  out:
+       fprintf(f, "/0x%x/", flags);
+}
 
 /* print an ACE on a FILE, using either numeric or ascii representation */
 static void print_ace(struct cli_state *cli, FILE *f, SEC_ACE *ace)
@@ -210,7 +272,7 @@ static void print_ace(struct cli_state *cli, FILE *f, SEC_ACE *ace)
        fprintf(f, "%s:", sidstr);
 
        if (numeric) {
-               fprintf(f, "%d/%d/0x%08x", 
+               fprintf(f, "%d/0x%x/0x%08x",
                        ace->type, ace->flags, ace->access_mask);
                return;
        }
@@ -225,9 +287,7 @@ static void print_ace(struct cli_state *cli, FILE *f, SEC_ACE *ace)
                fprintf(f, "%d", ace->type);
        }
 
-       /* Not sure what flags can be set in a file ACL */
-
-       fprintf(f, "/%d/", ace->flags);
+       print_ace_flags(f, ace->flags);
 
        /* Standard permissions */
 
@@ -263,6 +323,37 @@ static void print_ace(struct cli_state *cli, FILE *f, SEC_ACE *ace)
        }
 }
 
+static bool parse_ace_flags(const char *str, unsigned int *pflags)
+{
+       const char *p = str;
+       *pflags = 0;
+
+       while (*p) {
+               if (strnequal(p, "OI", 2)) {
+                       *pflags |= SEC_ACE_FLAG_OBJECT_INHERIT;
+                       p += 2;
+               } else if (strnequal(p, "CI", 2)) {
+                       *pflags |= SEC_ACE_FLAG_CONTAINER_INHERIT;
+                       p += 2;
+               } else if (strnequal(p, "NP", 2)) {
+                       *pflags |= SEC_ACE_FLAG_NO_PROPAGATE_INHERIT;
+                       p += 2;
+               } else if (strnequal(p, "IO", 2)) {
+                       *pflags |= SEC_ACE_FLAG_INHERIT_ONLY;
+                       p += 2;
+               } else if (*p == 'I') {
+                       *pflags |= SEC_ACE_FLAG_INHERITED_ACE;
+                       p += 1;
+               } else if (*p) {
+                       return false;
+               }
+
+               if (*p != '|' && *p != '\0') {
+                       return false;
+               }
+       }
+       return true;
+}
 
 /* parse an ACE in the same format as print_ace() */
 static bool parse_ace(struct cli_state *cli, SEC_ACE *ace,
@@ -335,15 +426,40 @@ static bool parse_ace(struct cli_state *cli, SEC_ACE *ace,
 
        /* Only numeric form accepted for flags at present */
 
-       if (!(next_token_talloc(frame, &cp, &tok, "/") &&
-             sscanf(tok, "%i", &aflags))) {
-               printf("ACE '%s': bad integer flags entry at '%s'\n",
+       if (!next_token_talloc(frame, &cp, &tok, "/")) {
+               printf("ACE '%s': bad flags entry at '%s'\n",
                        orig_str, tok);
                SAFE_FREE(str);
                TALLOC_FREE(frame);
                return False;
        }
 
+       if (tok[0] < '0' || tok[0] > '9') {
+               if (!parse_ace_flags(tok, &aflags)) {
+                       printf("ACE '%s': bad named flags entry at '%s'\n",
+                               orig_str, tok);
+                       SAFE_FREE(str);
+                       TALLOC_FREE(frame);
+                       return False;
+               }
+       } else if (strnequal(tok, "0x", 2)) {
+               if (!sscanf(tok, "%x", &aflags)) {
+                       printf("ACE '%s': bad hex flags entry at '%s'\n",
+                               orig_str, tok);
+                       SAFE_FREE(str);
+                       TALLOC_FREE(frame);
+                       return False;
+               }
+       } else {
+               if (!sscanf(tok, "%i", &aflags)) {
+                       printf("ACE '%s': bad integer flags entry at '%s'\n",
+                               orig_str, tok);
+                       SAFE_FREE(str);
+                       TALLOC_FREE(frame);
+                       return False;
+               }
+       }
+
        if (!next_token_talloc(frame, &cp, &tok, "/")) {
                printf("ACE '%s': missing / at '%s'\n",
                        orig_str, tok);
@@ -506,6 +622,7 @@ static void sec_desc_print(struct cli_state *cli, FILE *f, SEC_DESC *sd)
        uint32 i;
 
        fprintf(f, "REVISION:%d\n", sd->revision);
+       fprintf(f, "CONTROL:0x%x\n", sd->type);
 
        /* Print owner and group sid */
 
@@ -626,29 +743,42 @@ static int owner_set(struct cli_state *cli, enum chown_mode change_mode,
 }
 
 
-/* The MSDN is contradictory over the ordering of ACE entries in an ACL.
-   However NT4 gives a "The information may have been modified by a
-   computer running Windows NT 5.0" if denied ACEs do not appear before
-   allowed ACEs. */
+/* The MSDN is contradictory over the ordering of ACE entries in an
+   ACL.  However NT4 gives a "The information may have been modified
+   by a computer running Windows NT 5.0" if denied ACEs do not appear
+   before allowed ACEs. At
+   http://technet.microsoft.com/en-us/library/cc781716.aspx the
+   canonical order is specified as "Explicit Deny, Explicit Allow,
+   Inherited ACEs unchanged" */
 
 static int ace_compare(SEC_ACE *ace1, SEC_ACE *ace2)
 {
-       if (sec_ace_equal(ace1, ace2)) 
+       if (sec_ace_equal(ace1, ace2))
                return 0;
 
-       if (ace1->type != ace2->type) 
+       if ((ace1->flags & SEC_ACE_FLAG_INHERITED_ACE) &&
+                       !(ace2->flags & SEC_ACE_FLAG_INHERITED_ACE))
+               return 1;
+       if (!(ace1->flags & SEC_ACE_FLAG_INHERITED_ACE) &&
+                       (ace2->flags & SEC_ACE_FLAG_INHERITED_ACE))
+               return -1;
+       if ((ace1->flags & SEC_ACE_FLAG_INHERITED_ACE) &&
+                       (ace2->flags & SEC_ACE_FLAG_INHERITED_ACE))
+               return ace1 - ace2;
+
+       if (ace1->type != ace2->type)
                return ace2->type - ace1->type;
 
-       if (sid_compare(&ace1->trustee, &ace2->trustee)) 
+       if (sid_compare(&ace1->trustee, &ace2->trustee))
                return sid_compare(&ace1->trustee, &ace2->trustee);
 
-       if (ace1->flags != ace2->flags) 
+       if (ace1->flags != ace2->flags)
                return ace1->flags - ace2->flags;
 
-       if (ace1->access_mask != ace2->access_mask) 
+       if (ace1->access_mask != ace2->access_mask)
                return ace1->access_mask - ace2->access_mask;
 
-       if (ace1->size != ace2->size) 
+       if (ace1->size != ace2->size)
                return ace1->size - ace2->size;
 
        return memcmp(ace1, ace2, sizeof(SEC_ACE));
@@ -677,6 +807,7 @@ static void sort_acl(SEC_ACL *the_acl)
 /***************************************************** 
 set the ACLs on a file given an ascii description
 *******************************************************/
+
 static int cacl_set(struct cli_state *cli, char *filename, 
                    char *the_acl, enum acl_mode mode)
 {
@@ -730,7 +861,7 @@ static int cacl_set(struct cli_state *cli, char *filename,
                        }
 
                        if (!found) {
-                               printf("ACL for ACE:"); 
+                               printf("ACL for ACE:");
                                print_ace(cli, stdout, &sd->dacl->aces[i]);
                                printf(" not found\n");
                        }
@@ -762,7 +893,7 @@ static int cacl_set(struct cli_state *cli, char *filename,
                        old->owner_sid = sd->owner_sid;
                }
 
-               if (sd->group_sid) { 
+               if (sd->group_sid) {
                        old->group_sid = sd->group_sid;
                }
 
@@ -895,8 +1026,8 @@ static struct cli_state *connect_one(const char *server, const char *share)
                { "set", 'S', POPT_ARG_STRING, NULL, 'S', "Set acls", "ACLS" },
                { "chown", 'C', POPT_ARG_STRING, NULL, 'C', "Change ownership of a file", "USERNAME" },
                { "chgrp", 'G', POPT_ARG_STRING, NULL, 'G', "Change group ownership of a file", "GROUPNAME" },
-               { "numeric", 0, POPT_ARG_NONE, &numeric, True, "Don't resolve sids or masks to names" },
-               { "test-args", 't', POPT_ARG_NONE, &test_args, True, "Test arguments"},
+               { "numeric", 0, POPT_ARG_NONE, &numeric, 1, "Don't resolve sids or masks to names" },
+               { "test-args", 't', POPT_ARG_NONE, &test_args, 1, "Test arguments"},
                POPT_COMMON_SAMBA
                POPT_COMMON_CONNECTION
                POPT_COMMON_CREDENTIALS
index 11f8776a0e6263014839a429032e1dfb218c79e1..b769c2bce0bd341d39ef4dc15ed95b0a28ee63ff 100644 (file)
@@ -180,11 +180,7 @@ static int parse_quota_set(TALLOC_CTX *ctx,
 
        switch (todo) {
                case PARSE_LIM:
-#if defined(HAVE_LONGLONG)
-                       if (sscanf(p,"%llu/%llu",&pqt->softlim,&pqt->hardlim)!=2) {
-#else
-                       if (sscanf(p,"%lu/%lu",&pqt->softlim,&pqt->hardlim)!=2) {
-#endif
+                       if (sscanf(p,"%"PRIu64"/%"PRIu64,&pqt->softlim,&pqt->hardlim)!=2) {
                                return -1;
                        }
 
index 48814fedeab73659c153ef6a475d8c36133a8705..a51537d3da8e775004f692aec055cd0c51f391b2 100644 (file)
@@ -423,12 +423,12 @@ bool status_profile_dump(bool verbose)
 static int print_count_samples(
        const struct profile_stats * const current,
        const struct profile_stats * const last,
-       SMB_BIG_UINT delta_usec)
+       uint64_t delta_usec)
 {
        int i;
        int count = 0;
        unsigned step;
-       SMB_BIG_UINT spent;
+       uint64_t spent;
        int delta_sec;
        const char * name;
        char buf[40];
@@ -467,13 +467,13 @@ static int print_count_samples(
 }
 
 static struct profile_stats    sample_data[2];
-static SMB_BIG_UINT            sample_time[2];
+static uint64_t                sample_time[2];
 
 bool status_profile_rates(bool verbose)
 {
-       SMB_BIG_UINT remain_usec;
-       SMB_BIG_UINT next_usec;
-       SMB_BIG_UINT delta_usec;
+       uint64_t remain_usec;
+       uint64_t next_usec;
+       uint64_t delta_usec;
 
        int last = 0;
        int current = 1;
index 4370d49523a7cf59d721c9450fa880ab2a7f4d30..da129cf7c04c9368e57731530e9096ce383479c3 100644 (file)
@@ -56,7 +56,7 @@ cannot be set in the smb.conf file. nmbd will abort with this setting.\n");
                ret = 1;
        }
 
-       if (!directory_exist(lp_lockdir(), &st)) {
+       if (!directory_exist_stat(lp_lockdir(), &st)) {
                fprintf(stderr, "ERROR: lock directory %s does not exist\n",
                       lp_lockdir());
                ret = 1;
@@ -66,7 +66,7 @@ cannot be set in the smb.conf file. nmbd will abort with this setting.\n");
                ret = 1;
        }
 
-       if (!directory_exist(lp_piddir(), &st)) {
+       if (!directory_exist_stat(lp_piddir(), &st)) {
                fprintf(stderr, "ERROR: pid directory %s does not exist\n",
                       lp_piddir());
                ret = 1;
@@ -436,8 +436,8 @@ rameter is ignored when using CUPS libraries.\n",
        }
 
 done:
-       TALLOC_FREE(frame);
        gfree_loadparm();
+       TALLOC_FREE(frame);
        return ret;
 }
 
index 070e80cf91df831c331c8dd3459090dded38796f..ce36bd93101b4823f9975f46304fba8b1e726d2f 100644 (file)
@@ -451,7 +451,7 @@ static void cgi_download(char *file)
        if (S_ISDIR(st.st_mode))
        {
                snprintf(buf, sizeof(buf), "%s/index.html", file);
-               if (!file_exist(buf, &st) || !S_ISREG(st.st_mode))
+               if (!file_exist_stat(buf, &st) || !S_ISREG(st.st_mode))
                {
                        cgi_setup_error("404 File Not Found","",
                                        "The requested file was not found");
@@ -488,7 +488,8 @@ static void cgi_download(char *file)
                        printf("Content-Type: text/html\r\n");
                }
        }
-       printf("Expires: %s\r\n", http_timestring(time(NULL)+EXPIRY_TIME));
+       printf("Expires: %s\r\n", 
+                  http_timestring(talloc_tos(), time(NULL)+EXPIRY_TIME));
 
        lang = lang_tdb_current();
        if (lang) {
@@ -604,7 +605,7 @@ void cgi_setup(const char *rootdir, int auth_required)
        }
 
        printf("HTTP/1.0 200 OK\r\nConnection: close\r\n");
-       printf("Date: %s\r\n", http_timestring(time(NULL)));
+       printf("Date: %s\r\n", http_timestring(talloc_tos(), time(NULL)));
        baseurl = "";
        pathinfo = url+1;
 }
index 1502c5bc2f13519daef3016f42c9a3071398d8d3..27c4b54e2fd1a6e7a6b80b1850278b3606118f59 100644 (file)
@@ -384,7 +384,8 @@ static void show_parameters(int snum, int allparameters, unsigned int parm_filte
                                        break;
 
                                case P_LIST:
-                                       if (!str_list_compare(*(char ***)ptr, (char **)(parm->def.lvalue))) continue;
+                                       if (!str_list_equal(*(const char ***)ptr, 
+                                                           (const char **)(parm->def.lvalue))) continue;
                                        break;
 
                                case P_STRING:
@@ -595,7 +596,7 @@ static void ViewModeBoxes(int mode)
 ****************************************************************************/
 static void welcome_page(void)
 {
-       if (file_exist("help/welcome.html", NULL)) {
+       if (file_exist("help/welcome.html")) {
                include_html("help/welcome.html");
        } else {
                include_html("help/welcome-no-samba-doc.html");
@@ -1439,7 +1440,7 @@ const char *lang_msg_rotate(TALLOC_CTX *ctx, const char *msgid)
 
        cgi_load_variables();
 
-       if (!file_exist(get_dyn_CONFIGFILE(), NULL)) {
+       if (!file_exist(get_dyn_CONFIGFILE())) {
                have_read_access = True;
                have_write_access = True;
        } else {
index 9e66eed0c8882437d63d2335c5b724754afd7823..f9d3a9fbffdd68dc196126168ea757bee6148742 100644 (file)
@@ -228,7 +228,7 @@ static NTSTATUS idmap_tdb_open_db(TALLOC_CTX *memctx, TDB_CONTEXT **tdbctx)
                goto done;
        }
 
-       if (!file_exist(tdbfile, &stbuf)) {
+       if (!file_exist_stat(tdbfile, &stbuf)) {
                tdb_is_new = True;
        }
 
index 44b5415726a70c1ce887057d8c1c40ae1d65a575..5d4f21a8207657efe7fb6f405ee57b8264152433 100644 (file)
@@ -66,7 +66,7 @@ static bool reload_services_file(const char *logfile)
        if (lp_loaded()) {
                const char *fname = lp_configfile();
 
-               if (file_exist(fname,NULL) && !strcsequal(fname,get_dyn_CONFIGFILE())) {
+               if (file_exist(fname) && !strcsequal(fname,get_dyn_CONFIGFILE())) {
                        set_dyn_CONFIGFILE(fname);
                }
        }
@@ -1120,7 +1120,7 @@ int main(int argc, char **argv, char **envp)
                exit(1);
        }
 
-       if (!directory_exist(lp_lockdir(), NULL)) {
+       if (!directory_exist(lp_lockdir())) {
                mkdir(lp_lockdir(), 0755);
        }
 
index aeb52d9b5aa3d648049edb990217846a94f4a388..994c94b5befd7401a6dac4d4d4bff2c0c79a5438 100644 (file)
@@ -905,7 +905,7 @@ static bool calculate_next_machine_pwd_change(const char *domain,
        if (time(NULL) < (pass_last_set_time + timeout)) {
                next_change = pass_last_set_time + timeout;
                DEBUG(10,("machine password still valid until: %s\n",
-                       http_timestring(next_change)));
+                       http_timestring(talloc_tos(), next_change)));
                *t = timeval_set(next_change, 0);
                return true;
        }
index 3836c46e36fcb456e7b00c66dd779a08c5758764..95ccf30cfed1ff74e5dcee1c59518fbdd10983c2 100644 (file)
@@ -48,8 +48,6 @@ int count_all_current_connections(void);
 bool claim_connection(connection_struct *conn, const char *name,
                      uint32 msg_flags);
 bool register_message_flags(bool doreg, uint32 msg_flags);
-bool store_pipe_opendb( smb_np_struct *p );
-bool delete_pipe_opendb( smb_np_struct *p );
 
 /* The following definitions come from winbindd/winbindd.c  */
 
index 9fbea8e45b6416a8fc38ec12d96af8ce8a811ea0..d966e50159516560a162d0bd2616f0fdaf948f2a 100644 (file)
@@ -1018,7 +1018,7 @@ static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32 *seq)
                                             &info);
 
        if (NT_STATUS_IS_OK(result)) {
-               *seq = info->info2.sequence_num;
+               *seq = info->general.sequence_num;
                got_seq_num = True;
        }
 
index 1b5df9fa951849ee62a9b2a96fe069042595a585..26cab668c80135cc555a8a4bb50aa951b513a6aa 100644 (file)
@@ -48,7 +48,7 @@ endif
 
 include $(srcdir)/build/make/rules.mk
 include $(srcdir)/build/make/python.mk
-zlibsrcdir := lib/zlib
+zlibsrcdir := ../lib/zlib
 dynconfigsrcdir := dynconfig
 heimdalsrcdir := heimdal
 dsdbsrcdir := dsdb
@@ -74,7 +74,7 @@ socketwrappersrcdir := ../lib/socket_wrapper
 nsswrappersrcdir := ../lib/nss_wrapper
 appwebsrcdir := lib/appweb
 libstreamsrcdir := lib/stream
-libutilsrcdir := lib/util
+libutilsrcdir := ../lib/util
 libtdrsrcdir := lib/tdr
 libdbwrapsrcdir := lib/dbwrap
 libcryptosrcdir := ../lib/crypto
@@ -142,9 +142,9 @@ include $(srcdir)/static_deps.mk
 endif
 
 clean::
-       @find ../lib ../libcli -name '*.o' -o -name '*.hd' | xargs rm -f
+       @find ../lib ../libcli -name '*.o' -o -name '*.ho' | xargs rm -f
 
-DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \
+DEFAULT_HEADERS = $(srcdir)/../lib/util/dlinklist.h \
                  $(srcdir)/version.h
 
 libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
index 79c50ae5afff236b4df2546f5f0b44e063409ecb..52b10c633c3899ac0afb26f0674c5218418657ba 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef __CREDENTIALS_H__
 #define __CREDENTIALS_H__
 
-#include "util/data_blob.h"
+#include "../lib/util/data_blob.h"
 #include "librpc/gen_ndr/misc.h"
 
 struct ccache_container;
index 6c3bb2531eaef6715557e0856bd7933b2226a9ef..8f4f8c95610dffaf8029876df780d8908ad89bbd 100644 (file)
@@ -27,7 +27,7 @@
 #include "librpc/gen_ndr/samr.h" /* for struct samrPassword */
 #include "param/secrets.h"
 #include "system/filesys.h"
-#include "util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 #include "auth/credentials/credentials.h"
 #include "auth/credentials/credentials_krb5.h"
 #include "param/param.h"
@@ -118,7 +118,7 @@ _PUBLIC_ bool cli_credentials_parse_file(struct cli_credentials *cred, const cha
        char **lines;
        int i, numlines;
 
-       lines = file_lines_load(file, &numlines, NULL);
+       lines = file_lines_load(file, &numlines, 0, NULL);
 
        if (lines == NULL)
        {
index 6f82de82fcd0a9ecfa082af4815b839b17fc298f..e8918ef66d3bae20170f9e4c6426a7eca63f066a 100644 (file)
@@ -323,39 +323,39 @@ int gensec_sasl_log(void *context,
                    int sasl_log_level,
                    const char *message) 
 {
-       int debug_level;
+       int dl;
        switch (sasl_log_level) {
        case SASL_LOG_NONE:
-               debug_level = 0;
+               dl = 0;
                break;
        case SASL_LOG_ERR:
-               debug_level = 1;
+               dl = 1;
                break;
        case SASL_LOG_FAIL:
-               debug_level = 2;
+               dl = 2;
                break;
        case SASL_LOG_WARN:
-               debug_level = 3;
+               dl = 3;
                break;
        case SASL_LOG_NOTE:
-               debug_level = 5;
+               dl = 5;
                break;
        case SASL_LOG_DEBUG:
-               debug_level = 10;
+               dl = 10;
                break;
        case SASL_LOG_TRACE:
-               debug_level = 11;
+               dl = 11;
                break;
 #if DEBUG_PASSWORD
        case SASL_LOG_PASS:
-               debug_level = 100;
+               dl = 100;
                break;
 #endif
        default:
-               debug_level = 0;
+               dl = 0;
                break;
        }
-       DEBUG(debug_level, ("gensec_sasl: %s\n", message));
+       DEBUG(dl, ("gensec_sasl: %s\n", message));
 
        return SASL_OK;
 }
index 64c21d0c3e195d08e01e581e4f47e7ac61f764b9..76636bf89d976a06431bb61eeb43c5041ca2d771 100644 (file)
@@ -25,7 +25,7 @@
 #include "lib/ldb/include/ldb_errors.h"
 #include "dsdb/samdb/samdb.h"
 #include "ldb_wrap.h"
-#include "util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 #include "libcli/auth/libcli_auth.h"
 #include "auth/auth.h"
 #include "param/param.h"
index 5ea8cf71002b9d386b3909e5d8a85e3242da6062..a79f15b8eebeb6169899509686ffe55333295b6a 100644 (file)
@@ -23,7 +23,7 @@
 #include "includes.h"
 #include "auth/gensec/spnego.h"
 #include "auth/gensec/gensec.h"
-#include "lib/util/asn1.h"
+#include "../lib/util/asn1.h"
 
 static bool read_negTokenInit(struct asn1_data *asn1, TALLOC_CTX *mem_ctx,
                              struct spnego_negTokenInit *token)
index 77e907d3fae6217a766b6aee0650f64ca77aa0a0..e5b13fc70dca45f06f17162cbb668b0909959858 100644 (file)
@@ -22,7 +22,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/asn1.h"
+#include "../lib/util/asn1.h"
 #include "auth/gensec/gensec.h"
 
 /*
index 0f1ef3ccdb71e24b13d1d445f2cebb30ebfc2192..bf6dc846e74bf949771b31805486244a66e4b633 100644 (file)
@@ -19,7 +19,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "auth/auth.h"
 #include "auth/ntlm/auth_proto.h"
 #include "lib/events/events.h"
index 1b8233b8a49219b0eab4e3013bf4da789112fa28..78429106f634732b79e45858e1d48f3774231501 100644 (file)
@@ -23,7 +23,7 @@
 #include "librpc/gen_ndr/ndr_netlogon.h"
 #include "system/time.h"
 #include "lib/ldb/include/ldb.h"
-#include "util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 #include "auth/auth.h"
 #include "auth/ntlm/ntlm_check.h"
 #include "auth/ntlm/auth_proto.h"
@@ -248,7 +248,7 @@ static NTSTATUS authsam_authenticate(struct auth_context *auth_context,
                }
        }
 
-       nt_status = samdb_result_passwords(mem_ctx, msgs[0], &lm_pwd, &nt_pwd);
+       nt_status = samdb_result_passwords(mem_ctx, auth_context->lp_ctx, msgs[0], &lm_pwd, &nt_pwd);
        NT_STATUS_NOT_OK_RETURN(nt_status);
 
        nt_status = authsam_password_ok(auth_context, mem_ctx, 
index 539ae6aa80a1e9181cf3974dda437012415cc502..fde9835cf2c5fe1b321618662b1d75ddba0b41f0 100644 (file)
@@ -112,7 +112,6 @@ static NTSTATUS server_check_password(struct auth_method_context *ctx,
        NTSTATUS nt_status;
        struct auth_serversupplied_info *server_info;
        struct cli_credentials *creds;
-       const char *user;
        struct smb_composite_sesssetup session_setup;
 
        struct smbcli_session *session = talloc_get_type(ctx->private_data, struct smbcli_session);
index a2090afcdc53372ee1e1e559b2b668ccaa4506a0..d04a254d6c87512d9b62d262a4ce947feb5de107 100644 (file)
@@ -23,7 +23,7 @@
 #include "system/time.h"
 #include "auth/auth.h"
 #include <ldb.h>
-#include "util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 #include "dsdb/samdb/samdb.h"
 #include "libcli/security/security.h"
 #include "libcli/ldap/ldap.h"
@@ -207,7 +207,7 @@ _PUBLIC_ NTSTATUS authsam_account_ok(TALLOC_CTX *mem_ctx,
        if (logon_workstation && workstation_list && *workstation_list) {
                bool invalid_ws = true;
                int i;
-               const char **workstations = str_list_make(mem_ctx, workstation_list, ",");
+               const char **workstations = (const char **)str_list_make(mem_ctx, workstation_list, ",");
                
                for (i = 0; workstations && workstations[i]; i++) {
                        DEBUG(10,("sam_account_ok: checking for workstation match '%s' and '%s'\n",
index f497684453982e89f6dbe1ef8023eaf30e61371c..343913f884636e9afa26229f7c776e6387f28bbc 100644 (file)
@@ -6,34 +6,28 @@ dnl  Released under the GNU GPL
 dnl -------------------------------------------------------
 dnl
 
+AC_DEFUN([AC_SAMBA_GNU_MAKE],
+[
 AC_PATH_PROGS(MAKE,gmake make)
 
 AC_CACHE_CHECK([whether we have GNU make], samba_cv_gnu_make, [
 if ! $ac_cv_path_MAKE --version | head -1 | grep GNU 2>/dev/null >/dev/null
 then
-       AC_MSG_ERROR([Unable to find GNU make])
+       samba_cv_gnu_make=no
+else
+       samba_cv_gnu_make=yes
+fi
+])
+if test x$samba_cv_gnu_make = xyes; then
+       $1
+else
+       $2
 fi
 ])
 
+AC_DEFUN([AC_SAMBA_GNU_MAKE_VERSION], 
+[
 AC_CACHE_CHECK([GNU make version], samba_cv_gnu_make_version,[
                samba_cv_gnu_make_version=`$ac_cv_path_MAKE --version | head -1 | cut -d " " -f 3 2>/dev/null`
        ])
-       GNU_MAKE_VERSION=$samba_cv_gnu_make_version
-       AC_SUBST(GNU_MAKE_VERSION)
-
-
-new_make=no
-AC_MSG_CHECKING([for GNU make >= 3.81])
-if $PERL -e " \$_ = '$GNU_MAKE_VERSION'; s/@<:@^\d\.@:>@.*//g; exit (\$_ < 3.81);"; then
-       new_make=yes
-fi
-AC_MSG_RESULT($new_make)
-automatic_dependencies=no
-AX_CFLAGS_GCC_OPTION([-M -MT conftest.d -MF conftest.o], [], [ automatic_dependencies=$new_make ], [])
-AC_MSG_CHECKING([Whether to use automatic dependencies])
-AC_ARG_ENABLE(automatic-dependencies,
-[  --enable-automatic-dependencies Enable automatic dependencies],
-[ automatic_dependencies=$enableval ], 
-[ automatic_dependencies=no ])
-AC_MSG_RESULT($automatic_dependencies)
-AC_SUBST(automatic_dependencies)
+])
index 666dd3b0ae7fdd5c975a1ffc359936e98cb660ad..f7266e6e446459fba6e743a4cfcad3905cd5764b 100644 (file)
@@ -43,7 +43,7 @@ if test x$fhs = xyes; then
     winbindd_privileged_socket_dir="${localstatedir}/lib/samba/winbindd_privileged"
 else
        # Check to prevent installing directly under /usr without the FHS
-       AS_IF([test $prefix == /usr || $prefix == /usr/local],[
+       AS_IF([test $prefix == /usr || test $prefix == /usr/local],[
                AC_MSG_ERROR([Don't install directly under "/usr" or "/usr/local" without using the FHS option (--enable-fhs). This could lead to file loss!])
        ])
 fi
index 82ca2424999d00c0c5e3299cd38a700dfbe0c7ef..aaec9cf950883e97efbc7859b987361f927da81e 100644 (file)
@@ -5,6 +5,8 @@ dnl  Released under the GNU GPL
 dnl -------------------------------------------------------
 dnl
 
+AC_DEFUN([AC_SAMBA_PERL],
+[
 case "$host_os" in
        *irix*)
                # On IRIX, we prefer Freeware or Nekoware Perl, because the
@@ -18,11 +20,13 @@ esac
 
 if test x"$PERL" = x""; then
        AC_MSG_WARN([No version of perl was found!])
-       AC_MSG_ERROR([Please install perl from http://www.perl.com/])
+       $2
+else
+       if test x"$debug" = x"yes";then
+               PERL="$PERL -W"
+       fi
+       export PERL
+       $1
 fi
-if test x"$debug" = x"yes";then
-       PERL="$PERL -W"
-fi
-export PERL
+])
 
-AC_PATH_PROG(YAPP, yapp, false)
diff --git a/source4/build/m4/check_python.m4 b/source4/build/m4/check_python.m4
new file mode 100644 (file)
index 0000000..96f93a3
--- /dev/null
@@ -0,0 +1,89 @@
+dnl Autoconf macros for finding a Python development environment
+dnl
+dnl Copyright (C) 2007-2008 Jelmer Vernooij <jelmer@samba.org>
+dnl Published under the GNU GPL, v3 or later
+dnl
+AC_ARG_VAR([PYTHON_VERSION],[The installed Python
+       version to use, for example '2.3'. This string 
+       will be appended to the Python interpreter
+       canonical name.])
+
+AC_DEFUN([TRY_LINK_PYTHON],
+[
+       if test $working_python = no; then
+               ac_save_LIBS="$LIBS"
+               ac_save_CFLAGS="$CFLAGS"
+               LIBS="$LIBS $1"
+               CFLAGS="$CFLAGS $2"
+
+               AC_TRY_LINK([
+                               /* we have our own configure tests */
+                               #include <Python.h>
+                       ],[
+                               Py_InitModule(NULL, NULL);
+                       ],[
+                               PYTHON_LDFLAGS="$1"
+                               PYTHON_CFLAGS="$2"
+                               working_python=yes
+                       ])
+               LIBS="$ac_save_LIBS"
+               CFLAGS="$ac_save_CFLAGS"
+       fi
+])
+
+dnl Try to find a Python implementation including header files
+dnl AC_SAMBA_PYTHON_DEVEL(RUN-IF-FOUND, RUN-IF-NOT-FOUND)
+dnl
+dnl Will set the following variables:
+dnl $PYTHON
+dnl $PYTHON_CONFIG (if found)
+dnl $PYTHON_CFLAGS
+dnl $PYTHON_LDFLAGS
+AC_DEFUN([AC_SAMBA_PYTHON_DEVEL],
+[
+       AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]])
+       if test -z "$PYTHON"; then
+               working_python=no
+               AC_MSG_WARN([No python found])
+       fi
+
+       dnl assume no working python
+       working_python=no
+
+       if test -z "$PYTHON_VERSION"; then 
+               AC_PATH_PROGS([PYTHON_CONFIG], [python2.6-config python2.5-config python2.4-config python-config])
+       else 
+               AC_PATH_PROG([PYTHON_CONFIG], [python[$PYTHON_VERSION]-config])
+       fi
+
+       if test -z "$PYTHON_CONFIG"; then
+               AC_MSG_WARN([No python-config found])
+       else
+               TRY_LINK_PYTHON([`$PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --includes`])
+               TRY_LINK_PYTHON([`$PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --cflags`])
+               if test x$working_python = xno; then
+                       # It seems the library path isn't included on some systems
+                       base=`$PYTHON_CONFIG --prefix`
+                       TRY_LINK_PYTHON([`echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --includes`])
+                       TRY_LINK_PYTHON([`echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --cflags`])
+               fi
+       fi
+
+       if test x$PYTHON != x
+       then
+               DISTUTILS_CFLAGS=`$PYTHON -c "from distutils import sysconfig; print '-I%s -I%s %s' % (sysconfig.get_python_inc(), sysconfig.get_python_inc(plat_specific=1), sysconfig.get_config_var('CFLAGS'))"`
+               DISTUTILS_LDFLAGS=`$PYTHON -c "from distutils import sysconfig; print '%s %s -lpython%s -L%s' % (sysconfig.get_config_var('LIBS'), sysconfig.get_config_var('SYSLIBS'), sysconfig.get_config_var('VERSION'), sysconfig.get_config_var('LIBPL'))"`
+               TRY_LINK_PYTHON($DISTUTILS_LDFLAGS, $DISTUTILS_CFLAGS)
+       fi
+
+       AC_MSG_CHECKING(working python module support)
+       if test $working_python = yes; then
+               AC_MSG_RESULT([yes])
+               $1
+       else
+               AC_MSG_RESULT([no])
+               $2
+       fi
+])
+
+
index 6c040b9babc276a5563a810f149e4292506b1031..4cde95d5e7a308be8f712d44c044e79ef601d44a 100644 (file)
@@ -1,6 +1,7 @@
 dnl SMB Build Environment Checks
 dnl -------------------------------------------------------
 dnl  Copyright (C) Stefan (metze) Metzmacher 2004
+dnl  Copyright (C) Jelmer Vernooij 2005,2008
 dnl  Released under the GNU GPL
 dnl -------------------------------------------------------
 dnl
@@ -40,7 +41,54 @@ fi
 
 m4_include(build/m4/check_path.m4)
 m4_include(build/m4/check_perl.m4)
+
+AC_SAMBA_PERL([], [AC_MSG_ERROR([Please install perl from http://www.perl.com/])])
+
+AC_PATH_PROG(YAPP, yapp, false)
+
 m4_include(build/m4/check_cc.m4)
 m4_include(build/m4/check_ld.m4)
 m4_include(build/m4/check_make.m4)
+
+AC_SAMBA_GNU_MAKE([AC_MSG_RESULT(found)], [AC_MSG_ERROR([Unable to find GNU make])])
+AC_SAMBA_GNU_MAKE_VERSION()
+GNU_MAKE_VERSION=$samba_cv_gnu_make_version
+AC_SUBST(GNU_MAKE_VERSION)
+
+new_make=no
+AC_MSG_CHECKING([for GNU make >= 3.81])
+if $PERL -e " \$_ = '$GNU_MAKE_VERSION'; s/@<:@^\d\.@:>@.*//g; exit (\$_ < 3.81);"; then
+       new_make=yes
+fi
+AC_MSG_RESULT($new_make)
+automatic_dependencies=no
+AX_CFLAGS_GCC_OPTION([-M -MT conftest.d -MF conftest.o], [], [ automatic_dependencies=$new_make ], [])
+AC_MSG_CHECKING([Whether to use automatic dependencies])
+AC_ARG_ENABLE(automatic-dependencies,
+[  --enable-automatic-dependencies Enable automatic dependencies],
+[ automatic_dependencies=$enableval ], 
+[ automatic_dependencies=no ])
+AC_MSG_RESULT($automatic_dependencies)
+AC_SUBST(automatic_dependencies)
+
 m4_include(build/m4/check_doc.m4)
+
+m4_include(build/m4/check_python.m4)
+
+m4_include(build/m4/ac_pkg_swig.m4)
+
+AC_PROG_SWIG(1.3.36)
+
+AC_SAMBA_PYTHON_DEVEL([
+SMB_EXT_LIB(EXT_LIB_PYTHON, [$PYTHON_LDFLAGS], [$PYTHON_CFLAGS])
+SMB_ENABLE(EXT_LIB_PYTHON,YES)
+SMB_ENABLE(LIBPYTHON,YES)
+],[
+AC_MSG_ERROR([Python not found. Please install Python 2.x and its development headers/libraries.])
+])
+
+AC_MSG_CHECKING(python library directory)
+pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1, 0, '\\${prefix}')"`
+AC_MSG_RESULT($pythondir)
+
+AC_SUBST(pythondir)
index 1cb0d50d02befef0bc44d8d16d4ec5d941890c72..3c12954c31f8be98e3f13b806c37e218ea1d3619 100644 (file)
@@ -282,8 +282,8 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
        server_type      = 
                NBT_SERVER_DS | NBT_SERVER_TIMESERV |
                NBT_SERVER_CLOSEST | NBT_SERVER_WRITABLE | 
-               NBT_SERVER_GOOD_TIMESERV | NBT_SERVER_DS_DNS_CONTR |
-               NBT_SERVER_DS_DNS_DOMAIN;
+               NBT_SERVER_GOOD_TIMESERV | DS_DNS_CONTROLLER |
+               DS_DNS_DOMAIN;
 
        if (samdb_is_pdc(sam_ctx)) {
                server_type |= NBT_SERVER_PDC;
@@ -302,7 +302,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
        }
 
        if (ldb_dn_compare(ldb_get_root_basedn(sam_ctx), ldb_get_default_basedn(sam_ctx)) == 0) {
-               server_type |= NBT_SERVER_DS_DNS_FOREST;
+               server_type |= DS_DNS_FOREST;
        }
 
        pdc_name         = talloc_asprintf(mem_ctx, "\\\\%s", lp_netbios_name(lp_ctx));
@@ -349,7 +349,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
                if (version & NETLOGON_NT_VERSION_5EX_WITH_IP) {
                        /* Clearly this needs to be fixed up for IPv6 */
                        extra_flags = NETLOGON_NT_VERSION_5EX_WITH_IP;
-                       netlogon->data.nt5_ex.sockaddr.sa_family    = 2;
+                       netlogon->data.nt5_ex.sockaddr.sockaddr_family    = 2;
                        netlogon->data.nt5_ex.sockaddr.pdc_ip       = pdc_ip;
                        netlogon->data.nt5_ex.sockaddr.remaining = data_blob_talloc_zero(mem_ctx, 8);
                }
index 266bd670250da182465ef41b04f58789c3920eb9..3213c8931ff33ac0d1aac88decbe8a1f468b3dc0 100644 (file)
@@ -41,7 +41,7 @@
 #include "libcli/util/clilsa.h"
 #include "system/dir.h"
 #include "system/filesys.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "system/readline.h"
 #include "auth/credentials/credentials.h"
 #include "auth/gensec/gensec.h"
@@ -2754,7 +2754,7 @@ process a -c command string
 ****************************************************************************/
 static int process_command_string(struct smbclient_context *ctx, const char *cmd)
 {
-       const char **lines;
+       char **lines;
        int i, rc = 0;
 
        lines = str_list_make(NULL, cmd, ";");
index cc61974cbd06adcadbd9dcdf96ffc75b7ab6eee4..c09d10900b99f532e30a9b5cf6610c375a818fdd 100644 (file)
@@ -23,6 +23,7 @@
 #include "cluster/cluster.h"
 #include "cluster/cluster_private.h"
 #include "librpc/gen_ndr/misc.h"
+#include "librpc/gen_ndr/security.h"
 
 static struct cluster_ops *ops;
 
index a22cd09745f83346a9db2efe1938c23e62fe24fb..a83dd7aebe8f2ee9250323af4a33f7422a40b25f 100644 (file)
 #include "includes.h"
 #include "tdb_wrap.h"
 #include "../tdb/include/tdb.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "lib/events/events.h"
 #include "system/network.h"
 #include "system/filesys.h"
 #include "../include/ctdb_private.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 
 /*
   allocate a packet for use in client<->daemon communication
index ecdbeae5160414bb3bb9ba910705a77e6d0f8cee..9116bd69f72ccffa683de0ff29d141843ea17b1e 100644 (file)
@@ -23,7 +23,7 @@
 #include "includes.h"
 #include "../tdb/include/tdb.h"
 #include "lib/events/events.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "system/network.h"
 #include "system/filesys.h"
 #include "../include/ctdb_private.h"
index cae0aea0d92c6c16da6312c08b81cc80093074b1..e9ee55f6a731186ef92bc84af02db5bf127011df 100644 (file)
@@ -24,7 +24,7 @@
 #include "system/filesys.h"
 #include "../include/ctdb_private.h"
 #include "tdb_wrap.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 
 /*
   find an attached ctdb_db handle given a name
index 28811b77f15960efb22ea2843f918bf0280719e1..323e90c9e0120ec865a988840a1738cc4f623ab4 100644 (file)
@@ -26,7 +26,7 @@
 #include "system/network.h"
 #include "system/filesys.h"
 #include "../include/ctdb_private.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 
 /*
   this dispatches the messages to the registered ctdb message handler
index e782091eec229967b43cef776b96c6bf65385401..51f6d984e76b4fd36e3f7449747c5d78bf3d3838 100644 (file)
@@ -27,9 +27,9 @@
 #include "../tdb/include/tdb.h"
 #include "include/ctdb.h"
 #include "tdb_wrap.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "param/param.h"
-#include "librpc/gen_ndr/misc.h"
+#include "librpc/gen_ndr/security.h"
 
 /* a linked list of messaging handlers, allowing incoming messages
    to be directed to the right messaging context */
index f0357f0b073a0666052f2116a38974a293cc7e08..5b872a3e2ec47bb0f415fb8927062f4a0ddfd409 100644 (file)
@@ -26,7 +26,7 @@
 #include "tdb_wrap.h"
 #include "system/filesys.h"
 #include "param/param.h"
-#include "librpc/gen_ndr/misc.h"
+#include "librpc/gen_ndr/security.h"
 
 /*
   server a server_id for the local node
index 611b8dd104bcf70f7de104354ed70c145c0fb52f..9d387fcb4c1a7b193f73f81870079cf96e4c3362 100644 (file)
@@ -14,24 +14,29 @@ m4_include(build/m4/env.m4)
 m4_include(../lib/replace/samba.m4)
 m4_include(lib/smbreadline/readline.m4)
 m4_include(heimdal_build/config.m4)
-m4_include(lib/util/fault.m4)
-m4_include(lib/util/signal.m4)
-m4_include(lib/util/util.m4)
-m4_include(lib/util/fsusage.m4)
-m4_include(lib/util/xattr.m4)
-m4_include(lib/util/capability.m4)
-m4_include(lib/util/time.m4)
+m4_include(../lib/util/fault.m4)
+m4_include(../lib/util/signal.m4)
+m4_include(../lib/util/util.m4)
+m4_include(../lib/util/fsusage.m4)
+m4_include(../lib/util/xattr.m4)
+m4_include(../lib/util/capability.m4)
+m4_include(../lib/util/time.m4)
 m4_include(../lib/popt/samba.m4)
 m4_include(lib/charset/config.m4)
 m4_include(lib/socket/config.m4)
-m4_include(lib/zlib.m4)
+m4_include(../lib/zlib/zlib.m4)
+AC_ZLIB([
+SMB_EXT_LIB(ZLIB, [${ZLIB_LIBS}])
+],[
+SMB_INCLUDE_MK(lib/zlib.mk)
+])
 m4_include(nsswitch/nsstest.m4)
 m4_include(../pidl/config.m4)
 
 AC_CONFIG_FILES(lib/registry/registry.pc)
 AC_CONFIG_FILES(lib/events/events.pc)
 AC_CONFIG_FILES(librpc/dcerpc.pc)
-AC_CONFIG_FILES(librpc/ndr.pc)
+AC_CONFIG_FILES(../librpc/ndr.pc)
 AC_CONFIG_FILES(lib/torture/torture.pc)
 AC_CONFIG_FILES(auth/gensec/gensec.pc)
 AC_CONFIG_FILES(param/samba-hostconfig.pc)
@@ -94,7 +99,6 @@ m4_include(lib/tls/config.m4)
 m4_include(lib/events/libevents.m4)
 
 dnl m4_include(auth/kerberos/config.m4)
-m4_include(scripting/python/config.m4)
 m4_include(auth/gensec/config.m4)
 m4_include(smbd/process_model.m4)
 m4_include(ntvfs/posix/config.m4)
@@ -158,7 +162,7 @@ then
        builddir_headers="-I\$(builddir)/include -I\$(builddir) -I\$(builddir)/lib ";
 fi
 
-CPPFLAGS="$builddir_headers-I\$(srcdir)/include -I\$(srcdir) -I\$(srcdir)/lib -I\$(srcdir)/../lib/replace -I\$(srcdir)/../lib/talloc -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H $CPPFLAGS"
+CPPFLAGS="$builddir_headers-I\$(srcdir)/include -I\$(srcdir) -I\$(srcdir)/lib -I\$(srcdir)/../lib/replace -I\$(srcdir)/../lib/talloc -I\$(srcdir)/.. -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H $CPPFLAGS"
 
 SMB_WRITE_PERLVARS(build/smb_build/config.pm)
 
index 20bba7a0d93aa413955509da1537e58eca08261f..31b56ea52f0418a1b988f976acfb9ab526bf9264 100644 (file)
@@ -26,7 +26,7 @@
 #include "auth/auth.h"
 #include "libcli/ldap/ldap_ndr.h"
 #include "lib/ldb/include/ldb.h"
-#include "util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 #include "libcli/security/security.h"
 #include "param/param.h"
 
index 2b74d722a18bbccbdfaa247ec3ce2821cb47c794..6a6f370943e241421e416faed8ac43f816b67540 100644 (file)
@@ -25,7 +25,8 @@
 #include "events.h"
 #include "ldb.h"
 #include "ldb_errors.h"
-#include "lib/util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
+#include "../lib/crypto/crypto.h"
 #include "dsdb/samdb/samdb.h"
 #include "libcli/security/security.h"
 #include "librpc/gen_ndr/ndr_security.h"
@@ -571,7 +572,7 @@ uint_t samdb_result_hashes(TALLOC_CTX *mem_ctx, struct ldb_message *msg,
        return count;
 }
 
-NTSTATUS samdb_result_passwords(TALLOC_CTX *mem_ctx, struct ldb_message *msg, 
+NTSTATUS samdb_result_passwords(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, struct ldb_message *msg, 
                                struct samr_Password **lm_pwd, struct samr_Password **nt_pwd) 
 {
        struct samr_Password *lmPwdHash, *ntPwdHash;
@@ -587,14 +588,21 @@ NTSTATUS samdb_result_passwords(TALLOC_CTX *mem_ctx, struct ldb_message *msg,
                }
        }
        if (lm_pwd) {
-               int num_lm;
-               num_lm = samdb_result_hashes(mem_ctx, msg, "dBCSPwd", &lmPwdHash);
-               if (num_lm == 0) {
-                       *lm_pwd = NULL;
-               } else if (num_lm > 1) {
-                       return NT_STATUS_INTERNAL_DB_CORRUPTION;
+               /* Ensure that if we have turned off LM
+                * authentication, that we never use the LM hash, even
+                * if we store it */
+               if (lp_lanman_auth(lp_ctx)) {
+                       int num_lm;
+                       num_lm = samdb_result_hashes(mem_ctx, msg, "dBCSPwd", &lmPwdHash);
+                       if (num_lm == 0) {
+                               *lm_pwd = NULL;
+                       } else if (num_lm > 1) {
+                               return NT_STATUS_INTERNAL_DB_CORRUPTION;
+                       } else {
+                               *lm_pwd = &lmPwdHash[0];
+                       }
                } else {
-                       *lm_pwd = &lmPwdHash[0];
+                       *lm_pwd = NULL;
                }
        }
        return NT_STATUS_OK;
@@ -1531,7 +1539,7 @@ NTSTATUS samdb_set_password(struct ldb_context *ctx, TALLOC_CTX *mem_ctx,
                            struct ldb_dn *user_dn,
                            struct ldb_dn *domain_dn,
                            struct ldb_message *mod,
-                           const char *new_pass,
+                           const DATA_BLOB *new_password,
                            struct samr_Password *lmNewHash, 
                            struct samr_Password *ntNewHash,
                            bool user_change,
@@ -1632,40 +1640,47 @@ NTSTATUS samdb_set_password(struct ldb_context *ctx, TALLOC_CTX *mem_ctx,
                *_dominfo = dominfo;
        }
 
-       if (restrictions && new_pass) {
-
+       if (restrictions && new_password) {
+               char *new_pass;
+               
                /* check the various password restrictions */
-               if (restrictions && minPwdLength > strlen_m(new_pass)) {
+               if (restrictions && minPwdLength > utf16_len_n(new_password->data, new_password->length) / 2) {
                        if (reject_reason) {
                                *reject_reason = SAMR_REJECT_TOO_SHORT;
                        }
                        return NT_STATUS_PASSWORD_RESTRICTION;
                }
+
+               /* Create the NT hash */
+               mdfour(local_ntNewHash.hash, new_password->data, new_password->length);
                
-               /* possibly check password complexity */
-               if (restrictions && pwdProperties & DOMAIN_PASSWORD_COMPLEX &&
-                   !samdb_password_complexity_ok(new_pass)) {
-                       if (reject_reason) {
-                               *reject_reason = SAMR_REJECT_COMPLEXITY;
+               ntNewHash = &local_ntNewHash;
+
+               /* Only check complexity if we can convert it at all.  Assuming unconvertable passwords are 'strong' */
+               if (convert_string_talloc(mem_ctx, lp_iconv_convenience(ldb_get_opaque(ctx, "loadparm")), 
+                                         CH_UTF16, CH_UNIX, 
+                                         new_password->data, new_password->length, 
+                                         (void **)&new_pass) != -1) {
+                       
+                       
+                       /* possibly check password complexity */
+                       if (restrictions && pwdProperties & DOMAIN_PASSWORD_COMPLEX &&
+                           !samdb_password_complexity_ok(new_pass)) {
+                               if (reject_reason) {
+                                       *reject_reason = SAMR_REJECT_COMPLEXITY;
+                               }
+                               return NT_STATUS_PASSWORD_RESTRICTION;
                        }
-                       return NT_STATUS_PASSWORD_RESTRICTION;
-               }
-               
-               /* compute the new nt and lm hashes */
-               if (E_deshash(new_pass, local_lmNewHash.hash)) {
-                       lmNewHash = &local_lmNewHash;
-               }
-               if (!E_md4hash(new_pass, local_ntNewHash.hash)) {
-                       /* If we can't convert this password to UCS2, then we should not accept it */
-                       if (reject_reason) {
-                               *reject_reason = SAMR_REJECT_OTHER;
+                       
+                       /* compute the new lm hashes (for checking history - case insenitivly!) */
+                       if (E_deshash(new_pass, local_lmNewHash.hash)) {
+                               lmNewHash = &local_lmNewHash;
                        }
-                       return NT_STATUS_PASSWORD_RESTRICTION;
+                       
                }
-               ntNewHash = &local_ntNewHash;
        }
 
-       if (user_change) {
+       if (restrictions && user_change) {
                /* are all password changes disallowed? */
                if (pwdProperties & DOMAIN_REFUSE_PASSWORD_CHANGE) {
                        if (reject_reason) {
@@ -1731,16 +1746,15 @@ NTSTATUS samdb_set_password(struct ldb_context *ctx, TALLOC_CTX *mem_ctx,
 #define CHECK_RET(x) do { if (x != 0) return NT_STATUS_NO_MEMORY; } while(0)
 
        /* the password is acceptable. Start forming the new fields */
-       if (new_pass) {
-               /* if we know the cleartext, then only set it.
+       if (new_password) {
+               /* if we know the cleartext UTF16 password, then set it.
                 * Modules in ldb will set all the appropriate
                 * hashes */
-               CHECK_RET(samdb_msg_add_string(ctx, mem_ctx, mod, 
-                                              "userPassword", new_pass));
+               CHECK_RET(ldb_msg_add_value(mod, "clearTextPassword", new_password, NULL));
        } else {
                /* We don't have the cleartext, so delete the old one
                 * and set what we have of the hashes */
-               CHECK_RET(samdb_msg_add_delete(ctx, mem_ctx, mod, "userPassword"));
+               CHECK_RET(samdb_msg_add_delete(ctx, mem_ctx, mod, "clearTextPassword"));
 
                if (lmNewHash) {
                        CHECK_RET(samdb_msg_add_hash(ctx, mem_ctx, mod, "dBCSPwd", lmNewHash));
@@ -1769,7 +1783,7 @@ NTSTATUS samdb_set_password(struct ldb_context *ctx, TALLOC_CTX *mem_ctx,
 */
 NTSTATUS samdb_set_password_sid(struct ldb_context *ctx, TALLOC_CTX *mem_ctx,
                                const struct dom_sid *user_sid,
-                               const char *new_pass,
+                               const DATA_BLOB *new_pass,
                                struct samr_Password *lmNewHash, 
                                struct samr_Password *ntNewHash,
                                bool user_change,
@@ -1912,7 +1926,7 @@ struct ldb_dn *samdb_dns_domain_to_dn(struct ldb_context *ldb, TALLOC_CTX *mem_c
                return NULL;
        }
        
-       split_realm = str_list_make(tmp_ctx, dns_domain, ".");
+       split_realm = (const char **)str_list_make(tmp_ctx, dns_domain, ".");
        if (!split_realm) {
                talloc_free(tmp_ctx);
                return NULL;
index 80b398ef5c93ba49d37e34b1c8efec3e94ec50f0..c292c6db744e4001f3ddcb834bf1ebf69287c56e 100644 (file)
@@ -27,7 +27,7 @@
 #include "lib/messaging/irpc.h"
 #include "dsdb/repl/drepl_service.h"
 #include "lib/ldb/include/ldb_errors.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "librpc/gen_ndr/ndr_drsuapi.h"
 #include "librpc/gen_ndr/ndr_drsblobs.h"
@@ -246,40 +246,42 @@ static void dreplsrv_op_pull_source_get_changes_send(struct dreplsrv_op_pull_sou
        r = talloc(st, struct drsuapi_DsGetNCChanges);
        if (composite_nomem(r, c)) return;
 
-       r->in.level = talloc(r, int32_t);
-       if (composite_nomem(r->in.level, c)) return;
-       r->out.level = talloc(r, int32_t);
-       if (composite_nomem(r->out.level, c)) return;
+       r->out.level_out = talloc(r, int32_t);
+       if (composite_nomem(r->out.level_out, c)) return;
+       r->in.req = talloc(r, union drsuapi_DsGetNCChangesRequest);
+       if (composite_nomem(r->in.req, c)) return;
+       r->out.ctr = talloc(r, union drsuapi_DsGetNCChangesCtr);
+       if (composite_nomem(r->out.ctr, c)) return;
 
        r->in.bind_handle       = &drsuapi->bind_handle;
        if (drsuapi->remote_info28.supported_extensions & DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8) {
-               *r->in.level                            = 8;
-               r->in.req.req8.destination_dsa_guid     = service->ntds_guid;
-               r->in.req.req8.source_dsa_invocation_id = rf1->source_dsa_invocation_id;
-               r->in.req.req8.naming_context           = &partition->nc;
-               r->in.req.req8.highwatermark            = rf1->highwatermark;
-               r->in.req.req8.uptodateness_vector      = NULL;/*&partition->uptodatevector_ex;*/
-               r->in.req.req8.replica_flags            = rf1->replica_flags;
-               r->in.req.req8.max_object_count         = 133;
-               r->in.req.req8.max_ndr_size             = 1336811;
-               r->in.req.req8.extended_op              = DRSUAPI_EXOP_NONE;
-               r->in.req.req8.fsmo_info                = 0;
-               r->in.req.req8.partial_attribute_set    = NULL;
-               r->in.req.req8.partial_attribute_set_ex = NULL;
-               r->in.req.req8.mapping_ctr.num_mappings = 0;
-               r->in.req.req8.mapping_ctr.mappings     = NULL;
+               r->in.level                             = 8;
+               r->in.req->req8.destination_dsa_guid    = service->ntds_guid;
+               r->in.req->req8.source_dsa_invocation_id= rf1->source_dsa_invocation_id;
+               r->in.req->req8.naming_context          = &partition->nc;
+               r->in.req->req8.highwatermark           = rf1->highwatermark;
+               r->in.req->req8.uptodateness_vector     = NULL;/*&partition->uptodatevector_ex;*/
+               r->in.req->req8.replica_flags           = rf1->replica_flags;
+               r->in.req->req8.max_object_count        = 133;
+               r->in.req->req8.max_ndr_size            = 1336811;
+               r->in.req->req8.extended_op             = DRSUAPI_EXOP_NONE;
+               r->in.req->req8.fsmo_info               = 0;
+               r->in.req->req8.partial_attribute_set   = NULL;
+               r->in.req->req8.partial_attribute_set_ex= NULL;
+               r->in.req->req8.mapping_ctr.num_mappings= 0;
+               r->in.req->req8.mapping_ctr.mappings    = NULL;
        } else {
-               *r->in.level                            = 5;
-               r->in.req.req5.destination_dsa_guid     = service->ntds_guid;
-               r->in.req.req5.source_dsa_invocation_id = rf1->source_dsa_invocation_id;
-               r->in.req.req5.naming_context           = &partition->nc;
-               r->in.req.req5.highwatermark            = rf1->highwatermark;
-               r->in.req.req5.uptodateness_vector      = NULL;/*&partition->uptodatevector_ex;*/
-               r->in.req.req5.replica_flags            = rf1->replica_flags;
-               r->in.req.req5.max_object_count         = 133;
-               r->in.req.req5.max_ndr_size             = 1336770;
-               r->in.req.req5.extended_op              = DRSUAPI_EXOP_NONE;
-               r->in.req.req5.fsmo_info                = 0;
+               r->in.level                             = 5;
+               r->in.req->req5.destination_dsa_guid    = service->ntds_guid;
+               r->in.req->req5.source_dsa_invocation_id= rf1->source_dsa_invocation_id;
+               r->in.req->req5.naming_context          = &partition->nc;
+               r->in.req->req5.highwatermark           = rf1->highwatermark;
+               r->in.req->req5.uptodateness_vector     = NULL;/*&partition->uptodatevector_ex;*/
+               r->in.req->req5.replica_flags           = rf1->replica_flags;
+               r->in.req->req5.max_object_count        = 133;
+               r->in.req->req5.max_ndr_size            = 1336770;
+               r->in.req->req5.extended_op             = DRSUAPI_EXOP_NONE;
+               r->in.req->req5.fsmo_info               = 0;
        }
 
        req = dcerpc_drsuapi_DsGetNCChanges_send(drsuapi->pipe, r, r);
@@ -311,28 +313,28 @@ static void dreplsrv_op_pull_source_get_changes_recv(struct rpc_request *req)
                return;
        }
 
-       if (*r->out.level == 1) {
+       if (*r->out.level_out == 1) {
                ctr_level = 1;
-               ctr1 = &r->out.ctr.ctr1;
-       } else if (*r->out.level == 2 &&
-                  r->out.ctr.ctr2.mszip1.ts) {
+               ctr1 = &r->out.ctr->ctr1;
+       } else if (*r->out.level_out == 2 &&
+                  r->out.ctr->ctr2.mszip1.ts) {
                ctr_level = 1;
-               ctr1 = &r->out.ctr.ctr2.mszip1.ts->ctr1;
-       } else if (*r->out.level == 6) {
+               ctr1 = &r->out.ctr->ctr2.mszip1.ts->ctr1;
+       } else if (*r->out.level_out == 6) {
                ctr_level = 6;
-               ctr6 = &r->out.ctr.ctr6;
-       } else if (*r->out.level == 7 &&
-                  r->out.ctr.ctr7.level == 6 &&
-                  r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP &&
-                  r->out.ctr.ctr7.ctr.mszip6.ts) {
+               ctr6 = &r->out.ctr->ctr6;
+       } else if (*r->out.level_out == 7 &&
+                  r->out.ctr->ctr7.level == 6 &&
+                  r->out.ctr->ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP &&
+                  r->out.ctr->ctr7.ctr.mszip6.ts) {
                ctr_level = 6;
-               ctr6 = &r->out.ctr.ctr7.ctr.mszip6.ts->ctr6;
-       } else if (*r->out.level == 7 &&
-                  r->out.ctr.ctr7.level == 6 &&
-                  r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS &&
-                  r->out.ctr.ctr7.ctr.xpress6.ts) {
+               ctr6 = &r->out.ctr->ctr7.ctr.mszip6.ts->ctr6;
+       } else if (*r->out.level_out == 7 &&
+                  r->out.ctr->ctr7.level == 6 &&
+                  r->out.ctr->ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS &&
+                  r->out.ctr->ctr7.ctr.xpress6.ts) {
                ctr_level = 6;
-               ctr6 = &r->out.ctr.ctr7.ctr.xpress6.ts->ctr6;
+               ctr6 = &r->out.ctr->ctr7.ctr.xpress6.ts->ctr6;
        } else {
                composite_error(c, werror_to_ntstatus(WERR_BAD_NET_RESP));
                return;
index f33959243e15425a5cd0949df0b0813bf2cbe216..c66c5bbd1914ff0845728106006002ec6b6e28d5 100644 (file)
@@ -27,7 +27,7 @@
 #include "lib/messaging/irpc.h"
 #include "dsdb/repl/drepl_service.h"
 #include "lib/ldb/include/ldb_errors.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "librpc/gen_ndr/ndr_drsuapi.h"
 #include "librpc/gen_ndr/ndr_drsblobs.h"
index 4f7afc08542f67fd2e5257946ce2ab254d3fffd7..f36b735d325da37fe4a589a53827c6be2fb1c2c3 100644 (file)
@@ -27,7 +27,7 @@
 #include "lib/messaging/irpc.h"
 #include "dsdb/repl/drepl_service.h"
 #include "lib/ldb/include/ldb_errors.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "librpc/gen_ndr/ndr_drsuapi.h"
 #include "librpc/gen_ndr/ndr_drsblobs.h"
index 8745e210a108af139f2aae50e9f6dc2fe65630bd..7205c8b0f190991bb6f22b17cfebbbfe01d4f84a 100644 (file)
@@ -27,7 +27,7 @@
 #include "lib/messaging/irpc.h"
 #include "dsdb/repl/drepl_service.h"
 #include "lib/ldb/include/ldb_errors.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "librpc/gen_ndr/ndr_drsuapi.h"
 #include "librpc/gen_ndr/ndr_drsblobs.h"
index 3611258ca586b995fdd3e2d1e74ababe74f2b9a1..98d1c1b06c33ed78035bc034c31e4f2f4dcdff95 100644 (file)
@@ -27,7 +27,7 @@
 #include "lib/messaging/irpc.h"
 #include "dsdb/repl/drepl_service.h"
 #include "lib/ldb/include/ldb_errors.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "librpc/gen_ndr/ndr_drsuapi.h"
 #include "librpc/gen_ndr/ndr_drsblobs.h"
index 2be01bac56f15eaafbfd9b9aba13e655d4bba5fb..9853a753472c23e1962273b75fe4d31884dd643f 100644 (file)
@@ -22,7 +22,7 @@
 #include "includes.h"
 #include "dsdb/samdb/samdb.h"
 #include "lib/ldb/include/ldb_errors.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "librpc/gen_ndr/ndr_drsuapi.h"
 #include "librpc/gen_ndr/ndr_drsblobs.h"
index ca87159c5889badf33194af9a43b9e61c609b679..916dc943be9aff8b21a95513e16cec1f48036a08 100644 (file)
@@ -33,7 +33,7 @@
 #include "libcli/security/security.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "auth/auth.h"
-#include "util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 #include "dsdb/samdb/samdb.h"
 #include "param/param.h"
 
index 88a8887056ed6c48e7aae3b48c7c3242df929412..a0602d9281504db3f8e46672c964f870f4e5efc5 100644 (file)
@@ -424,7 +424,7 @@ static int extended_search(struct ldb_module *module, struct ldb_request *req)
                                valstr = str;
                        } else {
                                DATA_BLOB binary;
-                               binary = strhex_to_data_blob(str);
+                               binary = strhex_to_data_blob(NULL, str);
                                if (!binary.data) {
                                        ldb_oom(module->ldb);
                                        return LDB_ERR_OPERATIONS_ERROR;
@@ -471,7 +471,7 @@ static int extended_search(struct ldb_module *module, struct ldb_request *req)
                                valstr = str;
                        } else {
                                DATA_BLOB binary;
-                               binary = strhex_to_data_blob(str);
+                               binary = strhex_to_data_blob(NULL, str);
                                if (!binary.data) {
                                        ldb_oom(module->ldb);
                                        return LDB_ERR_OPERATIONS_ERROR;
index 6e6da5581d628488fc2b5d44f607f3abf91b778b..6acbf45afd8653c7c526fa18b92cf6f4a6b52225 100644 (file)
@@ -141,7 +141,7 @@ static int kludge_acl_allowedAttributes(struct ldb_context *ldb, struct ldb_mess
                ldb_msg_add_string(msg, attrName, attr_list[i]);
        }
        talloc_free(mem_ctx);
-       return 0;
+       return LDB_SUCCESS;
 
 }
 /* read all objectClasses */
@@ -201,7 +201,7 @@ static int kludge_acl_childClasses(struct ldb_context *ldb, struct ldb_message *
                }
        }
 
-       return 0;
+       return LDB_SUCCESS;
 
 }
 
@@ -250,14 +250,14 @@ static int kludge_acl_callback(struct ldb_request *req, struct ldb_reply *ares)
                        case SECURITY_SYSTEM:
                                if (ac->allowedAttributesEffective) {
                                        ret = kludge_acl_allowedAttributes(ac->module->ldb, ares->message,
-                                                                       "allowedClassesAttributesEffective");
+                                                                       "allowedAttributesEffective");
                                        if (ret != LDB_SUCCESS) {
                                                return ldb_module_done(ac->req, NULL, NULL, ret);
                                        }
                                }
                                if (ac->allowedChildClassesEffective) {
                                        ret = kludge_acl_childClasses(ac->module->ldb, ares->message,
-                                                                       "allowedClassesChildClassesEffective");
+                                                                       "allowedChildClassesEffective");
                                        if (ret != LDB_SUCCESS) {
                                                return ldb_module_done(ac->req, NULL, NULL, ret);
                                        }
@@ -267,14 +267,14 @@ static int kludge_acl_callback(struct ldb_request *req, struct ldb_reply *ares)
                        case SECURITY_ADMINISTRATOR:
                                if (ac->allowedAttributesEffective) {
                                        ret = kludge_acl_allowedAttributes(ac->module->ldb, ares->message,
-                                                                       "allowedClassesAttributesEffective");
+                                                                       "allowedAttributesEffective");
                                        if (ret != LDB_SUCCESS) {
                                                return ldb_module_done(ac->req, NULL, NULL, ret);
                                        }
                                }
                                if (ac->allowedChildClassesEffective) {
                                        ret = kludge_acl_childClasses(ac->module->ldb, ares->message,
-                                                                       "allowedClassesChildClassesEffective");
+                                                                       "allowedChildClassesEffective");
                                        if (ret != LDB_SUCCESS) {
                                                return ldb_module_done(ac->req, NULL, NULL, ret);
                                        }
index 70f3e8ddfdaef39c83bbcda45eaa70a9dbe95a5a..d90c2547a6ecc9a3050ba53f8470ed59ed40ef08 100644 (file)
@@ -29,7 +29,7 @@
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "librpc/gen_ndr/ndr_drsuapi.h"
 #include "librpc/gen_ndr/ndr_drsblobs.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 
 static int naming_fsmo_init(struct ldb_module *module)
 {
index 2c242d47c68e6db5e5468f9bc9f212aea11a2bff..7d00851792c04053c2b5cb3628eda2d4ce8bcc81 100644 (file)
@@ -38,7 +38,7 @@
 #include "ldb/include/ldb_errors.h"
 #include "ldb/include/ldb_private.h"
 #include "dsdb/samdb/samdb.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "librpc/ndr/libndr.h"
 #include "librpc/gen_ndr/ndr_security.h"
 #include "libcli/security/security.h"
@@ -382,11 +382,17 @@ static int fix_attributes(struct ldb_context *ldb, const struct dsdb_schema *sch
        int i;
        for (i=0; i < msg->num_elements; i++) {
                const struct dsdb_attribute *attribute = dsdb_attribute_by_lDAPDisplayName(schema, msg->elements[i].name);
+               /* Add in a very special case for 'clearTextPassword',
+                * which is used for internal processing only, and is
+                * not presented in the schema */
                if (!attribute) {
-                       ldb_asprintf_errstring(ldb, "attribute %s is not a valid attribute in schema", msg->elements[i].name);
-                       return LDB_ERR_UNDEFINED_ATTRIBUTE_TYPE;
+                       if (strcasecmp(msg->elements[i].name, "clearTextPassword") != 0) {
+                               ldb_asprintf_errstring(ldb, "attribute %s is not a valid attribute in schema", msg->elements[i].name);
+                               return LDB_ERR_UNDEFINED_ATTRIBUTE_TYPE;
+                       }
+               } else {
+                       msg->elements[i].name = attribute->lDAPDisplayName;
                }
-               msg->elements[i].name = attribute->lDAPDisplayName;
        }
 
        return LDB_SUCCESS;
index 054905992deeee44a46596a2e6ccbf199d9cda4e..3d725686e723237000cb606de0a9fec02d5b4b9a 100644 (file)
@@ -194,7 +194,7 @@ static int objectguid_add(struct ldb_module *module, struct ldb_request *req)
        }
 
        /* Get a sequence number from the backend */
-       /* FIXME: ldb_sequence_number is still SYNC now, when this changes,
+       /* FIXME: ldb_sequence_number is a semi-async call,
         * make sure this function is split and a callback is used */
        ret = ldb_sequence_number(module->ldb, LDB_SEQ_NEXT, &seq_num);
        if (ret == LDB_SUCCESS) {
index b452b66d569f8057453f1c58014190131d8b7ccb..b4a7a47a232d8edf8559188b73cce066762dd326 100644 (file)
@@ -115,10 +115,6 @@ int partition_request(struct ldb_module *module, struct ldb_request *request)
                PARTITION_FIND_OP(module, extended);
                ret = module->ops->extended(module, request);
                break;
-       case LDB_SEQUENCE_NUMBER:
-               PARTITION_FIND_OP(module, sequence_number);
-               ret = module->ops->sequence_number(module, request);
-               break;
        default:
                PARTITION_FIND_OP(module, request);
                ret = module->ops->request(module, request);
@@ -716,9 +712,8 @@ static int partition_del_trans(struct ldb_module *module)
        return ret2;
 }
 
-/* NOTE: ldb_sequence_number is still a completely SYNCHRONOUS call
- * implemented only in ldb_rdb. It does not require ldb_wait() to be
- * called after a request is made */
+
+/* FIXME: This function is still semi-async */
 static int partition_sequence_number(struct ldb_module *module, struct ldb_request *req)
 {
        int i, ret;
@@ -727,113 +722,241 @@ static int partition_sequence_number(struct ldb_module *module, struct ldb_reque
        uint64_t timestamp = 0;
        struct partition_private_data *data = talloc_get_type(module->private_data, 
                                                              struct partition_private_data);
+       struct ldb_seqnum_request *seq;
+       struct ldb_seqnum_result *seqr;
+       struct ldb_request *treq;
+       struct ldb_seqnum_request *tseq;
+       struct ldb_seqnum_result *tseqr;
+       struct ldb_extended *ext;
+       struct ldb_result *res;
 
-       switch (req->op.seq_num.type) {
+       seq = talloc_get_type(req->op.extended.data, struct ldb_seqnum_request);
+
+       switch (seq->type) {
        case LDB_SEQ_NEXT:
        case LDB_SEQ_HIGHEST_SEQ:
-               ret = ldb_next_request(module, req);
-               if (ret != LDB_SUCCESS) {
-                       return ret;
+               res = talloc_zero(req, struct ldb_result);
+               if (res == NULL) {
+                       return LDB_ERR_OPERATIONS_ERROR;
                }
-               if (req->op.seq_num.flags & LDB_SEQ_TIMESTAMP_SEQUENCE) {
-                       timestamp_sequence = req->op.seq_num.seq_num;
-               } else {
-                       seq_number = seq_number + req->op.seq_num.seq_num;
+               tseq = talloc_zero(res, struct ldb_seqnum_request);
+               if (tseq == NULL) {
+                       talloc_free(res);
+                       return LDB_ERR_OPERATIONS_ERROR;
+               }
+               tseq->type = seq->type;
+
+               ret = ldb_build_extended_req(&treq, module->ldb, res,
+                                            LDB_EXTENDED_SEQUENCE_NUMBER,
+                                            tseq,
+                                            NULL,
+                                            res,
+                                            ldb_extended_default_callback,
+                                            NULL);
+               ret = ldb_next_request(module, treq);
+               if (ret == LDB_SUCCESS) {
+                       ret = ldb_wait(treq->handle, LDB_WAIT_ALL);
                }
-
-               /* gross hack part1 */
-               ret = ldb_request_add_control(req,
-                                       DSDB_CONTROL_CURRENT_PARTITION_OID,
-                                       false, NULL);
                if (ret != LDB_SUCCESS) {
+                       talloc_free(res);
                        return ret;
                }
+               seqr = talloc_get_type(res->extended->data,
+                                       struct ldb_seqnum_result);
+               if (seqr->flags & LDB_SEQ_TIMESTAMP_SEQUENCE) {
+                       timestamp_sequence = seqr->seq_num;
+               } else {
+                       seq_number += seqr->seq_num;
+               }
+               talloc_free(res);
 
-               /* Look at base DN */
-               /* Figure out which partition it is under */
                /* Skip the lot if 'data' isn't here yet (initialistion) */
                for (i=0; data && data->partitions && data->partitions[i]; i++) {
 
-                       /* gross hack part2 */
-                       int j;
-                       for (j=0; req->controls[j]; j++) {
-                               if (strcmp(req->controls[j]->oid, DSDB_CONTROL_CURRENT_PARTITION_OID) == 0) {
-                                       req->controls[j]->data = data->partitions[i];
-                                       break;
-                               }
+                       res = talloc_zero(req, struct ldb_result);
+                       if (res == NULL) {
+                               return LDB_ERR_OPERATIONS_ERROR;
+                       }
+                       tseq = talloc_zero(res, struct ldb_seqnum_request);
+                       if (tseq == NULL) {
+                               talloc_free(res);
+                               return LDB_ERR_OPERATIONS_ERROR;
+                       }
+                       tseq->type = seq->type;
+
+                       ret = ldb_build_extended_req(&treq, module->ldb, res,
+                                                    LDB_EXTENDED_SEQUENCE_NUMBER,
+                                                    tseq,
+                                                    NULL,
+                                                    res,
+                                                    ldb_extended_default_callback,
+                                                    NULL);
+                       if (ret != LDB_SUCCESS) {
+                               talloc_free(res);
+                               return ret;
                        }
 
-                       ret = partition_request(data->partitions[i]->module, req);
+                       ret = ldb_request_add_control(treq,
+                                                     DSDB_CONTROL_CURRENT_PARTITION_OID,
+                                                     false, data->partitions[i]);
                        if (ret != LDB_SUCCESS) {
+                               talloc_free(res);
                                return ret;
                        }
-                       if (req->op.seq_num.flags & LDB_SEQ_TIMESTAMP_SEQUENCE) {
-                               timestamp_sequence = MAX(timestamp_sequence, req->op.seq_num.seq_num);
+
+                       ret = partition_request(data->partitions[i]->module, treq);
+                       if (ret != LDB_SUCCESS) {
+                               talloc_free(res);
+                               return ret;
+                       }
+                       ret = ldb_wait(treq->handle, LDB_WAIT_ALL);
+                       if (ret != LDB_SUCCESS) {
+                               talloc_free(res);
+                               return ret;
+                       }
+                       tseqr = talloc_get_type(res->extended->data,
+                                               struct ldb_seqnum_result);
+                       if (tseqr->flags & LDB_SEQ_TIMESTAMP_SEQUENCE) {
+                               timestamp_sequence = MAX(timestamp_sequence,
+                                                        tseqr->seq_num);
                        } else {
-                               seq_number = seq_number + req->op.seq_num.seq_num;
+                               seq_number += tseqr->seq_num;
                        }
+                       talloc_free(res);
                }
-               /* fall though */
+               /* fall through */
        case LDB_SEQ_HIGHEST_TIMESTAMP:
-       {
-               struct ldb_request *date_req = talloc(req, struct ldb_request);
-               if (!date_req) {
+
+               res = talloc_zero(req, struct ldb_result);
+               if (res == NULL) {
                        return LDB_ERR_OPERATIONS_ERROR;
                }
-               *date_req = *req;
-               date_req->op.seq_num.flags = LDB_SEQ_HIGHEST_TIMESTAMP;
 
-               ret = ldb_next_request(module, date_req);
+               tseq = talloc_zero(res, struct ldb_seqnum_request);
+               if (tseq == NULL) {
+                       talloc_free(res);
+                       return LDB_ERR_OPERATIONS_ERROR;
+               }
+               tseq->type = LDB_SEQ_HIGHEST_TIMESTAMP;
+
+               ret = ldb_build_extended_req(&treq, module->ldb, res,
+                                            LDB_EXTENDED_SEQUENCE_NUMBER,
+                                            tseq,
+                                            NULL,
+                                            res,
+                                            ldb_extended_default_callback,
+                                            NULL);
                if (ret != LDB_SUCCESS) {
+                       talloc_free(res);
                        return ret;
                }
-               timestamp = date_req->op.seq_num.seq_num;
 
-               /* Look at base DN */
-               /* Figure out which partition it is under */
+               ret = ldb_next_request(module, treq);
+               if (ret != LDB_SUCCESS) {
+                       talloc_free(res);
+                       return ret;
+               }
+               ret = ldb_wait(treq->handle, LDB_WAIT_ALL);
+               if (ret != LDB_SUCCESS) {
+                       talloc_free(res);
+                       return ret;
+               }
+
+               tseqr = talloc_get_type(res->extended->data,
+                                          struct ldb_seqnum_result);
+               timestamp = tseqr->seq_num;
+
+               talloc_free(res);
+
                /* Skip the lot if 'data' isn't here yet (initialistion) */
                for (i=0; data && data->partitions && data->partitions[i]; i++) {
 
-                       ret = partition_request(data->partitions[i]->module, req);
+                       res = talloc_zero(req, struct ldb_result);
+                       if (res == NULL) {
+                               return LDB_ERR_OPERATIONS_ERROR;
+                       }
+
+                       tseq = talloc_zero(res, struct ldb_seqnum_request);
+                       if (tseq == NULL) {
+                               talloc_free(res);
+                               return LDB_ERR_OPERATIONS_ERROR;
+                       }
+                       tseq->type = LDB_SEQ_HIGHEST_TIMESTAMP;
+
+                       ret = ldb_build_extended_req(&treq, module->ldb, res,
+                                                    LDB_EXTENDED_SEQUENCE_NUMBER,
+                                                    tseq,
+                                                    NULL,
+                                                    res,
+                                                    ldb_extended_default_callback,
+                                                    NULL);
+                       if (ret != LDB_SUCCESS) {
+                               talloc_free(res);
+                               return ret;
+                       }
+
+                       ret = partition_request(data->partitions[i]->module, treq);
                        if (ret != LDB_SUCCESS) {
+                               talloc_free(res);
                                return ret;
                        }
-                       timestamp = MAX(timestamp, date_req->op.seq_num.seq_num);
+                       ret = ldb_wait(treq->handle, LDB_WAIT_ALL);
+                       if (ret != LDB_SUCCESS) {
+                               talloc_free(res);
+                               return ret;
+                       }
+
+                       tseqr = talloc_get_type(res->extended->data,
+                                                 struct ldb_seqnum_result);
+                       timestamp = MAX(timestamp, tseqr->seq_num);
+
+                       talloc_free(res);
                }
+
                break;
        }
+
+       ext = talloc_zero(req, struct ldb_extended);
+       if (!ext) {
+               return LDB_ERR_OPERATIONS_ERROR;
        }
+       seqr = talloc_zero(ext, struct ldb_seqnum_result);
+       if (seqr == NULL) {
+               talloc_free(ext);
+               return LDB_ERR_OPERATIONS_ERROR;
+       }
+       ext->oid = LDB_EXTENDED_SEQUENCE_NUMBER;
+       ext->data = seqr;
 
-       switch (req->op.seq_num.flags) {
+       switch (seq->type) {
        case LDB_SEQ_NEXT:
        case LDB_SEQ_HIGHEST_SEQ:
 
-               req->op.seq_num.flags = 0;
-
                /* Has someone above set a timebase sequence? */
                if (timestamp_sequence) {
-                       req->op.seq_num.seq_num = (((unsigned long long)timestamp << 24) | (seq_number & 0xFFFFFF));
+                       seqr->seq_num = (((unsigned long long)timestamp << 24) | (seq_number & 0xFFFFFF));
                } else {
-                       req->op.seq_num.seq_num = seq_number;
+                       seqr->seq_num = seq_number;
                }
 
-               if (timestamp_sequence > req->op.seq_num.seq_num) {
-                       req->op.seq_num.seq_num = timestamp_sequence;
-                       req->op.seq_num.flags |= LDB_SEQ_TIMESTAMP_SEQUENCE;
+               if (timestamp_sequence > seqr->seq_num) {
+                       seqr->seq_num = timestamp_sequence;
+                       seqr->flags |= LDB_SEQ_TIMESTAMP_SEQUENCE;
                }
 
-               req->op.seq_num.flags |= LDB_SEQ_GLOBAL_SEQUENCE;
+               seqr->flags |= LDB_SEQ_GLOBAL_SEQUENCE;
                break;
        case LDB_SEQ_HIGHEST_TIMESTAMP:
-               req->op.seq_num.seq_num = timestamp;
+               seqr->seq_num = timestamp;
                break;
        }
 
-       switch (req->op.seq_num.flags) {
-       case LDB_SEQ_NEXT:
-               req->op.seq_num.seq_num++;
+       if (seq->type == LDB_SEQ_NEXT) {
+               seqr->seq_num++;
        }
-       return LDB_SUCCESS;
+
+       /* send request done */
+       return ldb_module_done(req, NULL, ext, LDB_SUCCESS);
 }
 
 static int partition_extended_replicated_objects(struct ldb_module *module, struct ldb_request *req)
@@ -906,6 +1029,10 @@ static int partition_extended(struct ldb_module *module, struct ldb_request *req
                return ldb_next_request(module, req);
        }
 
+       if (strcmp(req->op.extended.oid, LDB_EXTENDED_SEQUENCE_NUMBER) == 0) {
+               return partition_sequence_number(module, req);
+       }
+
        if (strcmp(req->op.extended.oid, DSDB_EXTENDED_REPLICATED_OBJECTS_OID) == 0) {
                return partition_extended_replicated_objects(module, req);
        }
@@ -1204,7 +1331,6 @@ _PUBLIC_ const struct ldb_module_ops ldb_partition_module_ops = {
        .del               = partition_delete,
        .rename            = partition_rename,
        .extended          = partition_extended,
-       .sequence_number   = partition_sequence_number,
        .start_transaction = partition_start_trans,
        .end_transaction   = partition_end_trans,
        .del_transaction   = partition_del_trans,
index e36de3c5c408e0f2b7851ba5bc7ce720f03c4188..5ed7f1fbad59b6eec3526c85c05833da4d96b83d 100644 (file)
@@ -109,7 +109,8 @@ struct setup_password_fields_io {
 
        /* new credentials */
        struct {
-               const char *cleartext;
+               const struct ldb_val *cleartext_utf8;
+               const struct ldb_val *cleartext_utf16;
                struct samr_Password *nt_hash;
                struct samr_Password *lm_hash;
        } n;
@@ -144,6 +145,9 @@ struct setup_password_fields_io {
        } g;
 };
 
+/* Get the NT hash, and fill it in as an entry in the password history, 
+   and specify it into io->g.nt_hash */
+
 static int setup_nt_fields(struct setup_password_fields_io *io)
 {
        uint32_t i;
@@ -181,6 +185,9 @@ static int setup_nt_fields(struct setup_password_fields_io *io)
        return LDB_SUCCESS;
 }
 
+/* Get the LANMAN hash, and fill it in as an entry in the password history, 
+   and specify it into io->g.lm_hash */
+
 static int setup_lm_fields(struct setup_password_fields_io *io)
 {
        uint32_t i;
@@ -220,6 +227,10 @@ static int setup_kerberos_keys(struct setup_password_fields_io *io)
        Principal *salt_principal;
        krb5_salt salt;
        krb5_keyblock key;
+       krb5_data cleartext_data;
+
+       cleartext_data.data = io->n.cleartext_utf8->data;
+       cleartext_data.length = io->n.cleartext_utf8->length;
 
        /* Many, many thanks to lukeh@padl.com for this
         * algorithm, described in his Nov 10 2004 mail to
@@ -314,11 +325,11 @@ static int setup_kerberos_keys(struct setup_password_fields_io *io)
         * create ENCTYPE_AES256_CTS_HMAC_SHA1_96 key out of
         * the salt and the cleartext password
         */
-       krb5_ret = krb5_string_to_key_salt(io->smb_krb5_context->krb5_context,
-                                          ENCTYPE_AES256_CTS_HMAC_SHA1_96,
-                                          io->n.cleartext,
-                                          salt,
-                                          &key);
+       krb5_ret = krb5_string_to_key_data_salt(io->smb_krb5_context->krb5_context,
+                                               ENCTYPE_AES256_CTS_HMAC_SHA1_96,
+                                               cleartext_data,
+                                               salt,
+                                               &key);
        if (krb5_ret) {
                ldb_asprintf_errstring(io->ac->module->ldb,
                                       "setup_kerberos_keys: "
@@ -339,11 +350,11 @@ static int setup_kerberos_keys(struct setup_password_fields_io *io)
         * create ENCTYPE_AES128_CTS_HMAC_SHA1_96 key out of
         * the salt and the cleartext password
         */
-       krb5_ret = krb5_string_to_key_salt(io->smb_krb5_context->krb5_context,
-                                          ENCTYPE_AES128_CTS_HMAC_SHA1_96,
-                                          io->n.cleartext,
-                                          salt,
-                                          &key);
+       krb5_ret = krb5_string_to_key_data_salt(io->smb_krb5_context->krb5_context,
+                                               ENCTYPE_AES128_CTS_HMAC_SHA1_96,
+                                               cleartext_data,
+                                               salt,
+                                               &key);
        if (krb5_ret) {
                ldb_asprintf_errstring(io->ac->module->ldb,
                                       "setup_kerberos_keys: "
@@ -364,11 +375,11 @@ static int setup_kerberos_keys(struct setup_password_fields_io *io)
         * create ENCTYPE_DES_CBC_MD5 key out of
         * the salt and the cleartext password
         */
-       krb5_ret = krb5_string_to_key_salt(io->smb_krb5_context->krb5_context,
-                                          ENCTYPE_DES_CBC_MD5,
-                                          io->n.cleartext,
-                                          salt,
-                                          &key);
+       krb5_ret = krb5_string_to_key_data_salt(io->smb_krb5_context->krb5_context,
+                                               ENCTYPE_DES_CBC_MD5,
+                                               cleartext_data,
+                                               salt,
+                                               &key);
        if (krb5_ret) {
                ldb_asprintf_errstring(io->ac->module->ldb,
                                       "setup_kerberos_keys: "
@@ -389,11 +400,11 @@ static int setup_kerberos_keys(struct setup_password_fields_io *io)
         * create ENCTYPE_DES_CBC_CRC key out of
         * the salt and the cleartext password
         */
-       krb5_ret = krb5_string_to_key_salt(io->smb_krb5_context->krb5_context,
-                                          ENCTYPE_DES_CBC_CRC,
-                                          io->n.cleartext,
-                                          salt,
-                                          &key);
+       krb5_ret = krb5_string_to_key_data_salt(io->smb_krb5_context->krb5_context,
+                                               ENCTYPE_DES_CBC_CRC,
+                                               cleartext_data,
+                                               salt,
+                                               &key);
        if (krb5_ret) {
                ldb_asprintf_errstring(io->ac->module->ldb,
                                       "setup_kerberos_keys: "
@@ -471,12 +482,11 @@ static int setup_primary_kerberos(struct setup_password_fields_io *io,
        if (old_scp) {
                DATA_BLOB blob;
 
-               blob = strhex_to_data_blob(old_scp->data);
+               blob = strhex_to_data_blob(io->ac, old_scp->data);
                if (!blob.data) {
                        ldb_oom(io->ac->module->ldb);
                        return LDB_ERR_OPERATIONS_ERROR;
                }
-               talloc_steal(io->ac, blob.data);
 
                /* TODO: use ndr_pull_struct_blob_all(), when the ndr layer handles it correct with relative pointers */
                ndr_err = ndr_pull_struct_blob(&blob, io->ac, lp_iconv_convenience(ldb_get_opaque(io->ac->module->ldb, "loadparm")), &_old_pkb,
@@ -585,12 +595,11 @@ static int setup_primary_kerberos_newer(struct setup_password_fields_io *io,
        if (old_scp) {
                DATA_BLOB blob;
 
-               blob = strhex_to_data_blob(old_scp->data);
+               blob = strhex_to_data_blob(io->ac, old_scp->data);
                if (!blob.data) {
                        ldb_oom(io->ac->module->ldb);
                        return LDB_ERR_OPERATIONS_ERROR;
                }
-               talloc_steal(io->ac, blob.data);
 
                /* TODO: use ndr_pull_struct_blob_all(), when the ndr layer handles it correct with relative pointers */
                ndr_err = ndr_pull_struct_blob(&blob, io->ac,
@@ -648,7 +657,6 @@ static int setup_primary_wdigest(struct setup_password_fields_io *io,
        DATA_BLOB dns_domain;
        DATA_BLOB dns_domain_l;
        DATA_BLOB dns_domain_u;
-       DATA_BLOB cleartext;
        DATA_BLOB digest;
        DATA_BLOB delim;
        DATA_BLOB backslash;
@@ -929,8 +937,6 @@ static int setup_primary_wdigest(struct setup_password_fields_io *io,
        dns_domain_l            = data_blob_string_const(io->domain->dns_domain);
        dns_domain_u            = data_blob_string_const(io->domain->realm);
 
-       cleartext               = data_blob_string_const(io->n.cleartext);
-
        digest                  = data_blob_string_const("Digest");
 
        delim                   = data_blob_string_const(":");
@@ -956,7 +962,7 @@ static int setup_primary_wdigest(struct setup_password_fields_io *io,
                        MD5Update(&md5, wdigest[i].realm->data, wdigest[i].realm->length);
                }
                MD5Update(&md5, delim.data, delim.length);
-               MD5Update(&md5, cleartext.data, cleartext.length);
+               MD5Update(&md5, io->n.cleartext_utf8->data, io->n.cleartext_utf8->length);
                MD5Final(pdb->hashes[i].hash, &md5);
        }
 
@@ -1011,7 +1017,7 @@ static int setup_supplemental_field(struct setup_password_fields_io *io)
        ZERO_STRUCT(zero16);
        ZERO_STRUCT(names);
 
-       if (!io->n.cleartext) {
+       if (!io->n.cleartext_utf8) {
                /* 
                 * when we don't have a cleartext password
                 * we can't setup a supplementalCredential value
@@ -1193,7 +1199,7 @@ static int setup_supplemental_field(struct setup_password_fields_io *io)
        if (pc) {
                *nc             = "CLEARTEXT";
 
-               pcb.cleartext   = io->n.cleartext;
+               pcb.cleartext   = *io->n.cleartext_utf16;
 
                ndr_err = ndr_push_struct_blob(&pcb_blob, io->ac, 
                                               lp_iconv_convenience(ldb_get_opaque(io->ac->module->ldb, "loadparm")),
@@ -1285,58 +1291,97 @@ static int setup_password_fields(struct setup_password_fields_io *io)
 {
        bool ok;
        int ret;
-
+       ssize_t converted_pw_len;
+               
        /*
         * refuse the change if someone want to change the cleartext
         * and supply his own hashes at the same time...
         */
-       if (io->n.cleartext && (io->n.nt_hash || io->n.lm_hash)) {
+       if ((io->n.cleartext_utf8 || io->n.cleartext_utf16) && (io->n.nt_hash || io->n.lm_hash)) {
                ldb_asprintf_errstring(io->ac->module->ldb,
                                       "setup_password_fields: "
                                       "it's only allowed to set the cleartext password or the password hashes");
                return LDB_ERR_UNWILLING_TO_PERFORM;
        }
-
-       if (io->n.cleartext) {
-               struct samr_Password *hash;
-
-               hash = talloc(io->ac, struct samr_Password);
-               if (!hash) {
+       
+       if (io->n.cleartext_utf8 && io->n.cleartext_utf16) {
+               ldb_asprintf_errstring(io->ac->module->ldb,
+                                      "setup_password_fields: "
+                                      "it's only allowed to set the cleartext password as userPassword or clearTextPasssword, not both at once");
+               return LDB_ERR_UNWILLING_TO_PERFORM;
+       }
+       
+       if (io->n.cleartext_utf8) {
+               char **cleartext_utf16_str;
+               struct ldb_val *cleartext_utf16_blob;
+               io->n.cleartext_utf16 = cleartext_utf16_blob = talloc(io->ac, struct ldb_val);
+               if (!io->n.cleartext_utf16) {
                        ldb_oom(io->ac->module->ldb);
                        return LDB_ERR_OPERATIONS_ERROR;
                }
-
-               /* compute the new nt hash */
-               ok = E_md4hash(io->n.cleartext, hash->hash);
-               if (ok) {
-                       io->n.nt_hash = hash;
-               } else {
+               converted_pw_len = convert_string_talloc(io->ac, lp_iconv_convenience(ldb_get_opaque(io->ac->module->ldb, "loadparm")), 
+                                                        CH_UTF8, CH_UTF16, io->n.cleartext_utf8->data, io->n.cleartext_utf8->length, 
+                                                        (void **)&cleartext_utf16_str);
+               if (converted_pw_len == -1) {
                        ldb_asprintf_errstring(io->ac->module->ldb,
                                               "setup_password_fields: "
-                                              "failed to generate nthash from cleartext password");
+                                              "failed to generate UTF16 password from cleartext UTF8 password");
+                       return LDB_ERR_OPERATIONS_ERROR;
+               }
+               *cleartext_utf16_blob = data_blob_const(cleartext_utf16_str, converted_pw_len);
+       } else if (io->n.cleartext_utf16) {
+               char *cleartext_utf8_str;
+               struct ldb_val *cleartext_utf8_blob;
+               io->n.cleartext_utf8 = cleartext_utf8_blob = talloc(io->ac, struct ldb_val);
+               if (!io->n.cleartext_utf8) {
+                       ldb_oom(io->ac->module->ldb);
                        return LDB_ERR_OPERATIONS_ERROR;
                }
+               converted_pw_len = convert_string_talloc(io->ac, lp_iconv_convenience(ldb_get_opaque(io->ac->module->ldb, "loadparm")), 
+                                                        CH_UTF16, CH_UTF8, io->n.cleartext_utf16->data, io->n.cleartext_utf16->length, 
+                                                        (void **)&cleartext_utf8_str);
+               if (converted_pw_len == -1) {
+                       /* We can't bail out entirely, as these unconvertable passwords are frustratingly valid */
+                       io->n.cleartext_utf8 = NULL;    
+                       talloc_free(cleartext_utf8_blob);
+               }
+               *cleartext_utf8_blob = data_blob_const(cleartext_utf8_str, converted_pw_len);
        }
-
-       if (io->n.cleartext) {
-               struct samr_Password *hash;
-
-               hash = talloc(io->ac, struct samr_Password);
-               if (!hash) {
+       if (io->n.cleartext_utf16) {
+               struct samr_Password *nt_hash;
+               nt_hash = talloc(io->ac, struct samr_Password);
+               if (!nt_hash) {
                        ldb_oom(io->ac->module->ldb);
                        return LDB_ERR_OPERATIONS_ERROR;
                }
+               io->n.nt_hash = nt_hash;
 
-               /* compute the new lm hash */
-               ok = E_deshash(io->n.cleartext, hash->hash);
-               if (ok) {
-                       io->n.lm_hash = hash;
-               } else {
-                       talloc_free(hash->hash);
-               }
+               /* compute the new nt hash */
+               mdfour(nt_hash->hash, io->n.cleartext_utf16->data, io->n.cleartext_utf16->length);
        }
 
-       if (io->n.cleartext) {
+       if (io->n.cleartext_utf8) {
+               struct samr_Password *lm_hash;
+               char *cleartext_unix;
+               converted_pw_len = convert_string_talloc(io->ac, lp_iconv_convenience(ldb_get_opaque(io->ac->module->ldb, "loadparm")), 
+                                                        CH_UTF8, CH_UNIX, io->n.cleartext_utf8->data, io->n.cleartext_utf8->length, 
+                                                        (void **)&cleartext_unix);
+               if (converted_pw_len != -1) {
+                       lm_hash = talloc(io->ac, struct samr_Password);
+                       if (!lm_hash) {
+                               ldb_oom(io->ac->module->ldb);
+                               return LDB_ERR_OPERATIONS_ERROR;
+                       }
+                       
+                       /* compute the new lm hash.   */
+                       ok = E_deshash((char *)cleartext_unix, lm_hash->hash);
+                       if (ok) {
+                               io->n.lm_hash = lm_hash;
+                       } else {
+                               talloc_free(lm_hash->hash);
+                       }
+               }
+
                ret = setup_kerberos_keys(io);
                if (ret != 0) {
                        return ret;
@@ -1560,6 +1605,7 @@ static int password_hash_add(struct ldb_module *module, struct ldb_request *req)
 {
        struct ph_context *ac;
        struct ldb_message_element *sambaAttr;
+       struct ldb_message_element *clearTextPasswordAttr;
        struct ldb_message_element *ntAttr;
        struct ldb_message_element *lmAttr;
        int ret;
@@ -1591,6 +1637,7 @@ static int password_hash_add(struct ldb_module *module, struct ldb_request *req)
         * or LM hashes, then we don't need to make any changes.  */
 
        sambaAttr = ldb_msg_find_element(req->op.mod.message, "userPassword");
+       clearTextPasswordAttr = ldb_msg_find_element(req->op.mod.message, "clearTextPassword");
        ntAttr = ldb_msg_find_element(req->op.mod.message, "unicodePwd");
        lmAttr = ldb_msg_find_element(req->op.mod.message, "dBCSPwd");
 
@@ -1611,6 +1658,10 @@ static int password_hash_add(struct ldb_module *module, struct ldb_request *req)
                ldb_set_errstring(module->ldb, "mupltiple values for userPassword not allowed!\n");
                return LDB_ERR_CONSTRAINT_VIOLATION;
        }
+       if (clearTextPasswordAttr && clearTextPasswordAttr->num_values > 1) {
+               ldb_set_errstring(module->ldb, "mupltiple values for clearTextPassword not allowed!\n");
+               return LDB_ERR_CONSTRAINT_VIOLATION;
+       }
 
        if (ntAttr && (ntAttr->num_values > 1)) {
                ldb_set_errstring(module->ldb, "mupltiple values for unicodePwd not allowed!\n");
@@ -1626,6 +1677,11 @@ static int password_hash_add(struct ldb_module *module, struct ldb_request *req)
                return LDB_ERR_CONSTRAINT_VIOLATION;
        }
 
+       if (clearTextPasswordAttr && clearTextPasswordAttr->num_values == 0) {
+               ldb_set_errstring(module->ldb, "clearTextPassword must have a value!\n");
+               return LDB_ERR_CONSTRAINT_VIOLATION;
+       }
+
        if (ntAttr && (ntAttr->num_values == 0)) {
                ldb_set_errstring(module->ldb, "unicodePwd must have a value!\n");
                return LDB_ERR_CONSTRAINT_VIOLATION;
@@ -1687,12 +1743,14 @@ static int password_hash_add_do_add(struct ph_context *ac) {
        io.u.user_principal_name        = samdb_result_string(msg, "userPrincipalName", NULL);
        io.u.is_computer                = ldb_msg_check_string_attribute(msg, "objectClass", "computer");
 
-       io.n.cleartext                  = samdb_result_string(msg, "userPassword", NULL);
+       io.n.cleartext_utf8             = ldb_msg_find_ldb_val(msg, "userPassword");
+       io.n.cleartext_utf16            = ldb_msg_find_ldb_val(msg, "clearTextPassword");
        io.n.nt_hash                    = samdb_result_hash(io.ac, msg, "unicodePwd");
        io.n.lm_hash                    = samdb_result_hash(io.ac, msg, "dBCSPwd");
 
        /* remove attributes */
-       if (io.n.cleartext) ldb_msg_remove_attr(msg, "userPassword");
+       if (io.n.cleartext_utf8) ldb_msg_remove_attr(msg, "userPassword");
+       if (io.n.cleartext_utf16) ldb_msg_remove_attr(msg, "clearTextPassword");
        if (io.n.nt_hash) ldb_msg_remove_attr(msg, "unicodePwd");
        if (io.n.lm_hash) ldb_msg_remove_attr(msg, "dBCSPwd");
        ldb_msg_remove_attr(msg, "pwdLastSet");
@@ -1772,6 +1830,7 @@ static int password_hash_modify(struct ldb_module *module, struct ldb_request *r
 {
        struct ph_context *ac;
        struct ldb_message_element *sambaAttr;
+       struct ldb_message_element *clearTextAttr;
        struct ldb_message_element *ntAttr;
        struct ldb_message_element *lmAttr;
        struct ldb_message *msg;
@@ -1802,13 +1861,16 @@ static int password_hash_modify(struct ldb_module *module, struct ldb_request *r
        }
 
        sambaAttr = ldb_msg_find_element(req->op.mod.message, "userPassword");
+       clearTextAttr = ldb_msg_find_element(req->op.mod.message, "clearTextPassword");
        ntAttr = ldb_msg_find_element(req->op.mod.message, "unicodePwd");
        lmAttr = ldb_msg_find_element(req->op.mod.message, "dBCSPwd");
 
-       /* If no part of this touches the userPassword OR unicodePwd and/or dBCSPwd, then we don't
-        * need to make any changes.  For password changes/set there should
-        * be a 'delete' or a 'modify' on this attribute. */
-       if ((!sambaAttr) && (!ntAttr) && (!lmAttr)) {
+       /* If no part of this touches the userPassword OR
+        * clearTextPassword OR unicodePwd and/or dBCSPwd, then we
+        * don't need to make any changes.  For password changes/set
+        * there should be a 'delete' or a 'modify' on this
+        * attribute. */
+       if ((!sambaAttr) && (!clearTextAttr) && (!ntAttr) && (!lmAttr)) {
                return ldb_next_request(module, req);
        }
 
@@ -1817,6 +1879,9 @@ static int password_hash_modify(struct ldb_module *module, struct ldb_request *r
        if (sambaAttr && (sambaAttr->num_values > 1)) {
                return LDB_ERR_CONSTRAINT_VIOLATION;
        }
+       if (clearTextAttr && (clearTextAttr->num_values > 1)) {
+               return LDB_ERR_CONSTRAINT_VIOLATION;
+       }
        if (ntAttr && (ntAttr->num_values > 1)) {
                return LDB_ERR_CONSTRAINT_VIOLATION;
        }
@@ -1839,6 +1904,7 @@ static int password_hash_modify(struct ldb_module *module, struct ldb_request *r
        /* - remove any modification to the password from the first commit
         *   we will make the real modification later */
        if (sambaAttr) ldb_msg_remove_attr(msg, "userPassword");
+       if (clearTextAttr) ldb_msg_remove_attr(msg, "clearTextPassword");
        if (ntAttr) ldb_msg_remove_attr(msg, "unicodePwd");
        if (lmAttr) ldb_msg_remove_attr(msg, "dBCSPwd");
 
@@ -2028,7 +2094,8 @@ static int password_hash_mod_do_mod(struct ph_context *ac) {
        io.u.user_principal_name        = samdb_result_string(searched_msg, "userPrincipalName", NULL);
        io.u.is_computer                = ldb_msg_check_string_attribute(searched_msg, "objectClass", "computer");
 
-       io.n.cleartext                  = samdb_result_string(orig_msg, "userPassword", NULL);
+       io.n.cleartext_utf8             = ldb_msg_find_ldb_val(orig_msg, "userPassword");
+       io.n.cleartext_utf16            = ldb_msg_find_ldb_val(orig_msg, "clearTextPassword");
        io.n.nt_hash                    = samdb_result_hash(io.ac, orig_msg, "unicodePwd");
        io.n.lm_hash                    = samdb_result_hash(io.ac, orig_msg, "dBCSPwd");
 
index a5e7031a26f116817a6fe462205fba665f55ee73..198b6673582f9f2db9d7f7022be5b30ac5391657 100644 (file)
@@ -28,7 +28,7 @@
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "librpc/gen_ndr/ndr_drsuapi.h"
 #include "librpc/gen_ndr/ndr_drsblobs.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 
 static int pdc_fsmo_init(struct ldb_module *module)
 {
index 18b0649dda90a35d0fec7331a3302469b61c0c17..2ff42297b7491af70db902c23118a53794d715fe 100644 (file)
@@ -73,7 +73,7 @@ static int load_proxy_info(struct ldb_module *module)
 
        /* see if we have already loaded it */
        if (proxy->upstream != NULL) {
-               return 0;
+               return LDB_SUCCESS;
        }
 
        dn = ldb_dn_new(proxy, module->ldb, "@PROXYINFO");
@@ -152,7 +152,7 @@ static int load_proxy_info(struct ldb_module *module)
 
        talloc_free(res);
 
-       return 0;
+       return LDB_SUCCESS;
 
 failed:
        talloc_free(res);
@@ -160,7 +160,7 @@ failed:
        talloc_free(proxy->newdn);
        talloc_free(proxy->upstream);
        proxy->upstream = NULL;
-       return -1;
+       return LDB_ERR_OPERATIONS_ERROR;
 }
 
 
@@ -317,7 +317,7 @@ static int proxy_search_bytree(struct ldb_module *module, struct ldb_request *re
                goto passthru;
        }
 
-       if (load_proxy_info(module) != 0) {
+       if (load_proxy_info(module) != LDB_SUCCESS) {
                return LDB_ERR_OPERATIONS_ERROR;
        }
 
index 13a979b6f808fe5a2bbd95abd7ff0efd538b3c6a..f30748c85c5055ee607fbf3f46907f1c4e031170 100644 (file)
@@ -90,16 +90,16 @@ static int add_time_element(struct ldb_message *msg, const char *attr, time_t t)
        char *s;
 
        if (ldb_msg_find_element(msg, attr) != NULL) {
-               return 0;
+               return LDB_SUCCESS;
        }
 
        s = ldb_timestring(msg, t);
        if (s == NULL) {
-               return -1;
+               return LDB_ERR_OPERATIONS_ERROR;
        }
 
-       if (ldb_msg_add_string(msg, attr, s) != 0) {
-               return -1;
+       if (ldb_msg_add_string(msg, attr, s) != LDB_SUCCESS) {
+               return LDB_ERR_OPERATIONS_ERROR;
        }
 
        el = ldb_msg_find_element(msg, attr);
@@ -107,7 +107,7 @@ static int add_time_element(struct ldb_message *msg, const char *attr, time_t t)
           is ignored */
        el->flags = LDB_FLAG_MOD_REPLACE;
 
-       return 0;
+       return LDB_SUCCESS;
 }
 
 /*
@@ -118,11 +118,11 @@ static int add_uint64_element(struct ldb_message *msg, const char *attr, uint64_
        struct ldb_message_element *el;
 
        if (ldb_msg_find_element(msg, attr) != NULL) {
-               return 0;
+               return LDB_SUCCESS;
        }
 
-       if (ldb_msg_add_fmt(msg, attr, "%llu", (unsigned long long)v) != 0) {
-               return -1;
+       if (ldb_msg_add_fmt(msg, attr, "%llu", (unsigned long long)v) != LDB_SUCCESS) {
+               return LDB_ERR_OPERATIONS_ERROR;
        }
 
        el = ldb_msg_find_element(msg, attr);
@@ -130,7 +130,7 @@ static int add_uint64_element(struct ldb_message *msg, const char *attr, uint64_
           is ignored */
        el->flags = LDB_FLAG_MOD_REPLACE;
 
-       return 0;
+       return LDB_SUCCESS;
 }
 
 static int replmd_replPropertyMetaData1_attid_sort(const struct replPropertyMetaData1 *m1,
@@ -270,7 +270,7 @@ static int replmd_add(struct ldb_module *module, struct ldb_request *req)
 
        ac->schema = schema;
 
-       if (ldb_msg_find_element(req->op.add.message, "objectGUID")) {
+       if (ldb_msg_find_element(req->op.add.message, "objectGUID") != NULL) {
                ldb_debug_set(module->ldb, LDB_DEBUG_ERROR,
                              "replmd_add: it's not allowed to add an object with objectGUID\n");
                return LDB_ERR_UNWILLING_TO_PERFORM;
@@ -495,7 +495,7 @@ static int replmd_modify(struct ldb_module *module, struct ldb_request *req)
         * - calculate the new replPropertyMetaData attribute
         */
 
-       if (add_time_element(msg, "whenChanged", t) != 0) {
+       if (add_time_element(msg, "whenChanged", t) != LDB_SUCCESS) {
                talloc_free(ac);
                return LDB_ERR_OPERATIONS_ERROR;
        }
@@ -503,7 +503,7 @@ static int replmd_modify(struct ldb_module *module, struct ldb_request *req)
        /* Get a sequence number from the backend */
        ret = ldb_sequence_number(module->ldb, LDB_SEQ_NEXT, &seq_num);
        if (ret == LDB_SUCCESS) {
-               if (add_uint64_element(msg, "uSNChanged", seq_num) != 0) {
+               if (add_uint64_element(msg, "uSNChanged", seq_num) != LDB_SUCCESS) {
                        talloc_free(ac);
                        return LDB_ERR_OPERATIONS_ERROR;
                }
index a71ffff61853afcbdc1ea23f1f26189505b04c59..f6e735df7959a7e7b0f9cfba1508dea377f3bf07 100644 (file)
@@ -41,7 +41,7 @@
 #include "dsdb/samdb/samdb.h"
 #include "libcli/security/security.h"
 #include "librpc/gen_ndr/ndr_security.h"
-#include "util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 #include "ldb_wrap.h"
 
 struct samldb_ctx;
index 56d24a2962859ada27aa34c4a3f233b3c9a25b8a..0266654811ffd511deb71d994447c6b11a13b3dc 100644 (file)
@@ -29,7 +29,7 @@
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "librpc/gen_ndr/ndr_drsuapi.h"
 #include "librpc/gen_ndr/ndr_drsblobs.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "param/param.h"
 
 static int generate_objectClasses(struct ldb_context *ldb, struct ldb_message *msg,
@@ -319,7 +319,7 @@ static int generate_dITContentRules(struct ldb_context *ldb, struct ldb_message
                        }
                }
        }
-       return 0;
+       return LDB_SUCCESS;
 }
 
 
index d15e85ad41a173b2a7dc966e8195c519e8987e3d..c353914e2cda3d8bec0e6ea4aca27635254acd52 100644 (file)
@@ -603,10 +603,18 @@ static int nsuniqueid_init(struct ldb_module *module)
        return ldb_next_init(module);
 }
 
-static int get_seq(struct ldb_request *req,
-                  struct ldb_reply *ares)
+static int get_seq_callback(struct ldb_request *req,
+                           struct ldb_reply *ares)
 {
        unsigned long long *seq = (unsigned long long *)req->context;
+
+       if (!ares) {
+               return ldb_request_done(req, LDB_ERR_OPERATIONS_ERROR);
+       }
+       if (ares->error != LDB_SUCCESS) {
+               return ldb_request_done(req, ares->error);
+       }
+
        if (ares->type == LDB_REPLY_ENTRY) {
                struct ldb_message_element *el = ldb_msg_find_element(ares->message, "contextCSN");
                if (el) {
@@ -618,6 +626,7 @@ static int get_seq(struct ldb_request *req,
                return ldb_request_done(req, LDB_SUCCESS);
        }
 
+       talloc_free(ares);
        return LDB_SUCCESS;
 }
 
@@ -626,7 +635,7 @@ static int entryuuid_sequence_number(struct ldb_module *module, struct ldb_reque
        int ret;
        struct map_private *map_private;
        struct entryuuid_private *entryuuid_private;
-       unsigned long long seq = 0;
+       unsigned long long seq_num = 0;
        struct ldb_request *search_req;
 
        const struct ldb_control *partition_ctrl;
@@ -636,6 +645,12 @@ static int entryuuid_sequence_number(struct ldb_module *module, struct ldb_reque
                "contextCSN", NULL
        };
 
+       struct ldb_seqnum_request *seq;
+       struct ldb_seqnum_result *seqr;
+       struct ldb_extended *ext;
+
+       seq = talloc_get_type(req->op.extended.data, struct ldb_seqnum_request);
+
        map_private = talloc_get_type(module->private_data, struct map_private);
 
        entryuuid_private = talloc_get_type(map_private->caller_private, struct entryuuid_private);
@@ -655,7 +670,7 @@ static int entryuuid_sequence_number(struct ldb_module *module, struct ldb_reque
        ret = ldb_build_search_req(&search_req, module->ldb, req,
                                   partition->dn, LDB_SCOPE_BASE,
                                   NULL, contextCSN_attr, NULL,
-                                  &seq, get_seq,
+                                  &seq_num, get_seq_callback,
                                   NULL);
        if (ret != LDB_SUCCESS) {
                return ret;
@@ -672,36 +687,59 @@ static int entryuuid_sequence_number(struct ldb_module *module, struct ldb_reque
                return ret;
        }
 
-       switch (req->op.seq_num.type) {
+       ext = talloc_zero(req, struct ldb_extended);
+       if (!ext) {
+               return LDB_ERR_OPERATIONS_ERROR;
+       }
+       seqr = talloc_zero(req, struct ldb_seqnum_result);
+       if (seqr == NULL) {
+               talloc_free(ext);
+               return LDB_ERR_OPERATIONS_ERROR;
+       }
+       ext->oid = LDB_EXTENDED_SEQUENCE_NUMBER;
+       ext->data = seqr;
+
+       switch (seq->type) {
        case LDB_SEQ_HIGHEST_SEQ:
-               req->op.seq_num.seq_num = seq;
+               seqr->seq_num = seq_num;
                break;
        case LDB_SEQ_NEXT:
-               req->op.seq_num.seq_num = seq;
-               req->op.seq_num.seq_num++;
+               seqr->seq_num = seq_num;
+               seqr->seq_num++;
                break;
        case LDB_SEQ_HIGHEST_TIMESTAMP:
        {
-               req->op.seq_num.seq_num = (seq >> 24);
+               seqr->seq_num = (seq_num >> 24);
                break;
        }
        }
-       req->op.seq_num.flags = 0;
-       req->op.seq_num.flags |= LDB_SEQ_TIMESTAMP_SEQUENCE;
-       req->op.seq_num.flags |= LDB_SEQ_GLOBAL_SEQUENCE;
-       return LDB_SUCCESS;
+       seqr->flags = 0;
+       seqr->flags |= LDB_SEQ_TIMESTAMP_SEQUENCE;
+       seqr->flags |= LDB_SEQ_GLOBAL_SEQUENCE;
+
+       /* send request done */
+       return ldb_module_done(req, NULL, ext, LDB_SUCCESS);
+}
+
+static int entryuuid_extended(struct ldb_module *module, struct ldb_request *req)
+{
+       if (strcmp(req->op.extended.oid, LDB_EXTENDED_SEQUENCE_NUMBER) == 0) {
+               return entryuuid_sequence_number(module, req);
+       }
+
+       return ldb_next_request(module, req);
 }
 
 _PUBLIC_ const struct ldb_module_ops ldb_entryuuid_module_ops = {
        .name              = "entryuuid",
        .init_context      = entryuuid_init,
-       .sequence_number   = entryuuid_sequence_number,
+       .extended          = entryuuid_extended,
        LDB_MAP_OPS
 };
 
 _PUBLIC_ const struct ldb_module_ops ldb_nsuniqueid_module_ops = {
        .name              = "nsuniqueid",
        .init_context      = nsuniqueid_init,
-       .sequence_number   = entryuuid_sequence_number,
+       .extended          = entryuuid_extended,
        LDB_MAP_OPS
 };
index 5d928ebce350b6e7dad60d8740dd7e505769d3fc..f75ea3c4f7c3a0f20f67548b5930e16e2cfb459a 100644 (file)
@@ -34,7 +34,7 @@
 #include "system/time.h"
 #include "system/filesys.h"
 #include "ldb_wrap.h"
-#include "util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 #include "dsdb/samdb/samdb.h"
 #include "dsdb/common/flags.h"
 #include "param/param.h"
index 688d1ef9de3da4586d3337f2fbee4573a85c7c48..d4ef79aac1fc6feed3ef8ecebcf0f14e4e0352cb 100644 (file)
@@ -24,7 +24,7 @@
 #include "dsdb/samdb/samdb.h"
 #include "auth/auth.h"
 #include "libcli/security/security.h"
-#include "util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 #include "param/param.h"
 
 /*
index d983e3c2720fe68762839b146fec2ddcb359fb6f..69d4c2ce80d61504bce477d6f4a6e39e89f00319 100644 (file)
@@ -23,7 +23,7 @@
 #include "includes.h"
 #include "dsdb/samdb/samdb.h"
 #include "lib/ldb/include/ldb_errors.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "librpc/gen_ndr/ndr_drsuapi.h"
 #include "librpc/gen_ndr/ndr_drsblobs.h"
@@ -199,9 +199,8 @@ WERROR dsdb_get_oid_mappings_ldb(const struct dsdb_schema *schema,
                return ntstatus_to_werror(nt_status);
        }
 
-       *schemaInfo = strhex_to_data_blob(schema->schema_info);
+       *schemaInfo = strhex_to_data_blob(mem_ctx, schema->schema_info);
        W_ERROR_HAVE_NO_MEMORY(schemaInfo->data);
-       talloc_steal(mem_ctx, schemaInfo->data);
 
        return WERR_OK;
 }
@@ -819,12 +818,11 @@ int dsdb_schema_from_ldb_results(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
        }
        info_val = ldb_msg_find_ldb_val(schema_res->msgs[0], "schemaInfo");
        if (!info_val) {
-               info_val_default = strhex_to_data_blob("FF0000000000000000000000000000000000000000");
+               info_val_default = strhex_to_data_blob(mem_ctx, "FF0000000000000000000000000000000000000000");
                if (!info_val_default.data) {
                        dsdb_oom(error_string, mem_ctx);
                        return LDB_ERR_OPERATIONS_ERROR;
                }
-               talloc_steal(mem_ctx, info_val_default.data);
                info_val = &info_val_default;
        }
 
index b6e8ed46c28da96f5f99291c19736675632132b4..d0aae4e221bde95e525bb52db829bb36f3b12d20 100644 (file)
@@ -24,7 +24,7 @@
 #include "dsdb/samdb/samdb.h"
 #include "lib/ldb/include/ldb_errors.h"
 #include "lib/ldb/include/ldb_private.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "param/param.h"
 
 
@@ -328,11 +328,10 @@ WERROR dsdb_attach_schema_from_ldif_file(struct ldb_context *ldb, const char *pf
 
        info_val = ldb_msg_find_ldb_val(msg, "schemaInfo");
        if (!info_val) {
-               info_val_default = strhex_to_data_blob("FF0000000000000000000000000000000000000000");
+               info_val_default = strhex_to_data_blob(mem_ctx, "FF0000000000000000000000000000000000000000");
                if (!info_val_default.data) {
                        goto nomem;
                }
-               talloc_steal(mem_ctx, info_val_default.data);
                info_val = &info_val_default;
        }
 
index e2bbb167ed26a44ccafe2654b8540110b826eb54..43119d26955331b8dfa0bd1ea8aa5508e2fe81e3 100644 (file)
@@ -1,18 +1,18 @@
 # FIXME: This file should be autogenerated by the build system at some 
 # point
-lib/util/util.h: util.h
-lib/util/debug.h: util/debug.h
-lib/util/mutex.h: util/mutex.h
-lib/util/attr.h: util/attr.h
-lib/util/byteorder.h: util/byteorder.h
-lib/util/safe_string.h: util/safe_string.h
-lib/util/xfile.h: util/xfile.h
+../lib/util/util.h: util.h
+../lib/util/debug.h: util/debug.h
+../lib/util/mutex.h: util/mutex.h
+../lib/util/attr.h: util/attr.h
+../lib/util/byteorder.h: util/byteorder.h
+../lib/util/safe_string.h: util/safe_string.h
+../lib/util/xfile.h: util/xfile.h
 lib/tdr/tdr.h: tdr.h
 librpc/rpc/dcerpc.h: dcerpc.h
 lib/ldb/include/ldb.h: ldb.h
 lib/ldb/include/ldb_errors.h: ldb_errors.h
 auth/gensec/gensec.h: gensec.h
-librpc/ndr/libndr.h: ndr.h
+../librpc/ndr/libndr.h: ndr.h
 lib/registry/registry.h: registry.h
 libcli/util/werror.h: core/werror.h
 libcli/util/doserr.h: core/doserr.h
@@ -52,21 +52,21 @@ librpc/gen_ndr/svcctl.h: gen_ndr/svcctl.h
 librpc/gen_ndr/ndr_svcctl.h: gen_ndr/ndr_svcctl.h
 librpc/gen_ndr/ndr_svcctl_c.h: gen_ndr/ndr_svcctl_c.h
 lib/cmdline/popt_common.h: samba/popt.h
-lib/util/dlinklist.h: dlinklist.h
-lib/util/data_blob.h: util/data_blob.h
-lib/util/time.h: util/time.h
+../lib/util/dlinklist.h: dlinklist.h
+../lib/util/data_blob.h: util/data_blob.h
+../lib/util/time.h: util/time.h
 version.h: samba/version.h
 param/param.h: param.h
-lib/util/asn1.h: samba/asn1.h
+../lib/util/asn1.h: samba/asn1.h
 libcli/util/error.h: core/error.h
 lib/tdb_wrap.h: tdb_wrap.h
 lib/ldb_wrap.h: ldb_wrap.h
 torture/smbtorture.h: smbtorture.h
 librpc/gen_ndr/winbind.h: gen_ndr/winbind.h
 param/share.h: share.h
-lib/util/util_tdb.h: util_tdb.h
-lib/util/util_ldb.h: util_ldb.h
-lib/util/wrap_xattr.h: wrap_xattr.h
+../lib/util/util_tdb.h: util_tdb.h
+../lib/util/util_ldb.h: util_ldb.h
+../lib/util/wrap_xattr.h: wrap_xattr.h
 lib/events/events.h: events/events.h
 lib/events/events_internal.h: events/events_internal.h
 libcli/ldap/ldap_ndr.h: ldap_ndr.h
index 750ebc4137b31a343822b20fddf112a096746ec7..7b623120a92e681fd084ad15a90207cf96aa7ce4 100644 (file)
 #ifndef _PRINTF_ATTRIBUTE
 #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)
 #endif
-#include "util/util.h"
+#include "../lib/util/util.h"
+#include "../lib/util/debug.h"
 
 #include "libcli/util/error.h"
 
 /* String routines */
-#include "util/safe_string.h"
+#include "../lib/util/safe_string.h"
 
 #if 0
 /* darn, we can't do this now that we don't link the ldb tools to all the smb libs */
index 51f464cd096c75838a53b2926373a2d748fa9bda..b6a48e79d0f4d1e18eb58f9732438ecb2d058bfd 100644 (file)
@@ -41,7 +41,7 @@
 #include "auth/auth.h"
 #include "auth/credentials/credentials.h"
 #include "auth/auth_sam.h"
-#include "util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 #include "dsdb/samdb/samdb.h"
 #include "librpc/ndr/libndr.h"
 #include "librpc/gen_ndr/ndr_drsblobs.h"
@@ -277,12 +277,11 @@ static krb5_error_code LDB_message2entry_keys(krb5_context context,
        if (scpk) {
                DATA_BLOB blob;
 
-               blob = strhex_to_data_blob(scpk->data);
+               blob = strhex_to_data_blob(mem_ctx, scpk->data);
                if (!blob.data) {
                        ret = ENOMEM;
                        goto out;
                }
-               talloc_steal(mem_ctx, blob.data);
 
                /* we cannot use ndr_pull_struct_blob_all() here, as w2k and w2k3 add padding bytes */
                ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, iconv_convenience, &_pkb,
index 83c6f1c2ee15dc93a408c52bcfb2a7abb5ddb216..cf6dbf0c93d0532b05369441897f9e2a78b3aa88 100644 (file)
@@ -29,7 +29,7 @@
 #include "lib/events/events.h"
 #include "lib/socket/socket.h"
 #include "system/network.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "lib/messaging/irpc.h"
 #include "lib/stream/packet.h"
 #include "librpc/gen_ndr/samr.h"
index 603332e69eb4282157d0e57e9f0b223f424ea20c..1336b0157ecc03eda7e7b915d2128b05d55419da 100644 (file)
@@ -25,7 +25,7 @@
 #include "lib/events/events.h"
 #include "lib/socket/socket.h"
 #include "system/network.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "lib/ldb/include/ldb.h"
 #include "auth/gensec/gensec.h"
 #include "auth/credentials/credentials.h"
@@ -175,7 +175,7 @@ static bool kpasswd_make_pwchange_reply(struct kdc_server *kdc,
 static bool kpasswdd_change_password(struct kdc_server *kdc,
                                     TALLOC_CTX *mem_ctx, 
                                     struct auth_session_info *session_info,
-                                    const char *password,
+                                    const DATA_BLOB *password,
                                     DATA_BLOB *reply)
 {
        NTSTATUS status;
@@ -219,6 +219,8 @@ static bool kpasswd_process_request(struct kdc_server *kdc,
                                    DATA_BLOB *reply)
 {
        struct auth_session_info *session_info;
+       ssize_t pw_len;
+
        if (!NT_STATUS_IS_OK(gensec_session_info(gensec_security, 
                                                 &session_info))) {
                return kpasswdd_make_error_reply(kdc, mem_ctx, 
@@ -230,12 +232,20 @@ static bool kpasswd_process_request(struct kdc_server *kdc,
        switch (version) {
        case KRB5_KPASSWD_VERS_CHANGEPW:
        {
-               char *password = talloc_strndup(mem_ctx, (const char *)input->data, input->length);
-               if (!password) {
+               DATA_BLOB password;
+               pw_len = convert_string_talloc(mem_ctx, lp_iconv_convenience(kdc->task->lp_ctx), 
+                                              CH_UTF8, CH_UTF16, 
+                                              (const char *)input->data, 
+                                              input->length,
+                                              (void **)&password.data);
+
+               if (pw_len == -1) {
                        return false;
                }
+               password.length = pw_len;
+       
                return kpasswdd_change_password(kdc, mem_ctx, session_info, 
-                                               password, reply);
+                                               &password, reply);
                break;
        }
        case KRB5_KPASSWD_VERS_SETPW:
@@ -248,7 +258,7 @@ static bool kpasswd_process_request(struct kdc_server *kdc,
                krb5_context context = kdc->smb_krb5_context->krb5_context;
 
                ChangePasswdDataMS chpw;
-               char *password;
+               DATA_BLOB password;
 
                krb5_principal principal;
                char *set_password_on_princ;
@@ -271,13 +281,18 @@ static bool kpasswd_process_request(struct kdc_server *kdc,
                                                        reply);
                }
                
-               password = talloc_strndup(mem_ctx, 
-                                         (const char *)chpw.newpasswd.data, 
-                                         chpw.newpasswd.length);
-               if (!password) {
+               pw_len = convert_string_talloc(mem_ctx, lp_iconv_convenience(kdc->task->lp_ctx), 
+                                              CH_UTF8, CH_UTF16, 
+                                              (const char *)chpw.newpasswd.data, 
+                                              chpw.newpasswd.length,
+                                              (void **)&password.data);
+               if (pw_len == -1) {
                        free_ChangePasswdDataMS(&chpw);
                        return false;
                }
+               
+               password.length = pw_len;
+       
                if ((chpw.targname && !chpw.targrealm) 
                    || (!chpw.targname && chpw.targrealm)) {
                        return kpasswdd_make_error_reply(kdc, mem_ctx, 
@@ -306,7 +321,7 @@ static bool kpasswd_process_request(struct kdc_server *kdc,
                } else {
                        free_ChangePasswdDataMS(&chpw);
                        return kpasswdd_change_password(kdc, mem_ctx, session_info, 
-                                                       password, reply);
+                                                       &password, reply);
                }
                free_ChangePasswdDataMS(&chpw);
 
@@ -371,7 +386,7 @@ static bool kpasswd_process_request(struct kdc_server *kdc,
                        /* Admin password set */
                        status = samdb_set_password(samdb, mem_ctx,
                                                    set_password_on_dn, NULL,
-                                                   msg, password, NULL, NULL, 
+                                                   msg, &password, NULL, NULL, 
                                                    false, /* this is not a user password change */
                                                    &reject_reason, &dominfo);
                }
index ffbef3d92fe9dbb0a9b117dbb028bd566be4009d..32fc00832e05d7a1fa10de6c889e156b51a81c9d 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "includes.h"
 #include "ldap_server/ldap_server.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "libcli/ldap/ldap.h"
 #include "auth/credentials/credentials.h"
 #include "auth/gensec/gensec.h"
index fe917cf7f27d1c8ff8210cc442abf58216e79346..334e427d7985746ae5a51ef8bd4f62fe7bf45b7c 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "includes.h"
 #include "ldap_server/ldap_server.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "libcli/ldap/ldap.h"
 #include "lib/tls/tls.h"
 #include "smbd/service_stream.h"
index 0aa9afbdd687d1f99013757865890abe9401d194..f08f24595a470e34dcf9a76c2da4f11d6348f224 100644 (file)
@@ -26,8 +26,8 @@
 #include "auth/auth.h"
 #include "auth/credentials/credentials.h"
 #include "librpc/gen_ndr/ndr_samr.h"
-#include "lib/util/dlinklist.h"
-#include "lib/util/asn1.h"
+#include "../lib/util/dlinklist.h"
+#include "../lib/util/asn1.h"
 #include "ldap_server/ldap_server.h"
 #include "smbd/service_task.h"
 #include "smbd/service_stream.h"
index d4f930b4622dc8893d4f58acd6a743374d5caf9d..150383e7f9ebf7b316b6c87b043a8b3ee33a3b38 100644 (file)
@@ -19,7 +19,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "system/iconv.h"
 #include "system/filesys.h"
 #include "param/param.h"
index 3d2c13587d8fa1ca5e8b9ee5b03a1300c80a64fb..695bfa7f98d2a9a10280fefaff86f7412e33f3ed 100644 (file)
@@ -28,7 +28,7 @@
 #include "librpc/rpc/dcerpc.h"
 #include "lib/com/dcom/dcom.h"
 #include "librpc/ndr/ndr_table.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "auth/credentials/credentials.h"
 #include "libcli/composite/composite.h"
 
index 26a18a9ae97f66c25d64bd065b9999971cc8c43f..f94aa879253e68c0eba04644481c81840652e3de 100644 (file)
@@ -20,7 +20,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "librpc/gen_ndr/com_dcom.h"
 #include "lib/com/dcom/dcom.h"
 
index bcc5fa393aea4be7dc20567af894755ca2fc9556..daed8c11e5acd3797c4600076c2774b6a6d695dc 100644 (file)
@@ -19,7 +19,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "lib/com/com.h"
 #include "lib/events/events.h"
 #include "librpc/gen_ndr/com_dcom.h"
index 11bf95c4d65bcae6abfdc852936e5a1e47d560e0..ed21da7cd809750b12a8dbd839f25756ee201810 100644 (file)
@@ -19,7 +19,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "lib/com/com.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 
diff --git a/source4/lib/gencache/gencache.c b/source4/lib/gencache/gencache.c
deleted file mode 100644 (file)
index aaaa40e..0000000
+++ /dev/null
@@ -1,375 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-
-   Generic, persistent and shared between processes cache mechanism for use
-   by various parts of the Samba code
-
-   Copyright (C) Rafal Szczesniak    2002
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-#include "system/time.h"
-#include "system/filesys.h"
-#include "tdb_wrap.h"
-#include "lib/gencache/gencache.h"
-
-#define TIMEOUT_LEN 12
-#define CACHE_DATA_FMT "%12u/%s"
-
-static struct tdb_wrap *cache;
-
-/**
- * @file gencache.c
- * @brief Generic, persistent and shared between processes cache mechanism
- *        for use by various parts of the Samba code
- *
- **/
-
-
-/**
- * Cache initialisation function. Opens cache tdb file or creates
- * it if does not exist.
- *
- * @return true on successful initialisation of the cache or
- *         false on failure
- **/
-
-bool gencache_init(struct loadparm_context *lp_ctx)
-{
-       char* cache_fname = NULL;
-       TALLOC_CTX *mem_ctx = talloc_autofree_context();
-       
-       /* skip file open if it's already opened */
-       if (cache) return true;
-
-       cache_fname = lock_path(mem_ctx, lp_ctx, "gencache.tdb");
-       if (cache_fname != NULL) {
-               DEBUG(5, ("Opening cache file at %s\n", cache_fname));
-       } else {
-               DEBUG(0, ("Filename allocation failed.\n"));
-               return false;
-       }
-
-       cache = tdb_wrap_open(mem_ctx, cache_fname, 0, TDB_DEFAULT,
-                             O_RDWR|O_CREAT, 0644);
-
-       talloc_free(cache_fname);
-       if (!cache) {
-               DEBUG(5, ("Attempt to open gencache.tdb has failed.\n"));
-               return false;
-       }
-       return true;
-}
-
-
-/**
- * Cache shutdown function. Closes opened cache tdb file.
- *
- * @return true on successful closing the cache or
- *         false on failure during cache shutdown
- **/
-bool gencache_shutdown(void)
-{
-       if (!cache) return false;
-       DEBUG(5, ("Closing cache file\n"));
-       talloc_free(cache);
-       return true;
-}
-
-
-/**
- * Set an entry in the cache file. If there's no such
- * one, then add it.
- *
- * @param keystr string that represents a key of this entry
- * @param value text representation value being cached
- * @param timeout time when the value is expired
- *
- * @retval true when entry is successfuly stored
- * @retval false on failure
- **/
-bool gencache_set(const char *keystr, const char *value, time_t timeout)
-{
-       int ret;
-       TDB_DATA keybuf, databuf;
-       char* valstr = NULL;
-       
-       /* fail completely if get null pointers passed */
-       SMB_ASSERT(keystr && value);
-
-       if (!gencache_init()) return false;
-       
-       asprintf(&valstr, CACHE_DATA_FMT, (int)timeout, value);
-       if (!valstr)
-               return false;
-
-       keybuf.dptr = (uint8_t *)strdup(keystr);
-       keybuf.dsize = strlen(keystr)+1;
-       databuf.dptr = (uint8_t *)strdup(valstr);
-       databuf.dsize = strlen(valstr)+1;
-       DEBUG(10, ("Adding cache entry with key = %s; value = %s and timeout \
-                  = %s (%d seconds %s)\n", keybuf.dptr, value, ctime(&timeout),
-                  (int)(timeout - time(NULL)), timeout > time(NULL) ? "ahead" : "in the past"));
-               
-       ret = tdb_store(cache->tdb, keybuf, databuf, 0);
-       SAFE_FREE(valstr);
-       SAFE_FREE(keybuf.dptr);
-       SAFE_FREE(databuf.dptr);
-       
-       return ret == 0;
-}
-
-
-/**
- * Set existing entry to the cache file.
- *
- * @param keystr string that represents a key of this entry
- * @param valstr text representation value being cached
- * @param timeout time when the value is expired
- *
- * @retval true when entry is successfuly set
- * @retval false on failure
- **/
-
-bool gencache_set_only(const char *keystr, const char *valstr, time_t timeout)
-{
-       int ret = -1;
-       TDB_DATA keybuf, databuf;
-       char *old_valstr, *datastr;
-       time_t old_timeout;
-       
-       /* fail completely if get null pointers passed */
-       SMB_ASSERT(keystr && valstr);
-
-       if (!gencache_init()) return false;
-                       
-       /* 
-        * Check whether entry exists in the cache
-        * Don't verify gencache_get exit code, since the entry may be expired
-        */     
-       gencache_get(keystr, &old_valstr, &old_timeout);
-       
-       if (!(old_valstr && old_timeout)) return false;
-               
-       DEBUG(10, ("Setting cache entry with key = %s; old value = %s and old timeout \
-                  = %s\n", keystr, old_valstr, ctime(&old_timeout)));
-
-       asprintf(&datastr, CACHE_DATA_FMT, (int)timeout, valstr);
-       keybuf.dptr = (uint8_t *)strdup(keystr);
-       keybuf.dsize = strlen(keystr)+1;
-       databuf.dptr = (uint8_t *)strdup(datastr);
-       databuf.dsize = strlen(datastr)+1;
-       DEBUGADD(10, ("New value = %s, new timeout = %s (%d seconds %s)", valstr,
-                     ctime(&timeout), (int)(timeout - time(NULL)),
-                     timeout > time(NULL) ? "ahead" : "in the past"));
-
-               
-       ret = tdb_store(cache->tdb, keybuf, databuf, TDB_REPLACE);
-
-       SAFE_FREE(datastr);
-       SAFE_FREE(old_valstr);
-       SAFE_FREE(keybuf.dptr);
-       SAFE_FREE(databuf.dptr);
-       
-       return ret == 0;
-}
-
-/**
- * Delete one entry from the cache file.
- *
- * @param keystr string that represents a key of this entry
- *
- * @retval true upon successful deletion
- * @retval false in case of failure
- **/
-
-bool gencache_del(const char *keystr)
-{
-       int ret;
-       TDB_DATA keybuf;
-       
-       /* fail completely if get null pointers passed */
-       SMB_ASSERT(keystr);
-
-       if (!gencache_init()) return false;     
-       
-       keybuf.dptr = (uint8_t *)strdup(keystr);
-       keybuf.dsize = strlen(keystr)+1;
-       DEBUG(10, ("Deleting cache entry (key = %s)\n", keystr));
-       ret = tdb_delete(cache->tdb, keybuf);
-       
-       SAFE_FREE(keybuf.dptr);
-       return ret == 0;
-}
-
-
-/**
- * Get existing entry from the cache file.
- *
- * @param keystr string that represents a key of this entry
- * @param valstr buffer that is allocated and filled with the entry value
- *        buffer's disposing must be done outside
- * @param timeout pointer to a time_t that is filled with entry's
- *        timeout
- *
- * @retval true when entry is successfuly fetched
- * @retval false for failure
- **/
-
-bool gencache_get(const char *keystr, char **valstr, time_t *timeout)
-{
-       TDB_DATA keybuf, databuf;
-
-       /* fail completely if get null pointers passed */
-       SMB_ASSERT(keystr);
-
-       if (!gencache_init())
-               return false;
-       
-       keybuf.dptr = (uint8_t *)strdup(keystr);
-       keybuf.dsize = strlen(keystr)+1;
-       databuf = tdb_fetch(cache->tdb, keybuf);
-       SAFE_FREE(keybuf.dptr);
-       
-       if (databuf.dptr && databuf.dsize > TIMEOUT_LEN) {
-               char* entry_buf = strndup((char *)databuf.dptr, databuf.dsize);
-               char *v;
-               time_t t;
-               unsigned i;
-
-               v = malloc_array_p(char, databuf.dsize - TIMEOUT_LEN);
-                               
-               SAFE_FREE(databuf.dptr);
-               sscanf(entry_buf, CACHE_DATA_FMT, (int*)&i, v);
-               SAFE_FREE(entry_buf);
-               t = i;
-
-               DEBUG(10, ("Returning %s cache entry: key = %s, value = %s, "
-                          "timeout = %s\n", t > time(NULL) ? "valid" :
-                          "expired", keystr, v, ctime(&t)));
-
-               if (valstr)
-                       *valstr = v;
-               else
-                       SAFE_FREE(v);
-
-               if (timeout)
-                       *timeout = t;
-
-               return t > time(NULL);
-
-       } else {
-               SAFE_FREE(databuf.dptr);
-
-               if (valstr)
-                       *valstr = NULL;
-
-               if (timeout)
-                       timeout = NULL;
-
-               DEBUG(10, ("Cache entry with key = %s couldn't be found\n", 
-                          keystr));
-
-               return false;
-       }
-}
-
-
-/**
- * Iterate through all entries which key matches to specified pattern
- *
- * @param fn pointer to the function that will be supplied with each single
- *        matching cache entry (key, value and timeout) as an arguments
- * @param data void pointer to an arbitrary data that is passed directly to the fn
- *        function on each call
- * @param keystr_pattern pattern the existing entries' keys are matched to
- *
- **/
-
-void gencache_iterate(void (*fn)(const char* key, const char *value, time_t timeout, void* dptr),
-                      void* data, const char* keystr_pattern)
-{
-       TDB_LIST_NODE *node, *first_node;
-       TDB_DATA databuf;
-       char *keystr = NULL, *valstr = NULL, *entry = NULL;
-       time_t timeout = 0;
-       unsigned i;
-
-       /* fail completely if get null pointers passed */
-       SMB_ASSERT(fn && keystr_pattern);
-
-       if (!gencache_init()) return;
-
-       DEBUG(5, ("Searching cache keys with pattern %s\n", keystr_pattern));
-       node = tdb_search_keys(cache->tdb, keystr_pattern);
-       first_node = node;
-       
-       while (node) {
-               /* ensure null termination of the key string */
-               keystr = strndup((char *)node->node_key.dptr, node->node_key.dsize);
-               
-               /* 
-                * We don't use gencache_get function, because we need to iterate through
-                * all of the entries. Validity verification is up to fn routine.
-                */
-               databuf = tdb_fetch(cache->tdb, node->node_key);
-               if (!databuf.dptr || databuf.dsize <= TIMEOUT_LEN) {
-                       SAFE_FREE(databuf.dptr);
-                       SAFE_FREE(keystr);
-                       node = node->next;
-                       continue;
-               }
-               entry = strndup((char *)databuf.dptr, databuf.dsize);
-               SAFE_FREE(databuf.dptr);
-               valstr = malloc_array_p(char, databuf.dsize - TIMEOUT_LEN);
-               sscanf(entry, CACHE_DATA_FMT, (int*)(&i), valstr);
-               timeout = i;
-               
-               DEBUG(10, ("Calling function with arguments (key = %s, value = %s, timeout = %s)\n",
-                          keystr, valstr, ctime(&timeout)));
-               fn(keystr, valstr, timeout, data);
-               
-               SAFE_FREE(valstr);
-               SAFE_FREE(entry);
-               SAFE_FREE(keystr);
-               node = node->next;
-       }
-       
-       tdb_search_list_free(first_node);
-}
-
-/********************************************************************
- lock a key
-********************************************************************/
-
-int gencache_lock_entry( const char *key )
-{
-       return tdb_lock_bystring(cache->tdb, key);
-}
-
-/********************************************************************
- unlock a key
-********************************************************************/
-
-void gencache_unlock_entry( const char *key )
-{
-       tdb_unlock_bystring(cache->tdb, key);
-}
-
-
diff --git a/source4/lib/gencache/gencache.h b/source4/lib/gencache/gencache.h
deleted file mode 100644 (file)
index 1481676..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-#ifndef __LIB_GENCACHE_GENCACHE_H__
-#define __LIB_GENCACHE_GENCACHE_H__
-
-/**
- * Cache initialisation function. Opens cache tdb file or creates
- * it if does not exist.
- *
- * @return true on successful initialisation of the cache or
- *         false on failure
- **/
-bool gencache_init(struct loadparm_context *lp_ctx);
-
-/**
- * Cache shutdown function. Closes opened cache tdb file.
- *
- * @return true on successful closing the cache or
- *         false on failure during cache shutdown
- **/
-bool gencache_shutdown(void);
-
-/**
- * Set an entry in the cache file. If there's no such
- * one, then add it.
- *
- * @param keystr string that represents a key of this entry
- * @param value text representation value being cached
- * @param timeout time when the value is expired
- *
- * @retval true when entry is successfuly stored
- * @retval false on failure
- **/
-bool gencache_set(const char *keystr, const char *value, time_t timeout);
-
-/**
- * Set existing entry to the cache file.
- *
- * @param keystr string that represents a key of this entry
- * @param valstr text representation value being cached
- * @param timeout time when the value is expired
- *
- * @retval true when entry is successfuly set
- * @retval false on failure
- **/
-bool gencache_set_only(const char *keystr, const char *valstr, time_t timeout);
-
-/**
- * Delete one entry from the cache file.
- *
- * @param keystr string that represents a key of this entry
- *
- * @retval true upon successful deletion
- * @retval false in case of failure
- **/
-bool gencache_del(const char *keystr);
-
-/**
- * Get existing entry from the cache file.
- *
- * @param keystr string that represents a key of this entry
- * @param valstr buffer that is allocated and filled with the entry value
- *        buffer's disposing must be done outside
- * @param timeout pointer to a time_t that is filled with entry's
- *        timeout
- *
- * @retval true when entry is successfuly fetched
- * @retval false for failure
- **/
-bool gencache_get(const char *keystr, char **valstr, time_t *timeout);
-
-/**
- * Iterate through all entries which key matches to specified pattern
- *
- * @param fn pointer to the function that will be supplied with each single
- *        matching cache entry (key, value and timeout) as an arguments
- * @param data void pointer to an arbitrary data that is passed directly to the fn
- *        function on each call
- * @param keystr_pattern pattern the existing entries' keys are matched to
- *
- **/
-void gencache_iterate(void (*fn)(const char* key, const char *value, time_t timeout, void* dptr),
-                      void* data, const char* keystr_pattern);
-
-/********************************************************************
- lock a key
-********************************************************************/
-int gencache_lock_entry( const char *key );
-
-/********************************************************************
- unlock a key
-********************************************************************/
-void gencache_unlock_entry( const char *key );
-
-#endif /* __LIB_GENCACHE_GENCACHE_H__ */
-
diff --git a/source4/lib/json/AUTHORS b/source4/lib/json/AUTHORS
deleted file mode 100644 (file)
index 38f2ce0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Michael Clark <michael@metaparadigm.com>
-C. Watford (christopher.watford@gmail.com)
diff --git a/source4/lib/json/COPYING b/source4/lib/json/COPYING
deleted file mode 100644 (file)
index b07ea94..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-Copyright (c) 2004, 2005 Metaparadigm Pte Ltd
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/source4/lib/json/ChangeLog b/source4/lib/json/ChangeLog
deleted file mode 100644 (file)
index a0f848e..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-0.6
-  * Fix bug in escaping of control characters
-    Johan Björklund, johbjo09 at kth dot se
-  * Remove include "config.h" from headers (should only
-    be included from .c files)
-    Michael Clark <michael@metaparadigm.com>
-
-0.5
-  * Make headers C++ compatible by change *this to *obj
-  * Add ifdef C++ extern "C" to headers
-  * Use simpler definition of min and max in bits.h
-    Larry Lansing, llansing at fuzzynerd dot com
-
-  * Remove automake 1.6 requirement
-  * Move autogen commands into autogen.sh. Update README
-  * Remove error pointer special case for Windows
-  * Change license from LGPL to MIT
-    Michael Clark <michael@metaparadigm.com>
-
-0.4
-  * Fix additional error case in object parsing
-  * Add back sign reversal in nested object parse as error pointer
-    value is negative, while error value is positive.
-    Michael Clark <michael@metaparadigm.com>
-
-0.3
-  * fix pointer arithmetic bug for error pointer check in is_error() macro
-  * fix type passed to printbuf_memappend in json_tokener
-  * update autotools bootstrap instructions in README
-    Michael Clark <michael@metaparadigm.com>
-
-0.2
-  * printbuf.c - C. Watford (christopher.watford@gmail.com)
-    Added a Win32/Win64 compliant implementation of vasprintf
-  * debug.c - C. Watford (christopher.watford@gmail.com)
-    Removed usage of vsyslog on Win32/Win64 systems, needs to be handled
-    by a configure script
-  * json_object.c - C. Watford (christopher.watford@gmail.com)
-    Added scope operator to wrap usage of json_object_object_foreach, this
-    needs to be rethought to be more ANSI C friendly
-  * json_object.h - C. Watford (christopher.watford@gmail.com)
-    Added Microsoft C friendly version of json_object_object_foreach
-  * json_tokener.c - C. Watford (christopher.watford@gmail.com)
-    Added a Win32/Win64 compliant implementation of strndup
-  * json_util.c - C. Watford (christopher.watford@gmail.com)
-    Added cast and mask to suffice size_t v. unsigned int conversion
-    correctness 
-  * json_tokener.c - sign reversal issue on error info for nested object parse
-    spotted by Johan Björklund (johbjo09 at kth.se)
-  * json_object.c - escape " in json_escape_str
-  * Change to automake and libtool to build shared and static library
-    Michael Clark <michael@metaparadigm.com>
-       
-0.1
-  * initial release
diff --git a/source4/lib/json/Doxyfile b/source4/lib/json/Doxyfile
deleted file mode 100644 (file)
index 7e5f306..0000000
+++ /dev/null
@@ -1,1153 +0,0 @@
-# Doxyfile 1.3.8
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
-# by quotes) that should identify the project.
-
-PROJECT_NAME           = json-c
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
-# if some version control system is used.
-
-PROJECT_NUMBER         = 0.2
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = doc
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
-# 4096 sub-directories (in 2 levels) under the output directory of each output 
-# format and will distribute the generated files over these directories. 
-# Enabling this option can be useful when feeding doxygen a huge amount of source 
-# files, where putting all generated files in the same directory would otherwise 
-# cause performance problems for the file system.
-
-CREATE_SUBDIRS         = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, 
-# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, 
-# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, 
-# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, 
-# Swedish, and Ukrainian.
-
-OUTPUT_LANGUAGE        = English
-
-# This tag can be used to specify the encoding used in the generated output. 
-# The encoding is not always determined by the language that is chosen, 
-# but also whether or not the output is meant for Windows or non-Windows users. 
-# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES 
-# forces the Windows encoding (this is the default for the Windows binary), 
-# whereas setting the tag to NO uses a Unix-style encoding (the default for 
-# all platforms other than Windows).
-
-USE_WINDOWS_ENCODING   = NO
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator 
-# that is used to form the text in various listings. Each string 
-# in this list, if found as the leading text of the brief description, will be 
-# stripped from the text and the result after processing the whole list, is used 
-# as the annotated text. Otherwise, the brief description is used as-is. If left 
-# blank, the following values are used ("$name" is automatically replaced with the 
-# name of the entity): "The $name class" "The $name widget" "The $name file" 
-# "is" "provides" "specifies" "contains" "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF       = 
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited 
-# members of a class in the documentation of that class as if those members were 
-# ordinary class members. Constructors, destructors and assignment operators of 
-# the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user-defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. The tag can be used to show relative paths in the file list. 
-# If left blank the directory from which doxygen is run is used as the 
-# path to strip.
-
-STRIP_FROM_PATH        = 
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
-# the path mentioned in the documentation of a class, which tells 
-# the reader which header file to include in order to use a class. 
-# If left blank only the name of the header file containing the class 
-# definition is used. Otherwise one should specify the include paths that 
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH    = 
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful is your file systems 
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments will behave just like the Qt-style comments (thus requiring an 
-# explicit @brief command for a brief description.
-
-JAVADOC_AUTOBRIEF      = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member 
-# documentation.
-
-DETAILS_AT_TOP         = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
-# member inherits the documentation from any documented member that it 
-# re-implements.
-
-INHERIT_DOCS           = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 8
-
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user-defined paragraph with heading "Side Effects:". 
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                = 
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 
-# only. Doxygen will then generate output that is more tailored for C. 
-# For instance, some of the names that are used will be different. The list 
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = YES
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources 
-# only. Doxygen will then generate output that is more tailored for Java. 
-# For instance, namespaces will be presented as packages, qualified scopes 
-# will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
-# the same type (for instance a group of public functions) to be put as a 
-# subgroup of that type (e.g. under the Public Functions section). Set it to 
-# NO to prevent subgrouping. Alternatively, this can be done per class using 
-# the \nosubgrouping command.
-
-SUBGROUPING            = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
-# will be included in the documentation.
-
-EXTRACT_STATIC         = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = NO
-
-# This flag is only useful for Objective-C code. When set to YES local 
-# methods, which are defined in the implementation section but not in 
-# the interface are included in the documentation. 
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these classes will be included in the various 
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
-# documentation blocks found inside the body of a function. 
-# If set to NO (the default) these blocks will be appended to the 
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower-case letters. If set to YES upper-case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put a list of the files that are included by a file in the documentation 
-# of that file.
-
-SHOW_INCLUDE_FILES     = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
-# declaration order.
-
-SORT_MEMBER_DOCS       = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
-# brief documentation of file, namespace and class members alphabetically 
-# by member name. If set to NO (the default) the members will appear in 
-# declaration order.
-
-SORT_BRIEF_DOCS        = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
-# sorted by fully-qualified names, including namespaces. If set to 
-# NO (the default), the class list will be sorted only by class name, 
-# not including the namespace part. 
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the 
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting 
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional 
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS       = 
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or define consists of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and defines in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated 
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
-# potential errors in the documentation, such as not documenting some 
-# parameters in a documented function, or documenting parameters that 
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
-# warning originated and the warning text.
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
-# to stderr.
-
-WARN_LOGFILE           = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
-# with spaces.
-
-INPUT                  = 
-
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp 
-# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
-
-FILE_PATTERNS          = *.h
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
-# If left blank NO is used.
-
-RECURSIVE              = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should 
-# excluded from the INPUT source files. This way you can easily exclude a 
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE                = 
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories 
-# that are symbolic links (a Unix filesystem feature) are excluded from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
-# certain files from those directories.
-
-EXCLUDE_PATTERNS       = 
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
-# the \include command).
-
-EXAMPLE_PATH           = 
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank all files are included.
-
-EXAMPLE_PATTERNS       = 
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
-# the \image command).
-
-IMAGE_PATH             = 
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
-# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
-# ignored.
-
-INPUT_FILTER           = 
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
-# basis.  Doxygen will compare the file name with each pattern and apply the 
-# filter if there is a match.  The filters are a list of the form: 
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
-# is applied to all files.
-
-FILTER_PATTERNS        = 
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
-# Note: To get rid of all source code in the generated output, make sure also 
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER         = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body 
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
-# then for each documented function all documented 
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES (the default) 
-# then for each documented function all documented entities 
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = YES
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX    = 5
-
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard header.
-
-HTML_HEADER            = 
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard footer.
-
-HTML_FOOTER            = 
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If the tag is left blank doxygen 
-# will generate a default style sheet. Note that doxygen will try to copy 
-# the style sheet file to the HTML output directory, so don't put your own 
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET        = 
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
-# files or namespaces will be aligned in HTML using tables. If set to 
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS     = YES
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
-# written to the html output directory.
-
-CHM_FILE               = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION           = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND             = NO
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
-# top of each HTML page. The value NO (the default) enables the index and 
-# the value YES disables it.
-
-DISABLE_INDEX          = NO
-
-# This tag can be used to set the number of enum values (range [1..20]) 
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
-# probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW      = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
-# generate Latex output.
-
-GENERATE_LATEX         = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         = 
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           = 
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS         = NO
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
-# higher quality PDF documentation.
-
-USE_PDFLATEX           = NO
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
-# in the output.
-
-LATEX_HIDE_INDICES     = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimized for Word 97 and may not look very pretty with 
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assignments. You only have to provide 
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    = 
-
-# Set optional variables used in the generation of an rtf document. 
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
-# generate man pages
-
-GENERATE_MAN           = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to 
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
-# the code including all documentation.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_SCHEMA             = 
-
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_DTD                = 
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
-# dump the program listings (including syntax highlighting 
-# and cross-referencing information) to the XML output. Note that 
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
-# generate a Perl module file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
-# moment.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
-# nicely formatted so it can be parsed by a human reader.  This is useful 
-# if you want to understand what is going on.  On the other hand, if this 
-# tag is set to NO the size of the Perl module output will be much smaller 
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file 
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
-# This is useful so different doxyrules.make files included by the same 
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX = 
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
-# files.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
-# PREDEFINED and EXPAND_AS_PREDEFINED tags.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
-# the preprocessor.
-
-INCLUDE_PATH           = 
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
-# be used.
-
-INCLUDE_FILE_PATTERNS  = 
-
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
-# omitted =1 is assumed.
-
-PREDEFINED             = 
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED      = 
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all function-like macros that are alone 
-# on a line, have an all uppercase name, and do not end with a semicolon. Such 
-# function macros are typically used for boiler-plate code, and will confuse the 
-# parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles. 
-# Optionally an initial location of the external documentation 
-# can be added for each tagfile. The format of a tag file without 
-# this location is as follows: 
-#   TAGFILES = file1 file2 ... 
-# Adding location for the tag files is done as follows: 
-#   TAGFILES = file1=loc1 "file2 = loc2" ... 
-# where "loc1" and "loc2" can be relative or absolute paths or 
-# URLs. If a location is present for each tag, the installdox tool 
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen 
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES               = 
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       = 
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
-# be listed.
-
-EXTERNAL_GROUPS        = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script 
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or 
-# super classes. Setting the tag to NO turns the diagrams off. Note that this 
-# option is superseded by the HAVE_DOT option below. This is only a fallback. It is 
-# recommended to install and use dot, since it yields more powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = NO
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
-# collaboration diagrams in a style similar to the OMG's Unified Modeling 
-# Language.
-
-UML_LOOK               = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the 
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = YES
-
-# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
-# generate a call dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable call graphs for selected 
-# functions only using the \callgraph command.
-
-CALL_GRAPH             = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT       = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
-# found. If left blank, it is assumed the dot tool can be found on the path.
-
-DOT_PATH               = 
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
-# \dotfile command).
-
-DOTFILE_DIRS           = 
-
-# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
-# this value, doxygen will try to truncate the graph, so that it fits within 
-# the specified constraint. Beware that most browsers cannot cope with very 
-# large images.
-
-MAX_DOT_GRAPH_WIDTH    = 1024
-
-# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
-# this value, doxygen will try to truncate the graph, so that it fits within 
-# the specified constraint. Beware that most browsers cannot cope with very 
-# large images.
-
-MAX_DOT_GRAPH_HEIGHT   = 1024
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
-# graphs generated by dot. A depth value of 3 means that only nodes reachable 
-# from the root by following a path via at most 3 edges will be shown. Nodes that 
-# lay further from the root node will be omitted. Note that setting this option to 
-# 1 or 2 may greatly reduce the computation time needed for large code bases. Also 
-# note that a graph may be further truncated if the graph's image dimensions are 
-# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). 
-# If 0 is used for the depth value (the default), the graph is not depth-constrained.
-
-MAX_DOT_GRAPH_DEPTH    = 0
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermediate dot files that are used to generate 
-# the various graphs.
-
-DOT_CLEANUP            = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be 
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE           = NO
diff --git a/source4/lib/json/INSTALL b/source4/lib/json/INSTALL
deleted file mode 100644 (file)
index a4b3414..0000000
+++ /dev/null
@@ -1,229 +0,0 @@
-Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
-Foundation, Inc.
-
-   This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
-
-Basic Installation
-==================
-
-   These are generic installation instructions.
-
-   The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation.  It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions.  Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
-   It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  (Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.)
-
-   If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release.  If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
-   The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You only need
-`configure.ac' if you want to change it or regenerate `configure' using
-a newer version of `autoconf'.
-
-The simplest way to compile this package is:
-
-  1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.  If you're
-     using `csh' on an old version of System V, you might need to type
-     `sh ./configure' instead to prevent `csh' from trying to execute
-     `configure' itself.
-
-     Running `configure' takes awhile.  While running, it prints some
-     messages telling which features it is checking for.
-
-  2. Type `make' to compile the package.
-
-  3. Optionally, type `make check' to run any self-tests that come with
-     the package.
-
-  4. Type `make install' to install the programs and any data files and
-     documentation.
-
-  5. You can remove the program binaries and object files from the
-     source code directory by typing `make clean'.  To also remove the
-     files that `configure' created (so you can compile the package for
-     a different kind of computer), type `make distclean'.  There is
-     also a `make maintainer-clean' target, but that is intended mainly
-     for the package's developers.  If you use it, you may have to get
-     all sorts of other programs in order to regenerate files that came
-     with the distribution.
-
-Compilers and Options
-=====================
-
-   Some systems require unusual options for compilation or linking that
-the `configure' script does not know about.  Run `./configure --help'
-for details on some of the pertinent environment variables.
-
-   You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment.  Here
-is an example:
-
-     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
-
-   *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
-   You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory.  To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'.  `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
-   If you have to use a `make' that does not support the `VPATH'
-variable, you have to compile the package for one architecture at a
-time in the source code directory.  After you have installed the
-package for one architecture, use `make distclean' before reconfiguring
-for another architecture.
-
-Installation Names
-==================
-
-   By default, `make install' will install the package's files in
-`/usr/local/bin', `/usr/local/man', etc.  You can specify an
-installation prefix other than `/usr/local' by giving `configure' the
-option `--prefix=PATH'.
-
-   You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files.  If you
-give `configure' the option `--exec-prefix=PATH', the package will use
-PATH as the prefix for installing programs and libraries.
-Documentation and other data files will still use the regular prefix.
-
-   In addition, if you use an unusual directory layout you can give
-options like `--bindir=PATH' to specify different values for particular
-kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
-
-   If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-Optional Features
-=================
-
-   Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System).  The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
-   For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
-Specifying the System Type
-==========================
-
-   There may be some features `configure' cannot figure out
-automatically, but needs to determine by the type of machine the package
-will run on.  Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
-a message saying it cannot guess the machine type, give it the
-`--build=TYPE' option.  TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
-     CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
-     OS KERNEL-OS
-
-   See the file `config.sub' for the possible values of each field.  If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
-   If you are _building_ compiler tools for cross-compiling, you should
-use the `--target=TYPE' option to select the type of system they will
-produce code for.
-
-   If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-Sharing Defaults
-================
-
-   If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists.  Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Defining Variables
-==================
-
-   Variables not defined in a site shell script can be set in the
-environment passed to `configure'.  However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost.  In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'.  For example:
-
-     ./configure CC=/usr/local2/bin/gcc
-
-will cause the specified gcc to be used as the C compiler (unless it is
-overridden in the site shell script).
-
-`configure' Invocation
-======================
-
-   `configure' recognizes the following options to control how it
-operates.
-
-`--help'
-`-h'
-     Print a summary of the options to `configure', and exit.
-
-`--version'
-`-V'
-     Print the version of Autoconf used to generate the `configure'
-     script, and exit.
-
-`--cache-file=FILE'
-     Enable the cache: use and save the results of the tests in FILE,
-     traditionally `config.cache'.  FILE defaults to `/dev/null' to
-     disable caching.
-
-`--config-cache'
-`-C'
-     Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
-     Do not print messages saying which checks are being made.  To
-     suppress all normal output, redirect it to `/dev/null' (any error
-     messages will still be shown).
-
-`--srcdir=DIR'
-     Look for the package's source code in directory DIR.  Usually
-     `configure' can determine that directory automatically.
-
-`configure' also accepts some other, not widely useful, options.  Run
-`configure --help' for more details.
-
diff --git a/source4/lib/json/Makefile.am b/source4/lib/json/Makefile.am
deleted file mode 100644 (file)
index 4b01dc1..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-CFLAGS = -Wall -std=gnu99 -D_GNU_SOURCE -D_REENTRANT
-
-lib_LTLIBRARIES = libjson.la
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = json.pc
-
-libjsonincludedir = $(includedir)/json
-libjsoninclude_HEADERS = \
-        json.h \
-       bits.h \
-       debug.h \
-       linkhash.h \
-       arraylist.h \
-       json_util.h \
-       json_object.h \
-       json_tokener.h
-
-libjson_la_LDFLAGS = -version-info 0:1:0
-
-libjson_la_SOURCES = \
-       arraylist.c \
-       debug.c \
-       json_object.c \
-       json_tokener.c \
-       json_util.c \
-       linkhash.c \
-       printbuf.c
-
-check_PROGRAMS = test1 test2
-
-test1_SOURCES = test1.c
-test1_LDADD = $(lib_LTLIBRARIES)
-
-test2_SOURCES = test2.c
-test2_LDADD = $(lib_LTLIBRARIES)
diff --git a/source4/lib/json/Makefile.in b/source4/lib/json/Makefile.in
deleted file mode 100644 (file)
index f135701..0000000
+++ /dev/null
@@ -1,533 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-host_alias = @host_alias@
-host_triplet = @host@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-DLLTOOL = @DLLTOOL@
-ECHO = @ECHO@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-F77 = @F77@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-HAVE_LIB = @HAVE_LIB@
-LIB = @LIB@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-LTLIB = @LTLIB@
-MAKEINFO = @MAKEINFO@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-RC = @RC@
-STRIP = @STRIP@
-VERSION = @VERSION@
-
-CFLAGS = -Wall -std=gnu99 -D_GNU_SOURCE -D_REENTRANT
-
-lib_LTLIBRARIES = libjson.la
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = json.pc
-
-libjsonincludedir = $(includedir)/json
-libjsoninclude_HEADERS =          json.h       bits.h  debug.h         linkhash.h      arraylist.h     json_util.h     json_object.h   json_tokener.h
-
-
-libjson_la_LDFLAGS = -version-info 0:1:0
-
-libjson_la_SOURCES =   arraylist.c     debug.c         json_object.c   json_tokener.c  json_util.c     linkhash.c      printbuf.c
-
-
-check_PROGRAMS = test1 test2
-
-test1_SOURCES = test1.c
-test1_LDADD = $(lib_LTLIBRARIES)
-
-test2_SOURCES = test2.c
-test2_LDADD = $(lib_LTLIBRARIES)
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =  json.pc
-LTLIBRARIES =  $(lib_LTLIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir) -I.
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-libjson_la_LIBADD = 
-libjson_la_OBJECTS =  arraylist.lo debug.lo json_object.lo \
-json_tokener.lo json_util.lo linkhash.lo printbuf.lo
-check_PROGRAMS =  test1$(EXEEXT) test2$(EXEEXT)
-test1_OBJECTS =  test1.$(OBJEXT)
-test1_DEPENDENCIES =  libjson.la
-test1_LDFLAGS = 
-test2_OBJECTS =  test2.$(OBJEXT)
-test2_DEPENDENCIES =  libjson.la
-test2_LDFLAGS = 
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DATA =  $(pkgconfig_DATA)
-
-HEADERS =  $(libjsoninclude_HEADERS)
-
-DIST_COMMON =  README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \
-Makefile.am Makefile.in NEWS aclocal.m4 config.guess config.h.in \
-config.sub configure configure.in install-sh json.pc.in ltmain.sh \
-missing mkinstalldirs
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = tar
-GZIP_ENV = --best
-DEP_FILES =  .deps/arraylist.P .deps/debug.P .deps/json_object.P \
-.deps/json_tokener.P .deps/json_util.P .deps/linkhash.P \
-.deps/printbuf.P .deps/test1.P .deps/test2.P
-SOURCES = $(libjson_la_SOURCES) $(test1_SOURCES) $(test2_SOURCES)
-OBJECTS = $(libjson_la_OBJECTS) $(test1_OBJECTS) $(test2_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .obj .s
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
-       cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
-       cd $(top_builddir) \
-         && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4):  configure.in 
-       cd $(srcdir) && $(ACLOCAL)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-       $(SHELL) ./config.status --recheck
-$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
-       cd $(srcdir) && $(AUTOCONF)
-
-config.h: stamp-h
-       @if test ! -f $@; then \
-               rm -f stamp-h; \
-               $(MAKE) stamp-h; \
-       else :; fi
-stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
-       cd $(top_builddir) \
-         && CONFIG_FILES= CONFIG_HEADERS=config.h \
-            $(SHELL) ./config.status
-       @echo timestamp > stamp-h 2> /dev/null
-$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
-       @if test ! -f $@; then \
-               rm -f $(srcdir)/stamp-h.in; \
-               $(MAKE) $(srcdir)/stamp-h.in; \
-       else :; fi
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) 
-       cd $(top_srcdir) && $(AUTOHEADER)
-       @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
-
-mostlyclean-hdr:
-
-clean-hdr:
-
-distclean-hdr:
-       -rm -f config.h
-
-maintainer-clean-hdr:
-json.pc: $(top_builddir)/config.status json.pc.in
-       cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-mostlyclean-libLTLIBRARIES:
-
-clean-libLTLIBRARIES:
-       -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-
-distclean-libLTLIBRARIES:
-
-maintainer-clean-libLTLIBRARIES:
-
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
-       @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(libdir)
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-         if test -f $$p; then \
-           echo "$(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
-           $(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
-         else :; fi; \
-       done
-
-uninstall-libLTLIBRARIES:
-       @$(NORMAL_UNINSTALL)
-       list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-         $(LIBTOOL)  --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
-       done
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
-       $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
-       $(COMPILE) -c $<
-
-.S.o:
-       $(COMPILE) -c $<
-
-mostlyclean-compile:
-       -rm -f *.o core *.core
-       -rm -f *.$(OBJEXT)
-
-clean-compile:
-
-distclean-compile:
-       -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.s.lo:
-       $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
-       $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
-       -rm -f *.lo
-
-clean-libtool:
-       -rm -rf .libs _libs
-
-distclean-libtool:
-
-maintainer-clean-libtool:
-
-libjson.la: $(libjson_la_OBJECTS) $(libjson_la_DEPENDENCIES)
-       $(LINK) -rpath $(libdir) $(libjson_la_LDFLAGS) $(libjson_la_OBJECTS) $(libjson_la_LIBADD) $(LIBS)
-
-mostlyclean-checkPROGRAMS:
-
-clean-checkPROGRAMS:
-       -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
-
-distclean-checkPROGRAMS:
-
-maintainer-clean-checkPROGRAMS:
-
-test1$(EXEEXT): $(test1_OBJECTS) $(test1_DEPENDENCIES)
-       @rm -f test1$(EXEEXT)
-       $(LINK) $(test1_LDFLAGS) $(test1_OBJECTS) $(test1_LDADD) $(LIBS)
-
-test2$(EXEEXT): $(test2_OBJECTS) $(test2_DEPENDENCIES)
-       @rm -f test2$(EXEEXT)
-       $(LINK) $(test2_LDFLAGS) $(test2_OBJECTS) $(test2_LDADD) $(LIBS)
-
-install-pkgconfigDATA: $(pkgconfig_DATA)
-       @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir)
-       @list='$(pkgconfig_DATA)'; for p in $$list; do \
-         if test -f $(srcdir)/$$p; then \
-           echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgconfigdir)/$$p"; \
-           $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkgconfigdir)/$$p; \
-         else if test -f $$p; then \
-           echo " $(INSTALL_DATA) $$p $(DESTDIR)$(pkgconfigdir)/$$p"; \
-           $(INSTALL_DATA) $$p $(DESTDIR)$(pkgconfigdir)/$$p; \
-         fi; fi; \
-       done
-
-uninstall-pkgconfigDATA:
-       @$(NORMAL_UNINSTALL)
-       list='$(pkgconfig_DATA)'; for p in $$list; do \
-         rm -f $(DESTDIR)$(pkgconfigdir)/$$p; \
-       done
-
-install-libjsonincludeHEADERS: $(libjsoninclude_HEADERS)
-       @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(libjsonincludedir)
-       @list='$(libjsoninclude_HEADERS)'; for p in $$list; do \
-         if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
-         echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libjsonincludedir)/$$p"; \
-         $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libjsonincludedir)/$$p; \
-       done
-
-uninstall-libjsonincludeHEADERS:
-       @$(NORMAL_UNINSTALL)
-       list='$(libjsoninclude_HEADERS)'; for p in $$list; do \
-         rm -f $(DESTDIR)$(libjsonincludedir)/$$p; \
-       done
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
-       list='$(SOURCES) $(HEADERS)'; \
-       unique=`for i in $$list; do echo $$i; done | \
-         awk '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       here=`pwd` && cd $(srcdir) \
-         && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)'; \
-       unique=`for i in $$list; do echo $$i; done | \
-         awk '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
-         || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP))
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
-       -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration.  Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
-       -rm -rf $(distdir)
-       GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
-       mkdir $(distdir)/=build
-       mkdir $(distdir)/=inst
-       dc_install_base=`cd $(distdir)/=inst && pwd`; \
-       cd $(distdir)/=build \
-         && ../configure --srcdir=.. --prefix=$$dc_install_base \
-         && $(MAKE) $(AM_MAKEFLAGS) \
-         && $(MAKE) $(AM_MAKEFLAGS) dvi \
-         && $(MAKE) $(AM_MAKEFLAGS) check \
-         && $(MAKE) $(AM_MAKEFLAGS) install \
-         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
-         && $(MAKE) $(AM_MAKEFLAGS) dist
-       -rm -rf $(distdir)
-       @banner="$(distdir).tar.gz is ready for distribution"; \
-       dashes=`echo "$$banner" | sed s/./=/g`; \
-       echo "$$dashes"; \
-       echo "$$banner"; \
-       echo "$$dashes"
-dist: distdir
-       -chmod -R a+r $(distdir)
-       GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-       -rm -rf $(distdir)
-dist-all: distdir
-       -chmod -R a+r $(distdir)
-       GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-       -rm -rf $(distdir)
-distdir: $(DISTFILES)
-       -rm -rf $(distdir)
-       mkdir $(distdir)
-       -chmod 777 $(distdir)
-       here=`cd $(top_builddir) && pwd`; \
-       top_distdir=`cd $(distdir) && pwd`; \
-       distdir=`cd $(distdir) && pwd`; \
-       cd $(top_srcdir) \
-         && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
-       @for file in $(DISTFILES); do \
-         d=$(srcdir); \
-         if test -d $$d/$$file; then \
-           cp -pr $$d/$$file $(distdir)/$$file; \
-         else \
-           test -f $(distdir)/$$file \
-           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
-           || cp -p $$d/$$file $(distdir)/$$file || :; \
-         fi; \
-       done
-
-DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-
--include $(DEP_FILES)
-
-mostlyclean-depend:
-
-clean-depend:
-
-distclean-depend:
-       -rm -rf .deps
-
-maintainer-clean-depend:
-
-%.o: %.c
-       @echo '$(COMPILE) -c $<'; \
-       $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
-       @-cp .deps/$(*F).pp .deps/$(*F).P; \
-       tr ' ' '\012' < .deps/$(*F).pp \
-         | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
-           >> .deps/$(*F).P; \
-       rm .deps/$(*F).pp
-
-%.lo: %.c
-       @echo '$(LTCOMPILE) -c $<'; \
-       $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
-       @-sed -e 's/^\([^:]*\)\.o[      ]*:/\1.lo \1.o :/' \
-         < .deps/$(*F).pp > .deps/$(*F).P; \
-       tr ' ' '\012' < .deps/$(*F).pp \
-         | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
-           >> .deps/$(*F).P; \
-       rm -f .deps/$(*F).pp
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am: all-am
-       $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-all-recursive-am: config.h
-       $(MAKE) $(AM_MAKEFLAGS) all-recursive
-
-install-exec-am: install-libLTLIBRARIES
-install-exec: install-exec-am
-
-install-data-am: install-pkgconfigDATA install-libjsonincludeHEADERS
-install-data: install-data-am
-
-install-am: all-am
-       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgconfigDATA \
-               uninstall-libjsonincludeHEADERS
-uninstall: uninstall-am
-all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) config.h
-all-redirect: all-am
-install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-       $(mkinstalldirs)  $(DESTDIR)$(libdir) $(DESTDIR)$(pkgconfigdir) \
-               $(DESTDIR)$(libjsonincludedir)
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-       -rm -f Makefile $(CONFIG_CLEAN_FILES)
-       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am:  mostlyclean-hdr mostlyclean-libLTLIBRARIES \
-               mostlyclean-compile mostlyclean-libtool \
-               mostlyclean-checkPROGRAMS mostlyclean-tags \
-               mostlyclean-depend mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am:  clean-hdr clean-libLTLIBRARIES clean-compile clean-libtool \
-               clean-checkPROGRAMS clean-tags clean-depend \
-               clean-generic mostlyclean-am
-
-clean: clean-am
-
-distclean-am:  distclean-hdr distclean-libLTLIBRARIES distclean-compile \
-               distclean-libtool distclean-checkPROGRAMS \
-               distclean-tags distclean-depend distclean-generic \
-               clean-am
-       -rm -f libtool
-
-distclean: distclean-am
-       -rm -f config.status
-
-maintainer-clean-am:  maintainer-clean-hdr \
-               maintainer-clean-libLTLIBRARIES \
-               maintainer-clean-compile maintainer-clean-libtool \
-               maintainer-clean-checkPROGRAMS maintainer-clean-tags \
-               maintainer-clean-depend maintainer-clean-generic \
-               distclean-am
-       @echo "This command is intended for maintainers to use;"
-       @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
-       -rm -f config.status
-
-.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
-mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
-clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
-uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
-distclean-compile clean-compile maintainer-clean-compile \
-mostlyclean-libtool distclean-libtool clean-libtool \
-maintainer-clean-libtool mostlyclean-checkPROGRAMS \
-distclean-checkPROGRAMS clean-checkPROGRAMS \
-maintainer-clean-checkPROGRAMS uninstall-pkgconfigDATA \
-install-pkgconfigDATA uninstall-libjsonincludeHEADERS \
-install-libjsonincludeHEADERS tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir mostlyclean-depend \
-distclean-depend clean-depend maintainer-clean-depend info-am info \
-dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/source4/lib/json/NEWS b/source4/lib/json/NEWS
deleted file mode 100644 (file)
index 41e843b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-News
diff --git a/source4/lib/json/README b/source4/lib/json/README
deleted file mode 100644 (file)
index beeba53..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-Building on Unix with gcc and autotools
-
-If checking out from CVS:
-
-       sh autogen.sh
-
-Then configure, make, make install
-
-
-Test programs
-
-To build the test programs run 'make check'
-
-
-Linking to libjson
-
-If your system has pkgconfig then you can just add this to your makefile
-
-CFLAGS += $(shell pkg-config --cflags json)
-LDFLAGS += $(shell pkg-config --libs json)
diff --git a/source4/lib/json/README-WIN32.html b/source4/lib/json/README-WIN32.html
deleted file mode 100644 (file)
index fb50159..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE html \r
-     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\r
-     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\r
-       <head>\r
-               <title>JSON-C - A JSON implementation in C - Win32 specific notes</title>\r
-               <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />\r
-       </head>\r
-       <body>\r
-               <h2>Windows specific notes for JSON-C</h2>\r
-               <p>Please send Win32 bug reports to <a href="mailto:christopher.watford@gmail.com">christopher.watford@gmail.com</a></p>\r
-               <p><b>Win32 Specific Changes:</b></p>\r
-               <ul>\r
-                       <li>\r
-                               Various functions have been redefined to their Win32 version (i.e. <tt>open</tt>\r
-                               on win32 is <tt>_open</tt>)</li>\r
-                       <li>\r
-                               Implemented missing functions from MS's libc (i.e. <tt>vasprintf</tt> and <tt>strndup</tt>)</li>\r
-                       <li>\r
-                               Added code to allow Win64 support without integer resizing issues, this \r
-                               probably makes it much nicer on 64bit machines everywhere (i.e. using <tt>ptrdiff_t</tt>\r
-                               for pointer math)</li>\r
-               </ul>\r
-               <p><b>Porting Changelog:</b></p>\r
-               <dl>\r
-                       <dt><tt>printbuf.c</tt> - C. Watford (christopher.watford@gmail.com)</dt>\r
-                       <dd>\r
-                               Added a Win32/Win64 compliant implementation of <tt>vasprintf</tt></dd>\r
-                       <dt><tt>debug.c</tt> - C. Watford (christopher.watford@gmail.com)</dt>\r
-                       <dd>\r
-                               Removed usage of <tt>vsyslog</tt> on Win32/Win64 systems, needs to be handled \r
-                               by a configure script</dd>\r
-                       <dt><tt>json_object.c</tt> - C. Watford (christopher.watford@gmail.com)</dt>\r
-                       <dd>\r
-                               Added scope operator to wrap usage of <tt>json_object_object_foreach</tt>, this needs to be\r
-                               rethought to be more ANSI C friendly</dd>\r
-                       <dt><tt>json_object.h</tt> - C. Watford (christopher.watford@gmail.com)</dt>\r
-                       <dd>\r
-                               Added Microsoft C friendly version of <tt>json_object_object_foreach</tt></dd>\r
-                       <dt><tt>json_tokener.c</tt> - C. Watford (christopher.watford@gmail.com)</dt>\r
-                       <dd>\r
-                               Added a Win32/Win64 compliant implementation of <tt>strndup</tt></dd>\r
-                       <dt><tt>json_util.c</tt> - C. Watford (christopher.watford@gmail.com)</dt>\r
-                       <dd>\r
-                               Added cast and mask to suffice <tt>size_t</tt> v. <tt>unsigned int</tt>\r
-                               conversion correctness</dd>\r
-               </dl>\r
-               <h3>Anonymous CVS</h3>\r
-               <p><code># <b>export CVSROOT=:pserver:anoncvs@cvs.metaparadigm.com:/cvsroot</b><br />\r
-                               # <b>cvs login</b><br />\r
-                               Logging in to :pserver:anoncvs@cvs.metaparadigm.com:2401/cvsroot<br />\r
-                               CVS password: &lt;enter '<b>anoncvs</b>'&gt;<br />\r
-                               # <b>cvs co json-c</b></code></p>\r
-               <p>Copyright Metaparadigm Pte. Ltd. 2004, 2005. <a href="mailto:michael@metaparadigm.com">Michael \r
-                               Clark </a>\r
-               </p>\r
-               <p>This program is free software; you can redistribute it and/or modify it under \r
-                       the terms of the MIT License. See COPYING for details.</p>\r
-               <hr />\r
-       </body>\r
-</html>\r
diff --git a/source4/lib/json/README.html b/source4/lib/json/README.html
deleted file mode 100644 (file)
index 7b3a65e..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE html \r
-     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\r
-     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\r
-       <head>\r
-               <title>JSON-C - A JSON implementation in C</title>\r
-               <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r
-       </head>\r
-       <body>\r
-               <h2>JSON-C - A JSON implementation in C</h2>\r
-               <p>Latest release: <a href="json-c-0.6.tar.gz">json-c-0.6.tar.gz</a></p>\r
-               <p>JSON-C implements a reference counting object model that allows you to easily \r
-                       construct JSON objects in C, output them as JSON formatted strings and parse \r
-                       JSON formatted strings back into the C representation of JSON objects.</p>\r
-               <p>Minimal documentation exists <a href="doc/html/json__object_8h.html">here</a>, \r
-                       Although you are probably better reading the example code in test1.c.</p>\r
-               <p>To setup JSON-C to build on your system please run <tt>configure</tt> before \r
-                       compiling. If you are on Win32 and are not using the VS project file, be sure \r
-                       to rename <tt>config.h.win32</tt> to <tt>config.h</tt> before building.</p>\r
-               <P>Win32 specific notes can be found <a href="README-WIN32.html">here</a>.</P>\r
-               <p>Please send bug reports to <a href="mailto:michael@metaparadigm.com">michael@metaparadigm.com</a></p>\r
-               <p>Please send Win32 bug reports to <a href="mailto:christopher.watford@gmail.com">christopher.watford@gmail.com</a></p>\r
-               <h3>Anonymous CVS</h3>\r
-               <p><code># <b>export CVSROOT=:pserver:anoncvs@cvs.metaparadigm.com:/cvsroot</b><br>\r
-                               # <b>cvs login</b><br>\r
-                               Logging in to :pserver:anoncvs@cvs.metaparadigm.com:2401/cvsroot<br>\r
-                               CVS password: &lt;enter '<b>anoncvs</b>'&gt;<br>\r
-                               # <b>cvs co json-c</b></code></p>\r
-               <p>Copyright Metaparadigm Pte. Ltd. 2004, 2005. <a href="mailto:michael@metaparadigm.com">Michael \r
-                               Clark </a>\r
-               </p>\r
-               <p>This program is free software; you can redistribute it and/or modify it under \r
-                       the terms of the MIT License. See COPYING for details.</p>\r
-               <hr>\r
-       </body>\r
-</html>\r
diff --git a/source4/lib/json/aclocal.m4 b/source4/lib/json/aclocal.m4
deleted file mode 100644 (file)
index 6f6764e..0000000
+++ /dev/null
@@ -1,7379 +0,0 @@
-dnl aclocal.m4t generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-# lib-prefix.m4 serial 4 (gettext-0.14.2)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-dnl require excessive bracketing.
-ifdef([AC_HELP_STRING],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-
-dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-dnl to access previously installed libraries. The basic assumption is that
-dnl a user will want packages to use other packages he previously installed
-dnl with the same --prefix option.
-dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-dnl libraries, but is otherwise very convenient.
-AC_DEFUN([AC_LIB_PREFIX],
-[
-  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
-  AC_REQUIRE([AC_PROG_CC])
-  AC_REQUIRE([AC_CANONICAL_HOST])
-  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-  dnl By default, look in $includedir and $libdir.
-  use_additional=yes
-  AC_LIB_WITH_FINAL_PREFIX([
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
-  ])
-  AC_LIB_ARG_WITH([lib-prefix],
-[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
-  --without-lib-prefix    don't search for libraries in includedir and libdir],
-[
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
-        AC_LIB_WITH_FINAL_PREFIX([
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
-        ])
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/lib"
-      fi
-    fi
-])
-  if test $use_additional = yes; then
-    dnl Potentially add $additional_includedir to $CPPFLAGS.
-    dnl But don't add it
-    dnl   1. if it's the standard /usr/include,
-    dnl   2. if it's already present in $CPPFLAGS,
-    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
-    dnl   4. if it doesn't exist as a directory.
-    if test "X$additional_includedir" != "X/usr/include"; then
-      haveit=
-      for x in $CPPFLAGS; do
-        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-        if test "X$x" = "X-I$additional_includedir"; then
-          haveit=yes
-          break
-        fi
-      done
-      if test -z "$haveit"; then
-        if test "X$additional_includedir" = "X/usr/local/include"; then
-          if test -n "$GCC"; then
-            case $host_os in
-              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-            esac
-          fi
-        fi
-        if test -z "$haveit"; then
-          if test -d "$additional_includedir"; then
-            dnl Really add $additional_includedir to $CPPFLAGS.
-            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
-          fi
-        fi
-      fi
-    fi
-    dnl Potentially add $additional_libdir to $LDFLAGS.
-    dnl But don't add it
-    dnl   1. if it's the standard /usr/lib,
-    dnl   2. if it's already present in $LDFLAGS,
-    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
-    dnl   4. if it doesn't exist as a directory.
-    if test "X$additional_libdir" != "X/usr/lib"; then
-      haveit=
-      for x in $LDFLAGS; do
-        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-        if test "X$x" = "X-L$additional_libdir"; then
-          haveit=yes
-          break
-        fi
-      done
-      if test -z "$haveit"; then
-        if test "X$additional_libdir" = "X/usr/local/lib"; then
-          if test -n "$GCC"; then
-            case $host_os in
-              linux*) haveit=yes;;
-            esac
-          fi
-        fi
-        if test -z "$haveit"; then
-          if test -d "$additional_libdir"; then
-            dnl Really add $additional_libdir to $LDFLAGS.
-            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
-          fi
-        fi
-      fi
-    fi
-  fi
-])
-
-dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-dnl acl_final_exec_prefix, containing the values to which $prefix and
-dnl $exec_prefix will expand at the end of the configure script.
-AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-[
-  dnl Unfortunately, prefix and exec_prefix get only finally determined
-  dnl at the end of configure.
-  if test "X$prefix" = "XNONE"; then
-    acl_final_prefix="$ac_default_prefix"
-  else
-    acl_final_prefix="$prefix"
-  fi
-  if test "X$exec_prefix" = "XNONE"; then
-    acl_final_exec_prefix='${prefix}'
-  else
-    acl_final_exec_prefix="$exec_prefix"
-  fi
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
-  prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-dnl variables prefix and exec_prefix bound to the values they will have
-dnl at the end of the configure script.
-AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-[
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  $1
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-])
-
-# lib-link.m4 serial 6 (gettext-0.14.3)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_PREREQ(2.50)
-
-dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-dnl augments the CPPFLAGS variable.
-AC_DEFUN([AC_LIB_LINKFLAGS],
-[
-  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-  AC_REQUIRE([AC_LIB_RPATH])
-  define([Name],[translit([$1],[./-], [___])])
-  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
-    AC_LIB_LINKFLAGS_BODY([$1], [$2])
-    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
-    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
-    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
-  ])
-  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
-  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
-  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
-  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-  AC_SUBST([LIB]NAME)
-  AC_SUBST([LTLIB]NAME)
-  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
-  dnl results of this search when this library appears as a dependency.
-  HAVE_LIB[]NAME=yes
-  undefine([Name])
-  undefine([NAME])
-])
-
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
-dnl searches for libname and the libraries corresponding to explicit and
-dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-[
-  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-  AC_REQUIRE([AC_LIB_RPATH])
-  define([Name],[translit([$1],[./-], [___])])
-  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-
-  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
-  dnl accordingly.
-  AC_LIB_LINKFLAGS_BODY([$1], [$2])
-
-  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
-  dnl because if the user has installed lib[]Name and not disabled its use
-  dnl via --without-lib[]Name-prefix, he wants to use it.
-  ac_save_CPPFLAGS="$CPPFLAGS"
-  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-
-  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
-    ac_save_LIBS="$LIBS"
-    LIBS="$LIBS $LIB[]NAME"
-    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
-    LIBS="$ac_save_LIBS"
-  ])
-  if test "$ac_cv_lib[]Name" = yes; then
-    HAVE_LIB[]NAME=yes
-    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
-    AC_MSG_CHECKING([how to link with lib[]$1])
-    AC_MSG_RESULT([$LIB[]NAME])
-  else
-    HAVE_LIB[]NAME=no
-    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
-    dnl $INC[]NAME either.
-    CPPFLAGS="$ac_save_CPPFLAGS"
-    LIB[]NAME=
-    LTLIB[]NAME=
-  fi
-  AC_SUBST([HAVE_LIB]NAME)
-  AC_SUBST([LIB]NAME)
-  AC_SUBST([LTLIB]NAME)
-  undefine([Name])
-  undefine([NAME])
-])
-
-dnl Determine the platform dependent parameters needed to use rpath:
-dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-dnl hardcode_direct, hardcode_minus_L.
-AC_DEFUN([AC_LIB_RPATH],
-[
-  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
-  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
-  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
-  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
-  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
-  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
-  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
-    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
-    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
-    . ./conftest.sh
-    rm -f ./conftest.sh
-    acl_cv_rpath=done
-  ])
-  wl="$acl_cv_wl"
-  libext="$acl_cv_libext"
-  shlibext="$acl_cv_shlibext"
-  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
-  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
-  hardcode_direct="$acl_cv_hardcode_direct"
-  hardcode_minus_L="$acl_cv_hardcode_minus_L"
-  dnl Determine whether the user wants rpath handling at all.
-  AC_ARG_ENABLE(rpath,
-    [  --disable-rpath         do not hardcode runtime library paths],
-    :, enable_rpath=yes)
-])
-
-dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-[
-  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-  dnl By default, look in $includedir and $libdir.
-  use_additional=yes
-  AC_LIB_WITH_FINAL_PREFIX([
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
-  ])
-  AC_LIB_ARG_WITH([lib$1-prefix],
-[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
-  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
-[
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
-        AC_LIB_WITH_FINAL_PREFIX([
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
-        ])
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/lib"
-      fi
-    fi
-])
-  dnl Search the library and its dependencies in $additional_libdir and
-  dnl $LDFLAGS. Using breadth-first-seach.
-  LIB[]NAME=
-  LTLIB[]NAME=
-  INC[]NAME=
-  rpathdirs=
-  ltrpathdirs=
-  names_already_handled=
-  names_next_round='$1 $2'
-  while test -n "$names_next_round"; do
-    names_this_round="$names_next_round"
-    names_next_round=
-    for name in $names_this_round; do
-      already_handled=
-      for n in $names_already_handled; do
-        if test "$n" = "$name"; then
-          already_handled=yes
-          break
-        fi
-      done
-      if test -z "$already_handled"; then
-        names_already_handled="$names_already_handled $name"
-        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
-        dnl or AC_LIB_HAVE_LINKFLAGS call.
-        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
-        eval value=\"\$HAVE_LIB$uppername\"
-        if test -n "$value"; then
-          if test "$value" = yes; then
-            eval value=\"\$LIB$uppername\"
-            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
-            eval value=\"\$LTLIB$uppername\"
-            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
-          else
-            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
-            dnl that this library doesn't exist. So just drop it.
-            :
-          fi
-        else
-          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
-          dnl and the already constructed $LIBNAME/$LTLIBNAME.
-          found_dir=
-          found_la=
-          found_so=
-          found_a=
-          if test $use_additional = yes; then
-            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
-              found_dir="$additional_libdir"
-              found_so="$additional_libdir/lib$name.$shlibext"
-              if test -f "$additional_libdir/lib$name.la"; then
-                found_la="$additional_libdir/lib$name.la"
-              fi
-            else
-              if test -f "$additional_libdir/lib$name.$libext"; then
-                found_dir="$additional_libdir"
-                found_a="$additional_libdir/lib$name.$libext"
-                if test -f "$additional_libdir/lib$name.la"; then
-                  found_la="$additional_libdir/lib$name.la"
-                fi
-              fi
-            fi
-          fi
-          if test "X$found_dir" = "X"; then
-            for x in $LDFLAGS $LTLIB[]NAME; do
-              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-              case "$x" in
-                -L*)
-                  dir=`echo "X$x" | sed -e 's/^X-L//'`
-                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
-                    found_dir="$dir"
-                    found_so="$dir/lib$name.$shlibext"
-                    if test -f "$dir/lib$name.la"; then
-                      found_la="$dir/lib$name.la"
-                    fi
-                  else
-                    if test -f "$dir/lib$name.$libext"; then
-                      found_dir="$dir"
-                      found_a="$dir/lib$name.$libext"
-                      if test -f "$dir/lib$name.la"; then
-                        found_la="$dir/lib$name.la"
-                      fi
-                    fi
-                  fi
-                  ;;
-              esac
-              if test "X$found_dir" != "X"; then
-                break
-              fi
-            done
-          fi
-          if test "X$found_dir" != "X"; then
-            dnl Found the library.
-            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
-            if test "X$found_so" != "X"; then
-              dnl Linking with a shared library. We attempt to hardcode its
-              dnl directory into the executable's runpath, unless it's the
-              dnl standard /usr/lib.
-              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
-                dnl No hardcoding is needed.
-                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-              else
-                dnl Use an explicit option to hardcode DIR into the resulting
-                dnl binary.
-                dnl Potentially add DIR to ltrpathdirs.
-                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
-                haveit=
-                for x in $ltrpathdirs; do
-                  if test "X$x" = "X$found_dir"; then
-                    haveit=yes
-                    break
-                  fi
-                done
-                if test -z "$haveit"; then
-                  ltrpathdirs="$ltrpathdirs $found_dir"
-                fi
-                dnl The hardcoding into $LIBNAME is system dependent.
-                if test "$hardcode_direct" = yes; then
-                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
-                  dnl resulting binary.
-                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-                else
-                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
-                    dnl Use an explicit option to hardcode DIR into the resulting
-                    dnl binary.
-                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-                    dnl Potentially add DIR to rpathdirs.
-                    dnl The rpathdirs will be appended to $LIBNAME at the end.
-                    haveit=
-                    for x in $rpathdirs; do
-                      if test "X$x" = "X$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      rpathdirs="$rpathdirs $found_dir"
-                    fi
-                  else
-                    dnl Rely on "-L$found_dir".
-                    dnl But don't add it if it's already contained in the LDFLAGS
-                    dnl or the already constructed $LIBNAME
-                    haveit=
-                    for x in $LDFLAGS $LIB[]NAME; do
-                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                      if test "X$x" = "X-L$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
-                    fi
-                    if test "$hardcode_minus_L" != no; then
-                      dnl FIXME: Not sure whether we should use
-                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
-                      dnl here.
-                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-                    else
-                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
-                      dnl here, because this doesn't fit in flags passed to the
-                      dnl compiler. So give up. No hardcoding. This affects only
-                      dnl very old systems.
-                      dnl FIXME: Not sure whether we should use
-                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
-                      dnl here.
-                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
-                    fi
-                  fi
-                fi
-              fi
-            else
-              if test "X$found_a" != "X"; then
-                dnl Linking with a static library.
-                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
-              else
-                dnl We shouldn't come here, but anyway it's good to have a
-                dnl fallback.
-                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
-              fi
-            fi
-            dnl Assume the include files are nearby.
-            additional_includedir=
-            case "$found_dir" in
-              */lib | */lib/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
-                additional_includedir="$basedir/include"
-                ;;
-            esac
-            if test "X$additional_includedir" != "X"; then
-              dnl Potentially add $additional_includedir to $INCNAME.
-              dnl But don't add it
-              dnl   1. if it's the standard /usr/include,
-              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
-              dnl   3. if it's already present in $CPPFLAGS or the already
-              dnl      constructed $INCNAME,
-              dnl   4. if it doesn't exist as a directory.
-              if test "X$additional_includedir" != "X/usr/include"; then
-                haveit=
-                if test "X$additional_includedir" = "X/usr/local/include"; then
-                  if test -n "$GCC"; then
-                    case $host_os in
-                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                    esac
-                  fi
-                fi
-                if test -z "$haveit"; then
-                  for x in $CPPFLAGS $INC[]NAME; do
-                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                    if test "X$x" = "X-I$additional_includedir"; then
-                      haveit=yes
-                      break
-                    fi
-                  done
-                  if test -z "$haveit"; then
-                    if test -d "$additional_includedir"; then
-                      dnl Really add $additional_includedir to $INCNAME.
-                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
-                    fi
-                  fi
-                fi
-              fi
-            fi
-            dnl Look for dependencies.
-            if test -n "$found_la"; then
-              dnl Read the .la file. It defines the variables
-              dnl dlname, library_names, old_library, dependency_libs, current,
-              dnl age, revision, installed, dlopen, dlpreopen, libdir.
-              save_libdir="$libdir"
-              case "$found_la" in
-                */* | *\\*) . "$found_la" ;;
-                *) . "./$found_la" ;;
-              esac
-              libdir="$save_libdir"
-              dnl We use only dependency_libs.
-              for dep in $dependency_libs; do
-                case "$dep" in
-                  -L*)
-                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
-                    dnl But don't add it
-                    dnl   1. if it's the standard /usr/lib,
-                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
-                    dnl   3. if it's already present in $LDFLAGS or the already
-                    dnl      constructed $LIBNAME,
-                    dnl   4. if it doesn't exist as a directory.
-                    if test "X$additional_libdir" != "X/usr/lib"; then
-                      haveit=
-                      if test "X$additional_libdir" = "X/usr/local/lib"; then
-                        if test -n "$GCC"; then
-                          case $host_os in
-                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                          esac
-                        fi
-                      fi
-                      if test -z "$haveit"; then
-                        haveit=
-                        for x in $LDFLAGS $LIB[]NAME; do
-                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                            dnl Really add $additional_libdir to $LIBNAME.
-                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
-                          fi
-                        fi
-                        haveit=
-                        for x in $LDFLAGS $LTLIB[]NAME; do
-                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                            dnl Really add $additional_libdir to $LTLIBNAME.
-                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
-                          fi
-                        fi
-                      fi
-                    fi
-                    ;;
-                  -R*)
-                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
-                    if test "$enable_rpath" != no; then
-                      dnl Potentially add DIR to rpathdirs.
-                      dnl The rpathdirs will be appended to $LIBNAME at the end.
-                      haveit=
-                      for x in $rpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        rpathdirs="$rpathdirs $dir"
-                      fi
-                      dnl Potentially add DIR to ltrpathdirs.
-                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
-                      haveit=
-                      for x in $ltrpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        ltrpathdirs="$ltrpathdirs $dir"
-                      fi
-                    fi
-                    ;;
-                  -l*)
-                    dnl Handle this in the next round.
-                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
-                    ;;
-                  *.la)
-                    dnl Handle this in the next round. Throw away the .la's
-                    dnl directory; it is already contained in a preceding -L
-                    dnl option.
-                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
-                    ;;
-                  *)
-                    dnl Most likely an immediate library name.
-                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
-                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
-                    ;;
-                esac
-              done
-            fi
-          else
-            dnl Didn't find the library; assume it is in the system directories
-            dnl known to the linker and runtime loader. (All the system
-            dnl directories known to the linker should also be known to the
-            dnl runtime loader, otherwise the system is severely misconfigured.)
-            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
-            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
-          fi
-        fi
-      fi
-    done
-  done
-  if test "X$rpathdirs" != "X"; then
-    if test -n "$hardcode_libdir_separator"; then
-      dnl Weird platform: only the last -rpath option counts, the user must
-      dnl pass all path elements in one option. We can arrange that for a
-      dnl single library, but not when more than one $LIBNAMEs are used.
-      alldirs=
-      for found_dir in $rpathdirs; do
-        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
-      done
-      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
-      acl_save_libdir="$libdir"
-      libdir="$alldirs"
-      eval flag=\"$hardcode_libdir_flag_spec\"
-      libdir="$acl_save_libdir"
-      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
-    else
-      dnl The -rpath options are cumulative.
-      for found_dir in $rpathdirs; do
-        acl_save_libdir="$libdir"
-        libdir="$found_dir"
-        eval flag=\"$hardcode_libdir_flag_spec\"
-        libdir="$acl_save_libdir"
-        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
-      done
-    fi
-  fi
-  if test "X$ltrpathdirs" != "X"; then
-    dnl When using libtool, the option that works for both libraries and
-    dnl executables is -R. The -R options are cumulative.
-    for found_dir in $ltrpathdirs; do
-      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
-    done
-  fi
-])
-
-dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-dnl unless already present in VAR.
-dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-dnl contains two or three consecutive elements that belong together.
-AC_DEFUN([AC_LIB_APPENDTOVAR],
-[
-  for element in [$2]; do
-    haveit=
-    for x in $[$1]; do
-      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      [$1]="${[$1]}${[$1]:+ }$element"
-    fi
-  done
-])
-
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
-
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  acl_cv_prog_gnu_ld=yes ;;
-*)
-  acl_cv_prog_gnu_ld=no ;;
-esac])
-with_gnu_ld=$acl_cv_prog_gnu_ld
-])
-
-dnl From libtool-1.4. Sets the variable LD.
-AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by GCC])
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [[\\/]* | [A-Za-z]:[\\/]*)]
-      [re_direlt='/[^/][^/]*/\.\./']
-      # Canonicalize the path of ld
-      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-       ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  AC_MSG_CHECKING([for GNU ld])
-else
-  AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(acl_cv_path_LD,
-[if test -z "$LD"; then
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      acl_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
-      *GNU* | *'with BFD'*)
-       test "$with_gnu_ld" != no && break ;;
-      *)
-       test "$with_gnu_ld" != yes && break ;;
-      esac
-    fi
-  done
-  IFS="$ac_save_ifs"
-else
-  acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_LIB_PROG_LD_GNU
-])
-
-# Do all the work for Automake.  This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
-  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002  Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-        [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
-   if test "[$]*" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftestfile`
-   fi
-   if test "[$]*" != "X $srcdir/configure conftestfile" \
-      && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
-
-   test "[$]2" = conftestfile
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf.  Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
-   $1=$2
-   AC_MSG_RESULT(found)
-else
-   $1="$3/missing $2"
-   AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Like AC_CONFIG_HEADER, but automatically create stamp file.
-
-AC_DEFUN([AM_CONFIG_HEADER],
-[AC_PREREQ([2.12])
-AC_CONFIG_HEADER([$1])
-dnl When config.status generates a header, we must update the stamp-h file.
-dnl This file resides in the same directory as the config header
-dnl that is generated.  We must strip everything past the first ":",
-dnl and everything past the last "/".
-AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
-ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
-<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
-<<am_indx=1
-for am_file in <<$1>>; do
-  case " <<$>>CONFIG_HEADERS " in
-  *" <<$>>am_file "*<<)>>
-    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
-    ;;
-  esac
-  am_indx=`expr "<<$>>am_indx" + 1`
-done<<>>dnl>>)
-changequote([,]))])
-
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-
-# serial 48 Debian 1.5.22-2 AC_PROG_LIBTOOL
-
-
-# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
-# -----------------------------------------------------------
-# If this macro is not defined by Autoconf, define it here.
-m4_ifdef([AC_PROVIDE_IFELSE],
-         [],
-         [m4_define([AC_PROVIDE_IFELSE],
-                [m4_ifdef([AC_PROVIDE_$1],
-                          [$2], [$3])])])
-
-
-# AC_PROG_LIBTOOL
-# ---------------
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
-  AC_PROVIDE_IFELSE([AC_PROG_CXX],
-    [AC_LIBTOOL_CXX],
-    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
-  ])])
-dnl And a similar setup for Fortran 77 support
-  AC_PROVIDE_IFELSE([AC_PROG_F77],
-    [AC_LIBTOOL_F77],
-    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
-])])
-
-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
-  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
-    [AC_LIBTOOL_GCJ],
-    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
-      [AC_LIBTOOL_GCJ],
-      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
-       [AC_LIBTOOL_GCJ],
-      [ifdef([AC_PROG_GCJ],
-            [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
-       ifdef([A][M_PROG_GCJ],
-            [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
-       ifdef([LT_AC_PROG_GCJ],
-            [define([LT_AC_PROG_GCJ],
-               defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
-])])# AC_PROG_LIBTOOL
-
-
-# _AC_PROG_LIBTOOL
-# ----------------
-AC_DEFUN([_AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Prevent multiple expansion
-define([AC_PROG_LIBTOOL], [])
-])# _AC_PROG_LIBTOOL
-
-
-# AC_LIBTOOL_SETUP
-# ----------------
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.50)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-
-AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
-dnl
-
-AC_LIBTOOL_SYS_MAX_CMD_LEN
-AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-AC_LIBTOOL_OBJDIR
-
-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-_LT_AC_PROG_ECHO_BACKSLASH
-
-case $host_os in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
-  fi
-  ;;
-esac
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
-[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
-
-# Same as above, but do not quote variable references.
-[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Constants:
-rm="rm -f"
-
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-AC_CHECK_TOOL(AR, ar, false)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$SED" && SED=sed
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
-test -z "$ac_objext" && ac_objext=o
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
-  case $host_os in
-  openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
-    ;;
-  *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
-    ;;
-  esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-_LT_CC_BASENAME([$compiler])
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    AC_PATH_MAGIC
-  fi
-  ;;
-esac
-
-AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
-enable_win32_dll=yes, enable_win32_dll=no)
-
-AC_ARG_ENABLE([libtool-lock],
-    [AC_HELP_STRING([--disable-libtool-lock],
-       [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-AC_ARG_WITH([pic],
-    [AC_HELP_STRING([--with-pic],
-       [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
-    [pic_mode=default])
-test -z "$pic_mode" && pic_mode=default
-
-# Use C for the default configuration in the libtool script
-tagname=
-AC_LIBTOOL_LANG_C_CONFIG
-_LT_AC_TAGCONFIG
-])# AC_LIBTOOL_SETUP
-
-
-# _LT_AC_SYS_COMPILER
-# -------------------
-AC_DEFUN([_LT_AC_SYS_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-])# _LT_AC_SYS_COMPILER
-
-
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
-AC_DEFUN([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
-  case $cc_temp in
-    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
-    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-])
-
-
-# _LT_COMPILER_BOILERPLATE
-# ------------------------
-# Check for compiler boilerplate output or warnings with
-# the simple compiler test code.
-AC_DEFUN([_LT_COMPILER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
-])# _LT_COMPILER_BOILERPLATE
-
-
-# _LT_LINKER_BOILERPLATE
-# ----------------------
-# Check for linker boilerplate output or warnings with
-# the simple link test code.
-AC_DEFUN([_LT_LINKER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
-])# _LT_LINKER_BOILERPLATE
-
-
-# _LT_AC_SYS_LIBPATH_AIX
-# ----------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-])# _LT_AC_SYS_LIBPATH_AIX
-
-
-# _LT_AC_SHELL_INIT(ARG)
-# ----------------------
-AC_DEFUN([_LT_AC_SHELL_INIT],
-[ifdef([AC_DIVERSION_NOTICE],
-            [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
-        [AC_DIVERT_PUSH(NOTICE)])
-$1
-AC_DIVERT_POP
-])# _LT_AC_SHELL_INIT
-
-
-# _LT_AC_PROG_ECHO_BACKSLASH
-# --------------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
-AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
-[_LT_AC_SHELL_INIT([
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
-  ;;
-esac
-
-echo=${ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X[$]1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
-  # Yippee, $echo works!
-  :
-else
-  # Restart under the correct shell.
-  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-[$]*
-EOF
-  exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$ECHO"; then
-if test "X${echo_test_string+set}" != Xset; then
-# find a string as large as possible, as long as the shell can cope with it
-  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
-    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
-       echo_test_string=`eval $cmd` &&
-       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
-    then
-      break
-    fi
-  done
-fi
-
-if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-   test "X$echo_testing_string" = "X$echo_test_string"; then
-  :
-else
-  # The Solaris, AIX, and Digital Unix default echo programs unquote
-  # backslashes.  This makes it impossible to quote backslashes using
-  #   echo "$something" | sed 's/\\/\\\\/g'
-  #
-  # So, first we look for a working echo in the user's PATH.
-
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for dir in $PATH /usr/ucb; do
-    IFS="$lt_save_ifs"
-    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      echo="$dir/echo"
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-
-  if test "X$echo" = Xecho; then
-    # We didn't find a better echo, so look for alternatives.
-    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      # This shell has a builtin print -r that does the trick.
-      echo='print -r'
-    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
-        test "X$CONFIG_SHELL" != X/bin/ksh; then
-      # If we have ksh, try running configure again with it.
-      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-      export ORIGINAL_CONFIG_SHELL
-      CONFIG_SHELL=/bin/ksh
-      export CONFIG_SHELL
-      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
-    else
-      # Try using printf.
-      echo='printf %s\n'
-      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-        echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-        test "X$echo_testing_string" = "X$echo_test_string"; then
-       # Cool, printf works
-       :
-      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-          test "X$echo_testing_string" = 'X\t' &&
-          echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-          test "X$echo_testing_string" = "X$echo_test_string"; then
-       CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-       export CONFIG_SHELL
-       SHELL="$CONFIG_SHELL"
-       export SHELL
-       echo="$CONFIG_SHELL [$]0 --fallback-echo"
-      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-          test "X$echo_testing_string" = 'X\t' &&
-          echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-          test "X$echo_testing_string" = "X$echo_test_string"; then
-       echo="$CONFIG_SHELL [$]0 --fallback-echo"
-      else
-       # maybe with a smaller string...
-       prev=:
-
-       for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
-         if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
-         then
-           break
-         fi
-         prev="$cmd"
-       done
-
-       if test "$prev" != 'sed 50q "[$]0"'; then
-         echo_test_string=`eval $prev`
-         export echo_test_string
-         exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
-       else
-         # Oops.  We lost completely, so just stick with echo.
-         echo=echo
-       fi
-      fi
-    fi
-  fi
-fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-ECHO=$echo
-if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
-   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
-
-AC_SUBST(ECHO)
-])])# _LT_AC_PROG_ECHO_BACKSLASH
-
-
-# _LT_AC_LOCK
-# -----------
-AC_DEFUN([_LT_AC_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
-    [AC_HELP_STRING([--disable-libtool-lock],
-       [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *ELF-32*)
-      HPUX_IA64_MODE="32"
-      ;;
-    *ELF-64*)
-      HPUX_IA64_MODE="64"
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-*-*-irix6*)
-  # Find out which ABI we are using.
-  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-   if test "$lt_cv_prog_gnu_ld" = yes; then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *32-bit*)
-      LD="${LD-ld} -melf32bsmip"
-      ;;
-    *N32*)
-      LD="${LD-ld} -melf32bmipn32"
-      ;;
-    *64-bit*)
-      LD="${LD-ld} -melf64bmip"
-      ;;
-    esac
-   else
-    case `/usr/bin/file conftest.$ac_objext` in
-    *32-bit*)
-      LD="${LD-ld} -32"
-      ;;
-    *N32*)
-      LD="${LD-ld} -n32"
-      ;;
-    *64-bit*)
-      LD="${LD-ld} -64"
-      ;;
-    esac
-   fi
-  fi
-  rm -rf conftest*
-  ;;
-
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
-    *32-bit*)
-      case $host in
-        x86_64-*linux*)
-          LD="${LD-ld} -m elf_i386"
-          ;;
-        ppc64-*linux*|powerpc64-*linux*)
-          LD="${LD-ld} -m elf32ppclinux"
-          ;;
-        s390x-*linux*)
-          LD="${LD-ld} -m elf_s390"
-          ;;
-        sparc64-*linux*)
-          LD="${LD-ld} -m elf32_sparc"
-          ;;
-      esac
-      ;;
-    *64-bit*)
-      case $host in
-        x86_64-*linux*)
-          LD="${LD-ld} -m elf_x86_64"
-          ;;
-        ppc*-*linux*|powerpc*-*linux*)
-          LD="${LD-ld} -m elf64ppc"
-          ;;
-        s390*-*linux*)
-          LD="${LD-ld} -m elf64_s390"
-          ;;
-        sparc*-*linux*)
-          LD="${LD-ld} -m elf64_sparc"
-          ;;
-      esac
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -belf"
-  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
-    [AC_LANG_PUSH(C)
-     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
-     AC_LANG_POP])
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
-  fi
-  ;;
-sparc*-*solaris*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
-    *64-bit*)
-      case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
-      *)    LD="${LD-ld} -64" ;;
-      esac
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-
-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
-  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
-  AC_CHECK_TOOL(AS, as, false)
-  AC_CHECK_TOOL(OBJDUMP, objdump, false)
-  ;;
-  ])
-esac
-
-need_locks="$enable_libtool_lock"
-
-])# _LT_AC_LOCK
-
-
-# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#              [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
-[AC_REQUIRE([LT_AC_PROG_SED])
-AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$3"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       $2=yes
-     fi
-   fi
-   $rm conftest*
-])
-
-if test x"[$]$2" = xyes; then
-    ifelse([$5], , :, [$5])
-else
-    ifelse([$6], , :, [$6])
-fi
-])# AC_LIBTOOL_COMPILER_OPTION
-
-
-# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#                          [ACTION-SUCCESS], [ACTION-FAILURE])
-# ------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
-[AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $3"
-   printf "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&AS_MESSAGE_LOG_FD
-       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         $2=yes
-       fi
-     else
-       $2=yes
-     fi
-   fi
-   $rm conftest*
-   LDFLAGS="$save_LDFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
-    ifelse([$4], , :, [$4])
-else
-    ifelse([$5], , :, [$5])
-fi
-])# AC_LIBTOOL_LINKER_OPTION
-
-
-# AC_LIBTOOL_SYS_MAX_CMD_LEN
-# --------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
-[# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
-  i=0
-  teststring="ABCD"
-
-  case $build_os in
-  msdosdjgpp*)
-    # On DJGPP, this test can blow up pretty badly due to problems in libc
-    # (any single argument exceeding 2000 bytes causes a buffer overrun
-    # during glob expansion).  Even if it were fixed, the result of this
-    # check would be larger than it should be.
-    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
-    ;;
-
-  gnu*)
-    # Under GNU Hurd, this test is not required because there is
-    # no limit to the length of command line arguments.
-    # Libtool will interpret -1 as no limit whatsoever
-    lt_cv_sys_max_cmd_len=-1;
-    ;;
-
-  cygwin* | mingw*)
-    # On Win9x/ME, this test blows up -- it succeeds, but takes
-    # about 5 minutes as the teststring grows exponentially.
-    # Worse, since 9x/ME are not pre-emptively multitasking,
-    # you end up with a "frozen" computer, even though with patience
-    # the test eventually succeeds (with a max line length of 256k).
-    # Instead, let's just punt: use the minimum linelength reported by
-    # all of the supported platforms: 8192 (on NT/2K/XP).
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  amigaos*)
-    # On AmigaOS with pdksh, this test takes hours, literally.
-    # So we just punt and use a minimum line length of 8192.
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
-    # This has been around since 386BSD, at least.  Likely further.
-    if test -x /sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
-    elif test -x /usr/sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
-    else
-      lt_cv_sys_max_cmd_len=65536      # usable default for all BSDs
-    fi
-    # And add a safety zone
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-    ;;
-
-  interix*)
-    # We know the value 262144 and hardcode it with a safety zone (like BSD)
-    lt_cv_sys_max_cmd_len=196608
-    ;;
-
-  osf*)
-    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
-    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
-    # nice to cause kernel panics so lets avoid the loop below.
-    # First set a reasonable default.
-    lt_cv_sys_max_cmd_len=16384
-    #
-    if test -x /sbin/sysconfig; then
-      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
-        *1*) lt_cv_sys_max_cmd_len=-1 ;;
-      esac
-    fi
-    ;;
-  sco3.2v5*)
-    lt_cv_sys_max_cmd_len=102400
-    ;;
-  sysv5* | sco5v6* | sysv4.2uw2*)
-    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
-    if test -n "$kargmax"; then
-      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[       ]]//'`
-    else
-      lt_cv_sys_max_cmd_len=32768
-    fi
-    ;;
-  *)
-    # If test is not a shell built-in, we'll probably end up computing a
-    # maximum length that is only half of the actual maximum length, but
-    # we can't tell.
-    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
-    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
-              = "XX$teststring") >/dev/null 2>&1 &&
-           new_result=`expr "X$teststring" : ".*" 2>&1` &&
-           lt_cv_sys_max_cmd_len=$new_result &&
-           test $i != 17 # 1/2 MB should be enough
-    do
-      i=`expr $i + 1`
-      teststring=$teststring$teststring
-    done
-    teststring=
-    # Add a significant safety factor because C++ compilers can tack on massive
-    # amounts of additional arguments before passing them to the linker.
-    # It appears as though 1/2 is a usable value.
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
-    ;;
-  esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
-  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
-  AC_MSG_RESULT(none)
-fi
-])# AC_LIBTOOL_SYS_MAX_CMD_LEN
-
-
-# _LT_AC_CHECK_DLFCN
-# ------------------
-AC_DEFUN([_LT_AC_CHECK_DLFCN],
-[AC_CHECK_HEADERS(dlfcn.h)dnl
-])# _LT_AC_CHECK_DLFCN
-
-
-# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ---------------------------------------------------------------------
-AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
-  [$4]
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<EOF
-[#line __oline__ "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL          RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL                DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL                0
-#  endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW         DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW       RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW     DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW     0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
-
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
-  else
-    puts (dlerror ());
-
-    exit (status);
-}]
-EOF
-  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) $1 ;;
-      x$lt_dlneed_uscore) $2 ;;
-      x$lt_dlunknown|x*) $3 ;;
-    esac
-  else :
-    # compilation failed
-    $3
-  fi
-fi
-rm -fr conftest*
-])# _LT_AC_TRY_DLOPEN_SELF
-
-
-# AC_LIBTOOL_DLOPEN_SELF
-# ----------------------
-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
-
-  case $host_os in
-  beos*)
-    lt_cv_dlopen="load_add_on"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ;;
-
-  mingw* | pw32*)
-    lt_cv_dlopen="LoadLibrary"
-    lt_cv_dlopen_libs=
-   ;;
-
-  cygwin*)
-    lt_cv_dlopen="dlopen"
-    lt_cv_dlopen_libs=
-   ;;
-
-  darwin*)
-  # if libdl is installed we need to link against it
-    AC_CHECK_LIB([dl], [dlopen],
-               [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
-    lt_cv_dlopen="dyld"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ])
-   ;;
-
-  *)
-    AC_CHECK_FUNC([shl_load],
-         [lt_cv_dlopen="shl_load"],
-      [AC_CHECK_LIB([dld], [shl_load],
-           [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
-       [AC_CHECK_FUNC([dlopen],
-             [lt_cv_dlopen="dlopen"],
-         [AC_CHECK_LIB([dl], [dlopen],
-               [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
-           [AC_CHECK_LIB([svld], [dlopen],
-                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
-             [AC_CHECK_LIB([dld], [dld_link],
-                   [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
-             ])
-           ])
-         ])
-       ])
-      ])
-    ;;
-  esac
-
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
-    enable_dlopen=no
-  fi
-
-  case $lt_cv_dlopen in
-  dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
-    save_LDFLAGS="$LDFLAGS"
-    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
-    save_LIBS="$LIBS"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
-
-    AC_CACHE_CHECK([whether a program can dlopen itself],
-         lt_cv_dlopen_self, [dnl
-         _LT_AC_TRY_DLOPEN_SELF(
-           lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
-           lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
-    ])
-
-    if test "x$lt_cv_dlopen_self" = xyes; then
-      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
-      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
-         lt_cv_dlopen_self_static, [dnl
-         _LT_AC_TRY_DLOPEN_SELF(
-           lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
-           lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
-      ])
-    fi
-
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
-    ;;
-  esac
-
-  case $lt_cv_dlopen_self in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
-
-  case $lt_cv_dlopen_self_static in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
-  esac
-fi
-])# AC_LIBTOOL_DLOPEN_SELF
-
-
-# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
-# ---------------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler
-AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
-   $rm -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-     fi
-   fi
-   chmod u+w . 2>&AS_MESSAGE_LOG_FD
-   $rm conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
-   $rm out/* && rmdir out
-   cd ..
-   rmdir conftest
-   $rm conftest*
-])
-])# AC_LIBTOOL_PROG_CC_C_O
-
-
-# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
-# -----------------------------------------
-# Check to see if we can do hard links to lock some files if needed
-AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
-[AC_REQUIRE([_LT_AC_LOCK])dnl
-
-hard_links="nottested"
-if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  AC_MSG_CHECKING([if we can lock with hard links])
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  AC_MSG_RESULT([$hard_links])
-  if test "$hard_links" = no; then
-    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
-
-
-# AC_LIBTOOL_OBJDIR
-# -----------------
-AC_DEFUN([AC_LIBTOOL_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  lt_cv_objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-])# AC_LIBTOOL_OBJDIR
-
-
-# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
-# ----------------------------------------------
-# Check hardcoding attributes.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_AC_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
-   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
-   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
-
-  # We can hardcode non-existant directories.
-  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
-     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
-    # Linking always hardcodes the temporary library directory.
-    _LT_AC_TAGVAR(hardcode_action, $1)=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
-fi
-AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
-
-if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
-
-
-# AC_LIBTOOL_SYS_LIB_STRIP
-# ------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
-[striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  AC_MSG_RESULT([yes])
-else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-   darwin*)
-       if test -n "$STRIP" ; then
-         striplib="$STRIP -x"
-         AC_MSG_RESULT([yes])
-       else
-  AC_MSG_RESULT([no])
-fi
-       ;;
-   *)
-  AC_MSG_RESULT([no])
-    ;;
-  esac
-fi
-])# AC_LIBTOOL_SYS_LIB_STRIP
-
-
-# AC_LIBTOOL_SYS_DYNAMIC_LINKER
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
-[AC_MSG_CHECKING([dynamic linker characteristics])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
-  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
-else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
-
-aix4* | aix5*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[[01]] | aix4.[[01]].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-          echo ' yes '
-          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
-       :
-      else
-       can_build_shared=no
-      fi
-      ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
-
-amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
-  ;;
-
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
-
-bsdi[[45]]*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
-
-cygwin* | mingw* | pw32*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
-
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32*)
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $rm \$dlpath'
-    shlibpath_overrides_runpath=yes
-
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
-      ;;
-    mingw*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-      fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    esac
-    ;;
-
-  *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
-    ;;
-  esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
-
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
-  if test "$GCC" = yes; then
-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
-  else
-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
-  fi
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
-
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
-kfreebsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[[123]]*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
-  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  freebsd*) # from 4.6 on
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
-
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  case $host_cpu in
-  ia64*)
-    shrext_cmds='.so'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-    fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-   hppa*64*)
-     shrext_cmds='.sl'
-     hardcode_into_libs=yes
-     dynamic_linker="$host_os dld.sl"
-     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-     soname_spec='${libname}${release}${shared_ext}$major'
-     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-     ;;
-   *)
-    shrext_cmds='.sl'
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    ;;
-  esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
-
-interix3*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-       if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux
-       else
-               version_type=irix
-       fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  hardcode_into_libs=yes
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
-
-# This must be Linux ELF.
-linux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  # Append ld.so.conf contents to the search path
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,   ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
-  fi
-
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
-
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
-
-knetbsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
-
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-nto-qnx*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-openbsd*)
-  version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
-  need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-    *)                         need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[[89]] | openbsd2.[[89]].*)
-       shlibpath_overrides_runpath=no
-       ;;
-      *)
-       shlibpath_overrides_runpath=yes
-       ;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
-
-os2*)
-  libname_spec='$name'
-  shrext_cmds=".dll"
-  need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      export_dynamic_flag_spec='${wl}-Blargedynsym'
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-    shlibpath_overrides_runpath=no
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    shlibpath_overrides_runpath=yes
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-       ;;
-    esac
-  fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
-
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
-
-
-# _LT_AC_TAGCONFIG
-# ----------------
-AC_DEFUN([_LT_AC_TAGCONFIG],
-[AC_ARG_WITH([tags],
-    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
-        [include additional configurations @<:@automatic@:>@])],
-    [tagnames="$withval"])
-
-if test -f "$ltmain" && test -n "$tagnames"; then
-  if test ! -f "${ofile}"; then
-    AC_MSG_WARN([output file `$ofile' does not exist])
-  fi
-
-  if test -z "$LTCC"; then
-    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
-    if test -z "$LTCC"; then
-      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
-    else
-      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
-    fi
-  fi
-  if test -z "$LTCFLAGS"; then
-    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
-  fi
-
-  # Extract list of available tagged configurations in $ofile.
-  # Note that this assumes the entire list is on one line.
-  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
-
-  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-  for tagname in $tagnames; do
-    IFS="$lt_save_ifs"
-    # Check whether tagname contains only valid characters
-    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
-    "") ;;
-    *)  AC_MSG_ERROR([invalid tag name: $tagname])
-       ;;
-    esac
-
-    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
-    then
-      AC_MSG_ERROR([tag name \"$tagname\" already exists])
-    fi
-
-    # Update the list of available tags.
-    if test -n "$tagname"; then
-      echo appending configuration tag \"$tagname\" to $ofile
-
-      case $tagname in
-      CXX)
-       if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-           ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-           (test "X$CXX" != "Xg++"))) ; then
-         AC_LIBTOOL_LANG_CXX_CONFIG
-       else
-         tagname=""
-       fi
-       ;;
-
-      F77)
-       if test -n "$F77" && test "X$F77" != "Xno"; then
-         AC_LIBTOOL_LANG_F77_CONFIG
-       else
-         tagname=""
-       fi
-       ;;
-
-      GCJ)
-       if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
-         AC_LIBTOOL_LANG_GCJ_CONFIG
-       else
-         tagname=""
-       fi
-       ;;
-
-      RC)
-       AC_LIBTOOL_LANG_RC_CONFIG
-       ;;
-
-      *)
-       AC_MSG_ERROR([Unsupported tag name: $tagname])
-       ;;
-      esac
-
-      # Append the new tag name to the list of available tags.
-      if test -n "$tagname" ; then
-      available_tags="$available_tags $tagname"
-    fi
-    fi
-  done
-  IFS="$lt_save_ifs"
-
-  # Now substitute the updated list of available tags.
-  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
-    mv "${ofile}T" "$ofile"
-    chmod +x "$ofile"
-  else
-    rm -f "${ofile}T"
-    AC_MSG_ERROR([unable to update list of available tagged configurations.])
-  fi
-fi
-])# _LT_AC_TAGCONFIG
-
-
-# AC_LIBTOOL_DLOPEN
-# -----------------
-# enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN],
- [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_DLOPEN
-
-
-# AC_LIBTOOL_WIN32_DLL
-# --------------------
-# declare package support for building win32 DLLs
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_WIN32_DLL
-
-
-# AC_ENABLE_SHARED([DEFAULT])
-# ---------------------------
-# implement the --enable-shared flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([shared],
-    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
-       [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_shared=yes
-       fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
-])# AC_ENABLE_SHARED
-
-
-# AC_DISABLE_SHARED
-# -----------------
-# set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)
-])# AC_DISABLE_SHARED
-
-
-# AC_ENABLE_STATIC([DEFAULT])
-# ---------------------------
-# implement the --enable-static flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([static],
-    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
-       [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_static=yes ;;
-    no) enable_static=no ;;
-    *)
-     enable_static=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_static=yes
-       fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
-])# AC_ENABLE_STATIC
-
-
-# AC_DISABLE_STATIC
-# -----------------
-# set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)
-])# AC_DISABLE_STATIC
-
-
-# AC_ENABLE_FAST_INSTALL([DEFAULT])
-# ---------------------------------
-# implement the --enable-fast-install flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([fast-install],
-    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
-    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_fast_install=yes ;;
-    no) enable_fast_install=no ;;
-    *)
-      enable_fast_install=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_fast_install=yes
-       fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
-])# AC_ENABLE_FAST_INSTALL
-
-
-# AC_DISABLE_FAST_INSTALL
-# -----------------------
-# set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)
-])# AC_DISABLE_FAST_INSTALL
-
-
-# AC_LIBTOOL_PICMODE([MODE])
-# --------------------------
-# implement the --with-pic flag
-# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)
-])# AC_LIBTOOL_PICMODE
-
-
-# AC_PROG_EGREP
-# -------------
-# This is predefined starting with Autoconf 2.54, so this conditional
-# definition can be removed once we require Autoconf 2.54 or later.
-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
-[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
-   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
-    then ac_cv_prog_egrep='grep -E'
-    else ac_cv_prog_egrep='egrep'
-    fi])
- EGREP=$ac_cv_prog_egrep
- AC_SUBST([EGREP])
-])])
-
-
-# AC_PATH_TOOL_PREFIX
-# -------------------
-# find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-[[\\/*] |  ?:[\\/]*])
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word.  This closes a longstanding sh security hole.
-  ac_dummy="ifelse([$2], , $PATH, [$2])"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$1; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
-      if test -n "$file_magic_test_file"; then
-       case $deplibs_check_method in
-       "file_magic "*)
-         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-           $EGREP "$file_magic_regex" > /dev/null; then
-           :
-         else
-           cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
-         fi ;;
-       esac
-      fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  AC_MSG_RESULT($MAGIC_CMD)
-else
-  AC_MSG_RESULT(no)
-fi
-])# AC_PATH_TOOL_PREFIX
-
-
-# AC_PATH_MAGIC
-# -------------
-# find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
-  if test -n "$ac_tool_prefix"; then
-    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
-  else
-    MAGIC_CMD=:
-  fi
-fi
-])# AC_PATH_MAGIC
-
-
-# AC_PROG_LD
-# ----------
-# find the pathname to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH([gnu-ld],
-    [AC_HELP_STRING([--with-gnu-ld],
-       [assume the C compiler uses GNU ld @<:@default=no@:>@])],
-    [test "$withval" = no || with_gnu_ld=yes],
-    [with_gnu_ld=no])
-AC_REQUIRE([LT_AC_PROG_SED])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by $CC])
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [[\\/]]* | ?:[[\\/]]*)
-      re_direlt='/[[^/]][[^/]]*/\.\./'
-      # Canonicalize the pathname of ld
-      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-       ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  AC_MSG_CHECKING([for GNU ld])
-else
-  AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some variants of GNU ld only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
-      *GNU* | *'with BFD'*)
-       test "$with_gnu_ld" != no && break
-       ;;
-      *)
-       test "$with_gnu_ld" != yes && break
-       ;;
-      esac
-    fi
-  done
-  IFS="$lt_save_ifs"
-else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])# AC_PROG_LD
-
-
-# AC_PROG_LD_GNU
-# --------------
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  lt_cv_prog_gnu_ld=yes
-  ;;
-*)
-  lt_cv_prog_gnu_ld=no
-  ;;
-esac])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])# AC_PROG_LD_GNU
-
-
-# AC_PROG_LD_RELOAD_FLAG
-# ----------------------
-# find reload flag for linker
-#   -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
-[AC_CACHE_CHECK([for $LD option to reload object files],
-  lt_cv_ld_reload_flag,
-  [lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
-  darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-    else
-      reload_cmds='$LD$reload_flag -o $output$reload_objs'
-    fi
-    ;;
-esac
-])# AC_PROG_LD_RELOAD_FLAG
-
-
-# AC_DEPLIBS_CHECK_METHOD
-# -----------------------
-# how to check for library dependencies
-#  -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependent libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix4* | aix5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-beos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-bsdi[[45]]*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  ;;
-
-cygwin*)
-  # func_win32_libid is a shell function defined in ltmain.sh
-  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-  lt_cv_file_magic_cmd='func_win32_libid'
-  ;;
-
-mingw* | pw32*)
-  # Base MSYS/MinGW do not provide the 'file' command needed by
-  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
-  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
-  ;;
-
-darwin* | rhapsody*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-freebsd* | kfreebsd*-gnu | dragonfly*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-    case $host_cpu in
-    i*86 )
-      # Not sure whether the presence of OpenBSD here was a mistake.
-      # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
-      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-      ;;
-    esac
-  else
-    lt_cv_deplibs_check_method=pass_all
-  fi
-  ;;
-
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  case $host_cpu in
-  ia64*)
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
-    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
-    ;;
-  hppa*64*)
-    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
-    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
-    ;;
-  *)
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
-    lt_cv_file_magic_test_file=/usr/lib/libc.sl
-    ;;
-  esac
-  ;;
-
-interix3*)
-  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
-  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $LD in
-  *-32|*"-32 ") libmagic=32-bit;;
-  *-n32|*"-n32 ") libmagic=N32;;
-  *-64|*"-64 ") libmagic=64-bit;;
-  *) libmagic=never-match;;
-  esac
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-# This must be Linux ELF.
-linux*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
-  fi
-  ;;
-
-newos6*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=/usr/lib/libnls.so
-  ;;
-
-nto-qnx*)
-  lt_cv_deplibs_check_method=unknown
-  ;;
-
-openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
-  fi
-  ;;
-
-osf3* | osf4* | osf5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-solaris*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sysv4 | sysv4.3*)
-  case $host_vendor in
-  motorola)
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
-    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
-    ;;
-  ncr)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  sequent)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
-    ;;
-  sni)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
-    lt_cv_file_magic_test_file=/lib/libc.so
-    ;;
-  siemens)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  pc)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  esac
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-])# AC_DEPLIBS_CHECK_METHOD
-
-
-# AC_PROG_NM
-# ----------
-# find the pathname to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
-[if test -n "$NM"; then
-  # Let the user override the test.
-  lt_cv_path_NM="$NM"
-else
-  lt_nm_to_check="${ac_tool_prefix}nm"
-  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
-    lt_nm_to_check="$lt_nm_to_check nm"
-  fi
-  for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
-      test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
-       # Check to see if the nm accepts a BSD-compat flag.
-       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
-       #   nm: unknown option "B" ignored
-       # Tru64's nm complains that /dev/null is an invalid object file
-       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-       */dev/null* | *'Invalid file or object type'*)
-         lt_cv_path_NM="$tmp_nm -B"
-         break
-         ;;
-       *)
-         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
-         */dev/null*)
-           lt_cv_path_NM="$tmp_nm -p"
-           break
-           ;;
-         *)
-           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-           continue # so that we can try to find one that supports BSD flags
-           ;;
-         esac
-         ;;
-       esac
-      fi
-    done
-    IFS="$lt_save_ifs"
-  done
-  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi])
-NM="$lt_cv_path_NM"
-])# AC_PROG_NM
-
-
-# AC_CHECK_LIBM
-# -------------
-# check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
-  # These system don't have libm, or don't need it
-  ;;
-*-ncr-sysv4.3*)
-  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
-  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
-  ;;
-*)
-  AC_CHECK_LIB(m, cos, LIBM="-lm")
-  ;;
-esac
-])# AC_CHECK_LIBM
-
-
-# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
-# -----------------------------------
-# sets LIBLTDL to the link flags for the libltdl convenience library and
-# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-convenience to the configure arguments.  Note that
-# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
-# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
-# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
-# (note the single quotes!).  If your package is not flat and you're not
-# using automake, define top_builddir and top_srcdir appropriately in
-# the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-  case $enable_ltdl_convenience in
-  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
-  "") enable_ltdl_convenience=yes
-      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
-  esac
-  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
-  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-  # For backwards non-gettext consistent compatibility...
-  INCLTDL="$LTDLINCL"
-])# AC_LIBLTDL_CONVENIENCE
-
-
-# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
-# -----------------------------------
-# sets LIBLTDL to the link flags for the libltdl installable library and
-# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-install to the configure arguments.  Note that
-# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
-# and an installed libltdl is not found, it is assumed to be `libltdl'.
-# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
-# '${top_srcdir}/' (note the single quotes!).  If your package is not
-# flat and you're not using automake, define top_builddir and top_srcdir
-# appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-  AC_CHECK_LIB(ltdl, lt_dlinit,
-  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
-  [if test x"$enable_ltdl_install" = xno; then
-     AC_MSG_WARN([libltdl not installed, but installation disabled])
-   else
-     enable_ltdl_install=yes
-   fi
-  ])
-  if test x"$enable_ltdl_install" = x"yes"; then
-    ac_configure_args="$ac_configure_args --enable-ltdl-install"
-    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
-    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-  else
-    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
-    LIBLTDL="-lltdl"
-    LTDLINCL=
-  fi
-  # For backwards non-gettext consistent compatibility...
-  INCLTDL="$LTDLINCL"
-])# AC_LIBLTDL_INSTALLABLE
-
-
-# AC_LIBTOOL_CXX
-# --------------
-# enable support for C++ libraries
-AC_DEFUN([AC_LIBTOOL_CXX],
-[AC_REQUIRE([_LT_AC_LANG_CXX])
-])# AC_LIBTOOL_CXX
-
-
-# _LT_AC_LANG_CXX
-# ---------------
-AC_DEFUN([_LT_AC_LANG_CXX],
-[AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
-])# _LT_AC_LANG_CXX
-
-# _LT_AC_PROG_CXXCPP
-# ------------------
-AC_DEFUN([_LT_AC_PROG_CXXCPP],
-[
-AC_REQUIRE([AC_PROG_CXX])
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
-  AC_PROG_CXXCPP
-fi
-])# _LT_AC_PROG_CXXCPP
-
-# AC_LIBTOOL_F77
-# --------------
-# enable support for Fortran 77 libraries
-AC_DEFUN([AC_LIBTOOL_F77],
-[AC_REQUIRE([_LT_AC_LANG_F77])
-])# AC_LIBTOOL_F77
-
-
-# _LT_AC_LANG_F77
-# ---------------
-AC_DEFUN([_LT_AC_LANG_F77],
-[AC_REQUIRE([AC_PROG_F77])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
-])# _LT_AC_LANG_F77
-
-
-# AC_LIBTOOL_GCJ
-# --------------
-# enable support for GCJ libraries
-AC_DEFUN([AC_LIBTOOL_GCJ],
-[AC_REQUIRE([_LT_AC_LANG_GCJ])
-])# AC_LIBTOOL_GCJ
-
-
-# _LT_AC_LANG_GCJ
-# ---------------
-AC_DEFUN([_LT_AC_LANG_GCJ],
-[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
-  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
-    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
-      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
-        [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
-          [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
-])# _LT_AC_LANG_GCJ
-
-
-# AC_LIBTOOL_RC
-# -------------
-# enable support for Windows resource files
-AC_DEFUN([AC_LIBTOOL_RC],
-[AC_REQUIRE([LT_AC_PROG_RC])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
-])# AC_LIBTOOL_RC
-
-
-# AC_LIBTOOL_LANG_C_CONFIG
-# ------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
-AC_DEFUN([_LT_AC_LANG_C_CONFIG],
-[lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}\n'
-
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_DLOPEN_SELF
-
-# Report which library types will actually be built
-AC_MSG_CHECKING([if libtool supports shared libraries])
-AC_MSG_RESULT([$can_build_shared])
-
-AC_MSG_CHECKING([whether to build shared libraries])
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case $host_os in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
-  fi
-  ;;
-
-aix4* | aix5*)
-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-    test "$enable_shared" = yes && enable_static=no
-  fi
-    ;;
-esac
-AC_MSG_RESULT([$enable_shared])
-
-AC_MSG_CHECKING([whether to build static libraries])
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-AC_MSG_RESULT([$enable_static])
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_C_CONFIG
-
-
-# AC_LIBTOOL_LANG_CXX_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
-AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
-[AC_LANG_PUSH(C++)
-AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
-
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
-_LT_AC_TAGVAR(always_export_symbols, $1)=no
-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_direct, $1)=no
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
-_LT_AC_TAGVAR(module_cmds, $1)=
-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_AC_TAGVAR(no_undefined_flag, $1)=
-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Dependencies to place before and after the object being linked:
-_LT_AC_TAGVAR(predep_objects, $1)=
-_LT_AC_TAGVAR(postdep_objects, $1)=
-_LT_AC_TAGVAR(predeps, $1)=
-_LT_AC_TAGVAR(postdeps, $1)=
-_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC=$CC
-lt_save_LD=$LD
-lt_save_GCC=$GCC
-GCC=$GXX
-lt_save_with_gnu_ld=$with_gnu_ld
-lt_save_path_LD=$lt_cv_path_LD
-if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
-  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
-else
-  $as_unset lt_cv_prog_gnu_ld
-fi
-if test -n "${lt_cv_path_LDCXX+set}"; then
-  lt_cv_path_LD=$lt_cv_path_LDCXX
-else
-  $as_unset lt_cv_path_LD
-fi
-test -z "${LDCXX+set}" || LD=$LDCXX
-CC=${CXX-"c++"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-
-# We don't want -fno-exception wen compiling C++ code, so set the
-# no_builtin_flag separately
-if test "$GXX" = yes; then
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-else
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-fi
-
-if test "$GXX" = yes; then
-  # Set up default GNU C++ configuration
-
-  AC_PROG_LD
-
-  # Check if GNU C++ uses GNU ld as the underlying linker, since the
-  # archiving commands below assume that GNU ld is being used.
-  if test "$with_gnu_ld" = yes; then
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
-    #     investigate it a little bit more. (MM)
-    wlarc='${wl}'
-
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
-       grep 'no-whole-archive' > /dev/null; then
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    else
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-  else
-    with_gnu_ld=no
-    wlarc=
-
-    # A generic and very simple default shared library creation
-    # command for GNU C++ for the case where it uses the native
-    # linker, instead of GNU ld.  If possible, this setting should
-    # overridden to take advantage of the native linker features on
-    # the platform it is being used on.
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-  fi
-
-  # Commands to make compiler produce verbose output that lists
-  # what "hidden" libraries, object files and flags are used when
-  # linking a shared library.
-  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
-else
-  GXX=no
-  with_gnu_ld=no
-  wlarc=
-fi
-
-# PORTME: fill in a description of your system's C++ link characteristics
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-_LT_AC_TAGVAR(ld_shlibs, $1)=yes
-case $host_os in
-  aix3*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  aix4* | aix5*)
-    if test "$host_cpu" = ia64; then
-      # On IA64, the linker does run time linking by default, so we don't
-      # have to do anything special.
-      aix_use_runtimelinking=no
-      exp_sym_flag='-Bexport'
-      no_entry_flag=""
-    else
-      aix_use_runtimelinking=no
-
-      # Test if we are trying to use run time linking or normal
-      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-      # need to do runtime linking.
-      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
-       for ld_flag in $LDFLAGS; do
-         case $ld_flag in
-         *-brtl*)
-           aix_use_runtimelinking=yes
-           break
-           ;;
-         esac
-       done
-       ;;
-      esac
-
-      exp_sym_flag='-bexport'
-      no_entry_flag='-bnoentry'
-    fi
-
-    # When large executables or shared objects are built, AIX ld can
-    # have problems creating the table of contents.  If linking a library
-    # or program results in "error TOC overflow" add -mminimal-toc to
-    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-    _LT_AC_TAGVAR(archive_cmds, $1)=''
-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-    if test "$GXX" = yes; then
-      case $host_os in aix4.[[012]]|aix4.[[012]].*)
-      # We only want to do this on AIX 4.2 and lower, the check
-      # below for broken collect2 doesn't work under 4.3+
-       collect2name=`${CC} -print-prog-name=collect2`
-       if test -f "$collect2name" && \
-          strings "$collect2name" | grep resolve_lib_name >/dev/null
-       then
-         # We have reworked collect2
-         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-       else
-         # We have old collect2
-         _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
-         # It fails to find uninstalled libraries when the uninstalled
-         # path is not listed in the libpath.  Setting hardcode_minus_L
-         # to unsupported forces relinking
-         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-       fi
-       ;;
-      esac
-      shared_flag='-shared'
-      if test "$aix_use_runtimelinking" = yes; then
-       shared_flag="$shared_flag "'${wl}-G'
-      fi
-    else
-      # not using gcc
-      if test "$host_cpu" = ia64; then
-       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-       # chokes on -Wl,-G. The following line is correct:
-       shared_flag='-G'
-      else
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag='${wl}-G'
-       else
-         shared_flag='${wl}-bM:SRE'
-       fi
-      fi
-    fi
-
-    # It seems that -bexpall does not export symbols beginning with
-    # underscore (_), so it is better to generate a list of symbols to export.
-    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-    if test "$aix_use_runtimelinking" = yes; then
-      # Warning - without using the other runtime loading flags (-brtl),
-      # -berok will link without error, but may produce a broken library.
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
-      # Determine the default libpath from the value encoded in an empty executable.
-      _LT_AC_SYS_LIBPATH_AIX
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-     else
-      if test "$host_cpu" = ia64; then
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-      else
-       # Determine the default libpath from the value encoded in an empty executable.
-       _LT_AC_SYS_LIBPATH_AIX
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-       # Warning - without using the other run time loading flags,
-       # -berok will link without error, but may produce a broken library.
-       _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-       # Exported symbols can be pulled into shared objects from archives
-       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
-       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-       # This is similar to how AIX traditionally builds its shared libraries.
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-      fi
-    fi
-    ;;
-
-  beos*)
-    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-      # support --undefined.  This deserves some investigation.  FIXME
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-    else
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    fi
-    ;;
-
-  chorus*)
-    case $cc_basename in
-      *)
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-    esac
-    ;;
-
-  cygwin* | mingw* | pw32*)
-    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-    # as there is no search path for DLLs.
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-    _LT_AC_TAGVAR(always_export_symbols, $1)=no
-    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
-    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      # If the export-symbols file already is a .def file (1st line
-      # is EXPORTS), use it as is; otherwise, prepend...
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-       cp $export_symbols $output_objdir/$soname.def;
-      else
-       echo EXPORTS > $output_objdir/$soname.def;
-       cat $export_symbols >> $output_objdir/$soname.def;
-      fi~
-      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-    else
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    fi
-  ;;
-      darwin* | rhapsody*)
-        case $host_os in
-        rhapsody* | darwin1.[[012]])
-         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[[012]])
-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-        esac
-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
-      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-    if test "$GXX" = yes ; then
-      lt_int_apple_cc_single_mod=no
-      output_verbose_link_cmd='echo'
-      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
-       lt_int_apple_cc_single_mod=yes
-      fi
-      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      else
-          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-        fi
-        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          else
-            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          fi
-            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-      else
-      case $cc_basename in
-        xlc*)
-         output_verbose_link_cmd='echo'
-          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          ;;
-       *)
-         _LT_AC_TAGVAR(ld_shlibs, $1)=no
-          ;;
-      esac
-      fi
-        ;;
-
-  dgux*)
-    case $cc_basename in
-      ec++*)
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-      ghcx*)
-       # Green Hills C++ Compiler
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-      *)
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-    esac
-    ;;
-  freebsd[[12]]*)
-    # C++ shared libraries reported to be fairly broken before switch to ELF
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  freebsd-elf*)
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    ;;
-  freebsd* | kfreebsd*-gnu | dragonfly*)
-    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
-    # conventions
-    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
-    ;;
-  gnu*)
-    ;;
-  hpux9*)
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-                               # but as the default
-                               # location of the library.
-
-    case $cc_basename in
-    CC*)
-      # FIXME: insert proper C++ library support
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-    aCC*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      # Commands to make compiler produce verbose output that lists
-      # what "hidden" libraries, object files and flags are used when
-      # linking a shared library.
-      #
-      # There doesn't appear to be a way to prevent this compiler from
-      # explicitly linking system object files so we need to strip them
-      # from the output so that they don't get included in the library
-      # dependencies.
-      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-      ;;
-    *)
-      if test "$GXX" = yes; then
-        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-        # FIXME: insert proper C++ library support
-        _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-    esac
-    ;;
-  hpux10*|hpux11*)
-    if test $with_gnu_ld = no; then
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-      case $host_cpu in
-      hppa*64*|ia64*)
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
-        ;;
-      *)
-       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-        ;;
-      esac
-    fi
-    case $host_cpu in
-    hppa*64*|ia64*)
-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-    *)
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-                                             # but as the default
-                                             # location of the library.
-      ;;
-    esac
-
-    case $cc_basename in
-      CC*)
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-      aCC*)
-       case $host_cpu in
-       hppa*64*)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-         ;;
-       ia64*)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-         ;;
-       *)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-         ;;
-       esac
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-       ;;
-      *)
-       if test "$GXX" = yes; then
-         if test $with_gnu_ld = no; then
-           case $host_cpu in
-           hppa*64*)
-             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-             ;;
-           ia64*)
-             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-             ;;
-           *)
-             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-             ;;
-           esac
-         fi
-       else
-         # FIXME: insert proper C++ library support
-         _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       fi
-       ;;
-    esac
-    ;;
-  interix3*)
-    _LT_AC_TAGVAR(hardcode_direct, $1)=no
-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-    # Instead, shared libraries are loaded at an image base (0x10000000 by
-    # default) and relocated if they conflict, which is a slow very memory
-    # consuming and fragmenting process.  To avoid this, we pick a random,
-    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-    ;;
-  irix5* | irix6*)
-    case $cc_basename in
-      CC*)
-       # SGI C++
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-
-       # Archives containing C++ object files must be created using
-       # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
-       # necessary to make sure instantiated templates are included
-       # in the archive.
-       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
-       ;;
-      *)
-       if test "$GXX" = yes; then
-         if test "$with_gnu_ld" = no; then
-           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-         else
-           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
-         fi
-       fi
-       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-       ;;
-    esac
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-    ;;
-  linux*)
-    case $cc_basename in
-      KCC*)
-       # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-       # KCC will only create a shared library if the output file
-       # ends with ".so" (or ".sl" for HP-UX), so rename the library
-       # to its proper name (with version) after linking.
-       _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
-       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-       # Archives containing C++ object files must be created using
-       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
-       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-       ;;
-      icpc*)
-       # Intel C++
-       with_gnu_ld=yes
-       # version 8.0 and above of icpc choke on multiply defined symbols
-       # if we add $predep_objects and $postdep_objects, however 7.1 and
-       # earlier do not add the objects themselves.
-       case `$CC -V 2>&1` in
-       *"Version 7."*)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-         ;;
-       *)  # Version 8.0 or newer
-         tmp_idyn=
-         case $host_cpu in
-           ia64*) tmp_idyn=' -i_dynamic';;
-         esac
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-         ;;
-       esac
-       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-       ;;
-      pgCC*)
-        # Portland Group C++ compiler
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-        ;;
-      cxx*)
-       # Compaq C++
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
-       runpath_var=LD_RUN_PATH
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-       ;;
-    esac
-    ;;
-  lynxos*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  m88k*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  mvs*)
-    case $cc_basename in
-      cxx*)
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-      *)
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-    esac
-    ;;
-  netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
-    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
-      wlarc=
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-    fi
-    # Workaround some broken pre-1.5 toolchains
-    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
-    ;;
-  openbsd2*)
-    # C++ shared libraries are fairly broken
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  openbsd*)
-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    fi
-    output_verbose_link_cmd='echo'
-    ;;
-  osf3*)
-    case $cc_basename in
-      KCC*)
-       # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-       # KCC will only create a shared library if the output file
-       # ends with ".so" (or ".sl" for HP-UX), so rename the library
-       # to its proper name (with version) after linking.
-       _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-       # Archives containing C++ object files must be created using
-       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
-       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-
-       ;;
-      RCC*)
-       # Rational C++ 2.4.1
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-      cxx*)
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-       ;;
-      *)
-       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-
-         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-         # Commands to make compiler produce verbose output that lists
-         # what "hidden" libraries, object files and flags are used when
-         # linking a shared library.
-         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
-       else
-         # FIXME: insert proper C++ library support
-         _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       fi
-       ;;
-    esac
-    ;;
-  osf4* | osf5*)
-    case $cc_basename in
-      KCC*)
-       # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-       # KCC will only create a shared library if the output file
-       # ends with ".so" (or ".sl" for HP-UX), so rename the library
-       # to its proper name (with version) after linking.
-       _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-       # Archives containing C++ object files must be created using
-       # the KAI C++ compiler.
-       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
-       ;;
-      RCC*)
-       # Rational C++ 2.4.1
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-      cxx*)
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-         echo "-hidden">> $lib.exp~
-         $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
-         $rm $lib.exp'
-
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-       ;;
-      *)
-       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-
-         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-         # Commands to make compiler produce verbose output that lists
-         # what "hidden" libraries, object files and flags are used when
-         # linking a shared library.
-         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
-       else
-         # FIXME: insert proper C++ library support
-         _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       fi
-       ;;
-    esac
-    ;;
-  psos*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  sunos4*)
-    case $cc_basename in
-      CC*)
-       # Sun C++ 4.x
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-      lcc*)
-       # Lucid
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-      *)
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-    esac
-    ;;
-  solaris*)
-    case $cc_basename in
-      CC*)
-       # Sun C++ 4.2, 5.x and Centerline C++
-        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
-       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-       $CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-       case $host_os in
-         solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-         *)
-           # The C++ compiler is used as linker so we must use $wl
-           # flag to pass the commands to the underlying system
-           # linker. We must also pass each convience library through
-           # to the system linker between allextract/defaultextract.
-           # The C++ compiler will combine linker options so we
-           # cannot just pass the convience library names through
-           # without $wl.
-           # Supported since Solaris 2.6 (maybe 2.5.1?)
-           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
-           ;;
-       esac
-       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-       output_verbose_link_cmd='echo'
-
-       # Archives containing C++ object files must be created using
-       # "CC -xar", where "CC" is the Sun C++ compiler.  This is
-       # necessary to make sure instantiated templates are included
-       # in the archive.
-       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
-       ;;
-      gcx*)
-       # Green Hills C++ Compiler
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
-       # The C++ compiler must be used to create the archive.
-       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
-       ;;
-      *)
-       # GNU C++ compiler with Solaris linker
-       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-         _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
-         if $CC --version | grep -v '^2\.7' > /dev/null; then
-           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-               $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
-         else
-           # g++ 2.7 appears to require `-G' NOT `-shared' on this
-           # platform.
-           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-               $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
-         fi
-
-         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
-       fi
-       ;;
-    esac
-    ;;
-  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-    runpath_var='LD_RUN_PATH'
-
-    case $cc_basename in
-      CC*)
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       ;;
-      *)
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       ;;
-    esac
-    ;;
-  sysv5* | sco3.2v5* | sco5v6*)
-    # Note: We can NOT use -z defs as we might desire, because we do not
-    # link with -lc, and that would cause any symbols used from libc to
-    # always be unresolved, which means just about no library would
-    # ever link correctly.  If we're not using GNU ld we use -z text
-    # though, which does catch some bad symbols but isn't as heavy-handed
-    # as -z defs.
-    # For security reasons, it is highly recommended that you always
-    # use absolute paths for naming shared libraries, and exclude the
-    # DT_RUNPATH tag from executables and libraries.  But doing so
-    # requires that you compile everything twice, which is a pain.
-    # So that behaviour is only enabled if SCOABSPATH is set to a
-    # non-empty value in the environment.  Most likely only useful for
-    # creating official distributions of packages.
-    # This is a hack until libtool officially supports absolute path
-    # names for shared libraries.
-    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
-    runpath_var='LD_RUN_PATH'
-
-    case $cc_basename in
-      CC*)
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       ;;
-      *)
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       ;;
-    esac
-    ;;
-  tandem*)
-    case $cc_basename in
-      NCC*)
-       # NonStop-UX NCC 3.20
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-      *)
-       # FIXME: insert proper C++ library support
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       ;;
-    esac
-    ;;
-  vxworks*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  *)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-esac
-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-_LT_AC_TAGVAR(GCC, $1)="$GXX"
-_LT_AC_TAGVAR(LD, $1)="$LD"
-
-AC_LIBTOOL_POSTDEP_PREDEP($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC=$lt_save_CC
-LDCXX=$LD
-LD=$lt_save_LD
-GCC=$lt_save_GCC
-with_gnu_ldcxx=$with_gnu_ld
-with_gnu_ld=$lt_save_with_gnu_ld
-lt_cv_path_LDCXX=$lt_cv_path_LD
-lt_cv_path_LD=$lt_save_path_LD
-lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
-lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-])# AC_LIBTOOL_LANG_CXX_CONFIG
-
-# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
-# ------------------------------------
-# Figure out "hidden" library dependencies from verbose
-# compiler output when linking a shared library.
-# Parse the compiler output and extract the necessary
-# objects, libraries and library flags.
-AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
-dnl we can't use the lt_simple_compile_test_code here,
-dnl because it contains code intended for an executable,
-dnl not a library.  It's possible we should let each
-dnl tag define a new lt_????_link_test_code variable,
-dnl but it's only used here...
-ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
-int a;
-void foo (void) { a = 0; }
-EOF
-],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
-class Foo
-{
-public:
-  Foo (void) { a = 0; }
-private:
-  int a;
-};
-EOF
-],[$1],[F77],[cat > conftest.$ac_ext <<EOF
-      subroutine foo
-      implicit none
-      integer*4 a
-      a=0
-      return
-      end
-EOF
-],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
-public class foo {
-  private int a;
-  public void bar (void) {
-    a = 0;
-  }
-};
-EOF
-])
-dnl Parse the compiler output and extract the necessary
-dnl objects, libraries and library flags.
-if AC_TRY_EVAL(ac_compile); then
-  # Parse the compiler output and extract the necessary
-  # objects, libraries and library flags.
-
-  # Sentinel used to keep track of whether or not we are before
-  # the conftest object file.
-  pre_test_object_deps_done=no
-
-  # The `*' in the case matches for architectures that use `case' in
-  # $output_verbose_cmd can trigger glob expansion during the loop
-  # eval without this substitution.
-  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
-
-  for p in `eval $output_verbose_link_cmd`; do
-    case $p in
-
-    -L* | -R* | -l*)
-       # Some compilers place space between "-{L,R}" and the path.
-       # Remove the space.
-       if test $p = "-L" \
-         || test $p = "-R"; then
-        prev=$p
-        continue
-       else
-        prev=
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-        case $p in
-        -L* | -R*)
-          # Internal compiler library paths should come after those
-          # provided the user.  The postdeps already come after the
-          # user supplied libs so there is no need to process them.
-          if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
-            _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
-          else
-            _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
-          fi
-          ;;
-        # The "-l" case would never come before the object being
-        # linked, so don't bother handling this case.
-        esac
-       else
-        if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
-          _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
-        else
-          _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
-        fi
-       fi
-       ;;
-
-    *.$objext)
-       # This assumes that the test object file only shows up
-       # once in the compiler output.
-       if test "$p" = "conftest.$objext"; then
-        pre_test_object_deps_done=yes
-        continue
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-        if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
-          _LT_AC_TAGVAR(predep_objects, $1)="$p"
-        else
-          _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
-        fi
-       else
-        if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
-          _LT_AC_TAGVAR(postdep_objects, $1)="$p"
-        else
-          _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
-        fi
-       fi
-       ;;
-
-    *) ;; # Ignore the rest.
-
-    esac
-  done
-
-  # Clean up.
-  rm -f a.out a.exe
-else
-  echo "libtool.m4: error: problem compiling $1 test program"
-fi
-
-$rm -f confest.$objext
-
-# PORTME: override above test on systems where it is broken
-ifelse([$1],[CXX],
-[case $host_os in
-interix3*)
-  # Interix 3.5 installs completely hosed .la files for C++, so rather than
-  # hack all around it, let's just trust "g++" to DTRT.
-  _LT_AC_TAGVAR(predep_objects,$1)=
-  _LT_AC_TAGVAR(postdep_objects,$1)=
-  _LT_AC_TAGVAR(postdeps,$1)=
-  ;;
-
-solaris*)
-  case $cc_basename in
-  CC*)
-    # Adding this requires a known-good setup of shared libraries for
-    # Sun compiler versions before 5.6, else PIC objects from an old
-    # archive will be linked into the output, leading to subtle bugs.
-    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
-    ;;
-  esac
-  ;;
-esac
-])
-
-case " $_LT_AC_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-esac
-])# AC_LIBTOOL_POSTDEP_PREDEP
-
-# AC_LIBTOOL_LANG_F77_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
-AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
-[AC_REQUIRE([AC_PROG_F77])
-AC_LANG_PUSH(Fortran 77)
-
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
-_LT_AC_TAGVAR(always_export_symbols, $1)=no
-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_direct, $1)=no
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
-_LT_AC_TAGVAR(module_cmds, $1)=
-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_AC_TAGVAR(no_undefined_flag, $1)=
-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="      program t\n      end\n"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${F77-"f77"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-
-AC_MSG_CHECKING([if libtool supports shared libraries])
-AC_MSG_RESULT([$can_build_shared])
-
-AC_MSG_CHECKING([whether to build shared libraries])
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case $host_os in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
-  fi
-  ;;
-aix4* | aix5*)
-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-    test "$enable_shared" = yes && enable_static=no
-  fi
-  ;;
-esac
-AC_MSG_RESULT([$enable_shared])
-
-AC_MSG_CHECKING([whether to build static libraries])
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-AC_MSG_RESULT([$enable_static])
-
-_LT_AC_TAGVAR(GCC, $1)="$G77"
-_LT_AC_TAGVAR(LD, $1)="$LD"
-
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_F77_CONFIG
-
-
-# AC_LIBTOOL_LANG_GCJ_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
-AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
-[AC_LANG_SAVE
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${GCJ-"gcj"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-
-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_GCJ_CONFIG
-
-
-# AC_LIBTOOL_LANG_RC_CONFIG
-# -------------------------
-# Ensure that the configuration vars for the Windows resource compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
-AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
-[AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${RC-"windres"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_RC_CONFIG
-
-
-# AC_LIBTOOL_CONFIG([TAGNAME])
-# ----------------------------
-# If TAGNAME is not passed, then create an initial libtool script
-# with a default configuration from the untagged config vars.  Otherwise
-# add code to config.status for appending the configuration named by
-# TAGNAME from the matching tagged config vars.
-AC_DEFUN([AC_LIBTOOL_CONFIG],
-[# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # See if we are running on zsh, and set the options which allow our commands through
-  # without removal of \ escapes.
-  if test -n "${ZSH_VERSION+set}" ; then
-    setopt NO_GLOB_SUBST
-  fi
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
-    SED SHELL STRIP \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    _LT_AC_TAGVAR(compiler, $1) \
-    _LT_AC_TAGVAR(CC, $1) \
-    _LT_AC_TAGVAR(LD, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
-    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
-    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
-    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
-    _LT_AC_TAGVAR(old_archive_cmds, $1) \
-    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
-    _LT_AC_TAGVAR(predep_objects, $1) \
-    _LT_AC_TAGVAR(postdep_objects, $1) \
-    _LT_AC_TAGVAR(predeps, $1) \
-    _LT_AC_TAGVAR(postdeps, $1) \
-    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
-    _LT_AC_TAGVAR(archive_cmds, $1) \
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
-    _LT_AC_TAGVAR(postinstall_cmds, $1) \
-    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
-    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
-    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
-    _LT_AC_TAGVAR(no_undefined_flag, $1) \
-    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
-    _LT_AC_TAGVAR(hardcode_automatic, $1) \
-    _LT_AC_TAGVAR(module_cmds, $1) \
-    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
-    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
-    _LT_AC_TAGVAR(exclude_expsyms, $1) \
-    _LT_AC_TAGVAR(include_expsyms, $1); do
-
-    case $var in
-    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
-    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
-    _LT_AC_TAGVAR(archive_cmds, $1) | \
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
-    _LT_AC_TAGVAR(module_cmds, $1) | \
-    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
-    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
-    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
-
-  case $lt_echo in
-  *'\[$]0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
-    ;;
-  esac
-
-ifelse([$1], [],
-  [cfgfile="${ofile}T"
-  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
-  $rm -f "$cfgfile"
-  AC_MSG_NOTICE([creating $ofile])],
-  [cfgfile="$ofile"])
-
-  cat <<__EOF__ >> "$cfgfile"
-ifelse([$1], [],
-[#! $SHELL
-
-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
-#
-# This file is part of GNU Libtool:
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="$SED -e 1s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-# The names of the tagged configurations supported by this script.
-available_tags=
-
-# ### BEGIN LIBTOOL CONFIG],
-[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
-
-# A language-specific compiler.
-CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
-
-# Is the compiler the GNU C compiler?
-with_gcc=$_LT_AC_TAGVAR(GCC, $1)
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A symbol stripping program
-STRIP=$lt_STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
-archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
-module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
-
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
-
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
-
-# Symbols that must always be exported.
-include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
-
-ifelse([$1],[],
-[# ### END LIBTOOL CONFIG],
-[# ### END LIBTOOL TAG CONFIG: $tagname])
-
-__EOF__
-
-ifelse([$1],[], [
-  case $host_os in
-  aix3*)
-    cat <<\EOF >> "$cfgfile"
-
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
-fi
-EOF
-    ;;
-  esac
-
-  # We use sed instead of cat because bash on DJGPP gets confused if
-  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-  # text mode, it properly converts lines to CR/LF.  This bash problem
-  # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
-
-  mv -f "$cfgfile" "$ofile" || \
-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
-  chmod +x "$ofile"
-])
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-  if test -f "$ltmain_in"; then
-    test -f Makefile && make "$ltmain"
-  fi
-fi
-])# AC_LIBTOOL_CONFIG
-
-
-# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-
-_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-
-if test "$GCC" = yes; then
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-
-  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
-    lt_cv_prog_compiler_rtti_exceptions,
-    [-fno-rtti -fno-exceptions], [],
-    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
-fi
-])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
-
-
-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-# ---------------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
-[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_NM])
-AC_REQUIRE([AC_OBJEXT])
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
-[
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-
-# Transform an extracted symbol line into a proper C declaration
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-
-# Define system-specific variables.
-case $host_os in
-aix*)
-  symcode='[[BCDT]]'
-  ;;
-cygwin* | mingw* | pw32*)
-  symcode='[[ABCDGISTW]]'
-  ;;
-hpux*) # Its linker distinguishes data from code symbols
-  if test "$host_cpu" = ia64; then
-    symcode='[[ABCDEGRST]]'
-  fi
-  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-  ;;
-linux*)
-  if test "$host_cpu" = ia64; then
-    symcode='[[ABCDGIRSTW]]'
-    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-  fi
-  ;;
-irix* | nonstopux*)
-  symcode='[[BCDEGRST]]'
-  ;;
-osf*)
-  symcode='[[BCDEGQRST]]'
-  ;;
-solaris*)
-  symcode='[[BDRT]]'
-  ;;
-sco3.2v5*)
-  symcode='[[DT]]'
-  ;;
-sysv4.2uw2*)
-  symcode='[[DT]]'
-  ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
-  symcode='[[ABDT]]'
-  ;;
-sysv4)
-  symcode='[[DFNSTU]]'
-  ;;
-esac
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
-  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
-  ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
-  symcode='[[ABCDGIRSTW]]' ;;
-esac
-
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
-
-  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
-  symxfrm="\\1 $ac_symprfx\\2 \\2"
-
-  # Write the raw and C identifiers.
-  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
-
-  # Check to see that the pipe works correctly.
-  pipe_works=no
-
-  rm -f conftest*
-  cat > conftest.$ac_ext <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
-
-  if AC_TRY_EVAL(ac_compile); then
-    # Now try to grab the symbols.
-    nlist=conftest.nm
-    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
-      # Try sorting and uniquifying the output.
-      if sort "$nlist" | uniq > "$nlist"T; then
-       mv -f "$nlist"T "$nlist"
-      else
-       rm -f "$nlist"T
-      fi
-
-      # Make sure that we snagged all the symbols we need.
-      if grep ' nm_test_var$' "$nlist" >/dev/null; then
-       if grep ' nm_test_func$' "$nlist" >/dev/null; then
-         cat <<EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-EOF
-         # Now generate the symbol file.
-         eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
-
-         cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
-  const char *name;
-  lt_ptr_t address;
-}
-lt_preloaded_symbols[[]] =
-{
-EOF
-         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
-         cat <<\EOF >> conftest.$ac_ext
-  {0, (lt_ptr_t) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif
-EOF
-         # Now try linking the two files.
-         mv conftest.$ac_objext conftstm.$ac_objext
-         lt_save_LIBS="$LIBS"
-         lt_save_CFLAGS="$CFLAGS"
-         LIBS="conftstm.$ac_objext"
-         CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
-         if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
-           pipe_works=yes
-         fi
-         LIBS="$lt_save_LIBS"
-         CFLAGS="$lt_save_CFLAGS"
-       else
-         echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
-       fi
-      else
-       echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
-      fi
-    else
-      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
-    fi
-  else
-    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
-    cat conftest.$ac_ext >&5
-  fi
-  rm -f conftest* conftst*
-
-  # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
-    break
-  else
-    lt_cv_sys_global_symbol_pipe=
-  fi
-done
-])
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
-  lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-  AC_MSG_RESULT(failed)
-else
-  AC_MSG_RESULT(ok)
-fi
-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-
-
-# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
-# ---------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
-[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
-
-AC_MSG_CHECKING([for $compiler option to produce PIC])
- ifelse([$1],[CXX],[
-  # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
-    case $host_os in
-    aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-      ;;
-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-    mingw* | os2* | pw32*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
-      ;;
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-    *djgpp*)
-      # DJGPP does not support shared libraries at all
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-      ;;
-    interix3*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-    hpux*)
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       ;;
-      *)
-       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-       ;;
-      esac
-      ;;
-    *)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-  else
-    case $host_os in
-      aix4* | aix5*)
-       # All AIX code is PIC.
-       if test "$host_cpu" = ia64; then
-         # AIX 5 now supports IA64 processor
-         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-       else
-         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-       fi
-       ;;
-      chorus*)
-       case $cc_basename in
-       cxch68*)
-         # Green Hills C++ Compiler
-         # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
-         ;;
-       esac
-       ;;
-       darwin*)
-         # PIC is the default on this platform
-         # Common symbols not allowed in MH_DYLIB files
-         case $cc_basename in
-           xlc*)
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           ;;
-         esac
-       ;;
-      dgux*)
-       case $cc_basename in
-         ec++*)
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-           ;;
-         ghcx*)
-           # Green Hills C++ Compiler
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      freebsd* | kfreebsd*-gnu | dragonfly*)
-       # FreeBSD uses GNU C++
-       ;;
-      hpux9* | hpux10* | hpux11*)
-       case $cc_basename in
-         CC*)
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-           if test "$host_cpu" != ia64; then
-             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-           fi
-           ;;
-         aCC*)
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-           case $host_cpu in
-           hppa*64*|ia64*)
-             # +Z the default
-             ;;
-           *)
-             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-             ;;
-           esac
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      interix*)
-       # This is c89, which is MS Visual C++ (no shared libs)
-       # Anyone wants to do a port?
-       ;;
-      irix5* | irix6* | nonstopux*)
-       case $cc_basename in
-         CC*)
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-           # CC pic flag -KPIC is the default.
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      linux*)
-       case $cc_basename in
-         KCC*)
-           # KAI C++ Compiler
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-           ;;
-         icpc* | ecpc*)
-           # Intel C++
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
-           ;;
-         pgCC*)
-           # Portland Group C++ compiler.
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
-           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-           ;;
-         cxx*)
-           # Compaq C++
-           # Make sure the PIC flag is empty.  It appears that all Alpha
-           # Linux and Compaq Tru64 Unix objects are PIC.
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      lynxos*)
-       ;;
-      m88k*)
-       ;;
-      mvs*)
-       case $cc_basename in
-         cxx*)
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
-       ;;
-      osf3* | osf4* | osf5*)
-       case $cc_basename in
-         KCC*)
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-           ;;
-         RCC*)
-           # Rational C++ 2.4.1
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-           ;;
-         cxx*)
-           # Digital/Compaq C++
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           # Make sure the PIC flag is empty.  It appears that all Alpha
-           # Linux and Compaq Tru64 Unix objects are PIC.
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      psos*)
-       ;;
-      solaris*)
-       case $cc_basename in
-         CC*)
-           # Sun C++ 4.2, 5.x and Centerline C++
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-           ;;
-         gcx*)
-           # Green Hills C++ Compiler
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      sunos4*)
-       case $cc_basename in
-         CC*)
-           # Sun C++ 4.x
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-           ;;
-         lcc*)
-           # Lucid
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      tandem*)
-       case $cc_basename in
-         NCC*)
-           # NonStop-UX NCC 3.20
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-       case $cc_basename in
-         CC*)
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-           ;;
-       esac
-       ;;
-      vxworks*)
-       ;;
-      *)
-       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-       ;;
-    esac
-  fi
-],
-[
-  if test "$GCC" = yes; then
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-      ;;
-
-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
-      ;;
-
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-
-    interix3*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      enable_shared=no
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-
-    hpux*)
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       # +Z the default
-       ;;
-      *)
-       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-       ;;
-      esac
-      ;;
-
-    *)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      else
-       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-      darwin*)
-        # PIC is the default on this platform
-        # Common symbols not allowed in MH_DYLIB files
-       case $cc_basename in
-         xlc*)
-         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
-         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-         ;;
-       esac
-       ;;
-
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       # +Z the default
-       ;;
-      *)
-       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-       ;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # PIC (with -KPIC) is the default.
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    newsos6)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    linux*)
-      case $cc_basename in
-      icc* | ecc*)
-       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
-        ;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-       # which looks to be a dead project)
-       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
-       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-        ;;
-      ccc*)
-        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-        # All Alpha code is PIC.
-        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-        ;;
-      esac
-      ;;
-
-    osf3* | osf4* | osf5*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # All OSF/1 code is PIC.
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    solaris*)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95*)
-       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
-      *)
-       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
-      esac
-      ;;
-
-    sunos4*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
-       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    unicos*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      ;;
-
-    uts4*)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    *)
-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      ;;
-    esac
-  fi
-])
-AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
-  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
-    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
-    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
-    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
-     "" | " "*) ;;
-     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
-     esac],
-    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-    ;;
-  *)
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
-    ;;
-esac
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
-AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
-  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
-  $lt_tmp_static_flag,
-  [],
-  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
-])
-
-
-# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
-# ------------------------------------
-# See if the linker supports building shared libraries.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
-[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-ifelse([$1],[CXX],[
-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  case $host_os in
-  aix4* | aix5*)
-    # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-    else
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-    fi
-    ;;
-  pw32*)
-    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
-  ;;
-  cygwin* | mingw*)
-    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  kfreebsd*-gnu)
-    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
-  ;;
-  linux*)
-    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
-  ;;
-  *)
-    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  esac
-],[
-  runpath_var=
-  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
-  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-  _LT_AC_TAGVAR(archive_cmds, $1)=
-  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
-  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
-  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
-  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-  _LT_AC_TAGVAR(hardcode_direct, $1)=no
-  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
-  _LT_AC_TAGVAR(module_cmds, $1)=
-  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
-  _LT_AC_TAGVAR(always_export_symbols, $1)=no
-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  _LT_AC_TAGVAR(include_expsyms, $1)=
-  # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  extract_expsyms_cmds=
-  # Just being paranoid about ensuring that cc_basename is set.
-  _LT_CC_BASENAME([$compiler])
-  case $host_os in
-  cygwin* | mingw* | pw32*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-  esac
-
-  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
-  if test "$with_gnu_ld" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
-
-    # Set some defaults for GNU ld with shared library support. These
-    # are reset later if shared libraries are not supported. Putting them
-    # here allows them to be overridden if necessary.
-    runpath_var=LD_RUN_PATH
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
-       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-    supports_anon_versioning=no
-    case `$LD -v 2>/dev/null` in
-      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
-      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-      *\ 2.11.*) ;; # other 2.11 versions
-      *) supports_anon_versioning=yes ;;
-    esac
-
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix3* | aix4* | aix5*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       cat <<EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-EOF
-      fi
-      ;;
-
-    amigaos*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-
-      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we can't use
-      # them.
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-
-    beos*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-       # support --undefined.  This deserves some investigation.  FIXME
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-      # as there is no search path for DLLs.
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_AC_TAGVAR(always_export_symbols, $1)=no
-      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
-
-      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-       # If the export-symbols file already is a .def file (1st line
-       # is EXPORTS), use it as is; otherwise, prepend...
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname.def;
-       else
-         echo EXPORTS > $output_objdir/$soname.def;
-         cat $export_symbols >> $output_objdir/$soname.def;
-       fi~
-       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      else
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    interix3*)
-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-      # Instead, shared libraries are loaded at an image base (0x10000000 by
-      # default) and relocated if they conflict, which is a slow very memory
-      # consuming and fragmenting process.  To avoid this, we pick a random,
-      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      ;;
-
-    linux*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       tmp_addflag=
-       case $cc_basename,$host_cpu in
-       pgcc*)                          # Portland Group C compiler
-         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag'
-         ;;
-       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
-         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag -Mnomain' ;;
-       ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
-         tmp_addflag=' -i_dynamic' ;;
-       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
-         tmp_addflag=' -i_dynamic -nofor_main' ;;
-       ifc* | ifort*)                  # Intel Fortran compiler
-         tmp_addflag=' -nofor_main' ;;
-       esac
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
-       if test $supports_anon_versioning = yes; then
-         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
-  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-  $echo "local: *; };" >> $output_objdir/$libname.ver~
-         $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-       fi
-       _LT_AC_TAGVAR(link_all_deplibs, $1)=no
-      else
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-       wlarc=
-      else
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
-
-    solaris*)
-      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       cat <<EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-EOF
-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-       cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
-       ;;
-       *)
-         if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
-           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
-           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
-         else
-           _LT_AC_TAGVAR(ld_shlibs, $1)=no
-         fi
-       ;;
-      esac
-      ;;
-
-    sunos4*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-    esac
-
-    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
-      runpath_var=
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-       # Neither direct hardcoding nor static linking is supported with a
-       # broken collect2.
-       _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
-      fi
-      ;;
-
-    aix4* | aix5*)
-      if test "$host_cpu" = ia64; then
-       # On IA64, the linker does run time linking by default, so we don't
-       # have to do anything special.
-       aix_use_runtimelinking=no
-       exp_sym_flag='-Bexport'
-       no_entry_flag=""
-      else
-       # If we're using GNU nm, then we don't want the "-C" option.
-       # -C means demangle to AIX nm, but means don't demangle with GNU nm
-       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-         _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-       else
-         _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-       fi
-       aix_use_runtimelinking=no
-
-       # Test if we are trying to use run time linking or normal
-       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-       # need to do runtime linking.
-       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
-         for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-           aix_use_runtimelinking=yes
-           break
-         fi
-         done
-         ;;
-       esac
-
-       exp_sym_flag='-bexport'
-       no_entry_flag='-bnoentry'
-      fi
-
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-      _LT_AC_TAGVAR(archive_cmds, $1)=''
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-      if test "$GCC" = yes; then
-       case $host_os in aix4.[[012]]|aix4.[[012]].*)
-       # We only want to do this on AIX 4.2 and lower, the check
-       # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
-         if test -f "$collect2name" && \
-          strings "$collect2name" | grep resolve_lib_name >/dev/null
-         then
-         # We have reworked collect2
-         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-         else
-         # We have old collect2
-         _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
-         # It fails to find uninstalled libraries when the uninstalled
-         # path is not listed in the libpath.  Setting hardcode_minus_L
-         # to unsupported forces relinking
-         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-         fi
-         ;;
-       esac
-       shared_flag='-shared'
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag="$shared_flag "'${wl}-G'
-       fi
-      else
-       # not using gcc
-       if test "$host_cpu" = ia64; then
-       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-       # chokes on -Wl,-G. The following line is correct:
-         shared_flag='-G'
-       else
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag='${wl}-G'
-         else
-           shared_flag='${wl}-bM:SRE'
-         fi
-       fi
-      fi
-
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to export.
-      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-      if test "$aix_use_runtimelinking" = yes; then
-       # Warning - without using the other runtime loading flags (-brtl),
-       # -berok will link without error, but may produce a broken library.
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
-       # Determine the default libpath from the value encoded in an empty executable.
-       _LT_AC_SYS_LIBPATH_AIX
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-       else
-       if test "$host_cpu" = ia64; then
-         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-         _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-       else
-        # Determine the default libpath from the value encoded in an empty executable.
-        _LT_AC_SYS_LIBPATH_AIX
-        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-         # Warning - without using the other run time loading flags,
-         # -berok will link without error, but may produce a broken library.
-         _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-         # Exported symbols can be pulled into shared objects from archives
-         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
-         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-         # This is similar to how AIX traditionally builds its shared libraries.
-         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-       fi
-      fi
-      ;;
-
-    amigaos*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      # see comment about different semantics on the GNU ld section
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-
-    bsdi[[45]]*)
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
-      ;;
-
-    cygwin* | mingw* | pw32*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
-      # FIXME: Should let the user specify the lib program.
-      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
-      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
-      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      ;;
-
-    darwin* | rhapsody*)
-      case $host_os in
-        rhapsody* | darwin1.[[012]])
-         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[[012]])
-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-      esac
-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
-      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-    if test "$GCC" = yes ; then
-       output_verbose_link_cmd='echo'
-        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    else
-      case $cc_basename in
-        xlc*)
-         output_verbose_link_cmd='echo'
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          ;;
-       *)
-         _LT_AC_TAGVAR(ld_shlibs, $1)=no
-          ;;
-      esac
-    fi
-      ;;
-
-    dgux*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    freebsd1*)
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-      
-    # GNU/kFreeBSD uses gcc -shared to do shared libraries.
-    kfreebsd*-gnu)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=no
-      ;;
-
-    hpux9*)
-      if test "$GCC" = yes; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-       _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      ;;
-
-    hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-
-       # hardcode_minus_L: Not really in the search PATH,
-       # but as the default location of the library.
-       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      fi
-      ;;
-
-    hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       case $host_cpu in
-       hppa*64*)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      else
-       case $host_cpu in
-       hppa*64*)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      fi
-      if test "$with_gnu_ld" = no; then
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-       case $host_cpu in
-       hppa*64*|ia64*)
-         _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
-         _LT_AC_TAGVAR(hardcode_direct, $1)=no
-         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-         ;;
-       *)
-         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-
-         # hardcode_minus_L: Not really in the search PATH,
-         # but as the default location of the library.
-         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-         ;;
-       esac
-      fi
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
-
-    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    newsos6)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    openbsd*)
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      else
-       case $host_os in
-        openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
-          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-          ;;
-        *)
-          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-          ;;
-       esac
-      fi
-      ;;
-
-    os2*)
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
-
-    osf3*)
-      if test "$GCC" = yes; then
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
-
-    osf4* | osf5*)     # as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      else
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
-
-       # Both c and cxx compiler support -rpath directly
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
-
-    solaris*)
-      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
-      if test "$GCC" = yes; then
-       wlarc='${wl}'
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
-      else
-       wlarc=''
-       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-       $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      case $host_os in
-      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-      *)
-       # The compiler driver will combine linker options so we
-       # cannot just pass the convience library names through
-       # without $wl, iff we do not link with $LD.
-       # Luckily, gcc supports the same syntax we need for Sun Studio.
-       # Supported since Solaris 2.6 (maybe 2.5.1?)
-       case $wlarc in
-       '')
-         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
-       *)
-         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
-       esac ;;
-      esac
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
-
-    sunos4*)
-      if test "x$host_vendor" = xsequent; then
-       # Use $CC to link under sequent, because it throws in some extra .o
-       # files that make .init and .fini sections work.
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv4)
-      case $host_vendor in
-       sni)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
-       ;;
-       siemens)
-         ## LD is ld it makes a PLAMLIB
-         ## CC just makes a GrossModule.
-         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-         _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
-         _LT_AC_TAGVAR(hardcode_direct, $1)=no
-        ;;
-       motorola)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
-       ;;
-      esac
-      runpath_var='LD_RUN_PATH'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv4.3*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-       runpath_var=LD_RUN_PATH
-       hardcode_runpath_var=yes
-       _LT_AC_TAGVAR(ld_shlibs, $1)=yes
-      fi
-      ;;
-
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
-      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
-      # link with -lc, and that would cause any symbols used from libc to
-      # always be unresolved, which means just about no library would
-      # ever link correctly.  If we're not using GNU ld we use -z text
-      # though, which does catch some bad symbols but isn't as heavy-handed
-      # as -z defs.
-      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    uts4*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *)
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-    esac
-  fi
-])
-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
-x|xyes)
-  # Assume -lc should be added
-  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $_LT_AC_TAGVAR(archive_cmds, $1) in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
-      $rm conftest*
-      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
-       pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
-        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
-        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
-        then
-         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-        else
-         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-        fi
-        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $rm conftest*
-      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
-      ;;
-    esac
-  fi
-  ;;
-esac
-])# AC_LIBTOOL_PROG_LD_SHLIBS
-
-
-# _LT_AC_FILE_LTDLL_C
-# -------------------
-# Be careful that the start marker always follows a newline.
-AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# #  ifdef __CYGWIN32__
-# #    define __CYGWIN__ __CYGWIN32__
-# #  endif
-# #endif
-#
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
-#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-#   __hDllInstance_base = hInst;
-#   return TRUE;
-# }
-# /* ltdll.c ends here */
-])# _LT_AC_FILE_LTDLL_C
-
-
-# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
-# ---------------------------------
-AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
-
-
-# old names
-AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
-AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
-AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
-AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
-
-# This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])
-
-AC_DEFUN([LT_AC_PROG_GCJ],
-[AC_CHECK_TOOL(GCJ, gcj, no)
-  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
-  AC_SUBST(GCJFLAGS)
-])
-
-AC_DEFUN([LT_AC_PROG_RC],
-[AC_CHECK_TOOL(RC, windres, no)
-])
-
-# NOTE: This macro has been submitted for inclusion into   #
-#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
-#  a released version of Autoconf we should remove this    #
-#  macro and use it instead.                               #
-# LT_AC_PROG_SED
-# --------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible.  Prefer GNU sed if found.
-AC_DEFUN([LT_AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for lt_ac_prog in sed gsed; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
-        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
-      fi
-    done
-  done
-done
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
-  test ! -f $lt_ac_sed && continue
-  cat /dev/null > conftest.in
-  lt_ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
-  # Check for GNU sed and select it if it is found.
-  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
-    lt_cv_path_SED=$lt_ac_sed
-    break
-  fi
-  while true; do
-    cat conftest.in conftest.in >conftest.tmp
-    mv conftest.tmp conftest.in
-    cp conftest.in conftest.nl
-    echo >>conftest.nl
-    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
-    cmp -s conftest.out conftest.nl || break
-    # 10000 chars as input seems more than enough
-    test $lt_ac_count -gt 10 && break
-    lt_ac_count=`expr $lt_ac_count + 1`
-    if test $lt_ac_count -gt $lt_ac_max; then
-      lt_ac_max=$lt_ac_count
-      lt_cv_path_SED=$lt_ac_sed
-    fi
-  done
-done
-])
-SED=$lt_cv_path_SED
-AC_MSG_RESULT([$SED])
-])
-
diff --git a/source4/lib/json/arraylist.c b/source4/lib/json/arraylist.c
deleted file mode 100644 (file)
index dbd075d..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * $Id: arraylist.c,v 1.4 2006/01/26 02:16:28 mclark Exp $
- *
- * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
- * Michael Clark <michael@metaparadigm.com>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See COPYING for details.
- *
- */
-
-#include "config.h"
-
-#if STDC_HEADERS
-# include <stdlib.h>
-# include <string.h>
-#endif /* STDC_HEADERS */
-
-#if HAVE_STRINGS_H
-# include <strings.h>
-#endif /* HAVE_STRINGS_H */
-
-#include "bits.h"
-#include "arraylist.h"
-
-struct array_list*
-array_list_new(array_list_free_fn *free_fn)
-{
-  struct array_list *this;
-
-  if(!(this = calloc(1, sizeof(struct array_list)))) return NULL;
-  this->size = ARRAY_LIST_DEFAULT_SIZE;
-  this->length = 0;
-  this->free_fn = free_fn;
-  if(!(this->array = calloc(sizeof(void*), this->size))) {
-    free(this);
-    return NULL;
-  }
-  return this;
-}
-
-extern void
-array_list_free(struct array_list *this)
-{
-  int i;
-  for(i = 0; i < this->length; i++)
-    if(this->array[i]) this->free_fn(this->array[i]);
-  free(this->array);
-  free(this);
-}
-
-void*
-array_list_get_idx(struct array_list *this, int i)
-{
-  if(i >= this->length) return NULL;
-  return this->array[i];
-}
-
-static int array_list_expand_internal(struct array_list *this, int max)
-{
-  void *t;
-  int new_size;
-
-  if(max < this->size) return 0;
-  new_size = max(this->size << 1, max);
-  if(!(t = realloc(this->array, new_size*sizeof(void*)))) return -1;
-  this->array = t;
-  (void)memset(this->array + this->size, 0, (new_size-this->size)*sizeof(void*));
-  this->size = new_size;
-  return 0;
-}
-
-int
-array_list_put_idx(struct array_list *this, int idx, void *data)
-{
-  if(array_list_expand_internal(this, idx)) return -1;
-  if(this->array[idx]) this->free_fn(this->array[idx]);
-  this->array[idx] = data;
-  if(this->length <= idx) this->length = idx + 1;
-  return 0;
-}
-
-int
-array_list_add(struct array_list *this, void *data)
-{
-  return array_list_put_idx(this, this->length, data);
-}
-
-int
-array_list_length(struct array_list *this)
-{
-  return this->length;
-}
diff --git a/source4/lib/json/arraylist.h b/source4/lib/json/arraylist.h
deleted file mode 100644 (file)
index 2948e04..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * $Id: arraylist.h,v 1.4 2006/01/26 02:16:28 mclark Exp $
- *
- * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
- * Michael Clark <michael@metaparadigm.com>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See COPYING for details.
- *
- */
-
-#ifndef _arraylist_h_
-#define _arraylist_h_
-
-#define ARRAY_LIST_DEFAULT_SIZE 32
-
-typedef void (array_list_free_fn) (void *data);
-
-struct array_list
-{
-  void **array;
-  int length;
-  int size;
-  array_list_free_fn *free_fn;
-};
-
-extern struct array_list*
-array_list_new(array_list_free_fn *free_fn);
-
-extern void
-array_list_free(struct array_list *al);
-
-extern void*
-array_list_get_idx(struct array_list *al, int i);
-
-extern int
-array_list_put_idx(struct array_list *al, int i, void *data);
-
-extern int
-array_list_add(struct array_list *al, void *data);
-
-extern int
-array_list_length(struct array_list *al);
-
-#endif
diff --git a/source4/lib/json/autogen.sh b/source4/lib/json/autogen.sh
deleted file mode 100644 (file)
index c67b903..0000000
+++ /dev/null
@@ -1 +0,0 @@
-autoreconf -v --install || exit 1
diff --git a/source4/lib/json/bits.h b/source4/lib/json/bits.h
deleted file mode 100644 (file)
index 2c107cc..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * $Id: bits.h,v 1.10 2006/01/30 23:07:57 mclark Exp $
- *
- * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
- * Michael Clark <michael@metaparadigm.com>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See COPYING for details.
- *
- */
-
-#ifndef _bits_h_
-#define _bits_h_
-
-#ifndef min
-#define min(a,b) ((a) < (b) ? (a) : (b))
-#endif
-
-#ifndef max
-#define max(a,b) ((a) > (b) ? (a) : (b))
-#endif
-
-#define hexdigit(x) (((x) <= '9') ? (x) - '0' : ((x) & 7) + 9)
-#define error_ptr(error) ((void*)error)
-#define is_error(ptr) ((unsigned long)ptr > (unsigned long)-4000L)
-
-#endif
diff --git a/source4/lib/json/config.guess b/source4/lib/json/config.guess
deleted file mode 100755 (executable)
index dd7f713..0000000
+++ /dev/null
@@ -1,1464 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-
-timestamp='2005-04-22'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
-    --version | -v )
-       echo "$version" ; exit 0 ;;
-    --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )        # Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
-       for c in cc gcc c89 c99 ; do
-         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
-            CC_FOR_BUILD="$c"; break ;
-         fi ;
-       done ;
-       if test x"$CC_FOR_BUILD" = x ; then
-         CC_FOR_BUILD=no_compiler_found ;
-       fi
-       ;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-       PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-       # NetBSD (nbsd) targets should (where applicable) match one or
-       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-       # switched to ELF, *-*-netbsd* would select the old
-       # object file format.  This provides both forward
-       # compatibility and a consistent mechanism for selecting the
-       # object file format.
-       #
-       # Note: NetBSD doesn't particularly care about the vendor
-       # portion of the name.  We always set it to "unknown".
-       sysctl="sysctl -n hw.machine_arch"
-       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
-       case "${UNAME_MACHINE_ARCH}" in
-           armeb) machine=armeb-unknown ;;
-           arm*) machine=arm-unknown ;;
-           sh3el) machine=shl-unknown ;;
-           sh3eb) machine=sh-unknown ;;
-           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
-       esac
-       # The Operating System including object format, if it has switched
-       # to ELF recently, or will in the future.
-       case "${UNAME_MACHINE_ARCH}" in
-           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-               eval $set_cc_for_build
-               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-                       | grep __ELF__ >/dev/null
-               then
-                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-                   # Return netbsd for either.  FIX?
-                   os=netbsd
-               else
-                   os=netbsdelf
-               fi
-               ;;
-           *)
-               os=netbsd
-               ;;
-       esac
-       # The OS release
-       # Debian GNU/NetBSD machines have a different userland, and
-       # thus, need a distinct triplet. However, they do not need
-       # kernel version information, so it can be replaced with a
-       # suitable tag, in the style of linux-gnu.
-       case "${UNAME_VERSION}" in
-           Debian*)
-               release='-gnu'
-               ;;
-           *)
-               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-               ;;
-       esac
-       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-       # contains redundant information, the shorter form:
-       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-       echo "${machine}-${os}${release}"
-       exit 0 ;;
-    amd64:OpenBSD:*:*)
-       echo x86_64-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    amiga:OpenBSD:*:*)
-       echo m68k-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    cats:OpenBSD:*:*)
-       echo arm-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    hp300:OpenBSD:*:*)
-       echo m68k-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    luna88k:OpenBSD:*:*)
-       echo m88k-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    mac68k:OpenBSD:*:*)
-       echo m68k-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    macppc:OpenBSD:*:*)
-       echo powerpc-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    mvme68k:OpenBSD:*:*)
-       echo m68k-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    mvme88k:OpenBSD:*:*)
-       echo m88k-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    mvmeppc:OpenBSD:*:*)
-       echo powerpc-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    sgi:OpenBSD:*:*)
-       echo mips64-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    sun3:OpenBSD:*:*)
-       echo m68k-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    *:OpenBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    *:ekkoBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-       exit 0 ;;
-    macppc:MirBSD:*:*)
-       echo powerppc-unknown-mirbsd${UNAME_RELEASE}
-       exit 0 ;;
-    *:MirBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-       exit 0 ;;
-    alpha:OSF1:*:*)
-       case $UNAME_RELEASE in
-       *4.0)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-               ;;
-       *5.*)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-               ;;
-       esac
-       # According to Compaq, /usr/sbin/psrinfo has been available on
-       # OSF/1 and Tru64 systems produced since 1995.  I hope that
-       # covers most systems running today.  This code pipes the CPU
-       # types through head -n 1, so we only detect the type of CPU 0.
-       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-       case "$ALPHA_CPU_TYPE" in
-           "EV4 (21064)")
-               UNAME_MACHINE="alpha" ;;
-           "EV4.5 (21064)")
-               UNAME_MACHINE="alpha" ;;
-           "LCA4 (21066/21068)")
-               UNAME_MACHINE="alpha" ;;
-           "EV5 (21164)")
-               UNAME_MACHINE="alphaev5" ;;
-           "EV5.6 (21164A)")
-               UNAME_MACHINE="alphaev56" ;;
-           "EV5.6 (21164PC)")
-               UNAME_MACHINE="alphapca56" ;;
-           "EV5.7 (21164PC)")
-               UNAME_MACHINE="alphapca57" ;;
-           "EV6 (21264)")
-               UNAME_MACHINE="alphaev6" ;;
-           "EV6.7 (21264A)")
-               UNAME_MACHINE="alphaev67" ;;
-           "EV6.8CB (21264C)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.8AL (21264B)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.8CX (21264D)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.9A (21264/EV69A)")
-               UNAME_MACHINE="alphaev69" ;;
-           "EV7 (21364)")
-               UNAME_MACHINE="alphaev7" ;;
-           "EV7.9 (21364A)")
-               UNAME_MACHINE="alphaev79" ;;
-       esac
-       # A Pn.n version is a patched version.
-       # A Vn.n version is a released version.
-       # A Tn.n version is a released field test version.
-       # A Xn.n version is an unreleased experimental baselevel.
-       # 1.2 uses "1.2" for uname -r.
-       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-       exit 0 ;;
-    Alpha\ *:Windows_NT*:*)
-       # How do we know it's Interix rather than the generic POSIX subsystem?
-       # Should we change UNAME_MACHINE based on the output of uname instead
-       # of the specific Alpha model?
-       echo alpha-pc-interix
-       exit 0 ;;
-    21064:Windows_NT:50:3)
-       echo alpha-dec-winnt3.5
-       exit 0 ;;
-    Amiga*:UNIX_System_V:4.0:*)
-       echo m68k-unknown-sysv4
-       exit 0;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-       echo ${UNAME_MACHINE}-unknown-amigaos
-       exit 0 ;;
-    *:[Mm]orph[Oo][Ss]:*:*)
-       echo ${UNAME_MACHINE}-unknown-morphos
-       exit 0 ;;
-    *:OS/390:*:*)
-       echo i370-ibm-openedition
-       exit 0 ;;
-    *:z/VM:*:*)
-       echo s390-ibm-zvmoe
-       exit 0 ;;
-    *:OS400:*:*)
-        echo powerpc-ibm-os400
-       exit 0 ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-       echo arm-acorn-riscix${UNAME_RELEASE}
-       exit 0;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-       echo hppa1.1-hitachi-hiuxmpp
-       exit 0;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-       if test "`(/bin/universe) 2>/dev/null`" = att ; then
-               echo pyramid-pyramid-sysv3
-       else
-               echo pyramid-pyramid-bsd
-       fi
-       exit 0 ;;
-    NILE*:*:*:dcosx)
-       echo pyramid-pyramid-svr4
-       exit 0 ;;
-    DRS?6000:unix:4.0:6*)
-       echo sparc-icl-nx6
-       exit 0 ;;
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
-       case `/usr/bin/uname -p` in
-           sparc) echo sparc-icl-nx7 && exit 0 ;;
-       esac ;;
-    sun4H:SunOS:5.*:*)
-       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit 0 ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit 0 ;;
-    i86pc:SunOS:5.*:*)
-       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit 0 ;;
-    sun4*:SunOS:6*:*)
-       # According to config.sub, this is the proper way to canonicalize
-       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-       # it's likely to be more like Solaris than SunOS4.
-       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit 0 ;;
-    sun4*:SunOS:*:*)
-       case "`/usr/bin/arch -k`" in
-           Series*|S4*)
-               UNAME_RELEASE=`uname -v`
-               ;;
-       esac
-       # Japanese Language versions have a version number like `4.1.3-JL'.
-       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-       exit 0 ;;
-    sun3*:SunOS:*:*)
-       echo m68k-sun-sunos${UNAME_RELEASE}
-       exit 0 ;;
-    sun*:*:4.2BSD:*)
-       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-       case "`/bin/arch`" in
-           sun3)
-               echo m68k-sun-sunos${UNAME_RELEASE}
-               ;;
-           sun4)
-               echo sparc-sun-sunos${UNAME_RELEASE}
-               ;;
-       esac
-       exit 0 ;;
-    aushp:SunOS:*:*)
-       echo sparc-auspex-sunos${UNAME_RELEASE}
-       exit 0 ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-       exit 0 ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-       echo m68k-atari-mint${UNAME_RELEASE}
-        exit 0 ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-       exit 0 ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit 0 ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit 0 ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit 0 ;;
-    m68k:machten:*:*)
-       echo m68k-apple-machten${UNAME_RELEASE}
-       exit 0 ;;
-    powerpc:machten:*:*)
-       echo powerpc-apple-machten${UNAME_RELEASE}
-       exit 0 ;;
-    RISC*:Mach:*:*)
-       echo mips-dec-mach_bsd4.3
-       exit 0 ;;
-    RISC*:ULTRIX:*:*)
-       echo mips-dec-ultrix${UNAME_RELEASE}
-       exit 0 ;;
-    VAX*:ULTRIX*:*:*)
-       echo vax-dec-ultrix${UNAME_RELEASE}
-       exit 0 ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-       echo clipper-intergraph-clix${UNAME_RELEASE}
-       exit 0 ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-       int main (int argc, char *argv[]) {
-#else
-       int main (argc, argv) int argc; char *argv[]; {
-#endif
-       #if defined (host_mips) && defined (MIPSEB)
-       #if defined (SYSTYPE_SYSV)
-         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-       #endif
-       #if defined (SYSTYPE_SVR4)
-         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-       #endif
-       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-       #endif
-       #endif
-         exit (-1);
-       }
-EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c \
-         && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-         && exit 0
-       echo mips-mips-riscos${UNAME_RELEASE}
-       exit 0 ;;
-    Motorola:PowerMAX_OS:*:*)
-       echo powerpc-motorola-powermax
-       exit 0 ;;
-    Motorola:*:4.3:PL8-*)
-       echo powerpc-harris-powermax
-       exit 0 ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-       echo powerpc-harris-powermax
-       exit 0 ;;
-    Night_Hawk:Power_UNIX:*:*)
-       echo powerpc-harris-powerunix
-       exit 0 ;;
-    m88k:CX/UX:7*:*)
-       echo m88k-harris-cxux7
-       exit 0 ;;
-    m88k:*:4*:R4*)
-       echo m88k-motorola-sysv4
-       exit 0 ;;
-    m88k:*:3*:R3*)
-       echo m88k-motorola-sysv3
-       exit 0 ;;
-    AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
-       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-       then
-           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-              [ ${TARGET_BINARY_INTERFACE}x = x ]
-           then
-               echo m88k-dg-dgux${UNAME_RELEASE}
-           else
-               echo m88k-dg-dguxbcs${UNAME_RELEASE}
-           fi
-       else
-           echo i586-dg-dgux${UNAME_RELEASE}
-       fi
-       exit 0 ;;
-    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
-       echo m88k-dolphin-sysv3
-       exit 0 ;;
-    M88*:*:R3*:*)
-       # Delta 88k system running SVR3
-       echo m88k-motorola-sysv3
-       exit 0 ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-       echo m88k-tektronix-sysv3
-       exit 0 ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-       echo m68k-tektronix-bsd
-       exit 0 ;;
-    *:IRIX*:*:*)
-       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-       exit 0 ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-       echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
-       exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-       echo i386-ibm-aix
-       exit 0 ;;
-    ia64:AIX:*:*)
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
-       else
-               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-       fi
-       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-       exit 0 ;;
-    *:AIX:2:3)
-       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-               eval $set_cc_for_build
-               sed 's/^                //' << EOF >$dummy.c
-               #include <sys/systemcfg.h>
-
-               main()
-                       {
-                       if (!__power_pc())
-                               exit(1);
-                       puts("powerpc-ibm-aix3.2.5");
-                       exit(0);
-                       }
-EOF
-               $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
-               echo rs6000-ibm-aix3.2.5
-       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-               echo rs6000-ibm-aix3.2.4
-       else
-               echo rs6000-ibm-aix3.2
-       fi
-       exit 0 ;;
-    *:AIX:*:[45])
-       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-               IBM_ARCH=rs6000
-       else
-               IBM_ARCH=powerpc
-       fi
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
-       else
-               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-       fi
-       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-       exit 0 ;;
-    *:AIX:*:*)
-       echo rs6000-ibm-aix
-       exit 0 ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-       echo romp-ibm-bsd4.4
-       exit 0 ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-       exit 0 ;;                           # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-       echo rs6000-bull-bosx
-       exit 0 ;;
-    DPX/2?00:B.O.S.:*:*)
-       echo m68k-bull-sysv3
-       exit 0 ;;
-    9000/[34]??:4.3bsd:1.*:*)
-       echo m68k-hp-bsd
-       exit 0 ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-       echo m68k-hp-bsd4.4
-       exit 0 ;;
-    9000/[34678]??:HP-UX:*:*)
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-       case "${UNAME_MACHINE}" in
-           9000/31? )            HP_ARCH=m68000 ;;
-           9000/[34]?? )         HP_ARCH=m68k ;;
-           9000/[678][0-9][0-9])
-               if [ -x /usr/bin/getconf ]; then
-                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
-                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
-               fi
-               if [ "${HP_ARCH}" = "" ]; then
-                   eval $set_cc_for_build
-                   sed 's/^              //' << EOF >$dummy.c
-
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
-
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
-
-                  switch (cpu)
-               {
-               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-               case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-                   switch (bits)
-                       {
-                       case 64: puts ("hppa2.0w"); break;
-                       case 32: puts ("hppa2.0n"); break;
-                       default: puts ("hppa2.0"); break;
-                       } break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-                   puts ("hppa2.0"); break;
-              #endif
-               default: puts ("hppa1.0"); break;
-               }
-                  exit (0);
-              }
-EOF
-                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-                   test -z "$HP_ARCH" && HP_ARCH=hppa
-               fi ;;
-       esac
-       if [ ${HP_ARCH} = "hppa2.0w" ]
-       then
-           # avoid double evaluation of $set_cc_for_build
-           test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
-           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
-           then
-               HP_ARCH="hppa2.0w"
-           else
-               HP_ARCH="hppa64"
-           fi
-       fi
-       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-       exit 0 ;;
-    ia64:HP-UX:*:*)
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-       echo ia64-hp-hpux${HPUX_REV}
-       exit 0 ;;
-    3050*:HI-UX:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <unistd.h>
-       int
-       main ()
-       {
-         long cpu = sysconf (_SC_CPU_VERSION);
-         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-            results, however.  */
-         if (CPU_IS_PA_RISC (cpu))
-           {
-             switch (cpu)
-               {
-                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-                 default: puts ("hppa-hitachi-hiuxwe2"); break;
-               }
-           }
-         else if (CPU_IS_HP_MC68K (cpu))
-           puts ("m68k-hitachi-hiuxwe2");
-         else puts ("unknown-hitachi-hiuxwe2");
-         exit (0);
-       }
-EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
-       echo unknown-hitachi-hiuxwe2
-       exit 0 ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-       echo hppa1.1-hp-bsd
-       exit 0 ;;
-    9000/8??:4.3bsd:*:*)
-       echo hppa1.0-hp-bsd
-       exit 0 ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-       echo hppa1.0-hp-mpeix
-       exit 0 ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-       echo hppa1.1-hp-osf
-       exit 0 ;;
-    hp8??:OSF1:*:*)
-       echo hppa1.0-hp-osf
-       exit 0 ;;
-    i*86:OSF1:*:*)
-       if [ -x /usr/sbin/sysversion ] ; then
-           echo ${UNAME_MACHINE}-unknown-osf1mk
-       else
-           echo ${UNAME_MACHINE}-unknown-osf1
-       fi
-       exit 0 ;;
-    parisc*:Lites*:*:*)
-       echo hppa1.1-hp-lites
-       exit 0 ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-       echo c1-convex-bsd
-        exit 0 ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-        exit 0 ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-       echo c34-convex-bsd
-        exit 0 ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-       echo c38-convex-bsd
-        exit 0 ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-       echo c4-convex-bsd
-        exit 0 ;;
-    CRAY*Y-MP:*:*:*)
-       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit 0 ;;
-    CRAY*[A-Z]90:*:*:*)
-       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-             -e 's/\.[^.]*$/.X/'
-       exit 0 ;;
-    CRAY*TS:*:*:*)
-       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit 0 ;;
-    CRAY*T3E:*:*:*)
-       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit 0 ;;
-    CRAY*SV1:*:*:*)
-       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit 0 ;;
-    *:UNICOS/mp:*:*)
-       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit 0 ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit 0 ;;
-    5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-       exit 0 ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-       exit 0 ;;
-    sparc*:BSD/OS:*:*)
-       echo sparc-unknown-bsdi${UNAME_RELEASE}
-       exit 0 ;;
-    *:BSD/OS:*:*)
-       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-       exit 0 ;;
-    *:FreeBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-       exit 0 ;;
-    i*:CYGWIN*:*)
-       echo ${UNAME_MACHINE}-pc-cygwin
-       exit 0 ;;
-    i*:MINGW*:*)
-       echo ${UNAME_MACHINE}-pc-mingw32
-       exit 0 ;;
-    i*:PW*:*)
-       echo ${UNAME_MACHINE}-pc-pw32
-       exit 0 ;;
-    x86:Interix*:[34]*)
-       echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
-       exit 0 ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-       echo i${UNAME_MACHINE}-pc-mks
-       exit 0 ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-       # How do we know it's Interix rather than the generic POSIX subsystem?
-       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-       # UNAME_MACHINE based on the output of uname instead of i386?
-       echo i586-pc-interix
-       exit 0 ;;
-    i*:UWIN*:*)
-       echo ${UNAME_MACHINE}-pc-uwin
-       exit 0 ;;
-    amd64:CYGWIN*:*:*)
-       echo x86_64-unknown-cygwin
-       exit 0 ;;
-    p*:CYGWIN*:*)
-       echo powerpcle-unknown-cygwin
-       exit 0 ;;
-    prep*:SunOS:5.*:*)
-       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit 0 ;;
-    *:GNU:*:*)
-       # the GNU system
-       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-       exit 0 ;;
-    *:GNU/*:*:*)
-       # other systems with GNU libc and userland
-       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-       exit 0 ;;
-    i*86:Minix:*:*)
-       echo ${UNAME_MACHINE}-pc-minix
-       exit 0 ;;
-    arm*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit 0 ;;
-    cris:Linux:*:*)
-       echo cris-axis-linux-gnu
-       exit 0 ;;
-    crisv32:Linux:*:*)
-       echo crisv32-axis-linux-gnu
-       exit 0 ;;
-    frv:Linux:*:*)
-       echo frv-unknown-linux-gnu
-       exit 0 ;;
-    ia64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit 0 ;;
-    m32r*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit 0 ;;
-    m68*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit 0 ;;
-    mips:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips
-       #undef mipsel
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mipsel
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-       test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
-       ;;
-    mips64:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips64
-       #undef mips64el
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mips64el
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips64
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-       test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
-       ;;
-    ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
-       exit 0 ;;
-    ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
-       exit 0 ;;
-    alpha:Linux:*:*)
-       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-         EV5)   UNAME_MACHINE=alphaev5 ;;
-         EV56)  UNAME_MACHINE=alphaev56 ;;
-         PCA56) UNAME_MACHINE=alphapca56 ;;
-         PCA57) UNAME_MACHINE=alphapca56 ;;
-         EV6)   UNAME_MACHINE=alphaev6 ;;
-         EV67)  UNAME_MACHINE=alphaev67 ;;
-         EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-       exit 0 ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-       # Look for CPU level
-       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-         PA7*) echo hppa1.1-unknown-linux-gnu ;;
-         PA8*) echo hppa2.0-unknown-linux-gnu ;;
-         *)    echo hppa-unknown-linux-gnu ;;
-       esac
-       exit 0 ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
-       exit 0 ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-       echo ${UNAME_MACHINE}-ibm-linux
-       exit 0 ;;
-    sh64*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit 0 ;;
-    sh*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit 0 ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit 0 ;;
-    x86_64:Linux:*:*)
-       echo x86_64-unknown-linux-gnu
-       exit 0 ;;
-    i*86:Linux:*:*)
-       # The BFD linker knows what the default object file format is, so
-       # first see if it will tell us. cd to the root directory to prevent
-       # problems with other programs or directories called `ld' in the path.
-       # Set LC_ALL=C to ensure ld outputs messages in English.
-       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-                        | sed -ne '/supported targets:/!d
-                                   s/[         ][      ]*/ /g
-                                   s/.*supported targets: *//
-                                   s/ .*//
-                                   p'`
-        case "$ld_supported_targets" in
-         elf32-i386)
-               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-               ;;
-         a.out-i386-linux)
-               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-               exit 0 ;;
-         coff-i386)
-               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-               exit 0 ;;
-         "")
-               # Either a pre-BFD a.out linker (linux-gnuoldld) or
-               # one that does not give us useful --help.
-               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-               exit 0 ;;
-       esac
-       # Determine whether the default compiler is a.out or elf
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <features.h>
-       #ifdef __ELF__
-       # ifdef __GLIBC__
-       #  if __GLIBC__ >= 2
-       LIBC=gnu
-       #  else
-       LIBC=gnulibc1
-       #  endif
-       # else
-       LIBC=gnulibc1
-       # endif
-       #else
-       #ifdef __INTEL_COMPILER
-       LIBC=gnu
-       #else
-       LIBC=gnuaout
-       #endif
-       #endif
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-       test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
-       test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
-       ;;
-    i*86:DYNIX/ptx:4*:*)
-       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-       # earlier versions are messed up and put the nodename in both
-       # sysname and nodename.
-       echo i386-sequent-sysv4
-       exit 0 ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
-       # I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
-       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-       exit 0 ;;
-    i*86:OS/2:*:*)
-       # If we were able to find `uname', then EMX Unix compatibility
-       # is probably installed.
-       echo ${UNAME_MACHINE}-pc-os2-emx
-       exit 0 ;;
-    i*86:XTS-300:*:STOP)
-       echo ${UNAME_MACHINE}-unknown-stop
-       exit 0 ;;
-    i*86:atheos:*:*)
-       echo ${UNAME_MACHINE}-unknown-atheos
-       exit 0 ;;
-       i*86:syllable:*:*)
-       echo ${UNAME_MACHINE}-pc-syllable
-       exit 0 ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-       echo i386-unknown-lynxos${UNAME_RELEASE}
-       exit 0 ;;
-    i*86:*DOS:*:*)
-       echo ${UNAME_MACHINE}-pc-msdosdjgpp
-       exit 0 ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-       else
-               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-       fi
-       exit 0 ;;
-    i*86:*:5:[78]*)
-       case `/bin/uname -X | grep "^Machine"` in
-           *486*)           UNAME_MACHINE=i486 ;;
-           *Pentium)        UNAME_MACHINE=i586 ;;
-           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-       esac
-       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-       exit 0 ;;
-    i*86:*:3.2:*)
-       if test -f /usr/options/cb.name; then
-               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-       elif /bin/uname -X 2>/dev/null >/dev/null ; then
-               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
-               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
-               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
-                       && UNAME_MACHINE=i586
-               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
-                       && UNAME_MACHINE=i686
-               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
-                       && UNAME_MACHINE=i686
-               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-       else
-               echo ${UNAME_MACHINE}-pc-sysv32
-       fi
-       exit 0 ;;
-    pc:*:*:*)
-       # Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-       echo i386-pc-msdosdjgpp
-        exit 0 ;;
-    Intel:Mach:3*:*)
-       echo i386-pc-mach3
-       exit 0 ;;
-    paragon:*:*:*)
-       echo i860-intel-osf1
-       exit 0 ;;
-    i860:*:4.*:*) # i860-SVR4
-       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-       else # Add other i860-SVR4 vendors below as they are discovered.
-         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-       fi
-       exit 0 ;;
-    mini*:CTIX:SYS*5:*)
-       # "miniframe"
-       echo m68010-convergent-sysv
-       exit 0 ;;
-    mc68k:UNIX:SYSTEM5:3.51m)
-       echo m68k-convergent-sysv
-       exit 0 ;;
-    M680?0:D-NIX:5.3:*)
-       echo m68k-diab-dnix
-       exit 0 ;;
-    M68*:*:R3V[5678]*:*)
-       test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
-       OS_REL=''
-       test -r /etc/.relid \
-       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-         && echo i486-ncr-sysv4.3${OS_REL} && exit 0
-       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-         && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && echo i486-ncr-sysv4 && exit 0 ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-       echo m68k-unknown-lynxos${UNAME_RELEASE}
-       exit 0 ;;
-    mc68030:UNIX_System_V:4.*:*)
-       echo m68k-atari-sysv4
-       exit 0 ;;
-    TSUNAMI:LynxOS:2.*:*)
-       echo sparc-unknown-lynxos${UNAME_RELEASE}
-       exit 0 ;;
-    rs6000:LynxOS:2.*:*)
-       echo rs6000-unknown-lynxos${UNAME_RELEASE}
-       exit 0 ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
-       echo powerpc-unknown-lynxos${UNAME_RELEASE}
-       exit 0 ;;
-    SM[BE]S:UNIX_SV:*:*)
-       echo mips-dde-sysv${UNAME_RELEASE}
-       exit 0 ;;
-    RM*:ReliantUNIX-*:*:*)
-       echo mips-sni-sysv4
-       exit 0 ;;
-    RM*:SINIX-*:*:*)
-       echo mips-sni-sysv4
-       exit 0 ;;
-    *:SINIX-*:*:*)
-       if uname -p 2>/dev/null >/dev/null ; then
-               UNAME_MACHINE=`(uname -p) 2>/dev/null`
-               echo ${UNAME_MACHINE}-sni-sysv4
-       else
-               echo ns32k-sni-sysv
-       fi
-       exit 0 ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit 0 ;;
-    *:UNIX_System_V:4*:FTX*)
-       # From Gerald Hewes <hewes@openmarket.com>.
-       # How about differentiating between stratus architectures? -djm
-       echo hppa1.1-stratus-sysv4
-       exit 0 ;;
-    *:*:*:FTX*)
-       # From seanf@swdc.stratus.com.
-       echo i860-stratus-sysv4
-       exit 0 ;;
-    i*86:VOS:*:*)
-       # From Paul.Green@stratus.com.
-       echo ${UNAME_MACHINE}-stratus-vos
-       exit 0 ;;
-    *:VOS:*:*)
-       # From Paul.Green@stratus.com.
-       echo hppa1.1-stratus-vos
-       exit 0 ;;
-    mc68*:A/UX:*:*)
-       echo m68k-apple-aux${UNAME_RELEASE}
-       exit 0 ;;
-    news*:NEWS-OS:6*:*)
-       echo mips-sony-newsos6
-       exit 0 ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-       if [ -d /usr/nec ]; then
-               echo mips-nec-sysv${UNAME_RELEASE}
-       else
-               echo mips-unknown-sysv${UNAME_RELEASE}
-       fi
-        exit 0 ;;
-    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
-       echo powerpc-be-beos
-       exit 0 ;;
-    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
-       echo powerpc-apple-beos
-       exit 0 ;;
-    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
-       echo i586-pc-beos
-       exit 0 ;;
-    SX-4:SUPER-UX:*:*)
-       echo sx4-nec-superux${UNAME_RELEASE}
-       exit 0 ;;
-    SX-5:SUPER-UX:*:*)
-       echo sx5-nec-superux${UNAME_RELEASE}
-       exit 0 ;;
-    SX-6:SUPER-UX:*:*)
-       echo sx6-nec-superux${UNAME_RELEASE}
-       exit 0 ;;
-    Power*:Rhapsody:*:*)
-       echo powerpc-apple-rhapsody${UNAME_RELEASE}
-       exit 0 ;;
-    *:Rhapsody:*:*)
-       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-       exit 0 ;;
-    *:Darwin:*:*)
-       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-       case $UNAME_PROCESSOR in
-           *86) UNAME_PROCESSOR=i686 ;;
-           unknown) UNAME_PROCESSOR=powerpc ;;
-       esac
-       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-       exit 0 ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-       UNAME_PROCESSOR=`uname -p`
-       if test "$UNAME_PROCESSOR" = "x86"; then
-               UNAME_PROCESSOR=i386
-               UNAME_MACHINE=pc
-       fi
-       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-       exit 0 ;;
-    *:QNX:*:4*)
-       echo i386-pc-qnx
-       exit 0 ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
-       echo nse-tandem-nsk${UNAME_RELEASE}
-       exit 0 ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
-       echo nsr-tandem-nsk${UNAME_RELEASE}
-       exit 0 ;;
-    *:NonStop-UX:*:*)
-       echo mips-compaq-nonstopux
-       exit 0 ;;
-    BS2000:POSIX*:*:*)
-       echo bs2000-siemens-sysv
-       exit 0 ;;
-    DS/*:UNIX_System_V:*:*)
-       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-       exit 0 ;;
-    *:Plan9:*:*)
-       # "uname -m" is not consistent, so use $cputype instead. 386
-       # is converted to i386 for consistency with other x86
-       # operating systems.
-       if test "$cputype" = "386"; then
-           UNAME_MACHINE=i386
-       else
-           UNAME_MACHINE="$cputype"
-       fi
-       echo ${UNAME_MACHINE}-unknown-plan9
-       exit 0 ;;
-    *:TOPS-10:*:*)
-       echo pdp10-unknown-tops10
-       exit 0 ;;
-    *:TENEX:*:*)
-       echo pdp10-unknown-tenex
-       exit 0 ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-       echo pdp10-dec-tops20
-       exit 0 ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-       echo pdp10-xkl-tops20
-       exit 0 ;;
-    *:TOPS-20:*:*)
-       echo pdp10-unknown-tops20
-       exit 0 ;;
-    *:ITS:*:*)
-       echo pdp10-unknown-its
-       exit 0 ;;
-    SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
-       exit 0 ;;
-    *:DragonFly:*:*)
-       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-       exit 0 ;;
-    *:*VMS:*:*)
-       UNAME_MACHINE=`(uname -p) 2>/dev/null`
-       case "${UNAME_MACHINE}" in
-           A*) echo alpha-dec-vms && exit 0 ;;
-           I*) echo ia64-dec-vms && exit 0 ;;
-           V*) echo vax-dec-vms && exit 0 ;;
-       esac ;;
-    *:XENIX:*:SysV)
-       echo i386-pc-xenix
-       exit 0 ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-          "4"
-#else
-         ""
-#endif
-         ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-       printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-       printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-       echo c1-convex-bsd
-       exit 0 ;;
-    c2*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-       exit 0 ;;
-    c34*)
-       echo c34-convex-bsd
-       exit 0 ;;
-    c38*)
-       echo c38-convex-bsd
-       exit 0 ;;
-    c4*)
-       echo c4-convex-bsd
-       exit 0 ;;
-    esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
-and
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/source4/lib/json/config.h.in b/source4/lib/json/config.h.in
deleted file mode 100644 (file)
index 83ab797..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/* config.h.in.  Generated from configure.in by autoheader.  */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
-#undef HAVE_DOPRNT
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
-   to 0 otherwise. */
-#undef HAVE_MALLOC
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the `open' function. */
-#undef HAVE_OPEN
-
-/* Define to 1 if your system has a GNU libc compatible `realloc' function,
-   and to 0 otherwise. */
-#undef HAVE_REALLOC
-
-/* Define to 1 if you have the <stdarg.h> header file. */
-#undef HAVE_STDARG_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the `strerror' function. */
-#undef HAVE_STRERROR
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the `strncasecmp' function. */
-#undef HAVE_STRNCASECMP
-
-/* Define to 1 if you have the `strndup' function. */
-#undef HAVE_STRNDUP
-
-/* Define to 1 if you have the <syslog.h> header file. */
-#undef HAVE_SYSLOG_H
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the `vasprintf' function. */
-#undef HAVE_VASPRINTF
-
-/* Define to 1 if you have the `vprintf' function. */
-#undef HAVE_VPRINTF
-
-/* Define to 1 if you have the `vsnprintf' function. */
-#undef HAVE_VSNPRINTF
-
-/* Define to 1 if you have the `vsyslog' function. */
-#undef HAVE_VSYSLOG
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Version number of package */
-#undef VERSION
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to rpl_malloc if the replacement function should be used. */
-#undef malloc
-
-/* Define to rpl_realloc if the replacement function should be used. */
-#undef realloc
-
-/* Define to `unsigned' if <sys/types.h> does not define. */
-#undef size_t
diff --git a/source4/lib/json/config.h.win32 b/source4/lib/json/config.h.win32
deleted file mode 100644 (file)
index 7f7e6ae..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * $Id: config.h.win32,v 1.2 2006/01/26 02:16:28 mclark Exp $
- *
- * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
- * Michael Clark <michael@metaparadigm.com>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See COPYING for details.
- *
- */
-
-/* config.h.win32  Generated by configure.  */
-
-#define PACKAGE_STRING "JSON C Library 0.2"
-#define PACKAGE_BUGREPORT "michael@metaparadigm.com"
-#define PACKAGE_NAME "JSON C Library"
-#define PACKAGE_TARNAME "json-c"
-#define PACKAGE_VERSION "0.2"
-\r
-/* config.h.in.  Generated from configure.ac by autoheader.  */\r
-\r
-/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */\r
-/* #undef HAVE_DOPRNT */\r
-\r
-/* Define to 1 if you have the <fcntl.h> header file. */\r
-#define HAVE_FCNTL_H 1\r
-\r
-/* Define to 1 if you have the <inttypes.h> header file. */\r
-#define HAVE_INTTYPES_H 1\r
-\r
-/* Define to 1 if you have the <limits.h> header file. */\r
-#define HAVE_LIMITS_H 1\r
-\r
-/* Define to 1 if your system has a GNU libc compatible `malloc' function, and\r
-   to 0 otherwise. */\r
-#define HAVE_MALLOC 1\r
-\r
-/* Define to 1 if you have the <memory.h> header file. */\r
-#define HAVE_MEMORY_H 1\r
-\r
-/* Define to 1 if you have the `open' function. */\r
-#undef HAVE_OPEN\r
-\r
-/* Define to 1 if your system has a GNU libc compatible `realloc' function,\r
-   and to 0 otherwise. */\r
-#define HAVE_REALLOC 1
-
-/* Define to 1 if you have the <stdint.h> header file. */\r
-#define HAVE_STDINT_H 1\r
-\r
-/* Define to 1 if you have the <stdlib.h> header file. */\r
-#define HAVE_STDLIB_H 1\r
-\r
-/* Define to 1 if you have the `strdup' function. */\r
-#undef HAVE_STRNDUP\r
-\r
-/* Define to 1 if you have the <stdarg.h> header file. */\r
-#define HAVE_STDARG_H 1\r
-\r
-/* Define to 1 if you have the `strerror' function. */\r
-#define HAVE_STRERROR 1\r
-\r
-/* Define to 1 if you have the <strings.h> header file. */\r
-#undef HAVE_STRINGS_H\r
-\r
-/* Define to 1 if you have the <string.h> header file. */\r
-#define HAVE_STRING_H 1\r
-\r
-/* Define to 1 if you have the <syslog.h> header file. */\r
-#undef HAVE_SYSLOG_H\r
-\r
-/* Define to 1 if you have the <sys/param.h> header file. */\r
-#undef HAVE_SYS_PARAM_H\r
-\r
-/* Define to 1 if you have the <sys/stat.h> header file. */\r
-#define HAVE_SYS_STAT_H 1\r
-\r
-/* Define to 1 if you have the <sys/types.h> header file. */\r
-#define HAVE_SYS_TYPES_H 1\r
-\r
-/* Define to 1 if you have the <unistd.h> header file. */\r
-#undef HAVE_UNISTD_H\r
-\r
-/* Define to 1 if you have the `vprintf' function. */\r
-#undef HAVE_VPRINTF\r
-\r
-/* Define to 1 if you have the `vsyslog' function. */\r
-#undef HAVE_VSYSLOG\r
-\r
-/* Define to 1 if you have the `strncasecmp' function. */\r
-#undef HAVE_STRNCASECMP\r
-\r
-/* Define to 1 if you have the ANSI C header files. */\r
-#define STDC_HEADERS 1
diff --git a/source4/lib/json/config.sub b/source4/lib/json/config.sub
deleted file mode 100755 (executable)
index aa620b5..0000000
+++ /dev/null
@@ -1,1568 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-
-timestamp='2007-07-10'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
-    --version | -v )
-       echo "$version" ; exit 0 ;;
-    --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )        # Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help"
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo $1
-       exit 0;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
-  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-       -sun*os*)
-               # Prevent following clause from handling this invalid input.
-               ;;
-       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis | -knuth | -cray)
-               os=
-               basic_machine=$1
-               ;;
-       -sim | -cisco | -oki | -wec | -winbond)
-               os=
-               basic_machine=$1
-               ;;
-       -scout)
-               ;;
-       -wrs)
-               os=-vxworks
-               basic_machine=$1
-               ;;
-       -chorusos*)
-               os=-chorusos
-               basic_machine=$1
-               ;;
-       -chorusrdb)
-               os=-chorusrdb
-               basic_machine=$1
-               ;;
-       -hiux*)
-               os=-hiuxwe2
-               ;;
-       -sco5)
-               os=-sco3.2v5
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco4)
-               os=-sco3.2v4
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco3.2.[4-9]*)
-               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco3.2v[4-9]*)
-               # Don't forget version if it is 3.2v4 or newer.
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco*)
-               os=-sco3.2v2
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -udk*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -isc)
-               os=-isc2.2
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -clix*)
-               basic_machine=clipper-intergraph
-               ;;
-       -isc*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -lynx*)
-               os=-lynxos
-               ;;
-       -ptx*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-               ;;
-       -windowsnt*)
-               os=`echo $os | sed -e 's/windowsnt/winnt/'`
-               ;;
-       -psos*)
-               os=-psos
-               ;;
-       -mint | -mint[0-9]*)
-               basic_machine=m68k-atari
-               os=-mint
-               ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-       # Recognize the basic CPU types without company name.
-       # Some are omitted here because they have special meanings below.
-       1750a | 580 \
-       | a29k \
-       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-       | am33_2.0 \
-       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
-       | bfin \
-       | c4x | clipper \
-       | d10v | d30v | dlx | dsp16xx \
-       | fr30 | frv \
-       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-       | i370 | i860 | i960 | ia64 \
-       | ip2k | iq2000 \
-       | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
-       | mips | mipsbe | mipseb | mipsel | mipsle \
-       | mips16 \
-       | mips64 | mips64el \
-       | mips64vr | mips64vrel \
-       | mips64orion | mips64orionel \
-       | mips64vr4100 | mips64vr4100el \
-       | mips64vr4300 | mips64vr4300el \
-       | mips64vr5000 | mips64vr5000el \
-       | mipsisa32 | mipsisa32el \
-       | mipsisa32r2 | mipsisa32r2el \
-       | mipsisa64 | mipsisa64el \
-       | mipsisa64r2 | mipsisa64r2el \
-       | mipsisa64sb1 | mipsisa64sb1el \
-       | mipsisa64sr71k | mipsisa64sr71kel \
-       | mipstx39 | mipstx39el \
-       | mn10200 | mn10300 \
-       | msp430 \
-       | ns16k | ns32k \
-       | openrisc | or32 \
-       | pdp10 | pdp11 | pj | pjl \
-       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
-       | pyramid \
-       | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
-       | sh64 | sh64le \
-       | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
-       | sparcv8 | sparcv9 | sparcv9b \
-       | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
-       | v850 | v850e \
-       | we32k \
-       | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
-       | z8k)
-               basic_machine=$basic_machine-unknown
-               ;;
-       m6811 | m68hc11 | m6812 | m68hc12)
-               # Motorola 68HC11/12.
-               basic_machine=$basic_machine-unknown
-               os=-none
-               ;;
-       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-               ;;
-
-       # We use `pc' rather than `unknown'
-       # because (1) that's what they normally are, and
-       # (2) the word "unknown" tends to confuse beginning users.
-       i*86 | x86_64)
-         basic_machine=$basic_machine-pc
-         ;;
-       # Object if more than one company name word.
-       *-*-*)
-               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-               exit 1
-               ;;
-       # Recognize the basic CPU types with company name.
-       580-* \
-       | a29k-* \
-       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-       | avr-* \
-       | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-       | clipper-* | craynv-* | cydra-* \
-       | d10v-* | d30v-* | dlx-* \
-       | elxsi-* \
-       | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
-       | h8300-* | h8500-* \
-       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-       | i*86-* | i860-* | i960-* | ia64-* \
-       | ip2k-* | iq2000-* \
-       | m32r-* | m32rle-* \
-       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* \
-       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-       | mips16-* \
-       | mips64-* | mips64el-* \
-       | mips64vr-* | mips64vrel-* \
-       | mips64orion-* | mips64orionel-* \
-       | mips64vr4100-* | mips64vr4100el-* \
-       | mips64vr4300-* | mips64vr4300el-* \
-       | mips64vr5000-* | mips64vr5000el-* \
-       | mipsisa32-* | mipsisa32el-* \
-       | mipsisa32r2-* | mipsisa32r2el-* \
-       | mipsisa64-* | mipsisa64el-* \
-       | mipsisa64r2-* | mipsisa64r2el-* \
-       | mipsisa64sb1-* | mipsisa64sb1el-* \
-       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
-       | mipstx39-* | mipstx39el-* \
-       | mmix-* \
-       | msp430-* \
-       | none-* | np1-* | ns16k-* | ns32k-* \
-       | orion-* \
-       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
-       | pyramid-* \
-       | romp-* | rs6000-* \
-       | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
-       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-       | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
-       | sparclite-* \
-       | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
-       | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-       | tron-* \
-       | v850-* | v850e-* | vax-* \
-       | we32k-* \
-       | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
-       | xstormy16-* | xtensa-* \
-       | ymp-* \
-       | z8k-*)
-               ;;
-       # Recognize the various machine names and aliases which stand
-       # for a CPU type and a company and sometimes even an OS.
-       386bsd)
-               basic_machine=i386-unknown
-               os=-bsd
-               ;;
-       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-               basic_machine=m68000-att
-               ;;
-       3b*)
-               basic_machine=we32k-att
-               ;;
-       a29khif)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       abacus)
-               basic_machine=abacus-unknown
-               ;;
-       adobe68k)
-               basic_machine=m68010-adobe
-               os=-scout
-               ;;
-       alliant | fx80)
-               basic_machine=fx80-alliant
-               ;;
-       altos | altos3068)
-               basic_machine=m68k-altos
-               ;;
-       am29k)
-               basic_machine=a29k-none
-               os=-bsd
-               ;;
-       amd64)
-               basic_machine=x86_64-pc
-               ;;
-       amd64-*)
-               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       amdahl)
-               basic_machine=580-amdahl
-               os=-sysv
-               ;;
-       amiga | amiga-*)
-               basic_machine=m68k-unknown
-               ;;
-       amigaos | amigados)
-               basic_machine=m68k-unknown
-               os=-amigaos
-               ;;
-       amigaunix | amix)
-               basic_machine=m68k-unknown
-               os=-sysv4
-               ;;
-       apollo68)
-               basic_machine=m68k-apollo
-               os=-sysv
-               ;;
-       apollo68bsd)
-               basic_machine=m68k-apollo
-               os=-bsd
-               ;;
-       aux)
-               basic_machine=m68k-apple
-               os=-aux
-               ;;
-       balance)
-               basic_machine=ns32k-sequent
-               os=-dynix
-               ;;
-       c90)
-               basic_machine=c90-cray
-               os=-unicos
-               ;;
-       convex-c1)
-               basic_machine=c1-convex
-               os=-bsd
-               ;;
-       convex-c2)
-               basic_machine=c2-convex
-               os=-bsd
-               ;;
-       convex-c32)
-               basic_machine=c32-convex
-               os=-bsd
-               ;;
-       convex-c34)
-               basic_machine=c34-convex
-               os=-bsd
-               ;;
-       convex-c38)
-               basic_machine=c38-convex
-               os=-bsd
-               ;;
-       cray | j90)
-               basic_machine=j90-cray
-               os=-unicos
-               ;;
-       craynv)
-               basic_machine=craynv-cray
-               os=-unicosmp
-               ;;
-       cr16c)
-               basic_machine=cr16c-unknown
-               os=-elf
-               ;;
-       crds | unos)
-               basic_machine=m68k-crds
-               ;;
-       crisv32 | crisv32-* | etraxfs*)
-               basic_machine=crisv32-axis
-               ;;
-       cris | cris-* | etrax*)
-               basic_machine=cris-axis
-               ;;
-       crx)
-               basic_machine=crx-unknown
-               os=-elf
-               ;;
-       da30 | da30-*)
-               basic_machine=m68k-da30
-               ;;
-       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-               basic_machine=mips-dec
-               ;;
-       decsystem10* | dec10*)
-               basic_machine=pdp10-dec
-               os=-tops10
-               ;;
-       decsystem20* | dec20*)
-               basic_machine=pdp10-dec
-               os=-tops20
-               ;;
-       delta | 3300 | motorola-3300 | motorola-delta \
-             | 3300-motorola | delta-motorola)
-               basic_machine=m68k-motorola
-               ;;
-       delta88)
-               basic_machine=m88k-motorola
-               os=-sysv3
-               ;;
-       djgpp)
-               basic_machine=i586-pc
-               os=-msdosdjgpp
-               ;;
-       dpx20 | dpx20-*)
-               basic_machine=rs6000-bull
-               os=-bosx
-               ;;
-       dpx2* | dpx2*-bull)
-               basic_machine=m68k-bull
-               os=-sysv3
-               ;;
-       ebmon29k)
-               basic_machine=a29k-amd
-               os=-ebmon
-               ;;
-       elxsi)
-               basic_machine=elxsi-elxsi
-               os=-bsd
-               ;;
-       encore | umax | mmax)
-               basic_machine=ns32k-encore
-               ;;
-       es1800 | OSE68k | ose68k | ose | OSE)
-               basic_machine=m68k-ericsson
-               os=-ose
-               ;;
-       fx2800)
-               basic_machine=i860-alliant
-               ;;
-       genix)
-               basic_machine=ns32k-ns
-               ;;
-       gmicro)
-               basic_machine=tron-gmicro
-               os=-sysv
-               ;;
-       go32)
-               basic_machine=i386-pc
-               os=-go32
-               ;;
-       h3050r* | hiux*)
-               basic_machine=hppa1.1-hitachi
-               os=-hiuxwe2
-               ;;
-       h8300hms)
-               basic_machine=h8300-hitachi
-               os=-hms
-               ;;
-       h8300xray)
-               basic_machine=h8300-hitachi
-               os=-xray
-               ;;
-       h8500hms)
-               basic_machine=h8500-hitachi
-               os=-hms
-               ;;
-       harris)
-               basic_machine=m88k-harris
-               os=-sysv3
-               ;;
-       hp300-*)
-               basic_machine=m68k-hp
-               ;;
-       hp300bsd)
-               basic_machine=m68k-hp
-               os=-bsd
-               ;;
-       hp300hpux)
-               basic_machine=m68k-hp
-               os=-hpux
-               ;;
-       hp3k9[0-9][0-9] | hp9[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hp9k2[0-9][0-9] | hp9k31[0-9])
-               basic_machine=m68000-hp
-               ;;
-       hp9k3[2-9][0-9])
-               basic_machine=m68k-hp
-               ;;
-       hp9k6[0-9][0-9] | hp6[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hp9k7[0-79][0-9] | hp7[0-79][0-9])
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k78[0-9] | hp78[0-9])
-               # FIXME: really hppa2.0-hp
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-               # FIXME: really hppa2.0-hp
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[0-9][13679] | hp8[0-9][13679])
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[0-9][0-9] | hp8[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hppa-next)
-               os=-nextstep3
-               ;;
-       hppaosf)
-               basic_machine=hppa1.1-hp
-               os=-osf
-               ;;
-       hppro)
-               basic_machine=hppa1.1-hp
-               os=-proelf
-               ;;
-       i370-ibm* | ibm*)
-               basic_machine=i370-ibm
-               ;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-       i*86v32)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv32
-               ;;
-       i*86v4*)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv4
-               ;;
-       i*86v)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv
-               ;;
-       i*86sol2)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-solaris2
-               ;;
-       i386mach)
-               basic_machine=i386-mach
-               os=-mach
-               ;;
-       i386-vsta | vsta)
-               basic_machine=i386-unknown
-               os=-vsta
-               ;;
-       iris | iris4d)
-               basic_machine=mips-sgi
-               case $os in
-                   -irix*)
-                       ;;
-                   *)
-                       os=-irix4
-                       ;;
-               esac
-               ;;
-       isi68 | isi)
-               basic_machine=m68k-isi
-               os=-sysv
-               ;;
-       m88k-omron*)
-               basic_machine=m88k-omron
-               ;;
-       magnum | m3230)
-               basic_machine=mips-mips
-               os=-sysv
-               ;;
-       merlin)
-               basic_machine=ns32k-utek
-               os=-sysv
-               ;;
-       mingw32)
-               basic_machine=i386-pc
-               os=-mingw32
-               ;;
-       miniframe)
-               basic_machine=m68000-convergent
-               ;;
-       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-               basic_machine=m68k-atari
-               os=-mint
-               ;;
-       mips3*-*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-               ;;
-       mips3*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-               ;;
-       monitor)
-               basic_machine=m68k-rom68k
-               os=-coff
-               ;;
-       morphos)
-               basic_machine=powerpc-unknown
-               os=-morphos
-               ;;
-       msdos)
-               basic_machine=i386-pc
-               os=-msdos
-               ;;
-       mvs)
-               basic_machine=i370-ibm
-               os=-mvs
-               ;;
-       ncr3000)
-               basic_machine=i486-ncr
-               os=-sysv4
-               ;;
-       netbsd386)
-               basic_machine=i386-unknown
-               os=-netbsd
-               ;;
-       netwinder)
-               basic_machine=armv4l-rebel
-               os=-linux
-               ;;
-       news | news700 | news800 | news900)
-               basic_machine=m68k-sony
-               os=-newsos
-               ;;
-       news1000)
-               basic_machine=m68030-sony
-               os=-newsos
-               ;;
-       news-3600 | risc-news)
-               basic_machine=mips-sony
-               os=-newsos
-               ;;
-       necv70)
-               basic_machine=v70-nec
-               os=-sysv
-               ;;
-       next | m*-next )
-               basic_machine=m68k-next
-               case $os in
-                   -nextstep* )
-                       ;;
-                   -ns2*)
-                     os=-nextstep2
-                       ;;
-                   *)
-                     os=-nextstep3
-                       ;;
-               esac
-               ;;
-       nh3000)
-               basic_machine=m68k-harris
-               os=-cxux
-               ;;
-       nh[45]000)
-               basic_machine=m88k-harris
-               os=-cxux
-               ;;
-       nindy960)
-               basic_machine=i960-intel
-               os=-nindy
-               ;;
-       mon960)
-               basic_machine=i960-intel
-               os=-mon960
-               ;;
-       nonstopux)
-               basic_machine=mips-compaq
-               os=-nonstopux
-               ;;
-       np1)
-               basic_machine=np1-gould
-               ;;
-       nsr-tandem)
-               basic_machine=nsr-tandem
-               ;;
-       op50n-* | op60c-*)
-               basic_machine=hppa1.1-oki
-               os=-proelf
-               ;;
-       or32 | or32-*)
-               basic_machine=or32-unknown
-               os=-coff
-               ;;
-       os400)
-               basic_machine=powerpc-ibm
-               os=-os400
-               ;;
-       OSE68000 | ose68000)
-               basic_machine=m68000-ericsson
-               os=-ose
-               ;;
-       os68k)
-               basic_machine=m68k-none
-               os=-os68k
-               ;;
-       pa-hitachi)
-               basic_machine=hppa1.1-hitachi
-               os=-hiuxwe2
-               ;;
-       paragon)
-               basic_machine=i860-intel
-               os=-osf
-               ;;
-       pbd)
-               basic_machine=sparc-tti
-               ;;
-       pbb)
-               basic_machine=m68k-tti
-               ;;
-       pc532 | pc532-*)
-               basic_machine=ns32k-pc532
-               ;;
-       pentium | p5 | k5 | k6 | nexgen | viac3)
-               basic_machine=i586-pc
-               ;;
-       pentiumpro | p6 | 6x86 | athlon | athlon_*)
-               basic_machine=i686-pc
-               ;;
-       pentiumii | pentium2 | pentiumiii | pentium3)
-               basic_machine=i686-pc
-               ;;
-       pentium4)
-               basic_machine=i786-pc
-               ;;
-       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentiumpro-* | p6-* | 6x86-* | athlon-*)
-               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentium4-*)
-               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pn)
-               basic_machine=pn-gould
-               ;;
-       power)  basic_machine=power-ibm
-               ;;
-       ppc)    basic_machine=powerpc-unknown
-               ;;
-       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppcle | powerpclittle | ppc-le | powerpc-little)
-               basic_machine=powerpcle-unknown
-               ;;
-       ppcle-* | powerpclittle-*)
-               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppc64)  basic_machine=powerpc64-unknown
-               ;;
-       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-               basic_machine=powerpc64le-unknown
-               ;;
-       ppc64le-* | powerpc64little-*)
-               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ps2)
-               basic_machine=i386-ibm
-               ;;
-       pw32)
-               basic_machine=i586-unknown
-               os=-pw32
-               ;;
-       rom68k)
-               basic_machine=m68k-rom68k
-               os=-coff
-               ;;
-       rm[46]00)
-               basic_machine=mips-siemens
-               ;;
-       rtpc | rtpc-*)
-               basic_machine=romp-ibm
-               ;;
-       s390 | s390-*)
-               basic_machine=s390-ibm
-               ;;
-       s390x | s390x-*)
-               basic_machine=s390x-ibm
-               ;;
-       sa29200)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       sb1)
-               basic_machine=mipsisa64sb1-unknown
-               ;;
-       sb1el)
-               basic_machine=mipsisa64sb1el-unknown
-               ;;
-       sei)
-               basic_machine=mips-sei
-               os=-seiux
-               ;;
-       sequent)
-               basic_machine=i386-sequent
-               ;;
-       sh)
-               basic_machine=sh-hitachi
-               os=-hms
-               ;;
-       sh64)
-               basic_machine=sh64-unknown
-               ;;
-       sparclite-wrs | simso-wrs)
-               basic_machine=sparclite-wrs
-               os=-vxworks
-               ;;
-       sps7)
-               basic_machine=m68k-bull
-               os=-sysv2
-               ;;
-       spur)
-               basic_machine=spur-unknown
-               ;;
-       st2000)
-               basic_machine=m68k-tandem
-               ;;
-       stratus)
-               basic_machine=i860-stratus
-               os=-sysv4
-               ;;
-       sun2)
-               basic_machine=m68000-sun
-               ;;
-       sun2os3)
-               basic_machine=m68000-sun
-               os=-sunos3
-               ;;
-       sun2os4)
-               basic_machine=m68000-sun
-               os=-sunos4
-               ;;
-       sun3os3)
-               basic_machine=m68k-sun
-               os=-sunos3
-               ;;
-       sun3os4)
-               basic_machine=m68k-sun
-               os=-sunos4
-               ;;
-       sun4os3)
-               basic_machine=sparc-sun
-               os=-sunos3
-               ;;
-       sun4os4)
-               basic_machine=sparc-sun
-               os=-sunos4
-               ;;
-       sun4sol2)
-               basic_machine=sparc-sun
-               os=-solaris2
-               ;;
-       sun3 | sun3-*)
-               basic_machine=m68k-sun
-               ;;
-       sun4)
-               basic_machine=sparc-sun
-               ;;
-       sun386 | sun386i | roadrunner)
-               basic_machine=i386-sun
-               ;;
-       sv1)
-               basic_machine=sv1-cray
-               os=-unicos
-               ;;
-       symmetry)
-               basic_machine=i386-sequent
-               os=-dynix
-               ;;
-       t3e)
-               basic_machine=alphaev5-cray
-               os=-unicos
-               ;;
-       t90)
-               basic_machine=t90-cray
-               os=-unicos
-               ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
-               ;;
-       tx39)
-               basic_machine=mipstx39-unknown
-               ;;
-       tx39el)
-               basic_machine=mipstx39el-unknown
-               ;;
-       toad1)
-               basic_machine=pdp10-xkl
-               os=-tops20
-               ;;
-       tower | tower-32)
-               basic_machine=m68k-ncr
-               ;;
-       tpf)
-               basic_machine=s390x-ibm
-               os=-tpf
-               ;;
-       udi29k)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       ultra3)
-               basic_machine=a29k-nyu
-               os=-sym1
-               ;;
-       v810 | necv810)
-               basic_machine=v810-nec
-               os=-none
-               ;;
-       vaxv)
-               basic_machine=vax-dec
-               os=-sysv
-               ;;
-       vms)
-               basic_machine=vax-dec
-               os=-vms
-               ;;
-       vpp*|vx|vx-*)
-               basic_machine=f301-fujitsu
-               ;;
-       vxworks960)
-               basic_machine=i960-wrs
-               os=-vxworks
-               ;;
-       vxworks68)
-               basic_machine=m68k-wrs
-               os=-vxworks
-               ;;
-       vxworks29k)
-               basic_machine=a29k-wrs
-               os=-vxworks
-               ;;
-       w65*)
-               basic_machine=w65-wdc
-               os=-none
-               ;;
-       w89k-*)
-               basic_machine=hppa1.1-winbond
-               os=-proelf
-               ;;
-       xbox)
-               basic_machine=i686-pc
-               os=-mingw32
-               ;;
-       xps | xps100)
-               basic_machine=xps100-honeywell
-               ;;
-       ymp)
-               basic_machine=ymp-cray
-               os=-unicos
-               ;;
-       z8k-*-coff)
-               basic_machine=z8k-unknown
-               os=-sim
-               ;;
-       none)
-               basic_machine=none-none
-               os=-none
-               ;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-       w89k)
-               basic_machine=hppa1.1-winbond
-               ;;
-       op50n)
-               basic_machine=hppa1.1-oki
-               ;;
-       op60c)
-               basic_machine=hppa1.1-oki
-               ;;
-       romp)
-               basic_machine=romp-ibm
-               ;;
-       mmix)
-               basic_machine=mmix-knuth
-               ;;
-       rs6000)
-               basic_machine=rs6000-ibm
-               ;;
-       vax)
-               basic_machine=vax-dec
-               ;;
-       pdp10)
-               # there are many clones, so DEC is not a safe bet
-               basic_machine=pdp10-unknown
-               ;;
-       pdp11)
-               basic_machine=pdp11-dec
-               ;;
-       we32k)
-               basic_machine=we32k-att
-               ;;
-       sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
-               basic_machine=sh-unknown
-               ;;
-       sh64)
-               basic_machine=sh64-unknown
-               ;;
-       sparc | sparcv8 | sparcv9 | sparcv9b)
-               basic_machine=sparc-sun
-               ;;
-       cydra)
-               basic_machine=cydra-cydrome
-               ;;
-       orion)
-               basic_machine=orion-highlevel
-               ;;
-       orion105)
-               basic_machine=clipper-highlevel
-               ;;
-       mac | mpw | mac-mpw)
-               basic_machine=m68k-apple
-               ;;
-       pmac | pmac-mpw)
-               basic_machine=powerpc-apple
-               ;;
-       *-unknown)
-               # Make sure to match an already-canonicalized machine name.
-               ;;
-       *)
-               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-               exit 1
-               ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-       *-digital*)
-               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-               ;;
-       *-commodore*)
-               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-               ;;
-       *)
-               ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
-       # -solaris* is a basic system type, with this one exception.
-       -solaris1 | -solaris1.*)
-               os=`echo $os | sed -e 's|solaris1|sunos4|'`
-               ;;
-       -solaris)
-               os=-solaris2
-               ;;
-       -svr4*)
-               os=-sysv4
-               ;;
-       -unixware*)
-               os=-sysv4.2uw
-               ;;
-       -gnu/linux*)
-               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-               ;;
-       # First accept the basic system types.
-       # The portable systems comes first.
-       # Each alternative MUST END IN A *, to match a version number.
-       # -sysv* is not here because it comes later, after sysvr4.
-       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-             | -aos* \
-             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
-             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-             | -chorusos* | -chorusrdb* \
-             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
-             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
-       # Remember, each alternative MUST END IN *, to match a version number.
-               ;;
-       -qnx*)
-               case $basic_machine in
-                   x86-* | i*86-*)
-                       ;;
-                   *)
-                       os=-nto$os
-                       ;;
-               esac
-               ;;
-       -nto-qnx*)
-               ;;
-       -nto*)
-               os=`echo $os | sed -e 's|nto|nto-qnx|'`
-               ;;
-       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-             | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
-             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-               ;;
-       -mac*)
-               os=`echo $os | sed -e 's|mac|macos|'`
-               ;;
-       -linux-dietlibc)
-               os=-linux-dietlibc
-               ;;
-       -linux*)
-               os=`echo $os | sed -e 's|linux|linux-gnu|'`
-               ;;
-       -sunos5*)
-               os=`echo $os | sed -e 's|sunos5|solaris2|'`
-               ;;
-       -sunos6*)
-               os=`echo $os | sed -e 's|sunos6|solaris3|'`
-               ;;
-       -opened*)
-               os=-openedition
-               ;;
-        -os400*)
-               os=-os400
-               ;;
-       -wince*)
-               os=-wince
-               ;;
-       -osfrose*)
-               os=-osfrose
-               ;;
-       -osf*)
-               os=-osf
-               ;;
-       -utek*)
-               os=-bsd
-               ;;
-       -dynix*)
-               os=-bsd
-               ;;
-       -acis*)
-               os=-aos
-               ;;
-       -atheos*)
-               os=-atheos
-               ;;
-       -syllable*)
-               os=-syllable
-               ;;
-       -386bsd)
-               os=-bsd
-               ;;
-       -ctix* | -uts*)
-               os=-sysv
-               ;;
-       -nova*)
-               os=-rtmk-nova
-               ;;
-       -ns2 )
-               os=-nextstep2
-               ;;
-       -nsk*)
-               os=-nsk
-               ;;
-       # Preserve the version number of sinix5.
-       -sinix5.*)
-               os=`echo $os | sed -e 's|sinix|sysv|'`
-               ;;
-       -sinix*)
-               os=-sysv4
-               ;;
-        -tpf*)
-               os=-tpf
-               ;;
-       -triton*)
-               os=-sysv3
-               ;;
-       -oss*)
-               os=-sysv3
-               ;;
-       -svr4)
-               os=-sysv4
-               ;;
-       -svr3)
-               os=-sysv3
-               ;;
-       -sysvr4)
-               os=-sysv4
-               ;;
-       # This must come after -sysvr4.
-       -sysv*)
-               ;;
-       -ose*)
-               os=-ose
-               ;;
-       -es1800*)
-               os=-ose
-               ;;
-       -xenix)
-               os=-xenix
-               ;;
-       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-               os=-mint
-               ;;
-       -aros*)
-               os=-aros
-               ;;
-       -kaos*)
-               os=-kaos
-               ;;
-       -zvmoe)
-               os=-zvmoe
-               ;;
-       -none)
-               ;;
-       *)
-               # Get rid of the `-' at the beginning of $os.
-               os=`echo $os | sed 's/[^-]*-//'`
-               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-               exit 1
-               ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-       *-acorn)
-               os=-riscix1.2
-               ;;
-       arm*-rebel)
-               os=-linux
-               ;;
-       arm*-semi)
-               os=-aout
-               ;;
-    c4x-* | tic4x-*)
-        os=-coff
-        ;;
-       # This must come before the *-dec entry.
-       pdp10-*)
-               os=-tops20
-               ;;
-       pdp11-*)
-               os=-none
-               ;;
-       *-dec | vax-*)
-               os=-ultrix4.2
-               ;;
-       m68*-apollo)
-               os=-domain
-               ;;
-       i386-sun)
-               os=-sunos4.0.2
-               ;;
-       m68000-sun)
-               os=-sunos3
-               # This also exists in the configure program, but was not the
-               # default.
-               # os=-sunos4
-               ;;
-       m68*-cisco)
-               os=-aout
-               ;;
-       mips*-cisco)
-               os=-elf
-               ;;
-       mips*-*)
-               os=-elf
-               ;;
-       or32-*)
-               os=-coff
-               ;;
-       *-tti)  # must be before sparc entry or we get the wrong os.
-               os=-sysv3
-               ;;
-       sparc-* | *-sun)
-               os=-sunos4.1.1
-               ;;
-       *-be)
-               os=-beos
-               ;;
-       *-ibm)
-               os=-aix
-               ;;
-       *-knuth)
-               os=-mmixware
-               ;;
-       *-wec)
-               os=-proelf
-               ;;
-       *-winbond)
-               os=-proelf
-               ;;
-       *-oki)
-               os=-proelf
-               ;;
-       *-hp)
-               os=-hpux
-               ;;
-       *-hitachi)
-               os=-hiux
-               ;;
-       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-               os=-sysv
-               ;;
-       *-cbm)
-               os=-amigaos
-               ;;
-       *-dg)
-               os=-dgux
-               ;;
-       *-dolphin)
-               os=-sysv3
-               ;;
-       m68k-ccur)
-               os=-rtu
-               ;;
-       m88k-omron*)
-               os=-luna
-               ;;
-       *-next )
-               os=-nextstep
-               ;;
-       *-sequent)
-               os=-ptx
-               ;;
-       *-crds)
-               os=-unos
-               ;;
-       *-ns)
-               os=-genix
-               ;;
-       i370-*)
-               os=-mvs
-               ;;
-       *-next)
-               os=-nextstep3
-               ;;
-       *-gould)
-               os=-sysv
-               ;;
-       *-highlevel)
-               os=-bsd
-               ;;
-       *-encore)
-               os=-bsd
-               ;;
-       *-sgi)
-               os=-irix
-               ;;
-       *-siemens)
-               os=-sysv4
-               ;;
-       *-masscomp)
-               os=-rtu
-               ;;
-       f30[01]-fujitsu | f700-fujitsu)
-               os=-uxpv
-               ;;
-       *-rom68k)
-               os=-coff
-               ;;
-       *-*bug)
-               os=-coff
-               ;;
-       *-apple)
-               os=-macos
-               ;;
-       *-atari*)
-               os=-mint
-               ;;
-       *)
-               os=-none
-               ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-       *-unknown)
-               case $os in
-                       -riscix*)
-                               vendor=acorn
-                               ;;
-                       -sunos*)
-                               vendor=sun
-                               ;;
-                       -aix*)
-                               vendor=ibm
-                               ;;
-                       -beos*)
-                               vendor=be
-                               ;;
-                       -hpux*)
-                               vendor=hp
-                               ;;
-                       -mpeix*)
-                               vendor=hp
-                               ;;
-                       -hiux*)
-                               vendor=hitachi
-                               ;;
-                       -unos*)
-                               vendor=crds
-                               ;;
-                       -dgux*)
-                               vendor=dg
-                               ;;
-                       -luna*)
-                               vendor=omron
-                               ;;
-                       -genix*)
-                               vendor=ns
-                               ;;
-                       -mvs* | -opened*)
-                               vendor=ibm
-                               ;;
-                       -os400*)
-                               vendor=ibm
-                               ;;
-                       -ptx*)
-                               vendor=sequent
-                               ;;
-                       -tpf*)
-                               vendor=ibm
-                               ;;
-                       -vxsim* | -vxworks* | -windiss*)
-                               vendor=wrs
-                               ;;
-                       -aux*)
-                               vendor=apple
-                               ;;
-                       -hms*)
-                               vendor=hitachi
-                               ;;
-                       -mpw* | -macos*)
-                               vendor=apple
-                               ;;
-                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-                               vendor=atari
-                               ;;
-                       -vos*)
-                               vendor=stratus
-                               ;;
-               esac
-               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-               ;;
-esac
-
-echo $basic_machine$os
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/source4/lib/json/configure b/source4/lib/json/configure
deleted file mode 100755 (executable)
index dadf0d5..0000000
+++ /dev/null
@@ -1,20603 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for JSON C Library 0.3.
-#
-# Report bugs to <michael@metaparadigm.com>.
-#
-# Copyright (C) 2003 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    $as_unset $as_var
-  fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-        X"$0" : 'X\(//\)$' \| \
-        X"$0" : 'X\(/\)$' \| \
-        .     : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
-         /^X\/\(\/\/\)$/{ s//\1/; q; }
-         /^X\/\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
-  # Find who we are.  Look in the path if we contain no path at all
-  # relative or not.
-  case $0 in
-    *[\\/]* ) as_myself=$0 ;;
-    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
-       ;;
-  esac
-  # We did not find ourselves, most probably we were run as `sh COMMAND'
-  # in which case we are not to be found in the path.
-  if test "x$as_myself" = x; then
-    as_myself=$0
-  fi
-  if test ! -f "$as_myself"; then
-    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
-   { (exit 1); exit 1; }; }
-  fi
-  case $CONFIG_SHELL in
-  '')
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for as_base in sh bash ksh sh5; do
-        case $as_dir in
-        /*)
-          if ("$as_dir/$as_base" -c '
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
-            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
-            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-            CONFIG_SHELL=$as_dir/$as_base
-            export CONFIG_SHELL
-            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
-          fi;;
-        esac
-       done
-done
-;;
-  esac
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line before each line; the second 'sed' does the real
-  # work.  The second script uses 'N' to pair each line-number line
-  # with the numbered line, and appends trailing '-' during
-  # substitution so that $LINENO is not a special case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
-  sed '=' <$as_myself |
-    sed '
-      N
-      s,$,-,
-      : loop
-      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
-      t loop
-      s,-$,,
-      s,^['$as_cr_digits']*\n,,
-    ' >$as_me.lineno &&
-  chmod +x $as_me.lineno ||
-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensible to this).
-  . ./$as_me.lineno
-  # Exit status is that of the last command.
-  exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
-  *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T='     ' ;;
-  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
-  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  # We could just check for DJGPP; but this test a) works b) is more generic
-  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-  if test -f conf$$.exe; then
-    # Don't use ln at all; we don't have any links
-    as_ln_s='cp -p'
-  else
-    as_ln_s='ln -s'
-  fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS="  $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-
-
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
-  ;;
-esac
-
-echo=${ECHO-echo}
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
-  # Yippee, $echo works!
-  :
-else
-  # Restart under the correct shell.
-  exec $SHELL "$0" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-$*
-EOF
-  exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$ECHO"; then
-if test "X${echo_test_string+set}" != Xset; then
-# find a string as large as possible, as long as the shell can cope with it
-  for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
-    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
-       echo_test_string=`eval $cmd` &&
-       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
-    then
-      break
-    fi
-  done
-fi
-
-if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-   test "X$echo_testing_string" = "X$echo_test_string"; then
-  :
-else
-  # The Solaris, AIX, and Digital Unix default echo programs unquote
-  # backslashes.  This makes it impossible to quote backslashes using
-  #   echo "$something" | sed 's/\\/\\\\/g'
-  #
-  # So, first we look for a working echo in the user's PATH.
-
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for dir in $PATH /usr/ucb; do
-    IFS="$lt_save_ifs"
-    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      echo="$dir/echo"
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-
-  if test "X$echo" = Xecho; then
-    # We didn't find a better echo, so look for alternatives.
-    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      # This shell has a builtin print -r that does the trick.
-      echo='print -r'
-    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
-        test "X$CONFIG_SHELL" != X/bin/ksh; then
-      # If we have ksh, try running configure again with it.
-      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-      export ORIGINAL_CONFIG_SHELL
-      CONFIG_SHELL=/bin/ksh
-      export CONFIG_SHELL
-      exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
-    else
-      # Try using printf.
-      echo='printf %s\n'
-      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-        echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-        test "X$echo_testing_string" = "X$echo_test_string"; then
-       # Cool, printf works
-       :
-      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
-          test "X$echo_testing_string" = 'X\t' &&
-          echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-          test "X$echo_testing_string" = "X$echo_test_string"; then
-       CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-       export CONFIG_SHELL
-       SHELL="$CONFIG_SHELL"
-       export SHELL
-       echo="$CONFIG_SHELL $0 --fallback-echo"
-      elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
-          test "X$echo_testing_string" = 'X\t' &&
-          echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-          test "X$echo_testing_string" = "X$echo_test_string"; then
-       echo="$CONFIG_SHELL $0 --fallback-echo"
-      else
-       # maybe with a smaller string...
-       prev=:
-
-       for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
-         if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
-         then
-           break
-         fi
-         prev="$cmd"
-       done
-
-       if test "$prev" != 'sed 50q "$0"'; then
-         echo_test_string=`eval $prev`
-         export echo_test_string
-         exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
-       else
-         # Oops.  We lost completely, so just stick with echo.
-         echo=echo
-       fi
-      fi
-    fi
-  fi
-fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-ECHO=$echo
-if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
-   ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
-fi
-
-
-
-
-tagnames=${tagnames+${tagnames},}CXX
-
-tagnames=${tagnames+${tagnames},}F77
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_config_libobj_dir=.
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete.  It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-# Identity of this package.
-PACKAGE_NAME='JSON C Library'
-PACKAGE_TARNAME='json-c'
-PACKAGE_VERSION='0.3'
-PACKAGE_STRING='JSON C Library 0.3'
-PACKAGE_BUGREPORT='michael@metaparadigm.com'
-
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#if STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# if HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
-#endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
-#if HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP LIBOBJS build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LTLIBOBJS'
-ac_subst_files=''
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-ac_prev=
-for ac_option
-do
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case $ac_option in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir=$ac_optarg ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build_alias ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build_alias=$ac_optarg ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file=$ac_optarg ;;
-
-  --config-cache | -C)
-    cache_file=config.cache ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir=$ac_optarg ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
-   { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
-    eval "enable_$ac_feature=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
-   { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
-    case $ac_option in
-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_$ac_feature='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix=$ac_optarg ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he | -h)
-    ac_init_help=long ;;
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
-    ac_init_help=recursive ;;
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
-    ac_init_help=short ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host_alias ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host_alias=$ac_optarg ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir=$ac_optarg ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir=$ac_optarg ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir=$ac_optarg ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir=$ac_optarg ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir=$ac_optarg ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir=$ac_optarg ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c | -n)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir=$ac_optarg ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix=$ac_optarg ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix=$ac_optarg ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix=$ac_optarg ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name=$ac_optarg ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir=$ac_optarg ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir=$ac_optarg ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site=$ac_optarg ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir=$ac_optarg ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir=$ac_optarg ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target_alias ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
-
-  -with-* | --with-*)
-    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid package name: $ac_package" >&2
-   { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case $ac_option in
-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_$ac_package='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid package name: $ac_package" >&2
-   { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/-/_/g'`
-    eval "with_$ac_package=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes=$ac_optarg ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries=$ac_optarg ;;
-
-  -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; }
-    ;;
-
-  *=*)
-    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
-   { (exit 1); exit 1; }; }
-    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
-    eval "$ac_envvar='$ac_optarg'"
-    export $ac_envvar ;;
-
-  *)
-    # FIXME: should be removed in autoconf 3.0.
-    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
-    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { echo "$as_me: error: missing argument to $ac_option" >&2
-   { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
-  eval ac_val=$`echo $ac_var`
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
-    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; };;
-  esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
-             localstatedir libdir includedir oldincludedir infodir mandir
-do
-  eval ac_val=$`echo $ac_var`
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* ) ;;
-    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; };;
-  esac
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
-  if test "x$build_alias" = x; then
-    cross_compiling=maybe
-    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
-  elif test "x$build_alias" != "x$host_alias"; then
-    cross_compiling=yes
-  fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$0" : 'X\(//\)[^/]' \| \
-        X"$0" : 'X\(//\)$' \| \
-        X"$0" : 'X\(/\)' \| \
-        .     : '\(.\)' 2>/dev/null ||
-echo X"$0" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
-   { (exit 1); exit 1; }; }
-  else
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
-   { (exit 1); exit 1; }; }
-  fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
-  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
-   { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
-ac_env_CXX_set=${CXX+set}
-ac_env_CXX_value=$CXX
-ac_cv_env_CXX_set=${CXX+set}
-ac_cv_env_CXX_value=$CXX
-ac_env_CXXFLAGS_set=${CXXFLAGS+set}
-ac_env_CXXFLAGS_value=$CXXFLAGS
-ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
-ac_cv_env_CXXFLAGS_value=$CXXFLAGS
-ac_env_CXXCPP_set=${CXXCPP+set}
-ac_env_CXXCPP_value=$CXXCPP
-ac_cv_env_CXXCPP_set=${CXXCPP+set}
-ac_cv_env_CXXCPP_value=$CXXCPP
-ac_env_F77_set=${F77+set}
-ac_env_F77_value=$F77
-ac_cv_env_F77_set=${F77+set}
-ac_cv_env_F77_value=$F77
-ac_env_FFLAGS_set=${FFLAGS+set}
-ac_env_FFLAGS_value=$FFLAGS
-ac_cv_env_FFLAGS_set=${FFLAGS+set}
-ac_cv_env_FFLAGS_value=$FFLAGS
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
-  # Omit some internal or obsolete options to make the list less imposing.
-  # This message is too long to be a string in the A/UX 3.1 sh.
-  cat <<_ACEOF
-\`configure' configures JSON C Library 0.3 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  -h, --help              display this help and exit
-      --help=short        display options specific to this package
-      --help=recursive    display the short help of all the included packages
-  -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking...' messages
-      --cache-file=FILE   cache test results in FILE [disabled]
-  -C, --config-cache      alias for \`--cache-file=config.cache'
-  -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
-
-_ACEOF
-
-  cat <<_ACEOF
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                         [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                         [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
-  --bindir=DIR           user executables [EPREFIX/bin]
-  --sbindir=DIR          system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR       program executables [EPREFIX/libexec]
-  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
-  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
-  --libdir=DIR           object code libraries [EPREFIX/lib]
-  --includedir=DIR       C header files [PREFIX/include]
-  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
-  --infodir=DIR          info documentation [PREFIX/info]
-  --mandir=DIR           man documentation [PREFIX/man]
-_ACEOF
-
-  cat <<\_ACEOF
-
-Program names:
-  --program-prefix=PREFIX            prepend PREFIX to installed program names
-  --program-suffix=SUFFIX            append SUFFIX to installed program names
-  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
-
-System types:
-  --build=BUILD     configure for building on BUILD [guessed]
-  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-  case $ac_init_help in
-     short | recursive ) echo "Configuration of JSON C Library 0.3:";;
-   esac
-  cat <<\_ACEOF
-
-Optional Features:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-shared[=PKGS]
-                          build shared libraries [default=yes]
-  --enable-static[=PKGS]
-                          build static libraries [default=yes]
-  --enable-fast-install[=PKGS]
-                          optimize for fast installation [default=yes]
-  --disable-libtool-lock  avoid locking (might break parallel builds)
-
-Optional Packages:
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
-  --with-pic              try to use only PIC/non-PIC objects [default=use
-                          both]
-  --with-tags[=TAGS]
-                          include additional configurations [automatic]
-
-Some influential environment variables:
-  CC          C compiler command
-  CFLAGS      C compiler flags
-  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
-              nonstandard directory <lib dir>
-  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
-              headers in a nonstandard directory <include dir>
-  CPP         C preprocessor
-  CXX         C++ compiler command
-  CXXFLAGS    C++ compiler flags
-  CXXCPP      C++ preprocessor
-  F77         Fortran 77 compiler command
-  FFLAGS      Fortran 77 compiler flags
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-Report bugs to <michael@metaparadigm.com>.
-_ACEOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
-  # If there are subdirs, report their specific --help.
-  ac_popdir=`pwd`
-  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d $ac_dir || continue
-    ac_builddir=.
-
-if test "$ac_dir" != .; then
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
-    ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
-  case "$ac_dir" in
-  .) ac_abs_builddir=`pwd`;;
-  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-  *) ac_abs_builddir=`pwd`/"$ac_dir";;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
-  case ${ac_top_builddir}. in
-  .) ac_abs_top_builddir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
-  case $ac_srcdir in
-  .) ac_abs_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
-  case $ac_top_srcdir in
-  .) ac_abs_top_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-  esac;;
-esac
-
-    cd $ac_dir
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $ac_srcdir/configure.gnu; then
-      echo
-      $SHELL $ac_srcdir/configure.gnu  --help=recursive
-    elif test -f $ac_srcdir/configure; then
-      echo
-      $SHELL $ac_srcdir/configure  --help=recursive
-    elif test -f $ac_srcdir/configure.ac ||
-          test -f $ac_srcdir/configure.in; then
-      echo
-      $ac_configure --help
-    else
-      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi
-    cd "$ac_popdir"
-  done
-fi
-
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
-  cat <<\_ACEOF
-JSON C Library configure 0.3
-generated by GNU Autoconf 2.59
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
-  exit 0
-fi
-exec 5>config.log
-cat >&5 <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by JSON C Library $as_me 0.3, which was
-generated by GNU Autoconf 2.59.  Invocation command line was
-
-  $ $0 $@
-
-_ACEOF
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  echo "PATH: $as_dir"
-done
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_sep=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
-      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
-    2)
-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-       ac_must_keep_next=false # Got value, back to normal.
-      else
-       case $ac_arg in
-         *=* | --config-cache | -C | -disable-* | --disable-* \
-         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-         | -with-* | --with-* | -without-* | --without-* | --x)
-           case "$ac_configure_args0 " in
-             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-           esac
-           ;;
-         -* ) ac_must_keep_next=true ;;
-       esac
-      fi
-      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
-      # Get rid of the leading space.
-      ac_sep=" "
-      ;;
-    esac
-  done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
-trap 'exit_status=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
-
-    cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-{
-  (set) 2>&1 |
-    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
-    *ac_space=\ *)
-      sed -n \
-       "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
-      ;;
-    *)
-      sed -n \
-       "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
-      ;;
-    esac;
-}
-    echo
-
-    cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
-    echo
-    for ac_var in $ac_subst_vars
-    do
-      eval ac_val=$`echo $ac_var`
-      echo "$ac_var='"'"'$ac_val'"'"'"
-    done | sort
-    echo
-
-    if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
-      echo
-      for ac_var in $ac_subst_files
-      do
-       eval ac_val=$`echo $ac_var`
-       echo "$ac_var='"'"'$ac_val'"'"'"
-      done | sort
-      echo
-    fi
-
-    if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
-      echo
-      sed "/^$/d" confdefs.h | sort
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      echo "$as_me: caught signal $ac_signal"
-    echo "$as_me: exit $exit_status"
-  } >&5
-  rm -f core *.core &&
-  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
-    exit $exit_status
-     ' 0
-for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special
-  # files actually), so we avoid doing that.
-  if test -f "$cache_file"; then
-    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . $cache_file;;
-      *)                      . ./$cache_file;;
-    esac
-  fi
-else
-  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
-  >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
-              sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
-  eval ac_new_val="\$ac_env_${ac_var}_value"
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
-    *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-       { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-       { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
-echo "$as_me:   former value:  $ac_old_val" >&2;}
-       { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
-echo "$as_me:   current value: $ac_new_val" >&2;}
-       ac_cache_corrupted=:
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
-      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
-    *) ac_arg=$ac_var=$ac_new_val ;;
-    esac
-    case " $ac_configure_args " in
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-am__api_version="1.4"
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  elif test -f $ac_dir/shtool; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/shtool install -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
-  ./ | .// | /cC/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
-         if test $ac_prog = install &&
-           grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-           # AIX install.  It has an incompatible calling convention.
-           :
-         elif test $ac_prog = install &&
-           grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-           # program-specific install script used by HP pwplus--don't use.
-           :
-         else
-           ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-           break 3
-         fi
-       fi
-      done
-    done
-    ;;
-esac
-done
-
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL=$ac_install_sh
-  fi
-fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
-   if test "$*" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftestfile`
-   fi
-   if test "$*" != "X $srcdir/configure conftestfile" \
-      && test "$*" != "X conftestfile $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&5
-echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&2;}
-   { (exit 1); exit 1; }; }
-   fi
-
-   test "$2" = conftestfile
-   )
-then
-   # Ok.
-   :
-else
-   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-rm -f conftest*
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-test "$program_prefix" != NONE &&
-  program_transform_name="s,^,$program_prefix,;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
-  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
-# Double any \ or $.  echo might interpret backslashes.
-# By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm conftest.sed
-
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.make <<\_ACEOF
-all:
-       @echo 'ac_maketemp="$(MAKE)"'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftest.make
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-  SET_MAKE=
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-PACKAGE=JSON C Library
-
-VERSION=0.3
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
-  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo "$as_me:$LINENO: checking for working aclocal-${am__api_version}" >&5
-echo $ECHO_N "checking for working aclocal-${am__api_version}... $ECHO_C" >&6
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf.  Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
-   ACLOCAL=aclocal-${am__api_version}
-   echo "$as_me:$LINENO: result: found" >&5
-echo "${ECHO_T}found" >&6
-else
-   ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
-   echo "$as_me:$LINENO: result: missing" >&5
-echo "${ECHO_T}missing" >&6
-fi
-
-echo "$as_me:$LINENO: checking for working autoconf" >&5
-echo $ECHO_N "checking for working autoconf... $ECHO_C" >&6
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf.  Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
-   AUTOCONF=autoconf
-   echo "$as_me:$LINENO: result: found" >&5
-echo "${ECHO_T}found" >&6
-else
-   AUTOCONF="$missing_dir/missing autoconf"
-   echo "$as_me:$LINENO: result: missing" >&5
-echo "${ECHO_T}missing" >&6
-fi
-
-echo "$as_me:$LINENO: checking for working automake-${am__api_version}" >&5
-echo $ECHO_N "checking for working automake-${am__api_version}... $ECHO_C" >&6
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf.  Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
-   AUTOMAKE=automake-${am__api_version}
-   echo "$as_me:$LINENO: result: found" >&5
-echo "${ECHO_T}found" >&6
-else
-   AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
-   echo "$as_me:$LINENO: result: missing" >&5
-echo "${ECHO_T}missing" >&6
-fi
-
-echo "$as_me:$LINENO: checking for working autoheader" >&5
-echo $ECHO_N "checking for working autoheader... $ECHO_C" >&6
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf.  Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
-   AUTOHEADER=autoheader
-   echo "$as_me:$LINENO: result: found" >&5
-echo "${ECHO_T}found" >&6
-else
-   AUTOHEADER="$missing_dir/missing autoheader"
-   echo "$as_me:$LINENO: result: missing" >&5
-echo "${ECHO_T}missing" >&6
-fi
-
-echo "$as_me:$LINENO: checking for working makeinfo" >&5
-echo $ECHO_N "checking for working makeinfo... $ECHO_C" >&6
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf.  Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
-   MAKEINFO=makeinfo
-   echo "$as_me:$LINENO: result: found" >&5
-echo "${ECHO_T}found" >&6
-else
-   MAKEINFO="$missing_dir/missing makeinfo"
-   echo "$as_me:$LINENO: result: missing" >&5
-echo "${ECHO_T}missing" >&6
-fi
-
-
-
-# Checks for programs.
-
-# Checks for libraries.
-
-# Checks for header files.
-
-          ac_config_headers="$ac_config_headers config.h"
-
-          ac_config_commands="$ac_config_commands default-1"
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  CC=$ac_ct_CC
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  CC=$ac_ct_CC
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  test -n "$ac_ct_CC" && break
-done
-
-  CC=$ac_ct_CC
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
-     "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
-  (eval $ac_compiler --version </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
-  (eval $ac_compiler -v </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
-  (eval $ac_compiler -V </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
-  (eval $ac_link_default) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # Find the output, starting from the most likely.  This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
-do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
-       ;;
-    conftest.$ac_ext )
-       # This is the source file.
-       ;;
-    [ab].out )
-       # We found the default executable, but exeext='' is most
-       # certainly right.
-       break;;
-    *.* )
-       ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-       # FIXME: I believe we export ac_cv_exeext for Libtool,
-       # but it would be cool to find out if it's true.  Does anybody
-       # maintain Libtool? --akim.
-       export ac_cv_exeext
-       break;;
-    * )
-       break;;
-  esac
-done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
-  if { ac_try='./$ac_file'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-    cross_compiling=no
-  else
-    if test "$cross_compiling" = maybe; then
-       cross_compiling=yes
-    else
-       { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-  fi
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-         export ac_cv_exeext
-         break;;
-    * ) break;;
-  esac
-done
-else
-  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_compiler_gnu=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_prog_cc_g=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cc_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std1 is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std1.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX                  -qlanglvl=ansi
-# Ultrix and OSF/1     -std1
-# HP-UX 10.20 and later        -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4                 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_prog_cc_stdc=$ac_arg
-break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
-  x|xno)
-    echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
-  *)
-    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
-    CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-# Some people use a C++ compiler to compile C.  Since we use `exit',
-# in C++ we need to declare it.  In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
-  choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  for ac_declaration in \
-   '' \
-   'extern "C" void std::exit (int) throw (); using std::exit;' \
-   'extern "C" void std::exit (int); using std::exit;' \
-   'extern "C" void exit (int) throw ();' \
-   'extern "C" void exit (int);' \
-   'void exit (int);'
-do
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_declaration
-int
-main ()
-{
-exit (42);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
-  echo '#ifdef __cplusplus' >>confdefs.h
-  echo $ac_declaration      >>confdefs.h
-  echo '#endif'             >>confdefs.h
-fi
-
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether non-existent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
-fi
-
-    done
-    ac_cv_prog_CPP=$CPP
-
-fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
-fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether non-existent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
-else
-  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
-    then ac_cv_prog_egrep='grep -E'
-    else ac_cv_prog_egrep='egrep'
-    fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
-
-
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_header_stdc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_stdc=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-                  (('a' <= (c) && (c) <= 'i') \
-                    || ('j' <= (c) && (c) <= 'r') \
-                    || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-       || toupper (i) != TOUPPER (i))
-      exit(2);
-  exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-                 inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-
-
-
-
-for ac_header in fcntl.h limits.h strings.h syslog.h unistd.h sys/param.h stdarg.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## --------------------------------------- ##
-## Report this to michael@metaparadigm.com ##
-## --------------------------------------- ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-# Checks for typedefs, structures, and compiler characteristics.
-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
-if test "${ac_cv_c_const+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
-  /* Ultrix mips cc rejects this.  */
-  typedef int charset[2];
-  const charset x;
-  /* SunOS 4.1.1 cc rejects this.  */
-  char const *const *ccp;
-  char **p;
-  /* NEC SVR4.0.2 mips cc rejects this.  */
-  struct point {int x, y;};
-  static struct point const zero = {0,0};
-  /* AIX XL C 1.02.0.0 rejects this.
-     It does not let you subtract one const X* pointer from another in
-     an arm of an if-expression whose if-part is not a constant
-     expression */
-  const char *g = "string";
-  ccp = &g + (g ? g-g : 0);
-  /* HPUX 7.0 cc rejects these. */
-  ++ccp;
-  p = (char**) ccp;
-  ccp = (char const *const *) p;
-  { /* SCO 3.2v4 cc rejects this.  */
-    char *t;
-    char const *s = 0 ? (char *) 0 : (char const *) 0;
-
-    *t++ = 0;
-  }
-  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-    int x[] = {25, 17};
-    const int *foo = &x[0];
-    ++foo;
-  }
-  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-    typedef const int *iptr;
-    iptr p = 0;
-    ++p;
-  }
-  { /* AIX XL C 1.02.0.0 rejects this saying
-       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-    struct s { int j; const int *ap[3]; };
-    struct s *b; b->j = 5;
-  }
-  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-    const int foo = 10;
-  }
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_c_const=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_c_const=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6
-if test $ac_cv_c_const = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define const
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6
-if test "${ac_cv_type_size_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if ((size_t *) 0)
-  return 0;
-if (sizeof (size_t))
-  return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_type_size_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_size_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6
-if test $ac_cv_type_size_t = yes; then
-  :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned
-_ACEOF
-
-fi
-
-
-# Checks for library functions.
-
-for ac_func in vprintf
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-echo "$as_me:$LINENO: checking for _doprnt" >&5
-echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
-if test "${ac_cv_func__doprnt+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define _doprnt innocuous__doprnt
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char _doprnt (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef _doprnt
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char _doprnt ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub__doprnt) || defined (__stub____doprnt)
-choke me
-#else
-char (*f) () = _doprnt;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != _doprnt;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func__doprnt=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func__doprnt=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
-echo "${ECHO_T}$ac_cv_func__doprnt" >&6
-if test $ac_cv_func__doprnt = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DOPRNT 1
-_ACEOF
-
-fi
-
-fi
-done
-
-
-echo "$as_me:$LINENO: checking for working memcmp" >&5
-echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
-if test "${ac_cv_func_memcmp_working+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_func_memcmp_working=no
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-
-  /* Some versions of memcmp are not 8-bit clean.  */
-  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
-  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
-    exit (1);
-
-  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
-     or more and with at least one buffer not starting on a 4-byte boundary.
-     William Lewis provided this test program.   */
-  {
-    char foo[21];
-    char bar[21];
-    int i;
-    for (i = 0; i < 4; i++)
-      {
-       char *a = foo + i;
-       char *b = bar + i;
-       strcpy (a, "--------01111111");
-       strcpy (b, "--------10000000");
-       if (memcmp (a, b, 16) >= 0)
-         exit (1);
-      }
-    exit (0);
-  }
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_memcmp_working=yes
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_func_memcmp_working=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
-echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
-test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
-    "memcmp.$ac_objext"   | \
-  *" memcmp.$ac_objext"   | \
-    "memcmp.$ac_objext "* | \
-  *" memcmp.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
-esac
-
-
-
-for ac_header in stdlib.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## --------------------------------------- ##
-## Report this to michael@metaparadigm.com ##
-## --------------------------------------- ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5
-echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6
-if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_func_malloc_0_nonnull=no
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#if STDC_HEADERS || HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-char *malloc ();
-#endif
-
-int
-main ()
-{
-exit (malloc (0) ? 0 : 1);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_malloc_0_nonnull=yes
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_func_malloc_0_nonnull=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5
-echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6
-if test $ac_cv_func_malloc_0_nonnull = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MALLOC 1
-_ACEOF
-
-else
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_MALLOC 0
-_ACEOF
-
-   case $LIBOBJS in
-    "malloc.$ac_objext"   | \
-  *" malloc.$ac_objext"   | \
-    "malloc.$ac_objext "* | \
-  *" malloc.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;;
-esac
-
-
-cat >>confdefs.h <<\_ACEOF
-#define malloc rpl_malloc
-_ACEOF
-
-fi
-
-
-
-
-for ac_header in stdlib.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## --------------------------------------- ##
-## Report this to michael@metaparadigm.com ##
-## --------------------------------------- ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5
-echo $ECHO_N "checking for GNU libc compatible realloc... $ECHO_C" >&6
-if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_func_realloc_0_nonnull=no
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#if STDC_HEADERS || HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-char *realloc ();
-#endif
-
-int
-main ()
-{
-exit (realloc (0, 0) ? 0 : 1);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_realloc_0_nonnull=yes
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_func_realloc_0_nonnull=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5
-echo "${ECHO_T}$ac_cv_func_realloc_0_nonnull" >&6
-if test $ac_cv_func_realloc_0_nonnull = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_REALLOC 1
-_ACEOF
-
-else
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_REALLOC 0
-_ACEOF
-
-   case $LIBOBJS in
-    "realloc.$ac_objext"   | \
-  *" realloc.$ac_objext"   | \
-    "realloc.$ac_objext "* | \
-  *" realloc.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;;
-esac
-
-
-cat >>confdefs.h <<\_ACEOF
-#define realloc rpl_realloc
-_ACEOF
-
-fi
-
-
-
-
-
-
-
-
-
-
-for ac_func in strndup strerror vsnprintf vasprintf open vsyslog strncasecmp
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_shared=yes
-       fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
-else
-  enable_shared=yes
-fi;
-
-# Check whether --enable-static or --disable-static was given.
-if test "${enable_static+set}" = set; then
-  enableval="$enable_static"
-  p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_static=yes ;;
-    no) enable_static=no ;;
-    *)
-     enable_static=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_static=yes
-       fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
-else
-  enable_static=yes
-fi;
-
-# Check whether --enable-fast-install or --disable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
-  enableval="$enable_fast_install"
-  p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_fast_install=yes ;;
-    no) enable_fast_install=no ;;
-    *)
-      enable_fast_install=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_fast_install=yes
-       fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
-else
-  enable_fast_install=yes
-fi;
-
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
-   { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
-  ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
-  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
-  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
-  ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
-  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
-echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
-if test "${lt_cv_path_SED+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for lt_ac_prog in sed gsed; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
-        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
-      fi
-    done
-  done
-done
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
-  test ! -f $lt_ac_sed && continue
-  cat /dev/null > conftest.in
-  lt_ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
-  # Check for GNU sed and select it if it is found.
-  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
-    lt_cv_path_SED=$lt_ac_sed
-    break
-  fi
-  while true; do
-    cat conftest.in conftest.in >conftest.tmp
-    mv conftest.tmp conftest.in
-    cp conftest.in conftest.nl
-    echo >>conftest.nl
-    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
-    cmp -s conftest.out conftest.nl || break
-    # 10000 chars as input seems more than enough
-    test $lt_ac_count -gt 10 && break
-    lt_ac_count=`expr $lt_ac_count + 1`
-    if test $lt_ac_count -gt $lt_ac_max; then
-      lt_ac_max=$lt_ac_count
-      lt_cv_path_SED=$lt_ac_sed
-    fi
-  done
-done
-
-fi
-
-SED=$lt_cv_path_SED
-echo "$as_me:$LINENO: result: $SED" >&5
-echo "${ECHO_T}$SED" >&6
-
-
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
-  withval="$with_gnu_ld"
-  test "$withval" = no || with_gnu_ld=yes
-else
-  with_gnu_ld=no
-fi;
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  echo "$as_me:$LINENO: checking for ld used by $CC" >&5
-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [\\/]* | ?:[\\/]*)
-      re_direlt='/[^/][^/]*/\.\./'
-      # Canonicalize the pathname of ld
-      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-       ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
-else
-  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
-fi
-if test "${lt_cv_path_LD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some variants of GNU ld only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
-      *GNU* | *'with BFD'*)
-       test "$with_gnu_ld" != no && break
-       ;;
-      *)
-       test "$with_gnu_ld" != yes && break
-       ;;
-      esac
-    fi
-  done
-  IFS="$lt_save_ifs"
-else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
-   { (exit 1); exit 1; }; }
-echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
-if test "${lt_cv_prog_gnu_ld+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  lt_cv_prog_gnu_ld=yes
-  ;;
-*)
-  lt_cv_prog_gnu_ld=no
-  ;;
-esac
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
-echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
-if test "${lt_cv_ld_reload_flag+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_ld_reload_flag='-r'
-fi
-echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
-  darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-    else
-      reload_cmds='$LD$reload_flag -o $output$reload_objs'
-    fi
-    ;;
-esac
-
-echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
-echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
-if test "${lt_cv_path_NM+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$NM"; then
-  # Let the user override the test.
-  lt_cv_path_NM="$NM"
-else
-  lt_nm_to_check="${ac_tool_prefix}nm"
-  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
-    lt_nm_to_check="$lt_nm_to_check nm"
-  fi
-  for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
-      test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
-       # Check to see if the nm accepts a BSD-compat flag.
-       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
-       #   nm: unknown option "B" ignored
-       # Tru64's nm complains that /dev/null is an invalid object file
-       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-       */dev/null* | *'Invalid file or object type'*)
-         lt_cv_path_NM="$tmp_nm -B"
-         break
-         ;;
-       *)
-         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
-         */dev/null*)
-           lt_cv_path_NM="$tmp_nm -p"
-           break
-           ;;
-         *)
-           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-           continue # so that we can try to find one that supports BSD flags
-           ;;
-         esac
-         ;;
-       esac
-      fi
-    done
-    IFS="$lt_save_ifs"
-  done
-  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi
-fi
-echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
-echo "${ECHO_T}$lt_cv_path_NM" >&6
-NM="$lt_cv_path_NM"
-
-echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
-  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-echo "${ECHO_T}no, using $LN_S" >&6
-fi
-
-echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
-echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
-if test "${lt_cv_deplibs_check_method+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix4* | aix5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-beos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-bsdi[45]*)
-  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  ;;
-
-cygwin*)
-  # func_win32_libid is a shell function defined in ltmain.sh
-  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-  lt_cv_file_magic_cmd='func_win32_libid'
-  ;;
-
-mingw* | pw32*)
-  # Base MSYS/MinGW do not provide the 'file' command needed by
-  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
-  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
-  ;;
-
-darwin* | rhapsody*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-freebsd* | kfreebsd*-gnu | dragonfly*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-    case $host_cpu in
-    i*86 )
-      # Not sure whether the presence of OpenBSD here was a mistake.
-      # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
-      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-      ;;
-    esac
-  else
-    lt_cv_deplibs_check_method=pass_all
-  fi
-  ;;
-
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  case $host_cpu in
-  ia64*)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
-    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
-    ;;
-  hppa*64*)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
-    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
-    ;;
-  *)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
-    lt_cv_file_magic_test_file=/usr/lib/libc.sl
-    ;;
-  esac
-  ;;
-
-interix3*)
-  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
-  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $LD in
-  *-32|*"-32 ") libmagic=32-bit;;
-  *-n32|*"-n32 ") libmagic=N32;;
-  *-64|*"-64 ") libmagic=64-bit;;
-  *) libmagic=never-match;;
-  esac
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-# This must be Linux ELF.
-linux*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
-  fi
-  ;;
-
-newos6*)
-  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=/usr/lib/libnls.so
-  ;;
-
-nto-qnx*)
-  lt_cv_deplibs_check_method=unknown
-  ;;
-
-openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
-  fi
-  ;;
-
-osf3* | osf4* | osf5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-solaris*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sysv4 | sysv4.3*)
-  case $host_vendor in
-  motorola)
-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
-    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
-    ;;
-  ncr)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  sequent)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
-    ;;
-  sni)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
-    lt_cv_file_magic_test_file=/lib/libc.so
-    ;;
-  siemens)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  pc)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  esac
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-esac
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
-echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
-  enableval="$enable_libtool_lock"
-
-fi;
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *ELF-32*)
-      HPUX_IA64_MODE="32"
-      ;;
-    *ELF-64*)
-      HPUX_IA64_MODE="64"
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-*-*-irix6*)
-  # Find out which ABI we are using.
-  echo '#line 5005 "configure"' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-   if test "$lt_cv_prog_gnu_ld" = yes; then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *32-bit*)
-      LD="${LD-ld} -melf32bsmip"
-      ;;
-    *N32*)
-      LD="${LD-ld} -melf32bmipn32"
-      ;;
-    *64-bit*)
-      LD="${LD-ld} -melf64bmip"
-      ;;
-    esac
-   else
-    case `/usr/bin/file conftest.$ac_objext` in
-    *32-bit*)
-      LD="${LD-ld} -32"
-      ;;
-    *N32*)
-      LD="${LD-ld} -n32"
-      ;;
-    *64-bit*)
-      LD="${LD-ld} -64"
-      ;;
-    esac
-   fi
-  fi
-  rm -rf conftest*
-  ;;
-
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    case `/usr/bin/file conftest.o` in
-    *32-bit*)
-      case $host in
-        x86_64-*linux*)
-          LD="${LD-ld} -m elf_i386"
-          ;;
-        ppc64-*linux*|powerpc64-*linux*)
-          LD="${LD-ld} -m elf32ppclinux"
-          ;;
-        s390x-*linux*)
-          LD="${LD-ld} -m elf_s390"
-          ;;
-        sparc64-*linux*)
-          LD="${LD-ld} -m elf32_sparc"
-          ;;
-      esac
-      ;;
-    *64-bit*)
-      case $host in
-        x86_64-*linux*)
-          LD="${LD-ld} -m elf_x86_64"
-          ;;
-        ppc*-*linux*|powerpc*-*linux*)
-          LD="${LD-ld} -m elf64ppc"
-          ;;
-        s390*-*linux*)
-          LD="${LD-ld} -m elf64_s390"
-          ;;
-        sparc*-*linux*)
-          LD="${LD-ld} -m elf64_sparc"
-          ;;
-      esac
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -belf"
-  echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
-echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
-if test "${lt_cv_cc_needs_belf+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-     cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  lt_cv_cc_needs_belf=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-lt_cv_cc_needs_belf=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-     ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
-echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
-  fi
-  ;;
-sparc*-*solaris*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    case `/usr/bin/file conftest.o` in
-    *64-bit*)
-      case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
-      *)    LD="${LD-ld} -64" ;;
-      esac
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-
-
-esac
-
-need_locks="$enable_libtool_lock"
-
-
-
-for ac_header in dlfcn.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## --------------------------------------- ##
-## Report this to michael@metaparadigm.com ##
-## --------------------------------------- ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CXX"; then
-  ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
-  echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-    test -n "$CXX" && break
-  done
-fi
-if test -z "$CXX"; then
-  ac_ct_CXX=$CXX
-  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CXX"; then
-  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CXX="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  test -n "$ac_ct_CXX" && break
-done
-test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
-
-  CXX=$ac_ct_CXX
-fi
-
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
-     "checking for C++ compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
-  (eval $ac_compiler --version </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
-  (eval $ac_compiler -v </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
-  (eval $ac_compiler -V </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-
-echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_compiler_gnu=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
-GXX=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-CXXFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
-echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cxx_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_prog_cxx_g=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cxx_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
-if test "$ac_test_CXXFLAGS" = set; then
-  CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
-  if test "$GXX" = yes; then
-    CXXFLAGS="-g -O2"
-  else
-    CXXFLAGS="-g"
-  fi
-else
-  if test "$GXX" = yes; then
-    CXXFLAGS="-O2"
-  else
-    CXXFLAGS=
-  fi
-fi
-for ac_declaration in \
-   '' \
-   'extern "C" void std::exit (int) throw (); using std::exit;' \
-   'extern "C" void std::exit (int); using std::exit;' \
-   'extern "C" void exit (int) throw ();' \
-   'extern "C" void exit (int);' \
-   'void exit (int);'
-do
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_declaration
-int
-main ()
-{
-exit (42);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
-  echo '#ifdef __cplusplus' >>confdefs.h
-  echo $ac_declaration      >>confdefs.h
-  echo '#endif'             >>confdefs.h
-fi
-
-ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
-  ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
-echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
-if test -z "$CXXCPP"; then
-  if test "${ac_cv_prog_CXXCPP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-      # Double quotes because CXXCPP needs to be expanded
-    for CXXCPP in "$CXX -E" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether non-existent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
-fi
-
-    done
-    ac_cv_prog_CXXCPP=$CXXCPP
-
-fi
-  CXXCPP=$ac_cv_prog_CXXCPP
-else
-  ac_cv_prog_CXXCPP=$CXXCPP
-fi
-echo "$as_me:$LINENO: result: $CXXCPP" >&5
-echo "${ECHO_T}$CXXCPP" >&6
-ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether non-existent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
-else
-  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-fi
-
-
-ac_ext=f
-ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
-ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_f77_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_F77+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$F77"; then
-  ac_cv_prog_F77="$F77" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-F77=$ac_cv_prog_F77
-if test -n "$F77"; then
-  echo "$as_me:$LINENO: result: $F77" >&5
-echo "${ECHO_T}$F77" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-    test -n "$F77" && break
-  done
-fi
-if test -z "$F77"; then
-  ac_ct_F77=$F77
-  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_F77"; then
-  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_F77="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-ac_ct_F77=$ac_cv_prog_ac_ct_F77
-if test -n "$ac_ct_F77"; then
-  echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
-echo "${ECHO_T}$ac_ct_F77" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  test -n "$ac_ct_F77" && break
-done
-
-  F77=$ac_ct_F77
-fi
-
-
-# Provide some information about the compiler.
-echo "$as_me:6016:" \
-     "checking for Fortran 77 compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
-  (eval $ac_compiler --version </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
-  (eval $ac_compiler -v </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
-  (eval $ac_compiler -V </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-rm -f a.out
-
-# If we don't use `.F' as extension, the preprocessor is not run on the
-# input file.  (Note that this only needs to work for GNU compilers.)
-ac_save_ext=$ac_ext
-ac_ext=F
-echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6
-if test "${ac_cv_f77_compiler_gnu+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-      program main
-#ifndef __GNUC__
-       choke me
-#endif
-
-      end
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_f77_werror_flag"                         || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_compiler_gnu=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_f77_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6
-ac_ext=$ac_save_ext
-ac_test_FFLAGS=${FFLAGS+set}
-ac_save_FFLAGS=$FFLAGS
-FFLAGS=
-echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
-echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_f77_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  FFLAGS=-g
-cat >conftest.$ac_ext <<_ACEOF
-      program main
-
-      end
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_f77_werror_flag"                         || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_prog_f77_g=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_f77_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
-echo "${ECHO_T}$ac_cv_prog_f77_g" >&6
-if test "$ac_test_FFLAGS" = set; then
-  FFLAGS=$ac_save_FFLAGS
-elif test $ac_cv_prog_f77_g = yes; then
-  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
-    FFLAGS="-g -O2"
-  else
-    FFLAGS="-g"
-  fi
-else
-  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
-    FFLAGS="-O2"
-  else
-    FFLAGS=
-  fi
-fi
-
-G77=`test $ac_compiler_gnu = yes && echo yes`
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-
-# find the maximum length of command line arguments
-echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
-echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-    i=0
-  teststring="ABCD"
-
-  case $build_os in
-  msdosdjgpp*)
-    # On DJGPP, this test can blow up pretty badly due to problems in libc
-    # (any single argument exceeding 2000 bytes causes a buffer overrun
-    # during glob expansion).  Even if it were fixed, the result of this
-    # check would be larger than it should be.
-    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
-    ;;
-
-  gnu*)
-    # Under GNU Hurd, this test is not required because there is
-    # no limit to the length of command line arguments.
-    # Libtool will interpret -1 as no limit whatsoever
-    lt_cv_sys_max_cmd_len=-1;
-    ;;
-
-  cygwin* | mingw*)
-    # On Win9x/ME, this test blows up -- it succeeds, but takes
-    # about 5 minutes as the teststring grows exponentially.
-    # Worse, since 9x/ME are not pre-emptively multitasking,
-    # you end up with a "frozen" computer, even though with patience
-    # the test eventually succeeds (with a max line length of 256k).
-    # Instead, let's just punt: use the minimum linelength reported by
-    # all of the supported platforms: 8192 (on NT/2K/XP).
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  amigaos*)
-    # On AmigaOS with pdksh, this test takes hours, literally.
-    # So we just punt and use a minimum line length of 8192.
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
-    # This has been around since 386BSD, at least.  Likely further.
-    if test -x /sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
-    elif test -x /usr/sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
-    else
-      lt_cv_sys_max_cmd_len=65536      # usable default for all BSDs
-    fi
-    # And add a safety zone
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-    ;;
-
-  interix*)
-    # We know the value 262144 and hardcode it with a safety zone (like BSD)
-    lt_cv_sys_max_cmd_len=196608
-    ;;
-
-  osf*)
-    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
-    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
-    # nice to cause kernel panics so lets avoid the loop below.
-    # First set a reasonable default.
-    lt_cv_sys_max_cmd_len=16384
-    #
-    if test -x /sbin/sysconfig; then
-      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
-        *1*) lt_cv_sys_max_cmd_len=-1 ;;
-      esac
-    fi
-    ;;
-  sco3.2v5*)
-    lt_cv_sys_max_cmd_len=102400
-    ;;
-  sysv5* | sco5v6* | sysv4.2uw2*)
-    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
-    if test -n "$kargmax"; then
-      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[        ]//'`
-    else
-      lt_cv_sys_max_cmd_len=32768
-    fi
-    ;;
-  *)
-    # If test is not a shell built-in, we'll probably end up computing a
-    # maximum length that is only half of the actual maximum length, but
-    # we can't tell.
-    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
-    while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
-              = "XX$teststring") >/dev/null 2>&1 &&
-           new_result=`expr "X$teststring" : ".*" 2>&1` &&
-           lt_cv_sys_max_cmd_len=$new_result &&
-           test $i != 17 # 1/2 MB should be enough
-    do
-      i=`expr $i + 1`
-      teststring=$teststring$teststring
-    done
-    teststring=
-    # Add a significant safety factor because C++ compilers can tack on massive
-    # amounts of additional arguments before passing them to the linker.
-    # It appears as though 1/2 is a usable value.
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
-    ;;
-  esac
-
-fi
-
-if test -n $lt_cv_sys_max_cmd_len ; then
-  echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
-echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
-else
-  echo "$as_me:$LINENO: result: none" >&5
-echo "${ECHO_T}none" >&6
-fi
-
-
-
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
-echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[BCDEGRST]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
-
-# Transform an extracted symbol line into a proper C declaration
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-
-# Define system-specific variables.
-case $host_os in
-aix*)
-  symcode='[BCDT]'
-  ;;
-cygwin* | mingw* | pw32*)
-  symcode='[ABCDGISTW]'
-  ;;
-hpux*) # Its linker distinguishes data from code symbols
-  if test "$host_cpu" = ia64; then
-    symcode='[ABCDEGRST]'
-  fi
-  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-  ;;
-linux*)
-  if test "$host_cpu" = ia64; then
-    symcode='[ABCDGIRSTW]'
-    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-  fi
-  ;;
-irix* | nonstopux*)
-  symcode='[BCDEGRST]'
-  ;;
-osf*)
-  symcode='[BCDEGQRST]'
-  ;;
-solaris*)
-  symcode='[BDRT]'
-  ;;
-sco3.2v5*)
-  symcode='[DT]'
-  ;;
-sysv4.2uw2*)
-  symcode='[DT]'
-  ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
-  symcode='[ABDT]'
-  ;;
-sysv4)
-  symcode='[DFNSTU]'
-  ;;
-esac
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
-  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
-  ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
-  symcode='[ABCDGIRSTW]' ;;
-esac
-
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
-
-  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
-  symxfrm="\\1 $ac_symprfx\\2 \\2"
-
-  # Write the raw and C identifiers.
-  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
-
-  # Check to see that the pipe works correctly.
-  pipe_works=no
-
-  rm -f conftest*
-  cat > conftest.$ac_ext <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
-
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    # Now try to grab the symbols.
-    nlist=conftest.nm
-    if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
-  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s "$nlist"; then
-      # Try sorting and uniquifying the output.
-      if sort "$nlist" | uniq > "$nlist"T; then
-       mv -f "$nlist"T "$nlist"
-      else
-       rm -f "$nlist"T
-      fi
-
-      # Make sure that we snagged all the symbols we need.
-      if grep ' nm_test_var$' "$nlist" >/dev/null; then
-       if grep ' nm_test_func$' "$nlist" >/dev/null; then
-         cat <<EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-EOF
-         # Now generate the symbol file.
-         eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
-
-         cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
-  const char *name;
-  lt_ptr_t address;
-}
-lt_preloaded_symbols[] =
-{
-EOF
-         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
-         cat <<\EOF >> conftest.$ac_ext
-  {0, (lt_ptr_t) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif
-EOF
-         # Now try linking the two files.
-         mv conftest.$ac_objext conftstm.$ac_objext
-         lt_save_LIBS="$LIBS"
-         lt_save_CFLAGS="$CFLAGS"
-         LIBS="conftstm.$ac_objext"
-         CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
-         if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext}; then
-           pipe_works=yes
-         fi
-         LIBS="$lt_save_LIBS"
-         CFLAGS="$lt_save_CFLAGS"
-       else
-         echo "cannot find nm_test_func in $nlist" >&5
-       fi
-      else
-       echo "cannot find nm_test_var in $nlist" >&5
-      fi
-    else
-      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
-    fi
-  else
-    echo "$progname: failed program was:" >&5
-    cat conftest.$ac_ext >&5
-  fi
-  rm -f conftest* conftst*
-
-  # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
-    break
-  else
-    lt_cv_sys_global_symbol_pipe=
-  fi
-done
-
-fi
-
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
-  lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-  echo "$as_me:$LINENO: result: failed" >&5
-echo "${ECHO_T}failed" >&6
-else
-  echo "$as_me:$LINENO: result: ok" >&5
-echo "${ECHO_T}ok" >&6
-fi
-
-echo "$as_me:$LINENO: checking for objdir" >&5
-echo $ECHO_N "checking for objdir... $ECHO_C" >&6
-if test "${lt_cv_objdir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  lt_cv_objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-fi
-echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
-echo "${ECHO_T}$lt_cv_objdir" >&6
-objdir=$lt_cv_objdir
-
-
-
-
-
-case $host_os in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
-  fi
-  ;;
-esac
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
-sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Constants:
-rm="rm -f"
-
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AR+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_AR="${ac_tool_prefix}ar"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
-  echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_AR"; then
-  ac_ct_AR=$AR
-  # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_AR"; then
-  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_AR="ar"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
-  echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  AR=$ac_ct_AR
-else
-  AR="$ac_cv_prog_AR"
-fi
-
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_RANLIB="ranlib"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  RANLIB=$ac_ct_RANLIB
-else
-  RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  STRIP=$ac_ct_STRIP
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$SED" && SED=sed
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
-test -z "$ac_objext" && ac_objext=o
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
-  case $host_os in
-  openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
-    ;;
-  *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
-    ;;
-  esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $MAGIC_CMD in
-[\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/${ac_tool_prefix}file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
-      if test -n "$file_magic_test_file"; then
-       case $deplibs_check_method in
-       "file_magic "*)
-         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-           $EGREP "$file_magic_regex" > /dev/null; then
-           :
-         else
-           cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
-         fi ;;
-       esac
-      fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
-  if test -n "$ac_tool_prefix"; then
-    echo "$as_me:$LINENO: checking for file" >&5
-echo $ECHO_N "checking for file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $MAGIC_CMD in
-[\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/file"
-      if test -n "$file_magic_test_file"; then
-       case $deplibs_check_method in
-       "file_magic "*)
-         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-           $EGREP "$file_magic_regex" > /dev/null; then
-           :
-         else
-           cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
-         fi ;;
-       esac
-      fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  else
-    MAGIC_CMD=:
-  fi
-fi
-
-  fi
-  ;;
-esac
-
-enable_dlopen=no
-enable_win32_dll=no
-
-# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
-  enableval="$enable_libtool_lock"
-
-fi;
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-
-# Check whether --with-pic or --without-pic was given.
-if test "${with_pic+set}" = set; then
-  withval="$with_pic"
-  pic_mode="$withval"
-else
-  pic_mode=default
-fi;
-test -z "$pic_mode" && pic_mode=default
-
-# Use C for the default configuration in the libtool script
-tagname=
-lt_save_CC="$CC"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-objext=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}\n'
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
-
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
-
-
-
-lt_prog_compiler_no_builtin_flag=
-
-if test "$GCC" = yes; then
-  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
-
-
-echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_rtti_exceptions=no
-  ac_outfile=conftest.$ac_objext
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="-fno-rtti -fno-exceptions"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7077: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:7081: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_rtti_exceptions=yes
-     fi
-   fi
-   $rm conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
-
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
-    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
-else
-    :
-fi
-
-fi
-
-lt_prog_compiler_wl=
-lt_prog_compiler_pic=
-lt_prog_compiler_static=
-
-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
-
-  if test "$GCC" = yes; then
-    lt_prog_compiler_wl='-Wl,'
-    lt_prog_compiler_static='-static'
-
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
-      ;;
-
-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic='-DDLL_EXPORT'
-      ;;
-
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic='-fno-common'
-      ;;
-
-    interix3*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      lt_prog_compiler_can_build_shared=no
-      enable_shared=no
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       lt_prog_compiler_pic=-Kconform_pic
-      fi
-      ;;
-
-    hpux*)
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       # +Z the default
-       ;;
-      *)
-       lt_prog_compiler_pic='-fPIC'
-       ;;
-      esac
-      ;;
-
-    *)
-      lt_prog_compiler_pic='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      lt_prog_compiler_wl='-Wl,'
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static='-Bstatic'
-      else
-       lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-      darwin*)
-        # PIC is the default on this platform
-        # Common symbols not allowed in MH_DYLIB files
-       case $cc_basename in
-         xlc*)
-         lt_prog_compiler_pic='-qnocommon'
-         lt_prog_compiler_wl='-Wl,'
-         ;;
-       esac
-       ;;
-
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic='-DDLL_EXPORT'
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      lt_prog_compiler_wl='-Wl,'
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       # +Z the default
-       ;;
-      *)
-       lt_prog_compiler_pic='+Z'
-       ;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static='${wl}-a ${wl}archive'
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      lt_prog_compiler_wl='-Wl,'
-      # PIC (with -KPIC) is the default.
-      lt_prog_compiler_static='-non_shared'
-      ;;
-
-    newsos6)
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
-
-    linux*)
-      case $cc_basename in
-      icc* | ecc*)
-       lt_prog_compiler_wl='-Wl,'
-       lt_prog_compiler_pic='-KPIC'
-       lt_prog_compiler_static='-static'
-        ;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-       # which looks to be a dead project)
-       lt_prog_compiler_wl='-Wl,'
-       lt_prog_compiler_pic='-fpic'
-       lt_prog_compiler_static='-Bstatic'
-        ;;
-      ccc*)
-        lt_prog_compiler_wl='-Wl,'
-        # All Alpha code is PIC.
-        lt_prog_compiler_static='-non_shared'
-        ;;
-      esac
-      ;;
-
-    osf3* | osf4* | osf5*)
-      lt_prog_compiler_wl='-Wl,'
-      # All OSF/1 code is PIC.
-      lt_prog_compiler_static='-non_shared'
-      ;;
-
-    solaris*)
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95*)
-       lt_prog_compiler_wl='-Qoption ld ';;
-      *)
-       lt_prog_compiler_wl='-Wl,';;
-      esac
-      ;;
-
-    sunos4*)
-      lt_prog_compiler_wl='-Qoption ld '
-      lt_prog_compiler_pic='-PIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
-
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-       lt_prog_compiler_pic='-Kconform_pic'
-       lt_prog_compiler_static='-Bstatic'
-      fi
-      ;;
-
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
-
-    unicos*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_can_build_shared=no
-      ;;
-
-    uts4*)
-      lt_prog_compiler_pic='-pic'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
-
-    *)
-      lt_prog_compiler_can_build_shared=no
-      ;;
-    esac
-  fi
-
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic" >&6
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic"; then
-
-echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
-if test "${lt_prog_compiler_pic_works+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_prog_compiler_pic_works=no
-  ac_outfile=conftest.$ac_objext
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7345: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:7349: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_prog_compiler_pic_works=yes
-     fi
-   fi
-   $rm conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
-
-if test x"$lt_prog_compiler_pic_works" = xyes; then
-    case $lt_prog_compiler_pic in
-     "" | " "*) ;;
-     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
-     esac
-else
-    lt_prog_compiler_pic=
-     lt_prog_compiler_can_build_shared=no
-fi
-
-fi
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic=
-    ;;
-  *)
-    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
-    ;;
-esac
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
-if test "${lt_prog_compiler_static_works+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_prog_compiler_static_works=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
-   printf "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         lt_prog_compiler_static_works=yes
-       fi
-     else
-       lt_prog_compiler_static_works=yes
-     fi
-   fi
-   $rm conftest*
-   LDFLAGS="$save_LDFLAGS"
-
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
-
-if test x"$lt_prog_compiler_static_works" = xyes; then
-    :
-else
-    lt_prog_compiler_static=
-fi
-
-
-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_c_o=no
-   $rm -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7449: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:7453: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_c_o=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $rm conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
-   $rm out/* && rmdir out
-   cd ..
-   rmdir conftest
-   $rm conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
-
-
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6
-  if test "$hard_links" = no; then
-    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-
-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
-
-  runpath_var=
-  allow_undefined_flag=
-  enable_shared_with_static_runtimes=no
-  archive_cmds=
-  archive_expsym_cmds=
-  old_archive_From_new_cmds=
-  old_archive_from_expsyms_cmds=
-  export_dynamic_flag_spec=
-  whole_archive_flag_spec=
-  thread_safe_flag_spec=
-  hardcode_libdir_flag_spec=
-  hardcode_libdir_flag_spec_ld=
-  hardcode_libdir_separator=
-  hardcode_direct=no
-  hardcode_minus_L=no
-  hardcode_shlibpath_var=unsupported
-  link_all_deplibs=unknown
-  hardcode_automatic=no
-  module_cmds=
-  module_expsym_cmds=
-  always_export_symbols=no
-  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  include_expsyms=
-  # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  extract_expsyms_cmds=
-  # Just being paranoid about ensuring that cc_basename is set.
-  for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-  case $host_os in
-  cygwin* | mingw* | pw32*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-  esac
-
-  ld_shlibs=yes
-  if test "$with_gnu_ld" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
-
-    # Set some defaults for GNU ld with shared library support. These
-    # are reset later if shared libraries are not supported. Putting them
-    # here allows them to be overridden if necessary.
-    runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
-    export_dynamic_flag_spec='${wl}--export-dynamic'
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
-       whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-       whole_archive_flag_spec=
-    fi
-    supports_anon_versioning=no
-    case `$LD -v 2>/dev/null` in
-      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
-      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-      *\ 2.11.*) ;; # other 2.11 versions
-      *) supports_anon_versioning=yes ;;
-    esac
-
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix3* | aix4* | aix5*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-       ld_shlibs=no
-       cat <<EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-EOF
-      fi
-      ;;
-
-    amigaos*)
-      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-
-      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we can't use
-      # them.
-      ld_shlibs=no
-      ;;
-
-    beos*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       allow_undefined_flag=unsupported
-       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-       # support --undefined.  This deserves some investigation.  FIXME
-       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-       ld_shlibs=no
-      fi
-      ;;
-
-    cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
-      # as there is no search path for DLLs.
-      hardcode_libdir_flag_spec='-L$libdir'
-      allow_undefined_flag=unsupported
-      always_export_symbols=no
-      enable_shared_with_static_runtimes=yes
-      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
-
-      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-       # If the export-symbols file already is a .def file (1st line
-       # is EXPORTS), use it as is; otherwise, prepend...
-       archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname.def;
-       else
-         echo EXPORTS > $output_objdir/$soname.def;
-         cat $export_symbols >> $output_objdir/$soname.def;
-       fi~
-       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      else
-       ld_shlibs=no
-      fi
-      ;;
-
-    interix3*)
-      hardcode_direct=no
-      hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec='${wl}-E'
-      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-      # Instead, shared libraries are loaded at an image base (0x10000000 by
-      # default) and relocated if they conflict, which is a slow very memory
-      # consuming and fragmenting process.  To avoid this, we pick a random,
-      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      ;;
-
-    linux*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       tmp_addflag=
-       case $cc_basename,$host_cpu in
-       pgcc*)                          # Portland Group C compiler
-         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag'
-         ;;
-       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
-         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag -Mnomain' ;;
-       ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
-         tmp_addflag=' -i_dynamic' ;;
-       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
-         tmp_addflag=' -i_dynamic -nofor_main' ;;
-       ifc* | ifort*)                  # Intel Fortran compiler
-         tmp_addflag=' -nofor_main' ;;
-       esac
-       archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
-       if test $supports_anon_versioning = yes; then
-         archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
-  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-  $echo "local: *; };" >> $output_objdir/$libname.ver~
-         $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-       fi
-       link_all_deplibs=no
-      else
-       ld_shlibs=no
-      fi
-      ;;
-
-    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-       wlarc=
-      else
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
-
-    solaris*)
-      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-       ld_shlibs=no
-       cat <<EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-EOF
-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       ld_shlibs=no
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
-       ld_shlibs=no
-       cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
-       ;;
-       *)
-         if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-           hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
-           archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
-           archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
-         else
-           ld_shlibs=no
-         fi
-       ;;
-      esac
-      ;;
-
-    sunos4*)
-      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
-
-    *)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       ld_shlibs=no
-      fi
-      ;;
-    esac
-
-    if test "$ld_shlibs" = no; then
-      runpath_var=
-      hardcode_libdir_flag_spec=
-      export_dynamic_flag_spec=
-      whole_archive_flag_spec=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      allow_undefined_flag=unsupported
-      always_export_symbols=yes
-      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      hardcode_minus_L=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-       # Neither direct hardcoding nor static linking is supported with a
-       # broken collect2.
-       hardcode_direct=unsupported
-      fi
-      ;;
-
-    aix4* | aix5*)
-      if test "$host_cpu" = ia64; then
-       # On IA64, the linker does run time linking by default, so we don't
-       # have to do anything special.
-       aix_use_runtimelinking=no
-       exp_sym_flag='-Bexport'
-       no_entry_flag=""
-      else
-       # If we're using GNU nm, then we don't want the "-C" option.
-       # -C means demangle to AIX nm, but means don't demangle with GNU nm
-       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-         export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-       else
-         export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-       fi
-       aix_use_runtimelinking=no
-
-       # Test if we are trying to use run time linking or normal
-       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-       # need to do runtime linking.
-       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
-         for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-           aix_use_runtimelinking=yes
-           break
-         fi
-         done
-         ;;
-       esac
-
-       exp_sym_flag='-bexport'
-       no_entry_flag='-bnoentry'
-      fi
-
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-      archive_cmds=''
-      hardcode_direct=yes
-      hardcode_libdir_separator=':'
-      link_all_deplibs=yes
-
-      if test "$GCC" = yes; then
-       case $host_os in aix4.[012]|aix4.[012].*)
-       # We only want to do this on AIX 4.2 and lower, the check
-       # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
-         if test -f "$collect2name" && \
-          strings "$collect2name" | grep resolve_lib_name >/dev/null
-         then
-         # We have reworked collect2
-         hardcode_direct=yes
-         else
-         # We have old collect2
-         hardcode_direct=unsupported
-         # It fails to find uninstalled libraries when the uninstalled
-         # path is not listed in the libpath.  Setting hardcode_minus_L
-         # to unsupported forces relinking
-         hardcode_minus_L=yes
-         hardcode_libdir_flag_spec='-L$libdir'
-         hardcode_libdir_separator=
-         fi
-         ;;
-       esac
-       shared_flag='-shared'
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag="$shared_flag "'${wl}-G'
-       fi
-      else
-       # not using gcc
-       if test "$host_cpu" = ia64; then
-       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-       # chokes on -Wl,-G. The following line is correct:
-         shared_flag='-G'
-       else
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag='${wl}-G'
-         else
-           shared_flag='${wl}-bM:SRE'
-         fi
-       fi
-      fi
-
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to export.
-      always_export_symbols=yes
-      if test "$aix_use_runtimelinking" = yes; then
-       # Warning - without using the other runtime loading flags (-brtl),
-       # -berok will link without error, but may produce a broken library.
-       allow_undefined_flag='-berok'
-       # Determine the default libpath from the value encoded in an empty executable.
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
-       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-       archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-       else
-       if test "$host_cpu" = ia64; then
-         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
-         allow_undefined_flag="-z nodefs"
-         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-       else
-        # Determine the default libpath from the value encoded in an empty executable.
-        cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
-        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-         # Warning - without using the other run time loading flags,
-         # -berok will link without error, but may produce a broken library.
-         no_undefined_flag=' ${wl}-bernotok'
-         allow_undefined_flag=' ${wl}-berok'
-         # Exported symbols can be pulled into shared objects from archives
-         whole_archive_flag_spec='$convenience'
-         archive_cmds_need_lc=yes
-         # This is similar to how AIX traditionally builds its shared libraries.
-         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-       fi
-      fi
-      ;;
-
-    amigaos*)
-      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      # see comment about different semantics on the GNU ld section
-      ld_shlibs=no
-      ;;
-
-    bsdi[45]*)
-      export_dynamic_flag_spec=-rdynamic
-      ;;
-
-    cygwin* | mingw* | pw32*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      hardcode_libdir_flag_spec=' '
-      allow_undefined_flag=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      old_archive_From_new_cmds='true'
-      # FIXME: Should let the user specify the lib program.
-      old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes=yes
-      ;;
-
-    darwin* | rhapsody*)
-      case $host_os in
-        rhapsody* | darwin1.[012])
-         allow_undefined_flag='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[012])
-               allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-      esac
-      archive_cmds_need_lc=no
-      hardcode_direct=no
-      hardcode_automatic=yes
-      hardcode_shlibpath_var=unsupported
-      whole_archive_flag_spec=''
-      link_all_deplibs=yes
-    if test "$GCC" = yes ; then
-       output_verbose_link_cmd='echo'
-        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-      module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    else
-      case $cc_basename in
-        xlc*)
-         output_verbose_link_cmd='echo'
-         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-         module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          ;;
-       *)
-         ld_shlibs=no
-          ;;
-      esac
-    fi
-      ;;
-
-    dgux*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_shlibpath_var=no
-      ;;
-
-    freebsd1*)
-      ld_shlibs=no
-      ;;
-
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
-
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      hardcode_shlibpath_var=no
-      ;;
-
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
-      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
-
-    # GNU/kFreeBSD uses gcc -shared to do shared libraries.
-    kfreebsd*-gnu)
-      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      link_all_deplibs=no
-      ;;
-
-    hpux9*)
-      if test "$GCC" = yes; then
-       archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-       archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      fi
-      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator=:
-      hardcode_direct=yes
-
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      hardcode_minus_L=yes
-      export_dynamic_flag_spec='${wl}-E'
-      ;;
-
-    hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-       hardcode_libdir_separator=:
-
-       hardcode_direct=yes
-       export_dynamic_flag_spec='${wl}-E'
-
-       # hardcode_minus_L: Not really in the search PATH,
-       # but as the default location of the library.
-       hardcode_minus_L=yes
-      fi
-      ;;
-
-    hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       case $host_cpu in
-       hppa*64*)
-         archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      else
-       case $host_cpu in
-       hppa*64*)
-         archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      fi
-      if test "$with_gnu_ld" = no; then
-       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-       hardcode_libdir_separator=:
-
-       case $host_cpu in
-       hppa*64*|ia64*)
-         hardcode_libdir_flag_spec_ld='+b $libdir'
-         hardcode_direct=no
-         hardcode_shlibpath_var=no
-         ;;
-       *)
-         hardcode_direct=yes
-         export_dynamic_flag_spec='${wl}-E'
-
-         # hardcode_minus_L: Not really in the search PATH,
-         # but as the default location of the library.
-         hardcode_minus_L=yes
-         ;;
-       esac
-      fi
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-       archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       hardcode_libdir_flag_spec_ld='-rpath $libdir'
-      fi
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      link_all_deplibs=yes
-      ;;
-
-    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
-
-    newsos6)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct=yes
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      hardcode_shlibpath_var=no
-      ;;
-
-    openbsd*)
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-       export_dynamic_flag_spec='${wl}-E'
-      else
-       case $host_os in
-        openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-          archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-          hardcode_libdir_flag_spec='-R$libdir'
-          ;;
-        *)
-          archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-          hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-          ;;
-       esac
-      fi
-      ;;
-
-    os2*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      allow_undefined_flag=unsupported
-      archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
-
-    osf3*)
-      if test "$GCC" = yes; then
-       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-       allow_undefined_flag=' -expect_unresolved \*'
-       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      ;;
-
-    osf4* | osf5*)     # as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      else
-       allow_undefined_flag=' -expect_unresolved \*'
-       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
-
-       # Both c and cxx compiler support -rpath directly
-       hardcode_libdir_flag_spec='-rpath $libdir'
-      fi
-      hardcode_libdir_separator=:
-      ;;
-
-    solaris*)
-      no_undefined_flag=' -z text'
-      if test "$GCC" = yes; then
-       wlarc='${wl}'
-       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
-      else
-       wlarc=''
-       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-       $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-      fi
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_shlibpath_var=no
-      case $host_os in
-      solaris2.[0-5] | solaris2.[0-5].*) ;;
-      *)
-       # The compiler driver will combine linker options so we
-       # cannot just pass the convience library names through
-       # without $wl, iff we do not link with $LD.
-       # Luckily, gcc supports the same syntax we need for Sun Studio.
-       # Supported since Solaris 2.6 (maybe 2.5.1?)
-       case $wlarc in
-       '')
-         whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
-       *)
-         whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
-       esac ;;
-      esac
-      link_all_deplibs=yes
-      ;;
-
-    sunos4*)
-      if test "x$host_vendor" = xsequent; then
-       # Use $CC to link under sequent, because it throws in some extra .o
-       # files that make .init and .fini sections work.
-       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      hardcode_shlibpath_var=no
-      ;;
-
-    sysv4)
-      case $host_vendor in
-       sni)
-         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         hardcode_direct=yes # is this really true???
-       ;;
-       siemens)
-         ## LD is ld it makes a PLAMLIB
-         ## CC just makes a GrossModule.
-         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-         reload_cmds='$CC -r -o $output$reload_objs'
-         hardcode_direct=no
-        ;;
-       motorola)
-         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
-       ;;
-      esac
-      runpath_var='LD_RUN_PATH'
-      hardcode_shlibpath_var=no
-      ;;
-
-    sysv4.3*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_shlibpath_var=no
-      export_dynamic_flag_spec='-Bexport'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_shlibpath_var=no
-       runpath_var=LD_RUN_PATH
-       hardcode_runpath_var=yes
-       ld_shlibs=yes
-      fi
-      ;;
-
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
-      no_undefined_flag='${wl}-z,text'
-      archive_cmds_need_lc=no
-      hardcode_shlibpath_var=no
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-       archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
-      # link with -lc, and that would cause any symbols used from libc to
-      # always be unresolved, which means just about no library would
-      # ever link correctly.  If we're not using GNU ld we use -z text
-      # though, which does catch some bad symbols but isn't as heavy-handed
-      # as -z defs.
-      no_undefined_flag='${wl}-z,text'
-      allow_undefined_flag='${wl}-z,nodefs'
-      archive_cmds_need_lc=no
-      hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-      hardcode_libdir_separator=':'
-      link_all_deplibs=yes
-      export_dynamic_flag_spec='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-       archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    uts4*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_shlibpath_var=no
-      ;;
-
-    *)
-      ld_shlibs=no
-      ;;
-    esac
-  fi
-
-echo "$as_me:$LINENO: result: $ld_shlibs" >&5
-echo "${ECHO_T}$ld_shlibs" >&6
-test "$ld_shlibs" = no && can_build_shared=no
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc" in
-x|xyes)
-  # Assume -lc should be added
-  archive_cmds_need_lc=yes
-
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $archive_cmds in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
-      $rm conftest*
-      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl
-       pic_flag=$lt_prog_compiler_pic
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag
-        allow_undefined_flag=
-        if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-  (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-        then
-         archive_cmds_need_lc=no
-        else
-         archive_cmds_need_lc=yes
-        fi
-        allow_undefined_flag=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $rm conftest*
-      echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
-echo "${ECHO_T}$archive_cmds_need_lc" >&6
-      ;;
-    esac
-  fi
-  ;;
-esac
-
-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
-  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
-else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
-
-aix4* | aix5*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[01] | aix4.[01].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-          echo ' yes '
-          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
-       :
-      else
-       can_build_shared=no
-      fi
-      ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
-
-amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
-  ;;
-
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
-
-bsdi[45]*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
-
-cygwin* | mingw* | pw32*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
-
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32*)
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $rm \$dlpath'
-    shlibpath_overrides_runpath=yes
-
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
-      ;;
-    mingw*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-      fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    esac
-    ;;
-
-  *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
-    ;;
-  esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
-
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
-  if test "$GCC" = yes; then
-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
-  else
-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
-  fi
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
-
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
-kfreebsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[123]*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[01]* | freebsdelf3.[01]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
-  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  freebsd*) # from 4.6 on
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
-
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  case $host_cpu in
-  ia64*)
-    shrext_cmds='.so'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-    fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-   hppa*64*)
-     shrext_cmds='.sl'
-     hardcode_into_libs=yes
-     dynamic_linker="$host_os dld.sl"
-     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-     soname_spec='${libname}${release}${shared_ext}$major'
-     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-     ;;
-   *)
-    shrext_cmds='.sl'
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    ;;
-  esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
-
-interix3*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-       if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux
-       else
-               version_type=irix
-       fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  hardcode_into_libs=yes
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
-
-# This must be Linux ELF.
-linux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  # Append ld.so.conf contents to the search path
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,       ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
-  fi
-
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
-
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
-
-knetbsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
-
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-nto-qnx*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-openbsd*)
-  version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
-  need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-    *)                         need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[89] | openbsd2.[89].*)
-       shlibpath_overrides_runpath=no
-       ;;
-      *)
-       shlibpath_overrides_runpath=yes
-       ;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
-
-os2*)
-  libname_spec='$name'
-  shrext_cmds=".dll"
-  need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      export_dynamic_flag_spec='${wl}-Blargedynsym'
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-    shlibpath_overrides_runpath=no
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    shlibpath_overrides_runpath=yes
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-       ;;
-    esac
-  fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
-
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" || \
-   test -n "$runpath_var" || \
-   test "X$hardcode_automatic" = "Xyes" ; then
-
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
-     test "$hardcode_minus_L" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action=unsupported
-fi
-echo "$as_me:$LINENO: result: $hardcode_action" >&5
-echo "${ECHO_T}$hardcode_action" >&6
-
-if test "$hardcode_action" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-
-striplib=
-old_striplib=
-echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
-echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-   darwin*)
-       if test -n "$STRIP" ; then
-         striplib="$STRIP -x"
-         echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-       else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-       ;;
-   *)
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-    ;;
-  esac
-fi
-
-if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
-
-  case $host_os in
-  beos*)
-    lt_cv_dlopen="load_add_on"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ;;
-
-  mingw* | pw32*)
-    lt_cv_dlopen="LoadLibrary"
-    lt_cv_dlopen_libs=
-   ;;
-
-  cygwin*)
-    lt_cv_dlopen="dlopen"
-    lt_cv_dlopen_libs=
-   ;;
-
-  darwin*)
-  # if libdl is installed we need to link against it
-    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dlopen ();
-int
-main ()
-{
-dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_dl_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dl_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
-if test $ac_cv_lib_dl_dlopen = yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-
-    lt_cv_dlopen="dyld"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-
-fi
-
-   ;;
-
-  *)
-    echo "$as_me:$LINENO: checking for shl_load" >&5
-echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
-if test "${ac_cv_func_shl_load+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define shl_load innocuous_shl_load
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char shl_load (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef shl_load
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char shl_load ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_shl_load) || defined (__stub___shl_load)
-choke me
-#else
-char (*f) () = shl_load;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != shl_load;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_shl_load=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_shl_load=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
-echo "${ECHO_T}$ac_cv_func_shl_load" >&6
-if test $ac_cv_func_shl_load = yes; then
-  lt_cv_dlopen="shl_load"
-else
-  echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
-echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char shl_load ();
-int
-main ()
-{
-shl_load ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_dld_shl_load=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dld_shl_load=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
-if test $ac_cv_lib_dld_shl_load = yes; then
-  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
-else
-  echo "$as_me:$LINENO: checking for dlopen" >&5
-echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
-if test "${ac_cv_func_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define dlopen innocuous_dlopen
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dlopen (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef dlopen
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dlopen ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_dlopen) || defined (__stub___dlopen)
-choke me
-#else
-char (*f) () = dlopen;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != dlopen;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
-echo "${ECHO_T}$ac_cv_func_dlopen" >&6
-if test $ac_cv_func_dlopen = yes; then
-  lt_cv_dlopen="dlopen"
-else
-  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dlopen ();
-int
-main ()
-{
-dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_dl_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dl_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
-if test $ac_cv_lib_dl_dlopen = yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-  echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
-echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsvld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dlopen ();
-int
-main ()
-{
-dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_svld_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_svld_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
-if test $ac_cv_lib_svld_dlopen = yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
-else
-  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
-echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dld_link ();
-int
-main ()
-{
-dld_link ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_dld_dld_link=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dld_dld_link=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
-if test $ac_cv_lib_dld_dld_link = yes; then
-  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-    ;;
-  esac
-
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
-    enable_dlopen=no
-  fi
-
-  case $lt_cv_dlopen in
-  dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
-    save_LDFLAGS="$LDFLAGS"
-    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
-    save_LIBS="$LIBS"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
-
-    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
-echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
-if test "${lt_cv_dlopen_self+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-         if test "$cross_compiling" = yes; then :
-  lt_cv_dlopen_self=cross
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<EOF
-#line 9807 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL          RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL                DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL                0
-#  endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW         DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW       RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW     DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW     0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
-
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
-  else
-    puts (dlerror ());
-
-    exit (status);
-}
-EOF
-  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&5 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
-      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
-      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
-    esac
-  else :
-    # compilation failed
-    lt_cv_dlopen_self=no
-  fi
-fi
-rm -fr conftest*
-
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self" >&6
-
-    if test "x$lt_cv_dlopen_self" = xyes; then
-      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
-      echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
-echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
-if test "${lt_cv_dlopen_self_static+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-         if test "$cross_compiling" = yes; then :
-  lt_cv_dlopen_self_static=cross
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<EOF
-#line 9907 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL          RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL                DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL                0
-#  endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW         DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW       RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW     DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW     0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
-
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
-  else
-    puts (dlerror ());
-
-    exit (status);
-}
-EOF
-  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&5 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
-      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
-      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
-    esac
-  else :
-    # compilation failed
-    lt_cv_dlopen_self_static=no
-  fi
-fi
-rm -fr conftest*
-
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
-    fi
-
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
-    ;;
-  esac
-
-  case $lt_cv_dlopen_self in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
-
-  case $lt_cv_dlopen_self_static in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
-  esac
-fi
-
-
-# Report which library types will actually be built
-echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $can_build_shared" >&5
-echo "${ECHO_T}$can_build_shared" >&6
-
-echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case $host_os in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
-  fi
-  ;;
-
-aix4* | aix5*)
-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-    test "$enable_shared" = yes && enable_static=no
-  fi
-    ;;
-esac
-echo "$as_me:$LINENO: result: $enable_shared" >&5
-echo "${ECHO_T}$enable_shared" >&6
-
-echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-echo "$as_me:$LINENO: result: $enable_static" >&5
-echo "${ECHO_T}$enable_static" >&6
-
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # See if we are running on zsh, and set the options which allow our commands through
-  # without removal of \ escapes.
-  if test -n "${ZSH_VERSION+set}" ; then
-    setopt NO_GLOB_SUBST
-  fi
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
-    SED SHELL STRIP \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    compiler \
-    CC \
-    LD \
-    lt_prog_compiler_wl \
-    lt_prog_compiler_pic \
-    lt_prog_compiler_static \
-    lt_prog_compiler_no_builtin_flag \
-    export_dynamic_flag_spec \
-    thread_safe_flag_spec \
-    whole_archive_flag_spec \
-    enable_shared_with_static_runtimes \
-    old_archive_cmds \
-    old_archive_from_new_cmds \
-    predep_objects \
-    postdep_objects \
-    predeps \
-    postdeps \
-    compiler_lib_search_path \
-    archive_cmds \
-    archive_expsym_cmds \
-    postinstall_cmds \
-    postuninstall_cmds \
-    old_archive_from_expsyms_cmds \
-    allow_undefined_flag \
-    no_undefined_flag \
-    export_symbols_cmds \
-    hardcode_libdir_flag_spec \
-    hardcode_libdir_flag_spec_ld \
-    hardcode_libdir_separator \
-    hardcode_automatic \
-    module_cmds \
-    module_expsym_cmds \
-    lt_cv_prog_compiler_c_o \
-    exclude_expsyms \
-    include_expsyms; do
-
-    case $var in
-    old_archive_cmds | \
-    old_archive_from_new_cmds | \
-    archive_cmds | \
-    archive_expsym_cmds | \
-    module_cmds | \
-    module_expsym_cmds | \
-    old_archive_from_expsyms_cmds | \
-    export_symbols_cmds | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
-
-  case $lt_echo in
-  *'\$0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-    ;;
-  esac
-
-cfgfile="${ofile}T"
-  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
-  $rm -f "$cfgfile"
-  { echo "$as_me:$LINENO: creating $ofile" >&5
-echo "$as_me: creating $ofile" >&6;}
-
-  cat <<__EOF__ >> "$cfgfile"
-#! $SHELL
-
-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
-#
-# This file is part of GNU Libtool:
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="$SED -e 1s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-# The names of the tagged configurations supported by this script.
-available_tags=
-
-# ### BEGIN LIBTOOL CONFIG
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
-
-# A language-specific compiler.
-CC=$lt_compiler
-
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_LD
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A symbol stripping program
-STRIP=$lt_STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds
-archive_expsym_cmds=$lt_archive_expsym_cmds
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_module_cmds
-module_expsym_cmds=$lt_module_expsym_cmds
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_predep_objects
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
-
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator
-
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$hardcode_automatic
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path"
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms
-
-# ### END LIBTOOL CONFIG
-
-__EOF__
-
-
-  case $host_os in
-  aix3*)
-    cat <<\EOF >> "$cfgfile"
-
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
-fi
-EOF
-    ;;
-  esac
-
-  # We use sed instead of cat because bash on DJGPP gets confused if
-  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-  # text mode, it properly converts lines to CR/LF.  This bash problem
-  # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
-
-  mv -f "$cfgfile" "$ofile" || \
-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
-  chmod +x "$ofile"
-
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-  if test -f "$ltmain_in"; then
-    test -f Makefile && make "$ltmain"
-  fi
-fi
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC="$lt_save_CC"
-
-
-# Check whether --with-tags or --without-tags was given.
-if test "${with_tags+set}" = set; then
-  withval="$with_tags"
-  tagnames="$withval"
-fi;
-
-if test -f "$ltmain" && test -n "$tagnames"; then
-  if test ! -f "${ofile}"; then
-    { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
-echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
-  fi
-
-  if test -z "$LTCC"; then
-    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
-    if test -z "$LTCC"; then
-      { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
-echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
-    else
-      { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
-echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
-    fi
-  fi
-  if test -z "$LTCFLAGS"; then
-    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
-  fi
-
-  # Extract list of available tagged configurations in $ofile.
-  # Note that this assumes the entire list is on one line.
-  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
-
-  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-  for tagname in $tagnames; do
-    IFS="$lt_save_ifs"
-    # Check whether tagname contains only valid characters
-    case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
-    "") ;;
-    *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
-echo "$as_me: error: invalid tag name: $tagname" >&2;}
-   { (exit 1); exit 1; }; }
-       ;;
-    esac
-
-    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
-    then
-      { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
-echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-
-    # Update the list of available tags.
-    if test -n "$tagname"; then
-      echo appending configuration tag \"$tagname\" to $ofile
-
-      case $tagname in
-      CXX)
-       if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-           ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-           (test "X$CXX" != "Xg++"))) ; then
-         ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-
-archive_cmds_need_lc_CXX=no
-allow_undefined_flag_CXX=
-always_export_symbols_CXX=no
-archive_expsym_cmds_CXX=
-export_dynamic_flag_spec_CXX=
-hardcode_direct_CXX=no
-hardcode_libdir_flag_spec_CXX=
-hardcode_libdir_flag_spec_ld_CXX=
-hardcode_libdir_separator_CXX=
-hardcode_minus_L_CXX=no
-hardcode_shlibpath_var_CXX=unsupported
-hardcode_automatic_CXX=no
-module_cmds_CXX=
-module_expsym_cmds_CXX=
-link_all_deplibs_CXX=unknown
-old_archive_cmds_CXX=$old_archive_cmds
-no_undefined_flag_CXX=
-whole_archive_flag_spec_CXX=
-enable_shared_with_static_runtimes_CXX=no
-
-# Dependencies to place before and after the object being linked:
-predep_objects_CXX=
-postdep_objects_CXX=
-predeps_CXX=
-postdeps_CXX=
-compiler_lib_search_path_CXX=
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-objext_CXX=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
-
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
-
-
-# Allow CC to be a program name with arguments.
-lt_save_CC=$CC
-lt_save_LD=$LD
-lt_save_GCC=$GCC
-GCC=$GXX
-lt_save_with_gnu_ld=$with_gnu_ld
-lt_save_path_LD=$lt_cv_path_LD
-if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
-  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
-else
-  $as_unset lt_cv_prog_gnu_ld
-fi
-if test -n "${lt_cv_path_LDCXX+set}"; then
-  lt_cv_path_LD=$lt_cv_path_LDCXX
-else
-  $as_unset lt_cv_path_LD
-fi
-test -z "${LDCXX+set}" || LD=$LDCXX
-CC=${CXX-"c++"}
-compiler=$CC
-compiler_CXX=$CC
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-
-# We don't want -fno-exception wen compiling C++ code, so set the
-# no_builtin_flag separately
-if test "$GXX" = yes; then
-  lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
-else
-  lt_prog_compiler_no_builtin_flag_CXX=
-fi
-
-if test "$GXX" = yes; then
-  # Set up default GNU C++ configuration
-
-
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
-  withval="$with_gnu_ld"
-  test "$withval" = no || with_gnu_ld=yes
-else
-  with_gnu_ld=no
-fi;
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  echo "$as_me:$LINENO: checking for ld used by $CC" >&5
-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [\\/]* | ?:[\\/]*)
-      re_direlt='/[^/][^/]*/\.\./'
-      # Canonicalize the pathname of ld
-      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-       ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
-else
-  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
-fi
-if test "${lt_cv_path_LD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some variants of GNU ld only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
-      *GNU* | *'with BFD'*)
-       test "$with_gnu_ld" != no && break
-       ;;
-      *)
-       test "$with_gnu_ld" != yes && break
-       ;;
-      esac
-    fi
-  done
-  IFS="$lt_save_ifs"
-else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
-   { (exit 1); exit 1; }; }
-echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
-if test "${lt_cv_prog_gnu_ld+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  lt_cv_prog_gnu_ld=yes
-  ;;
-*)
-  lt_cv_prog_gnu_ld=no
-  ;;
-esac
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-
-  # Check if GNU C++ uses GNU ld as the underlying linker, since the
-  # archiving commands below assume that GNU ld is being used.
-  if test "$with_gnu_ld" = yes; then
-    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-    archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
-    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
-    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
-    #     investigate it a little bit more. (MM)
-    wlarc='${wl}'
-
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
-       grep 'no-whole-archive' > /dev/null; then
-      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    else
-      whole_archive_flag_spec_CXX=
-    fi
-  else
-    with_gnu_ld=no
-    wlarc=
-
-    # A generic and very simple default shared library creation
-    # command for GNU C++ for the case where it uses the native
-    # linker, instead of GNU ld.  If possible, this setting should
-    # overridden to take advantage of the native linker features on
-    # the platform it is being used on.
-    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-  fi
-
-  # Commands to make compiler produce verbose output that lists
-  # what "hidden" libraries, object files and flags are used when
-  # linking a shared library.
-  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
-else
-  GXX=no
-  with_gnu_ld=no
-  wlarc=
-fi
-
-# PORTME: fill in a description of your system's C++ link characteristics
-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
-ld_shlibs_CXX=yes
-case $host_os in
-  aix3*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-  aix4* | aix5*)
-    if test "$host_cpu" = ia64; then
-      # On IA64, the linker does run time linking by default, so we don't
-      # have to do anything special.
-      aix_use_runtimelinking=no
-      exp_sym_flag='-Bexport'
-      no_entry_flag=""
-    else
-      aix_use_runtimelinking=no
-
-      # Test if we are trying to use run time linking or normal
-      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-      # need to do runtime linking.
-      case $host_os in aix4.[23]|aix4.[23].*|aix5*)
-       for ld_flag in $LDFLAGS; do
-         case $ld_flag in
-         *-brtl*)
-           aix_use_runtimelinking=yes
-           break
-           ;;
-         esac
-       done
-       ;;
-      esac
-
-      exp_sym_flag='-bexport'
-      no_entry_flag='-bnoentry'
-    fi
-
-    # When large executables or shared objects are built, AIX ld can
-    # have problems creating the table of contents.  If linking a library
-    # or program results in "error TOC overflow" add -mminimal-toc to
-    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-    archive_cmds_CXX=''
-    hardcode_direct_CXX=yes
-    hardcode_libdir_separator_CXX=':'
-    link_all_deplibs_CXX=yes
-
-    if test "$GXX" = yes; then
-      case $host_os in aix4.[012]|aix4.[012].*)
-      # We only want to do this on AIX 4.2 and lower, the check
-      # below for broken collect2 doesn't work under 4.3+
-       collect2name=`${CC} -print-prog-name=collect2`
-       if test -f "$collect2name" && \
-          strings "$collect2name" | grep resolve_lib_name >/dev/null
-       then
-         # We have reworked collect2
-         hardcode_direct_CXX=yes
-       else
-         # We have old collect2
-         hardcode_direct_CXX=unsupported
-         # It fails to find uninstalled libraries when the uninstalled
-         # path is not listed in the libpath.  Setting hardcode_minus_L
-         # to unsupported forces relinking
-         hardcode_minus_L_CXX=yes
-         hardcode_libdir_flag_spec_CXX='-L$libdir'
-         hardcode_libdir_separator_CXX=
-       fi
-       ;;
-      esac
-      shared_flag='-shared'
-      if test "$aix_use_runtimelinking" = yes; then
-       shared_flag="$shared_flag "'${wl}-G'
-      fi
-    else
-      # not using gcc
-      if test "$host_cpu" = ia64; then
-       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-       # chokes on -Wl,-G. The following line is correct:
-       shared_flag='-G'
-      else
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag='${wl}-G'
-       else
-         shared_flag='${wl}-bM:SRE'
-       fi
-      fi
-    fi
-
-    # It seems that -bexpall does not export symbols beginning with
-    # underscore (_), so it is better to generate a list of symbols to export.
-    always_export_symbols_CXX=yes
-    if test "$aix_use_runtimelinking" = yes; then
-      # Warning - without using the other runtime loading flags (-brtl),
-      # -berok will link without error, but may produce a broken library.
-      allow_undefined_flag_CXX='-berok'
-      # Determine the default libpath from the value encoded in an empty executable.
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
-      hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
-
-      archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-     else
-      if test "$host_cpu" = ia64; then
-       hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
-       allow_undefined_flag_CXX="-z nodefs"
-       archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-      else
-       # Determine the default libpath from the value encoded in an empty executable.
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
-       hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
-       # Warning - without using the other run time loading flags,
-       # -berok will link without error, but may produce a broken library.
-       no_undefined_flag_CXX=' ${wl}-bernotok'
-       allow_undefined_flag_CXX=' ${wl}-berok'
-       # Exported symbols can be pulled into shared objects from archives
-       whole_archive_flag_spec_CXX='$convenience'
-       archive_cmds_need_lc_CXX=yes
-       # This is similar to how AIX traditionally builds its shared libraries.
-       archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-      fi
-    fi
-    ;;
-
-  beos*)
-    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-      allow_undefined_flag_CXX=unsupported
-      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-      # support --undefined.  This deserves some investigation.  FIXME
-      archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-    else
-      ld_shlibs_CXX=no
-    fi
-    ;;
-
-  chorus*)
-    case $cc_basename in
-      *)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-    esac
-    ;;
-
-  cygwin* | mingw* | pw32*)
-    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
-    # as there is no search path for DLLs.
-    hardcode_libdir_flag_spec_CXX='-L$libdir'
-    allow_undefined_flag_CXX=unsupported
-    always_export_symbols_CXX=no
-    enable_shared_with_static_runtimes_CXX=yes
-
-    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-      archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      # If the export-symbols file already is a .def file (1st line
-      # is EXPORTS), use it as is; otherwise, prepend...
-      archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-       cp $export_symbols $output_objdir/$soname.def;
-      else
-       echo EXPORTS > $output_objdir/$soname.def;
-       cat $export_symbols >> $output_objdir/$soname.def;
-      fi~
-      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-    else
-      ld_shlibs_CXX=no
-    fi
-  ;;
-      darwin* | rhapsody*)
-        case $host_os in
-        rhapsody* | darwin1.[012])
-         allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[012])
-               allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-        esac
-      archive_cmds_need_lc_CXX=no
-      hardcode_direct_CXX=no
-      hardcode_automatic_CXX=yes
-      hardcode_shlibpath_var_CXX=unsupported
-      whole_archive_flag_spec_CXX=''
-      link_all_deplibs_CXX=yes
-
-    if test "$GXX" = yes ; then
-      lt_int_apple_cc_single_mod=no
-      output_verbose_link_cmd='echo'
-      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
-       lt_int_apple_cc_single_mod=yes
-      fi
-      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      else
-          archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-        fi
-        module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          else
-            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          fi
-            module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-      else
-      case $cc_basename in
-        xlc*)
-         output_verbose_link_cmd='echo'
-          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-          module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          ;;
-       *)
-         ld_shlibs_CXX=no
-          ;;
-      esac
-      fi
-        ;;
-
-  dgux*)
-    case $cc_basename in
-      ec++*)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-      ghcx*)
-       # Green Hills C++ Compiler
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-      *)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-    esac
-    ;;
-  freebsd[12]*)
-    # C++ shared libraries reported to be fairly broken before switch to ELF
-    ld_shlibs_CXX=no
-    ;;
-  freebsd-elf*)
-    archive_cmds_need_lc_CXX=no
-    ;;
-  freebsd* | kfreebsd*-gnu | dragonfly*)
-    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
-    # conventions
-    ld_shlibs_CXX=yes
-    ;;
-  gnu*)
-    ;;
-  hpux9*)
-    hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
-    hardcode_libdir_separator_CXX=:
-    export_dynamic_flag_spec_CXX='${wl}-E'
-    hardcode_direct_CXX=yes
-    hardcode_minus_L_CXX=yes # Not in the search PATH,
-                               # but as the default
-                               # location of the library.
-
-    case $cc_basename in
-    CC*)
-      # FIXME: insert proper C++ library support
-      ld_shlibs_CXX=no
-      ;;
-    aCC*)
-      archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      # Commands to make compiler produce verbose output that lists
-      # what "hidden" libraries, object files and flags are used when
-      # linking a shared library.
-      #
-      # There doesn't appear to be a way to prevent this compiler from
-      # explicitly linking system object files so we need to strip them
-      # from the output so that they don't get included in the library
-      # dependencies.
-      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-      ;;
-    *)
-      if test "$GXX" = yes; then
-        archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-        # FIXME: insert proper C++ library support
-        ld_shlibs_CXX=no
-      fi
-      ;;
-    esac
-    ;;
-  hpux10*|hpux11*)
-    if test $with_gnu_ld = no; then
-      hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator_CXX=:
-
-      case $host_cpu in
-      hppa*64*|ia64*)
-       hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
-        ;;
-      *)
-       export_dynamic_flag_spec_CXX='${wl}-E'
-        ;;
-      esac
-    fi
-    case $host_cpu in
-    hppa*64*|ia64*)
-      hardcode_direct_CXX=no
-      hardcode_shlibpath_var_CXX=no
-      ;;
-    *)
-      hardcode_direct_CXX=yes
-      hardcode_minus_L_CXX=yes # Not in the search PATH,
-                                             # but as the default
-                                             # location of the library.
-      ;;
-    esac
-
-    case $cc_basename in
-      CC*)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-      aCC*)
-       case $host_cpu in
-       hppa*64*)
-         archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-         ;;
-       ia64*)
-         archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-         ;;
-       *)
-         archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-         ;;
-       esac
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-       ;;
-      *)
-       if test "$GXX" = yes; then
-         if test $with_gnu_ld = no; then
-           case $host_cpu in
-           hppa*64*)
-             archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-             ;;
-           ia64*)
-             archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-             ;;
-           *)
-             archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-             ;;
-           esac
-         fi
-       else
-         # FIXME: insert proper C++ library support
-         ld_shlibs_CXX=no
-       fi
-       ;;
-    esac
-    ;;
-  interix3*)
-    hardcode_direct_CXX=no
-    hardcode_shlibpath_var_CXX=no
-    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-    export_dynamic_flag_spec_CXX='${wl}-E'
-    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-    # Instead, shared libraries are loaded at an image base (0x10000000 by
-    # default) and relocated if they conflict, which is a slow very memory
-    # consuming and fragmenting process.  To avoid this, we pick a random,
-    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-    archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-    archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-    ;;
-  irix5* | irix6*)
-    case $cc_basename in
-      CC*)
-       # SGI C++
-       archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-
-       # Archives containing C++ object files must be created using
-       # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
-       # necessary to make sure instantiated templates are included
-       # in the archive.
-       old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
-       ;;
-      *)
-       if test "$GXX" = yes; then
-         if test "$with_gnu_ld" = no; then
-           archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-         else
-           archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
-         fi
-       fi
-       link_all_deplibs_CXX=yes
-       ;;
-    esac
-    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-    hardcode_libdir_separator_CXX=:
-    ;;
-  linux*)
-    case $cc_basename in
-      KCC*)
-       # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-       # KCC will only create a shared library if the output file
-       # ends with ".so" (or ".sl" for HP-UX), so rename the library
-       # to its proper name (with version) after linking.
-       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-       archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-
-       hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
-       export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-
-       # Archives containing C++ object files must be created using
-       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
-       old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
-       ;;
-      icpc*)
-       # Intel C++
-       with_gnu_ld=yes
-       # version 8.0 and above of icpc choke on multiply defined symbols
-       # if we add $predep_objects and $postdep_objects, however 7.1 and
-       # earlier do not add the objects themselves.
-       case `$CC -V 2>&1` in
-       *"Version 7."*)
-         archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-         archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-         ;;
-       *)  # Version 8.0 or newer
-         tmp_idyn=
-         case $host_cpu in
-           ia64*) tmp_idyn=' -i_dynamic';;
-         esac
-         archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-         archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-         ;;
-       esac
-       archive_cmds_need_lc_CXX=no
-       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-       export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-       whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-       ;;
-      pgCC*)
-        # Portland Group C++ compiler
-       archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-       archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-
-       hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
-       export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-       whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-        ;;
-      cxx*)
-       # Compaq C++
-       archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
-       runpath_var=LD_RUN_PATH
-       hardcode_libdir_flag_spec_CXX='-rpath $libdir'
-       hardcode_libdir_separator_CXX=:
-
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-       ;;
-    esac
-    ;;
-  lynxos*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-  m88k*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-  mvs*)
-    case $cc_basename in
-      cxx*)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-      *)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-    esac
-    ;;
-  netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
-    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-      archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
-      wlarc=
-      hardcode_libdir_flag_spec_CXX='-R$libdir'
-      hardcode_direct_CXX=yes
-      hardcode_shlibpath_var_CXX=no
-    fi
-    # Workaround some broken pre-1.5 toolchains
-    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
-    ;;
-  openbsd2*)
-    # C++ shared libraries are fairly broken
-    ld_shlibs_CXX=no
-    ;;
-  openbsd*)
-    hardcode_direct_CXX=yes
-    hardcode_shlibpath_var_CXX=no
-    archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
-      export_dynamic_flag_spec_CXX='${wl}-E'
-      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    fi
-    output_verbose_link_cmd='echo'
-    ;;
-  osf3*)
-    case $cc_basename in
-      KCC*)
-       # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-       # KCC will only create a shared library if the output file
-       # ends with ".so" (or ".sl" for HP-UX), so rename the library
-       # to its proper name (with version) after linking.
-       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
-       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-       hardcode_libdir_separator_CXX=:
-
-       # Archives containing C++ object files must be created using
-       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
-       old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
-
-       ;;
-      RCC*)
-       # Rational C++ 2.4.1
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-      cxx*)
-       allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-
-       hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-       hardcode_libdir_separator_CXX=:
-
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-       ;;
-      *)
-       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-         allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-         archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-
-         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-         hardcode_libdir_separator_CXX=:
-
-         # Commands to make compiler produce verbose output that lists
-         # what "hidden" libraries, object files and flags are used when
-         # linking a shared library.
-         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
-       else
-         # FIXME: insert proper C++ library support
-         ld_shlibs_CXX=no
-       fi
-       ;;
-    esac
-    ;;
-  osf4* | osf5*)
-    case $cc_basename in
-      KCC*)
-       # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-       # KCC will only create a shared library if the output file
-       # ends with ".so" (or ".sl" for HP-UX), so rename the library
-       # to its proper name (with version) after linking.
-       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
-       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-       hardcode_libdir_separator_CXX=:
-
-       # Archives containing C++ object files must be created using
-       # the KAI C++ compiler.
-       old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
-       ;;
-      RCC*)
-       # Rational C++ 2.4.1
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-      cxx*)
-       allow_undefined_flag_CXX=' -expect_unresolved \*'
-       archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-         echo "-hidden">> $lib.exp~
-         $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
-         $rm $lib.exp'
-
-       hardcode_libdir_flag_spec_CXX='-rpath $libdir'
-       hardcode_libdir_separator_CXX=:
-
-       # Commands to make compiler produce verbose output that lists
-       # what "hidden" libraries, object files and flags are used when
-       # linking a shared library.
-       #
-       # There doesn't appear to be a way to prevent this compiler from
-       # explicitly linking system object files so we need to strip them
-       # from the output so that they don't get included in the library
-       # dependencies.
-       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-       ;;
-      *)
-       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-         allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-        archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-
-         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-         hardcode_libdir_separator_CXX=:
-
-         # Commands to make compiler produce verbose output that lists
-         # what "hidden" libraries, object files and flags are used when
-         # linking a shared library.
-         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
-       else
-         # FIXME: insert proper C++ library support
-         ld_shlibs_CXX=no
-       fi
-       ;;
-    esac
-    ;;
-  psos*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-  sunos4*)
-    case $cc_basename in
-      CC*)
-       # Sun C++ 4.x
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-      lcc*)
-       # Lucid
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-      *)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-    esac
-    ;;
-  solaris*)
-    case $cc_basename in
-      CC*)
-       # Sun C++ 4.2, 5.x and Centerline C++
-        archive_cmds_need_lc_CXX=yes
-       no_undefined_flag_CXX=' -zdefs'
-       archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-       archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-       $CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
-       hardcode_libdir_flag_spec_CXX='-R$libdir'
-       hardcode_shlibpath_var_CXX=no
-       case $host_os in
-         solaris2.[0-5] | solaris2.[0-5].*) ;;
-         *)
-           # The C++ compiler is used as linker so we must use $wl
-           # flag to pass the commands to the underlying system
-           # linker. We must also pass each convience library through
-           # to the system linker between allextract/defaultextract.
-           # The C++ compiler will combine linker options so we
-           # cannot just pass the convience library names through
-           # without $wl.
-           # Supported since Solaris 2.6 (maybe 2.5.1?)
-           whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
-           ;;
-       esac
-       link_all_deplibs_CXX=yes
-
-       output_verbose_link_cmd='echo'
-
-       # Archives containing C++ object files must be created using
-       # "CC -xar", where "CC" is the Sun C++ compiler.  This is
-       # necessary to make sure instantiated templates are included
-       # in the archive.
-       old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
-       ;;
-      gcx*)
-       # Green Hills C++ Compiler
-       archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
-       # The C++ compiler must be used to create the archive.
-       old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
-       ;;
-      *)
-       # GNU C++ compiler with Solaris linker
-       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-         no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
-         if $CC --version | grep -v '^2\.7' > /dev/null; then
-           archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-           archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-               $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
-         else
-           # g++ 2.7 appears to require `-G' NOT `-shared' on this
-           # platform.
-           archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-           archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-               $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
-         fi
-
-         hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
-       fi
-       ;;
-    esac
-    ;;
-  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-    no_undefined_flag_CXX='${wl}-z,text'
-    archive_cmds_need_lc_CXX=no
-    hardcode_shlibpath_var_CXX=no
-    runpath_var='LD_RUN_PATH'
-
-    case $cc_basename in
-      CC*)
-       archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       ;;
-      *)
-       archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       ;;
-    esac
-    ;;
-  sysv5* | sco3.2v5* | sco5v6*)
-    # Note: We can NOT use -z defs as we might desire, because we do not
-    # link with -lc, and that would cause any symbols used from libc to
-    # always be unresolved, which means just about no library would
-    # ever link correctly.  If we're not using GNU ld we use -z text
-    # though, which does catch some bad symbols but isn't as heavy-handed
-    # as -z defs.
-    # For security reasons, it is highly recommended that you always
-    # use absolute paths for naming shared libraries, and exclude the
-    # DT_RUNPATH tag from executables and libraries.  But doing so
-    # requires that you compile everything twice, which is a pain.
-    # So that behaviour is only enabled if SCOABSPATH is set to a
-    # non-empty value in the environment.  Most likely only useful for
-    # creating official distributions of packages.
-    # This is a hack until libtool officially supports absolute path
-    # names for shared libraries.
-    no_undefined_flag_CXX='${wl}-z,text'
-    allow_undefined_flag_CXX='${wl}-z,nodefs'
-    archive_cmds_need_lc_CXX=no
-    hardcode_shlibpath_var_CXX=no
-    hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-    hardcode_libdir_separator_CXX=':'
-    link_all_deplibs_CXX=yes
-    export_dynamic_flag_spec_CXX='${wl}-Bexport'
-    runpath_var='LD_RUN_PATH'
-
-    case $cc_basename in
-      CC*)
-       archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       ;;
-      *)
-       archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       ;;
-    esac
-    ;;
-  tandem*)
-    case $cc_basename in
-      NCC*)
-       # NonStop-UX NCC 3.20
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-      *)
-       # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-    esac
-    ;;
-  vxworks*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-  *)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-esac
-echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
-echo "${ECHO_T}$ld_shlibs_CXX" >&6
-test "$ld_shlibs_CXX" = no && can_build_shared=no
-
-GCC_CXX="$GXX"
-LD_CXX="$LD"
-
-
-cat > conftest.$ac_ext <<EOF
-class Foo
-{
-public:
-  Foo (void) { a = 0; }
-private:
-  int a;
-};
-EOF
-
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # Parse the compiler output and extract the necessary
-  # objects, libraries and library flags.
-
-  # Sentinel used to keep track of whether or not we are before
-  # the conftest object file.
-  pre_test_object_deps_done=no
-
-  # The `*' in the case matches for architectures that use `case' in
-  # $output_verbose_cmd can trigger glob expansion during the loop
-  # eval without this substitution.
-  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
-
-  for p in `eval $output_verbose_link_cmd`; do
-    case $p in
-
-    -L* | -R* | -l*)
-       # Some compilers place space between "-{L,R}" and the path.
-       # Remove the space.
-       if test $p = "-L" \
-         || test $p = "-R"; then
-        prev=$p
-        continue
-       else
-        prev=
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-        case $p in
-        -L* | -R*)
-          # Internal compiler library paths should come after those
-          # provided the user.  The postdeps already come after the
-          # user supplied libs so there is no need to process them.
-          if test -z "$compiler_lib_search_path_CXX"; then
-            compiler_lib_search_path_CXX="${prev}${p}"
-          else
-            compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
-          fi
-          ;;
-        # The "-l" case would never come before the object being
-        # linked, so don't bother handling this case.
-        esac
-       else
-        if test -z "$postdeps_CXX"; then
-          postdeps_CXX="${prev}${p}"
-        else
-          postdeps_CXX="${postdeps_CXX} ${prev}${p}"
-        fi
-       fi
-       ;;
-
-    *.$objext)
-       # This assumes that the test object file only shows up
-       # once in the compiler output.
-       if test "$p" = "conftest.$objext"; then
-        pre_test_object_deps_done=yes
-        continue
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-        if test -z "$predep_objects_CXX"; then
-          predep_objects_CXX="$p"
-        else
-          predep_objects_CXX="$predep_objects_CXX $p"
-        fi
-       else
-        if test -z "$postdep_objects_CXX"; then
-          postdep_objects_CXX="$p"
-        else
-          postdep_objects_CXX="$postdep_objects_CXX $p"
-        fi
-       fi
-       ;;
-
-    *) ;; # Ignore the rest.
-
-    esac
-  done
-
-  # Clean up.
-  rm -f a.out a.exe
-else
-  echo "libtool.m4: error: problem compiling CXX test program"
-fi
-
-$rm -f confest.$objext
-
-# PORTME: override above test on systems where it is broken
-case $host_os in
-interix3*)
-  # Interix 3.5 installs completely hosed .la files for C++, so rather than
-  # hack all around it, let's just trust "g++" to DTRT.
-  predep_objects_CXX=
-  postdep_objects_CXX=
-  postdeps_CXX=
-  ;;
-
-solaris*)
-  case $cc_basename in
-  CC*)
-    # Adding this requires a known-good setup of shared libraries for
-    # Sun compiler versions before 5.6, else PIC objects from an old
-    # archive will be linked into the output, leading to subtle bugs.
-    postdeps_CXX='-lCstd -lCrun'
-    ;;
-  esac
-  ;;
-esac
-
-
-case " $postdeps_CXX " in
-*" -lc "*) archive_cmds_need_lc_CXX=no ;;
-esac
-
-lt_prog_compiler_wl_CXX=
-lt_prog_compiler_pic_CXX=
-lt_prog_compiler_static_CXX=
-
-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
-
-  # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
-    lt_prog_compiler_wl_CXX='-Wl,'
-    lt_prog_compiler_static_CXX='-static'
-
-    case $host_os in
-    aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static_CXX='-Bstatic'
-      fi
-      ;;
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
-      ;;
-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-    mingw* | os2* | pw32*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
-      ;;
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic_CXX='-fno-common'
-      ;;
-    *djgpp*)
-      # DJGPP does not support shared libraries at all
-      lt_prog_compiler_pic_CXX=
-      ;;
-    interix3*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       lt_prog_compiler_pic_CXX=-Kconform_pic
-      fi
-      ;;
-    hpux*)
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       ;;
-      *)
-       lt_prog_compiler_pic_CXX='-fPIC'
-       ;;
-      esac
-      ;;
-    *)
-      lt_prog_compiler_pic_CXX='-fPIC'
-      ;;
-    esac
-  else
-    case $host_os in
-      aix4* | aix5*)
-       # All AIX code is PIC.
-       if test "$host_cpu" = ia64; then
-         # AIX 5 now supports IA64 processor
-         lt_prog_compiler_static_CXX='-Bstatic'
-       else
-         lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
-       fi
-       ;;
-      chorus*)
-       case $cc_basename in
-       cxch68*)
-         # Green Hills C++ Compiler
-         # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
-         ;;
-       esac
-       ;;
-       darwin*)
-         # PIC is the default on this platform
-         # Common symbols not allowed in MH_DYLIB files
-         case $cc_basename in
-           xlc*)
-           lt_prog_compiler_pic_CXX='-qnocommon'
-           lt_prog_compiler_wl_CXX='-Wl,'
-           ;;
-         esac
-       ;;
-      dgux*)
-       case $cc_basename in
-         ec++*)
-           lt_prog_compiler_pic_CXX='-KPIC'
-           ;;
-         ghcx*)
-           # Green Hills C++ Compiler
-           lt_prog_compiler_pic_CXX='-pic'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      freebsd* | kfreebsd*-gnu | dragonfly*)
-       # FreeBSD uses GNU C++
-       ;;
-      hpux9* | hpux10* | hpux11*)
-       case $cc_basename in
-         CC*)
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
-           if test "$host_cpu" != ia64; then
-             lt_prog_compiler_pic_CXX='+Z'
-           fi
-           ;;
-         aCC*)
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
-           case $host_cpu in
-           hppa*64*|ia64*)
-             # +Z the default
-             ;;
-           *)
-             lt_prog_compiler_pic_CXX='+Z'
-             ;;
-           esac
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      interix*)
-       # This is c89, which is MS Visual C++ (no shared libs)
-       # Anyone wants to do a port?
-       ;;
-      irix5* | irix6* | nonstopux*)
-       case $cc_basename in
-         CC*)
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_static_CXX='-non_shared'
-           # CC pic flag -KPIC is the default.
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      linux*)
-       case $cc_basename in
-         KCC*)
-           # KAI C++ Compiler
-           lt_prog_compiler_wl_CXX='--backend -Wl,'
-           lt_prog_compiler_pic_CXX='-fPIC'
-           ;;
-         icpc* | ecpc*)
-           # Intel C++
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_pic_CXX='-KPIC'
-           lt_prog_compiler_static_CXX='-static'
-           ;;
-         pgCC*)
-           # Portland Group C++ compiler.
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_pic_CXX='-fpic'
-           lt_prog_compiler_static_CXX='-Bstatic'
-           ;;
-         cxx*)
-           # Compaq C++
-           # Make sure the PIC flag is empty.  It appears that all Alpha
-           # Linux and Compaq Tru64 Unix objects are PIC.
-           lt_prog_compiler_pic_CXX=
-           lt_prog_compiler_static_CXX='-non_shared'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      lynxos*)
-       ;;
-      m88k*)
-       ;;
-      mvs*)
-       case $cc_basename in
-         cxx*)
-           lt_prog_compiler_pic_CXX='-W c,exportall'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
-       ;;
-      osf3* | osf4* | osf5*)
-       case $cc_basename in
-         KCC*)
-           lt_prog_compiler_wl_CXX='--backend -Wl,'
-           ;;
-         RCC*)
-           # Rational C++ 2.4.1
-           lt_prog_compiler_pic_CXX='-pic'
-           ;;
-         cxx*)
-           # Digital/Compaq C++
-           lt_prog_compiler_wl_CXX='-Wl,'
-           # Make sure the PIC flag is empty.  It appears that all Alpha
-           # Linux and Compaq Tru64 Unix objects are PIC.
-           lt_prog_compiler_pic_CXX=
-           lt_prog_compiler_static_CXX='-non_shared'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      psos*)
-       ;;
-      solaris*)
-       case $cc_basename in
-         CC*)
-           # Sun C++ 4.2, 5.x and Centerline C++
-           lt_prog_compiler_pic_CXX='-KPIC'
-           lt_prog_compiler_static_CXX='-Bstatic'
-           lt_prog_compiler_wl_CXX='-Qoption ld '
-           ;;
-         gcx*)
-           # Green Hills C++ Compiler
-           lt_prog_compiler_pic_CXX='-PIC'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      sunos4*)
-       case $cc_basename in
-         CC*)
-           # Sun C++ 4.x
-           lt_prog_compiler_pic_CXX='-pic'
-           lt_prog_compiler_static_CXX='-Bstatic'
-           ;;
-         lcc*)
-           # Lucid
-           lt_prog_compiler_pic_CXX='-pic'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      tandem*)
-       case $cc_basename in
-         NCC*)
-           # NonStop-UX NCC 3.20
-           lt_prog_compiler_pic_CXX='-KPIC'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-       case $cc_basename in
-         CC*)
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_pic_CXX='-KPIC'
-           lt_prog_compiler_static_CXX='-Bstatic'
-           ;;
-       esac
-       ;;
-      vxworks*)
-       ;;
-      *)
-       lt_prog_compiler_can_build_shared_CXX=no
-       ;;
-    esac
-  fi
-
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic_CXX"; then
-
-echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6
-if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_prog_compiler_pic_works_CXX=no
-  ac_outfile=conftest.$ac_objext
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12245: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:12249: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_prog_compiler_pic_works_CXX=yes
-     fi
-   fi
-   $rm conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6
-
-if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
-    case $lt_prog_compiler_pic_CXX in
-     "" | " "*) ;;
-     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
-     esac
-else
-    lt_prog_compiler_pic_CXX=
-     lt_prog_compiler_can_build_shared_CXX=no
-fi
-
-fi
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic_CXX=
-    ;;
-  *)
-    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
-    ;;
-esac
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
-if test "${lt_prog_compiler_static_works_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_prog_compiler_static_works_CXX=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
-   printf "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         lt_prog_compiler_static_works_CXX=yes
-       fi
-     else
-       lt_prog_compiler_static_works_CXX=yes
-     fi
-   fi
-   $rm conftest*
-   LDFLAGS="$save_LDFLAGS"
-
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6
-
-if test x"$lt_prog_compiler_static_works_CXX" = xyes; then
-    :
-else
-    lt_prog_compiler_static_CXX=
-fi
-
-
-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_c_o_CXX=no
-   $rm -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12349: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:12353: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_c_o_CXX=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $rm conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
-   $rm out/* && rmdir out
-   cd ..
-   rmdir conftest
-   $rm conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6
-
-
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6
-  if test "$hard_links" = no; then
-    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-
-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
-
-  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  case $host_os in
-  aix4* | aix5*)
-    # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-    else
-      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-    fi
-    ;;
-  pw32*)
-    export_symbols_cmds_CXX="$ltdll_cmds"
-  ;;
-  cygwin* | mingw*)
-    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  kfreebsd*-gnu)
-    link_all_deplibs_CXX=no
-  ;;
-  linux*)
-    link_all_deplibs_CXX=no
-  ;;
-  *)
-    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  esac
-
-echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
-echo "${ECHO_T}$ld_shlibs_CXX" >&6
-test "$ld_shlibs_CXX" = no && can_build_shared=no
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc_CXX" in
-x|xyes)
-  # Assume -lc should be added
-  archive_cmds_need_lc_CXX=yes
-
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $archive_cmds_CXX in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
-      $rm conftest*
-      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl_CXX
-       pic_flag=$lt_prog_compiler_pic_CXX
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
-        allow_undefined_flag_CXX=
-        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-  (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-        then
-         archive_cmds_need_lc_CXX=no
-        else
-         archive_cmds_need_lc_CXX=yes
-        fi
-        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $rm conftest*
-      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6
-      ;;
-    esac
-  fi
-  ;;
-esac
-
-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
-  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
-else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
-
-aix4* | aix5*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[01] | aix4.[01].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-          echo ' yes '
-          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
-       :
-      else
-       can_build_shared=no
-      fi
-      ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
-
-amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
-  ;;
-
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
-
-bsdi[45]*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
-
-cygwin* | mingw* | pw32*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
-
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32*)
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $rm \$dlpath'
-    shlibpath_overrides_runpath=yes
-
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
-      ;;
-    mingw*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-      fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    esac
-    ;;
-
-  *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
-    ;;
-  esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
-
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
-  if test "$GCC" = yes; then
-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
-  else
-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
-  fi
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
-
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
-kfreebsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[123]*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[01]* | freebsdelf3.[01]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
-  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  freebsd*) # from 4.6 on
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
-
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  case $host_cpu in
-  ia64*)
-    shrext_cmds='.so'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-    fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-   hppa*64*)
-     shrext_cmds='.sl'
-     hardcode_into_libs=yes
-     dynamic_linker="$host_os dld.sl"
-     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-     soname_spec='${libname}${release}${shared_ext}$major'
-     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-     ;;
-   *)
-    shrext_cmds='.sl'
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    ;;
-  esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
-
-interix3*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-       if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux
-       else
-               version_type=irix
-       fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  hardcode_into_libs=yes
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
-
-# This must be Linux ELF.
-linux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  # Append ld.so.conf contents to the search path
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,       ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
-  fi
-
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
-
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
-
-knetbsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
-
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-nto-qnx*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-openbsd*)
-  version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
-  need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-    *)                         need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[89] | openbsd2.[89].*)
-       shlibpath_overrides_runpath=no
-       ;;
-      *)
-       shlibpath_overrides_runpath=yes
-       ;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
-
-os2*)
-  libname_spec='$name'
-  shrext_cmds=".dll"
-  need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      export_dynamic_flag_spec='${wl}-Blargedynsym'
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-    shlibpath_overrides_runpath=no
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    shlibpath_overrides_runpath=yes
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-       ;;
-    esac
-  fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
-
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
-hardcode_action_CXX=
-if test -n "$hardcode_libdir_flag_spec_CXX" || \
-   test -n "$runpath_var_CXX" || \
-   test "X$hardcode_automatic_CXX" = "Xyes" ; then
-
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct_CXX" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
-     test "$hardcode_minus_L_CXX" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action_CXX=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action_CXX=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action_CXX=unsupported
-fi
-echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
-echo "${ECHO_T}$hardcode_action_CXX" >&6
-
-if test "$hardcode_action_CXX" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-
-
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # See if we are running on zsh, and set the options which allow our commands through
-  # without removal of \ escapes.
-  if test -n "${ZSH_VERSION+set}" ; then
-    setopt NO_GLOB_SUBST
-  fi
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
-    SED SHELL STRIP \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    compiler_CXX \
-    CC_CXX \
-    LD_CXX \
-    lt_prog_compiler_wl_CXX \
-    lt_prog_compiler_pic_CXX \
-    lt_prog_compiler_static_CXX \
-    lt_prog_compiler_no_builtin_flag_CXX \
-    export_dynamic_flag_spec_CXX \
-    thread_safe_flag_spec_CXX \
-    whole_archive_flag_spec_CXX \
-    enable_shared_with_static_runtimes_CXX \
-    old_archive_cmds_CXX \
-    old_archive_from_new_cmds_CXX \
-    predep_objects_CXX \
-    postdep_objects_CXX \
-    predeps_CXX \
-    postdeps_CXX \
-    compiler_lib_search_path_CXX \
-    archive_cmds_CXX \
-    archive_expsym_cmds_CXX \
-    postinstall_cmds_CXX \
-    postuninstall_cmds_CXX \
-    old_archive_from_expsyms_cmds_CXX \
-    allow_undefined_flag_CXX \
-    no_undefined_flag_CXX \
-    export_symbols_cmds_CXX \
-    hardcode_libdir_flag_spec_CXX \
-    hardcode_libdir_flag_spec_ld_CXX \
-    hardcode_libdir_separator_CXX \
-    hardcode_automatic_CXX \
-    module_cmds_CXX \
-    module_expsym_cmds_CXX \
-    lt_cv_prog_compiler_c_o_CXX \
-    exclude_expsyms_CXX \
-    include_expsyms_CXX; do
-
-    case $var in
-    old_archive_cmds_CXX | \
-    old_archive_from_new_cmds_CXX | \
-    archive_cmds_CXX | \
-    archive_expsym_cmds_CXX | \
-    module_cmds_CXX | \
-    module_expsym_cmds_CXX | \
-    old_archive_from_expsyms_cmds_CXX | \
-    export_symbols_cmds_CXX | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
-
-  case $lt_echo in
-  *'\$0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-    ;;
-  esac
-
-cfgfile="$ofile"
-
-  cat <<__EOF__ >> "$cfgfile"
-# ### BEGIN LIBTOOL TAG CONFIG: $tagname
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_CXX
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
-
-# A language-specific compiler.
-CC=$lt_compiler_CXX
-
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_CXX
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_LD_CXX
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A symbol stripping program
-STRIP=$lt_STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_CXX
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_CXX
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_CXX
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds_CXX
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_CXX
-archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_module_cmds_CXX
-module_expsym_cmds=$lt_module_expsym_cmds_CXX
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_predep_objects_CXX
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects_CXX
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_CXX
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_CXX
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_CXX
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_CXX
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_CXX
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
-
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
-
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_CXX
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_CXX
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$hardcode_automatic_CXX
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_CXX
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_CXX"
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols_CXX
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_CXX
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_CXX
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_CXX
-
-# ### END LIBTOOL TAG CONFIG: $tagname
-
-__EOF__
-
-
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-  if test -f "$ltmain_in"; then
-    test -f Makefile && make "$ltmain"
-  fi
-fi
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC=$lt_save_CC
-LDCXX=$LD
-LD=$lt_save_LD
-GCC=$lt_save_GCC
-with_gnu_ldcxx=$with_gnu_ld
-with_gnu_ld=$lt_save_with_gnu_ld
-lt_cv_path_LDCXX=$lt_cv_path_LD
-lt_cv_path_LD=$lt_save_path_LD
-lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
-lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-
-       else
-         tagname=""
-       fi
-       ;;
-
-      F77)
-       if test -n "$F77" && test "X$F77" != "Xno"; then
-
-ac_ext=f
-ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
-ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_f77_compiler_gnu
-
-
-archive_cmds_need_lc_F77=no
-allow_undefined_flag_F77=
-always_export_symbols_F77=no
-archive_expsym_cmds_F77=
-export_dynamic_flag_spec_F77=
-hardcode_direct_F77=no
-hardcode_libdir_flag_spec_F77=
-hardcode_libdir_flag_spec_ld_F77=
-hardcode_libdir_separator_F77=
-hardcode_minus_L_F77=no
-hardcode_automatic_F77=no
-module_cmds_F77=
-module_expsym_cmds_F77=
-link_all_deplibs_F77=unknown
-old_archive_cmds_F77=$old_archive_cmds
-no_undefined_flag_F77=
-whole_archive_flag_spec_F77=
-enable_shared_with_static_runtimes_F77=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-objext_F77=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="      program t\n      end\n"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
-
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
-
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${F77-"f77"}
-compiler=$CC
-compiler_F77=$CC
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-
-echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $can_build_shared" >&5
-echo "${ECHO_T}$can_build_shared" >&6
-
-echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case $host_os in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
-  fi
-  ;;
-aix4* | aix5*)
-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-    test "$enable_shared" = yes && enable_static=no
-  fi
-  ;;
-esac
-echo "$as_me:$LINENO: result: $enable_shared" >&5
-echo "${ECHO_T}$enable_shared" >&6
-
-echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-echo "$as_me:$LINENO: result: $enable_static" >&5
-echo "${ECHO_T}$enable_static" >&6
-
-GCC_F77="$G77"
-LD_F77="$LD"
-
-lt_prog_compiler_wl_F77=
-lt_prog_compiler_pic_F77=
-lt_prog_compiler_static_F77=
-
-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
-
-  if test "$GCC" = yes; then
-    lt_prog_compiler_wl_F77='-Wl,'
-    lt_prog_compiler_static_F77='-static'
-
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static_F77='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
-      ;;
-
-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
-      ;;
-
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic_F77='-fno-common'
-      ;;
-
-    interix3*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      lt_prog_compiler_can_build_shared_F77=no
-      enable_shared=no
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       lt_prog_compiler_pic_F77=-Kconform_pic
-      fi
-      ;;
-
-    hpux*)
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       # +Z the default
-       ;;
-      *)
-       lt_prog_compiler_pic_F77='-fPIC'
-       ;;
-      esac
-      ;;
-
-    *)
-      lt_prog_compiler_pic_F77='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static_F77='-Bstatic'
-      else
-       lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-      darwin*)
-        # PIC is the default on this platform
-        # Common symbols not allowed in MH_DYLIB files
-       case $cc_basename in
-         xlc*)
-         lt_prog_compiler_pic_F77='-qnocommon'
-         lt_prog_compiler_wl_F77='-Wl,'
-         ;;
-       esac
-       ;;
-
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       # +Z the default
-       ;;
-      *)
-       lt_prog_compiler_pic_F77='+Z'
-       ;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      # PIC (with -KPIC) is the default.
-      lt_prog_compiler_static_F77='-non_shared'
-      ;;
-
-    newsos6)
-      lt_prog_compiler_pic_F77='-KPIC'
-      lt_prog_compiler_static_F77='-Bstatic'
-      ;;
-
-    linux*)
-      case $cc_basename in
-      icc* | ecc*)
-       lt_prog_compiler_wl_F77='-Wl,'
-       lt_prog_compiler_pic_F77='-KPIC'
-       lt_prog_compiler_static_F77='-static'
-        ;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-       # which looks to be a dead project)
-       lt_prog_compiler_wl_F77='-Wl,'
-       lt_prog_compiler_pic_F77='-fpic'
-       lt_prog_compiler_static_F77='-Bstatic'
-        ;;
-      ccc*)
-        lt_prog_compiler_wl_F77='-Wl,'
-        # All Alpha code is PIC.
-        lt_prog_compiler_static_F77='-non_shared'
-        ;;
-      esac
-      ;;
-
-    osf3* | osf4* | osf5*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      # All OSF/1 code is PIC.
-      lt_prog_compiler_static_F77='-non_shared'
-      ;;
-
-    solaris*)
-      lt_prog_compiler_pic_F77='-KPIC'
-      lt_prog_compiler_static_F77='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95*)
-       lt_prog_compiler_wl_F77='-Qoption ld ';;
-      *)
-       lt_prog_compiler_wl_F77='-Wl,';;
-      esac
-      ;;
-
-    sunos4*)
-      lt_prog_compiler_wl_F77='-Qoption ld '
-      lt_prog_compiler_pic_F77='-PIC'
-      lt_prog_compiler_static_F77='-Bstatic'
-      ;;
-
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      lt_prog_compiler_pic_F77='-KPIC'
-      lt_prog_compiler_static_F77='-Bstatic'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-       lt_prog_compiler_pic_F77='-Kconform_pic'
-       lt_prog_compiler_static_F77='-Bstatic'
-      fi
-      ;;
-
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      lt_prog_compiler_pic_F77='-KPIC'
-      lt_prog_compiler_static_F77='-Bstatic'
-      ;;
-
-    unicos*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      lt_prog_compiler_can_build_shared_F77=no
-      ;;
-
-    uts4*)
-      lt_prog_compiler_pic_F77='-pic'
-      lt_prog_compiler_static_F77='-Bstatic'
-      ;;
-
-    *)
-      lt_prog_compiler_can_build_shared_F77=no
-      ;;
-    esac
-  fi
-
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic_F77"; then
-
-echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6
-if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_prog_compiler_pic_works_F77=no
-  ac_outfile=conftest.$ac_objext
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic_F77"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13937: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:13941: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_prog_compiler_pic_works_F77=yes
-     fi
-   fi
-   $rm conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6
-
-if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
-    case $lt_prog_compiler_pic_F77 in
-     "" | " "*) ;;
-     *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
-     esac
-else
-    lt_prog_compiler_pic_F77=
-     lt_prog_compiler_can_build_shared_F77=no
-fi
-
-fi
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic_F77=
-    ;;
-  *)
-    lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
-    ;;
-esac
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
-if test "${lt_prog_compiler_static_works_F77+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_prog_compiler_static_works_F77=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
-   printf "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         lt_prog_compiler_static_works_F77=yes
-       fi
-     else
-       lt_prog_compiler_static_works_F77=yes
-     fi
-   fi
-   $rm conftest*
-   LDFLAGS="$save_LDFLAGS"
-
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6
-
-if test x"$lt_prog_compiler_static_works_F77" = xyes; then
-    :
-else
-    lt_prog_compiler_static_F77=
-fi
-
-
-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_c_o_F77=no
-   $rm -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14041: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:14045: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_c_o_F77=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $rm conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
-   $rm out/* && rmdir out
-   cd ..
-   rmdir conftest
-   $rm conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6
-
-
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6
-  if test "$hard_links" = no; then
-    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-
-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
-
-  runpath_var=
-  allow_undefined_flag_F77=
-  enable_shared_with_static_runtimes_F77=no
-  archive_cmds_F77=
-  archive_expsym_cmds_F77=
-  old_archive_From_new_cmds_F77=
-  old_archive_from_expsyms_cmds_F77=
-  export_dynamic_flag_spec_F77=
-  whole_archive_flag_spec_F77=
-  thread_safe_flag_spec_F77=
-  hardcode_libdir_flag_spec_F77=
-  hardcode_libdir_flag_spec_ld_F77=
-  hardcode_libdir_separator_F77=
-  hardcode_direct_F77=no
-  hardcode_minus_L_F77=no
-  hardcode_shlibpath_var_F77=unsupported
-  link_all_deplibs_F77=unknown
-  hardcode_automatic_F77=no
-  module_cmds_F77=
-  module_expsym_cmds_F77=
-  always_export_symbols_F77=no
-  export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  include_expsyms_F77=
-  # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_"
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  extract_expsyms_cmds=
-  # Just being paranoid about ensuring that cc_basename is set.
-  for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-  case $host_os in
-  cygwin* | mingw* | pw32*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-  esac
-
-  ld_shlibs_F77=yes
-  if test "$with_gnu_ld" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
-
-    # Set some defaults for GNU ld with shared library support. These
-    # are reset later if shared libraries are not supported. Putting them
-    # here allows them to be overridden if necessary.
-    runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
-    export_dynamic_flag_spec_F77='${wl}--export-dynamic'
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
-       whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-       whole_archive_flag_spec_F77=
-    fi
-    supports_anon_versioning=no
-    case `$LD -v 2>/dev/null` in
-      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
-      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-      *\ 2.11.*) ;; # other 2.11 versions
-      *) supports_anon_versioning=yes ;;
-    esac
-
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix3* | aix4* | aix5*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-       ld_shlibs_F77=no
-       cat <<EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-EOF
-      fi
-      ;;
-
-    amigaos*)
-      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_minus_L_F77=yes
-
-      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we can't use
-      # them.
-      ld_shlibs_F77=no
-      ;;
-
-    beos*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       allow_undefined_flag_F77=unsupported
-       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-       # support --undefined.  This deserves some investigation.  FIXME
-       archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-       ld_shlibs_F77=no
-      fi
-      ;;
-
-    cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
-      # as there is no search path for DLLs.
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      allow_undefined_flag_F77=unsupported
-      always_export_symbols_F77=no
-      enable_shared_with_static_runtimes_F77=yes
-      export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
-
-      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-        archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-       # If the export-symbols file already is a .def file (1st line
-       # is EXPORTS), use it as is; otherwise, prepend...
-       archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname.def;
-       else
-         echo EXPORTS > $output_objdir/$soname.def;
-         cat $export_symbols >> $output_objdir/$soname.def;
-       fi~
-       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      else
-       ld_shlibs_F77=no
-      fi
-      ;;
-
-    interix3*)
-      hardcode_direct_F77=no
-      hardcode_shlibpath_var_F77=no
-      hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec_F77='${wl}-E'
-      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-      # Instead, shared libraries are loaded at an image base (0x10000000 by
-      # default) and relocated if they conflict, which is a slow very memory
-      # consuming and fragmenting process.  To avoid this, we pick a random,
-      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      ;;
-
-    linux*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       tmp_addflag=
-       case $cc_basename,$host_cpu in
-       pgcc*)                          # Portland Group C compiler
-         whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag'
-         ;;
-       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
-         whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag -Mnomain' ;;
-       ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
-         tmp_addflag=' -i_dynamic' ;;
-       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
-         tmp_addflag=' -i_dynamic -nofor_main' ;;
-       ifc* | ifort*)                  # Intel Fortran compiler
-         tmp_addflag=' -nofor_main' ;;
-       esac
-       archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
-       if test $supports_anon_versioning = yes; then
-         archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
-  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-  $echo "local: *; };" >> $output_objdir/$libname.ver~
-         $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-       fi
-       link_all_deplibs_F77=no
-      else
-       ld_shlibs_F77=no
-      fi
-      ;;
-
-    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-       wlarc=
-      else
-       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
-
-    solaris*)
-      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-       ld_shlibs_F77=no
-       cat <<EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-EOF
-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       ld_shlibs_F77=no
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
-       ld_shlibs_F77=no
-       cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
-       ;;
-       *)
-         if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-           hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
-           archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
-           archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
-         else
-           ld_shlibs_F77=no
-         fi
-       ;;
-      esac
-      ;;
-
-    sunos4*)
-      archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      hardcode_direct_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    *)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       ld_shlibs_F77=no
-      fi
-      ;;
-    esac
-
-    if test "$ld_shlibs_F77" = no; then
-      runpath_var=
-      hardcode_libdir_flag_spec_F77=
-      export_dynamic_flag_spec_F77=
-      whole_archive_flag_spec_F77=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      allow_undefined_flag_F77=unsupported
-      always_export_symbols_F77=yes
-      archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      hardcode_minus_L_F77=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-       # Neither direct hardcoding nor static linking is supported with a
-       # broken collect2.
-       hardcode_direct_F77=unsupported
-      fi
-      ;;
-
-    aix4* | aix5*)
-      if test "$host_cpu" = ia64; then
-       # On IA64, the linker does run time linking by default, so we don't
-       # have to do anything special.
-       aix_use_runtimelinking=no
-       exp_sym_flag='-Bexport'
-       no_entry_flag=""
-      else
-       # If we're using GNU nm, then we don't want the "-C" option.
-       # -C means demangle to AIX nm, but means don't demangle with GNU nm
-       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-         export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-       else
-         export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-       fi
-       aix_use_runtimelinking=no
-
-       # Test if we are trying to use run time linking or normal
-       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-       # need to do runtime linking.
-       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
-         for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-           aix_use_runtimelinking=yes
-           break
-         fi
-         done
-         ;;
-       esac
-
-       exp_sym_flag='-bexport'
-       no_entry_flag='-bnoentry'
-      fi
-
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-      archive_cmds_F77=''
-      hardcode_direct_F77=yes
-      hardcode_libdir_separator_F77=':'
-      link_all_deplibs_F77=yes
-
-      if test "$GCC" = yes; then
-       case $host_os in aix4.[012]|aix4.[012].*)
-       # We only want to do this on AIX 4.2 and lower, the check
-       # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
-         if test -f "$collect2name" && \
-          strings "$collect2name" | grep resolve_lib_name >/dev/null
-         then
-         # We have reworked collect2
-         hardcode_direct_F77=yes
-         else
-         # We have old collect2
-         hardcode_direct_F77=unsupported
-         # It fails to find uninstalled libraries when the uninstalled
-         # path is not listed in the libpath.  Setting hardcode_minus_L
-         # to unsupported forces relinking
-         hardcode_minus_L_F77=yes
-         hardcode_libdir_flag_spec_F77='-L$libdir'
-         hardcode_libdir_separator_F77=
-         fi
-         ;;
-       esac
-       shared_flag='-shared'
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag="$shared_flag "'${wl}-G'
-       fi
-      else
-       # not using gcc
-       if test "$host_cpu" = ia64; then
-       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-       # chokes on -Wl,-G. The following line is correct:
-         shared_flag='-G'
-       else
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag='${wl}-G'
-         else
-           shared_flag='${wl}-bM:SRE'
-         fi
-       fi
-      fi
-
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to export.
-      always_export_symbols_F77=yes
-      if test "$aix_use_runtimelinking" = yes; then
-       # Warning - without using the other runtime loading flags (-brtl),
-       # -berok will link without error, but may produce a broken library.
-       allow_undefined_flag_F77='-berok'
-       # Determine the default libpath from the value encoded in an empty executable.
-       cat >conftest.$ac_ext <<_ACEOF
-      program main
-
-      end
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_f77_werror_flag"                         || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
-       hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
-       archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-       else
-       if test "$host_cpu" = ia64; then
-         hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
-         allow_undefined_flag_F77="-z nodefs"
-         archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-       else
-        # Determine the default libpath from the value encoded in an empty executable.
-        cat >conftest.$ac_ext <<_ACEOF
-      program main
-
-      end
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_f77_werror_flag"                         || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
-        hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
-         # Warning - without using the other run time loading flags,
-         # -berok will link without error, but may produce a broken library.
-         no_undefined_flag_F77=' ${wl}-bernotok'
-         allow_undefined_flag_F77=' ${wl}-berok'
-         # Exported symbols can be pulled into shared objects from archives
-         whole_archive_flag_spec_F77='$convenience'
-         archive_cmds_need_lc_F77=yes
-         # This is similar to how AIX traditionally builds its shared libraries.
-         archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-       fi
-      fi
-      ;;
-
-    amigaos*)
-      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_minus_L_F77=yes
-      # see comment about different semantics on the GNU ld section
-      ld_shlibs_F77=no
-      ;;
-
-    bsdi[45]*)
-      export_dynamic_flag_spec_F77=-rdynamic
-      ;;
-
-    cygwin* | mingw* | pw32*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      hardcode_libdir_flag_spec_F77=' '
-      allow_undefined_flag_F77=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      old_archive_From_new_cmds_F77='true'
-      # FIXME: Should let the user specify the lib program.
-      old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes_F77=yes
-      ;;
-
-    darwin* | rhapsody*)
-      case $host_os in
-        rhapsody* | darwin1.[012])
-         allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[012])
-               allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-      esac
-      archive_cmds_need_lc_F77=no
-      hardcode_direct_F77=no
-      hardcode_automatic_F77=yes
-      hardcode_shlibpath_var_F77=unsupported
-      whole_archive_flag_spec_F77=''
-      link_all_deplibs_F77=yes
-    if test "$GCC" = yes ; then
-       output_verbose_link_cmd='echo'
-        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-      module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    else
-      case $cc_basename in
-        xlc*)
-         output_verbose_link_cmd='echo'
-         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-         module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          ;;
-       *)
-         ld_shlibs_F77=no
-          ;;
-      esac
-    fi
-      ;;
-
-    dgux*)
-      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    freebsd1*)
-      ld_shlibs_F77=no
-      ;;
-
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      hardcode_libdir_flag_spec_F77='-R$libdir'
-      hardcode_direct_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct_F77=yes
-      hardcode_minus_L_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
-      archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      hardcode_libdir_flag_spec_F77='-R$libdir'
-      hardcode_direct_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    # GNU/kFreeBSD uses gcc -shared to do shared libraries.
-    kfreebsd*-gnu)
-      archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      hardcode_libdir_flag_spec_F77='-R$libdir'
-      hardcode_direct_F77=yes
-      hardcode_shlibpath_var_F77=no
-      link_all_deplibs_F77=no
-      ;;
-
-    hpux9*)
-      if test "$GCC" = yes; then
-       archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-       archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      fi
-      hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator_F77=:
-      hardcode_direct_F77=yes
-
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      hardcode_minus_L_F77=yes
-      export_dynamic_flag_spec_F77='${wl}-E'
-      ;;
-
-    hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-       hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
-       hardcode_libdir_separator_F77=:
-
-       hardcode_direct_F77=yes
-       export_dynamic_flag_spec_F77='${wl}-E'
-
-       # hardcode_minus_L: Not really in the search PATH,
-       # but as the default location of the library.
-       hardcode_minus_L_F77=yes
-      fi
-      ;;
-
-    hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       case $host_cpu in
-       hppa*64*)
-         archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      else
-       case $host_cpu in
-       hppa*64*)
-         archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      fi
-      if test "$with_gnu_ld" = no; then
-       hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
-       hardcode_libdir_separator_F77=:
-
-       case $host_cpu in
-       hppa*64*|ia64*)
-         hardcode_libdir_flag_spec_ld_F77='+b $libdir'
-         hardcode_direct_F77=no
-         hardcode_shlibpath_var_F77=no
-         ;;
-       *)
-         hardcode_direct_F77=yes
-         export_dynamic_flag_spec_F77='${wl}-E'
-
-         # hardcode_minus_L: Not really in the search PATH,
-         # but as the default location of the library.
-         hardcode_minus_L_F77=yes
-         ;;
-       esac
-      fi
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-       archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
-      fi
-      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_F77=:
-      link_all_deplibs_F77=yes
-      ;;
-
-    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-       archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      hardcode_libdir_flag_spec_F77='-R$libdir'
-      hardcode_direct_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    newsos6)
-      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct_F77=yes
-      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_F77=:
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    openbsd*)
-      hardcode_direct_F77=yes
-      hardcode_shlibpath_var_F77=no
-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-       archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-       hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
-       export_dynamic_flag_spec_F77='${wl}-E'
-      else
-       case $host_os in
-        openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-          archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-          hardcode_libdir_flag_spec_F77='-R$libdir'
-          ;;
-        *)
-          archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-          hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
-          ;;
-       esac
-      fi
-      ;;
-
-    os2*)
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_minus_L_F77=yes
-      allow_undefined_flag_F77=unsupported
-      archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
-
-    osf3*)
-      if test "$GCC" = yes; then
-       allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-       allow_undefined_flag_F77=' -expect_unresolved \*'
-       archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_F77=:
-      ;;
-
-    osf4* | osf5*)     # as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-       allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-      else
-       allow_undefined_flag_F77=' -expect_unresolved \*'
-       archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
-
-       # Both c and cxx compiler support -rpath directly
-       hardcode_libdir_flag_spec_F77='-rpath $libdir'
-      fi
-      hardcode_libdir_separator_F77=:
-      ;;
-
-    solaris*)
-      no_undefined_flag_F77=' -z text'
-      if test "$GCC" = yes; then
-       wlarc='${wl}'
-       archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
-      else
-       wlarc=''
-       archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-       $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-      fi
-      hardcode_libdir_flag_spec_F77='-R$libdir'
-      hardcode_shlibpath_var_F77=no
-      case $host_os in
-      solaris2.[0-5] | solaris2.[0-5].*) ;;
-      *)
-       # The compiler driver will combine linker options so we
-       # cannot just pass the convience library names through
-       # without $wl, iff we do not link with $LD.
-       # Luckily, gcc supports the same syntax we need for Sun Studio.
-       # Supported since Solaris 2.6 (maybe 2.5.1?)
-       case $wlarc in
-       '')
-         whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
-       *)
-         whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
-       esac ;;
-      esac
-      link_all_deplibs_F77=yes
-      ;;
-
-    sunos4*)
-      if test "x$host_vendor" = xsequent; then
-       # Use $CC to link under sequent, because it throws in some extra .o
-       # files that make .init and .fini sections work.
-       archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_direct_F77=yes
-      hardcode_minus_L_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    sysv4)
-      case $host_vendor in
-       sni)
-         archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         hardcode_direct_F77=yes # is this really true???
-       ;;
-       siemens)
-         ## LD is ld it makes a PLAMLIB
-         ## CC just makes a GrossModule.
-         archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-         reload_cmds_F77='$CC -r -o $output$reload_objs'
-         hardcode_direct_F77=no
-        ;;
-       motorola)
-         archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
-       ;;
-      esac
-      runpath_var='LD_RUN_PATH'
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    sysv4.3*)
-      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_shlibpath_var_F77=no
-      export_dynamic_flag_spec_F77='-Bexport'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_shlibpath_var_F77=no
-       runpath_var=LD_RUN_PATH
-       hardcode_runpath_var=yes
-       ld_shlibs_F77=yes
-      fi
-      ;;
-
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
-      no_undefined_flag_F77='${wl}-z,text'
-      archive_cmds_need_lc_F77=no
-      hardcode_shlibpath_var_F77=no
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-       archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
-      # link with -lc, and that would cause any symbols used from libc to
-      # always be unresolved, which means just about no library would
-      # ever link correctly.  If we're not using GNU ld we use -z text
-      # though, which does catch some bad symbols but isn't as heavy-handed
-      # as -z defs.
-      no_undefined_flag_F77='${wl}-z,text'
-      allow_undefined_flag_F77='${wl}-z,nodefs'
-      archive_cmds_need_lc_F77=no
-      hardcode_shlibpath_var_F77=no
-      hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-      hardcode_libdir_separator_F77=':'
-      link_all_deplibs_F77=yes
-      export_dynamic_flag_spec_F77='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-       archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    uts4*)
-      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    *)
-      ld_shlibs_F77=no
-      ;;
-    esac
-  fi
-
-echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
-echo "${ECHO_T}$ld_shlibs_F77" >&6
-test "$ld_shlibs_F77" = no && can_build_shared=no
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc_F77" in
-x|xyes)
-  # Assume -lc should be added
-  archive_cmds_need_lc_F77=yes
-
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $archive_cmds_F77 in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
-      $rm conftest*
-      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl_F77
-       pic_flag=$lt_prog_compiler_pic_F77
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag_F77
-        allow_undefined_flag_F77=
-        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-  (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-        then
-         archive_cmds_need_lc_F77=no
-        else
-         archive_cmds_need_lc_F77=yes
-        fi
-        allow_undefined_flag_F77=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $rm conftest*
-      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6
-      ;;
-    esac
-  fi
-  ;;
-esac
-
-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
-  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
-else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
-
-aix4* | aix5*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[01] | aix4.[01].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-          echo ' yes '
-          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
-       :
-      else
-       can_build_shared=no
-      fi
-      ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
-
-amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
-  ;;
-
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
-
-bsdi[45]*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
-
-cygwin* | mingw* | pw32*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
-
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32*)
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $rm \$dlpath'
-    shlibpath_overrides_runpath=yes
-
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
-      ;;
-    mingw*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-      fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    esac
-    ;;
-
-  *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
-    ;;
-  esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
-
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
-  if test "$GCC" = yes; then
-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
-  else
-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
-  fi
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
-
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
-kfreebsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[123]*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[01]* | freebsdelf3.[01]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
-  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  freebsd*) # from 4.6 on
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
-
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  case $host_cpu in
-  ia64*)
-    shrext_cmds='.so'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-    fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-   hppa*64*)
-     shrext_cmds='.sl'
-     hardcode_into_libs=yes
-     dynamic_linker="$host_os dld.sl"
-     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-     soname_spec='${libname}${release}${shared_ext}$major'
-     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-     ;;
-   *)
-    shrext_cmds='.sl'
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    ;;
-  esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
-
-interix3*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-       if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux
-       else
-               version_type=irix
-       fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  hardcode_into_libs=yes
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
-
-# This must be Linux ELF.
-linux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  # Append ld.so.conf contents to the search path
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,       ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
-  fi
-
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
-
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
-
-knetbsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
-
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-nto-qnx*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-openbsd*)
-  version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
-  need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-    *)                         need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[89] | openbsd2.[89].*)
-       shlibpath_overrides_runpath=no
-       ;;
-      *)
-       shlibpath_overrides_runpath=yes
-       ;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
-
-os2*)
-  libname_spec='$name'
-  shrext_cmds=".dll"
-  need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      export_dynamic_flag_spec='${wl}-Blargedynsym'
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-    shlibpath_overrides_runpath=no
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    shlibpath_overrides_runpath=yes
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-       ;;
-    esac
-  fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
-
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
-hardcode_action_F77=
-if test -n "$hardcode_libdir_flag_spec_F77" || \
-   test -n "$runpath_var_F77" || \
-   test "X$hardcode_automatic_F77" = "Xyes" ; then
-
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct_F77" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
-     test "$hardcode_minus_L_F77" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action_F77=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action_F77=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action_F77=unsupported
-fi
-echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
-echo "${ECHO_T}$hardcode_action_F77" >&6
-
-if test "$hardcode_action_F77" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-
-
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # See if we are running on zsh, and set the options which allow our commands through
-  # without removal of \ escapes.
-  if test -n "${ZSH_VERSION+set}" ; then
-    setopt NO_GLOB_SUBST
-  fi
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
-    SED SHELL STRIP \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    compiler_F77 \
-    CC_F77 \
-    LD_F77 \
-    lt_prog_compiler_wl_F77 \
-    lt_prog_compiler_pic_F77 \
-    lt_prog_compiler_static_F77 \
-    lt_prog_compiler_no_builtin_flag_F77 \
-    export_dynamic_flag_spec_F77 \
-    thread_safe_flag_spec_F77 \
-    whole_archive_flag_spec_F77 \
-    enable_shared_with_static_runtimes_F77 \
-    old_archive_cmds_F77 \
-    old_archive_from_new_cmds_F77 \
-    predep_objects_F77 \
-    postdep_objects_F77 \
-    predeps_F77 \
-    postdeps_F77 \
-    compiler_lib_search_path_F77 \
-    archive_cmds_F77 \
-    archive_expsym_cmds_F77 \
-    postinstall_cmds_F77 \
-    postuninstall_cmds_F77 \
-    old_archive_from_expsyms_cmds_F77 \
-    allow_undefined_flag_F77 \
-    no_undefined_flag_F77 \
-    export_symbols_cmds_F77 \
-    hardcode_libdir_flag_spec_F77 \
-    hardcode_libdir_flag_spec_ld_F77 \
-    hardcode_libdir_separator_F77 \
-    hardcode_automatic_F77 \
-    module_cmds_F77 \
-    module_expsym_cmds_F77 \
-    lt_cv_prog_compiler_c_o_F77 \
-    exclude_expsyms_F77 \
-    include_expsyms_F77; do
-
-    case $var in
-    old_archive_cmds_F77 | \
-    old_archive_from_new_cmds_F77 | \
-    archive_cmds_F77 | \
-    archive_expsym_cmds_F77 | \
-    module_cmds_F77 | \
-    module_expsym_cmds_F77 | \
-    old_archive_from_expsyms_cmds_F77 | \
-    export_symbols_cmds_F77 | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
-
-  case $lt_echo in
-  *'\$0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-    ;;
-  esac
-
-cfgfile="$ofile"
-
-  cat <<__EOF__ >> "$cfgfile"
-# ### BEGIN LIBTOOL TAG CONFIG: $tagname
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_F77
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
-
-# A language-specific compiler.
-CC=$lt_compiler_F77
-
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_F77
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_LD_F77
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A symbol stripping program
-STRIP=$lt_STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_F77
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_F77
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_F77
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds_F77
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_F77
-archive_expsym_cmds=$lt_archive_expsym_cmds_F77
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_module_cmds_F77
-module_expsym_cmds=$lt_module_expsym_cmds_F77
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_predep_objects_F77
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects_F77
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_F77
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_F77
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_F77
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_F77
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_F77
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_F77
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
-
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
-
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_F77
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_F77
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$hardcode_automatic_F77
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_F77
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_F77"
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols_F77
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_F77
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_F77
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_F77
-
-# ### END LIBTOOL TAG CONFIG: $tagname
-
-__EOF__
-
-
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-  if test -f "$ltmain_in"; then
-    test -f Makefile && make "$ltmain"
-  fi
-fi
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC="$lt_save_CC"
-
-       else
-         tagname=""
-       fi
-       ;;
-
-      GCJ)
-       if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
-
-
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-objext_GCJ=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
-
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
-
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${GCJ-"gcj"}
-compiler=$CC
-compiler_GCJ=$CC
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-archive_cmds_need_lc_GCJ=no
-
-old_archive_cmds_GCJ=$old_archive_cmds
-
-
-lt_prog_compiler_no_builtin_flag_GCJ=
-
-if test "$GCC" = yes; then
-  lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
-
-
-echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_rtti_exceptions=no
-  ac_outfile=conftest.$ac_objext
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="-fno-rtti -fno-exceptions"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16264: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:16268: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_rtti_exceptions=yes
-     fi
-   fi
-   $rm conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
-
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
-    lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
-else
-    :
-fi
-
-fi
-
-lt_prog_compiler_wl_GCJ=
-lt_prog_compiler_pic_GCJ=
-lt_prog_compiler_static_GCJ=
-
-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
-
-  if test "$GCC" = yes; then
-    lt_prog_compiler_wl_GCJ='-Wl,'
-    lt_prog_compiler_static_GCJ='-static'
-
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static_GCJ='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
-      ;;
-
-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
-      ;;
-
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic_GCJ='-fno-common'
-      ;;
-
-    interix3*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      lt_prog_compiler_can_build_shared_GCJ=no
-      enable_shared=no
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       lt_prog_compiler_pic_GCJ=-Kconform_pic
-      fi
-      ;;
-
-    hpux*)
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       # +Z the default
-       ;;
-      *)
-       lt_prog_compiler_pic_GCJ='-fPIC'
-       ;;
-      esac
-      ;;
-
-    *)
-      lt_prog_compiler_pic_GCJ='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static_GCJ='-Bstatic'
-      else
-       lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-      darwin*)
-        # PIC is the default on this platform
-        # Common symbols not allowed in MH_DYLIB files
-       case $cc_basename in
-         xlc*)
-         lt_prog_compiler_pic_GCJ='-qnocommon'
-         lt_prog_compiler_wl_GCJ='-Wl,'
-         ;;
-       esac
-       ;;
-
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       # +Z the default
-       ;;
-      *)
-       lt_prog_compiler_pic_GCJ='+Z'
-       ;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      # PIC (with -KPIC) is the default.
-      lt_prog_compiler_static_GCJ='-non_shared'
-      ;;
-
-    newsos6)
-      lt_prog_compiler_pic_GCJ='-KPIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
-      ;;
-
-    linux*)
-      case $cc_basename in
-      icc* | ecc*)
-       lt_prog_compiler_wl_GCJ='-Wl,'
-       lt_prog_compiler_pic_GCJ='-KPIC'
-       lt_prog_compiler_static_GCJ='-static'
-        ;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-       # which looks to be a dead project)
-       lt_prog_compiler_wl_GCJ='-Wl,'
-       lt_prog_compiler_pic_GCJ='-fpic'
-       lt_prog_compiler_static_GCJ='-Bstatic'
-        ;;
-      ccc*)
-        lt_prog_compiler_wl_GCJ='-Wl,'
-        # All Alpha code is PIC.
-        lt_prog_compiler_static_GCJ='-non_shared'
-        ;;
-      esac
-      ;;
-
-    osf3* | osf4* | osf5*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      # All OSF/1 code is PIC.
-      lt_prog_compiler_static_GCJ='-non_shared'
-      ;;
-
-    solaris*)
-      lt_prog_compiler_pic_GCJ='-KPIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95*)
-       lt_prog_compiler_wl_GCJ='-Qoption ld ';;
-      *)
-       lt_prog_compiler_wl_GCJ='-Wl,';;
-      esac
-      ;;
-
-    sunos4*)
-      lt_prog_compiler_wl_GCJ='-Qoption ld '
-      lt_prog_compiler_pic_GCJ='-PIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
-      ;;
-
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      lt_prog_compiler_pic_GCJ='-KPIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-       lt_prog_compiler_pic_GCJ='-Kconform_pic'
-       lt_prog_compiler_static_GCJ='-Bstatic'
-      fi
-      ;;
-
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      lt_prog_compiler_pic_GCJ='-KPIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
-      ;;
-
-    unicos*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      lt_prog_compiler_can_build_shared_GCJ=no
-      ;;
-
-    uts4*)
-      lt_prog_compiler_pic_GCJ='-pic'
-      lt_prog_compiler_static_GCJ='-Bstatic'
-      ;;
-
-    *)
-      lt_prog_compiler_can_build_shared_GCJ=no
-      ;;
-    esac
-  fi
-
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic_GCJ"; then
-
-echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6
-if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_prog_compiler_pic_works_GCJ=no
-  ac_outfile=conftest.$ac_objext
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16532: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:16536: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_prog_compiler_pic_works_GCJ=yes
-     fi
-   fi
-   $rm conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6
-
-if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
-    case $lt_prog_compiler_pic_GCJ in
-     "" | " "*) ;;
-     *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
-     esac
-else
-    lt_prog_compiler_pic_GCJ=
-     lt_prog_compiler_can_build_shared_GCJ=no
-fi
-
-fi
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic_GCJ=
-    ;;
-  *)
-    lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
-    ;;
-esac
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\"
-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
-if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_prog_compiler_static_works_GCJ=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
-   printf "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         lt_prog_compiler_static_works_GCJ=yes
-       fi
-     else
-       lt_prog_compiler_static_works_GCJ=yes
-     fi
-   fi
-   $rm conftest*
-   LDFLAGS="$save_LDFLAGS"
-
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6
-
-if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then
-    :
-else
-    lt_prog_compiler_static_GCJ=
-fi
-
-
-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_c_o_GCJ=no
-   $rm -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16636: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:16640: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_c_o_GCJ=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $rm conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
-   $rm out/* && rmdir out
-   cd ..
-   rmdir conftest
-   $rm conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6
-
-
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6
-  if test "$hard_links" = no; then
-    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-
-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
-
-  runpath_var=
-  allow_undefined_flag_GCJ=
-  enable_shared_with_static_runtimes_GCJ=no
-  archive_cmds_GCJ=
-  archive_expsym_cmds_GCJ=
-  old_archive_From_new_cmds_GCJ=
-  old_archive_from_expsyms_cmds_GCJ=
-  export_dynamic_flag_spec_GCJ=
-  whole_archive_flag_spec_GCJ=
-  thread_safe_flag_spec_GCJ=
-  hardcode_libdir_flag_spec_GCJ=
-  hardcode_libdir_flag_spec_ld_GCJ=
-  hardcode_libdir_separator_GCJ=
-  hardcode_direct_GCJ=no
-  hardcode_minus_L_GCJ=no
-  hardcode_shlibpath_var_GCJ=unsupported
-  link_all_deplibs_GCJ=unknown
-  hardcode_automatic_GCJ=no
-  module_cmds_GCJ=
-  module_expsym_cmds_GCJ=
-  always_export_symbols_GCJ=no
-  export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  include_expsyms_GCJ=
-  # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_"
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  extract_expsyms_cmds=
-  # Just being paranoid about ensuring that cc_basename is set.
-  for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-  case $host_os in
-  cygwin* | mingw* | pw32*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-  esac
-
-  ld_shlibs_GCJ=yes
-  if test "$with_gnu_ld" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
-
-    # Set some defaults for GNU ld with shared library support. These
-    # are reset later if shared libraries are not supported. Putting them
-    # here allows them to be overridden if necessary.
-    runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
-    export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
-       whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-       whole_archive_flag_spec_GCJ=
-    fi
-    supports_anon_versioning=no
-    case `$LD -v 2>/dev/null` in
-      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
-      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-      *\ 2.11.*) ;; # other 2.11 versions
-      *) supports_anon_versioning=yes ;;
-    esac
-
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix3* | aix4* | aix5*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-       ld_shlibs_GCJ=no
-       cat <<EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-EOF
-      fi
-      ;;
-
-    amigaos*)
-      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_minus_L_GCJ=yes
-
-      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we can't use
-      # them.
-      ld_shlibs_GCJ=no
-      ;;
-
-    beos*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       allow_undefined_flag_GCJ=unsupported
-       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-       # support --undefined.  This deserves some investigation.  FIXME
-       archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-       ld_shlibs_GCJ=no
-      fi
-      ;;
-
-    cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
-      # as there is no search path for DLLs.
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      allow_undefined_flag_GCJ=unsupported
-      always_export_symbols_GCJ=no
-      enable_shared_with_static_runtimes_GCJ=yes
-      export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
-
-      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-        archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-       # If the export-symbols file already is a .def file (1st line
-       # is EXPORTS), use it as is; otherwise, prepend...
-       archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname.def;
-       else
-         echo EXPORTS > $output_objdir/$soname.def;
-         cat $export_symbols >> $output_objdir/$soname.def;
-       fi~
-       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      else
-       ld_shlibs_GCJ=no
-      fi
-      ;;
-
-    interix3*)
-      hardcode_direct_GCJ=no
-      hardcode_shlibpath_var_GCJ=no
-      hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec_GCJ='${wl}-E'
-      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-      # Instead, shared libraries are loaded at an image base (0x10000000 by
-      # default) and relocated if they conflict, which is a slow very memory
-      # consuming and fragmenting process.  To avoid this, we pick a random,
-      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      ;;
-
-    linux*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       tmp_addflag=
-       case $cc_basename,$host_cpu in
-       pgcc*)                          # Portland Group C compiler
-         whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag'
-         ;;
-       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
-         whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag -Mnomain' ;;
-       ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
-         tmp_addflag=' -i_dynamic' ;;
-       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
-         tmp_addflag=' -i_dynamic -nofor_main' ;;
-       ifc* | ifort*)                  # Intel Fortran compiler
-         tmp_addflag=' -nofor_main' ;;
-       esac
-       archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
-       if test $supports_anon_versioning = yes; then
-         archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
-  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-  $echo "local: *; };" >> $output_objdir/$libname.ver~
-         $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-       fi
-       link_all_deplibs_GCJ=no
-      else
-       ld_shlibs_GCJ=no
-      fi
-      ;;
-
-    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-       wlarc=
-      else
-       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
-
-    solaris*)
-      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-       ld_shlibs_GCJ=no
-       cat <<EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-EOF
-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       ld_shlibs_GCJ=no
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
-       ld_shlibs_GCJ=no
-       cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
-       ;;
-       *)
-         if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-           hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
-           archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
-           archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
-         else
-           ld_shlibs_GCJ=no
-         fi
-       ;;
-      esac
-      ;;
-
-    sunos4*)
-      archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      ;;
-
-    *)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       ld_shlibs_GCJ=no
-      fi
-      ;;
-    esac
-
-    if test "$ld_shlibs_GCJ" = no; then
-      runpath_var=
-      hardcode_libdir_flag_spec_GCJ=
-      export_dynamic_flag_spec_GCJ=
-      whole_archive_flag_spec_GCJ=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      allow_undefined_flag_GCJ=unsupported
-      always_export_symbols_GCJ=yes
-      archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      hardcode_minus_L_GCJ=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-       # Neither direct hardcoding nor static linking is supported with a
-       # broken collect2.
-       hardcode_direct_GCJ=unsupported
-      fi
-      ;;
-
-    aix4* | aix5*)
-      if test "$host_cpu" = ia64; then
-       # On IA64, the linker does run time linking by default, so we don't
-       # have to do anything special.
-       aix_use_runtimelinking=no
-       exp_sym_flag='-Bexport'
-       no_entry_flag=""
-      else
-       # If we're using GNU nm, then we don't want the "-C" option.
-       # -C means demangle to AIX nm, but means don't demangle with GNU nm
-       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-         export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-       else
-         export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-       fi
-       aix_use_runtimelinking=no
-
-       # Test if we are trying to use run time linking or normal
-       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-       # need to do runtime linking.
-       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
-         for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-           aix_use_runtimelinking=yes
-           break
-         fi
-         done
-         ;;
-       esac
-
-       exp_sym_flag='-bexport'
-       no_entry_flag='-bnoentry'
-      fi
-
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-      archive_cmds_GCJ=''
-      hardcode_direct_GCJ=yes
-      hardcode_libdir_separator_GCJ=':'
-      link_all_deplibs_GCJ=yes
-
-      if test "$GCC" = yes; then
-       case $host_os in aix4.[012]|aix4.[012].*)
-       # We only want to do this on AIX 4.2 and lower, the check
-       # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
-         if test -f "$collect2name" && \
-          strings "$collect2name" | grep resolve_lib_name >/dev/null
-         then
-         # We have reworked collect2
-         hardcode_direct_GCJ=yes
-         else
-         # We have old collect2
-         hardcode_direct_GCJ=unsupported
-         # It fails to find uninstalled libraries when the uninstalled
-         # path is not listed in the libpath.  Setting hardcode_minus_L
-         # to unsupported forces relinking
-         hardcode_minus_L_GCJ=yes
-         hardcode_libdir_flag_spec_GCJ='-L$libdir'
-         hardcode_libdir_separator_GCJ=
-         fi
-         ;;
-       esac
-       shared_flag='-shared'
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag="$shared_flag "'${wl}-G'
-       fi
-      else
-       # not using gcc
-       if test "$host_cpu" = ia64; then
-       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-       # chokes on -Wl,-G. The following line is correct:
-         shared_flag='-G'
-       else
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag='${wl}-G'
-         else
-           shared_flag='${wl}-bM:SRE'
-         fi
-       fi
-      fi
-
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to export.
-      always_export_symbols_GCJ=yes
-      if test "$aix_use_runtimelinking" = yes; then
-       # Warning - without using the other runtime loading flags (-brtl),
-       # -berok will link without error, but may produce a broken library.
-       allow_undefined_flag_GCJ='-berok'
-       # Determine the default libpath from the value encoded in an empty executable.
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
-       hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
-       archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-       else
-       if test "$host_cpu" = ia64; then
-         hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
-         allow_undefined_flag_GCJ="-z nodefs"
-         archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-       else
-        # Determine the default libpath from the value encoded in an empty executable.
-        cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
-        hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
-         # Warning - without using the other run time loading flags,
-         # -berok will link without error, but may produce a broken library.
-         no_undefined_flag_GCJ=' ${wl}-bernotok'
-         allow_undefined_flag_GCJ=' ${wl}-berok'
-         # Exported symbols can be pulled into shared objects from archives
-         whole_archive_flag_spec_GCJ='$convenience'
-         archive_cmds_need_lc_GCJ=yes
-         # This is similar to how AIX traditionally builds its shared libraries.
-         archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-       fi
-      fi
-      ;;
-
-    amigaos*)
-      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_minus_L_GCJ=yes
-      # see comment about different semantics on the GNU ld section
-      ld_shlibs_GCJ=no
-      ;;
-
-    bsdi[45]*)
-      export_dynamic_flag_spec_GCJ=-rdynamic
-      ;;
-
-    cygwin* | mingw* | pw32*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      hardcode_libdir_flag_spec_GCJ=' '
-      allow_undefined_flag_GCJ=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      old_archive_From_new_cmds_GCJ='true'
-      # FIXME: Should let the user specify the lib program.
-      old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes_GCJ=yes
-      ;;
-
-    darwin* | rhapsody*)
-      case $host_os in
-        rhapsody* | darwin1.[012])
-         allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[012])
-               allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-      esac
-      archive_cmds_need_lc_GCJ=no
-      hardcode_direct_GCJ=no
-      hardcode_automatic_GCJ=yes
-      hardcode_shlibpath_var_GCJ=unsupported
-      whole_archive_flag_spec_GCJ=''
-      link_all_deplibs_GCJ=yes
-    if test "$GCC" = yes ; then
-       output_verbose_link_cmd='echo'
-        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-      module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    else
-      case $cc_basename in
-        xlc*)
-         output_verbose_link_cmd='echo'
-         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-         module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          ;;
-       *)
-         ld_shlibs_GCJ=no
-          ;;
-      esac
-    fi
-      ;;
-
-    dgux*)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_shlibpath_var_GCJ=no
-      ;;
-
-    freebsd1*)
-      ld_shlibs_GCJ=no
-      ;;
-
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      ;;
-
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct_GCJ=yes
-      hardcode_minus_L_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      ;;
-
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
-      archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      ;;
-
-    # GNU/kFreeBSD uses gcc -shared to do shared libraries.
-    kfreebsd*-gnu)
-      archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      link_all_deplibs_GCJ=no
-      ;;
-
-    hpux9*)
-      if test "$GCC" = yes; then
-       archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-       archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      fi
-      hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator_GCJ=:
-      hardcode_direct_GCJ=yes
-
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      hardcode_minus_L_GCJ=yes
-      export_dynamic_flag_spec_GCJ='${wl}-E'
-      ;;
-
-    hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-       hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
-       hardcode_libdir_separator_GCJ=:
-
-       hardcode_direct_GCJ=yes
-       export_dynamic_flag_spec_GCJ='${wl}-E'
-
-       # hardcode_minus_L: Not really in the search PATH,
-       # but as the default location of the library.
-       hardcode_minus_L_GCJ=yes
-      fi
-      ;;
-
-    hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       case $host_cpu in
-       hppa*64*)
-         archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      else
-       case $host_cpu in
-       hppa*64*)
-         archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      fi
-      if test "$with_gnu_ld" = no; then
-       hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
-       hardcode_libdir_separator_GCJ=:
-
-       case $host_cpu in
-       hppa*64*|ia64*)
-         hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
-         hardcode_direct_GCJ=no
-         hardcode_shlibpath_var_GCJ=no
-         ;;
-       *)
-         hardcode_direct_GCJ=yes
-         export_dynamic_flag_spec_GCJ='${wl}-E'
-
-         # hardcode_minus_L: Not really in the search PATH,
-         # but as the default location of the library.
-         hardcode_minus_L_GCJ=yes
-         ;;
-       esac
-      fi
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-       archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
-      fi
-      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_GCJ=:
-      link_all_deplibs_GCJ=yes
-      ;;
-
-    netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-       archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-       archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      ;;
-
-    newsos6)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct_GCJ=yes
-      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_GCJ=:
-      hardcode_shlibpath_var_GCJ=no
-      ;;
-
-    openbsd*)
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-       archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-       hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
-       export_dynamic_flag_spec_GCJ='${wl}-E'
-      else
-       case $host_os in
-        openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-          archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-          hardcode_libdir_flag_spec_GCJ='-R$libdir'
-          ;;
-        *)
-          archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-          hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
-          ;;
-       esac
-      fi
-      ;;
-
-    os2*)
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_minus_L_GCJ=yes
-      allow_undefined_flag_GCJ=unsupported
-      archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
-
-    osf3*)
-      if test "$GCC" = yes; then
-       allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-       allow_undefined_flag_GCJ=' -expect_unresolved \*'
-       archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_GCJ=:
-      ;;
-
-    osf4* | osf5*)     # as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-       allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
-      else
-       allow_undefined_flag_GCJ=' -expect_unresolved \*'
-       archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-       archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
-
-       # Both c and cxx compiler support -rpath directly
-       hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
-      fi
-      hardcode_libdir_separator_GCJ=:
-      ;;
-
-    solaris*)
-      no_undefined_flag_GCJ=' -z text'
-      if test "$GCC" = yes; then
-       wlarc='${wl}'
-       archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
-      else
-       wlarc=''
-       archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-       $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-      fi
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_shlibpath_var_GCJ=no
-      case $host_os in
-      solaris2.[0-5] | solaris2.[0-5].*) ;;
-      *)
-       # The compiler driver will combine linker options so we
-       # cannot just pass the convience library names through
-       # without $wl, iff we do not link with $LD.
-       # Luckily, gcc supports the same syntax we need for Sun Studio.
-       # Supported since Solaris 2.6 (maybe 2.5.1?)
-       case $wlarc in
-       '')
-         whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
-       *)
-         whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
-       esac ;;
-      esac
-      link_all_deplibs_GCJ=yes
-      ;;
-
-    sunos4*)
-      if test "x$host_vendor" = xsequent; then
-       # Use $CC to link under sequent, because it throws in some extra .o
-       # files that make .init and .fini sections work.
-       archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_minus_L_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      ;;
-
-    sysv4)
-      case $host_vendor in
-       sni)
-         archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         hardcode_direct_GCJ=yes # is this really true???
-       ;;
-       siemens)
-         ## LD is ld it makes a PLAMLIB
-         ## CC just makes a GrossModule.
-         archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-         reload_cmds_GCJ='$CC -r -o $output$reload_objs'
-         hardcode_direct_GCJ=no
-        ;;
-       motorola)
-         archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
-       ;;
-      esac
-      runpath_var='LD_RUN_PATH'
-      hardcode_shlibpath_var_GCJ=no
-      ;;
-
-    sysv4.3*)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_shlibpath_var_GCJ=no
-      export_dynamic_flag_spec_GCJ='-Bexport'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_shlibpath_var_GCJ=no
-       runpath_var=LD_RUN_PATH
-       hardcode_runpath_var=yes
-       ld_shlibs_GCJ=yes
-      fi
-      ;;
-
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
-      no_undefined_flag_GCJ='${wl}-z,text'
-      archive_cmds_need_lc_GCJ=no
-      hardcode_shlibpath_var_GCJ=no
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-       archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
-      # link with -lc, and that would cause any symbols used from libc to
-      # always be unresolved, which means just about no library would
-      # ever link correctly.  If we're not using GNU ld we use -z text
-      # though, which does catch some bad symbols but isn't as heavy-handed
-      # as -z defs.
-      no_undefined_flag_GCJ='${wl}-z,text'
-      allow_undefined_flag_GCJ='${wl}-z,nodefs'
-      archive_cmds_need_lc_GCJ=no
-      hardcode_shlibpath_var_GCJ=no
-      hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-      hardcode_libdir_separator_GCJ=':'
-      link_all_deplibs_GCJ=yes
-      export_dynamic_flag_spec_GCJ='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-       archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    uts4*)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_shlibpath_var_GCJ=no
-      ;;
-
-    *)
-      ld_shlibs_GCJ=no
-      ;;
-    esac
-  fi
-
-echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
-echo "${ECHO_T}$ld_shlibs_GCJ" >&6
-test "$ld_shlibs_GCJ" = no && can_build_shared=no
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc_GCJ" in
-x|xyes)
-  # Assume -lc should be added
-  archive_cmds_need_lc_GCJ=yes
-
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $archive_cmds_GCJ in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
-      $rm conftest*
-      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl_GCJ
-       pic_flag=$lt_prog_compiler_pic_GCJ
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
-        allow_undefined_flag_GCJ=
-        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-  (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-        then
-         archive_cmds_need_lc_GCJ=no
-        else
-         archive_cmds_need_lc_GCJ=yes
-        fi
-        allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $rm conftest*
-      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6
-      ;;
-    esac
-  fi
-  ;;
-esac
-
-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
-  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
-else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
-
-aix4* | aix5*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[01] | aix4.[01].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-          echo ' yes '
-          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
-       :
-      else
-       can_build_shared=no
-      fi
-      ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
-
-amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
-  ;;
-
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
-
-bsdi[45]*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
-
-cygwin* | mingw* | pw32*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
-
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32*)
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $rm \$dlpath'
-    shlibpath_overrides_runpath=yes
-
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
-      ;;
-    mingw*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-      fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    esac
-    ;;
-
-  *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
-    ;;
-  esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
-
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
-  if test "$GCC" = yes; then
-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
-  else
-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
-  fi
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
-
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
-kfreebsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[123]*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[01]* | freebsdelf3.[01]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
-  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  freebsd*) # from 4.6 on
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
-
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  case $host_cpu in
-  ia64*)
-    shrext_cmds='.so'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-    fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-   hppa*64*)
-     shrext_cmds='.sl'
-     hardcode_into_libs=yes
-     dynamic_linker="$host_os dld.sl"
-     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-     soname_spec='${libname}${release}${shared_ext}$major'
-     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-     ;;
-   *)
-    shrext_cmds='.sl'
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    ;;
-  esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
-
-interix3*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-       if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux
-       else
-               version_type=irix
-       fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  hardcode_into_libs=yes
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
-
-# This must be Linux ELF.
-linux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  # Append ld.so.conf contents to the search path
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,       ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
-  fi
-
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
-
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
-
-knetbsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
-
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-nto-qnx*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-openbsd*)
-  version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
-  need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-    *)                         need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[89] | openbsd2.[89].*)
-       shlibpath_overrides_runpath=no
-       ;;
-      *)
-       shlibpath_overrides_runpath=yes
-       ;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
-
-os2*)
-  libname_spec='$name'
-  shrext_cmds=".dll"
-  need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      export_dynamic_flag_spec='${wl}-Blargedynsym'
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-    shlibpath_overrides_runpath=no
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    shlibpath_overrides_runpath=yes
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-       ;;
-    esac
-  fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
-
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
-hardcode_action_GCJ=
-if test -n "$hardcode_libdir_flag_spec_GCJ" || \
-   test -n "$runpath_var_GCJ" || \
-   test "X$hardcode_automatic_GCJ" = "Xyes" ; then
-
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct_GCJ" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
-     test "$hardcode_minus_L_GCJ" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action_GCJ=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action_GCJ=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action_GCJ=unsupported
-fi
-echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
-echo "${ECHO_T}$hardcode_action_GCJ" >&6
-
-if test "$hardcode_action_GCJ" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-
-
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # See if we are running on zsh, and set the options which allow our commands through
-  # without removal of \ escapes.
-  if test -n "${ZSH_VERSION+set}" ; then
-    setopt NO_GLOB_SUBST
-  fi
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
-    SED SHELL STRIP \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    compiler_GCJ \
-    CC_GCJ \
-    LD_GCJ \
-    lt_prog_compiler_wl_GCJ \
-    lt_prog_compiler_pic_GCJ \
-    lt_prog_compiler_static_GCJ \
-    lt_prog_compiler_no_builtin_flag_GCJ \
-    export_dynamic_flag_spec_GCJ \
-    thread_safe_flag_spec_GCJ \
-    whole_archive_flag_spec_GCJ \
-    enable_shared_with_static_runtimes_GCJ \
-    old_archive_cmds_GCJ \
-    old_archive_from_new_cmds_GCJ \
-    predep_objects_GCJ \
-    postdep_objects_GCJ \
-    predeps_GCJ \
-    postdeps_GCJ \
-    compiler_lib_search_path_GCJ \
-    archive_cmds_GCJ \
-    archive_expsym_cmds_GCJ \
-    postinstall_cmds_GCJ \
-    postuninstall_cmds_GCJ \
-    old_archive_from_expsyms_cmds_GCJ \
-    allow_undefined_flag_GCJ \
-    no_undefined_flag_GCJ \
-    export_symbols_cmds_GCJ \
-    hardcode_libdir_flag_spec_GCJ \
-    hardcode_libdir_flag_spec_ld_GCJ \
-    hardcode_libdir_separator_GCJ \
-    hardcode_automatic_GCJ \
-    module_cmds_GCJ \
-    module_expsym_cmds_GCJ \
-    lt_cv_prog_compiler_c_o_GCJ \
-    exclude_expsyms_GCJ \
-    include_expsyms_GCJ; do
-
-    case $var in
-    old_archive_cmds_GCJ | \
-    old_archive_from_new_cmds_GCJ | \
-    archive_cmds_GCJ | \
-    archive_expsym_cmds_GCJ | \
-    module_cmds_GCJ | \
-    module_expsym_cmds_GCJ | \
-    old_archive_from_expsyms_cmds_GCJ | \
-    export_symbols_cmds_GCJ | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
-
-  case $lt_echo in
-  *'\$0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-    ;;
-  esac
-
-cfgfile="$ofile"
-
-  cat <<__EOF__ >> "$cfgfile"
-# ### BEGIN LIBTOOL TAG CONFIG: $tagname
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_GCJ
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
-
-# A language-specific compiler.
-CC=$lt_compiler_GCJ
-
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_GCJ
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_LD_GCJ
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A symbol stripping program
-STRIP=$lt_STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_GCJ
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_GCJ
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_GCJ
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds_GCJ
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_GCJ
-archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_module_cmds_GCJ
-module_expsym_cmds=$lt_module_expsym_cmds_GCJ
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_predep_objects_GCJ
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects_GCJ
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_GCJ
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_GCJ
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_GCJ
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_GCJ
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_GCJ
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ
-
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
-
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_GCJ
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_GCJ
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$hardcode_automatic_GCJ
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_GCJ
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_GCJ"
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols_GCJ
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_GCJ
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_GCJ
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_GCJ
-
-# ### END LIBTOOL TAG CONFIG: $tagname
-
-__EOF__
-
-
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-  if test -f "$ltmain_in"; then
-    test -f Makefile && make "$ltmain"
-  fi
-fi
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC="$lt_save_CC"
-
-       else
-         tagname=""
-       fi
-       ;;
-
-      RC)
-
-
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-objext_RC=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
-
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
-
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${RC-"windres"}
-compiler=$CC
-compiler_RC=$CC
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-lt_cv_prog_compiler_c_o_RC=yes
-
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # See if we are running on zsh, and set the options which allow our commands through
-  # without removal of \ escapes.
-  if test -n "${ZSH_VERSION+set}" ; then
-    setopt NO_GLOB_SUBST
-  fi
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
-    SED SHELL STRIP \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    compiler_RC \
-    CC_RC \
-    LD_RC \
-    lt_prog_compiler_wl_RC \
-    lt_prog_compiler_pic_RC \
-    lt_prog_compiler_static_RC \
-    lt_prog_compiler_no_builtin_flag_RC \
-    export_dynamic_flag_spec_RC \
-    thread_safe_flag_spec_RC \
-    whole_archive_flag_spec_RC \
-    enable_shared_with_static_runtimes_RC \
-    old_archive_cmds_RC \
-    old_archive_from_new_cmds_RC \
-    predep_objects_RC \
-    postdep_objects_RC \
-    predeps_RC \
-    postdeps_RC \
-    compiler_lib_search_path_RC \
-    archive_cmds_RC \
-    archive_expsym_cmds_RC \
-    postinstall_cmds_RC \
-    postuninstall_cmds_RC \
-    old_archive_from_expsyms_cmds_RC \
-    allow_undefined_flag_RC \
-    no_undefined_flag_RC \
-    export_symbols_cmds_RC \
-    hardcode_libdir_flag_spec_RC \
-    hardcode_libdir_flag_spec_ld_RC \
-    hardcode_libdir_separator_RC \
-    hardcode_automatic_RC \
-    module_cmds_RC \
-    module_expsym_cmds_RC \
-    lt_cv_prog_compiler_c_o_RC \
-    exclude_expsyms_RC \
-    include_expsyms_RC; do
-
-    case $var in
-    old_archive_cmds_RC | \
-    old_archive_from_new_cmds_RC | \
-    archive_cmds_RC | \
-    archive_expsym_cmds_RC | \
-    module_cmds_RC | \
-    module_expsym_cmds_RC | \
-    old_archive_from_expsyms_cmds_RC | \
-    export_symbols_cmds_RC | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
-
-  case $lt_echo in
-  *'\$0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-    ;;
-  esac
-
-cfgfile="$ofile"
-
-  cat <<__EOF__ >> "$cfgfile"
-# ### BEGIN LIBTOOL TAG CONFIG: $tagname
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_RC
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
-
-# A language-specific compiler.
-CC=$lt_compiler_RC
-
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_RC
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_LD_RC
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A symbol stripping program
-STRIP=$lt_STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_RC
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_RC
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_RC
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds_RC
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_RC
-archive_expsym_cmds=$lt_archive_expsym_cmds_RC
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_module_cmds_RC
-module_expsym_cmds=$lt_module_expsym_cmds_RC
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_predep_objects_RC
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects_RC
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_RC
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_RC
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_RC
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_RC
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_RC
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_RC
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
-
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
-
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_RC
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_RC
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$hardcode_automatic_RC
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_RC
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_RC"
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols_RC
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_RC
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_RC
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_RC
-
-# ### END LIBTOOL TAG CONFIG: $tagname
-
-__EOF__
-
-
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-  if test -f "$ltmain_in"; then
-    test -f Makefile && make "$ltmain"
-  fi
-fi
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC="$lt_save_CC"
-
-       ;;
-
-      *)
-       { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
-echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
-   { (exit 1); exit 1; }; }
-       ;;
-      esac
-
-      # Append the new tag name to the list of available tags.
-      if test -n "$tagname" ; then
-      available_tags="$available_tags $tagname"
-    fi
-    fi
-  done
-  IFS="$lt_save_ifs"
-
-  # Now substitute the updated list of available tags.
-  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
-    mv "${ofile}T" "$ofile"
-    chmod +x "$ofile"
-  else
-    rm -f "${ofile}T"
-    { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
-echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-fi
-
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-# Prevent multiple expansion
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-                    ac_config_files="$ac_config_files Makefile json.pc"
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-{
-  (set) 2>&1 |
-    case `(ac_space=' '; set | grep ac_space) 2>&1` in
-    *ac_space=\ *)
-      # `set' does not quote correctly, so add quotes (double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \).
-      sed -n \
-       "s/'/'\\\\''/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;;
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n \
-       "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
-      ;;
-    esac;
-} |
-  sed '
-     t clear
-     : clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t end
-     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
-  if test -w $cache_file; then
-    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
-    cat confcache >$cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[         ]*VPATH[        ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[    ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[      ]*$//;
-}'
-fi
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
-  # 1. Remove the extension, and $U if already installed.
-  ac_i=`echo "$ac_i" |
-        sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
-  # 2. Add them.
-  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
-  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    $as_unset $as_var
-  fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-        X"$0" : 'X\(//\)$' \| \
-        X"$0" : 'X\(/\)$' \| \
-        .     : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
-         /^X\/\(\/\/\)$/{ s//\1/; q; }
-         /^X\/\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
-  # Find who we are.  Look in the path if we contain no path at all
-  # relative or not.
-  case $0 in
-    *[\\/]* ) as_myself=$0 ;;
-    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
-       ;;
-  esac
-  # We did not find ourselves, most probably we were run as `sh COMMAND'
-  # in which case we are not to be found in the path.
-  if test "x$as_myself" = x; then
-    as_myself=$0
-  fi
-  if test ! -f "$as_myself"; then
-    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-  case $CONFIG_SHELL in
-  '')
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for as_base in sh bash ksh sh5; do
-        case $as_dir in
-        /*)
-          if ("$as_dir/$as_base" -c '
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
-            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
-            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-            CONFIG_SHELL=$as_dir/$as_base
-            export CONFIG_SHELL
-            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
-          fi;;
-        esac
-       done
-done
-;;
-  esac
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line before each line; the second 'sed' does the real
-  # work.  The second script uses 'N' to pair each line-number line
-  # with the numbered line, and appends trailing '-' during
-  # substitution so that $LINENO is not a special case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
-  sed '=' <$as_myself |
-    sed '
-      N
-      s,$,-,
-      : loop
-      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
-      t loop
-      s,-$,,
-      s,^['$as_cr_digits']*\n,,
-    ' >$as_me.lineno &&
-  chmod +x $as_me.lineno ||
-    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensible to this).
-  . ./$as_me.lineno
-  # Exit status is that of the last command.
-  exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
-  *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T='     ' ;;
-  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
-  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  # We could just check for DJGPP; but this test a) works b) is more generic
-  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-  if test -f conf$$.exe; then
-    # Don't use ln at all; we don't have any links
-    as_ln_s='cp -p'
-  else
-    as_ln_s='ln -s'
-  fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS="  $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.  Logging --version etc. is OK.
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by JSON C Library $as_me 0.3, which was
-generated by GNU Autoconf 2.59.  Invocation command line was
-
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
-
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
-  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
-  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
-  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
-  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
-  -h, --help       print this help, then exit
-  -V, --version    print version number, then exit
-  -q, --quiet      do not print progress messages
-  -d, --debug      don't remove temporary files
-      --recheck    update $as_me by reconfiguring in the same conditions
-  --file=FILE[:TEMPLATE]
-                  instantiate the configuration file FILE
-  --header=FILE[:TEMPLATE]
-                  instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Configuration commands:
-$config_commands
-
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-JSON C Library config.status 0.3
-configured by $0, generated by GNU Autoconf 2.59,
-  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value.  By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
-  case $1 in
-  --*=*)
-    ac_option=`expr "x$1" : 'x\([^=]*\)='`
-    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
-    ac_shift=:
-    ;;
-  -*)
-    ac_option=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  *) # This is not an option, so the user has probably given explicit
-     # arguments.
-     ac_option=$1
-     ac_need_defaults=false;;
-  esac
-
-  case $ac_option in
-  # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --vers* | -V )
-    echo "$ac_cs_version"; exit 0 ;;
-  --he | --h)
-    # Conflict between --help and --header
-    { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
-   { (exit 1); exit 1; }; };;
-  --help | --hel | -h )
-    echo "$ac_cs_usage"; exit 0 ;;
-  --debug | --d* | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
-    ac_need_defaults=false;;
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil | --si | --s)
-    ac_cs_silent=: ;;
-
-  # This is an error.
-  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
-   { (exit 1); exit 1; }; } ;;
-
-  *) ac_config_targets="$ac_config_targets $1" ;;
-
-  esac
-  shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
-  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
-  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-#
-# INIT-COMMANDS section.
-#
-
-
-
-_ACEOF
-
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
-  case "$ac_config_target" in
-  # Handling of arguments.
-  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-  "json.pc" ) CONFIG_FILES="$CONFIG_FILES json.pc" ;;
-  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
-  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
-  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
-   { (exit 1); exit 1; }; };;
-  esac
-done
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
-  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
-  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=./confstat$$-$RANDOM
-  (umask 077 && mkdir $tmp)
-} ||
-{
-   echo "$me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
-}
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
-#
-# CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
-  # Protect against being on the right side of a sed subst in config.status.
-  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
-   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@PACKAGE@,$PACKAGE,;t t
-s,@VERSION@,$VERSION,;t t
-s,@ACLOCAL@,$ACLOCAL,;t t
-s,@AUTOCONF@,$AUTOCONF,;t t
-s,@AUTOMAKE@,$AUTOMAKE,;t t
-s,@AUTOHEADER@,$AUTOHEADER,;t t
-s,@MAKEINFO@,$MAKEINFO,;t t
-s,@SET_MAKE@,$SET_MAKE,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@build@,$build,;t t
-s,@build_cpu@,$build_cpu,;t t
-s,@build_vendor@,$build_vendor,;t t
-s,@build_os@,$build_os,;t t
-s,@host@,$host,;t t
-s,@host_cpu@,$host_cpu,;t t
-s,@host_vendor@,$host_vendor,;t t
-s,@host_os@,$host_os,;t t
-s,@LN_S@,$LN_S,;t t
-s,@ECHO@,$ECHO,;t t
-s,@AR@,$AR,;t t
-s,@ac_ct_AR@,$ac_ct_AR,;t t
-s,@RANLIB@,$RANLIB,;t t
-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@STRIP@,$STRIP,;t t
-s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
-s,@CXX@,$CXX,;t t
-s,@CXXFLAGS@,$CXXFLAGS,;t t
-s,@ac_ct_CXX@,$ac_ct_CXX,;t t
-s,@CXXCPP@,$CXXCPP,;t t
-s,@F77@,$F77,;t t
-s,@FFLAGS@,$FFLAGS,;t t
-s,@ac_ct_F77@,$ac_ct_F77,;t t
-s,@LIBTOOL@,$LIBTOOL,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-
-_ACEOF
-
-  cat >>$CONFIG_STATUS <<\_ACEOF
-  # Split the substitutions into bite-sized pieces for seds with
-  # small command number limits, like on Digital OSF/1 and HP-UX.
-  ac_max_sed_lines=48
-  ac_sed_frag=1 # Number of current file.
-  ac_beg=1 # First line for current file.
-  ac_end=$ac_max_sed_lines # Line after last line for current file.
-  ac_more_lines=:
-  ac_sed_cmds=
-  while $ac_more_lines; do
-    if test $ac_beg -gt 1; then
-      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
-    else
-      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
-    fi
-    if test ! -s $tmp/subs.frag; then
-      ac_more_lines=false
-    else
-      # The purpose of the label and of the branching condition is to
-      # speed up the sed processing (if there are no `@' at all, there
-      # is no need to browse any of the substitutions).
-      # These are the two extra sed commands mentioned above.
-      (echo ':t
-  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
-      if test -z "$ac_sed_cmds"; then
-       ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
-      else
-       ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
-      fi
-      ac_sed_frag=`expr $ac_sed_frag + 1`
-      ac_beg=$ac_end
-      ac_end=`expr $ac_end + $ac_max_sed_lines`
-    fi
-  done
-  if test -z "$ac_sed_cmds"; then
-    ac_sed_cmds=cat
-  fi
-fi # test -n "$CONFIG_FILES"
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case $ac_file in
-  - | *:- | *:-:* ) # input from stdin
-       cat >$tmp/stdin
-       ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  * )   ac_file_in=$ac_file.in ;;
-  esac
-
-  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
-  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$ac_file" : 'X\(//\)[^/]' \| \
-        X"$ac_file" : 'X\(//\)$' \| \
-        X"$ac_file" : 'X\(/\)' \| \
-        .     : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-  { if $as_mkdir_p; then
-    mkdir -p "$ac_dir"
-  else
-    as_dir="$ac_dir"
-    as_dirs=
-    while test ! -d "$as_dir"; do
-      as_dirs="$as_dir $as_dirs"
-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$as_dir" : 'X\(//\)[^/]' \| \
-        X"$as_dir" : 'X\(//\)$' \| \
-        X"$as_dir" : 'X\(/\)' \| \
-        .     : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-    done
-    test ! -n "$as_dirs" || mkdir $as_dirs
-  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
-   { (exit 1); exit 1; }; }; }
-
-  ac_builddir=.
-
-if test "$ac_dir" != .; then
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
-    ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
-  case "$ac_dir" in
-  .) ac_abs_builddir=`pwd`;;
-  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-  *) ac_abs_builddir=`pwd`/"$ac_dir";;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
-  case ${ac_top_builddir}. in
-  .) ac_abs_top_builddir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
-  case $ac_srcdir in
-  .) ac_abs_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
-  case $ac_top_srcdir in
-  .) ac_abs_top_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-  esac;;
-esac
-
-
-  case $INSTALL in
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
-  esac
-
-  # Let's still pretend it is `configure' which instantiates (i.e., don't
-  # use $as_me), people would be surprised to read:
-  #    /* config.h.  Generated by config.status.  */
-  if test x"$ac_file" = x-; then
-    configure_input=
-  else
-    configure_input="$ac_file.  "
-  fi
-  configure_input=$configure_input"Generated from `echo $ac_file_in |
-                                    sed 's,.*/,,'` by configure."
-
-  # First look for the input files in the build tree, otherwise in the
-  # src tree.
-  ac_file_inputs=`IFS=:
-    for f in $ac_file_in; do
-      case $f in
-      -) echo $tmp/stdin ;;
-      [\\/$]*)
-        # Absolute (can't be DOS-style, as IFS=:)
-        test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-        echo "$f";;
-      *) # Relative
-        if test -f "$f"; then
-          # Build tree
-          echo "$f"
-        elif test -f "$srcdir/$f"; then
-          # Source tree
-          echo "$srcdir/$f"
-        else
-          # /dev/null tree
-          { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-        fi;;
-      esac
-    done` || { (exit 1); exit 1; }
-
-  if test x"$ac_file" != x-; then
-    { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-    rm -f "$ac_file"
-  fi
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-  sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
-  rm -f $tmp/stdin
-  if test x"$ac_file" != x-; then
-    mv $tmp/out $ac_file
-  else
-    cat $tmp/out
-    rm -f $tmp/out
-  fi
-
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_HEADER section.
-#
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
-ac_dB='[        ].*$,\1#\2'
-ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
-ac_uB='$,\1#\2define\3'
-ac_uC=' '
-ac_uD=',;t'
-
-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case $ac_file in
-  - | *:- | *:-:* ) # input from stdin
-       cat >$tmp/stdin
-       ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  * )   ac_file_in=$ac_file.in ;;
-  esac
-
-  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-
-  # First look for the input files in the build tree, otherwise in the
-  # src tree.
-  ac_file_inputs=`IFS=:
-    for f in $ac_file_in; do
-      case $f in
-      -) echo $tmp/stdin ;;
-      [\\/$]*)
-        # Absolute (can't be DOS-style, as IFS=:)
-        test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-        # Do quote $f, to prevent DOS paths from being IFS'd.
-        echo "$f";;
-      *) # Relative
-        if test -f "$f"; then
-          # Build tree
-          echo "$f"
-        elif test -f "$srcdir/$f"; then
-          # Source tree
-          echo "$srcdir/$f"
-        else
-          # /dev/null tree
-          { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-        fi;;
-      esac
-    done` || { (exit 1); exit 1; }
-  # Remove the trailing spaces.
-  sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
-
-_ACEOF
-
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h.  The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status.  Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless.  Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
-
-# This sed command replaces #undef with comments.  This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >>conftest.undefs <<\_ACEOF
-s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_ACEOF
-
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo '  if grep "^[     ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo '  :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
-do
-  # Write a limited-size here document to $tmp/defines.sed.
-  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
-  # Speed up: don't consider the non `#define' lines.
-  echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
-  # Work around the forget-to-reset-the-flag bug.
-  echo 't clr' >>$CONFIG_STATUS
-  echo ': clr' >>$CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
-  echo 'CEOF
-  sed -f $tmp/defines.sed $tmp/in >$tmp/out
-  rm -f $tmp/in
-  mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
-  rm -f conftest.defines
-  mv conftest.tail conftest.defines
-done
-rm -f conftest.defines
-echo '  fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
-
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
-do
-  # Write a limited-size here document to $tmp/undefs.sed.
-  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
-  # Speed up: don't consider the non `#undef'
-  echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
-  # Work around the forget-to-reset-the-flag bug.
-  echo 't clr' >>$CONFIG_STATUS
-  echo ': clr' >>$CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
-  echo 'CEOF
-  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
-  rm -f $tmp/in
-  mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
-  rm -f conftest.undefs
-  mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-  # Let's still pretend it is `configure' which instantiates (i.e., don't
-  # use $as_me), people would be surprised to read:
-  #    /* config.h.  Generated by config.status.  */
-  if test x"$ac_file" = x-; then
-    echo "/* Generated by configure.  */" >$tmp/config.h
-  else
-    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
-  fi
-  cat $tmp/in >>$tmp/config.h
-  rm -f $tmp/in
-  if test x"$ac_file" != x-; then
-    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
-      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
-    else
-      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$ac_file" : 'X\(//\)[^/]' \| \
-        X"$ac_file" : 'X\(//\)$' \| \
-        X"$ac_file" : 'X\(/\)' \| \
-        .     : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-      { if $as_mkdir_p; then
-    mkdir -p "$ac_dir"
-  else
-    as_dir="$ac_dir"
-    as_dirs=
-    while test ! -d "$as_dir"; do
-      as_dirs="$as_dir $as_dirs"
-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$as_dir" : 'X\(//\)[^/]' \| \
-        X"$as_dir" : 'X\(//\)$' \| \
-        X"$as_dir" : 'X\(/\)' \| \
-        .     : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-    done
-    test ! -n "$as_dirs" || mkdir $as_dirs
-  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
-   { (exit 1); exit 1; }; }; }
-
-      rm -f $ac_file
-      mv $tmp/config.h $ac_file
-    fi
-  else
-    cat $tmp/config.h
-    rm -f $tmp/config.h
-  fi
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_COMMANDS section.
-#
-for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
-  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
-  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
-  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$ac_dest" : 'X\(//\)[^/]' \| \
-        X"$ac_dest" : 'X\(//\)$' \| \
-        X"$ac_dest" : 'X\(/\)' \| \
-        .     : '\(.\)' 2>/dev/null ||
-echo X"$ac_dest" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-  { if $as_mkdir_p; then
-    mkdir -p "$ac_dir"
-  else
-    as_dir="$ac_dir"
-    as_dirs=
-    while test ! -d "$as_dir"; do
-      as_dirs="$as_dir $as_dirs"
-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$as_dir" : 'X\(//\)[^/]' \| \
-        X"$as_dir" : 'X\(//\)$' \| \
-        X"$as_dir" : 'X\(/\)' \| \
-        .     : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-    done
-    test ! -n "$as_dirs" || mkdir $as_dirs
-  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
-   { (exit 1); exit 1; }; }; }
-
-  ac_builddir=.
-
-if test "$ac_dir" != .; then
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
-    ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
-  case "$ac_dir" in
-  .) ac_abs_builddir=`pwd`;;
-  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-  *) ac_abs_builddir=`pwd`/"$ac_dir";;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
-  case ${ac_top_builddir}. in
-  .) ac_abs_top_builddir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
-  case $ac_srcdir in
-  .) ac_abs_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
-  case $ac_top_srcdir in
-  .) ac_abs_top_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-  esac;;
-esac
-
-
-  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
-echo "$as_me: executing $ac_dest commands" >&6;}
-  case $ac_dest in
-    default-1 ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h ;;
-  esac
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded.  So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status.  When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
-  ac_cs_success=:
-  ac_config_status_args=
-  test "$silent" = yes &&
-    ac_config_status_args="$ac_config_status_args --quiet"
-  exec 5>/dev/null
-  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
-  exec 5>>config.log
-  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
-  # would make configure fail if this is the last instruction.
-  $ac_cs_success || { (exit 1); exit 1; }
-fi
-
diff --git a/source4/lib/json/configure.in b/source4/lib/json/configure.in
deleted file mode 100644 (file)
index f0a7d3a..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-AC_PREREQ(2.52)
-
-# Process this file with autoconf to produce a configure script.
-AC_INIT([JSON C Library], 0.3, [michael@metaparadigm.com], [json-c])
-
-AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
-
-# Checks for programs.
-
-# Checks for libraries.
-
-# Checks for header files.
-AM_CONFIG_HEADER(config.h)
-AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h limits.h strings.h syslog.h unistd.h [sys/param.h] stdarg.h)
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_TYPE_SIZE_T
-
-# Checks for library functions.
-AC_FUNC_VPRINTF
-AC_FUNC_MEMCMP
-AC_FUNC_MALLOC
-AC_FUNC_REALLOC
-AC_CHECK_FUNCS(strndup strerror vsnprintf vasprintf open vsyslog strncasecmp)
-
-AM_PROG_LIBTOOL
-
-AC_OUTPUT([
-Makefile
-json.pc
-])
diff --git a/source4/lib/json/debug.c b/source4/lib/json/debug.c
deleted file mode 100644 (file)
index a315b0e..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * $Id: debug.c,v 1.5 2006/01/26 02:16:28 mclark Exp $
- *
- * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
- * Michael Clark <michael@metaparadigm.com>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See COPYING for details.
- *
- */
-
-#include "config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-
-#if HAVE_SYSLOG_H
-# include <syslog.h>
-#endif /* HAVE_SYSLOG_H */
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-#if HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif /* HAVE_SYS_PARAM_H */
-
-#include "debug.h"
-
-static int _syslog = 0;
-static int _debug = 0;
-
-void mc_set_debug(int debug) { _debug = debug; }
-int mc_get_debug() { return _debug; }
-
-extern void mc_set_syslog(int syslog)
-{
-  _syslog = syslog;
-}
-
-_NORETURN_ void mc_abort(const char *msg, ...)
-{
-  va_list ap;
-  va_start(ap, msg);
-#if HAVE_VSYSLOG
-  if(_syslog) {
-         vsyslog(LOG_ERR, msg, ap);
-  } else
-#endif
-         vprintf(msg, ap);
-  exit(1);
-}
-
-
-void mc_debug(const char *msg, ...)
-{
-  va_list ap;
-  if(_debug) {
-    va_start(ap, msg);
-#if HAVE_VSYSLOG
-    if(_syslog) {
-               vsyslog(LOG_DEBUG, msg, ap);
-       } else
-#endif
-               vprintf(msg, ap);
-  }
-}
-
-void mc_error(const char *msg, ...)
-{
-  va_list ap;
-  va_start(ap, msg);
-#if HAVE_VSYSLOG
-    if(_syslog) {
-               vsyslog(LOG_ERR, msg, ap);
-       } else
-#endif
-               vfprintf(stderr, msg, ap);
-}
-
-void mc_info(const char *msg, ...)
-{
-  va_list ap;
-  va_start(ap, msg);
-#if HAVE_VSYSLOG
-    if(_syslog) {
-               vsyslog(LOG_INFO, msg, ap);
-       } else 
-#endif
-               vfprintf(stderr, msg, ap);
-}
diff --git a/source4/lib/json/debug.h b/source4/lib/json/debug.h
deleted file mode 100644 (file)
index 1db69ef..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * $Id: debug.h,v 1.5 2006/01/30 23:07:57 mclark Exp $
- *
- * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
- * Michael Clark <michael@metaparadigm.com>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See COPYING for details.
- *
- */
-
-#ifndef _DEBUG_H_
-#define _DEBUG_H_
-
-extern void mc_set_debug(int debug);
-extern int mc_get_debug();
-
-extern void mc_set_syslog(int syslog);
-extern void mc_abort(const char *msg, ...);
-extern void mc_debug(const char *msg, ...);
-extern void mc_error(const char *msg, ...);
-extern void mc_info(const char *msg, ...);
-
-#endif
diff --git a/source4/lib/json/depcomp b/source4/lib/json/depcomp
deleted file mode 100755 (executable)
index c5b511c..0000000
+++ /dev/null
@@ -1,421 +0,0 @@
-#! /bin/sh
-
-# depcomp - compile a program generating dependencies as side-effects
-# Copyright 1999, 2000 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
-
-if test -z "$depmode" || test -z "$source" || test -z "$object"; then
-  echo "depcomp: Variables source, object and depmode must be set" 1>&2
-  exit 1
-fi
-# `libtool' can also be set to `yes' or `no'.
-
-if test -z "$depfile"; then
-   base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
-   dir=`echo "$object" | sed 's,/.*$,/,'`
-   if test "$dir" = "$object"; then
-      dir=
-   fi
-   # FIXME: should be _deps on DOS.
-   depfile="$dir.deps/$base"
-fi
-
-tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
-
-rm -f "$tmpdepfile"
-
-# Some modes work just like other modes, but use different flags.  We
-# parameterize here, but still list the modes in the big case below,
-# to make depend.m4 easier to write.  Note that we *cannot* use a case
-# here, because this file can only contain one case statement.
-if test "$depmode" = hp; then
-  # HP compiler uses -M and no extra arg.
-  gccflag=-M
-  depmode=gcc
-fi
-
-if test "$depmode" = dashXmstdout; then
-   # This is just like dashmstdout with a different argument.
-   dashmflag=-xM
-   depmode=dashmstdout
-fi
-
-case "$depmode" in
-gcc3)
-## gcc 3 implements dependency tracking that does exactly what
-## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
-## it if -MD -MP comes after the -MF stuff.  Hmm.
-  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  mv "$tmpdepfile" "$depfile"
-  ;;
-
-gcc)
-## There are various ways to get dependency output from gcc.  Here's
-## why we pick this rather obscure method:
-## - Don't want to use -MD because we'd like the dependencies to end
-##   up in a subdir.  Having to rename by hand is ugly.
-##   (We might end up doing this anyway to support other compilers.)
-## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-##   -MM, not -M (despite what the docs say).
-## - Using -M directly means running the compiler twice (even worse
-##   than renaming).
-  if test -z "$gccflag"; then
-    gccflag=-MD,
-  fi
-  "$@" -Wp,"$gccflag$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
-  sed -e 's/^[^:]*: / /' \
-      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
-## The problem is that when a header file which appears in a .P file
-## is deleted, the dependency causes make to die (because there is
-## typically no way to rebuild the header).  We avoid this by adding
-## dummy dependencies for each header file.  Too bad gcc doesn't do
-## this for us directly.
-  tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'.  On the theory
-## that the space means something, we add a space to the output as
-## well.
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-hp)
-  # This case exists only to let depend.m4 do its work.  It works by
-  # looking at the text of this script.  This case will never be run,
-  # since it is checked for above.
-  exit 1
-  ;;
-
-sgi)
-  if test "$libtool" = yes; then
-    "$@" "-Wp,-MDupdate,$tmpdepfile"
-  else
-    "$@" -MDupdate "$tmpdepfile"
-  fi
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-
-  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
-    echo "$object : \\" > "$depfile"
-
-    # Clip off the initial element (the dependent).  Don't try to be
-    # clever and replace this with sed code, as IRIX sed won't handle
-    # lines with more than a fixed number of characters (4096 in
-    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
-    # the IRIX cc adds comments like `#:fec' to the end of the
-    # dependency line.
-    tr ' ' '
-' < "$tmpdepfile" \
-    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
-    tr '
-' ' ' >> $depfile
-    echo >> $depfile
-
-    # The second pass generates a dummy entry for each header file.
-    tr ' ' '
-' < "$tmpdepfile" \
-   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
-   >> $depfile
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile"
-  ;;
-
-aix)
-  # The C for AIX Compiler uses -M and outputs the dependencies
-  # in a .u file.  This file always lives in the current directory.
-  # Also, the AIX compiler puts `$object:' at the start of each line;
-  # $object doesn't have directory information.
-  stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
-  tmpdepfile="$stripped.u"
-  outname="$stripped.o"
-  if test "$libtool" = yes; then
-    "$@" -Wc,-M
-  else
-    "$@" -M
-  fi
-
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-
-  if test -f "$tmpdepfile"; then
-    # Each line is of the form `foo.o: dependent.h'.
-    # Do two passes, one to just change these to
-    # `$object: dependent.h' and one to simply `dependent.h:'.
-    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
-    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile"
-  ;;
-
-tru64)
-   # The Tru64 compiler uses -MD to generate dependencies as a side
-   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
-   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
-   # dependencies in `foo.d' instead, so we check for that too.
-   # Subdirectories are respected.
-   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-   test "x$dir" = "x$object" && dir=
-   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
-   if test "$libtool" = yes; then
-      tmpdepfile1="$dir.libs/$base.lo.d"
-      tmpdepfile2="$dir.libs/$base.d"
-      "$@" -Wc,-MD
-   else
-      tmpdepfile1="$dir$base.o.d"
-      tmpdepfile2="$dir$base.d"
-      "$@" -MD
-   fi
-
-   stat=$?
-   if test $stat -eq 0; then :
-   else
-      rm -f "$tmpdepfile1" "$tmpdepfile2"
-      exit $stat
-   fi
-
-   if test -f "$tmpdepfile1"; then
-      tmpdepfile="$tmpdepfile1"
-   else
-      tmpdepfile="$tmpdepfile2"
-   fi
-   if test -f "$tmpdepfile"; then
-      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      # That's a space and a tab in the [].
-      sed -e 's,^.*\.[a-z]*:[  ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
-   else
-      echo "#dummy" > "$depfile"
-   fi
-   rm -f "$tmpdepfile"
-   ;;
-
-#nosideeffect)
-  # This comment above is used by automake to tell side-effect
-  # dependency tracking mechanisms from slower ones.
-
-dashmstdout)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout, regardless of -o.
-  "$@" || exit $?
-
-  # Remove the call to Libtool.
-  if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
-      shift
-    done
-    shift
-  fi
-
-  # Remove `-o $object'.  We will use -o /dev/null later,
-  # however we can't do the remplacement now because
-  # `-o $object' might simply not be used
-  IFS=" "
-  for arg
-  do
-    case $arg in
-    -o)
-      shift
-      ;;
-    $object)
-      shift
-      ;;
-    *)
-      set fnord "$@" "$arg"
-      shift # fnord
-      shift # $arg
-      ;;
-    esac
-  done
-
-  test -z "$dashmflag" && dashmflag=-M
-  "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[      ]*:'"$object"'\: :' > "$tmpdepfile"
-  rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-dashXmstdout)
-  # This case only exists to satisfy depend.m4.  It is never actually
-  # run, as this mode is specially recognized in the preamble.
-  exit 1
-  ;;
-
-makedepend)
-  "$@" || exit $?
-  # X makedepend
-  shift
-  cleared=no
-  for arg in "$@"; do
-    case $cleared in
-    no)
-      set ""; shift
-      cleared=yes ;;
-    esac
-    case "$arg" in
-    -D*|-I*)
-      set fnord "$@" "$arg"; shift ;;
-    -*)
-      ;;
-    *)
-      set fnord "$@" "$arg"; shift ;;
-    esac
-  done
-  obj_suffix="`echo $object | sed 's/^.*\././'`"
-  touch "$tmpdepfile"
-  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
-  rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile" "$tmpdepfile".bak
-  ;;
-
-cpp)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout.
-  "$@" || exit $?
-
-  # Remove the call to Libtool.
-  if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
-      shift
-    done
-    shift
-  fi
-
-  # Remove `-o $object'.
-  IFS=" "
-  for arg
-  do
-    case $arg in
-    -o)
-      shift
-      ;;
-    $object)
-      shift
-      ;;
-    *)
-      set fnord "$@" "$arg"
-      shift # fnord
-      shift # $arg
-      ;;
-    esac
-  done
-
-  "$@" -E |
-    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
-    sed '$ s: \\$::' > "$tmpdepfile"
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  cat < "$tmpdepfile" >> "$depfile"
-  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-msvisualcpp)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
-  "$@" || exit $?
-  IFS=" "
-  for arg
-  do
-    case "$arg" in
-    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
-       set fnord "$@"
-       shift
-       shift
-       ;;
-    *)
-       set fnord "$@" "$arg"
-       shift
-       shift
-       ;;
-    esac
-  done
-  "$@" -E |
-  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
-  echo "       " >> "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-none)
-  exec "$@"
-  ;;
-
-*)
-  echo "Unknown depmode $depmode" 1>&2
-  exit 1
-  ;;
-esac
-
-exit 0
diff --git a/source4/lib/json/install-sh b/source4/lib/json/install-sh
deleted file mode 100755 (executable)
index fca26e5..0000000
+++ /dev/null
@@ -1,269 +0,0 @@
-#!/bin/sh
-#
-# install - install a program, script, or datafile
-#
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
-# later released in X11R6 (xc/config/util/install.sh) with the
-# following copyright and license.
-#
-# Copyright (C) 1994 X Consortium
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not
-# be used in advertising or otherwise to promote the sale, use or other deal-
-# ings in this Software without prior written authorization from the X Consor-
-# tium.
-#
-#
-# FSF changes to this file are in the public domain.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-       -c) instcmd="$cpprog"
-           shift
-           continue;;
-
-       -d) dir_arg=true
-           shift
-           continue;;
-
-       -m) chmodcmd="$chmodprog $2"
-           shift
-           shift
-           continue;;
-
-       -o) chowncmd="$chownprog $2"
-           shift
-           shift
-           continue;;
-
-       -g) chgrpcmd="$chgrpprog $2"
-           shift
-           shift
-           continue;;
-
-       -s) stripcmd="$stripprog"
-           shift
-           continue;;
-
-       -t=*) transformarg=`echo $1 | sed 's/-t=//'`
-           shift
-           continue;;
-
-       -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-           shift
-           continue;;
-
-       *)  if [ x"$src" = x ]
-           then
-               src=$1
-           else
-               # this colon is to work around a 386BSD /bin/sh bug
-               :
-               dst=$1
-           fi
-           shift
-           continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-       echo "install:  no input file specified"
-       exit 1
-else
-       :
-fi
-
-if [ x"$dir_arg" != x ]; then
-       dst=$src
-       src=""
-       
-       if [ -d $dst ]; then
-               instcmd=:
-               chmodcmd=""
-       else
-               instcmd=$mkdirprog
-       fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
-
-       if [ -f "$src" ] || [ -d "$src" ]
-       then
-               :
-       else
-               echo "install:  $src does not exist"
-               exit 1
-       fi
-       
-       if [ x"$dst" = x ]
-       then
-               echo "install:  no destination specified"
-               exit 1
-       else
-               :
-       fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-       if [ -d $dst ]
-       then
-               dst="$dst"/`basename $src`
-       else
-               :
-       fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-       '
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-       pathcomp="${pathcomp}${1}"
-       shift
-
-       if [ ! -d "${pathcomp}" ] ;
-        then
-               $mkdirprog "${pathcomp}"
-       else
-               :
-       fi
-
-       pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
-       $doit $instcmd $dst &&
-
-       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
-       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
-       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
-       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-       if [ x"$transformarg" = x ] 
-       then
-               dstfile=`basename $dst`
-       else
-               dstfile=`basename $dst $transformbasename | 
-                       sed $transformarg`$transformbasename
-       fi
-
-# don't allow the sed command to completely eliminate the filename
-
-       if [ x"$dstfile" = x ] 
-       then
-               dstfile=`basename $dst`
-       else
-               :
-       fi
-
-# Make a temp file name in the proper directory.
-
-       dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-       $doit $instcmd $src $dsttmp &&
-
-       trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
-       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
-       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
-       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
-
-# Now rename the file to the real destination.
-
-       $doit $rmcmd -f $dstdir/$dstfile &&
-       $doit $mvcmd $dsttmp $dstdir/$dstfile 
-
-fi &&
-
-
-exit 0
diff --git a/source4/lib/json/json-c.vcproj b/source4/lib/json/json-c.vcproj
deleted file mode 100644 (file)
index 0b88754..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-       ProjectType="Visual C++"
-       Version="7.10"
-       Name="json-c"
-       ProjectGUID="{04D8CDBE-FB3E-4362-87E6-07DC3C0083B2}"
-       Keyword="Win32Proj">
-       <Platforms>
-               <Platform
-                       Name="Win32"/>
-       </Platforms>
-       <Configurations>
-               <Configuration
-                       Name="Debug|Win32"
-                       OutputDirectory="Debug"
-                       IntermediateDirectory="Debug"
-                       ConfigurationType="4"
-                       CharacterSet="2">
-                       <Tool
-                               Name="VCCLCompilerTool"
-                               Optimization="0"
-                               PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
-                               MinimalRebuild="TRUE"
-                               BasicRuntimeChecks="3"
-                               RuntimeLibrary="5"
-                               UsePrecompiledHeader="0"
-                               WarningLevel="3"
-                               Detect64BitPortabilityProblems="TRUE"
-                               DebugInformationFormat="4"/>
-                       <Tool
-                               Name="VCCustomBuildTool"/>
-                       <Tool
-                               Name="VCLibrarianTool"
-                               OutputFile="$(OutDir)/jsonD.lib"/>
-                       <Tool
-                               Name="VCMIDLTool"/>
-                       <Tool
-                               Name="VCPostBuildEventTool"/>
-                       <Tool
-                               Name="VCPreBuildEventTool"
-                               CommandLine="copy config.h.win32 config.h"/>
-                       <Tool
-                               Name="VCPreLinkEventTool"/>
-                       <Tool
-                               Name="VCResourceCompilerTool"/>
-                       <Tool
-                               Name="VCWebServiceProxyGeneratorTool"/>
-                       <Tool
-                               Name="VCXMLDataGeneratorTool"/>
-                       <Tool
-                               Name="VCManagedWrapperGeneratorTool"/>
-                       <Tool
-                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-               </Configuration>
-               <Configuration
-                       Name="Release|Win32"
-                       OutputDirectory="Release"
-                       IntermediateDirectory="Release"
-                       ConfigurationType="4"
-                       CharacterSet="2">
-                       <Tool
-                               Name="VCCLCompilerTool"
-                               PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
-                               RuntimeLibrary="4"
-                               UsePrecompiledHeader="0"
-                               WarningLevel="3"
-                               Detect64BitPortabilityProblems="TRUE"
-                               DebugInformationFormat="3"/>
-                       <Tool
-                               Name="VCCustomBuildTool"/>
-                       <Tool
-                               Name="VCLibrarianTool"
-                               OutputFile="$(OutDir)/json.lib"/>
-                       <Tool
-                               Name="VCMIDLTool"/>
-                       <Tool
-                               Name="VCPostBuildEventTool"/>
-                       <Tool
-                               Name="VCPreBuildEventTool"/>
-                       <Tool
-                               Name="VCPreLinkEventTool"/>
-                       <Tool
-                               Name="VCResourceCompilerTool"/>
-                       <Tool
-                               Name="VCWebServiceProxyGeneratorTool"/>
-                       <Tool
-                               Name="VCXMLDataGeneratorTool"/>
-                       <Tool
-                               Name="VCManagedWrapperGeneratorTool"/>
-                       <Tool
-                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-               </Configuration>
-       </Configurations>
-       <References>
-       </References>
-       <Files>
-               <Filter
-                       Name="Source Files"
-                       Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-                       <File
-                               RelativePath=".\arraylist.c">
-                       </File>
-                       <File
-                               RelativePath=".\debug.c">
-                       </File>
-                       <File
-                               RelativePath=".\json_object.c">
-                       </File>
-                       <File
-                               RelativePath=".\json_tokener.c">
-                       </File>
-                       <File
-                               RelativePath=".\json_util.c">
-                       </File>
-                       <File
-                               RelativePath=".\linkhash.c">
-                       </File>
-                       <File
-                               RelativePath=".\printbuf.c">
-                       </File>
-               </Filter>
-               <Filter
-                       Name="Header Files"
-                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
-                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-                       <File
-                               RelativePath=".\arraylist.h">
-                       </File>
-                       <File
-                               RelativePath=".\bits.h">
-                       </File>
-                       <File
-                               RelativePath=".\debug.h">
-                       </File>
-                       <File
-                               RelativePath=".\json_object.h">
-                       </File>
-                       <File
-                               RelativePath=".\json_object_private.h">
-                       </File>
-                       <File
-                               RelativePath=".\json_tokener.h">
-                       </File>
-                       <File
-                               RelativePath=".\json_util.h">
-                       </File>
-                       <File
-                               RelativePath=".\linkhash.h">
-                       </File>
-                       <File
-                               RelativePath=".\printbuf.h">
-                       </File>
-               </Filter>
-               <Filter
-                       Name="Resource Files"
-                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-               </Filter>
-               <Filter
-                       Name="Documentation"
-                       Filter="">
-                       <File
-                               RelativePath=".\Doxyfile">
-                       </File>
-               </Filter>
-               <File
-                       RelativePath=".\config.h.win32">
-               </File>
-               <File
-                       RelativePath=".\README-WIN32.html">
-               </File>
-               <File
-                       RelativePath=".\README.html">
-               </File>
-       </Files>
-       <Globals>
-       </Globals>
-</VisualStudioProject>
diff --git a/source4/lib/json/json.h b/source4/lib/json/json.h
deleted file mode 100644 (file)
index a5a3432..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * $Id: json.h,v 1.6 2006/01/26 02:16:28 mclark Exp $
- *
- * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
- * Michael Clark <michael@metaparadigm.com>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See COPYING for details.
- *
- */
-
-#ifndef _json_h_
-#define _json_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "bits.h"
-#include "debug.h"
-#include "linkhash.h"
-#include "arraylist.h"
-#include "json_util.h"
-#include "json_object.h"
-#include "json_tokener.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/source4/lib/json/json.pc.in b/source4/lib/json/json.pc.in
deleted file mode 100644 (file)
index b3d140b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: json
-Description: JSON implementation in C
-Version: @VERSION@
-Requires: 
-Libs:  -L${libdir} -ljson
-Cflags: -I${includedir}/json
diff --git a/source4/lib/json/json_object.c b/source4/lib/json/json_object.c
deleted file mode 100644 (file)
index 525e217..0000000
+++ /dev/null
@@ -1,504 +0,0 @@
-/*
- * $Id: json_object.c,v 1.15 2006/01/30 23:07:57 mclark Exp $
- *
- * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
- * Michael Clark <michael@metaparadigm.com>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See COPYING for details.
- *
- */
-
-#include "config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "debug.h"
-#include "printbuf.h"
-#include "linkhash.h"
-#include "arraylist.h"
-#include "json_object.h"
-#include "json_object_private.h"
-#include "json_tokener.h"
-
-#if !HAVE_STRNDUP
-  char* strndup(const char* str, size_t n);
-#endif /* !HAVE_STRNDUP */
-
-/* #define REFCOUNT_DEBUG 1 */
-
-char *json_number_chars = "0123456789.+-e";
-char *json_hex_chars = "0123456789abcdef";
-
-#ifdef REFCOUNT_DEBUG
-static char* json_type_name[] = {
-  "null",
-  "boolean",
-  "double",
-  "int",
-  "object",
-  "array",
-  "string",
-};
-#endif /* REFCOUNT_DEBUG */
-
-static void json_object_generic_delete(struct json_object* this);
-static struct json_object* json_object_new(enum json_type o_type);
-
-
-/* ref count debugging */
-
-#ifdef REFCOUNT_DEBUG
-
-static struct lh_table *json_object_table;
-
-static void json_object_init() __attribute__ ((constructor));
-static void json_object_init() {
-  mc_debug("json_object_init: creating object table\n");
-  json_object_table = lh_kptr_table_new(128, "json_object_table", NULL);
-}
-
-static void json_object_fini() __attribute__ ((destructor));
-static void json_object_fini() {
-  struct lh_entry *ent;
-  if(mc_get_debug() && json_object_table->count) {
-    mc_debug("json_object_fini: %d referenced objects at exit\n",
-            json_object_table->count);
-    lh_foreach(json_object_table, ent) {
-      struct json_object* obj = (struct json_object*)ent->v;
-      mc_debug("\t%s:%p\n", json_type_name[obj->o_type], obj);
-    }
-  }
-  mc_debug("json_object_fini: freeing object table\n");
-  lh_table_free(json_object_table);
-}
-#endif /* REFCOUNT_DEBUG */
-
-
-/* string escaping */
-
-static int json_escape_str(struct printbuf *pb, char *str)
-{
-  int pos = 0, start_offset = 0;
-  unsigned char c;
-  do {
-    c = str[pos];
-    switch(c) {
-    case '\0':
-      break;
-    case '\b':
-    case '\n':
-    case '\r':
-    case '\t':
-    case '"':
-      if(pos - start_offset > 0)
-       printbuf_memappend(pb, str + start_offset, pos - start_offset);
-      if(c == '\b') printbuf_memappend(pb, "\\b", 2);
-      else if(c == '\n') printbuf_memappend(pb, "\\n", 2);
-      else if(c == '\r') printbuf_memappend(pb, "\\r", 2);
-      else if(c == '\t') printbuf_memappend(pb, "\\t", 2);
-      else if(c == '"') printbuf_memappend(pb, "\\\"", 2);
-      start_offset = ++pos;
-      break;
-    default:
-      if(c < ' ') {
-       if(pos - start_offset > 0)
-         printbuf_memappend(pb, str + start_offset, pos - start_offset);
-       sprintbuf(pb, "\\u00%c%c",
-                 json_hex_chars[c >> 4],
-                 json_hex_chars[c & 0xf]);
-       start_offset = ++pos;
-      } else pos++;
-    }
-  } while(c);
-  if(pos - start_offset > 0)
-    printbuf_memappend(pb, str + start_offset, pos - start_offset);
-  return 0;
-}
-
-
-/* reference counting */
-
-extern struct json_object* json_object_get(struct json_object *this)
-{
-  if(this) {
-    this->_ref_count++;
-  }
-  return this;
-}
-
-extern void json_object_put(struct json_object *this)
-{
-  if(this) {
-    this->_ref_count--;
-    if(!this->_ref_count) this->_delete(this);
-  }
-}
-
-
-/* generic object construction and destruction parts */
-
-static void json_object_generic_delete(struct json_object* this)
-{
-#ifdef REFCOUNT_DEBUG
-  mc_debug("json_object_delete_%s: %p\n",
-          json_type_name[this->o_type], this);
-  lh_table_delete(json_object_table, this);
-#endif /* REFCOUNT_DEBUG */
-  printbuf_free(this->_pb);
-  free(this);
-}
-
-static struct json_object* json_object_new(enum json_type o_type)
-{
-  struct json_object *this = calloc(sizeof(struct json_object), 1);
-  if(!this) return NULL;
-  this->o_type = o_type;
-  this->_ref_count = 1;
-  this->_delete = &json_object_generic_delete;
-#ifdef REFCOUNT_DEBUG
-  lh_table_insert(json_object_table, this, this);
-  mc_debug("json_object_new_%s: %p\n", json_type_name[this->o_type], this);
-#endif /* REFCOUNT_DEBUG */
-  return this;
-}
-
-
-/* type checking functions */
-
-int json_object_is_type(struct json_object *this, enum json_type type)
-{
-  return (this->o_type == type);
-}
-
-enum json_type json_object_get_type(struct json_object *this)
-{
-  return this->o_type;
-}
-
-
-/* json_object_to_json_string */
-
-char* json_object_to_json_string(struct json_object *this)
-{
-  if(!this) return "null";
-  if(!this->_pb) {
-    if(!(this->_pb = printbuf_new())) return NULL;
-  } else {
-    printbuf_reset(this->_pb);
-  }
-  if(this->_to_json_string(this, this->_pb) < 0) return NULL;
-  return this->_pb->buf;
-}
-
-
-/* json_object_object */
-
-static int json_object_object_to_json_string(struct json_object* this,
-                                            struct printbuf *pb)
-{
-  int i=0;
-  struct json_object_iter iter;
-  sprintbuf(pb, "{");
-
-  /* CAW: scope operator to make ANSI correctness */
-  /* CAW: switched to json_object_object_foreachC which uses an iterator struct */
-       json_object_object_foreachC(this, iter) {
-                       if(i) sprintbuf(pb, ",");
-                       sprintbuf(pb, " \"");
-                       json_escape_str(pb, iter.key);
-                       sprintbuf(pb, "\": ");
-                       if(iter.val == NULL) sprintbuf(pb, "null");
-                       else iter.val->_to_json_string(iter.val, pb);
-                       i++;
-       }
-
-  return sprintbuf(pb, " }");
-}
-
-static void json_object_lh_entry_free(struct lh_entry *ent)
-{
-  free(ent->k);
-  json_object_put((struct json_object*)ent->v);
-}
-
-static void json_object_object_delete(struct json_object* this)
-{
-  lh_table_free(this->o.c_object);
-  json_object_generic_delete(this);
-}
-
-struct json_object* json_object_new_object()
-{
-  struct json_object *this = json_object_new(json_type_object);
-  if(!this) return NULL;
-  this->_delete = &json_object_object_delete;
-  this->_to_json_string = &json_object_object_to_json_string;
-  this->o.c_object = lh_kchar_table_new(JSON_OBJECT_DEF_HASH_ENTIRES,
-                                       NULL, &json_object_lh_entry_free);
-  return this;
-}
-
-struct lh_table* json_object_get_object(struct json_object *this)
-{
-  if(!this) return NULL;
-  switch(this->o_type) {
-  case json_type_object:
-    return this->o.c_object;
-  default:
-    return NULL;
-  }
-}
-
-void json_object_object_add(struct json_object* this, char *key,
-                           struct json_object *val)
-{
-  lh_table_delete(this->o.c_object, key);
-  lh_table_insert(this->o.c_object, strdup(key), val);
-}
-
-struct json_object* json_object_object_get(struct json_object* this, char *key)
-{
-  return (struct json_object*) lh_table_lookup(this->o.c_object, key);
-}
-
-void json_object_object_del(struct json_object* this, char *key)
-{
-  lh_table_delete(this->o.c_object, key);
-}
-
-
-/* json_object_boolean */
-
-static int json_object_boolean_to_json_string(struct json_object* this,
-                                             struct printbuf *pb)
-{
-  if(this->o.c_boolean) return sprintbuf(pb, "true");
-  else return sprintbuf(pb, "false");
-}
-
-struct json_object* json_object_new_boolean(boolean b)
-{
-  struct json_object *this = json_object_new(json_type_boolean);
-  if(!this) return NULL;
-  this->_to_json_string = &json_object_boolean_to_json_string;
-  this->o.c_boolean = b;
-  return this;
-}
-
-boolean json_object_get_boolean(struct json_object *this)
-{
-  if(!this) return FALSE;
-  switch(this->o_type) {
-  case json_type_boolean:
-    return this->o.c_boolean;
-  case json_type_int:
-    return (this->o.c_int != 0);
-  case json_type_double:
-    return (this->o.c_double != 0);
-  case json_type_string:
-    if(strlen(this->o.c_string)) return TRUE;
-  default:
-    return TRUE;
-  }
-}
-
-
-/* json_object_int */
-
-static int json_object_int_to_json_string(struct json_object* this,
-                                         struct printbuf *pb)
-{
-  return sprintbuf(pb, "%d", this->o.c_int);
-}
-
-struct json_object* json_object_new_int(int i)
-{
-  struct json_object *this = json_object_new(json_type_int);
-  if(!this) return NULL;
-  this->_to_json_string = &json_object_int_to_json_string;
-  this->o.c_int = i;
-  return this;
-}
-
-int json_object_get_int(struct json_object *this)
-{
-  int cint;
-
-  if(!this) return 0;
-  switch(this->o_type) {
-  case json_type_int:
-    return this->o.c_int;
-  case json_type_double:
-    return (int)this->o.c_double;
-  case json_type_boolean:
-    return this->o.c_boolean;
-  case json_type_string:
-    if(sscanf(this->o.c_string, "%d", &cint) == 1) return cint;
-  default:
-    return 0;
-  }
-}
-
-
-/* json_object_double */
-
-static int json_object_double_to_json_string(struct json_object* this,
-                                            struct printbuf *pb)
-{
-  return sprintbuf(pb, "%lf", this->o.c_double);
-}
-
-struct json_object* json_object_new_double(double d)
-{
-  struct json_object *this = json_object_new(json_type_double);
-  if(!this) return NULL;
-  this->_to_json_string = &json_object_double_to_json_string;
-  this->o.c_double = d;
-  return this;
-}
-
-double json_object_get_double(struct json_object *this)
-{
-  double cdouble;
-
-  if(!this) return 0.0;
-  switch(this->o_type) {
-  case json_type_double:
-    return this->o.c_double;
-  case json_type_int:
-    return this->o.c_int;
-  case json_type_boolean:
-    return this->o.c_boolean;
-  case json_type_string:
-    if(sscanf(this->o.c_string, "%lf", &cdouble) == 1) return cdouble;
-  default:
-    return 0.0;
-  }
-}
-
-
-/* json_object_string */
-
-static int json_object_string_to_json_string(struct json_object* this,
-                                            struct printbuf *pb)
-{
-  sprintbuf(pb, "\"");
-  json_escape_str(pb, this->o.c_string);
-  sprintbuf(pb, "\"");
-  return 0;
-}
-
-static void json_object_string_delete(struct json_object* this)
-{
-  free(this->o.c_string);
-  json_object_generic_delete(this);
-}
-
-struct json_object* json_object_new_string(char *s)
-{
-  struct json_object *this = json_object_new(json_type_string);
-  if(!this) return NULL;
-  this->_delete = &json_object_string_delete;
-  this->_to_json_string = &json_object_string_to_json_string;
-  this->o.c_string = strdup(s);
-  return this;
-}
-
-struct json_object* json_object_new_string_len(char *s, int len)
-{
-  struct json_object *this = json_object_new(json_type_string);
-  if(!this) return NULL;
-  this->_delete = &json_object_string_delete;
-  this->_to_json_string = &json_object_string_to_json_string;
-  this->o.c_string = strndup(s, len);
-  return this;
-}
-
-char* json_object_get_string(struct json_object *this)
-{
-  if(!this) return NULL;
-  switch(this->o_type) {
-  case json_type_string:
-    return this->o.c_string;
-  default:
-    return json_object_to_json_string(this);
-  }
-}
-
-
-/* json_object_array */
-
-static int json_object_array_to_json_string(struct json_object* this,
-                                           struct printbuf *pb)
-{
-  int i;
-  sprintbuf(pb, "[");
-  for(i=0; i < json_object_array_length(this); i++) {
-         struct json_object *val;
-         if(i) { sprintbuf(pb, ", "); }
-         else { sprintbuf(pb, " "); }
-
-      val = json_object_array_get_idx(this, i);
-         if(val == NULL) { sprintbuf(pb, "null"); }
-         else { val->_to_json_string(val, pb); }
-  }
-  return sprintbuf(pb, " ]");
-}
-
-static void json_object_array_entry_free(void *data)
-{
-  json_object_put((struct json_object*)data);
-}
-
-static void json_object_array_delete(struct json_object* this)
-{
-  array_list_free(this->o.c_array);
-  json_object_generic_delete(this);
-}
-
-struct json_object* json_object_new_array()
-{
-  struct json_object *this = json_object_new(json_type_array);
-  if(!this) return NULL;
-  this->_delete = &json_object_array_delete;
-  this->_to_json_string = &json_object_array_to_json_string;
-  this->o.c_array = array_list_new(&json_object_array_entry_free);
-  return this;
-}
-
-struct array_list* json_object_get_array(struct json_object *this)
-{
-  if(!this) return NULL;
-  switch(this->o_type) {
-  case json_type_array:
-    return this->o.c_array;
-  default:
-    return NULL;
-  }
-}
-
-int json_object_array_length(struct json_object *this)
-{
-  return array_list_length(this->o.c_array);
-}
-
-int json_object_array_add(struct json_object *this,struct json_object *val)
-{
-  return array_list_add(this->o.c_array, val);
-}
-
-int json_object_array_put_idx(struct json_object *this, int idx,
-                             struct json_object *val)
-{
-  return array_list_put_idx(this->o.c_array, idx, val);
-}
-
-struct json_object* json_object_array_get_idx(struct json_object *this,
-                                             int idx)
-{
-  return (struct json_object*)array_list_get_idx(this->o.c_array, idx);
-}
-
diff --git a/source4/lib/json/json_object.h b/source4/lib/json/json_object.h
deleted file mode 100644 (file)
index 5c25968..0000000
+++ /dev/null
@@ -1,310 +0,0 @@
-/*
- * $Id: json_object.h,v 1.12 2006/01/30 23:07:57 mclark Exp $
- *
- * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
- * Michael Clark <michael@metaparadigm.com>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See COPYING for details.
- *
- */
-
-#ifndef _json_object_h_
-#define _json_object_h_
-
-#define JSON_OBJECT_DEF_HASH_ENTIRES 16
-
-#undef FALSE
-#define FALSE ((boolean)0)
-
-#undef TRUE
-#define TRUE ((boolean)1)
-
-extern char *json_number_chars;
-extern char *json_hex_chars;
-
-/* forward structure definitions */
-
-typedef int boolean;
-struct printbuf;
-struct lh_table;
-struct array_list;
-struct json_object;
-struct json_object_iter;
-
-/* supported object types */
-
-enum json_type {
-  json_type_null,
-  json_type_boolean,
-  json_type_double,
-  json_type_int,
-  json_type_object,
-  json_type_array,
-  json_type_string
-};
-
-/* reference counting functions */
-
-/**
- * Increment the reference count of json_object
- * @param obj the json_object instance
- */
-extern struct json_object* json_object_get(struct json_object *obj);
-
-/**
- * Decrement the reference count of json_object and free if it reaches zero
- * @param obj the json_object instance
- */
-extern void json_object_put(struct json_object *obj);
-
-
-/**
- * Check if the json_object is of a given type
- * @param obj the json_object instance
- * @param type one of:
-     json_type_boolean,
-     json_type_double,
-     json_type_int,
-     json_type_object,
-     json_type_array,
-     json_type_string,
- */
-extern int json_object_is_type(struct json_object *obj, enum json_type type);
-
-/**
- * Get the type of the json_object
- * @param obj the json_object instance
- * @returns type being one of:
-     json_type_boolean,
-     json_type_double,
-     json_type_int,
-     json_type_object,
-     json_type_array,
-     json_type_string,
- */
-extern enum json_type json_object_get_type(struct json_object *obj);
-
-
-/** Stringify object to json format
- * @param obj the json_object instance
- * @returns a string in JSON format
- */
-extern char* json_object_to_json_string(struct json_object *obj);
-
-
-/* object type methods */
-
-/** Create a new empty object
- * @returns a json_object of type json_type_object
- */
-extern struct json_object* json_object_new_object();
-
-/** Get the hashtable of a json_object of type json_type_object
- * @param obj the json_object instance
- * @returns a linkhash
- */
-extern struct lh_table* json_object_get_object(struct json_object *obj);
-
-/** Add an object field to a json_object of type json_type_object
- *
- * The reference count will *not* be incremented. This is to make adding
- * fields to objects in code more compact. If you want to retain a reference
- * to an added object you must wrap the passed object with json_object_get
- *
- * @param obj the json_object instance
- * @param key the object field name (a private copy will be duplicated)
- * @param val a json_object or NULL member to associate with the given field
- */
-extern void json_object_object_add(struct json_object* obj, char *key,
-                                  struct json_object *val);
-
-/** Get the json_object associate with a given object field
- * @param obj the json_object instance
- * @param key the object field name
- * @returns the json_object associated with the given field name
- */
-extern struct json_object* json_object_object_get(struct json_object* obj,
-                                                 char *key);
-
-/** Delete the given json_object field
- *
- * The reference count will be decremented for the deleted object
- *
- * @param obj the json_object instance
- * @param key the object field name
- */
-extern void json_object_object_del(struct json_object* obj, char *key);
-
-/** Iterate through all keys and values of an object
- * @param obj the json_object instance
- * @param key the local name for the char* key variable defined in the body
- * @param val the local name for the json_object* object variable defined in the body
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-
-# define json_object_object_foreach(obj,key,val) \
- char *key; struct json_object *val; \
- for(struct lh_entry *entry = json_object_get_object(obj)->head; ({ if(entry) { key = (char*)entry->k; val = (struct json_object*)entry->v; } ; entry; }); entry = entry->next )
-
-#else /* ANSI C or MSC */
-
-# define json_object_object_foreach(obj,key,val) \
- char *key; struct json_object *val; struct lh_entry *entry; \
- for(entry = json_object_get_object(obj)->head; (entry ? (key = (char*)entry->k, val = (struct json_object*)entry->v, entry) : 0); entry = entry->next)
-
-#endif /* defined(__GNUC__) && !defined(__STRICT_ANSI__) */
-
-/** Iterate through all keys and values of an object (ANSI C Safe)
- * @param obj the json_object instance
- * @param iter the object iterator
- */
-#define json_object_object_foreachC(obj,iter) \
- for(iter.entry = json_object_get_object(obj)->head; (iter.entry ? (iter.key = (char*)iter.entry->k, iter.val = (struct json_object*)iter.entry->v, iter.entry) : 0); iter.entry = iter.entry->next)
-
-/* Array type methods */
-
-/** Create a new empty json_object of type json_type_array
- * @returns a json_object of type json_type_array
- */
-extern struct json_object* json_object_new_array();
-
-/** Get the arraylist of a json_object of type json_type_array
- * @param obj the json_object instance
- * @returns an arraylist
- */
-extern struct array_list* json_object_get_array(struct json_object *obj);
-
-/** Get the length of a json_object of type json_type_array
- * @param obj the json_object instance
- * @returns an int
- */
-extern int json_object_array_length(struct json_object *obj);
-
-/** Add an element to the end of a json_object of type json_type_array
- *
- * The reference count will *not* be incremented. This is to make adding
- * fields to objects in code more compact. If you want to retain a reference
- * to an added object you must wrap the passed object with json_object_get
- *
- * @param obj the json_object instance
- * @param val the json_object to be added
- */
-extern int json_object_array_add(struct json_object *obj,
-                                struct json_object *val);
-
-/** Insert or replace an element at a specified index in an array (a json_object of type json_type_array)
- *
- * The reference count will *not* be incremented. This is to make adding
- * fields to objects in code more compact. If you want to retain a reference
- * to an added object you must wrap the passed object with json_object_get
- *
- * The reference count of a replaced object will be decremented.
- *
- * The array size will be automatically be expanded to the size of the
- * index if the index is larger than the current size.
- *
- * @param obj the json_object instance
- * @param idx the index to insert the element at
- * @param val the json_object to be added
- */
-extern int json_object_array_put_idx(struct json_object *obj, int idx,
-                                    struct json_object *val);
-
-/** Get the element at specificed index of the array (a json_object of type json_type_array)
- * @param obj the json_object instance
- * @param idx the index to get the element at
- * @returns the json_object at the specified index (or NULL)
- */
-extern struct json_object* json_object_array_get_idx(struct json_object *obj,
-                                                    int idx);
-
-/* boolean type methods */
-
-/** Create a new empty json_object of type json_type_boolean
- * @param b a boolean TRUE or FALSE (0 or 1)
- * @returns a json_object of type json_type_boolean
- */
-extern struct json_object* json_object_new_boolean(boolean b);
-
-/** Get the boolean value of a json_object
- *
- * The type is coerced to a boolean if the passed object is not a boolean.
- * integer and double objects will return FALSE if there value is zero
- * or TRUE otherwise. If the passed object is a string it will return
- * TRUE if it has a non zero length. If any other object type is passed
- * TRUE will be returned if the object is not NULL.
- *
- * @param obj the json_object instance
- * @returns a boolean
- */
-extern boolean json_object_get_boolean(struct json_object *obj);
-
-
-/* int type methods */
-
-/** Create a new empty json_object of type json_type_int
- * @param i the integer
- * @returns a json_object of type json_type_int
- */
-extern struct json_object* json_object_new_int(int i);
-
-/** Get the int value of a json_object
- *
- * The type is coerced to a int if the passed object is not a int.
- * double objects will return their integer conversion. Strings will be
- * parsed as an integer. If no conversion exists then 0 is returned.
- *
- * @param obj the json_object instance
- * @returns an int
- */
-extern int json_object_get_int(struct json_object *obj);
-
-
-/* double type methods */
-
-/** Create a new empty json_object of type json_type_double
- * @param d the double
- * @returns a json_object of type json_type_double
- */
-extern struct json_object* json_object_new_double(double d);
-
-/** Get the double value of a json_object
- *
- * The type is coerced to a double if the passed object is not a double.
- * integer objects will return their dboule conversion. Strings will be
- * parsed as a double. If no conversion exists then 0.0 is returned.
- *
- * @param obj the json_object instance
- * @returns an double
- */
-extern double json_object_get_double(struct json_object *obj);
-
-
-/* string type methods */
-
-/** Create a new empty json_object of type json_type_string
- *
- * A copy of the string is made and the memory is managed by the json_object
- *
- * @param s the string
- * @returns a json_object of type json_type_string
- */
-extern struct json_object* json_object_new_string(char *s);
-
-extern struct json_object* json_object_new_string_len(char *s, int len);
-
-/** Get the string value of a json_object
- *
- * If the passed object is not of type json_type_string then the JSON
- * representation of the object is returned.
- *
- * The returned string memory is managed by the json_object and will
- * be freed when the reference count of the json_object drops to zero.
- *
- * @param obj the json_object instance
- * @returns a string
- */
-extern char* json_object_get_string(struct json_object *obj);
-
-#endif
diff --git a/source4/lib/json/json_object_private.h b/source4/lib/json/json_object_private.h
deleted file mode 100644 (file)
index 35a44f3..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * $Id: json_object_private.h,v 1.4 2006/01/26 02:16:28 mclark Exp $
- *
- * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
- * Michael Clark <michael@metaparadigm.com>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See COPYING for details.
- *
- */
-
-#ifndef _json_object_private_h_
-#define _json_object_private_h_
-
-typedef void (json_object_delete_fn)(struct json_object *o);
-typedef int (json_object_to_json_string_fn)(struct json_object *o,
-                                           struct printbuf *pb);
-
-struct json_object
-{
-  enum json_type o_type;
-  json_object_delete_fn *_delete;
-  json_object_to_json_string_fn *_to_json_string;
-  int _ref_count;
-  struct printbuf *_pb;
-  union data {
-    boolean c_boolean;
-    double c_double;
-    int c_int;
-    struct lh_table *c_object;
-    struct array_list *c_array;
-    char *c_string;
-  } o;
-};
-
-/* CAW: added for ANSI C iteration correctness */
-struct json_object_iter
-{
-       char *key;
-       struct json_object *val;
-       struct lh_entry *entry;
-};
-
-#endif
diff --git a/source4/lib/json/json_tokener.c b/source4/lib/json/json_tokener.c
deleted file mode 100644 (file)
index a3ebf10..0000000
+++ /dev/null
@@ -1,465 +0,0 @@
-/*
- * $Id: json_tokener.c,v 1.19 2006/01/30 23:07:57 mclark Exp $
- *
- * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
- * Michael Clark <michael@metaparadigm.com>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See COPYING for details.
- *
- */
-
-#include "config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <string.h>
-
-#include "bits.h"
-#include "debug.h"
-#include "printbuf.h"
-#include "arraylist.h"
-#include "json_object.h"
-#include "json_tokener.h"
-
-#if !HAVE_STRNCASECMP && defined(_MSC_VER)
-  /* MSC has the version as _strnicmp */
-# define strncasecmp _strnicmp
-#elif !HAVE_STRNCASECMP
-# error You do not have strncasecmp on your system.
-#endif /* HAVE_STRNCASECMP */
-
-
-static struct json_object* json_tokener_do_parse(struct json_tokener *this);
-
-struct json_object* json_tokener_parse(char * s)
-{
-  struct json_tokener tok;
-  struct json_object* obj;
-
-  tok.source = s;
-  tok.pos = 0;
-  tok.pb = printbuf_new();
-  obj = json_tokener_do_parse(&tok);
-  printbuf_free(tok.pb);
-  return obj;
-}
-
-#if !HAVE_STRNDUP
-/* CAW: compliant version of strndup() */
-char* strndup(const char* str, size_t n)
-{
-       if(str) {
-           size_t len = strlen(str);
-               size_t nn = min(len,n);
-               char* s = (char*)malloc(sizeof(char) * (nn + 1));
-
-               if(s) {
-                  memcpy(s, str, nn);
-                  s[nn] = '\0';
-               }
-
-               return s;
-       }
-
-       return NULL;
-}
-#endif
-
-static struct json_object* json_tokener_do_parse(struct json_tokener *this)
-{
-  enum json_tokener_state state, saved_state;
-  enum json_tokener_error err = json_tokener_success;
-  struct json_object *current = NULL, *obj;
-  char *obj_field_name = NULL;
-  char quote_char;
-  int deemed_double, start_offset;
-  char c;
-
-  state = json_tokener_state_eatws;
-  saved_state = json_tokener_state_start;
-
-  do {
-    c = this->source[this->pos];
-    switch(state) {
-
-    case json_tokener_state_eatws:
-      if(isspace(c)) {
-       this->pos++;
-      } else if(c == '/') {
-       state = json_tokener_state_comment_start;
-       start_offset = this->pos++;
-      } else {
-       state = saved_state;
-      }
-      break;
-
-    case json_tokener_state_start:
-      switch(c) {
-      case '{':
-       state = json_tokener_state_eatws;
-       saved_state = json_tokener_state_object;
-       current = json_object_new_object();
-       this->pos++;
-       break;
-      case '[':
-       state = json_tokener_state_eatws;
-       saved_state = json_tokener_state_array;
-       current = json_object_new_array();
-       this->pos++;
-       break;
-      case 'N':
-      case 'n':
-       state = json_tokener_state_null;
-       start_offset = this->pos++;
-       break;
-      case '"':
-      case '\'':
-       quote_char = c;
-       printbuf_reset(this->pb);
-       state = json_tokener_state_string;
-       start_offset = ++this->pos;
-       break;
-      case 'T':
-      case 't':
-      case 'F':
-      case 'f':
-       state = json_tokener_state_boolean;
-       start_offset = this->pos++;
-       break;
-#if defined(__GNUC__)
-         case '0' ... '9':
-#else
-         case '0':
-      case '1':
-      case '2':
-      case '3':
-      case '4':
-      case '5':
-      case '6':
-      case '7':
-      case '8':
-      case '9':
-#endif
-      case '-':
-       deemed_double = 0;
-       state = json_tokener_state_number;
-       start_offset = this->pos++;
-       break;
-      default:
-       err = json_tokener_error_parse_unexpected;
-       goto out;
-      }
-      break;
-
-    case json_tokener_state_finish:
-      goto out;
-
-    case json_tokener_state_null:
-      if(strncasecmp("null", this->source + start_offset,
-                    this->pos - start_offset))
-       return error_ptr(-json_tokener_error_parse_null);
-      if(this->pos - start_offset == 4) {
-       current = NULL;
-       saved_state = json_tokener_state_finish;
-       state = json_tokener_state_eatws;
-      } else {
-       this->pos++;
-      }
-      break;
-
-    case json_tokener_state_comment_start:
-      if(c == '*') {
-       state = json_tokener_state_comment;
-      } else if(c == '/') {
-       state = json_tokener_state_comment_eol;
-      } else {
-       err = json_tokener_error_parse_comment;
-       goto out;
-      }
-      this->pos++;
-      break;
-
-    case json_tokener_state_comment:
-      if(c == '*') state = json_tokener_state_comment_end;
-      this->pos++;
-      break;
-
-    case json_tokener_state_comment_eol:
-      if(c == '\n') {
-       if(mc_get_debug()) {
-         char *tmp = strndup(this->source + start_offset,
-                             this->pos - start_offset);
-         mc_debug("json_tokener_comment: %s\n", tmp);
-         free(tmp);
-       }
-       state = json_tokener_state_eatws;
-      }
-      this->pos++;
-      break;
-
-    case json_tokener_state_comment_end:
-      if(c == '/') {
-       if(mc_get_debug()) {
-         char *tmp = strndup(this->source + start_offset,
-                             this->pos - start_offset + 1);
-         mc_debug("json_tokener_comment: %s\n", tmp);
-         free(tmp);
-       }
-       state = json_tokener_state_eatws;
-      } else {
-       state = json_tokener_state_comment;
-      }
-      this->pos++;
-      break;
-
-    case json_tokener_state_string:
-      if(c == quote_char) {
-       printbuf_memappend(this->pb, this->source + start_offset,
-                          this->pos - start_offset);
-       current = json_object_new_string(this->pb->buf);
-       saved_state = json_tokener_state_finish;
-       state = json_tokener_state_eatws;
-      } else if(c == '\\') {
-       saved_state = json_tokener_state_string;
-       state = json_tokener_state_string_escape;
-      }
-      this->pos++;
-      break;
-
-    case json_tokener_state_string_escape:
-      switch(c) {
-      case '"':
-      case '\\':
-       printbuf_memappend(this->pb, this->source + start_offset,
-                          this->pos - start_offset - 1);
-       start_offset = this->pos++;
-       state = saved_state;
-       break;
-      case 'b':
-      case 'n':
-      case 'r':
-      case 't':
-       printbuf_memappend(this->pb, this->source + start_offset,
-                          this->pos - start_offset - 1);
-       if(c == 'b') printbuf_memappend(this->pb, "\b", 1);
-       else if(c == 'n') printbuf_memappend(this->pb, "\n", 1);
-       else if(c == 'r') printbuf_memappend(this->pb, "\r", 1);
-       else if(c == 't') printbuf_memappend(this->pb, "\t", 1);
-       start_offset = ++this->pos;
-       state = saved_state;
-       break;
-      case 'u':
-       printbuf_memappend(this->pb, this->source + start_offset,
-                          this->pos - start_offset - 1);
-       start_offset = ++this->pos;
-       state = json_tokener_state_escape_unicode;
-       break;
-      default:
-       err = json_tokener_error_parse_string;
-       goto out;
-      }
-      break;
-
-    case json_tokener_state_escape_unicode:
-      if(strchr(json_hex_chars, c)) {
-       this->pos++;
-       if(this->pos - start_offset == 4) {
-         unsigned char utf_out[3];
-         unsigned int ucs_char =
-           (hexdigit(*(this->source + start_offset)) << 12) +
-           (hexdigit(*(this->source + start_offset + 1)) << 8) +
-           (hexdigit(*(this->source + start_offset + 2)) << 4) +
-           hexdigit(*(this->source + start_offset + 3));
-         if (ucs_char < 0x80) {
-           utf_out[0] = ucs_char;
-           printbuf_memappend(this->pb, (char*)utf_out, 1);
-         } else if (ucs_char < 0x800) {
-           utf_out[0] = 0xc0 | (ucs_char >> 6);
-           utf_out[1] = 0x80 | (ucs_char & 0x3f);
-           printbuf_memappend(this->pb, (char*)utf_out, 2);
-         } else {
-           utf_out[0] = 0xe0 | (ucs_char >> 12);
-           utf_out[1] = 0x80 | ((ucs_char >> 6) & 0x3f);
-           utf_out[2] = 0x80 | (ucs_char & 0x3f);
-           printbuf_memappend(this->pb, (char*)utf_out, 3);
-         }
-         start_offset = this->pos;
-         state = saved_state;
-       }
-      } else {
-       err = json_tokener_error_parse_string;
-       goto out;
-      }
-      break;
-
-    case json_tokener_state_boolean:
-      if(strncasecmp("true", this->source + start_offset,
-                this->pos - start_offset) == 0) {
-       if(this->pos - start_offset == 4) {
-         current = json_object_new_boolean(1);
-         saved_state = json_tokener_state_finish;
-         state = json_tokener_state_eatws;
-       } else {
-         this->pos++;
-       }
-      } else if(strncasecmp("false", this->source + start_offset,
-                       this->pos - start_offset) == 0) {
-       if(this->pos - start_offset == 5) {
-         current = json_object_new_boolean(0);
-         saved_state = json_tokener_state_finish;
-         state = json_tokener_state_eatws;
-       } else {
-         this->pos++;
-       }
-      } else {
-       err = json_tokener_error_parse_boolean;
-       goto out;
-      }
-      break;
-
-    case json_tokener_state_number:
-      if(!c || !strchr(json_number_chars, c)) {
-       int numi;
-       double numd;
-       char *tmp = strndup(this->source + start_offset,
-                           this->pos - start_offset);
-       if(!deemed_double && sscanf(tmp, "%d", &numi) == 1) {
-         current = json_object_new_int(numi);
-       } else if(deemed_double && sscanf(tmp, "%lf", &numd) == 1) {
-         current = json_object_new_double(numd);
-       } else {
-         free(tmp);
-         err = json_tokener_error_parse_number;
-         goto out;
-       }
-       free(tmp);
-       saved_state = json_tokener_state_finish;
-       state = json_tokener_state_eatws;
-      } else {
-       if(c == '.' || c == 'e') deemed_double = 1;
-       this->pos++;
-      }
-      break;
-
-    case json_tokener_state_array:
-      if(c == ']') {
-       this->pos++;
-       saved_state = json_tokener_state_finish;
-       state = json_tokener_state_eatws;
-      } else {
-       obj = json_tokener_do_parse(this);
-       if(is_error(obj)) {
-         err = -(enum json_tokener_error)obj;
-         goto out;
-       }
-       json_object_array_add(current, obj);
-       saved_state = json_tokener_state_array_sep;
-       state = json_tokener_state_eatws;
-      }
-      break;
-
-    case json_tokener_state_array_sep:
-      if(c == ']') {
-       this->pos++;
-       saved_state = json_tokener_state_finish;
-       state = json_tokener_state_eatws;
-      } else if(c == ',') {
-       this->pos++;
-       saved_state = json_tokener_state_array;
-       state = json_tokener_state_eatws;
-      } else {
-       json_object_put(current);
-       return error_ptr(-json_tokener_error_parse_array);
-      }
-      break;
-
-    case json_tokener_state_object:
-      state = json_tokener_state_object_field_start;
-      start_offset = this->pos;
-      break;
-
-    case json_tokener_state_object_field_start:
-      if(c == '}') {
-       this->pos++;
-       saved_state = json_tokener_state_finish;
-       state = json_tokener_state_eatws;
-      } else if (c == '"' || c == '\'') {
-       quote_char = c;
-       printbuf_reset(this->pb);
-       state = json_tokener_state_object_field;
-       start_offset = ++this->pos;
-      } else {
-       err = json_tokener_error_parse_object;
-       goto out;
-      }
-      break;
-
-    case json_tokener_state_object_field:
-      if(c == quote_char) {
-       printbuf_memappend(this->pb, this->source + start_offset,
-                          this->pos - start_offset);
-       obj_field_name = strdup(this->pb->buf);
-       saved_state = json_tokener_state_object_field_end;
-       state = json_tokener_state_eatws;
-      } else if(c == '\\') {
-       saved_state = json_tokener_state_object_field;
-       state = json_tokener_state_string_escape;
-      }
-      this->pos++;
-      break;
-
-    case json_tokener_state_object_field_end:
-      if(c == ':') {
-       this->pos++;
-       saved_state = json_tokener_state_object_value;
-       state = json_tokener_state_eatws;
-      } else {
-       return error_ptr(-json_tokener_error_parse_object);
-      }
-      break;
-
-    case json_tokener_state_object_value:
-      obj = json_tokener_do_parse(this);
-      if(is_error(obj)) {
-       err = -(enum json_tokener_error)obj;
-       goto out;
-      }
-      json_object_object_add(current, obj_field_name, obj);
-      free(obj_field_name);
-      obj_field_name = NULL;
-      saved_state = json_tokener_state_object_sep;
-      state = json_tokener_state_eatws;
-      break;
-
-    case json_tokener_state_object_sep:
-      if(c == '}') {
-       this->pos++;
-       saved_state = json_tokener_state_finish;
-       state = json_tokener_state_eatws;
-      } else if(c == ',') {
-       this->pos++;
-       saved_state = json_tokener_state_object;
-       state = json_tokener_state_eatws;
-      } else {
-       err = json_tokener_error_parse_object;
-       goto out;
-      }
-      break;
-
-    }
-  } while(c);
-
-  if(state != json_tokener_state_finish &&
-     saved_state != json_tokener_state_finish)
-    err = json_tokener_error_parse_eof;
-
- out:
-  free(obj_field_name);
-  if(err == json_tokener_success) return current;
-  mc_debug("json_tokener_do_parse: error=%d state=%d char=%c\n",
-          err, state, c);
-  json_object_put(current);
-  return error_ptr(-err);
-}
diff --git a/source4/lib/json/json_tokener.h b/source4/lib/json/json_tokener.h
deleted file mode 100644 (file)
index 12227a9..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * $Id: json_tokener.h,v 1.9 2006/01/30 23:07:57 mclark Exp $
- *
- * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
- * Michael Clark <michael@metaparadigm.com>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See COPYING for details.
- *
- */
-
-#ifndef _json_tokener_h_
-#define _json_tokener_h_
-
-#include "json_object.h"
-
-enum json_tokener_error {
-  json_tokener_success,
-  json_tokener_error_parse_unexpected,
-  json_tokener_error_parse_null,
-  json_tokener_error_parse_boolean,
-  json_tokener_error_parse_number,
-  json_tokener_error_parse_array,
-  json_tokener_error_parse_object,
-  json_tokener_error_parse_string,
-  json_tokener_error_parse_comment,
-  json_tokener_error_parse_eof
-};
-
-enum json_tokener_state {
-  json_tokener_state_eatws,
-  json_tokener_state_start,
-  json_tokener_state_finish,
-  json_tokener_state_null,
-  json_tokener_state_comment_start,
-  json_tokener_state_comment,
-  json_tokener_state_comment_eol,
-  json_tokener_state_comment_end,
-  json_tokener_state_string,
-  json_tokener_state_string_escape,
-  json_tokener_state_escape_unicode,
-  json_tokener_state_boolean,
-  json_tokener_state_number,
-  json_tokener_state_array,
-  json_tokener_state_array_sep,
-  json_tokener_state_object,
-  json_tokener_state_object_field_start,
-  json_tokener_state_object_field,
-  json_tokener_state_object_field_end,
-  json_tokener_state_object_value,
-  json_tokener_state_object_sep
-};
-
-struct json_tokener
-{
-  char *source;
-  int pos;
-  struct printbuf *pb;
-};
-
-extern struct json_object* json_tokener_parse(char *s);
-
-#endif
diff --git a/source4/lib/json/json_util.c b/source4/lib/json/json_util.c
deleted file mode 100644 (file)
index e20be24..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * $Id: json_util.c,v 1.4 2006/01/30 23:07:57 mclark Exp $
- *
- * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
- * Michael Clark <michael@metaparadigm.com>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See COPYING for details.
- *
- */
-
-#include "config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <string.h>
-#include <errno.h>
-
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif /* HAVE_SYS_TYPES_H */
-
-#if HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif /* HAVE_SYS_STAT_H */
-
-#if HAVE_FCNTL_H
-#include <fcntl.h>
-#endif /* HAVE_FCNTL_H */
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-#ifdef WIN32
-# define WIN32_LEAN_AND_MEAN
-# include <windows.h>
-# include <io.h>
-#endif /* defined(WIN32) */
-
-#if !HAVE_OPEN && defined(WIN32)
-# define open _open
-#endif
-
-
-#include "bits.h"
-#include "debug.h"
-#include "printbuf.h"
-#include "json_object.h"
-#include "json_tokener.h"
-#include "json_util.h"
-
-struct json_object* json_object_from_file(char *filename)
-{
-  struct printbuf *pb;
-  struct json_object *obj;
-  char buf[JSON_FILE_BUF_SIZE];
-  int fd, ret;
-
-  if((fd = open(filename, O_RDONLY)) < 0) {
-    mc_error("json_object_from_file: error reading file %s: %s\n",
-            filename, strerror(errno));
-    return error_ptr(-1);
-  }
-  if(!(pb = printbuf_new())) {
-    mc_error("json_object_from_file: printbuf_new failed\n");
-    return error_ptr(-1);
-  }
-  while((ret = read(fd, buf, JSON_FILE_BUF_SIZE)) > 0) {
-    printbuf_memappend(pb, buf, ret);
-  }
-  close(fd);
-  if(ret < 0) {
-    mc_abort("json_object_from_file: error reading file %s: %s\n",
-            filename, strerror(errno));
-    printbuf_free(pb);
-    return error_ptr(-1);
-  }
-  obj = json_tokener_parse(pb->buf);
-  printbuf_free(pb);
-  return obj;
-}
-
-int json_object_to_file(char *filename, struct json_object *obj)
-{
-  char *json_str;
-  int fd, ret;
-  unsigned int wpos, wsize;
-
-  if(!obj) {
-    mc_error("json_object_to_file: object is null\n");
-    return -1;
-  }
-
-  if((fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT, 0644)) < 0) {
-    mc_error("json_object_to_file: error opening file %s: %s\n",
-            filename, strerror(errno));
-    return -1;
-  }
-
-  if(!(json_str = json_object_to_json_string(obj))) { return -1; }
-
-
-  wsize = (unsigned int)(strlen(json_str) & UINT_MAX); /* CAW: probably unnecessary, but the most 64bit safe */
-  wpos = 0;
-  while(wpos < wsize) {
-    if((ret = write(fd, json_str + wpos, wsize-wpos)) < 0) {
-      close(fd);
-      mc_error("json_object_to_file: error writing file %s: %s\n",
-            filename, strerror(errno));
-      return -1;
-    }
-
-       /* because of the above check for ret < 0, we can safely cast and add */
-    wpos += (unsigned int)ret;
-  }
-
-  close(fd);
-  return 0;
-}
diff --git a/source4/lib/json/json_util.h b/source4/lib/json/json_util.h
deleted file mode 100644 (file)
index 30fe2ab..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * $Id: json_util.h,v 1.4 2006/01/30 23:07:57 mclark Exp $
- *
- * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
- * Michael Clark <michael@metaparadigm.com>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See COPYING for details.
- *
- */
-
-#ifndef _json_util_h_
-#define _json_util_h_
-
-#include "json_object.h"
-
-#define JSON_FILE_BUF_SIZE 4096
-
-/* utlitiy functions */
-extern struct json_object* json_object_from_file(char *filename);
-extern int json_object_to_file(char *filename, struct json_object *obj);
-
-#endif
diff --git a/source4/lib/json/linkhash.c b/source4/lib/json/linkhash.c
deleted file mode 100644 (file)
index b04254b..0000000
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * $Id: linkhash.c,v 1.4 2006/01/26 02:16:28 mclark Exp $
- *
- * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
- * Michael Clark <michael@metaparadigm.com>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See COPYING for details.
- *
- */
-
-#include "config.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stddef.h>
-#include <limits.h>
-
-#include "linkhash.h"
-
-_NORETURN_ void lh_abort(const char *msg, ...)
-{
-       va_list ap;
-       va_start(ap, msg);
-       vprintf(msg, ap);
-       exit(1);
-}
-
-unsigned long lh_ptr_hash(void *k)
-{
-       /* CAW: refactored to be 64bit nice */
-       return (unsigned long)((((ptrdiff_t)k * LH_PRIME) >> 4) & ULONG_MAX);
-}
-
-int lh_ptr_equal(void *k1, void *k2)
-{
-       return (k1 == k2);
-}
-
-unsigned long lh_char_hash(void *k)
-{
-       unsigned int h = 0;
-       const char* data = k;
-       while( *data!=0 ) h = h*129 + (unsigned int)(*data++) + LH_PRIME;
-
-       return h;
-}
-
-int lh_char_equal(void *k1, void *k2)
-{
-       return (strcmp((char*)k1, (char*)k2) == 0);
-}
-
-struct lh_table* lh_table_new(int size, char *name,
-                             lh_entry_free_fn *free_fn,
-                             lh_hash_fn *hash_fn,
-                             lh_equal_fn *equal_fn)
-{
-       int i;
-       struct lh_table *t;
-
-       t = calloc(1, sizeof(struct lh_table));
-       if(!t) lh_abort("lh_table_new: calloc failed\n");
-       t->count = 0;
-       t->size = size;
-       t->name = name;
-       t->table = calloc(size, sizeof(struct lh_entry));
-       if(!t->table) lh_abort("lh_table_new: calloc failed\n");
-       t->free_fn = free_fn;
-       t->hash_fn = hash_fn;
-       t->equal_fn = equal_fn;
-       for(i = 0; i < size; i++) t->table[i].k = LH_EMPTY;
-       return t;
-}
-
-struct lh_table* lh_kchar_table_new(int size, char *name,
-                                   lh_entry_free_fn *free_fn)
-{
-       return lh_table_new(size, name, free_fn, lh_char_hash, lh_char_equal);
-}
-
-struct lh_table* lh_kptr_table_new(int size, char *name,
-                                  lh_entry_free_fn *free_fn)
-{
-       return lh_table_new(size, name, free_fn, lh_ptr_hash, lh_ptr_equal);
-}
-
-void lh_table_resize(struct lh_table *t, int new_size)
-{
-       struct lh_table *new_t;
-       struct lh_entry *ent;
-
-       new_t = lh_table_new(new_size, t->name, NULL, t->hash_fn, t->equal_fn);
-       ent = t->head;
-       while(ent) {
-               lh_table_insert(new_t, ent->k, ent->v);
-               ent = ent->next;
-       }
-       free(t->table);
-       t->table = new_t->table;
-       t->size = new_size;
-       t->head = new_t->head;
-       t->tail = new_t->tail;
-       t->resizes++;
-       free(new_t);
-}
-
-void lh_table_free(struct lh_table *t)
-{
-       struct lh_entry *c;
-       for(c = t->head; c != NULL; c = c->next) {
-               if(t->free_fn) {
-                       t->free_fn(c);
-               }
-       }
-       free(t->table);
-       free(t);
-}
-
-
-int lh_table_insert(struct lh_table *t, void *k, void *v)
-{
-       unsigned long h, n;
-
-       t->inserts++;
-       if(t->count > t->size * 0.66) lh_table_resize(t, t->size * 2);
-
-       h = t->hash_fn(k);
-       n = h % t->size;
-
-       while( 1 ) {
-               if(t->table[n].k == LH_EMPTY || t->table[n].k == LH_FREED) break;
-               t->collisions++;
-               if(++n == t->size) n = 0;
-       }
-
-       t->table[n].k = k;
-       t->table[n].v = v;
-       t->count++;
-
-       if(t->head == NULL) {
-               t->head = t->tail = &t->table[n];
-               t->table[n].next = t->table[n].prev = NULL;
-       } else {
-               t->tail->next = &t->table[n];
-               t->table[n].prev = t->tail;
-               t->table[n].next = NULL;
-               t->tail = &t->table[n];
-       }
-
-       return 0;
-}
-
-
-struct lh_entry* lh_table_lookup_entry(struct lh_table *t, void *k)
-{
-       unsigned long h = t->hash_fn(k);
-       unsigned long n = h % t->size;
-
-       t->lookups++;
-       while( 1 ) {
-               if(t->table[n].k == LH_EMPTY) return NULL;
-               if(t->table[n].k != LH_FREED &&
-                  t->equal_fn(t->table[n].k, k)) return &t->table[n];
-               if(++n == t->size) n = 0;
-       }
-       return NULL;
-}
-
-
-void* lh_table_lookup(struct lh_table *t, void *k)
-{
-       struct lh_entry *e = lh_table_lookup_entry(t, k);
-       if(e) return e->v;
-       return NULL;
-}
-
-
-int lh_table_delete_entry(struct lh_table *t, struct lh_entry *e)
-{
-       ptrdiff_t n = (ptrdiff_t)(e - t->table); /* CAW: fixed to be 64bit nice, still need the crazy negative case... */
-
-       /* CAW: this is bad, really bad, maybe stack goes other direction on this machine... */
-       if(n < 0) { return -2; }
-
-       if(t->table[n].k == LH_EMPTY || t->table[n].k == LH_FREED) return -1;
-       t->count--;
-       if(t->free_fn) t->free_fn(e);
-       t->table[n].v = NULL;
-       t->table[n].k = LH_FREED;
-       if(t->tail == &t->table[n] && t->head == &t->table[n]) {
-               t->head = t->tail = NULL;
-       } else if (t->head == &t->table[n]) {
-               t->head->next->prev = NULL;
-               t->head = t->head->next;
-       } else if (t->tail == &t->table[n]) {
-               t->tail->prev->next = NULL;
-               t->tail = t->tail->prev;
-       } else {
-               t->table[n].prev->next = t->table[n].next;
-               t->table[n].next->prev = t->table[n].prev;
-       }
-       t->table[n].next = t->table[n].prev = NULL;
-       return 0;
-}
-
-
-int lh_table_delete(struct lh_table *t, void *k)
-{
-       struct lh_entry *e = lh_table_lookup_entry(t, k);
-       if(!e) return -1;
-       return lh_table_delete_entry(t, e);
-}
-
diff --git a/source4/lib/json/linkhash.h b/source4/lib/json/linkhash.h
deleted file mode 100644 (file)
index 5c9fa85..0000000
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- * $Id: linkhash.h,v 1.6 2006/01/30 23:07:57 mclark Exp $
- *
- * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
- * Michael Clark <michael@metaparadigm.com>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See COPYING for details.
- *
- */
-#ifndef _linkhash_h_
-#define _linkhash_h_
-
-/**
- * golden prime used in hash functions
- */
-#define LH_PRIME 0x9e370001UL
-
-/**
- * sentinel pointer value for empty slots
- */
-#define LH_EMPTY (void*)-1
-
-/**
- * sentinel pointer value for freed slots
- */
-#define LH_FREED (void*)-2
-
-struct lh_entry;
-
-/**
- * callback function prototypes
- */
-typedef void (lh_entry_free_fn) (struct lh_entry *e);
-/**
- * callback function prototypes
- */
-typedef unsigned long (lh_hash_fn) (void *k);
-/**
- * callback function prototypes
- */
-typedef int (lh_equal_fn) (void *k1, void *k2);
-
-/**
- * An entry in the hash table
- */
-struct lh_entry {
-       /**
-        * The key.
-        */
-       void *k;
-       /**
-        * The value.
-        */
-       void *v;
-       /**
-        * The next entry
-        */
-       struct lh_entry *next;
-       /**
-        * The previous entry.
-        */
-       struct lh_entry *prev;
-};
-
-
-/**
- * The hash table structure.
- */
-struct lh_table {
-       /**
-        * Size of our hash.
-        */
-       int size;
-       /**
-        * Numbers of entries.
-        */
-       int count;
-
-       /**
-        * Number of collisions.
-        */
-       int collisions;
-
-       /**
-        * Number of resizes.
-        */
-       int resizes;
-
-       /**
-        * Number of lookups.
-        */
-       int lookups;
-
-       /**
-        * Number of inserts.
-        */
-       int inserts;
-
-       /**
-        * Number of deletes.
-        */
-       int deletes;
-
-       /**
-        * Name of the hash table.
-        */
-       char *name;
-
-       /**
-        * The first entry.
-        */
-       struct lh_entry *head;
-
-       /**
-        * The last entry.
-        */
-       struct lh_entry *tail;
-
-       struct lh_entry *table;
-
-       /**
-        * A pointer onto the function responsible for freeing an entry.
-        */
-       lh_entry_free_fn *free_fn;
-       lh_hash_fn *hash_fn;
-       lh_equal_fn *equal_fn;
-};
-
-
-/**
- * Pre-defined hash and equality functions
- */
-extern unsigned long lh_ptr_hash(void *k);
-extern int lh_ptr_equal(void *k1, void *k2);
-
-extern unsigned long lh_char_hash(void *k);
-extern int lh_char_equal(void *k1, void *k2);
-
-
-/**
- * Convenience list iterator.
- */
-#define lh_foreach(table, entry) \
-for(entry = table->head; entry; entry = entry->next)
-
-/**
- * lh_foreach_safe allows calling of deletion routine while iterating.
- */
-#define lh_foreach_safe(table, entry, tmp) \
-for(entry = table->head; entry && ((tmp = entry->next) || 1); entry = tmp)
-
-
-
-/**
- * Create a new linkhash table.
- * @param size initial table size. The table is automatically resized
- * although this incurs a performance penalty.
- * @param name the table name.
- * @param free_fn callback function used to free memory for entries
- * when lh_table_free or lh_table_delete is called.
- * If NULL is provided, then memory for keys and values
- * must be freed by the caller.
- * @param hash_fn  function used to hash keys. 2 standard ones are defined:
- * lh_ptr_hash and lh_char_hash for hashing pointer values
- * and C strings respectively.
- * @param equal_fn comparison function to compare keys. 2 standard ones defined:
- * lh_ptr_hash and lh_char_hash for comparing pointer values
- * and C strings respectively.
- * @return a pointer onto the linkhash table.
- */
-extern struct lh_table* lh_table_new(int size, char *name,
-                                    lh_entry_free_fn *free_fn,
-                                    lh_hash_fn *hash_fn,
-                                    lh_equal_fn *equal_fn);
-
-/**
- * Convenience function to create a new linkhash
- * table with char keys.
- * @param size initial table size.
- * @param name table name.
- * @param free_fn callback function used to free memory for entries.
- * @return a pointer onto the linkhash table.
- */
-extern struct lh_table* lh_kchar_table_new(int size, char *name,
-                                          lh_entry_free_fn *free_fn);
-
-
-/**
- * Convenience function to create a new linkhash
- * table with ptr keys.
- * @param size initial table size.
- * @param name table name.
- * @param free_fn callback function used to free memory for entries.
- * @return a pointer onto the linkhash table.
- */
-extern struct lh_table* lh_kptr_table_new(int size, char *name,
-                                         lh_entry_free_fn *free_fn);
-
-
-/**
- * Free a linkhash table.
- * If a callback free function is provided then it is called for all
- * entries in the table.
- * @param t table to free.
- */
-extern void lh_table_free(struct lh_table *t);
-
-
-/**
- * Insert a record into the table.
- * @param t the table to insert into.
- * @param k a pointer to the key to insert.
- * @param v a pointer to the value to insert.
- */
-extern int lh_table_insert(struct lh_table *t, void *k, void *v);
-
-
-/**
- * Lookup a record into the table.
- * @param t the table to lookup
- * @param k a pointer to the key to lookup
- * @return a pointer to the record structure of the value or NULL if it does not exist.
- */
-extern struct lh_entry* lh_table_lookup_entry(struct lh_table *t, void *k);
-
-/**
- * Lookup a record into the table
- * @param t the table to lookup
- * @param k a pointer to the key to lookup
- * @return a pointer to the found value or NULL if it does not exist.
- */
-extern void* lh_table_lookup(struct lh_table *t, void *k);
-
-
-/**
- * Delete a record from the table.
- * If a callback free function is provided then it is called for the
- * for the item being deleted.
- * @param t the table to delete from.
- * @param e a pointer to the entry to delete.
- * @return 0 if the item was deleted.
- * @return -1 if it was not found.
- */
-extern int lh_table_delete_entry(struct lh_table *t, struct lh_entry *e);
-
-
-/**
- * Delete a record from the table.
- * If a callback free function is provided then it is called for the
- * for the item being deleted.
- * @param t the table to delete from.
- * @param k a pointer to the key to delete.
- * @return 0 if the item was deleted.
- * @return -1 if it was not found.
- */
-extern int lh_table_delete(struct lh_table *t, void *k);
-
-
-#endif
diff --git a/source4/lib/json/ltmain.sh b/source4/lib/json/ltmain.sh
deleted file mode 100644 (file)
index cf3e25d..0000000
+++ /dev/null
@@ -1,6425 +0,0 @@
-# ltmain.sh - Provide generalized library-building support services.
-# NOTE: Changing this file will not affect anything until you rerun configure.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
-# Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-basename="s,^.*/,,g"
-
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath="$0"
-
-# The name of this program:
-progname=`echo "$progpath" | $SED $basename`
-modename="$progname"
-
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION=1.5.6
-TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42) Debian$Rev: 224 $"
-
-
-# Check that we have a working $echo.
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
-  # Yippee, $echo works!
-  :
-else
-  # Restart under the correct shell, and then maybe $echo will work.
-  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-$*
-EOF
-  exit $EXIT_SUCCESS
-fi
-
-default_mode=
-help="Try \`$progname --help' for more information."
-magic="%%%MAGIC variable%%%"
-mkdir="mkdir"
-mv="mv -f"
-rm="rm -f"
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
-sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-# test EBCDIC or ASCII
-case `echo A|tr A '\301'` in
- A) # EBCDIC based system
-  SP2NL="tr '\100' '\n'"
-  NL2SP="tr '\r\n' '\100\100'"
-  ;;
- *) # Assume ASCII based system
-  SP2NL="tr '\040' '\012'"
-  NL2SP="tr '\015\012' '\040\040'"
-  ;;
-esac
-
-# NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-# We save the old values to restore during execute mode.
-if test "${LC_ALL+set}" = set; then
-  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
-fi
-if test "${LANG+set}" = set; then
-  save_LANG="$LANG"; LANG=C; export LANG
-fi
-
-# Make sure IFS has a sensible default
-: ${IFS="      
-"}
-
-if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-  $echo "$modename: not configured to build any kind of library" 1>&2
-  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-  exit $EXIT_FAILURE
-fi
-
-# Global variables.
-mode=$default_mode
-nonopt=
-prev=
-prevopt=
-run=
-show="$echo"
-show_help=
-execute_dlfiles=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-
-#####################################
-# Shell function definitions:
-# This seems to be the best place for them
-
-# func_win32_libid arg
-# return the library type of file 'arg'
-#
-# Need a lot of goo to handle *both* DLLs and import libs
-# Has to be a shell function in order to 'eat' the argument
-# that is supplied when $file_magic_command is called.
-func_win32_libid () {
-  win32_libid_type="unknown"
-  win32_fileres=`file -L $1 2>/dev/null`
-  case $win32_fileres in
-  *ar\ archive\ import\ library*) # definitely import
-    win32_libid_type="x86 archive import"
-    ;;
-  *ar\ archive*) # could be an import, or static
-    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
-      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
-      win32_nmres=`eval $NM -f posix -A $1 | \
-       sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
-      if test "X$win32_nmres" = "Ximport" ; then
-        win32_libid_type="x86 archive import"
-      else
-        win32_libid_type="x86 archive static"
-      fi
-    fi
-    ;;
-  *DLL*)
-    win32_libid_type="x86 DLL"
-    ;;
-  *executable*) # but shell scripts are "executable" too...
-    case $win32_fileres in
-    *MS\ Windows\ PE\ Intel*)
-      win32_libid_type="x86 DLL"
-      ;;
-    esac
-    ;;
-  esac
-  $echo $win32_libid_type
-}
-
-
-# func_infer_tag arg
-# Infer tagged configuration to use if any are available and
-# if one wasn't chosen via the "--tag" command line option.
-# Only attempt this if the compiler in the base compile
-# command doesn't match the default compiler.
-# arg is usually of the form 'gcc ...'
-func_infer_tag () {
-    if test -n "$available_tags" && test -z "$tagname"; then
-      CC_quoted=
-      for arg in $CC; do
-       case $arg in
-         *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
-         arg="\"$arg\""
-         ;;
-       esac
-       CC_quoted="$CC_quoted $arg"
-      done
-      case $@ in
-      # Blanks in the command may have been stripped by the calling shell,
-      # but not from the CC environment variable when configure was run.
-      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
-      # Blanks at the start of $base_compile will cause this to fail
-      # if we don't check for them as well.
-      *)
-       for z in $available_tags; do
-         if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
-           # Evaluate the configuration.
-           eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
-           CC_quoted=
-           for arg in $CC; do
-           # Double-quote args containing other shell metacharacters.
-           case $arg in
-             *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
-             arg="\"$arg\""
-             ;;
-           esac
-           CC_quoted="$CC_quoted $arg"
-         done
-           case "$@ " in
-             " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
-             # The compiler in the base compile command matches
-             # the one in the tagged configuration.
-             # Assume this is the tagged configuration we want.
-             tagname=$z
-             break
-             ;;
-           esac
-         fi
-       done
-       # If $tagname still isn't set, then no tagged configuration
-       # was found and let the user know that the "--tag" command
-       # line option must be used.
-       if test -z "$tagname"; then
-         $echo "$modename: unable to infer tagged configuration"
-         $echo "$modename: specify a tag with \`--tag'" 1>&2
-         exit $EXIT_FAILURE
-#        else
-#          $echo "$modename: using $tagname tagged configuration"
-       fi
-       ;;
-      esac
-    fi
-}
-# End of Shell function definitions
-#####################################
-
-# Darwin sucks
-eval std_shrext=\"$shrext_cmds\"
-
-# Parse our command line options once, thoroughly.
-while test "$#" -gt 0
-do
-  arg="$1"
-  shift
-
-  case $arg in
-  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) optarg= ;;
-  esac
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$prev"; then
-    case $prev in
-    execute_dlfiles)
-      execute_dlfiles="$execute_dlfiles $arg"
-      ;;
-    tag)
-      tagname="$arg"
-      preserve_args="${preserve_args}=$arg"
-
-      # Check whether tagname contains only valid characters
-      case $tagname in
-      *[!-_A-Za-z0-9,/]*)
-       $echo "$progname: invalid tag name: $tagname" 1>&2
-       exit $EXIT_FAILURE
-       ;;
-      esac
-
-      case $tagname in
-      CC)
-       # Don't test for the "default" C tag, as we know, it's there, but
-       # not specially marked.
-       ;;
-      *)
-       if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
-         taglist="$taglist $tagname"
-         # Evaluate the configuration.
-         eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
-       else
-         $echo "$progname: ignoring unknown tag $tagname" 1>&2
-       fi
-       ;;
-      esac
-      ;;
-    *)
-      eval "$prev=\$arg"
-      ;;
-    esac
-
-    prev=
-    prevopt=
-    continue
-  fi
-
-  # Have we seen a non-optional argument yet?
-  case $arg in
-  --help)
-    show_help=yes
-    ;;
-
-  --version)
-    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
-    $echo
-    $echo "Copyright (C) 2003  Free Software Foundation, Inc."
-    $echo "This is free software; see the source for copying conditions.  There is NO"
-    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-    exit $EXIT_SUCCESS
-    ;;
-
-  --config)
-    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
-    # Now print the configurations for the tags.
-    for tagname in $taglist; do
-      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
-    done
-    exit $EXIT_SUCCESS
-    ;;
-
-  --debug)
-    $echo "$progname: enabling shell trace mode"
-    set -x
-    preserve_args="$preserve_args $arg"
-    ;;
-
-  --dry-run | -n)
-    run=:
-    ;;
-
-  --features)
-    $echo "host: $host"
-    if test "$build_libtool_libs" = yes; then
-      $echo "enable shared libraries"
-    else
-      $echo "disable shared libraries"
-    fi
-    if test "$build_old_libs" = yes; then
-      $echo "enable static libraries"
-    else
-      $echo "disable static libraries"
-    fi
-    exit $EXIT_SUCCESS
-    ;;
-
-  --finish) mode="finish" ;;
-
-  --mode) prevopt="--mode" prev=mode ;;
-  --mode=*) mode="$optarg" ;;
-
-  --preserve-dup-deps) duplicate_deps="yes" ;;
-
-  --quiet | --silent)
-    show=:
-    preserve_args="$preserve_args $arg"
-    ;;
-
-  --tag) prevopt="--tag" prev=tag ;;
-  --tag=*)
-    set tag "$optarg" ${1+"$@"}
-    shift
-    prev=tag
-    preserve_args="$preserve_args --tag"
-    ;;
-
-  -dlopen)
-    prevopt="-dlopen"
-    prev=execute_dlfiles
-    ;;
-
-  -*)
-    $echo "$modename: unrecognized option \`$arg'" 1>&2
-    $echo "$help" 1>&2
-    exit $EXIT_FAILURE
-    ;;
-
-  *)
-    nonopt="$arg"
-    break
-    ;;
-  esac
-done
-
-if test -n "$prevopt"; then
-  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
-  $echo "$help" 1>&2
-  exit $EXIT_FAILURE
-fi
-
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end.  This prevents here-documents from being
-# left over by shells.
-exec_cmd=
-
-if test -z "$show_help"; then
-
-  # Infer the operation mode.
-  if test -z "$mode"; then
-    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
-    $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
-    case $nonopt in
-    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
-      mode=link
-      for arg
-      do
-       case $arg in
-       -c)
-          mode=compile
-          break
-          ;;
-       esac
-      done
-      ;;
-    *db | *dbx | *strace | *truss)
-      mode=execute
-      ;;
-    *install*|cp|mv)
-      mode=install
-      ;;
-    *rm)
-      mode=uninstall
-      ;;
-    *)
-      # If we have no mode, but dlfiles were specified, then do execute mode.
-      test -n "$execute_dlfiles" && mode=execute
-
-      # Just use the default operation mode.
-      if test -z "$mode"; then
-       if test -n "$nonopt"; then
-         $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
-       else
-         $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
-       fi
-      fi
-      ;;
-    esac
-  fi
-
-  # Only execute mode is allowed to have -dlopen flags.
-  if test -n "$execute_dlfiles" && test "$mode" != execute; then
-    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
-    $echo "$help" 1>&2
-    exit $EXIT_FAILURE
-  fi
-
-  # Change the help message to a mode-specific one.
-  generic_help="$help"
-  help="Try \`$modename --help --mode=$mode' for more information."
-
-  # These modes are in order of execution frequency so that they run quickly.
-  case $mode in
-  # libtool compile mode
-  compile)
-    modename="$modename: compile"
-    # Get the compilation command and the source file.
-    base_compile=
-    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
-    suppress_opt=yes
-    suppress_output=
-    arg_mode=normal
-    libobj=
-    later=
-
-    for arg
-    do
-      case "$arg_mode" in
-      arg  )
-       # do not "continue".  Instead, add this to base_compile
-       lastarg="$arg"
-       arg_mode=normal
-       ;;
-
-      target )
-       libobj="$arg"
-       arg_mode=normal
-       continue
-       ;;
-
-      normal )
-       # Accept any command-line options.
-       case $arg in
-       -o)
-         if test -n "$libobj" ; then
-           $echo "$modename: you cannot specify \`-o' more than once" 1>&2
-           exit $EXIT_FAILURE
-         fi
-         arg_mode=target
-         continue
-         ;;
-
-       -static | -prefer-pic | -prefer-non-pic)
-         later="$later $arg"
-         continue
-         ;;
-
-       -no-suppress)
-         suppress_opt=no
-         continue
-         ;;
-
-       -Xcompiler)
-         arg_mode=arg  #  the next one goes into the "base_compile" arg list
-         continue      #  The current "srcfile" will either be retained or
-         ;;            #  replaced later.  I would guess that would be a bug.
-
-       -Wc,*)
-         args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
-         lastarg=
-         save_ifs="$IFS"; IFS=','
-         for arg in $args; do
-           IFS="$save_ifs"
-
-           # Double-quote args containing other shell metacharacters.
-           # Many Bourne shells cannot handle close brackets correctly
-           # in scan sets, so we specify it separately.
-           case $arg in
-             *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
-             arg="\"$arg\""
-             ;;
-           esac
-           lastarg="$lastarg $arg"
-         done
-         IFS="$save_ifs"
-         lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
-
-         # Add the arguments to base_compile.
-         base_compile="$base_compile $lastarg"
-         continue
-         ;;
-
-       * )
-         # Accept the current argument as the source file.
-         # The previous "srcfile" becomes the current argument.
-         #
-         lastarg="$srcfile"
-         srcfile="$arg"
-         ;;
-       esac  #  case $arg
-       ;;
-      esac    #  case $arg_mode
-
-      # Aesthetically quote the previous argument.
-      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
-
-      case $lastarg in
-      # Double-quote args containing other shell metacharacters.
-      # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, so we specify it separately.
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
-       lastarg="\"$lastarg\""
-       ;;
-      esac
-
-      base_compile="$base_compile $lastarg"
-    done # for arg
-
-    case $arg_mode in
-    arg)
-      $echo "$modename: you must specify an argument for -Xcompile"
-      exit $EXIT_FAILURE
-      ;;
-    target)
-      $echo "$modename: you must specify a target with \`-o'" 1>&2
-      exit $EXIT_FAILURE
-      ;;
-    *)
-      # Get the name of the library object.
-      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
-      ;;
-    esac
-
-    # Recognize several different file suffixes.
-    # If the user specifies -o file.o, it is replaced with file.lo
-    xform='[cCFSifmso]'
-    case $libobj in
-    *.ada) xform=ada ;;
-    *.adb) xform=adb ;;
-    *.ads) xform=ads ;;
-    *.asm) xform=asm ;;
-    *.c++) xform=c++ ;;
-    *.cc) xform=cc ;;
-    *.ii) xform=ii ;;
-    *.class) xform=class ;;
-    *.cpp) xform=cpp ;;
-    *.cxx) xform=cxx ;;
-    *.f90) xform=f90 ;;
-    *.for) xform=for ;;
-    *.java) xform=java ;;
-    esac
-
-    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
-
-    case $libobj in
-    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
-    *)
-      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
-      exit $EXIT_FAILURE
-      ;;
-    esac
-
-    func_infer_tag $base_compile
-
-    for arg in $later; do
-      case $arg in
-      -static)
-       build_old_libs=yes
-       continue
-       ;;
-
-      -prefer-pic)
-       pic_mode=yes
-       continue
-       ;;
-
-      -prefer-non-pic)
-       pic_mode=no
-       continue
-       ;;
-      esac
-    done
-
-    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
-    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
-    if test "X$xdir" = "X$obj"; then
-      xdir=
-    else
-      xdir=$xdir/
-    fi
-    lobj=${xdir}$objdir/$objname
-
-    if test -z "$base_compile"; then
-      $echo "$modename: you must specify a compilation command" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
-
-    # Delete any leftover library objects.
-    if test "$build_old_libs" = yes; then
-      removelist="$obj $lobj $libobj ${libobj}T"
-    else
-      removelist="$lobj $libobj ${libobj}T"
-    fi
-
-    $run $rm $removelist
-    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
-
-    # On Cygwin there's no "real" PIC flag so we must build both object types
-    case $host_os in
-    cygwin* | mingw* | pw32* | os2*)
-      pic_mode=default
-      ;;
-    esac
-    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
-      # non-PIC code in shared libraries is not supported
-      pic_mode=default
-    fi
-
-    # Calculate the filename of the output object if compiler does
-    # not support -o with -c
-    if test "$compiler_c_o" = no; then
-      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
-      lockfile="$output_obj.lock"
-      removelist="$removelist $output_obj $lockfile"
-      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
-    else
-      output_obj=
-      need_locks=no
-      lockfile=
-    fi
-
-    # Lock this critical section if it is needed
-    # We use this script file to make the link, it avoids creating a new file
-    if test "$need_locks" = yes; then
-      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
-       $show "Waiting for $lockfile to be removed"
-       sleep 2
-      done
-    elif test "$need_locks" = warn; then
-      if test -f "$lockfile"; then
-       $echo "\
-*** ERROR, $lockfile exists and contains:
-`cat $lockfile 2>/dev/null`
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-       $run $rm $removelist
-       exit $EXIT_FAILURE
-      fi
-      $echo $srcfile > "$lockfile"
-    fi
-
-    if test -n "$fix_srcfile_path"; then
-      eval srcfile=\"$fix_srcfile_path\"
-    fi
-
-    $run $rm "$libobj" "${libobj}T"
-
-    # Create a libtool object file (analogous to a ".la" file),
-    # but don't create it if we're doing a dry run.
-    test -z "$run" && cat > ${libobj}T <<EOF
-# $libobj - a libtool object file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-EOF
-
-    # Only build a PIC object if we are building libtool libraries.
-    if test "$build_libtool_libs" = yes; then
-      # Without this assignment, base_compile gets emptied.
-      fbsd_hideous_sh_bug=$base_compile
-
-      if test "$pic_mode" != no; then
-       command="$base_compile $srcfile $pic_flag"
-      else
-       # Don't build PIC code
-       command="$base_compile $srcfile"
-      fi
-
-      if test ! -d "${xdir}$objdir"; then
-       $show "$mkdir ${xdir}$objdir"
-       $run $mkdir ${xdir}$objdir
-       status=$?
-       if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
-         exit $status
-       fi
-      fi
-
-      if test -z "$output_obj"; then
-       # Place PIC objects in $objdir
-       command="$command -o $lobj"
-      fi
-
-      $run $rm "$lobj" "$output_obj"
-
-      $show "$command"
-      if $run eval "$command"; then :
-      else
-       test -n "$output_obj" && $run $rm $removelist
-       exit $EXIT_FAILURE
-      fi
-
-      if test "$need_locks" = warn &&
-        test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-       $echo "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-       $run $rm $removelist
-       exit $EXIT_FAILURE
-      fi
-
-      # Just move the object if needed, then go on to compile the next one
-      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
-       $show "$mv $output_obj $lobj"
-       if $run $mv $output_obj $lobj; then :
-       else
-         error=$?
-         $run $rm $removelist
-         exit $error
-       fi
-      fi
-
-      # Append the name of the PIC object to the libtool object file.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-pic_object='$objdir/$objname'
-
-EOF
-
-      # Allow error messages only from the first compilation.
-      if test "$suppress_opt" = yes; then
-        suppress_output=' >/dev/null 2>&1'
-      fi
-    else
-      # No PIC object so indicate it doesn't exist in the libtool
-      # object file.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-pic_object=none
-
-EOF
-    fi
-
-    # Only build a position-dependent object if we build old libraries.
-    if test "$build_old_libs" = yes; then
-      if test "$pic_mode" != yes; then
-       # Don't build PIC code
-       command="$base_compile $srcfile"
-      else
-       command="$base_compile $srcfile $pic_flag"
-      fi
-      if test "$compiler_c_o" = yes; then
-       command="$command -o $obj"
-      fi
-
-      # Suppress compiler output if we already did a PIC compilation.
-      command="$command$suppress_output"
-      $run $rm "$obj" "$output_obj"
-      $show "$command"
-      if $run eval "$command"; then :
-      else
-       $run $rm $removelist
-       exit $EXIT_FAILURE
-      fi
-
-      if test "$need_locks" = warn &&
-        test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-       $echo "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-       $run $rm $removelist
-       exit $EXIT_FAILURE
-      fi
-
-      # Just move the object if needed
-      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
-       $show "$mv $output_obj $obj"
-       if $run $mv $output_obj $obj; then :
-       else
-         error=$?
-         $run $rm $removelist
-         exit $error
-       fi
-      fi
-
-      # Append the name of the non-PIC object the libtool object file.
-      # Only append if the libtool object file exists.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object='$objname'
-
-EOF
-    else
-      # Append the name of the non-PIC object the libtool object file.
-      # Only append if the libtool object file exists.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object=none
-
-EOF
-    fi
-
-    $run $mv "${libobj}T" "${libobj}"
-
-    # Unlock the critical section if it was locked
-    if test "$need_locks" != no; then
-      $run $rm "$lockfile"
-    fi
-
-    exit $EXIT_SUCCESS
-    ;;
-
-  # libtool link mode
-  link | relink)
-    modename="$modename: link"
-    case $host in
-    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-      # It is impossible to link a dll without this setting, and
-      # we shouldn't force the makefile maintainer to figure out
-      # which system we are compiling for in order to pass an extra
-      # flag for every libtool invocation.
-      # allow_undefined=no
-
-      # FIXME: Unfortunately, there are problems with the above when trying
-      # to make a dll which has undefined symbols, in which case not
-      # even a static library is built.  For now, we need to specify
-      # -no-undefined on the libtool link line when we can be certain
-      # that all symbols are satisfied, otherwise we get a static library.
-      allow_undefined=yes
-      ;;
-    *)
-      allow_undefined=yes
-      ;;
-    esac
-    libtool_args="$nonopt"
-    base_compile="$nonopt $@"
-    compile_command="$nonopt"
-    finalize_command="$nonopt"
-
-    compile_rpath=
-    finalize_rpath=
-    compile_shlibpath=
-    finalize_shlibpath=
-    convenience=
-    old_convenience=
-    deplibs=
-    old_deplibs=
-    compiler_flags=
-    linker_flags=
-    dllsearchpath=
-    lib_search_path=`pwd`
-    inst_prefix_dir=
-
-    avoid_version=no
-    dlfiles=
-    dlprefiles=
-    dlself=no
-    export_dynamic=no
-    export_symbols=
-    export_symbols_regex=
-    generated=
-    libobjs=
-    ltlibs=
-    module=no
-    no_install=no
-    objs=
-    non_pic_objects=
-    precious_files_regex=
-    prefer_static_libs=no
-    preload=no
-    prev=
-    prevarg=
-    release=
-    rpath=
-    xrpath=
-    perm_rpath=
-    temp_rpath=
-    thread_safe=no
-    vinfo=
-    vinfo_number=no
-
-    func_infer_tag $base_compile
-
-    # We need to know -static, to get the right output filenames.
-    for arg
-    do
-      case $arg in
-      -all-static | -static)
-       if test "X$arg" = "X-all-static"; then
-         if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
-           $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
-         fi
-         if test -n "$link_static_flag"; then
-           dlopen_self=$dlopen_self_static
-         fi
-       else
-         if test -z "$pic_flag" && test -n "$link_static_flag"; then
-           dlopen_self=$dlopen_self_static
-         fi
-       fi
-       build_libtool_libs=no
-       build_old_libs=yes
-       prefer_static_libs=yes
-       break
-       ;;
-      esac
-    done
-
-    # See if our shared archives depend on static archives.
-    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
-
-    # Go through the arguments, transforming them on the way.
-    while test "$#" -gt 0; do
-      arg="$1"
-      shift
-      case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
-       qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
-       ;;
-      *) qarg=$arg ;;
-      esac
-      libtool_args="$libtool_args $qarg"
-
-      # If the previous option needs an argument, assign it.
-      if test -n "$prev"; then
-       case $prev in
-       output)
-         compile_command="$compile_command @OUTPUT@"
-         finalize_command="$finalize_command @OUTPUT@"
-         ;;
-       esac
-
-       case $prev in
-       dlfiles|dlprefiles)
-         if test "$preload" = no; then
-           # Add the symbol object into the linking commands.
-           compile_command="$compile_command @SYMFILE@"
-           finalize_command="$finalize_command @SYMFILE@"
-           preload=yes
-         fi
-         case $arg in
-         *.la | *.lo) ;;  # We handle these cases below.
-         force)
-           if test "$dlself" = no; then
-             dlself=needless
-             export_dynamic=yes
-           fi
-           prev=
-           continue
-           ;;
-         self)
-           if test "$prev" = dlprefiles; then
-             dlself=yes
-           elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
-             dlself=yes
-           else
-             dlself=needless
-             export_dynamic=yes
-           fi
-           prev=
-           continue
-           ;;
-         *)
-           if test "$prev" = dlfiles; then
-             dlfiles="$dlfiles $arg"
-           else
-             dlprefiles="$dlprefiles $arg"
-           fi
-           prev=
-           continue
-           ;;
-         esac
-         ;;
-       expsyms)
-         export_symbols="$arg"
-         if test ! -f "$arg"; then
-           $echo "$modename: symbol file \`$arg' does not exist"
-           exit $EXIT_FAILURE
-         fi
-         prev=
-         continue
-         ;;
-       expsyms_regex)
-         export_symbols_regex="$arg"
-         prev=
-         continue
-         ;;
-       inst_prefix)
-         inst_prefix_dir="$arg"
-         prev=
-         continue
-         ;;
-       precious_regex)
-         precious_files_regex="$arg"
-         prev=
-         continue
-         ;;
-       release)
-         release="-$arg"
-         prev=
-         continue
-         ;;
-       objectlist)
-         if test -f "$arg"; then
-           save_arg=$arg
-           moreargs=
-           for fil in `cat $save_arg`
-           do
-#            moreargs="$moreargs $fil"
-             arg=$fil
-             # A libtool-controlled object.
-
-             # Check to see that this really is a libtool object.
-             if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-               pic_object=
-               non_pic_object=
-
-               # Read the .lo file
-               # If there is no directory component, then add one.
-               case $arg in
-               */* | *\\*) . $arg ;;
-               *) . ./$arg ;;
-               esac
-
-               if test -z "$pic_object" || \
-                  test -z "$non_pic_object" ||
-                  test "$pic_object" = none && \
-                  test "$non_pic_object" = none; then
-                 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
-                 exit $EXIT_FAILURE
-               fi
-
-               # Extract subdirectory from the argument.
-               xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-               if test "X$xdir" = "X$arg"; then
-                 xdir=
-               else
-                 xdir="$xdir/"
-               fi
-
-               if test "$pic_object" != none; then
-                 # Prepend the subdirectory the object is found in.
-                 pic_object="$xdir$pic_object"
-
-                 if test "$prev" = dlfiles; then
-                   if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-                     dlfiles="$dlfiles $pic_object"
-                     prev=
-                     continue
-                   else
-                     # If libtool objects are unsupported, then we need to preload.
-                     prev=dlprefiles
-                   fi
-                 fi
-
-                 # CHECK ME:  I think I busted this.  -Ossama
-                 if test "$prev" = dlprefiles; then
-                   # Preload the old-style object.
-                   dlprefiles="$dlprefiles $pic_object"
-                   prev=
-                 fi
-
-                 # A PIC object.
-                 libobjs="$libobjs $pic_object"
-                 arg="$pic_object"
-               fi
-
-               # Non-PIC object.
-               if test "$non_pic_object" != none; then
-                 # Prepend the subdirectory the object is found in.
-                 non_pic_object="$xdir$non_pic_object"
-
-                 # A standard non-PIC object
-                 non_pic_objects="$non_pic_objects $non_pic_object"
-                 if test -z "$pic_object" || test "$pic_object" = none ; then
-                   arg="$non_pic_object"
-                 fi
-               fi
-             else
-               # Only an error if not doing a dry-run.
-               if test -z "$run"; then
-                 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
-                 exit $EXIT_FAILURE
-               else
-                 # Dry-run case.
-
-                 # Extract subdirectory from the argument.
-                 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-                 if test "X$xdir" = "X$arg"; then
-                   xdir=
-                 else
-                   xdir="$xdir/"
-                 fi
-
-                 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
-                 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
-                 libobjs="$libobjs $pic_object"
-                 non_pic_objects="$non_pic_objects $non_pic_object"
-               fi
-             fi
-           done
-         else
-           $echo "$modename: link input file \`$save_arg' does not exist"
-           exit $EXIT_FAILURE
-         fi
-         arg=$save_arg
-         prev=
-         continue
-         ;;
-       rpath | xrpath)
-         # We need an absolute path.
-         case $arg in
-         [\\/]* | [A-Za-z]:[\\/]*) ;;
-         *)
-           $echo "$modename: only absolute run-paths are allowed" 1>&2
-           exit $EXIT_FAILURE
-           ;;
-         esac
-         if test "$prev" = rpath; then
-           case "$rpath " in
-           *" $arg "*) ;;
-           *) rpath="$rpath $arg" ;;
-           esac
-         else
-           case "$xrpath " in
-           *" $arg "*) ;;
-           *) xrpath="$xrpath $arg" ;;
-           esac
-         fi
-         prev=
-         continue
-         ;;
-       xcompiler)
-         compiler_flags="$compiler_flags $qarg"
-         prev=
-         compile_command="$compile_command $qarg"
-         finalize_command="$finalize_command $qarg"
-         continue
-         ;;
-       xlinker)
-         linker_flags="$linker_flags $qarg"
-         compiler_flags="$compiler_flags $wl$qarg"
-         prev=
-         compile_command="$compile_command $wl$qarg"
-         finalize_command="$finalize_command $wl$qarg"
-         continue
-         ;;
-       xcclinker)
-         linker_flags="$linker_flags $qarg"
-         compiler_flags="$compiler_flags $qarg"
-         prev=
-         compile_command="$compile_command $qarg"
-         finalize_command="$finalize_command $qarg"
-         continue
-         ;;
-       shrext)
-         shrext_cmds="$arg"
-         prev=
-         continue
-         ;;
-       *)
-         eval "$prev=\"\$arg\""
-         prev=
-         continue
-         ;;
-       esac
-      fi # test -n "$prev"
-
-      prevarg="$arg"
-
-      case $arg in
-      -all-static)
-       if test -n "$link_static_flag"; then
-         compile_command="$compile_command $link_static_flag"
-         finalize_command="$finalize_command $link_static_flag"
-       fi
-       continue
-       ;;
-
-      -allow-undefined)
-       # FIXME: remove this flag sometime in the future.
-       $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
-       continue
-       ;;
-
-      -avoid-version)
-       avoid_version=yes
-       continue
-       ;;
-
-      -dlopen)
-       prev=dlfiles
-       continue
-       ;;
-
-      -dlpreopen)
-       prev=dlprefiles
-       continue
-       ;;
-
-      -export-dynamic)
-       export_dynamic=yes
-       continue
-       ;;
-
-      -export-symbols | -export-symbols-regex)
-       if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
-         $echo "$modename: more than one -exported-symbols argument is not allowed"
-         exit $EXIT_FAILURE
-       fi
-       if test "X$arg" = "X-export-symbols"; then
-         prev=expsyms
-       else
-         prev=expsyms_regex
-       fi
-       continue
-       ;;
-
-      -inst-prefix-dir)
-       prev=inst_prefix
-       continue
-       ;;
-
-      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
-      # so, if we see these flags be careful not to treat them like -L
-      -L[A-Z][A-Z]*:*)
-       case $with_gcc/$host in
-       no/*-*-irix* | /*-*-irix*)
-         compile_command="$compile_command $arg"
-         finalize_command="$finalize_command $arg"
-         ;;
-       esac
-       continue
-       ;;
-
-      -L*)
-       dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
-       # We need an absolute path.
-       case $dir in
-       [\\/]* | [A-Za-z]:[\\/]*) ;;
-       *)
-         absdir=`cd "$dir" && pwd`
-         if test -z "$absdir"; then
-           $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
-           exit $EXIT_FAILURE
-         fi
-         dir="$absdir"
-         ;;
-       esac
-       case "$deplibs " in
-       *" -L$dir "*) ;;
-       *)
-         deplibs="$deplibs -L$dir"
-         lib_search_path="$lib_search_path $dir"
-         ;;
-       esac
-       case $host in
-       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-         case :$dllsearchpath: in
-         *":$dir:"*) ;;
-         *) dllsearchpath="$dllsearchpath:$dir";;
-         esac
-         ;;
-       esac
-       continue
-       ;;
-
-      -l*)
-       if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
-         case $host in
-         *-*-cygwin* | *-*-pw32* | *-*-beos*)
-           # These systems don't actually have a C or math library (as such)
-           continue
-           ;;
-         *-*-mingw* | *-*-os2*)
-           # These systems don't actually have a C library (as such)
-           test "X$arg" = "X-lc" && continue
-           ;;
-         *-*-openbsd* | *-*-freebsd*)
-           # Do not include libc due to us having libc/libc_r.
-           test "X$arg" = "X-lc" && continue
-           ;;
-         *-*-rhapsody* | *-*-darwin1.[012])
-           # Rhapsody C and math libraries are in the System framework
-           deplibs="$deplibs -framework System"
-           continue
-         esac
-       elif test "X$arg" = "X-lc_r"; then
-        case $host in
-        *-*-openbsd* | *-*-freebsd*)
-          # Do not include libc_r directly, use -pthread flag.
-          continue
-          ;;
-        esac
-       fi
-       deplibs="$deplibs $arg"
-       continue
-       ;;
-
-     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
-       deplibs="$deplibs $arg"
-       continue
-       ;;
-
-      -module)
-       module=yes
-       continue
-       ;;
-
-      # gcc -m* arguments should be passed to the linker via $compiler_flags
-      # in order to pass architecture information to the linker
-      # (e.g. 32 vs 64-bit).  This may also be accomplished via -Wl,-mfoo
-      # but this is not reliable with gcc because gcc may use -mfoo to
-      # select a different linker, different libraries, etc, while
-      # -Wl,-mfoo simply passes -mfoo to the linker.
-      -m*)
-       # Unknown arguments in both finalize_command and compile_command need
-       # to be aesthetically quoted because they are evaled later.
-       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-       case $arg in
-       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
-         arg="\"$arg\""
-         ;;
-       esac
-        compile_command="$compile_command $arg"
-        finalize_command="$finalize_command $arg"
-        if test "$with_gcc" = "yes" ; then
-          compiler_flags="$compiler_flags $arg"
-        fi
-        continue
-        ;;
-
-      -shrext)
-       prev=shrext
-       continue
-       ;;
-
-      -no-fast-install)
-       fast_install=no
-       continue
-       ;;
-
-      -no-install)
-       case $host in
-       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-         # The PATH hackery in wrapper scripts is required on Windows
-         # in order for the loader to find any dlls it needs.
-         $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
-         $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
-         fast_install=no
-         ;;
-       *) no_install=yes ;;
-       esac
-       continue
-       ;;
-
-      -no-undefined)
-       allow_undefined=no
-       continue
-       ;;
-
-      -objectlist)
-       prev=objectlist
-       continue
-       ;;
-
-      -o) prev=output ;;
-
-      -precious-files-regex)
-       prev=precious_regex
-       continue
-       ;;
-
-      -release)
-       prev=release
-       continue
-       ;;
-
-      -rpath)
-       prev=rpath
-       continue
-       ;;
-
-      -R)
-       prev=xrpath
-       continue
-       ;;
-
-      -R*)
-       dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
-       # We need an absolute path.
-       case $dir in
-       [\\/]* | [A-Za-z]:[\\/]*) ;;
-       *)
-         $echo "$modename: only absolute run-paths are allowed" 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
-       case "$xrpath " in
-       *" $dir "*) ;;
-       *) xrpath="$xrpath $dir" ;;
-       esac
-       continue
-       ;;
-
-      -static)
-       # The effects of -static are defined in a previous loop.
-       # We used to do the same as -all-static on platforms that
-       # didn't have a PIC flag, but the assumption that the effects
-       # would be equivalent was wrong.  It would break on at least
-       # Digital Unix and AIX.
-       continue
-       ;;
-
-      -thread-safe)
-       thread_safe=yes
-       continue
-       ;;
-
-      -version-info)
-       prev=vinfo
-       continue
-       ;;
-      -version-number)
-       prev=vinfo
-       vinfo_number=yes
-       continue
-       ;;
-
-      -Wc,*)
-       args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
-       arg=
-       save_ifs="$IFS"; IFS=','
-       for flag in $args; do
-         IFS="$save_ifs"
-         case $flag in
-           *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
-           flag="\"$flag\""
-           ;;
-         esac
-         arg="$arg $wl$flag"
-         compiler_flags="$compiler_flags $flag"
-       done
-       IFS="$save_ifs"
-       arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
-       ;;
-
-      -Wl,*)
-       args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
-       arg=
-       save_ifs="$IFS"; IFS=','
-       for flag in $args; do
-         IFS="$save_ifs"
-         case $flag in
-           *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
-           flag="\"$flag\""
-           ;;
-         esac
-         arg="$arg $wl$flag"
-         compiler_flags="$compiler_flags $wl$flag"
-         linker_flags="$linker_flags $flag"
-       done
-       IFS="$save_ifs"
-       arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
-       ;;
-
-      -Xcompiler)
-       prev=xcompiler
-       continue
-       ;;
-
-      -Xlinker)
-       prev=xlinker
-       continue
-       ;;
-
-      -XCClinker)
-       prev=xcclinker
-       continue
-       ;;
-
-      # Some other compiler flag.
-      -* | +*)
-       # Unknown arguments in both finalize_command and compile_command need
-       # to be aesthetically quoted because they are evaled later.
-       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-       case $arg in
-       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
-         arg="\"$arg\""
-         ;;
-       esac
-       ;;
-
-      *.$objext)
-       # A standard object.
-       objs="$objs $arg"
-       ;;
-
-      *.lo)
-       # A libtool-controlled object.
-
-       # Check to see that this really is a libtool object.
-       if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-         pic_object=
-         non_pic_object=
-
-         # Read the .lo file
-         # If there is no directory component, then add one.
-         case $arg in
-         */* | *\\*) . $arg ;;
-         *) . ./$arg ;;
-         esac
-
-         if test -z "$pic_object" || \
-            test -z "$non_pic_object" ||
-            test "$pic_object" = none && \
-            test "$non_pic_object" = none; then
-           $echo "$modename: cannot find name of object for \`$arg'" 1>&2
-           exit $EXIT_FAILURE
-         fi
-
-         # Extract subdirectory from the argument.
-         xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-         if test "X$xdir" = "X$arg"; then
-           xdir=
-         else
-           xdir="$xdir/"
-         fi
-
-         if test "$pic_object" != none; then
-           # Prepend the subdirectory the object is found in.
-           pic_object="$xdir$pic_object"
-
-           if test "$prev" = dlfiles; then
-             if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-               dlfiles="$dlfiles $pic_object"
-               prev=
-               continue
-             else
-               # If libtool objects are unsupported, then we need to preload.
-               prev=dlprefiles
-             fi
-           fi
-
-           # CHECK ME:  I think I busted this.  -Ossama
-           if test "$prev" = dlprefiles; then
-             # Preload the old-style object.
-             dlprefiles="$dlprefiles $pic_object"
-             prev=
-           fi
-
-           # A PIC object.
-           libobjs="$libobjs $pic_object"
-           arg="$pic_object"
-         fi
-
-         # Non-PIC object.
-         if test "$non_pic_object" != none; then
-           # Prepend the subdirectory the object is found in.
-           non_pic_object="$xdir$non_pic_object"
-
-           # A standard non-PIC object
-           non_pic_objects="$non_pic_objects $non_pic_object"
-           if test -z "$pic_object" || test "$pic_object" = none ; then
-             arg="$non_pic_object"
-           fi
-         fi
-       else
-         # Only an error if not doing a dry-run.
-         if test -z "$run"; then
-           $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
-           exit $EXIT_FAILURE
-         else
-           # Dry-run case.
-
-           # Extract subdirectory from the argument.
-           xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-           if test "X$xdir" = "X$arg"; then
-             xdir=
-           else
-             xdir="$xdir/"
-           fi
-
-           pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
-           non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
-           libobjs="$libobjs $pic_object"
-           non_pic_objects="$non_pic_objects $non_pic_object"
-         fi
-       fi
-       ;;
-
-      *.$libext)
-       # An archive.
-       deplibs="$deplibs $arg"
-       old_deplibs="$old_deplibs $arg"
-       continue
-       ;;
-
-      *.la)
-       # A libtool-controlled library.
-
-       if test "$prev" = dlfiles; then
-         # This library was specified with -dlopen.
-         dlfiles="$dlfiles $arg"
-         prev=
-       elif test "$prev" = dlprefiles; then
-         # The library was specified with -dlpreopen.
-         dlprefiles="$dlprefiles $arg"
-         prev=
-       else
-         deplibs="$deplibs $arg"
-       fi
-       continue
-       ;;
-
-      # Some other compiler argument.
-      *)
-       # Unknown arguments in both finalize_command and compile_command need
-       # to be aesthetically quoted because they are evaled later.
-       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-       case $arg in
-       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
-         arg="\"$arg\""
-         ;;
-       esac
-       ;;
-      esac # arg
-
-      # Now actually substitute the argument into the commands.
-      if test -n "$arg"; then
-       compile_command="$compile_command $arg"
-       finalize_command="$finalize_command $arg"
-      fi
-    done # argument parsing loop
-
-    if test -n "$prev"; then
-      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
-
-    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
-      eval arg=\"$export_dynamic_flag_spec\"
-      compile_command="$compile_command $arg"
-      finalize_command="$finalize_command $arg"
-    fi
-
-    oldlibs=
-    # calculate the name of the file, without its directory
-    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
-    libobjs_save="$libobjs"
-
-    if test -n "$shlibpath_var"; then
-      # get the directories listed in $shlibpath_var
-      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
-    else
-      shlib_search_path=
-    fi
-    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
-    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
-
-    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
-    if test "X$output_objdir" = "X$output"; then
-      output_objdir="$objdir"
-    else
-      output_objdir="$output_objdir/$objdir"
-    fi
-    # Create the object directory.
-    if test ! -d "$output_objdir"; then
-      $show "$mkdir $output_objdir"
-      $run $mkdir $output_objdir
-      status=$?
-      if test "$status" -ne 0 && test ! -d "$output_objdir"; then
-       exit $status
-      fi
-    fi
-
-    # Determine the type of output
-    case $output in
-    "")
-      $echo "$modename: you must specify an output file" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-      ;;
-    *.$libext) linkmode=oldlib ;;
-    *.lo | *.$objext) linkmode=obj ;;
-    *.la) linkmode=lib ;;
-    *) linkmode=prog ;; # Anything else should be a program.
-    esac
-
-    case $host in
-    *cygwin* | *mingw* | *pw32*)
-      # don't eliminate duplications in $postdeps and $predeps
-      duplicate_compiler_generated_deps=yes
-      ;;
-    *)
-      duplicate_compiler_generated_deps=$duplicate_deps
-      ;;
-    esac
-    specialdeplibs=
-
-    libs=
-    # Find all interdependent deplibs by searching for libraries
-    # that are linked more than once (e.g. -la -lb -la)
-    for deplib in $deplibs; do
-      if test "X$duplicate_deps" = "Xyes" ; then
-       case "$libs " in
-       *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-       esac
-      fi
-      libs="$libs $deplib"
-    done
-
-    if test "$linkmode" = lib; then
-      libs="$predeps $libs $compiler_lib_search_path $postdeps"
-
-      # Compute libraries that are listed more than once in $predeps
-      # $postdeps and mark them as special (i.e., whose duplicates are
-      # not to be eliminated).
-      pre_post_deps=
-      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
-       for pre_post_dep in $predeps $postdeps; do
-         case "$pre_post_deps " in
-         *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
-         esac
-         pre_post_deps="$pre_post_deps $pre_post_dep"
-       done
-      fi
-      pre_post_deps=
-    fi
-
-    deplibs=
-    newdependency_libs=
-    newlib_search_path=
-    need_relink=no # whether we're linking any uninstalled libtool libraries
-    notinst_deplibs= # not-installed libtool libraries
-    notinst_path= # paths that contain not-installed libtool libraries
-    case $linkmode in
-    lib)
-       passes="conv link"
-       for file in $dlfiles $dlprefiles; do
-         case $file in
-         *.la) ;;
-         *)
-           $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
-           exit $EXIT_FAILURE
-           ;;
-         esac
-       done
-       ;;
-    prog)
-       compile_deplibs=
-       finalize_deplibs=
-       alldeplibs=no
-       newdlfiles=
-       newdlprefiles=
-       passes="conv scan dlopen dlpreopen link"
-       ;;
-    *)  passes="conv"
-       ;;
-    esac
-    for pass in $passes; do
-      if test "$linkmode,$pass" = "lib,link" ||
-        test "$linkmode,$pass" = "prog,scan"; then
-       libs="$deplibs"
-       deplibs=
-      fi
-      if test "$linkmode" = prog; then
-       case $pass in
-       dlopen) libs="$dlfiles" ;;
-       dlpreopen) libs="$dlprefiles" ;;
-       link)
-         libs="$deplibs %DEPLIBS%"
-         test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
-         ;;
-       esac
-      fi
-      if test "$pass" = dlopen; then
-       # Collect dlpreopened libraries
-       save_deplibs="$deplibs"
-       deplibs=
-      fi
-      for deplib in $libs; do
-       lib=
-       found=no
-       case $deplib in
-       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
-         if test "$linkmode,$pass" = "prog,link"; then
-           compile_deplibs="$deplib $compile_deplibs"
-           finalize_deplibs="$deplib $finalize_deplibs"
-         else
-           deplibs="$deplib $deplibs"
-         fi
-         continue
-         ;;
-       -l*)
-         if test "$linkmode" != lib && test "$linkmode" != prog; then
-           $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
-           continue
-         fi
-         name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
-         for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
-           for search_ext in .la $std_shrext .so .a; do
-             # Search the libtool library
-             lib="$searchdir/lib${name}${search_ext}"
-             if test -f "$lib"; then
-               if test "$search_ext" = ".la"; then
-                 found=yes
-               else
-                 found=no
-               fi
-               break 2
-             fi
-           done
-         done
-         if test "$found" != yes; then
-           # deplib doesn't seem to be a libtool library
-           if test "$linkmode,$pass" = "prog,link"; then
-             compile_deplibs="$deplib $compile_deplibs"
-             finalize_deplibs="$deplib $finalize_deplibs"
-           else
-             deplibs="$deplib $deplibs"
-             test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
-           fi
-           continue
-         else # deplib is a libtool library
-           # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
-           # We need to do some special things here, and not later.
-           if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-             case " $predeps $postdeps " in
-             *" $deplib "*)
-               if (${SED} -e '2q' $lib |
-                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-                 library_names=
-                 old_library=
-                 case $lib in
-                 */* | *\\*) . $lib ;;
-                 *) . ./$lib ;;
-                 esac
-                 for l in $old_library $library_names; do
-                   ll="$l"
-                 done
-                 if test "X$ll" = "X$old_library" ; then # only static version available
-                   found=no
-                   ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
-                   test "X$ladir" = "X$lib" && ladir="."
-                   lib=$ladir/$old_library
-                   if test "$linkmode,$pass" = "prog,link"; then
-                     compile_deplibs="$deplib $compile_deplibs"
-                     finalize_deplibs="$deplib $finalize_deplibs"
-                   else
-                     deplibs="$deplib $deplibs"
-                     test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
-                   fi
-                   continue
-                 fi
-               fi
-               ;;
-             *) ;;
-             esac
-           fi
-         fi
-         ;; # -l
-       -L*)
-         case $linkmode in
-         lib)
-           deplibs="$deplib $deplibs"
-           test "$pass" = conv && continue
-           newdependency_libs="$deplib $newdependency_libs"
-           newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
-           ;;
-         prog)
-           if test "$pass" = conv; then
-             deplibs="$deplib $deplibs"
-             continue
-           fi
-           if test "$pass" = scan; then
-             deplibs="$deplib $deplibs"
-           else
-             compile_deplibs="$deplib $compile_deplibs"
-             finalize_deplibs="$deplib $finalize_deplibs"
-           fi
-           newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
-           ;;
-         *)
-           $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
-           ;;
-         esac # linkmode
-         continue
-         ;; # -L
-       -R*)
-         if test "$pass" = link; then
-           dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
-           # Make sure the xrpath contains only unique directories.
-           case "$xrpath " in
-           *" $dir "*) ;;
-           *) xrpath="$xrpath $dir" ;;
-           esac
-         fi
-         deplibs="$deplib $deplibs"
-         continue
-         ;;
-       *.la) lib="$deplib" ;;
-       *.$libext)
-         if test "$pass" = conv; then
-           deplibs="$deplib $deplibs"
-           continue
-         fi
-         case $linkmode in
-         lib)
-           if test "$deplibs_check_method" != pass_all; then
-             $echo
-             $echo "*** Warning: Trying to link with static lib archive $deplib."
-             $echo "*** I have the capability to make that library automatically link in when"
-             $echo "*** you link to this library.  But I can only do this if you have a"
-             $echo "*** shared version of the library, which you do not appear to have"
-             $echo "*** because the file extensions .$libext of this argument makes me believe"
-             $echo "*** that it is just a static archive that I should not used here."
-           else
-             $echo
-             $echo "*** Warning: Linking the shared library $output against the"
-             $echo "*** static library $deplib is not portable!"
-             deplibs="$deplib $deplibs"
-           fi
-           continue
-           ;;
-         prog)
-           if test "$pass" != link; then
-             deplibs="$deplib $deplibs"
-           else
-             compile_deplibs="$deplib $compile_deplibs"
-             finalize_deplibs="$deplib $finalize_deplibs"
-           fi
-           continue
-           ;;
-         esac # linkmode
-         ;; # *.$libext
-       *.lo | *.$objext)
-         if test "$pass" = conv; then
-           deplibs="$deplib $deplibs"
-         elif test "$linkmode" = prog; then
-           if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
-             # If there is no dlopen support or we're linking statically,
-             # we need to preload.
-             newdlprefiles="$newdlprefiles $deplib"
-             compile_deplibs="$deplib $compile_deplibs"
-             finalize_deplibs="$deplib $finalize_deplibs"
-           else
-             newdlfiles="$newdlfiles $deplib"
-           fi
-         fi
-         continue
-         ;;
-       %DEPLIBS%)
-         alldeplibs=yes
-         continue
-         ;;
-       esac # case $deplib
-       if test "$found" = yes || test -f "$lib"; then :
-       else
-         $echo "$modename: cannot find the library \`$lib'" 1>&2
-         exit $EXIT_FAILURE
-       fi
-
-       # Check to see that this really is a libtool archive.
-       if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-       else
-         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-         exit $EXIT_FAILURE
-       fi
-
-       ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
-       test "X$ladir" = "X$lib" && ladir="."
-
-       dlname=
-       dlopen=
-       dlpreopen=
-       libdir=
-       library_names=
-       old_library=
-       # If the library was installed with an old release of libtool,
-       # it will not redefine variables installed, or shouldnotlink
-       installed=yes
-       shouldnotlink=no
-
-       # Read the .la file
-       case $lib in
-       */* | *\\*) . $lib ;;
-       *) . ./$lib ;;
-       esac
-
-       if test "$linkmode,$pass" = "lib,link" ||
-          test "$linkmode,$pass" = "prog,scan" ||
-          { test "$linkmode" != prog && test "$linkmode" != lib; }; then
-         test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
-         test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
-       fi
-
-       if test "$pass" = conv; then
-         # Only check for convenience libraries
-         deplibs="$lib $deplibs"
-         if test -z "$libdir"; then
-           if test -z "$old_library"; then
-             $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
-             exit $EXIT_FAILURE
-           fi
-           # It is a libtool convenience library, so add in its objects.
-           convenience="$convenience $ladir/$objdir/$old_library"
-           old_convenience="$old_convenience $ladir/$objdir/$old_library"
-           tmp_libs=
-           for deplib in $dependency_libs; do
-             deplibs="$deplib $deplibs"
-              if test "X$duplicate_deps" = "Xyes" ; then
-               case "$tmp_libs " in
-               *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-               esac
-              fi
-             tmp_libs="$tmp_libs $deplib"
-           done
-         elif test "$linkmode" != prog && test "$linkmode" != lib; then
-           $echo "$modename: \`$lib' is not a convenience library" 1>&2
-           exit $EXIT_FAILURE
-         fi
-         continue
-       fi # $pass = conv
-
-
-       # Get the name of the library we link against.
-       linklib=
-       for l in $old_library $library_names; do
-         linklib="$l"
-       done
-       if test -z "$linklib"; then
-         $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
-         exit $EXIT_FAILURE
-       fi
-
-       # This library was specified with -dlopen.
-       if test "$pass" = dlopen; then
-         if test -z "$libdir"; then
-           $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
-           exit $EXIT_FAILURE
-         fi
-         if test -z "$dlname" ||
-            test "$dlopen_support" != yes ||
-            test "$build_libtool_libs" = no; then
-           # If there is no dlname, no dlopen support or we're linking
-           # statically, we need to preload.  We also need to preload any
-           # dependent libraries so libltdl's deplib preloader doesn't
-           # bomb out in the load deplibs phase.
-           dlprefiles="$dlprefiles $lib $dependency_libs"
-         else
-           newdlfiles="$newdlfiles $lib"
-         fi
-         continue
-       fi # $pass = dlopen
-
-       # We need an absolute path.
-       case $ladir in
-       [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
-       *)
-         abs_ladir=`cd "$ladir" && pwd`
-         if test -z "$abs_ladir"; then
-           $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
-           $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
-           abs_ladir="$ladir"
-         fi
-         ;;
-       esac
-       laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-
-       # Find the relevant object directory and library name.
-       if test "X$installed" = Xyes; then
-         if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-           $echo "$modename: warning: library \`$lib' was moved." 1>&2
-           dir="$ladir"
-           absdir="$abs_ladir"
-           libdir="$abs_ladir"
-         else
-           dir="$libdir"
-           absdir="$libdir"
-         fi
-       else
-         dir="$ladir/$objdir"
-         absdir="$abs_ladir/$objdir"
-         # Remove this search path later
-         notinst_path="$notinst_path $abs_ladir"
-       fi # $installed = yes
-       name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
-
-       # This library was specified with -dlpreopen.
-       if test "$pass" = dlpreopen; then
-         if test -z "$libdir"; then
-           $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
-           exit $EXIT_FAILURE
-         fi
-         # Prefer using a static library (so that no silly _DYNAMIC symbols
-         # are required to link).
-         if test -n "$old_library"; then
-           newdlprefiles="$newdlprefiles $dir/$old_library"
-         # Otherwise, use the dlname, so that lt_dlopen finds it.
-         elif test -n "$dlname"; then
-           newdlprefiles="$newdlprefiles $dir/$dlname"
-         else
-           newdlprefiles="$newdlprefiles $dir/$linklib"
-         fi
-       fi # $pass = dlpreopen
-
-       if test -z "$libdir"; then
-         # Link the convenience library
-         if test "$linkmode" = lib; then
-           deplibs="$dir/$old_library $deplibs"
-         elif test "$linkmode,$pass" = "prog,link"; then
-           compile_deplibs="$dir/$old_library $compile_deplibs"
-           finalize_deplibs="$dir/$old_library $finalize_deplibs"
-         else
-           deplibs="$lib $deplibs" # used for prog,scan pass
-         fi
-         continue
-       fi
-
-
-       if test "$linkmode" = prog && test "$pass" != link; then
-         newlib_search_path="$newlib_search_path $ladir"
-         deplibs="$lib $deplibs"
-
-         linkalldeplibs=no
-         if test "$link_all_deplibs" != no || test -z "$library_names" ||
-            test "$build_libtool_libs" = no; then
-           linkalldeplibs=yes
-         fi
-
-         tmp_libs=
-         for deplib in $dependency_libs; do
-           case $deplib in
-           -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
-           esac
-           # Need to link against all dependency_libs?
-           if test "$linkalldeplibs" = yes; then
-             deplibs="$deplib $deplibs"
-           else
-             # Need to hardcode shared library paths
-             # or/and link against static libraries
-             newdependency_libs="$deplib $newdependency_libs"
-           fi
-           if test "X$duplicate_deps" = "Xyes" ; then
-             case "$tmp_libs " in
-             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-             esac
-           fi
-           tmp_libs="$tmp_libs $deplib"
-         done # for deplib
-         continue
-       fi # $linkmode = prog...
-
-       if test "$linkmode,$pass" = "prog,link"; then
-         if test -n "$library_names" &&
-            { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
-           # We need to hardcode the library path
-           if test -n "$shlibpath_var"; then
-             # Make sure the rpath contains only unique directories.
-             case "$temp_rpath " in
-             *" $dir "*) ;;
-             *" $absdir "*) ;;
-             *) temp_rpath="$temp_rpath $dir" ;;
-             esac
-           fi
-
-           # Hardcode the library path.
-           # Skip directories that are in the system default run-time
-           # search path.
-           case " $sys_lib_dlsearch_path " in
-           *" $absdir "*) ;;
-           *)
-             case "$compile_rpath " in
-             *" $absdir "*) ;;
-             *) compile_rpath="$compile_rpath $absdir"
-             esac
-             ;;
-           esac
-           case " $sys_lib_dlsearch_path " in
-           *" $libdir "*) ;;
-           *)
-             case "$finalize_rpath " in
-             *" $libdir "*) ;;
-             *) finalize_rpath="$finalize_rpath $libdir"
-             esac
-             ;;
-           esac
-         fi # $linkmode,$pass = prog,link...
-
-         if test "$alldeplibs" = yes &&
-            { test "$deplibs_check_method" = pass_all ||
-              { test "$build_libtool_libs" = yes &&
-                test -n "$library_names"; }; }; then
-           # We only need to search for static libraries
-           continue
-         fi
-       fi
-
-       link_static=no # Whether the deplib will be linked statically
-       if test -n "$library_names" &&
-          { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
-         if test "$installed" = no; then
-           notinst_deplibs="$notinst_deplibs $lib"
-           need_relink=yes
-         fi
-         # This is a shared library
-
-         # Warn about portability, can't link against -module's on
-         # some systems (darwin)
-         if test "$shouldnotlink" = yes && test "$pass" = link ; then
-           $echo
-           if test "$linkmode" = prog; then
-             $echo "*** Warning: Linking the executable $output against the loadable module"
-           else
-             $echo "*** Warning: Linking the shared library $output against the loadable module"
-           fi
-           $echo "*** $linklib is not portable!"
-         fi
-         if test "$linkmode" = lib &&
-            test "$hardcode_into_libs" = yes; then
-           # Hardcode the library path.
-           # Skip directories that are in the system default run-time
-           # search path.
-           case " $sys_lib_dlsearch_path " in
-           *" $absdir "*) ;;
-           *)
-             case "$compile_rpath " in
-             *" $absdir "*) ;;
-             *) compile_rpath="$compile_rpath $absdir"
-             esac
-             ;;
-           esac
-           case " $sys_lib_dlsearch_path " in
-           *" $libdir "*) ;;
-           *)
-             case "$finalize_rpath " in
-             *" $libdir "*) ;;
-             *) finalize_rpath="$finalize_rpath $libdir"
-             esac
-             ;;
-           esac
-         fi
-
-         if test -n "$old_archive_from_expsyms_cmds"; then
-           # figure out the soname
-           set dummy $library_names
-           realname="$2"
-           shift; shift
-           libname=`eval \\$echo \"$libname_spec\"`
-           # use dlname if we got it. it's perfectly good, no?
-           if test -n "$dlname"; then
-             soname="$dlname"
-           elif test -n "$soname_spec"; then
-             # bleh windows
-             case $host in
-             *cygwin* | mingw*)
-               major=`expr $current - $age`
-               versuffix="-$major"
-               ;;
-             esac
-             eval soname=\"$soname_spec\"
-           else
-             soname="$realname"
-           fi
-
-           # Make a new name for the extract_expsyms_cmds to use
-           soroot="$soname"
-           soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
-           newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
-
-           # If the library has no export list, then create one now
-           if test -f "$output_objdir/$soname-def"; then :
-           else
-             $show "extracting exported symbol list from \`$soname'"
-             save_ifs="$IFS"; IFS='~'
-             cmds=$extract_expsyms_cmds
-             for cmd in $cmds; do
-               IFS="$save_ifs"
-               eval cmd=\"$cmd\"
-               $show "$cmd"
-               $run eval "$cmd" || exit $?
-             done
-             IFS="$save_ifs"
-           fi
-
-           # Create $newlib
-           if test -f "$output_objdir/$newlib"; then :; else
-             $show "generating import library for \`$soname'"
-             save_ifs="$IFS"; IFS='~'
-             cmds=$old_archive_from_expsyms_cmds
-             for cmd in $cmds; do
-               IFS="$save_ifs"
-               eval cmd=\"$cmd\"
-               $show "$cmd"
-               $run eval "$cmd" || exit $?
-             done
-             IFS="$save_ifs"
-           fi
-           # make sure the library variables are pointing to the new library
-           dir=$output_objdir
-           linklib=$newlib
-         fi # test -n "$old_archive_from_expsyms_cmds"
-
-         if test "$linkmode" = prog || test "$mode" != relink; then
-           add_shlibpath=
-           add_dir=
-           add=
-           lib_linked=yes
-           case $hardcode_action in
-           immediate | unsupported)
-             if test "$hardcode_direct" = no; then
-               add="$dir/$linklib"
-               case $host in
-                 *-*-sco3.2v5* ) add_dir="-L$dir" ;;
-                 *-*-darwin* )
-                   # if the lib is a module then we can not link against
-                   # it, someone is ignoring the new warnings I added
-                   if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
-                     $echo "** Warning, lib $linklib is a module, not a shared library"
-                     if test -z "$old_library" ; then
-                       $echo
-                       $echo "** And there doesn't seem to be a static archive available"
-                       $echo "** The link will probably fail, sorry"
-                     else
-                       add="$dir/$old_library"
-                     fi
-                   fi
-               esac
-             elif test "$hardcode_minus_L" = no; then
-               case $host in
-               *-*-sunos*) add_shlibpath="$dir" ;;
-               esac
-               add_dir="-L$dir"
-               add="-l$name"
-             elif test "$hardcode_shlibpath_var" = no; then
-               add_shlibpath="$dir"
-               add="-l$name"
-             else
-               lib_linked=no
-             fi
-             ;;
-           relink)
-             if test "$hardcode_direct" = yes; then
-               add="$dir/$linklib"
-             elif test "$hardcode_minus_L" = yes; then
-               add_dir="-L$dir"
-               # Try looking first in the location we're being installed to.
-               if test -n "$inst_prefix_dir"; then
-                 case "$libdir" in
-                   [\\/]*)
-                     add_dir="$add_dir -L$inst_prefix_dir$libdir"
-                     ;;
-                 esac
-               fi
-               add="-l$name"
-             elif test "$hardcode_shlibpath_var" = yes; then
-               add_shlibpath="$dir"
-               add="-l$name"
-             else
-               lib_linked=no
-             fi
-             ;;
-           *) lib_linked=no ;;
-           esac
-
-           if test "$lib_linked" != yes; then
-             $echo "$modename: configuration error: unsupported hardcode properties"
-             exit $EXIT_FAILURE
-           fi
-
-           if test -n "$add_shlibpath"; then
-             case :$compile_shlibpath: in
-             *":$add_shlibpath:"*) ;;
-             *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
-             esac
-           fi
-           if test "$linkmode" = prog; then
-             test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
-             test -n "$add" && compile_deplibs="$add $compile_deplibs"
-           else
-             test -n "$add_dir" && deplibs="$add_dir $deplibs"
-             test -n "$add" && deplibs="$add $deplibs"
-             if test "$hardcode_direct" != yes && \
-                test "$hardcode_minus_L" != yes && \
-                test "$hardcode_shlibpath_var" = yes; then
-               case :$finalize_shlibpath: in
-               *":$libdir:"*) ;;
-               *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
-               esac
-             fi
-           fi
-         fi
-
-         if test "$linkmode" = prog || test "$mode" = relink; then
-           add_shlibpath=
-           add_dir=
-           add=
-           # Finalize command for both is simple: just hardcode it.
-           if test "$hardcode_direct" = yes; then
-             add="$libdir/$linklib"
-           elif test "$hardcode_minus_L" = yes; then
-             add_dir="-L$libdir"
-             add="-l$name"
-           elif test "$hardcode_shlibpath_var" = yes; then
-             case :$finalize_shlibpath: in
-             *":$libdir:"*) ;;
-             *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
-             esac
-             add="-l$name"
-           elif test "$hardcode_automatic" = yes; then
-             if test -n "$inst_prefix_dir" &&
-                test -f "$inst_prefix_dir$libdir/$linklib" ; then
-               add="$inst_prefix_dir$libdir/$linklib"
-             else
-               add="$libdir/$linklib"
-             fi
-           else
-             # We cannot seem to hardcode it, guess we'll fake it.
-             add_dir="-L$libdir"
-             # Try looking first in the location we're being installed to.
-             if test -n "$inst_prefix_dir"; then
-               case "$libdir" in
-                 [\\/]*)
-                   add_dir="$add_dir -L$inst_prefix_dir$libdir"
-                   ;;
-               esac
-             fi
-             add="-l$name"
-           fi
-
-           if test "$linkmode" = prog; then
-             test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
-             test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
-           else
-             test -n "$add_dir" && deplibs="$add_dir $deplibs"
-             test -n "$add" && deplibs="$add $deplibs"
-           fi
-         fi
-       elif test "$linkmode" = prog; then
-         # Here we assume that one of hardcode_direct or hardcode_minus_L
-         # is not unsupported.  This is valid on all known static and
-         # shared platforms.
-         if test "$hardcode_direct" != unsupported; then
-           test -n "$old_library" && linklib="$old_library"
-           compile_deplibs="$dir/$linklib $compile_deplibs"
-           finalize_deplibs="$dir/$linklib $finalize_deplibs"
-         else
-           compile_deplibs="-l$name -L$dir $compile_deplibs"
-           finalize_deplibs="-l$name -L$dir $finalize_deplibs"
-         fi
-       elif test "$build_libtool_libs" = yes; then
-         # Not a shared library
-         if test "$deplibs_check_method" != pass_all; then
-           # We're trying link a shared library against a static one
-           # but the system doesn't support it.
-
-           # Just print a warning and add the library to dependency_libs so
-           # that the program can be linked against the static library.
-           $echo
-           $echo "*** Warning: This system can not link to static lib archive $lib."
-           $echo "*** I have the capability to make that library automatically link in when"
-           $echo "*** you link to this library.  But I can only do this if you have a"
-           $echo "*** shared version of the library, which you do not appear to have."
-           if test "$module" = yes; then
-             $echo "*** But as you try to build a module library, libtool will still create "
-             $echo "*** a static module, that should work as long as the dlopening application"
-             $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
-             if test -z "$global_symbol_pipe"; then
-               $echo
-               $echo "*** However, this would only work if libtool was able to extract symbol"
-               $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
-               $echo "*** not find such a program.  So, this module is probably useless."
-               $echo "*** \`nm' from GNU binutils and a full rebuild may help."
-             fi
-             if test "$build_old_libs" = no; then
-               build_libtool_libs=module
-               build_old_libs=yes
-             else
-               build_libtool_libs=no
-             fi
-           fi
-         else
-           convenience="$convenience $dir/$old_library"
-           old_convenience="$old_convenience $dir/$old_library"
-           deplibs="$dir/$old_library $deplibs"
-           link_static=yes
-         fi
-       fi # link shared/static library?
-
-       if test "$linkmode" = lib; then
-         if test -n "$dependency_libs" &&
-            { test "$hardcode_into_libs" != yes ||
-              test "$build_old_libs" = yes ||
-              test "$link_static" = yes; }; then
-           # Extract -R from dependency_libs
-           temp_deplibs=
-           for libdir in $dependency_libs; do
-             case $libdir in
-             -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
-                  case " $xrpath " in
-                  *" $temp_xrpath "*) ;;
-                  *) xrpath="$xrpath $temp_xrpath";;
-                  esac;;
-             *) temp_deplibs="$temp_deplibs $libdir";;
-             esac
-           done
-           dependency_libs="$temp_deplibs"
-         fi
-
-         newlib_search_path="$newlib_search_path $absdir"
-         # Link against this library
-         test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
-         # ... and its dependency_libs
-         tmp_libs=
-         for deplib in $dependency_libs; do
-           newdependency_libs="$deplib $newdependency_libs"
-           if test "X$duplicate_deps" = "Xyes" ; then
-             case "$tmp_libs " in
-             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-             esac
-           fi
-           tmp_libs="$tmp_libs $deplib"
-         done
-
-         if test "$link_all_deplibs" != no; then
-           # Add the search paths of all dependency libraries
-           for deplib in $dependency_libs; do
-             case $deplib in
-             -L*) path="$deplib" ;;
-             *.la)
-               dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
-               test "X$dir" = "X$deplib" && dir="."
-               # We need an absolute path.
-               case $dir in
-               [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
-               *)
-                 absdir=`cd "$dir" && pwd`
-                 if test -z "$absdir"; then
-                   $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
-                   absdir="$dir"
-                 fi
-                 ;;
-               esac
-               if grep "^installed=no" $deplib > /dev/null; then
-                 path="$absdir/$objdir"
-               else
-                 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
-                 if test -z "$libdir"; then
-                   $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
-                   exit $EXIT_FAILURE
-                 fi
-                 if test "$absdir" != "$libdir"; then
-                   $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
-                 fi
-                 path="$absdir"
-               fi
-               depdepl=
-               case $host in
-               *-*-darwin*)
-                 # we do not want to link against static libs,
-                 # but need to link against shared
-                 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
-                 if test -n "$deplibrary_names" ; then
-                   for tmp in $deplibrary_names ; do
-                     depdepl=$tmp
-                   done
-                   if test -f "$path/$depdepl" ; then
-                     depdepl="$path/$depdepl"
-                   fi
-                   # do not add paths which are already there
-                   case " $newlib_search_path " in
-                   *" $path "*) ;;
-                   *) newlib_search_path="$newlib_search_path $path";;
-                   esac
-                 fi
-                 path=""
-                 ;;
-               *)
-                 path="-L$path"
-                 ;;
-               esac
-               ;;
-             -l*)
-               case $host in
-               *-*-darwin*)
-                 # Again, we only want to link against shared libraries
-                 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
-                 for tmp in $newlib_search_path ; do
-                   if test -f "$tmp/lib$tmp_libs.dylib" ; then
-                     eval depdepl="$tmp/lib$tmp_libs.dylib"
-                     break
-                   fi
-                 done
-                 path=""
-                 ;;
-               *) continue ;;
-               esac
-               ;;
-             *) continue ;;
-             esac
-             case " $deplibs " in
-             *" $depdepl "*) ;;
-             *) deplibs="$depdepl $deplibs" ;;
-             esac
-             case " $deplibs " in
-             *" $path "*) ;;
-             *) deplibs="$deplibs $path" ;;
-             esac
-           done
-         fi # link_all_deplibs != no
-       fi # linkmode = lib
-      done # for deplib in $libs
-      dependency_libs="$newdependency_libs"
-      if test "$pass" = dlpreopen; then
-       # Link the dlpreopened libraries before other libraries
-       for deplib in $save_deplibs; do
-         deplibs="$deplib $deplibs"
-       done
-      fi
-      if test "$pass" != dlopen; then
-       if test "$pass" != conv; then
-         # Make sure lib_search_path contains only unique directories.
-         lib_search_path=
-         for dir in $newlib_search_path; do
-           case "$lib_search_path " in
-           *" $dir "*) ;;
-           *) lib_search_path="$lib_search_path $dir" ;;
-           esac
-         done
-         newlib_search_path=
-       fi
-
-       if test "$linkmode,$pass" != "prog,link"; then
-         vars="deplibs"
-       else
-         vars="compile_deplibs finalize_deplibs"
-       fi
-       for var in $vars dependency_libs; do
-         # Add libraries to $var in reverse order
-         eval tmp_libs=\"\$$var\"
-         new_libs=
-         for deplib in $tmp_libs; do
-           # FIXME: Pedantically, this is the right thing to do, so
-           #        that some nasty dependency loop isn't accidentally
-           #        broken:
-           #new_libs="$deplib $new_libs"
-           # Pragmatically, this seems to cause very few problems in
-           # practice:
-           case $deplib in
-           -L*) new_libs="$deplib $new_libs" ;;
-           -R*) ;;
-           *)
-             # And here is the reason: when a library appears more
-             # than once as an explicit dependence of a library, or
-             # is implicitly linked in more than once by the
-             # compiler, it is considered special, and multiple
-             # occurrences thereof are not removed.  Compare this
-             # with having the same library being listed as a
-             # dependency of multiple other libraries: in this case,
-             # we know (pedantically, we assume) the library does not
-             # need to be listed more than once, so we keep only the
-             # last copy.  This is not always right, but it is rare
-             # enough that we require users that really mean to play
-             # such unportable linking tricks to link the library
-             # using -Wl,-lname, so that libtool does not consider it
-             # for duplicate removal.
-             case " $specialdeplibs " in
-             *" $deplib "*) new_libs="$deplib $new_libs" ;;
-             *)
-               case " $new_libs " in
-               *" $deplib "*) ;;
-               *) new_libs="$deplib $new_libs" ;;
-               esac
-               ;;
-             esac
-             ;;
-           esac
-         done
-         tmp_libs=
-         for deplib in $new_libs; do
-           case $deplib in
-           -L*)
-             case " $tmp_libs " in
-             *" $deplib "*) ;;
-             *) tmp_libs="$tmp_libs $deplib" ;;
-             esac
-             ;;
-           *) tmp_libs="$tmp_libs $deplib" ;;
-           esac
-         done
-         eval $var=\"$tmp_libs\"
-       done # for var
-      fi
-      # Last step: remove runtime libs from dependency_libs
-      # (they stay in deplibs)
-      tmp_libs=
-      for i in $dependency_libs ; do
-       case " $predeps $postdeps $compiler_lib_search_path " in
-       *" $i "*)
-         i=""
-         ;;
-       esac
-       if test -n "$i" ; then
-         tmp_libs="$tmp_libs $i"
-       fi
-      done
-      dependency_libs=$tmp_libs
-    done # for pass
-    if test "$linkmode" = prog; then
-      dlfiles="$newdlfiles"
-      dlprefiles="$newdlprefiles"
-    fi
-
-    case $linkmode in
-    oldlib)
-      if test -n "$deplibs"; then
-       $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
-      fi
-
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-       $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$rpath"; then
-       $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$xrpath"; then
-       $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$vinfo"; then
-       $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$release"; then
-       $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
-       $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
-      fi
-
-      # Now set the variables for building old libraries.
-      build_libtool_libs=no
-      oldlibs="$output"
-      objs="$objs$old_deplibs"
-      ;;
-
-    lib)
-      # Make sure we only generate libraries of the form `libNAME.la'.
-      case $outputname in
-      lib*)
-       name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
-       eval shared_ext=\"$shrext_cmds\"
-       eval libname=\"$libname_spec\"
-       ;;
-      *)
-       if test "$module" = no; then
-         $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
-         $echo "$help" 1>&2
-         exit $EXIT_FAILURE
-       fi
-       if test "$need_lib_prefix" != no; then
-         # Add the "lib" prefix for modules if required
-         name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
-         eval shared_ext=\"$shrext_cmds\"
-         eval libname=\"$libname_spec\"
-       else
-         libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
-       fi
-       ;;
-      esac
-
-      if test -n "$objs"; then
-       if test "$deplibs_check_method" != pass_all; then
-         $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
-         exit $EXIT_FAILURE
-       else
-         $echo
-         $echo "*** Warning: Linking the shared library $output against the non-libtool"
-         $echo "*** objects $objs is not portable!"
-         libobjs="$libobjs $objs"
-       fi
-      fi
-
-      if test "$dlself" != no; then
-       $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
-      fi
-
-      set dummy $rpath
-      if test "$#" -gt 2; then
-       $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
-      fi
-      install_libdir="$2"
-
-      oldlibs=
-      if test -z "$rpath"; then
-       if test "$build_libtool_libs" = yes; then
-         # Building a libtool convenience library.
-         # Some compilers have problems with a `.al' extension so
-         # convenience libraries should have the same extension an
-         # archive normally would.
-         oldlibs="$output_objdir/$libname.$libext $oldlibs"
-         build_libtool_libs=convenience
-         build_old_libs=yes
-       fi
-
-       if test -n "$vinfo"; then
-         $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
-       fi
-
-       if test -n "$release"; then
-         $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
-       fi
-      else
-
-       # Parse the version information argument.
-       save_ifs="$IFS"; IFS=':'
-       set dummy $vinfo 0 0 0
-       IFS="$save_ifs"
-
-       if test -n "$8"; then
-         $echo "$modename: too many parameters to \`-version-info'" 1>&2
-         $echo "$help" 1>&2
-         exit $EXIT_FAILURE
-       fi
-
-       # convert absolute version numbers to libtool ages
-       # this retains compatibility with .la files and attempts
-       # to make the code below a bit more comprehensible
-
-       case $vinfo_number in
-       yes)
-         number_major="$2"
-         number_minor="$3"
-         number_revision="$4"
-         #
-         # There are really only two kinds -- those that
-         # use the current revision as the major version
-         # and those that subtract age and use age as
-         # a minor version.  But, then there is irix
-         # which has an extra 1 added just for fun
-         #
-         case $version_type in
-         darwin|linux|osf|windows)
-           current=`expr $number_major + $number_minor`
-           age="$number_minor"
-           revision="$number_revision"
-           ;;
-         freebsd-aout|freebsd-elf|sunos)
-           current="$number_major"
-           revision="$number_minor"
-           age="0"
-           ;;
-         irix|nonstopux)
-           current=`expr $number_major + $number_minor - 1`
-           age="$number_minor"
-           revision="$number_minor"
-           ;;
-         *)
-           $echo "$modename: unknown library version type \`$version_type'" 1>&2
-           $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-           exit $EXIT_FAILURE
-           ;;
-         esac
-         ;;
-       no)
-         current="$2"
-         revision="$3"
-         age="$4"
-         ;;
-       esac
-
-       # Check that each of the things are valid numbers.
-       case $current in
-       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
-       *)
-         $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
-         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
-
-       case $revision in
-       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
-       *)
-         $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
-         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
-
-       case $age in
-       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
-       *)
-         $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
-         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
-
-       if test "$age" -gt "$current"; then
-         $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
-         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-         exit $EXIT_FAILURE
-       fi
-
-       # Calculate the version variables.
-       major=
-       versuffix=
-       verstring=
-       case $version_type in
-       none) ;;
-
-       darwin)
-         # Like Linux, but with the current version available in
-         # verstring for coding it into the library header
-         major=.`expr $current - $age`
-         versuffix="$major.$age.$revision"
-         # Darwin ld doesn't like 0 for these options...
-         minor_current=`expr $current + 1`
-         verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
-         ;;
-
-       freebsd-aout)
-         major=".$current"
-         versuffix=".$current.$revision";
-         ;;
-
-       freebsd-elf)
-         major=".$current"
-         versuffix=".$current";
-         ;;
-
-       irix | nonstopux)
-         major=`expr $current - $age + 1`
-
-         case $version_type in
-           nonstopux) verstring_prefix=nonstopux ;;
-           *)         verstring_prefix=sgi ;;
-         esac
-         verstring="$verstring_prefix$major.$revision"
-
-         # Add in all the interfaces that we are compatible with.
-         loop=$revision
-         while test "$loop" -ne 0; do
-           iface=`expr $revision - $loop`
-           loop=`expr $loop - 1`
-           verstring="$verstring_prefix$major.$iface:$verstring"
-         done
-
-         # Before this point, $major must not contain `.'.
-         major=.$major
-         versuffix="$major.$revision"
-         ;;
-
-       linux)
-         major=.`expr $current - $age`
-         versuffix="$major.$age.$revision"
-         ;;
-
-       osf)
-         major=.`expr $current - $age`
-         versuffix=".$current.$age.$revision"
-         verstring="$current.$age.$revision"
-
-         # Add in all the interfaces that we are compatible with.
-         loop=$age
-         while test "$loop" -ne 0; do
-           iface=`expr $current - $loop`
-           loop=`expr $loop - 1`
-           verstring="$verstring:${iface}.0"
-         done
-
-         # Make executables depend on our current version.
-         verstring="$verstring:${current}.0"
-         ;;
-
-       sunos)
-         major=".$current"
-         versuffix=".$current.$revision"
-         ;;
-
-       windows)
-         # Use '-' rather than '.', since we only want one
-         # extension on DOS 8.3 filesystems.
-         major=`expr $current - $age`
-         versuffix="-$major"
-         ;;
-
-       *)
-         $echo "$modename: unknown library version type \`$version_type'" 1>&2
-         $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
-
-       # Clear the version info if we defaulted, and they specified a release.
-       if test -z "$vinfo" && test -n "$release"; then
-         major=
-         case $version_type in
-         darwin)
-           # we can't check for "0.0" in archive_cmds due to quoting
-           # problems, so we reset it completely
-           verstring=
-           ;;
-         *)
-           verstring="0.0"
-           ;;
-         esac
-         if test "$need_version" = no; then
-           versuffix=
-         else
-           versuffix=".0.0"
-         fi
-       fi
-
-       # Remove version info from name if versioning should be avoided
-       if test "$avoid_version" = yes && test "$need_version" = no; then
-         major=
-         versuffix=
-         verstring=""
-       fi
-
-       # Check to see if the archive will have undefined symbols.
-       if test "$allow_undefined" = yes; then
-         if test "$allow_undefined_flag" = unsupported; then
-           $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
-           build_libtool_libs=no
-           build_old_libs=yes
-         fi
-       else
-         # Don't allow undefined symbols.
-         allow_undefined_flag="$no_undefined_flag"
-       fi
-      fi
-
-      if test "$mode" != relink; then
-       # Remove our outputs, but don't remove object files since they
-       # may have been created when compiling PIC objects.
-       removelist=
-       tempremovelist=`$echo "$output_objdir/*"`
-       for p in $tempremovelist; do
-         case $p in
-           *.$objext)
-              ;;
-           $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
-              if test "X$precious_files_regex" != "X"; then
-                if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
-                then
-                  continue
-                fi
-              fi
-              removelist="$removelist $p"
-              ;;
-           *) ;;
-         esac
-       done
-       if test -n "$removelist"; then
-         $show "${rm}r $removelist"
-         $run ${rm}r $removelist
-       fi
-      fi
-
-      # Now set the variables for building old libraries.
-      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
-       oldlibs="$oldlibs $output_objdir/$libname.$libext"
-
-       # Transform .lo files to .o files.
-       oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
-      fi
-
-      # Eliminate all temporary directories.
-      for path in $notinst_path; do
-       lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
-       deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
-       dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
-      done
-
-      if test -n "$xrpath"; then
-       # If the user specified any rpath flags, then add them.
-       temp_xrpath=
-       for libdir in $xrpath; do
-         temp_xrpath="$temp_xrpath -R$libdir"
-         case "$finalize_rpath " in
-         *" $libdir "*) ;;
-         *) finalize_rpath="$finalize_rpath $libdir" ;;
-         esac
-       done
-       if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
-         dependency_libs="$temp_xrpath $dependency_libs"
-       fi
-      fi
-
-      # Make sure dlfiles contains only unique files that won't be dlpreopened
-      old_dlfiles="$dlfiles"
-      dlfiles=
-      for lib in $old_dlfiles; do
-       case " $dlprefiles $dlfiles " in
-       *" $lib "*) ;;
-       *) dlfiles="$dlfiles $lib" ;;
-       esac
-      done
-
-      # Make sure dlprefiles contains only unique files
-      old_dlprefiles="$dlprefiles"
-      dlprefiles=
-      for lib in $old_dlprefiles; do
-       case "$dlprefiles " in
-       *" $lib "*) ;;
-       *) dlprefiles="$dlprefiles $lib" ;;
-       esac
-      done
-
-      if test "$build_libtool_libs" = yes; then
-       if test -n "$rpath"; then
-         case $host in
-         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
-           # these systems don't actually have a c library (as such)!
-           ;;
-         *-*-rhapsody* | *-*-darwin1.[012])
-           # Rhapsody C library is in the System framework
-           deplibs="$deplibs -framework System"
-           ;;
-         *-*-netbsd*)
-           # Don't link with libc until the a.out ld.so is fixed.
-           ;;
-         *-*-openbsd* | *-*-freebsd*)
-           # Do not include libc due to us having libc/libc_r.
-           test "X$arg" = "X-lc" && continue
-           ;;
-         *)
-           # Add libc to deplibs on all other systems if necessary.
-           if test "$build_libtool_need_lc" = "yes"; then
-             deplibs="$deplibs -lc"
-           fi
-           ;;
-         esac
-       fi
-
-       # Transform deplibs into only deplibs that can be linked in shared.
-       name_save=$name
-       libname_save=$libname
-       release_save=$release
-       versuffix_save=$versuffix
-       major_save=$major
-       # I'm not sure if I'm treating the release correctly.  I think
-       # release should show up in the -l (ie -lgmp5) so we don't want to
-       # add it in twice.  Is that correct?
-       release=""
-       versuffix=""
-       major=""
-       newdeplibs=
-       droppeddeps=no
-       case $deplibs_check_method in
-       pass_all)
-         # Don't check for shared/static.  Everything works.
-         # This might be a little naive.  We might want to check
-         # whether the library exists or not.  But this is on
-         # osf3 & osf4 and I'm not really sure... Just
-         # implementing what was already the behavior.
-         newdeplibs=$deplibs
-         ;;
-       test_compile)
-         # This code stresses the "libraries are programs" paradigm to its
-         # limits. Maybe even breaks it.  We compile a program, linking it
-         # against the deplibs as a proxy for the library.  Then we can check
-         # whether they linked in statically or dynamically with ldd.
-         $rm conftest.c
-         cat > conftest.c <<EOF
-         int main() { return 0; }
-EOF
-         $rm conftest
-         $LTCC -o conftest conftest.c $deplibs
-         if test "$?" -eq 0 ; then
-           ldd_output=`ldd conftest`
-           for i in $deplibs; do
-             name="`expr $i : '-l\(.*\)'`"
-             # If $name is empty we are operating on a -L argument.
-              if test "$name" != "" && test "$name" -ne "0"; then
-               if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-                 case " $predeps $postdeps " in
-                 *" $i "*)
-                   newdeplibs="$newdeplibs $i"
-                   i=""
-                   ;;
-                 esac
-               fi
-               if test -n "$i" ; then
-                 libname=`eval \\$echo \"$libname_spec\"`
-                 deplib_matches=`eval \\$echo \"$library_names_spec\"`
-                 set dummy $deplib_matches
-                 deplib_match=$2
-                 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-                   newdeplibs="$newdeplibs $i"
-                 else
-                   droppeddeps=yes
-                   $echo
-                   $echo "*** Warning: dynamic linker does not accept needed library $i."
-                   $echo "*** I have the capability to make that library automatically link in when"
-                   $echo "*** you link to this library.  But I can only do this if you have a"
-                   $echo "*** shared version of the library, which I believe you do not have"
-                   $echo "*** because a test_compile did reveal that the linker did not use it for"
-                   $echo "*** its dynamic dependency list that programs get resolved with at runtime."
-                 fi
-               fi
-             else
-               newdeplibs="$newdeplibs $i"
-             fi
-           done
-         else
-           # Error occurred in the first compile.  Let's try to salvage
-           # the situation: Compile a separate program for each library.
-           for i in $deplibs; do
-             name="`expr $i : '-l\(.*\)'`"
-             # If $name is empty we are operating on a -L argument.
-              if test "$name" != "" && test "$name" != "0"; then
-               $rm conftest
-               $LTCC -o conftest conftest.c $i
-               # Did it work?
-               if test "$?" -eq 0 ; then
-                 ldd_output=`ldd conftest`
-                 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-                   case " $predeps $postdeps " in
-                   *" $i "*)
-                     newdeplibs="$newdeplibs $i"
-                     i=""
-                     ;;
-                   esac
-                 fi
-                 if test -n "$i" ; then
-                   libname=`eval \\$echo \"$libname_spec\"`
-                   deplib_matches=`eval \\$echo \"$library_names_spec\"`
-                   set dummy $deplib_matches
-                   deplib_match=$2
-                   if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-                     newdeplibs="$newdeplibs $i"
-                   else
-                     droppeddeps=yes
-                     $echo
-                     $echo "*** Warning: dynamic linker does not accept needed library $i."
-                     $echo "*** I have the capability to make that library automatically link in when"
-                     $echo "*** you link to this library.  But I can only do this if you have a"
-                     $echo "*** shared version of the library, which you do not appear to have"
-                     $echo "*** because a test_compile did reveal that the linker did not use this one"
-                     $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
-                   fi
-                 fi
-               else
-                 droppeddeps=yes
-                 $echo
-                 $echo "*** Warning!  Library $i is needed by this library but I was not able to"
-                 $echo "***  make it link in!  You will probably need to install it or some"
-                 $echo "*** library that it depends on before this library will be fully"
-                 $echo "*** functional.  Installing it before continuing would be even better."
-               fi
-             else
-               newdeplibs="$newdeplibs $i"
-             fi
-           done
-         fi
-         ;;
-       file_magic*)
-         set dummy $deplibs_check_method
-         file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
-         for a_deplib in $deplibs; do
-           name="`expr $a_deplib : '-l\(.*\)'`"
-           # If $name is empty we are operating on a -L argument.
-            if test "$name" != "" && test  "$name" != "0"; then
-             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-               case " $predeps $postdeps " in
-               *" $a_deplib "*)
-                 newdeplibs="$newdeplibs $a_deplib"
-                 a_deplib=""
-                 ;;
-               esac
-             fi
-             if test -n "$a_deplib" ; then
-               libname=`eval \\$echo \"$libname_spec\"`
-               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
-                 for potent_lib in $potential_libs; do
-                     # Follow soft links.
-                     if ls -lLd "$potent_lib" 2>/dev/null \
-                        | grep " -> " >/dev/null; then
-                       continue
-                     fi
-                     # The statement above tries to avoid entering an
-                     # endless loop below, in case of cyclic links.
-                     # We might still enter an endless loop, since a link
-                     # loop can be closed while we follow links,
-                     # but so what?
-                     potlib="$potent_lib"
-                     while test -h "$potlib" 2>/dev/null; do
-                       potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
-                       case $potliblink in
-                       [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
-                       *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
-                       esac
-                     done
-                     if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
-                        | ${SED} 10q \
-                        | $EGREP "$file_magic_regex" > /dev/null; then
-                       newdeplibs="$newdeplibs $a_deplib"
-                       a_deplib=""
-                       break 2
-                     fi
-                 done
-               done
-             fi
-             if test -n "$a_deplib" ; then
-               droppeddeps=yes
-               $echo
-               $echo "*** Warning: linker path does not have real file for library $a_deplib."
-               $echo "*** I have the capability to make that library automatically link in when"
-               $echo "*** you link to this library.  But I can only do this if you have a"
-               $echo "*** shared version of the library, which you do not appear to have"
-               $echo "*** because I did check the linker path looking for a file starting"
-               if test -z "$potlib" ; then
-                 $echo "*** with $libname but no candidates were found. (...for file magic test)"
-               else
-                 $echo "*** with $libname and none of the candidates passed a file format test"
-                 $echo "*** using a file magic. Last file checked: $potlib"
-               fi
-             fi
-           else
-             # Add a -L argument.
-             newdeplibs="$newdeplibs $a_deplib"
-           fi
-         done # Gone through all deplibs.
-         ;;
-       match_pattern*)
-         set dummy $deplibs_check_method
-         match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
-         for a_deplib in $deplibs; do
-           name="`expr $a_deplib : '-l\(.*\)'`"
-           # If $name is empty we are operating on a -L argument.
-           if test -n "$name" && test "$name" != "0"; then
-             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-               case " $predeps $postdeps " in
-               *" $a_deplib "*)
-                 newdeplibs="$newdeplibs $a_deplib"
-                 a_deplib=""
-                 ;;
-               esac
-             fi
-             if test -n "$a_deplib" ; then
-               libname=`eval \\$echo \"$libname_spec\"`
-               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
-                 for potent_lib in $potential_libs; do
-                   potlib="$potent_lib" # see symlink-check above in file_magic test
-                   if eval $echo \"$potent_lib\" 2>/dev/null \
-                       | ${SED} 10q \
-                       | $EGREP "$match_pattern_regex" > /dev/null; then
-                     newdeplibs="$newdeplibs $a_deplib"
-                     a_deplib=""
-                     break 2
-                   fi
-                 done
-               done
-             fi
-             if test -n "$a_deplib" ; then
-               droppeddeps=yes
-               $echo
-               $echo "*** Warning: linker path does not have real file for library $a_deplib."
-               $echo "*** I have the capability to make that library automatically link in when"
-               $echo "*** you link to this library.  But I can only do this if you have a"
-               $echo "*** shared version of the library, which you do not appear to have"
-               $echo "*** because I did check the linker path looking for a file starting"
-               if test -z "$potlib" ; then
-                 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
-               else
-                 $echo "*** with $libname and none of the candidates passed a file format test"
-                 $echo "*** using a regex pattern. Last file checked: $potlib"
-               fi
-             fi
-           else
-             # Add a -L argument.
-             newdeplibs="$newdeplibs $a_deplib"
-           fi
-         done # Gone through all deplibs.
-         ;;
-       none | unknown | *)
-         newdeplibs=""
-         tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
-           -e 's/ -[LR][^ ]*//g'`
-         if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-           for i in $predeps $postdeps ; do
-             # can't use Xsed below, because $i might contain '/'
-             tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
-           done
-         fi
-         if $echo "X $tmp_deplibs" | $Xsed -e 's/[     ]//g' \
-           | grep . >/dev/null; then
-           $echo
-           if test "X$deplibs_check_method" = "Xnone"; then
-             $echo "*** Warning: inter-library dependencies are not supported in this platform."
-           else
-             $echo "*** Warning: inter-library dependencies are not known to be supported."
-           fi
-           $echo "*** All declared inter-library dependencies are being dropped."
-           droppeddeps=yes
-         fi
-         ;;
-       esac
-       versuffix=$versuffix_save
-       major=$major_save
-       release=$release_save
-       libname=$libname_save
-       name=$name_save
-
-       case $host in
-       *-*-rhapsody* | *-*-darwin1.[012])
-         # On Rhapsody replace the C library is the System framework
-         newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
-         ;;
-       esac
-
-       if test "$droppeddeps" = yes; then
-         if test "$module" = yes; then
-           $echo
-           $echo "*** Warning: libtool could not satisfy all declared inter-library"
-           $echo "*** dependencies of module $libname.  Therefore, libtool will create"
-           $echo "*** a static module, that should work as long as the dlopening"
-           $echo "*** application is linked with the -dlopen flag."
-           if test -z "$global_symbol_pipe"; then
-             $echo
-             $echo "*** However, this would only work if libtool was able to extract symbol"
-             $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
-             $echo "*** not find such a program.  So, this module is probably useless."
-             $echo "*** \`nm' from GNU binutils and a full rebuild may help."
-           fi
-           if test "$build_old_libs" = no; then
-             oldlibs="$output_objdir/$libname.$libext"
-             build_libtool_libs=module
-             build_old_libs=yes
-           else
-             build_libtool_libs=no
-           fi
-         else
-           $echo "*** The inter-library dependencies that have been dropped here will be"
-           $echo "*** automatically added whenever a program is linked with this library"
-           $echo "*** or is declared to -dlopen it."
-
-           if test "$allow_undefined" = no; then
-             $echo
-             $echo "*** Since this library must not contain undefined symbols,"
-             $echo "*** because either the platform does not support them or"
-             $echo "*** it was explicitly requested with -no-undefined,"
-             $echo "*** libtool will only create a static version of it."
-             if test "$build_old_libs" = no; then
-               oldlibs="$output_objdir/$libname.$libext"
-               build_libtool_libs=module
-               build_old_libs=yes
-             else
-               build_libtool_libs=no
-             fi
-           fi
-         fi
-       fi
-       # Done checking deplibs!
-       deplibs=$newdeplibs
-      fi
-
-      # All the library-specific variables (install_libdir is set above).
-      library_names=
-      old_library=
-      dlname=
-
-      # Test again, we may have decided not to build it any more
-      if test "$build_libtool_libs" = yes; then
-       if test "$hardcode_into_libs" = yes; then
-         # Hardcode the library paths
-         hardcode_libdirs=
-         dep_rpath=
-         rpath="$finalize_rpath"
-         test "$mode" != relink && rpath="$compile_rpath$rpath"
-         for libdir in $rpath; do
-           if test -n "$hardcode_libdir_flag_spec"; then
-             if test -n "$hardcode_libdir_separator"; then
-               if test -z "$hardcode_libdirs"; then
-                 hardcode_libdirs="$libdir"
-               else
-                 # Just accumulate the unique libdirs.
-                 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-                 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-                   ;;
-                 *)
-                   hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-                   ;;
-                 esac
-               fi
-             else
-               eval flag=\"$hardcode_libdir_flag_spec\"
-               dep_rpath="$dep_rpath $flag"
-             fi
-           elif test -n "$runpath_var"; then
-             case "$perm_rpath " in
-             *" $libdir "*) ;;
-             *) perm_rpath="$perm_rpath $libdir" ;;
-             esac
-           fi
-         done
-         # Substitute the hardcoded libdirs into the rpath.
-         if test -n "$hardcode_libdir_separator" &&
-            test -n "$hardcode_libdirs"; then
-           libdir="$hardcode_libdirs"
-           if test -n "$hardcode_libdir_flag_spec_ld"; then
-             eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
-           else
-             eval dep_rpath=\"$hardcode_libdir_flag_spec\"
-           fi
-         fi
-         if test -n "$runpath_var" && test -n "$perm_rpath"; then
-           # We should set the runpath_var.
-           rpath=
-           for dir in $perm_rpath; do
-             rpath="$rpath$dir:"
-           done
-           eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
-         fi
-         test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
-       fi
-
-       shlibpath="$finalize_shlibpath"
-       test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
-       if test -n "$shlibpath"; then
-         eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
-       fi
-
-       # Get the real and link names of the library.
-       eval shared_ext=\"$shrext_cmds\"
-       eval library_names=\"$library_names_spec\"
-       set dummy $library_names
-       realname="$2"
-       shift; shift
-
-       if test -n "$soname_spec"; then
-         eval soname=\"$soname_spec\"
-       else
-         soname="$realname"
-       fi
-       if test -z "$dlname"; then
-         dlname=$soname
-       fi
-
-       lib="$output_objdir/$realname"
-       for link
-       do
-         linknames="$linknames $link"
-       done
-
-       # Use standard objects if they are pic
-       test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-
-       # Prepare the list of exported symbols
-       if test -z "$export_symbols"; then
-         if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
-           $show "generating symbol list for \`$libname.la'"
-           export_symbols="$output_objdir/$libname.exp"
-           $run $rm $export_symbols
-           cmds=$export_symbols_cmds
-           save_ifs="$IFS"; IFS='~'
-           for cmd in $cmds; do
-             IFS="$save_ifs"
-             eval cmd=\"$cmd\"
-             if len=`expr "X$cmd" : ".*"` &&
-              test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-               $show "$cmd"
-               $run eval "$cmd" || exit $?
-               skipped_export=false
-             else
-               # The command line is too long to execute in one step.
-               $show "using reloadable object file for export list..."
-               skipped_export=:
-             fi
-           done
-           IFS="$save_ifs"
-           if test -n "$export_symbols_regex"; then
-             $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
-             $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
-             $show "$mv \"${export_symbols}T\" \"$export_symbols\""
-             $run eval '$mv "${export_symbols}T" "$export_symbols"'
-           fi
-         fi
-       fi
-
-       if test -n "$export_symbols" && test -n "$include_expsyms"; then
-         $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
-       fi
-
-       tmp_deplibs=
-       for test_deplib in $deplibs; do
-               case " $convenience " in
-               *" $test_deplib "*) ;;
-               *)
-                       tmp_deplibs="$tmp_deplibs $test_deplib"
-                       ;;
-               esac
-       done
-       deplibs="$tmp_deplibs"
-
-       if test -n "$convenience"; then
-         if test -n "$whole_archive_flag_spec"; then
-           save_libobjs=$libobjs
-           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
-         else
-           gentop="$output_objdir/${outputname}x"
-           $show "${rm}r $gentop"
-           $run ${rm}r "$gentop"
-           $show "$mkdir $gentop"
-           $run $mkdir "$gentop"
-           status=$?
-           if test "$status" -ne 0 && test ! -d "$gentop"; then
-             exit $status
-           fi
-           generated="$generated $gentop"
-
-           for xlib in $convenience; do
-             # Extract the objects.
-             case $xlib in
-             [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-             *) xabs=`pwd`"/$xlib" ;;
-             esac
-             xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-             xdir="$gentop/$xlib"
-
-             $show "${rm}r $xdir"
-             $run ${rm}r "$xdir"
-             $show "$mkdir $xdir"
-             $run $mkdir "$xdir"
-             status=$?
-             if test "$status" -ne 0 && test ! -d "$xdir"; then
-               exit $status
-             fi
-             # We will extract separately just the conflicting names and we will no
-             # longer touch any unique names. It is faster to leave these extract
-             # automatically by $AR in one run.
-             $show "(cd $xdir && $AR x $xabs)"
-             $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-             if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
-               :
-             else
-               $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
-               $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
-               $AR t "$xabs" | sort | uniq -cd | while read -r count name
-               do
-                 i=1
-                 while test "$i" -le "$count"
-                 do
-                  # Put our $i before any first dot (extension)
-                  # Never overwrite any file
-                  name_to="$name"
-                  while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
-                  do
-                    name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
-                  done
-                  $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
-                  $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
-                  i=`expr $i + 1`
-                 done
-               done
-             fi
-
-             libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
-           done
-         fi
-       fi
-
-       if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
-         eval flag=\"$thread_safe_flag_spec\"
-         linker_flags="$linker_flags $flag"
-       fi
-
-       # Make a backup of the uninstalled library when relinking
-       if test "$mode" = relink; then
-         $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
-       fi
-
-       # Do each of the archive commands.
-       if test "$module" = yes && test -n "$module_cmds" ; then
-         if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
-           eval test_cmds=\"$module_expsym_cmds\"
-           cmds=$module_expsym_cmds
-         else
-           eval test_cmds=\"$module_cmds\"
-           cmds=$module_cmds
-         fi
-       else
-       if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-         eval test_cmds=\"$archive_expsym_cmds\"
-         cmds=$archive_expsym_cmds
-       else
-         eval test_cmds=\"$archive_cmds\"
-         cmds=$archive_cmds
-         fi
-       fi
-
-       if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
-          test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-         :
-       else
-         # The command line is too long to link in one step, link piecewise.
-         $echo "creating reloadable object files..."
-
-         # Save the value of $output and $libobjs because we want to
-         # use them later.  If we have whole_archive_flag_spec, we
-         # want to use save_libobjs as it was before
-         # whole_archive_flag_spec was expanded, because we can't
-         # assume the linker understands whole_archive_flag_spec.
-         # This may have to be revisited, in case too many
-         # convenience libraries get linked in and end up exceeding
-         # the spec.
-         if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
-           save_libobjs=$libobjs
-         fi
-         save_output=$output
-
-         # Clear the reloadable object creation command queue and
-         # initialize k to one.
-         test_cmds=
-         concat_cmds=
-         objlist=
-         delfiles=
-         last_robj=
-         k=1
-         output=$output_objdir/$save_output-${k}.$objext
-         # Loop over the list of objects to be linked.
-         for obj in $save_libobjs
-         do
-           eval test_cmds=\"$reload_cmds $objlist $last_robj\"
-           if test "X$objlist" = X ||
-              { len=`expr "X$test_cmds" : ".*"` &&
-                test "$len" -le "$max_cmd_len"; }; then
-             objlist="$objlist $obj"
-           else
-             # The command $test_cmds is almost too long, add a
-             # command to the queue.
-             if test "$k" -eq 1 ; then
-               # The first file doesn't have a previous command to add.
-               eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
-             else
-               # All subsequent reloadable object files will link in
-               # the last one created.
-               eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
-             fi
-             last_robj=$output_objdir/$save_output-${k}.$objext
-             k=`expr $k + 1`
-             output=$output_objdir/$save_output-${k}.$objext
-             objlist=$obj
-             len=1
-           fi
-         done
-         # Handle the remaining objects by creating one last
-         # reloadable object file.  All subsequent reloadable object
-         # files will link in the last one created.
-         test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-         eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
-
-         if ${skipped_export-false}; then
-           $show "generating symbol list for \`$libname.la'"
-           export_symbols="$output_objdir/$libname.exp"
-           $run $rm $export_symbols
-           libobjs=$output
-           # Append the command to create the export file.
-           eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
-          fi
-
-         # Set up a command to remove the reloadale object files
-         # after they are used.
-         i=0
-         while test "$i" -lt "$k"
-         do
-           i=`expr $i + 1`
-           delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
-         done
-
-         $echo "creating a temporary reloadable object file: $output"
-
-         # Loop through the commands generated above and execute them.
-         save_ifs="$IFS"; IFS='~'
-         for cmd in $concat_cmds; do
-           IFS="$save_ifs"
-           $show "$cmd"
-           $run eval "$cmd" || exit $?
-         done
-         IFS="$save_ifs"
-
-         libobjs=$output
-         # Restore the value of output.
-         output=$save_output
-
-         if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
-           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
-         fi
-         # Expand the library linking commands again to reset the
-         # value of $libobjs for piecewise linking.
-
-         # Do each of the archive commands.
-         if test "$module" = yes && test -n "$module_cmds" ; then
-           if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
-             cmds=$module_expsym_cmds
-           else
-             cmds=$module_cmds
-           fi
-         else
-         if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-           cmds=$archive_expsym_cmds
-         else
-           cmds=$archive_cmds
-           fi
-         fi
-
-         # Append the command to remove the reloadable object files
-         # to the just-reset $cmds.
-         eval cmds=\"\$cmds~\$rm $delfiles\"
-       fi
-       save_ifs="$IFS"; IFS='~'
-       for cmd in $cmds; do
-         IFS="$save_ifs"
-         eval cmd=\"$cmd\"
-         $show "$cmd"
-         $run eval "$cmd" || exit $?
-       done
-       IFS="$save_ifs"
-
-       # Restore the uninstalled library and exit
-       if test "$mode" = relink; then
-         $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
-         exit $EXIT_SUCCESS
-       fi
-
-       # Create links to the real library.
-       for linkname in $linknames; do
-         if test "$realname" != "$linkname"; then
-           $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
-           $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
-         fi
-       done
-
-       # If -module or -export-dynamic was specified, set the dlname.
-       if test "$module" = yes || test "$export_dynamic" = yes; then
-         # On all known operating systems, these are identical.
-         dlname="$soname"
-       fi
-      fi
-      ;;
-
-    obj)
-      if test -n "$deplibs"; then
-       $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
-      fi
-
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-       $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$rpath"; then
-       $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$xrpath"; then
-       $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$vinfo"; then
-       $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$release"; then
-       $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
-      fi
-
-      case $output in
-      *.lo)
-       if test -n "$objs$old_deplibs"; then
-         $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
-         exit $EXIT_FAILURE
-       fi
-       libobj="$output"
-       obj=`$echo "X$output" | $Xsed -e "$lo2o"`
-       ;;
-      *)
-       libobj=
-       obj="$output"
-       ;;
-      esac
-
-      # Delete the old objects.
-      $run $rm $obj $libobj
-
-      # Objects from convenience libraries.  This assumes
-      # single-version convenience libraries.  Whenever we create
-      # different ones for PIC/non-PIC, this we'll have to duplicate
-      # the extraction.
-      reload_conv_objs=
-      gentop=
-      # reload_cmds runs $LD directly, so let us get rid of
-      # -Wl from whole_archive_flag_spec
-      wl=
-
-      if test -n "$convenience"; then
-       if test -n "$whole_archive_flag_spec"; then
-         eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
-       else
-         gentop="$output_objdir/${obj}x"
-         $show "${rm}r $gentop"
-         $run ${rm}r "$gentop"
-         $show "$mkdir $gentop"
-         $run $mkdir "$gentop"
-         status=$?
-         if test "$status" -ne 0 && test ! -d "$gentop"; then
-           exit $status
-         fi
-         generated="$generated $gentop"
-
-         for xlib in $convenience; do
-           # Extract the objects.
-           case $xlib in
-           [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-           *) xabs=`pwd`"/$xlib" ;;
-           esac
-           xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-           xdir="$gentop/$xlib"
-
-           $show "${rm}r $xdir"
-           $run ${rm}r "$xdir"
-           $show "$mkdir $xdir"
-           $run $mkdir "$xdir"
-           status=$?
-           if test "$status" -ne 0 && test ! -d "$xdir"; then
-             exit $status
-           fi
-           # We will extract separately just the conflicting names and we will no
-           # longer touch any unique names. It is faster to leave these extract
-           # automatically by $AR in one run.
-           $show "(cd $xdir && $AR x $xabs)"
-           $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-           if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
-             :
-           else
-             $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
-             $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
-             $AR t "$xabs" | sort | uniq -cd | while read -r count name
-             do
-               i=1
-               while test "$i" -le "$count"
-               do
-                # Put our $i before any first dot (extension)
-                # Never overwrite any file
-                name_to="$name"
-                while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
-                do
-                  name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
-                done
-                $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
-                $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
-                i=`expr $i + 1`
-               done
-             done
-           fi
-
-           reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
-         done
-       fi
-      fi
-
-      # Create the old-style object.
-      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
-
-      output="$obj"
-      cmds=$reload_cmds
-      save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-       IFS="$save_ifs"
-       eval cmd=\"$cmd\"
-       $show "$cmd"
-       $run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-
-      # Exit if we aren't doing a library object file.
-      if test -z "$libobj"; then
-       if test -n "$gentop"; then
-         $show "${rm}r $gentop"
-         $run ${rm}r $gentop
-       fi
-
-       exit $EXIT_SUCCESS
-      fi
-
-      if test "$build_libtool_libs" != yes; then
-       if test -n "$gentop"; then
-         $show "${rm}r $gentop"
-         $run ${rm}r $gentop
-       fi
-
-       # Create an invalid libtool object if no PIC, so that we don't
-       # accidentally link it into a program.
-       # $show "echo timestamp > $libobj"
-       # $run eval "echo timestamp > $libobj" || exit $?
-       exit $EXIT_SUCCESS
-      fi
-
-      if test -n "$pic_flag" || test "$pic_mode" != default; then
-       # Only do commands if we really have different PIC objects.
-       reload_objs="$libobjs $reload_conv_objs"
-       output="$libobj"
-       cmds=$reload_cmds
-       save_ifs="$IFS"; IFS='~'
-       for cmd in $cmds; do
-         IFS="$save_ifs"
-         eval cmd=\"$cmd\"
-         $show "$cmd"
-         $run eval "$cmd" || exit $?
-       done
-       IFS="$save_ifs"
-      fi
-
-      if test -n "$gentop"; then
-       $show "${rm}r $gentop"
-       $run ${rm}r $gentop
-      fi
-
-      exit $EXIT_SUCCESS
-      ;;
-
-    prog)
-      case $host in
-       *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
-      esac
-      if test -n "$vinfo"; then
-       $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
-      fi
-
-      if test -n "$release"; then
-       $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
-      fi
-
-      if test "$preload" = yes; then
-       if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
-          test "$dlopen_self_static" = unknown; then
-         $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
-       fi
-      fi
-
-      case $host in
-      *-*-rhapsody* | *-*-darwin1.[012])
-       # On Rhapsody replace the C library is the System framework
-       compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
-       finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
-       ;;
-      esac
-
-      case $host in
-      *darwin*)
-        # Don't allow lazy linking, it breaks C++ global constructors
-        if test "$tagname" = CXX ; then
-        compile_command="$compile_command ${wl}-bind_at_load"
-        finalize_command="$finalize_command ${wl}-bind_at_load"
-        fi
-        ;;
-      esac
-
-      compile_command="$compile_command $compile_deplibs"
-      finalize_command="$finalize_command $finalize_deplibs"
-
-      if test -n "$rpath$xrpath"; then
-       # If the user specified any rpath flags, then add them.
-       for libdir in $rpath $xrpath; do
-         # This is the magic to use -rpath.
-         case "$finalize_rpath " in
-         *" $libdir "*) ;;
-         *) finalize_rpath="$finalize_rpath $libdir" ;;
-         esac
-       done
-      fi
-
-      # Now hardcode the library paths
-      rpath=
-      hardcode_libdirs=
-      for libdir in $compile_rpath $finalize_rpath; do
-       if test -n "$hardcode_libdir_flag_spec"; then
-         if test -n "$hardcode_libdir_separator"; then
-           if test -z "$hardcode_libdirs"; then
-             hardcode_libdirs="$libdir"
-           else
-             # Just accumulate the unique libdirs.
-             case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-               ;;
-             *)
-               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-               ;;
-             esac
-           fi
-         else
-           eval flag=\"$hardcode_libdir_flag_spec\"
-           rpath="$rpath $flag"
-         fi
-       elif test -n "$runpath_var"; then
-         case "$perm_rpath " in
-         *" $libdir "*) ;;
-         *) perm_rpath="$perm_rpath $libdir" ;;
-         esac
-       fi
-       case $host in
-       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-         case :$dllsearchpath: in
-         *":$libdir:"*) ;;
-         *) dllsearchpath="$dllsearchpath:$libdir";;
-         esac
-         ;;
-       esac
-      done
-      # Substitute the hardcoded libdirs into the rpath.
-      if test -n "$hardcode_libdir_separator" &&
-        test -n "$hardcode_libdirs"; then
-       libdir="$hardcode_libdirs"
-       eval rpath=\" $hardcode_libdir_flag_spec\"
-      fi
-      compile_rpath="$rpath"
-
-      rpath=
-      hardcode_libdirs=
-      for libdir in $finalize_rpath; do
-       if test -n "$hardcode_libdir_flag_spec"; then
-         if test -n "$hardcode_libdir_separator"; then
-           if test -z "$hardcode_libdirs"; then
-             hardcode_libdirs="$libdir"
-           else
-             # Just accumulate the unique libdirs.
-             case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-               ;;
-             *)
-               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-               ;;
-             esac
-           fi
-         else
-           eval flag=\"$hardcode_libdir_flag_spec\"
-           rpath="$rpath $flag"
-         fi
-       elif test -n "$runpath_var"; then
-         case "$finalize_perm_rpath " in
-         *" $libdir "*) ;;
-         *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
-         esac
-       fi
-      done
-      # Substitute the hardcoded libdirs into the rpath.
-      if test -n "$hardcode_libdir_separator" &&
-        test -n "$hardcode_libdirs"; then
-       libdir="$hardcode_libdirs"
-       eval rpath=\" $hardcode_libdir_flag_spec\"
-      fi
-      finalize_rpath="$rpath"
-
-      if test -n "$libobjs" && test "$build_old_libs" = yes; then
-       # Transform all the library objects into standard objects.
-       compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-       finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-      fi
-
-      dlsyms=
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-       if test -n "$NM" && test -n "$global_symbol_pipe"; then
-         dlsyms="${outputname}S.c"
-       else
-         $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
-       fi
-      fi
-
-      if test -n "$dlsyms"; then
-       case $dlsyms in
-       "") ;;
-       *.c)
-         # Discover the nlist of each of the dlfiles.
-         nlist="$output_objdir/${outputname}.nm"
-
-         $show "$rm $nlist ${nlist}S ${nlist}T"
-         $run $rm "$nlist" "${nlist}S" "${nlist}T"
-
-         # Parse the name list into a source file.
-         $show "creating $output_objdir/$dlsyms"
-
-         test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
-/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-/* Prevent the only kind of declaration conflicts we can make. */
-#define lt_preloaded_symbols some_other_symbol
-
-/* External symbol declarations for the compiler. */\
-"
-
-         if test "$dlself" = yes; then
-           $show "generating symbol list for \`$output'"
-
-           test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
-
-           # Add our own program objects to the symbol list.
-           progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-           for arg in $progfiles; do
-             $show "extracting global C symbols from \`$arg'"
-             $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
-           done
-
-           if test -n "$exclude_expsyms"; then
-             $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
-             $run eval '$mv "$nlist"T "$nlist"'
-           fi
-
-           if test -n "$export_symbols_regex"; then
-             $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
-             $run eval '$mv "$nlist"T "$nlist"'
-           fi
-
-           # Prepare the list of exported symbols
-           if test -z "$export_symbols"; then
-             export_symbols="$output_objdir/$output.exp"
-             $run $rm $export_symbols
-             $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
-           else
-             $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
-             $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
-             $run eval 'mv "$nlist"T "$nlist"'
-           fi
-         fi
-
-         for arg in $dlprefiles; do
-           $show "extracting global C symbols from \`$arg'"
-           name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
-           $run eval '$echo ": $name " >> "$nlist"'
-           $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
-         done
-
-         if test -z "$run"; then
-           # Make sure we have at least an empty file.
-           test -f "$nlist" || : > "$nlist"
-
-           if test -n "$exclude_expsyms"; then
-             $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
-             $mv "$nlist"T "$nlist"
-           fi
-
-           # Try sorting and uniquifying the output.
-           if grep -v "^: " < "$nlist" |
-               if sort -k 3 </dev/null >/dev/null 2>&1; then
-                 sort -k 3
-               else
-                 sort +2
-               fi |
-               uniq > "$nlist"S; then
-             :
-           else
-             grep -v "^: " < "$nlist" > "$nlist"S
-           fi
-
-           if test -f "$nlist"S; then
-             eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
-           else
-             $echo '/* NONE */' >> "$output_objdir/$dlsyms"
-           fi
-
-           $echo >> "$output_objdir/$dlsyms" "\
-
-#undef lt_preloaded_symbols
-
-#if defined (__STDC__) && __STDC__
-# define lt_ptr void *
-#else
-# define lt_ptr char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
-  const char *name;
-  lt_ptr address;
-}
-lt_preloaded_symbols[] =
-{\
-"
-
-           eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
-
-           $echo >> "$output_objdir/$dlsyms" "\
-  {0, (lt_ptr) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
-  return lt_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif\
-"
-         fi
-
-         pic_flag_for_symtable=
-         case $host in
-         # compiling the symbol table file with pic_flag works around
-         # a FreeBSD bug that causes programs to crash when -lm is
-         # linked before any other PIC object.  But we must not use
-         # pic_flag when linking with -static.  The problem exists in
-         # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
-         *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
-           case "$compile_command " in
-           *" -static "*) ;;
-           *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
-           esac;;
-         *-*-hpux*)
-           case "$compile_command " in
-           *" -static "*) ;;
-           *) pic_flag_for_symtable=" $pic_flag";;
-           esac
-         esac
-
-         # Now compile the dynamic symbol file.
-         $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
-         $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
-
-         # Clean up the generated files.
-         $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
-         $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
-
-         # Transform the symbol file into the correct name.
-         compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
-         finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
-         ;;
-       *)
-         $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
-      else
-       # We keep going just in case the user didn't refer to
-       # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
-       # really was required.
-
-       # Nullify the symbol file.
-       compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
-       finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
-      fi
-
-      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
-       # Replace the output file specification.
-       compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
-       link_command="$compile_command$compile_rpath"
-
-       # We have no uninstalled library dependencies, so finalize right now.
-       $show "$link_command"
-       $run eval "$link_command"
-       status=$?
-
-       # Delete the generated files.
-       if test -n "$dlsyms"; then
-         $show "$rm $output_objdir/${outputname}S.${objext}"
-         $run $rm "$output_objdir/${outputname}S.${objext}"
-       fi
-
-       exit $status
-      fi
-
-      if test -n "$shlibpath_var"; then
-       # We should set the shlibpath_var
-       rpath=
-       for dir in $temp_rpath; do
-         case $dir in
-         [\\/]* | [A-Za-z]:[\\/]*)
-           # Absolute path.
-           rpath="$rpath$dir:"
-           ;;
-         *)
-           # Relative path: add a thisdir entry.
-           rpath="$rpath\$thisdir/$dir:"
-           ;;
-         esac
-       done
-       temp_rpath="$rpath"
-      fi
-
-      if test -n "$compile_shlibpath$finalize_shlibpath"; then
-       compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
-      fi
-      if test -n "$finalize_shlibpath"; then
-       finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
-      fi
-
-      compile_var=
-      finalize_var=
-      if test -n "$runpath_var"; then
-       if test -n "$perm_rpath"; then
-         # We should set the runpath_var.
-         rpath=
-         for dir in $perm_rpath; do
-           rpath="$rpath$dir:"
-         done
-         compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
-       fi
-       if test -n "$finalize_perm_rpath"; then
-         # We should set the runpath_var.
-         rpath=
-         for dir in $finalize_perm_rpath; do
-           rpath="$rpath$dir:"
-         done
-         finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
-       fi
-      fi
-
-      if test "$no_install" = yes; then
-       # We don't need to create a wrapper script.
-       link_command="$compile_var$compile_command$compile_rpath"
-       # Replace the output file specification.
-       link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
-       # Delete the old output file.
-       $run $rm $output
-       # Link the executable and exit
-       $show "$link_command"
-       $run eval "$link_command" || exit $?
-       exit $EXIT_SUCCESS
-      fi
-
-      if test "$hardcode_action" = relink; then
-       # Fast installation is not supported
-       link_command="$compile_var$compile_command$compile_rpath"
-       relink_command="$finalize_var$finalize_command$finalize_rpath"
-
-       $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
-       $echo "$modename: \`$output' will be relinked during installation" 1>&2
-      else
-       if test "$fast_install" != no; then
-         link_command="$finalize_var$compile_command$finalize_rpath"
-         if test "$fast_install" = yes; then
-           relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
-         else
-           # fast_install is set to needless
-           relink_command=
-         fi
-       else
-         link_command="$compile_var$compile_command$compile_rpath"
-         relink_command="$finalize_var$finalize_command$finalize_rpath"
-       fi
-      fi
-
-      # Replace the output file specification.
-      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
-
-      # Delete the old output files.
-      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
-
-      $show "$link_command"
-      $run eval "$link_command" || exit $?
-
-      # Now create the wrapper script.
-      $show "creating $output"
-
-      # Quote the relink command for shipping.
-      if test -n "$relink_command"; then
-       # Preserve any variables that may affect compiler behavior
-       for var in $variables_saved_for_relink; do
-         if eval test -z \"\${$var+set}\"; then
-           relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
-         elif eval var_value=\$$var; test -z "$var_value"; then
-           relink_command="$var=; export $var; $relink_command"
-         else
-           var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
-           relink_command="$var=\"$var_value\"; export $var; $relink_command"
-         fi
-       done
-       relink_command="(cd `pwd`; $relink_command)"
-       relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
-      fi
-
-      # Quote $echo for shipping.
-      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
-       case $progpath in
-       [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
-       *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
-       esac
-       qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
-      else
-       qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
-      fi
-
-      # Only actually do things if our run command is non-null.
-      if test -z "$run"; then
-       # win32 will think the script is a binary if it has
-       # a .exe suffix, so we strip it off here.
-       case $output in
-         *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
-       esac
-       # test for cygwin because mv fails w/o .exe extensions
-       case $host in
-         *cygwin*)
-           exeext=.exe
-           outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
-         *) exeext= ;;
-       esac
-       case $host in
-         *cygwin* | *mingw* )
-           cwrappersource=`$echo ${objdir}/lt-${output}.c`
-           cwrapper=`$echo ${output}.exe`
-           $rm $cwrappersource $cwrapper
-           trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
-
-           cat > $cwrappersource <<EOF
-
-/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
-   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-
-   The $output program cannot be directly executed until all the libtool
-   libraries that it depends on are installed.
-
-   This wrapper executable should never be moved out of the build directory.
-   If it is, it will not operate correctly.
-
-   Currently, it simply execs the wrapper *script* "/bin/sh $output",
-   but could eventually absorb all of the scripts functionality and
-   exec $objdir/$outputname directly.
-*/
-EOF
-           cat >> $cwrappersource<<"EOF"
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <malloc.h>
-#include <stdarg.h>
-#include <assert.h>
-
-#if defined(PATH_MAX)
-# define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
-# define LT_PATHMAX MAXPATHLEN
-#else
-# define LT_PATHMAX 1024
-#endif
-
-#ifndef DIR_SEPARATOR
-#define DIR_SEPARATOR '/'
-#endif
-
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
-  defined (__OS2__)
-#define HAVE_DOS_BASED_FILE_SYSTEM
-#ifndef DIR_SEPARATOR_2
-#define DIR_SEPARATOR_2 '\\'
-#endif
-#endif
-
-#ifndef DIR_SEPARATOR_2
-# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-#else /* DIR_SEPARATOR_2 */
-# define IS_DIR_SEPARATOR(ch) \
-        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-#endif /* DIR_SEPARATOR_2 */
-
-#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
-#define XFREE(stale) do { \
-  if (stale) { free ((void *) stale); stale = 0; } \
-} while (0)
-
-const char *program_name = NULL;
-
-void * xmalloc (size_t num);
-char * xstrdup (const char *string);
-char * basename (const char *name);
-char * fnqualify(const char *path);
-char * strendzap(char *str, const char *pat);
-void lt_fatal (const char *message, ...);
-
-int
-main (int argc, char *argv[])
-{
-  char **newargz;
-  int i;
-
-  program_name = (char *) xstrdup ((char *) basename (argv[0]));
-  newargz = XMALLOC(char *, argc+2);
-EOF
-
-           cat >> $cwrappersource <<EOF
-  newargz[0] = "$SHELL";
-EOF
-
-           cat >> $cwrappersource <<"EOF"
-  newargz[1] = fnqualify(argv[0]);
-  /* we know the script has the same name, without the .exe */
-  /* so make sure newargz[1] doesn't end in .exe */
-  strendzap(newargz[1],".exe");
-  for (i = 1; i < argc; i++)
-    newargz[i+1] = xstrdup(argv[i]);
-  newargz[argc+1] = NULL;
-EOF
-
-           cat >> $cwrappersource <<EOF
-  execv("$SHELL",newargz);
-EOF
-
-           cat >> $cwrappersource <<"EOF"
-}
-
-void *
-xmalloc (size_t num)
-{
-  void * p = (void *) malloc (num);
-  if (!p)
-    lt_fatal ("Memory exhausted");
-
-  return p;
-}
-
-char *
-xstrdup (const char *string)
-{
-  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
-;
-}
-
-char *
-basename (const char *name)
-{
-  const char *base;
-
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  /* Skip over the disk name in MSDOS pathnames. */
-  if (isalpha (name[0]) && name[1] == ':')
-    name += 2;
-#endif
-
-  for (base = name; *name; name++)
-    if (IS_DIR_SEPARATOR (*name))
-      base = name + 1;
-  return (char *) base;
-}
-
-char *
-fnqualify(const char *path)
-{
-  size_t size;
-  char *p;
-  char tmp[LT_PATHMAX + 1];
-
-  assert(path != NULL);
-
-  /* Is it qualified already? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  if (isalpha (path[0]) && path[1] == ':')
-    return xstrdup (path);
-#endif
-  if (IS_DIR_SEPARATOR (path[0]))
-    return xstrdup (path);
-
-  /* prepend the current directory */
-  /* doesn't handle '~' */
-  if (getcwd (tmp, LT_PATHMAX) == NULL)
-    lt_fatal ("getcwd failed");
-  size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
-  p = XMALLOC(char, size);
-  sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
-  return p;
-}
-
-char *
-strendzap(char *str, const char *pat)
-{
-  size_t len, patlen;
-
-  assert(str != NULL);
-  assert(pat != NULL);
-
-  len = strlen(str);
-  patlen = strlen(pat);
-
-  if (patlen <= len)
-  {
-    str += len - patlen;
-    if (strcmp(str, pat) == 0)
-      *str = '\0';
-  }
-  return str;
-}
-
-static void
-lt_error_core (int exit_status, const char * mode,
-          const char * message, va_list ap)
-{
-  fprintf (stderr, "%s: %s: ", program_name, mode);
-  vfprintf (stderr, message, ap);
-  fprintf (stderr, ".\n");
-
-  if (exit_status >= 0)
-    exit (exit_status);
-}
-
-void
-lt_fatal (const char *message, ...)
-{
-  va_list ap;
-  va_start (ap, message);
-  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
-  va_end (ap);
-}
-EOF
-         # we should really use a build-platform specific compiler
-         # here, but OTOH, the wrappers (shell script and this C one)
-         # are only useful if you want to execute the "real" binary.
-         # Since the "real" binary is built for $host, then this
-         # wrapper might as well be built for $host, too.
-         $run $LTCC -s -o $cwrapper $cwrappersource
-         ;;
-       esac
-       $rm $output
-       trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
-
-       $echo > $output "\
-#! $SHELL
-
-# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# The $output program cannot be directly executed until all the libtool
-# libraries that it depends on are installed.
-#
-# This wrapper script should never be moved out of the build directory.
-# If it is, it will not operate correctly.
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='${SED} -e 1s/^X//'
-sed_quote_subst='$sed_quote_subst'
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
-
-relink_command=\"$relink_command\"
-
-# This environment variable determines our operation mode.
-if test \"\$libtool_install_magic\" = \"$magic\"; then
-  # install mode needs the following variable:
-  notinst_deplibs='$notinst_deplibs'
-else
-  # When we are sourced in execute mode, \$file and \$echo are already set.
-  if test \"\$libtool_execute_magic\" != \"$magic\"; then
-    echo=\"$qecho\"
-    file=\"\$0\"
-    # Make sure echo works.
-    if test \"X\$1\" = X--no-reexec; then
-      # Discard the --no-reexec flag, and continue.
-      shift
-    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
-      # Yippee, \$echo works!
-      :
-    else
-      # Restart under the correct shell, and then maybe \$echo will work.
-      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
-    fi
-  fi\
-"
-       $echo >> $output "\
-
-  # Find the directory that this script lives in.
-  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
-  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
-
-  # Follow symbolic links until we get to the real thisdir.
-  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
-  while test -n \"\$file\"; do
-    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
-
-    # If there was a directory component, then change thisdir.
-    if test \"x\$destdir\" != \"x\$file\"; then
-      case \"\$destdir\" in
-      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
-      *) thisdir=\"\$thisdir/\$destdir\" ;;
-      esac
-    fi
-
-    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
-    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
-  done
-
-  # Try to get the absolute directory name.
-  absdir=\`cd \"\$thisdir\" && pwd\`
-  test -n \"\$absdir\" && thisdir=\"\$absdir\"
-"
-
-       if test "$fast_install" = yes; then
-         $echo >> $output "\
-  program=lt-'$outputname'$exeext
-  progdir=\"\$thisdir/$objdir\"
-
-  if test ! -f \"\$progdir/\$program\" || \\
-     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
-       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
-
-    file=\"\$\$-\$program\"
-
-    if test ! -d \"\$progdir\"; then
-      $mkdir \"\$progdir\"
-    else
-      $rm \"\$progdir/\$file\"
-    fi"
-
-         $echo >> $output "\
-
-    # relink executable if necessary
-    if test -n \"\$relink_command\"; then
-      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
-      else
-       $echo \"\$relink_command_output\" >&2
-       $rm \"\$progdir/\$file\"
-       exit $EXIT_FAILURE
-      fi
-    fi
-
-    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
-    { $rm \"\$progdir/\$program\";
-      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
-    $rm \"\$progdir/\$file\"
-  fi"
-       else
-         $echo >> $output "\
-  program='$outputname'
-  progdir=\"\$thisdir/$objdir\"
-"
-       fi
-
-       $echo >> $output "\
-
-  if test -f \"\$progdir/\$program\"; then"
-
-       # Export our shlibpath_var if we have one.
-       if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
-         $echo >> $output "\
-    # Add our own library path to $shlibpath_var
-    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
-
-    # Some systems cannot cope with colon-terminated $shlibpath_var
-    # The second colon is a workaround for a bug in BeOS R4 sed
-    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
-
-    export $shlibpath_var
-"
-       fi
-
-       # fixup the dll searchpath if we need to.
-       if test -n "$dllsearchpath"; then
-         $echo >> $output "\
-    # Add the dll search path components to the executable PATH
-    PATH=$dllsearchpath:\$PATH
-"
-       fi
-
-       $echo >> $output "\
-    if test \"\$libtool_execute_magic\" != \"$magic\"; then
-      # Run the actual program with our arguments.
-"
-       case $host in
-       # Backslashes separate directories on plain windows
-       *-*-mingw | *-*-os2*)
-         $echo >> $output "\
-      exec \$progdir\\\\\$program \${1+\"\$@\"}
-"
-         ;;
-
-       *)
-         $echo >> $output "\
-      exec \$progdir/\$program \${1+\"\$@\"}
-"
-         ;;
-       esac
-       $echo >> $output "\
-      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
-      exit $EXIT_FAILURE
-    fi
-  else
-    # The program doesn't exist.
-    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
-    \$echo \"This script is just a wrapper for \$program.\" 1>&2
-    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
-    exit $EXIT_FAILURE
-  fi
-fi\
-"
-       chmod +x $output
-      fi
-      exit $EXIT_SUCCESS
-      ;;
-    esac
-
-    # See if we need to build an old-fashioned archive.
-    for oldlib in $oldlibs; do
-
-      if test "$build_libtool_libs" = convenience; then
-       oldobjs="$libobjs_save"
-       addlibs="$convenience"
-       build_libtool_libs=no
-      else
-       if test "$build_libtool_libs" = module; then
-         oldobjs="$libobjs_save"
-         build_libtool_libs=no
-       else
-         oldobjs="$old_deplibs $non_pic_objects"
-       fi
-       addlibs="$old_convenience"
-      fi
-
-      if test -n "$addlibs"; then
-       gentop="$output_objdir/${outputname}x"
-       $show "${rm}r $gentop"
-       $run ${rm}r "$gentop"
-       $show "$mkdir $gentop"
-       $run $mkdir "$gentop"
-       status=$?
-       if test "$status" -ne 0 && test ! -d "$gentop"; then
-         exit $status
-       fi
-       generated="$generated $gentop"
-
-       # Add in members from convenience archives.
-       for xlib in $addlibs; do
-         # Extract the objects.
-         case $xlib in
-         [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-         *) xabs=`pwd`"/$xlib" ;;
-         esac
-         xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-         xdir="$gentop/$xlib"
-
-         $show "${rm}r $xdir"
-         $run ${rm}r "$xdir"
-         $show "$mkdir $xdir"
-         $run $mkdir "$xdir"
-         status=$?
-         if test "$status" -ne 0 && test ! -d "$xdir"; then
-           exit $status
-         fi
-         # We will extract separately just the conflicting names and we will no
-         # longer touch any unique names. It is faster to leave these extract
-         # automatically by $AR in one run.
-         $show "(cd $xdir && $AR x $xabs)"
-         $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-         if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
-           :
-         else
-           $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
-           $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
-           $AR t "$xabs" | sort | uniq -cd | while read -r count name
-           do
-             i=1
-             while test "$i" -le "$count"
-             do
-              # Put our $i before any first dot (extension)
-              # Never overwrite any file
-              name_to="$name"
-              while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
-              do
-                name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
-              done
-              $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
-              $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
-              i=`expr $i + 1`
-             done
-           done
-         fi
-
-         oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
-       done
-      fi
-
-      # Do each command in the archive commands.
-      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
-       cmds=$old_archive_from_new_cmds
-      else
-       eval cmds=\"$old_archive_cmds\"
-
-       if len=`expr "X$cmds" : ".*"` &&
-            test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-         cmds=$old_archive_cmds
-       else
-         # the command line is too long to link in one step, link in parts
-         $echo "using piecewise archive linking..."
-         save_RANLIB=$RANLIB
-         RANLIB=:
-         objlist=
-         concat_cmds=
-         save_oldobjs=$oldobjs
-         # GNU ar 2.10+ was changed to match POSIX; thus no paths are
-         # encoded into archives.  This makes 'ar r' malfunction in
-         # this piecewise linking case whenever conflicting object
-         # names appear in distinct ar calls; check, warn and compensate.
-           if (for obj in $save_oldobjs
-           do
-             $echo "X$obj" | $Xsed -e 's%^.*/%%'
-           done | sort | sort -uc >/dev/null 2>&1); then
-           :
-         else
-           $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
-           $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
-           AR_FLAGS=cq
-         fi
-         # Is there a better way of finding the last object in the list?
-         for obj in $save_oldobjs
-         do
-           last_oldobj=$obj
-         done
-         for obj in $save_oldobjs
-         do
-           oldobjs="$objlist $obj"
-           objlist="$objlist $obj"
-           eval test_cmds=\"$old_archive_cmds\"
-           if len=`expr "X$test_cmds" : ".*"` &&
-              test "$len" -le "$max_cmd_len"; then
-             :
-           else
-             # the above command should be used before it gets too long
-             oldobjs=$objlist
-             if test "$obj" = "$last_oldobj" ; then
-               RANLIB=$save_RANLIB
-             fi
-             test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-             eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
-             objlist=
-           fi
-         done
-         RANLIB=$save_RANLIB
-         oldobjs=$objlist
-         if test "X$oldobjs" = "X" ; then
-           eval cmds=\"\$concat_cmds\"
-         else
-           eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
-         fi
-       fi
-      fi
-      save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-        eval cmd=\"$cmd\"
-       IFS="$save_ifs"
-       $show "$cmd"
-       $run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-    done
-
-    if test -n "$generated"; then
-      $show "${rm}r$generated"
-      $run ${rm}r$generated
-    fi
-
-    # Now create the libtool archive.
-    case $output in
-    *.la)
-      old_library=
-      test "$build_old_libs" = yes && old_library="$libname.$libext"
-      $show "creating $output"
-
-      # Preserve any variables that may affect compiler behavior
-      for var in $variables_saved_for_relink; do
-       if eval test -z \"\${$var+set}\"; then
-         relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
-       elif eval var_value=\$$var; test -z "$var_value"; then
-         relink_command="$var=; export $var; $relink_command"
-       else
-         var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
-         relink_command="$var=\"$var_value\"; export $var; $relink_command"
-       fi
-      done
-      # Quote the link command for shipping.
-      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
-      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
-      if test "$hardcode_automatic" = yes ; then
-       relink_command=
-      fi
-
-
-      # Only create the output if not a dry run.
-      if test -z "$run"; then
-       for installed in no yes; do
-         if test "$installed" = yes; then
-           if test -z "$install_libdir"; then
-             break
-           fi
-           output="$output_objdir/$outputname"i
-           # Replace all uninstalled libtool libraries with the installed ones
-           newdependency_libs=
-           for deplib in $dependency_libs; do
-             case $deplib in
-             *.la)
-               name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
-               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
-               if test -z "$libdir"; then
-                 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
-                 exit $EXIT_FAILURE
-               fi
-               newdependency_libs="$newdependency_libs $libdir/$name"
-               ;;
-             *) newdependency_libs="$newdependency_libs $deplib" ;;
-             esac
-           done
-           dependency_libs="$newdependency_libs"
-           newdlfiles=
-           for lib in $dlfiles; do
-             name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-             eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
-             if test -z "$libdir"; then
-               $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-               exit $EXIT_FAILURE
-             fi
-             newdlfiles="$newdlfiles $libdir/$name"
-           done
-           dlfiles="$newdlfiles"
-           newdlprefiles=
-           for lib in $dlprefiles; do
-             name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-             eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
-             if test -z "$libdir"; then
-               $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-               exit $EXIT_FAILURE
-             fi
-             newdlprefiles="$newdlprefiles $libdir/$name"
-           done
-           dlprefiles="$newdlprefiles"
-         else
-           newdlfiles=
-           for lib in $dlfiles; do
-             case $lib in
-               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
-               *) abs=`pwd`"/$lib" ;;
-             esac
-             newdlfiles="$newdlfiles $abs"
-           done
-           dlfiles="$newdlfiles"
-           newdlprefiles=
-           for lib in $dlprefiles; do
-             case $lib in
-               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
-               *) abs=`pwd`"/$lib" ;;
-             esac
-             newdlprefiles="$newdlprefiles $abs"
-           done
-           dlprefiles="$newdlprefiles"
-         fi
-         $rm $output
-         # place dlname in correct position for cygwin
-         tdlname=$dlname
-         case $host,$output,$installed,$module,$dlname in
-           *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
-         esac
-         $echo > $output "\
-# $outputname - a libtool library file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname='$tdlname'
-
-# Names of this library.
-library_names='$library_names'
-
-# The name of the static archive.
-old_library='$old_library'
-
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
-
-# Version information for $libname.
-current=$current
-age=$age
-revision=$revision
-
-# Is this an already installed library?
-installed=$installed
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=$module
-
-# Files to dlopen/dlpreopen
-dlopen='$dlfiles'
-dlpreopen='$dlprefiles'
-
-# Directory that this library needs to be installed in:
-libdir='$install_libdir'"
-         if test "$installed" = no && test "$need_relink" = yes; then
-           $echo >> $output "\
-relink_command=\"$relink_command\""
-         fi
-       done
-      fi
-
-      # Do a symbolic link so that the libtool archive can be found in
-      # LD_LIBRARY_PATH before the program is installed.
-      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
-      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
-      ;;
-    esac
-    exit $EXIT_SUCCESS
-    ;;
-
-  # libtool install mode
-  install)
-    modename="$modename: install"
-
-    # There may be an optional sh(1) argument at the beginning of
-    # install_prog (especially on Windows NT).
-    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
-       # Allow the use of GNU shtool's install command.
-       $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
-      # Aesthetically quote it.
-      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
-      case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*)
-       arg="\"$arg\""
-       ;;
-      esac
-      install_prog="$arg "
-      arg="$1"
-      shift
-    else
-      install_prog=
-      arg="$nonopt"
-    fi
-
-    # The real first argument should be the name of the installation program.
-    # Aesthetically quote it.
-    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-    case $arg in
-    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \      ]*|*]*)
-      arg="\"$arg\""
-      ;;
-    esac
-    install_prog="$install_prog$arg"
-
-    # We need to accept at least all the BSD install flags.
-    dest=
-    files=
-    opts=
-    prev=
-    install_type=
-    isdir=no
-    stripme=
-    for arg
-    do
-      if test -n "$dest"; then
-       files="$files $dest"
-       dest="$arg"
-       continue
-      fi
-
-      case $arg in
-      -d) isdir=yes ;;
-      -f) prev="-f" ;;
-      -g) prev="-g" ;;
-      -m) prev="-m" ;;
-      -o) prev="-o" ;;
-      -s)
-       stripme=" -s"
-       continue
-       ;;
-      -*) ;;
-
-      *)
-       # If the previous option needed an argument, then skip it.
-       if test -n "$prev"; then
-         prev=
-       else
-         dest="$arg"
-         continue
-       fi
-       ;;
-      esac
-
-      # Aesthetically quote the argument.
-      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-      case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*)
-       arg="\"$arg\""
-       ;;
-      esac
-      install_prog="$install_prog $arg"
-    done
-
-    if test -z "$install_prog"; then
-      $echo "$modename: you must specify an install program" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
-
-    if test -n "$prev"; then
-      $echo "$modename: the \`$prev' option requires an argument" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
-
-    if test -z "$files"; then
-      if test -z "$dest"; then
-       $echo "$modename: no file or destination specified" 1>&2
-      else
-       $echo "$modename: you must specify a destination" 1>&2
-      fi
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
-
-    # Strip any trailing slash from the destination.
-    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
-
-    # Check to see that the destination is a directory.
-    test -d "$dest" && isdir=yes
-    if test "$isdir" = yes; then
-      destdir="$dest"
-      destname=
-    else
-      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
-      test "X$destdir" = "X$dest" && destdir=.
-      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
-
-      # Not a directory, so check to see that there is only one file specified.
-      set dummy $files
-      if test "$#" -gt 2; then
-       $echo "$modename: \`$dest' is not a directory" 1>&2
-       $echo "$help" 1>&2
-       exit $EXIT_FAILURE
-      fi
-    fi
-    case $destdir in
-    [\\/]* | [A-Za-z]:[\\/]*) ;;
-    *)
-      for file in $files; do
-       case $file in
-       *.lo) ;;
-       *)
-         $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
-         $echo "$help" 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
-      done
-      ;;
-    esac
-
-    # This variable tells wrapper scripts just to set variables rather
-    # than running their programs.
-    libtool_install_magic="$magic"
-
-    staticlibs=
-    future_libdirs=
-    current_libdirs=
-    for file in $files; do
-
-      # Do each installation.
-      case $file in
-      *.$libext)
-       # Do the static libraries later.
-       staticlibs="$staticlibs $file"
-       ;;
-
-      *.la)
-       # Check to see that this really is a libtool archive.
-       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-       else
-         $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
-         $echo "$help" 1>&2
-         exit $EXIT_FAILURE
-       fi
-
-       library_names=
-       old_library=
-       relink_command=
-       # If there is no directory component, then add one.
-       case $file in
-       */* | *\\*) . $file ;;
-       *) . ./$file ;;
-       esac
-
-       # Add the libdir to current_libdirs if it is the destination.
-       if test "X$destdir" = "X$libdir"; then
-         case "$current_libdirs " in
-         *" $libdir "*) ;;
-         *) current_libdirs="$current_libdirs $libdir" ;;
-         esac
-       else
-         # Note the libdir as a future libdir.
-         case "$future_libdirs " in
-         *" $libdir "*) ;;
-         *) future_libdirs="$future_libdirs $libdir" ;;
-         esac
-       fi
-
-       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
-       test "X$dir" = "X$file/" && dir=
-       dir="$dir$objdir"
-
-       if test -n "$relink_command"; then
-         # Determine the prefix the user has applied to our future dir.
-         inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
-
-         # Don't allow the user to place us outside of our expected
-         # location b/c this prevents finding dependent libraries that
-         # are installed to the same prefix.
-         # At present, this check doesn't affect windows .dll's that
-         # are installed into $libdir/../bin (currently, that works fine)
-         # but it's something to keep an eye on.
-         if test "$inst_prefix_dir" = "$destdir"; then
-           $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
-           exit $EXIT_FAILURE
-         fi
-
-         if test -n "$inst_prefix_dir"; then
-           # Stick the inst_prefix_dir data into the link command.
-           relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
-         else
-           relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
-         fi
-
-         $echo "$modename: warning: relinking \`$file'" 1>&2
-         $show "$relink_command"
-         if $run eval "$relink_command"; then :
-         else
-           $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
-           exit $EXIT_FAILURE
-         fi
-       fi
-
-       # See the names of the shared library.
-       set dummy $library_names
-       if test -n "$2"; then
-         realname="$2"
-         shift
-         shift
-
-         srcname="$realname"
-         test -n "$relink_command" && srcname="$realname"T
-
-         # Install the shared library and build the symlinks.
-         $show "$install_prog $dir/$srcname $destdir/$realname"
-         $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
-         if test -n "$stripme" && test -n "$striplib"; then
-           $show "$striplib $destdir/$realname"
-           $run eval "$striplib $destdir/$realname" || exit $?
-         fi
-
-         if test "$#" -gt 0; then
-           # Delete the old symlinks, and create new ones.
-           for linkname
-           do
-             if test "$linkname" != "$realname"; then
-               $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
-               $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
-             fi
-           done
-         fi
-
-         # Do each command in the postinstall commands.
-         lib="$destdir/$realname"
-         cmds=$postinstall_cmds
-         save_ifs="$IFS"; IFS='~'
-         for cmd in $cmds; do
-           IFS="$save_ifs"
-           eval cmd=\"$cmd\"
-           $show "$cmd"
-           $run eval "$cmd" || exit $?
-         done
-         IFS="$save_ifs"
-       fi
-
-       # Install the pseudo-library for information purposes.
-       name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-       instname="$dir/$name"i
-       $show "$install_prog $instname $destdir/$name"
-       $run eval "$install_prog $instname $destdir/$name" || exit $?
-
-       # Maybe install the static library, too.
-       test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
-       ;;
-
-      *.lo)
-       # Install (i.e. copy) a libtool object.
-
-       # Figure out destination file name, if it wasn't already specified.
-       if test -n "$destname"; then
-         destfile="$destdir/$destname"
-       else
-         destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-         destfile="$destdir/$destfile"
-       fi
-
-       # Deduce the name of the destination old-style object file.
-       case $destfile in
-       *.lo)
-         staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
-         ;;
-       *.$objext)
-         staticdest="$destfile"
-         destfile=
-         ;;
-       *)
-         $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
-         $echo "$help" 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
-
-       # Install the libtool object if requested.
-       if test -n "$destfile"; then
-         $show "$install_prog $file $destfile"
-         $run eval "$install_prog $file $destfile" || exit $?
-       fi
-
-       # Install the old object if enabled.
-       if test "$build_old_libs" = yes; then
-         # Deduce the name of the old-style object file.
-         staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
-
-         $show "$install_prog $staticobj $staticdest"
-         $run eval "$install_prog \$staticobj \$staticdest" || exit $?
-       fi
-       exit $EXIT_SUCCESS
-       ;;
-
-      *)
-       # Figure out destination file name, if it wasn't already specified.
-       if test -n "$destname"; then
-         destfile="$destdir/$destname"
-       else
-         destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-         destfile="$destdir/$destfile"
-       fi
-
-       # If the file is missing, and there is a .exe on the end, strip it
-       # because it is most likely a libtool script we actually want to
-       # install
-       stripped_ext=""
-       case $file in
-         *.exe)
-           if test ! -f "$file"; then
-             file=`$echo $file|${SED} 's,.exe$,,'`
-             stripped_ext=".exe"
-           fi
-           ;;
-       esac
-
-       # Do a test to see if this is really a libtool program.
-       case $host in
-       *cygwin*|*mingw*)
-           wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
-           ;;
-       *)
-           wrapper=$file
-           ;;
-       esac
-       if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
-         notinst_deplibs=
-         relink_command=
-
-         # To insure that "foo" is sourced, and not "foo.exe",
-         # finese the cygwin/MSYS system by explicitly sourcing "foo."
-         # which disallows the automatic-append-.exe behavior.
-         case $build in
-         *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
-         *) wrapperdot=${wrapper} ;;
-         esac
-         # If there is no directory component, then add one.
-         case $file in
-         */* | *\\*) . ${wrapperdot} ;;
-         *) . ./${wrapperdot} ;;
-         esac
-
-         # Check the variables that should have been set.
-         if test -z "$notinst_deplibs"; then
-           $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
-           exit $EXIT_FAILURE
-         fi
-
-         finalize=yes
-         for lib in $notinst_deplibs; do
-           # Check to see that each library is installed.
-           libdir=
-           if test -f "$lib"; then
-             # If there is no directory component, then add one.
-             case $lib in
-             */* | *\\*) . $lib ;;
-             *) . ./$lib ;;
-             esac
-           fi
-           libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
-           if test -n "$libdir" && test ! -f "$libfile"; then
-             $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
-             finalize=no
-           fi
-         done
-
-         relink_command=
-         # To insure that "foo" is sourced, and not "foo.exe",
-         # finese the cygwin/MSYS system by explicitly sourcing "foo."
-         # which disallows the automatic-append-.exe behavior.
-         case $build in
-         *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
-         *) wrapperdot=${wrapper} ;;
-         esac
-         # If there is no directory component, then add one.
-         case $file in
-         */* | *\\*) . ${wrapperdot} ;;
-         *) . ./${wrapperdot} ;;
-         esac
-
-         outputname=
-         if test "$fast_install" = no && test -n "$relink_command"; then
-           if test "$finalize" = yes && test -z "$run"; then
-             tmpdir="/tmp"
-             test -n "$TMPDIR" && tmpdir="$TMPDIR"
-             tmpdir="$tmpdir/libtool-$$"
-             save_umask=`umask`
-             umask 0077
-             if $mkdir "$tmpdir"; then
-               umask $save_umask
-             else
-               umask $save_umask
-               $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
-               continue
-             fi
-             file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
-             outputname="$tmpdir/$file"
-             # Replace the output file specification.
-             relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
-
-             $show "$relink_command"
-             if $run eval "$relink_command"; then :
-             else
-               $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
-               ${rm}r "$tmpdir"
-               continue
-             fi
-             file="$outputname"
-           else
-             $echo "$modename: warning: cannot relink \`$file'" 1>&2
-           fi
-         else
-           # Install the binary that we compiled earlier.
-           file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
-         fi
-       fi
-
-       # remove .exe since cygwin /usr/bin/install will append another
-       # one anyways
-       case $install_prog,$host in
-       */usr/bin/install*,*cygwin*)
-         case $file:$destfile in
-         *.exe:*.exe)
-           # this is ok
-           ;;
-         *.exe:*)
-           destfile=$destfile.exe
-           ;;
-         *:*.exe)
-           destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
-           ;;
-         esac
-         ;;
-       esac
-       $show "$install_prog$stripme $file $destfile"
-       $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
-       test -n "$outputname" && ${rm}r "$tmpdir"
-       ;;
-      esac
-    done
-
-    for file in $staticlibs; do
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-
-      # Set up the ranlib parameters.
-      oldlib="$destdir/$name"
-
-      $show "$install_prog $file $oldlib"
-      $run eval "$install_prog \$file \$oldlib" || exit $?
-
-      if test -n "$stripme" && test -n "$old_striplib"; then
-       $show "$old_striplib $oldlib"
-       $run eval "$old_striplib $oldlib" || exit $?
-      fi
-
-      # Do each command in the postinstall commands.
-      cmds=$old_postinstall_cmds
-      save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-       IFS="$save_ifs"
-       eval cmd=\"$cmd\"
-       $show "$cmd"
-       $run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-    done
-
-    if test -n "$future_libdirs"; then
-      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
-    fi
-
-    if test -n "$current_libdirs"; then
-      # Maybe just do a dry run.
-      test -n "$run" && current_libdirs=" -n$current_libdirs"
-      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
-    else
-      exit $EXIT_SUCCESS
-    fi
-    ;;
-
-  # libtool finish mode
-  finish)
-    modename="$modename: finish"
-    libdirs="$nonopt"
-    admincmds=
-
-    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
-      for dir
-      do
-       libdirs="$libdirs $dir"
-      done
-
-      for libdir in $libdirs; do
-       if test -n "$finish_cmds"; then
-         # Do each command in the finish commands.
-         cmds=$finish_cmds
-         save_ifs="$IFS"; IFS='~'
-         for cmd in $cmds; do
-           IFS="$save_ifs"
-           eval cmd=\"$cmd\"
-           $show "$cmd"
-           $run eval "$cmd" || admincmds="$admincmds
-       $cmd"
-         done
-         IFS="$save_ifs"
-       fi
-       if test -n "$finish_eval"; then
-         # Do the single finish_eval.
-         eval cmds=\"$finish_eval\"
-         $run eval "$cmds" || admincmds="$admincmds
-       $cmds"
-       fi
-      done
-    fi
-
-    # Exit here if they wanted silent mode.
-    test "$show" = : && exit $EXIT_SUCCESS
-
-    $echo "----------------------------------------------------------------------"
-    $echo "Libraries have been installed in:"
-    for libdir in $libdirs; do
-      $echo "   $libdir"
-    done
-    $echo
-    $echo "If you ever happen to want to link against installed libraries"
-    $echo "in a given directory, LIBDIR, you must either use libtool, and"
-    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
-    $echo "flag during linking and do at least one of the following:"
-    if test -n "$shlibpath_var"; then
-      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
-      $echo "     during execution"
-    fi
-    if test -n "$runpath_var"; then
-      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
-      $echo "     during linking"
-    fi
-    if test -n "$hardcode_libdir_flag_spec"; then
-      libdir=LIBDIR
-      eval flag=\"$hardcode_libdir_flag_spec\"
-
-      $echo "   - use the \`$flag' linker flag"
-    fi
-    if test -n "$admincmds"; then
-      $echo "   - have your system administrator run these commands:$admincmds"
-    fi
-    if test -f /etc/ld.so.conf; then
-      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
-    fi
-    $echo
-    $echo "See any operating system documentation about shared libraries for"
-    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
-    $echo "----------------------------------------------------------------------"
-    exit $EXIT_SUCCESS
-    ;;
-
-  # libtool execute mode
-  execute)
-    modename="$modename: execute"
-
-    # The first argument is the command name.
-    cmd="$nonopt"
-    if test -z "$cmd"; then
-      $echo "$modename: you must specify a COMMAND" 1>&2
-      $echo "$help"
-      exit $EXIT_FAILURE
-    fi
-
-    # Handle -dlopen flags immediately.
-    for file in $execute_dlfiles; do
-      if test ! -f "$file"; then
-       $echo "$modename: \`$file' is not a file" 1>&2
-       $echo "$help" 1>&2
-       exit $EXIT_FAILURE
-      fi
-
-      dir=
-      case $file in
-      *.la)
-       # Check to see that this really is a libtool archive.
-       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-       else
-         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-         $echo "$help" 1>&2
-         exit $EXIT_FAILURE
-       fi
-
-       # Read the libtool library.
-       dlname=
-       library_names=
-
-       # If there is no directory component, then add one.
-       case $file in
-       */* | *\\*) . $file ;;
-       *) . ./$file ;;
-       esac
-
-       # Skip this library if it cannot be dlopened.
-       if test -z "$dlname"; then
-         # Warn if it was a shared library.
-         test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
-         continue
-       fi
-
-       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-       test "X$dir" = "X$file" && dir=.
-
-       if test -f "$dir/$objdir/$dlname"; then
-         dir="$dir/$objdir"
-       else
-         $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
-         exit $EXIT_FAILURE
-       fi
-       ;;
-
-      *.lo)
-       # Just add the directory containing the .lo file.
-       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-       test "X$dir" = "X$file" && dir=.
-       ;;
-
-      *)
-       $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
-       continue
-       ;;
-      esac
-
-      # Get the absolute pathname.
-      absdir=`cd "$dir" && pwd`
-      test -n "$absdir" && dir="$absdir"
-
-      # Now add the directory to shlibpath_var.
-      if eval "test -z \"\$$shlibpath_var\""; then
-       eval "$shlibpath_var=\"\$dir\""
-      else
-       eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
-      fi
-    done
-
-    # This variable tells wrapper scripts just to set shlibpath_var
-    # rather than running their programs.
-    libtool_execute_magic="$magic"
-
-    # Check if any of the arguments is a wrapper script.
-    args=
-    for file
-    do
-      case $file in
-      -*) ;;
-      *)
-       # Do a test to see if this is really a libtool program.
-       if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-         # If there is no directory component, then add one.
-         case $file in
-         */* | *\\*) . $file ;;
-         *) . ./$file ;;
-         esac
-
-         # Transform arg to wrapped name.
-         file="$progdir/$program"
-       fi
-       ;;
-      esac
-      # Quote arguments (to preserve shell metacharacters).
-      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
-      args="$args \"$file\""
-    done
-
-    if test -z "$run"; then
-      if test -n "$shlibpath_var"; then
-       # Export the shlibpath_var.
-       eval "export $shlibpath_var"
-      fi
-
-      # Restore saved environment variables
-      if test "${save_LC_ALL+set}" = set; then
-       LC_ALL="$save_LC_ALL"; export LC_ALL
-      fi
-      if test "${save_LANG+set}" = set; then
-       LANG="$save_LANG"; export LANG
-      fi
-
-      # Now prepare to actually exec the command.
-      exec_cmd="\$cmd$args"
-    else
-      # Display what would be done.
-      if test -n "$shlibpath_var"; then
-       eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
-       $echo "export $shlibpath_var"
-      fi
-      $echo "$cmd$args"
-      exit $EXIT_SUCCESS
-    fi
-    ;;
-
-  # libtool clean and uninstall mode
-  clean | uninstall)
-    modename="$modename: $mode"
-    rm="$nonopt"
-    files=
-    rmforce=
-    exit_status=0
-
-    # This variable tells wrapper scripts just to set variables rather
-    # than running their programs.
-    libtool_install_magic="$magic"
-
-    for arg
-    do
-      case $arg in
-      -f) rm="$rm $arg"; rmforce=yes ;;
-      -*) rm="$rm $arg" ;;
-      *) files="$files $arg" ;;
-      esac
-    done
-
-    if test -z "$rm"; then
-      $echo "$modename: you must specify an RM program" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
-
-    rmdirs=
-
-    origobjdir="$objdir"
-    for file in $files; do
-      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-      if test "X$dir" = "X$file"; then
-       dir=.
-       objdir="$origobjdir"
-      else
-       objdir="$dir/$origobjdir"
-      fi
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-      test "$mode" = uninstall && objdir="$dir"
-
-      # Remember objdir for removal later, being careful to avoid duplicates
-      if test "$mode" = clean; then
-       case " $rmdirs " in
-         *" $objdir "*) ;;
-         *) rmdirs="$rmdirs $objdir" ;;
-       esac
-      fi
-
-      # Don't error if the file doesn't exist and rm -f was used.
-      if (test -L "$file") >/dev/null 2>&1 \
-       || (test -h "$file") >/dev/null 2>&1 \
-       || test -f "$file"; then
-       :
-      elif test -d "$file"; then
-       exit_status=1
-       continue
-      elif test "$rmforce" = yes; then
-       continue
-      fi
-
-      rmfiles="$file"
-
-      case $name in
-      *.la)
-       # Possibly a libtool archive, so verify it.
-       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-         . $dir/$name
-
-         # Delete the libtool libraries and symlinks.
-         for n in $library_names; do
-           rmfiles="$rmfiles $objdir/$n"
-         done
-         test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
-         test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
-
-         if test "$mode" = uninstall; then
-           if test -n "$library_names"; then
-             # Do each command in the postuninstall commands.
-             cmds=$postuninstall_cmds
-             save_ifs="$IFS"; IFS='~'
-             for cmd in $cmds; do
-               IFS="$save_ifs"
-               eval cmd=\"$cmd\"
-               $show "$cmd"
-               $run eval "$cmd"
-               if test "$?" -ne 0 && test "$rmforce" != yes; then
-                 exit_status=1
-               fi
-             done
-             IFS="$save_ifs"
-           fi
-
-           if test -n "$old_library"; then
-             # Do each command in the old_postuninstall commands.
-             cmds=$old_postuninstall_cmds
-             save_ifs="$IFS"; IFS='~'
-             for cmd in $cmds; do
-               IFS="$save_ifs"
-               eval cmd=\"$cmd\"
-               $show "$cmd"
-               $run eval "$cmd"
-               if test "$?" -ne 0 && test "$rmforce" != yes; then
-                 exit_status=1
-               fi
-             done
-             IFS="$save_ifs"
-           fi
-           # FIXME: should reinstall the best remaining shared library.
-         fi
-       fi
-       ;;
-
-      *.lo)
-       # Possibly a libtool object, so verify it.
-       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-
-         # Read the .lo file
-         . $dir/$name
-
-         # Add PIC object to the list of files to remove.
-         if test -n "$pic_object" \
-            && test "$pic_object" != none; then
-           rmfiles="$rmfiles $dir/$pic_object"
-         fi
-
-         # Add non-PIC object to the list of files to remove.
-         if test -n "$non_pic_object" \
-            && test "$non_pic_object" != none; then
-           rmfiles="$rmfiles $dir/$non_pic_object"
-         fi
-       fi
-       ;;
-
-      *)
-       if test "$mode" = clean ; then
-         noexename=$name
-         case $file in
-         *.exe)
-           file=`$echo $file|${SED} 's,.exe$,,'`
-           noexename=`$echo $name|${SED} 's,.exe$,,'`
-           # $file with .exe has already been added to rmfiles,
-           # add $file without .exe
-           rmfiles="$rmfiles $file"
-           ;;
-         esac
-         # Do a test to see if this is a libtool program.
-         if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-           relink_command=
-           . $dir/$noexename
-
-           # note $name still contains .exe if it was in $file originally
-           # as does the version of $file that was added into $rmfiles
-           rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
-           if test "$fast_install" = yes && test -n "$relink_command"; then
-             rmfiles="$rmfiles $objdir/lt-$name"
-           fi
-           if test "X$noexename" != "X$name" ; then
-             rmfiles="$rmfiles $objdir/lt-${noexename}.c"
-           fi
-         fi
-       fi
-       ;;
-      esac
-      $show "$rm $rmfiles"
-      $run $rm $rmfiles || exit_status=1
-    done
-    objdir="$origobjdir"
-
-    # Try to remove the ${objdir}s in the directories where we deleted files
-    for dir in $rmdirs; do
-      if test -d "$dir"; then
-       $show "rmdir $dir"
-       $run rmdir $dir >/dev/null 2>&1
-      fi
-    done
-
-    exit $exit_status
-    ;;
-
-  "")
-    $echo "$modename: you must specify a MODE" 1>&2
-    $echo "$generic_help" 1>&2
-    exit $EXIT_FAILURE
-    ;;
-  esac
-
-  if test -z "$exec_cmd"; then
-    $echo "$modename: invalid operation mode \`$mode'" 1>&2
-    $echo "$generic_help" 1>&2
-    exit $EXIT_FAILURE
-  fi
-fi # test -z "$show_help"
-
-if test -n "$exec_cmd"; then
-  eval exec $exec_cmd
-  exit $EXIT_FAILURE
-fi
-
-# We need to display help for each of the modes.
-case $mode in
-"") $echo \
-"Usage: $modename [OPTION]... [MODE-ARG]...
-
-Provide generalized library-building support services.
-
-    --config          show all configuration variables
-    --debug           enable verbose shell tracing
--n, --dry-run         display commands without modifying any files
-    --features        display basic configuration information and exit
-    --finish          same as \`--mode=finish'
-    --help            display this help message and exit
-    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
-    --quiet           same as \`--silent'
-    --silent          don't print informational messages
-    --tag=TAG         use configuration variables from tag TAG
-    --version         print version information
-
-MODE must be one of the following:
-
-      clean           remove files from the build directory
-      compile         compile a source file into a libtool object
-      execute         automatically set library path, then run a program
-      finish          complete the installation of libtool libraries
-      install         install libraries or executables
-      link            create a library or an executable
-      uninstall       remove libraries from an installed directory
-
-MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
-a more detailed description of MODE.
-
-Report bugs to <bug-libtool@gnu.org>."
-  exit $EXIT_SUCCESS
-  ;;
-
-clean)
-  $echo \
-"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
-
-Remove files from the build directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, object or program, all the files associated
-with it are deleted. Otherwise, only FILE itself is deleted using RM."
-  ;;
-
-compile)
-  $echo \
-"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
-
-Compile a source file into a libtool library object.
-
-This mode accepts the following additional options:
-
-  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
-  -prefer-pic       try to building PIC objects only
-  -prefer-non-pic   try to building non-PIC objects only
-  -static           always build a \`.o' file suitable for static linking
-
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
-from the given SOURCEFILE.
-
-The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
-  ;;
-
-execute)
-  $echo \
-"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
-
-Automatically set library path, then run a program.
-
-This mode accepts the following additional options:
-
-  -dlopen FILE      add the directory containing FILE to the library path
-
-This mode sets the library path environment variable according to \`-dlopen'
-flags.
-
-If any of the ARGS are libtool executable wrappers, then they are translated
-into their corresponding uninstalled binary, and any of their required library
-directories are added to the library path.
-
-Then, COMMAND is executed, with ARGS as arguments."
-  ;;
-
-finish)
-  $echo \
-"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
-
-Complete the installation of libtool libraries.
-
-Each LIBDIR is a directory that contains libtool libraries.
-
-The commands that this mode executes may require superuser privileges.  Use
-the \`--dry-run' option if you just want to see what would be executed."
-  ;;
-
-install)
-  $echo \
-"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
-
-Install executables or libraries.
-
-INSTALL-COMMAND is the installation command.  The first component should be
-either the \`install' or \`cp' program.
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
-  ;;
-
-link)
-  $echo \
-"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
-
-Link object files or libraries together to form another library, or to
-create an executable program.
-
-LINK-COMMAND is a command using the C compiler that you would use to create
-a program from several object files.
-
-The following components of LINK-COMMAND are treated specially:
-
-  -all-static       do not do any dynamic linking at all
-  -avoid-version    do not add a version suffix if possible
-  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
-  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
-  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-  -export-symbols SYMFILE
-                   try to export only the symbols listed in SYMFILE
-  -export-symbols-regex REGEX
-                   try to export only the symbols matching REGEX
-  -LLIBDIR          search LIBDIR for required installed libraries
-  -lNAME            OUTPUT-FILE requires the installed library libNAME
-  -module           build a library that can dlopened
-  -no-fast-install  disable the fast-install mode
-  -no-install       link a not-installable executable
-  -no-undefined     declare that a library does not refer to external symbols
-  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
-  -objectlist FILE  Use a list of object files found in FILE to specify objects
-  -precious-files-regex REGEX
-                    don't remove output files matching REGEX
-  -release RELEASE  specify package release information
-  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
-  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
-  -static           do not do any dynamic linking of libtool libraries
-  -version-info CURRENT[:REVISION[:AGE]]
-                   specify library version info [each variable defaults to 0]
-
-All other options (arguments beginning with \`-') are ignored.
-
-Every other argument is treated as a filename.  Files ending in \`.la' are
-treated as uninstalled libtool libraries, other files are standard or library
-object files.
-
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
-required, except when creating a convenience library.
-
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
-
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
-is created, otherwise an executable program is created."
-  ;;
-
-uninstall)
-  $echo \
-"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
-
-Remove libraries from an installation directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, all the files associated with it are deleted.
-Otherwise, only FILE itself is deleted using RM."
-  ;;
-
-*)
-  $echo "$modename: invalid operation mode \`$mode'" 1>&2
-  $echo "$help" 1>&2
-  exit $EXIT_FAILURE
-  ;;
-esac
-
-$echo
-$echo "Try \`$modename --help' for more information about other modes."
-
-exit $EXIT_SUCCESS
-
-# The TAGs below are defined such that we never get into a situation
-# in which we disable both kinds of libraries.  Given conflicting
-# choices, we go for a static library, that is the most portable,
-# since we can't tell whether shared libraries were disabled because
-# the user asked for that or because the platform doesn't support
-# them.  This is particularly important on AIX, because we don't
-# support having both static and shared libraries enabled at the same
-# time on that platform, so we default to a shared-only configuration.
-# If a disable-shared tag is given, we'll fallback to a static-only
-# configuration.  But we'll never go from static-only to shared-only.
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-build_libtool_libs=no
-build_old_libs=yes
-# ### END LIBTOOL TAG CONFIG: disable-shared
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-static
-build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
-# ### END LIBTOOL TAG CONFIG: disable-static
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
diff --git a/source4/lib/json/missing b/source4/lib/json/missing
deleted file mode 100755 (executable)
index 5846bcf..0000000
+++ /dev/null
@@ -1,334 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-if test $# -eq 0; then
-  echo 1>&2 "Try \`$0 --help' for more information"
-  exit 1
-fi
-
-run=:
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
-  configure_ac=configure.ac
-else
-  configure_ac=configure.in
-fi
-
-case "$1" in
---run)
-  # Try to run requested program, and just exit if it succeeds.
-  run=
-  shift
-  "$@" && exit 0
-  ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-
-  -h|--h|--he|--hel|--help)
-    echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
-  -h, --help      display this help and exit
-  -v, --version   output version information and exit
-  --run           try to run the given command, and emulate it if it fails
-
-Supported PROGRAM values:
-  aclocal      touch file \`aclocal.m4'
-  autoconf     touch file \`configure'
-  autoheader   touch file \`config.h.in'
-  automake     touch all \`Makefile.in' files
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
-  flex         create \`lex.yy.c', if possible, from existing .c
-  help2man     touch the output file
-  lex          create \`lex.yy.c', if possible, from existing .c
-  makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
-    ;;
-
-  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing 0.4 - GNU automake"
-    ;;
-
-  -*)
-    echo 1>&2 "$0: Unknown \`$1' option"
-    echo 1>&2 "Try \`$0 --help' for more information"
-    exit 1
-    ;;
-
-  aclocal*)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
-         to install the \`Automake' and \`Perl' packages.  Grab them from
-         any GNU archive site."
-    touch aclocal.m4
-    ;;
-
-  autoconf)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`${configure_ac}'.  You might want to install the
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
-         archive site."
-    touch configure
-    ;;
-
-  autoheader)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
-         from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
-    test -z "$files" && files="config.h"
-    touch_files=
-    for f in $files; do
-      case "$f" in
-      *:*) touch_files="$touch_files "`echo "$f" |
-                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
-      *) touch_files="$touch_files $f.in";;
-      esac
-    done
-    touch $touch_files
-    ;;
-
-  automake*)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
-         You might want to install the \`Automake' and \`Perl' packages.
-         Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print |
-          sed 's/\.am$/.in/' |
-          while read f; do touch "$f"; done
-    ;;
-
-  autom4te)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
-         system.  You might have modified some files without having the
-         proper tools for further handling them.
-         You can get \`$1Help2man' as part of \`Autoconf' from any GNU
-         archive site."
-
-    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
-    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
-    if test -f "$file"; then
-       touch $file
-    else
-       test -z "$file" || exec >$file
-       echo "#! /bin/sh"
-       echo "# Created by GNU Automake missing as a replacement of"
-       echo "#  $ $@"
-       echo "exit 0"
-       chmod +x $file
-       exit 1
-    fi
-    ;;
-
-  bison|yacc)
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified a \`.y' file.  You may need the \`Bison' package
-         in order for those modifications to take effect.  You can get
-         \`Bison' from any GNU archive site."
-    rm -f y.tab.c y.tab.h
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-       case "$LASTARG" in
-       *.y)
-           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-           if [ -f "$SRCFILE" ]; then
-                cp "$SRCFILE" y.tab.c
-           fi
-           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-           if [ -f "$SRCFILE" ]; then
-                cp "$SRCFILE" y.tab.h
-           fi
-         ;;
-       esac
-    fi
-    if [ ! -f y.tab.h ]; then
-       echo >y.tab.h
-    fi
-    if [ ! -f y.tab.c ]; then
-       echo 'main() { return 0; }' >y.tab.c
-    fi
-    ;;
-
-  lex|flex)
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified a \`.l' file.  You may need the \`Flex' package
-         in order for those modifications to take effect.  You can get
-         \`Flex' from any GNU archive site."
-    rm -f lex.yy.c
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-       case "$LASTARG" in
-       *.l)
-           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-           if [ -f "$SRCFILE" ]; then
-                cp "$SRCFILE" lex.yy.c
-           fi
-         ;;
-       esac
-    fi
-    if [ ! -f lex.yy.c ]; then
-       echo 'main() { return 0; }' >lex.yy.c
-    fi
-    ;;
-
-  help2man)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-        you modified a dependency of a manual page.  You may need the
-        \`Help2man' package in order for those modifications to take
-        effect.  You can get \`Help2man' from any GNU archive site."
-
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-       file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
-    fi
-    if [ -f "$file" ]; then
-       touch $file
-    else
-       test -z "$file" || exec >$file
-       echo ".ab help2man is required to generate this page"
-       exit 1
-    fi
-    ;;
-
-  makeinfo)
-    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
-       # We have makeinfo, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified a \`.texi' or \`.texinfo' file, or any other file
-         indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy \`make' (AIX,
-         DU, IRIX).  You might want to install the \`Texinfo' package or
-         the \`GNU make' package.  Grab either from any GNU archive site."
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
-    fi
-    touch $file
-    ;;
-
-  tar)
-    shift
-    if test -n "$run"; then
-      echo 1>&2 "ERROR: \`tar' requires --run"
-      exit 1
-    fi
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-       case "$firstarg" in
-       *o*)
-           firstarg=`echo "$firstarg" | sed s/o//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-       case "$firstarg" in
-       *h*)
-           firstarg=`echo "$firstarg" | sed s/h//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
-  *)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
-         system.  You might have modified some files without having the
-         proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequirements for installing
-         this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing \`$1' program."
-    exit 1
-    ;;
-esac
-
-exit 0
diff --git a/source4/lib/json/mkinstalldirs b/source4/lib/json/mkinstalldirs
deleted file mode 100755 (executable)
index 8ab885e..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain
-
-errstatus=0
-dirmode=""
-
-usage="\
-Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
-
-# process command line arguments
-while test $# -gt 0 ; do
-   case "${1}" in
-     -h | --help | --h* )                      # -h for help
-       echo "${usage}" 1>&2; exit 0 ;;
-     -m )                                      # -m PERM arg
-       shift
-       test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
-       dirmode="${1}"
-       shift ;;
-     -- ) shift; break ;;                      # stop option processing
-     -* ) echo "${usage}" 1>&2; exit 1 ;;      # unknown option
-     * )  break ;;                             # first non-opt arg
-   esac
-done
-
-for file
-do
-  if test -d "$file"; then
-    shift
-  else
-    break
-  fi
-done
-
-case $# in
-0) exit 0 ;;
-esac
-
-case $dirmode in
-'')
-  if mkdir -p -- . 2>/dev/null; then
-    echo "mkdir -p -- $*"
-    exec mkdir -p -- "$@"
-  fi ;;
-*)
-  if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
-    echo "mkdir -m $dirmode -p -- $*"
-    exec mkdir -m "$dirmode" -p -- "$@"
-  fi ;;
-esac
-
-for file
-do
-   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
-   shift
-
-   pathcomp=
-   for d
-   do
-     pathcomp="$pathcomp$d"
-     case "$pathcomp" in
-       -* ) pathcomp=./$pathcomp ;;
-     esac
-
-     if test ! -d "$pathcomp"; then
-       echo "mkdir $pathcomp"
-
-       mkdir "$pathcomp" || lasterr=$?
-
-       if test ! -d "$pathcomp"; then
-         errstatus=$lasterr
-       else
-         if test ! -z "$dirmode"; then
-            echo "chmod $dirmode $pathcomp"
-
-            lasterr=""
-            chmod "$dirmode" "$pathcomp" || lasterr=$?
-
-            if test ! -z "$lasterr"; then
-              errstatus=$lasterr
-            fi
-         fi
-       fi
-     fi
-
-     pathcomp="$pathcomp/"
-   done
-done
-
-exit $errstatus
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 3
-# End:
-# mkinstalldirs ends here
diff --git a/source4/lib/json/printbuf.c b/source4/lib/json/printbuf.c
deleted file mode 100644 (file)
index 79bdaf5..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * $Id: printbuf.c,v 1.5 2006/01/26 02:16:28 mclark Exp $
- *
- * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
- * Michael Clark <michael@metaparadigm.com>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See COPYING for details.
- *
- */
-
-#include "config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if HAVE_STDARG_H
-# include <stdarg.h>
-#else /* !HAVE_STDARG_H */
-# error Not enough var arg support!
-#endif /* HAVE_STDARG_H */
-
-#include "bits.h"
-#include "debug.h"
-#include "printbuf.h"
-
-struct printbuf* printbuf_new()
-{
-  struct printbuf *p;
-
-  if(!(p = calloc(1, sizeof(struct printbuf)))) return NULL;
-  p->size = 32;
-  p->bpos = 0;
-  if(!(p->buf = malloc(p->size))) {
-    free(p);
-    return NULL;
-  }
-  return p;
-}
-
-
-int printbuf_memappend(struct printbuf *p, char *buf, int size)
-{
-  char *t;
-  if(p->size - p->bpos <= size) {
-    int new_size = max(p->size * 2, p->bpos + size + 8);
-#ifdef PRINTBUF_DEBUG
-    mc_debug("printbuf_memappend: realloc "
-            "bpos=%d wrsize=%d old_size=%d new_size=%d\n",
-            p->bpos, size, p->size, new_size);
-#endif /* PRINTBUF_DEBUG */
-    if(!(t = realloc(p->buf, new_size))) return -1;
-    p->size = new_size;
-    p->buf = t;
-  }
-  memcpy(p->buf + p->bpos, buf, size);
-  p->bpos += size;
-  p->buf[p->bpos]= '\0';
-  return size;
-}
-
-#if !HAVE_VSNPRINTF && defined(WIN32)
-# define vsnprintf _vsnprintf
-#elif !HAVE_VSNPRINTF /* !HAVE_VSNPRINTF */
-# error Need vsnprintf!
-#endif /* !HAVE_VSNPRINTF && defined(WIN32) */
-
-#if !HAVE_VASPRINTF
-/* CAW: compliant version of vasprintf */
-static int vasprintf(char **buf, const char *fmt, va_list ap)
-{
-#ifndef WIN32
-       static char _T_emptybuffer = '\0';
-#endif /* !defined(WIN32) */
-       int chars;
-       char *b;
-
-       if(!buf) { return -1; }
-
-#ifdef WIN32
-       chars = _vscprintf(fmt, ap)+1;
-#else /* !defined(WIN32) */
-       /* CAW: RAWR! We have to hope to god here that vsnprintf doesn't overwrite
-          our buffer like on some 64bit sun systems.... but hey, its time to move on */
-       chars = vsnprintf(&_T_emptybuffer, 0, fmt, ap)+1;
-       if(chars < 0) { chars *= -1; } /* CAW: old glibc versions have this problem */
-#endif /* defined(WIN32) */
-
-       b = (char*)malloc(sizeof(char)*chars);
-       if(!b) { return -1; }
-
-       if((chars = vsprintf(b, fmt, ap)) < 0)
-       {
-               free(b);
-       } else {
-               *buf = b;
-       }
-
-       return chars;
-}
-#endif /* !HAVE_VASPRINTF */
-
-int sprintbuf(struct printbuf *p, const char *msg, ...)
-{
-  va_list ap;
-  char *t;
-  int size;
-  char buf[128];
-
-  /* user stack buffer first */
-  va_start(ap, msg);
-  size = vsnprintf(buf, 128, msg, ap);
-  va_end(ap);
-  /* if string is greater than stack buffer, then use dynamic string
-     with vasprintf.  Note: some implementation of vsnprintf return -1
-     if output is truncated whereas some return the number of bytes that
-     would have been writen - this code handles both cases. */
-  if(size == -1 || size > 127) {
-    int ret;
-    va_start(ap, msg);
-    if((size = vasprintf(&t, msg, ap)) == -1) return -1;
-    va_end(ap);
-    ret = printbuf_memappend(p, t, size);
-    free(t);
-    return ret;
-  } else {
-    return printbuf_memappend(p, buf, size);
-  }
-}
-
-void printbuf_reset(struct printbuf *p)
-{
-  p->buf[0] = '\0';
-  p->bpos = 0;
-}
-
-void printbuf_free(struct printbuf *p)
-{
-  if(p) {
-    free(p->buf);
-    free(p);
-  }
-}
diff --git a/source4/lib/json/printbuf.h b/source4/lib/json/printbuf.h
deleted file mode 100644 (file)
index bc1669b..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * $Id: printbuf.h,v 1.4 2006/01/26 02:16:28 mclark Exp $
- *
- * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
- * Michael Clark <michael@metaparadigm.com>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See COPYING for details.
- *
- */
-
-#ifndef _printbuf_h_
-#define _printbuf_h_
-
-#undef PRINTBUF_DEBUG
-
-struct printbuf {
-  char *buf;
-  int bpos;
-  int size;
-};
-
-extern struct printbuf*
-printbuf_new();
-
-extern int
-printbuf_memappend(struct printbuf *p, char *buf, int size);
-
-extern int
-sprintbuf(struct printbuf *p, const char *msg, ...);
-
-extern void
-printbuf_reset(struct printbuf *p);
-
-extern void
-printbuf_free(struct printbuf *p);
-
-#endif
diff --git a/source4/lib/json/stamp-h.in b/source4/lib/json/stamp-h.in
deleted file mode 100644 (file)
index 9788f70..0000000
+++ /dev/null
@@ -1 +0,0 @@
-timestamp
diff --git a/source4/lib/json/test1.c b/source4/lib/json/test1.c
deleted file mode 100644 (file)
index 8e49d10..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "json.h"
-
-int main(int argc, char **argv)
-{
-  struct json_object *my_string, *my_int, *my_object, *my_array;
-  struct json_object *new_obj;
-  int i;
-
-  my_string = json_object_new_string("\t");
-  printf("my_string=%s\n", json_object_get_string(my_string));
-  printf("my_string.to_string()=%s\n", json_object_to_json_string(my_string));
-  json_object_put(my_string);
-
-  my_string = json_object_new_string("foo");
-  printf("my_string=%s\n", json_object_get_string(my_string));
-  printf("my_string.to_string()=%s\n", json_object_to_json_string(my_string));
-
-  my_int = json_object_new_int(9);
-  printf("my_int=%d\n", json_object_get_int(my_int));
-  printf("my_int.to_string()=%s\n", json_object_to_json_string(my_int));
-
-  my_array = json_object_new_array();
-  json_object_array_add(my_array, json_object_new_int(1));
-  json_object_array_add(my_array, json_object_new_int(2));
-  json_object_array_add(my_array, json_object_new_int(3));
-  json_object_array_put_idx(my_array, 4, json_object_new_int(5));
-  printf("my_array=\n");
-  for(i=0; i < json_object_array_length(my_array); i++) {
-    struct json_object *obj = json_object_array_get_idx(my_array, i);
-    printf("\t[%d]=%s\n", i, json_object_to_json_string(obj));
-  }
-  printf("my_array.to_string()=%s\n", json_object_to_json_string(my_array));    
-
-  my_object = json_object_new_object();
-  json_object_object_add(my_object, "abc", json_object_new_int(12));
-  json_object_object_add(my_object, "foo", json_object_new_string("bar"));
-  json_object_object_add(my_object, "bool0", json_object_new_boolean(0));
-  json_object_object_add(my_object, "bool1", json_object_new_boolean(1));
-  json_object_object_add(my_object, "baz", json_object_new_string("bang"));
-  json_object_object_add(my_object, "baz", json_object_new_string("fark"));
-  json_object_object_del(my_object, "baz");
-  json_object_object_add(my_object, "arr", my_array);
-  printf("my_object=\n");
-  json_object_object_foreach(my_object, key, val) {
-    printf("\t%s: %s\n", key, json_object_to_json_string(val));
-  }
-  printf("my_object.to_string()=%s\n", json_object_to_json_string(my_object));
-
-  new_obj = json_tokener_parse("\"\003\"");
-  printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
-  json_object_put(new_obj);
-
-  new_obj = json_tokener_parse("/* hello */\"foo\"");
-  printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
-  json_object_put(new_obj);
-
-  new_obj = json_tokener_parse("// hello\n\"foo\"");
-  printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
-  json_object_put(new_obj);
-
-  new_obj = json_tokener_parse("\"\\u0041\\u0042\\u0043\"");
-  printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
-  json_object_put(new_obj);
-
-  new_obj = json_tokener_parse("null");
-  printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
-  json_object_put(new_obj);
-
-  new_obj = json_tokener_parse("True");
-  printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
-  json_object_put(new_obj);
-
-  new_obj = json_tokener_parse("12");
-  printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
-  json_object_put(new_obj);
-
-  new_obj = json_tokener_parse("12.3");
-  printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
-  json_object_put(new_obj);
-
-  new_obj = json_tokener_parse("[\"\\n\"]");
-  printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
-  json_object_put(new_obj);
-
-  new_obj = json_tokener_parse("[\"\\nabc\\n\"]");
-  printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
-  json_object_put(new_obj);
-
-  new_obj = json_tokener_parse("[null]");
-  printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
-  json_object_put(new_obj);
-
-  new_obj = json_tokener_parse("[]");
-  printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
-  json_object_put(new_obj);
-
-  new_obj = json_tokener_parse("[\"abc\",null,\"def\",12]");
-  printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
-  json_object_put(new_obj);
-
-  new_obj = json_tokener_parse("{}");
-  printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
-  json_object_put(new_obj);
-
-  new_obj = json_tokener_parse("{ \"foo\": \"bar\" }");
-  printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
-  json_object_put(new_obj);
-
-  new_obj = json_tokener_parse("{ \"foo\": \"bar\", \"baz\": null, \"bool0\": true }");
-  printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
-  json_object_put(new_obj);
-
-  new_obj = json_tokener_parse("{ \"foo\": [null, \"foo\"] }");
-  printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
-  json_object_put(new_obj);
-
-  new_obj = json_tokener_parse("{ \"abc\": 12, \"foo\": \"bar\", \"bool0\": false, \"bool1\": true, \"arr\": [ 1, 2, 3, null, 5 ] }");
-  printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
-  json_object_put(new_obj);
-
-  new_obj = json_tokener_parse("{ foo }");
-  if(is_error(new_obj)) printf("got error as expected\n");
-
-  new_obj = json_tokener_parse("foo");
-  if(is_error(new_obj)) printf("got error as expected\n");
-
-  json_object_put(my_string);
-  json_object_put(my_int);
-  json_object_put(my_object);
-  //json_object_put(my_array);
-
-  return 0;
-}
diff --git a/source4/lib/json/test2.c b/source4/lib/json/test2.c
deleted file mode 100644 (file)
index b7bdf62..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "json.h"
-
-
-int main(int argc, char **argv)
-{
-  struct json_object *new_obj;
-
-  mc_set_debug(1);
-
-  new_obj = json_tokener_parse("/* more difficult test case */ { \"glossary\": { \"title\": \"example glossary\", \"GlossDiv\": { \"title\": \"S\", \"GlossList\": [ { \"ID\": \"SGML\", \"SortAs\": \"SGML\", \"GlossTerm\": \"Standard Generalized Markup Language\", \"Acronym\": \"SGML\", \"Abbrev\": \"ISO 8879:1986\", \"GlossDef\": \"A meta-markup language, used to create markup languages such as DocBook.\", \"GlossSeeAlso\": [\"GML\", \"XML\", \"markup\"] } ] } } }");
-  printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
-  json_object_put(new_obj);
-
-  return 0;
-}
index 75c8109042a3e05d334664e20b160db33ceabdee..c013565da0b3816245844a206563f25f525fdf00 100644 (file)
@@ -527,10 +527,6 @@ int ldb_request(struct ldb_context *ldb, struct ldb_request *req)
                FIRST_OP(ldb, extended);
                ret = module->ops->extended(module, req);
                break;
-       case LDB_SEQUENCE_NUMBER:
-               FIRST_OP(ldb, sequence_number);
-               ret = module->ops->sequence_number(module, req);
-               break;
        default:
                FIRST_OP(ldb, request);
                ret = module->ops->request(module, req);
@@ -1172,35 +1168,47 @@ int ldb_rename(struct ldb_context *ldb,
 int ldb_sequence_number(struct ldb_context *ldb,
                        enum ldb_sequence_type type, uint64_t *seq_num)
 {
-       struct ldb_request *req;
+       struct ldb_seqnum_request *seq;
+       struct ldb_seqnum_result *seqr;
+       struct ldb_result *res;
+       TALLOC_CTX *tmp_ctx;
        int ret;
 
-       req = talloc_zero(ldb, struct ldb_request);
-       if (req == NULL) {
+       *seq_num = 0;
+
+       tmp_ctx = talloc_zero(ldb, struct ldb_request);
+       if (tmp_ctx == NULL) {
                ldb_set_errstring(ldb, "Out of Memory");
                return LDB_ERR_OPERATIONS_ERROR;
        }
+       seq = talloc_zero(tmp_ctx, struct ldb_seqnum_request);
+       if (seq == NULL) {
+               ldb_set_errstring(ldb, "Out of Memory");
+               ret = LDB_ERR_OPERATIONS_ERROR;
+               goto done;
+       }
+       seq->type = type;
 
-       req->operation = LDB_SEQUENCE_NUMBER;
-       req->controls = NULL;
-       req->context = NULL;
-       req->callback = ldb_op_default_callback;
-       ldb_set_timeout(ldb, req, 0); /* use default timeout */
-
-       req->op.seq_num.type = type;
-       /* do request and autostart a transaction */
-       ret = ldb_request(ldb, req);
+       ret = ldb_extended(ldb, LDB_EXTENDED_SEQUENCE_NUMBER, seq, &res);
+       if (ret != LDB_SUCCESS) {
+               goto done;
+       }
+       talloc_steal(tmp_ctx, res);
 
-       if (ret == LDB_SUCCESS) {
-               *seq_num = req->op.seq_num.seq_num;
+       if (strcmp(LDB_EXTENDED_SEQUENCE_NUMBER, res->extended->oid) != 0) {
+               ldb_set_errstring(ldb, "Invalid OID in reply");
+               ret = LDB_ERR_OPERATIONS_ERROR;
+               goto done;
        }
+       seqr = talloc_get_type(res->extended->data,
+                               struct ldb_seqnum_result);
+       *seq_num = seqr->seq_num;
 
-       talloc_free(req);
+done:
+       talloc_free(tmp_ctx);
        return ret;
 }
 
-
-
 /*
   return extended error information
 */
index 5cc8de29b4851ef671a2f68599f02eb21e0e23b7..2b453bb0c37a2cccea7e9f6eef7103fdb142c5e7 100644 (file)
@@ -517,10 +517,6 @@ int ldb_next_request(struct ldb_module *module, struct ldb_request *request)
                FIND_OP(module, extended);
                ret = module->ops->extended(module, request);
                break;
-       case LDB_SEQUENCE_NUMBER:
-               FIND_OP(module, sequence_number);
-               ret = module->ops->sequence_number(module, request);
-               break;
        default:
                FIND_OP(module, request);
                ret = module->ops->request(module, request);
index b1ce3ef70b2a7073a65b6cad98bc59cc49566abd..9bc5c183d842922d6cdab5f2af01d270507856c7 100644 (file)
@@ -652,7 +652,6 @@ enum ldb_request_type {
        LDB_DELETE,
        LDB_RENAME,
        LDB_EXTENDED,
-       LDB_SEQUENCE_NUMBER,
        LDB_REQ_REGISTER_CONTROL,
        LDB_REQ_REGISTER_PARTITION
 };
@@ -679,21 +678,38 @@ struct ldb_extended {
        void *data; /* NULL or a valid talloc pointer! talloc_get_type() will be used on it */
 };
 
+#define LDB_EXTENDED_SEQUENCE_NUMBER   "1.3.6.1.4.1.7165.4.4.3"
+
+enum ldb_sequence_type {
+       LDB_SEQ_HIGHEST_SEQ,
+       LDB_SEQ_HIGHEST_TIMESTAMP,
+       LDB_SEQ_NEXT
+};
+
+struct ldb_seqnum_request {
+       enum ldb_sequence_type type;
+};
+
+struct ldb_seqnum_result {
+       uint64_t seq_num;
+       uint32_t flags;
+};
+
 struct ldb_result {
        unsigned int count;
        struct ldb_message **msgs;
-       char **refs;
        struct ldb_extended *extended;
        struct ldb_control **controls;
+       char **refs;
 };
 
 struct ldb_reply {
+       int error;
        enum ldb_reply_type type;
        struct ldb_message *message;
        struct ldb_extended *response;
-       char *referral;
        struct ldb_control **controls;
-       int error;
+       char *referral;
 };
 
 struct ldb_request;
@@ -732,18 +748,6 @@ struct ldb_register_partition {
        struct ldb_dn *dn;
 };
 
-enum ldb_sequence_type {
-       LDB_SEQ_HIGHEST_SEQ,
-       LDB_SEQ_HIGHEST_TIMESTAMP,
-       LDB_SEQ_NEXT
-};
-
-struct ldb_sequence_number {
-       enum ldb_sequence_type type;
-       uint64_t seq_num;
-       uint32_t flags;
-};
-
 typedef int (*ldb_request_callback_t)(struct ldb_request *, struct ldb_reply *);
 
 struct ldb_request {
@@ -757,7 +761,6 @@ struct ldb_request {
                struct ldb_delete del;
                struct ldb_rename rename;
                struct ldb_extended extended;
-               struct ldb_sequence_number seq_num;
                struct ldb_register_control reg_control;
                struct ldb_register_partition reg_partition;
        } op;
index 024ba1959a0b09b63524596edb1c8cffd30598d7..60134622251815e9ab57208034650ef0e59c7037 100644 (file)
@@ -1219,25 +1219,6 @@ int py_module_del_transaction(struct ldb_module *mod)
     return LDB_SUCCESS;
 }
 
-int py_module_sequence_number(struct ldb_module *mod, struct ldb_request *req)
-{
-    PyObject *py_ldb = mod->private_data;
-    PyObject *py_result;
-    int ret;
-
-    py_result = PyObject_CallMethod(py_ldb, "sequence_number", "ili", req->op.seq_num.type, req->op.seq_num.seq_num, req->op.seq_num.flags);
-
-    if (py_result == NULL) {
-        return LDB_ERR_OPERATIONS_ERROR;
-    }
-
-    ret = PyInt_AsLong(py_result);
-
-    Py_DECREF(py_result);
-
-    return ret;
-}
-
 static int py_module_destructor(void *_mod)
 {
     struct ldb_module *mod = _mod;
@@ -1292,7 +1273,6 @@ int py_module_init (struct ldb_module *mod)
     $1->start_transaction = py_module_start_transaction;
     $1->end_transaction = py_module_end_transaction;
     $1->del_transaction = py_module_del_transaction;
-    $1->sequence_number = py_module_sequence_number;
 }
 
 %feature("docstring") ldb_register_module "S.register_module(module) -> None\n"
index a220b4a6288c7f17ef4ce57ca4d36681e499a811..1c76411db2945b289627212b026c2009a3e72ca1 100644 (file)
@@ -276,30 +276,6 @@ int ltdb_search_dn1(struct ldb_module *module, struct ldb_dn *dn, struct ldb_mes
        return LDB_SUCCESS;
 }
 
-/*
-  lock the database for read - use by ltdb_search
-*/
-static int ltdb_lock_read(struct ldb_module *module)
-{
-       struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
-       if (ltdb->in_transaction == 0) {
-               return tdb_lockall_read(ltdb->tdb);
-       }
-       return 0;
-}
-
-/*
-  unlock the database after a ltdb_lock_read()
-*/
-static int ltdb_unlock_read(struct ldb_module *module)
-{
-       struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
-       if (ltdb->in_transaction == 0) {
-               return tdb_unlockall_read(ltdb->tdb);
-       }
-       return 0;
-}
-
 /*
   add a set of attributes from a record to a set of results
   return 0 on success, -1 on failure
index 0087f6c44d40affe2c7f3c00b19d3358a508b65f..2282f61d479a36d5f3fad10a57a3f258cc31b3c5 100644 (file)
@@ -79,6 +79,30 @@ static int ltdb_err_map(enum TDB_ERROR tdb_code)
        return LDB_ERR_OTHER;
 }
 
+/*
+  lock the database for read - use by ltdb_search and ltdb_sequence_number
+*/
+int ltdb_lock_read(struct ldb_module *module)
+{
+       struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
+       if (ltdb->in_transaction == 0) {
+               return tdb_lockall_read(ltdb->tdb);
+       }
+       return 0;
+}
+
+/*
+  unlock the database after a ltdb_lock_read()
+*/
+int ltdb_unlock_read(struct ldb_module *module)
+{
+       struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
+       if (ltdb->in_transaction == 0) {
+               return tdb_unlockall_read(ltdb->tdb);
+       }
+       return 0;
+}
+
 
 /*
   form a TDB_DATA for a record key
@@ -860,61 +884,88 @@ static int ltdb_del_trans(struct ldb_module *module)
 /*
   return sequenceNumber from @BASEINFO
 */
-static int ltdb_sequence_number(struct ldb_module *module,
-                               struct ldb_request *req)
+static int ltdb_sequence_number(struct ltdb_context *ctx,
+                               struct ldb_extended **ext)
 {
+       struct ldb_module *module = ctx->module;
+       struct ldb_request *req = ctx->req;
        TALLOC_CTX *tmp_ctx;
+       struct ldb_seqnum_request *seq;
+       struct ldb_seqnum_result *res;
        struct ldb_message *msg = NULL;
        struct ldb_dn *dn;
        const char *date;
-       int tret;
+       int ret;
 
+       seq = talloc_get_type(req->op.extended.data,
+                               struct ldb_seqnum_request);
+       if (seq == NULL) {
+               return LDB_ERR_OPERATIONS_ERROR;
+       }
+
+       req->handle->state = LDB_ASYNC_PENDING;
+
+       if (ltdb_lock_read(module) != 0) {
+               return LDB_ERR_OPERATIONS_ERROR;
+       }
+
+       res = talloc_zero(req, struct ldb_seqnum_result);
+       if (res == NULL) {
+               ret = LDB_ERR_OPERATIONS_ERROR;
+               goto done;
+       }
        tmp_ctx = talloc_new(req);
        if (tmp_ctx == NULL) {
-               talloc_free(tmp_ctx);
-               return LDB_ERR_OPERATIONS_ERROR;
+               ret = LDB_ERR_OPERATIONS_ERROR;
+               goto done;
        }
 
        dn = ldb_dn_new(tmp_ctx, module->ldb, LTDB_BASEINFO);
 
        msg = talloc(tmp_ctx, struct ldb_message);
        if (msg == NULL) {
-               talloc_free(tmp_ctx);
-               return LDB_ERR_OPERATIONS_ERROR;
+               ret = LDB_ERR_OPERATIONS_ERROR;
+               goto done;
        }
 
-       req->op.seq_num.flags = 0;
-
-       tret = ltdb_search_dn1(module, dn, msg);
-       if (tret != LDB_SUCCESS) {
-               talloc_free(tmp_ctx);
-               /* zero is as good as anything when we don't know */
-               req->op.seq_num.seq_num = 0;
-               return tret;
+       ret = ltdb_search_dn1(module, dn, msg);
+       if (ret != LDB_SUCCESS) {
+               goto done;
        }
 
-       switch (req->op.seq_num.type) {
+       switch (seq->type) {
        case LDB_SEQ_HIGHEST_SEQ:
-               req->op.seq_num.seq_num = ldb_msg_find_attr_as_uint64(msg, LTDB_SEQUENCE_NUMBER, 0);
+               res->seq_num = ldb_msg_find_attr_as_uint64(msg, LTDB_SEQUENCE_NUMBER, 0);
                break;
        case LDB_SEQ_NEXT:
-               req->op.seq_num.seq_num = ldb_msg_find_attr_as_uint64(msg, LTDB_SEQUENCE_NUMBER, 0);
-               req->op.seq_num.seq_num++;
+               res->seq_num = ldb_msg_find_attr_as_uint64(msg, LTDB_SEQUENCE_NUMBER, 0);
+               res->seq_num++;
                break;
        case LDB_SEQ_HIGHEST_TIMESTAMP:
                date = ldb_msg_find_attr_as_string(msg, LTDB_MOD_TIMESTAMP, NULL);
                if (date) {
-                       req->op.seq_num.seq_num = ldb_string_to_time(date);
+                       res->seq_num = ldb_string_to_time(date);
                } else {
-                       req->op.seq_num.seq_num = 0;
+                       res->seq_num = 0;
                        /* zero is as good as anything when we don't know */
                }
                break;
        }
 
-       talloc_free(tmp_ctx);
+       *ext = talloc_zero(req, struct ldb_extended);
+       if (*ext == NULL) {
+               ret = LDB_ERR_OPERATIONS_ERROR;
+               goto done;
+       }
+       (*ext)->oid = LDB_EXTENDED_SEQUENCE_NUMBER;
+       (*ext)->data = talloc_steal(*ext, res);
 
-       return LDB_SUCCESS;
+       ret = LDB_SUCCESS;
+
+done:
+       talloc_free(tmp_ctx);
+       ltdb_unlock_read(module);
+       return ret;
 }
 
 void ltdb_request_done(struct ldb_request *req, int error)
@@ -949,6 +1000,47 @@ static void ltdb_timeout(struct event_context *ev,
        ltdb_request_done(ctx->req, LDB_ERR_TIME_LIMIT_EXCEEDED);
 }
 
+static void ltdb_request_extended_done(struct ldb_request *req,
+                                       struct ldb_extended *ext,
+                                       int error)
+{
+       struct ldb_reply *ares;
+
+       /* if we already returned an error just return */
+       if (req->handle->status != LDB_SUCCESS) {
+               return;
+       }
+
+       ares = talloc_zero(req, struct ldb_reply);
+       if (!ares) {
+               ldb_oom(req->handle->ldb);
+               req->callback(req, NULL);
+               return;
+       }
+       ares->type = LDB_REPLY_DONE;
+       ares->response = ext;
+       ares->error = error;
+
+       req->callback(req, ares);
+}
+
+static void ltdb_handle_extended(struct ltdb_context *ctx)
+{
+       struct ldb_extended *ext = NULL;
+       int ret;
+
+       if (strcmp(ctx->req->op.extended.oid,
+                  LDB_EXTENDED_SEQUENCE_NUMBER) == 0) {
+               /* get sequence number */
+               ret = ltdb_sequence_number(ctx, &ext);
+       } else {
+               /* not recognized */
+               ret = LDB_ERR_UNSUPPORTED_CRITICAL_EXTENSION;
+       }
+
+       ltdb_request_extended_done(ctx->req, ext, ret);
+}
+
 static void ltdb_callback(struct event_context *ev,
                          struct timed_event *te,
                          struct timeval t,
@@ -975,6 +1067,9 @@ static void ltdb_callback(struct event_context *ev,
        case LDB_RENAME:
                ret = ltdb_rename(ctx);
                break;
+       case LDB_EXTENDED:
+               ltdb_handle_extended(ctx);
+               return;
        default:
                /* no other op supported */
                ret = LDB_ERR_UNWILLING_TO_PERFORM;
@@ -1037,11 +1132,10 @@ static const struct ldb_module_ops ltdb_ops = {
        .modify            = ltdb_handle_request,
        .del               = ltdb_handle_request,
        .rename            = ltdb_handle_request,
-/*     .request           = ltdb_handle_request, */
+       .extended          = ltdb_handle_request,
        .start_transaction = ltdb_start_trans,
        .end_transaction   = ltdb_end_trans,
        .del_transaction   = ltdb_del_trans,
-       .sequence_number   = ltdb_sequence_number
 };
 
 /*
index 223181ca0bd20bf1486ee3cc8ec4ce607fba220f..61e90bccc69d99b0ce215365bf8f33f872c84432 100644 (file)
@@ -112,6 +112,8 @@ int ltdb_filter_attrs(struct ldb_message *msg, const char * const *attrs);
 int ltdb_search(struct ltdb_context *ctx);
 
 /* The following definitions come from lib/ldb/ldb_tdb/ldb_tdb.c  */
+int ltdb_lock_read(struct ldb_module *module);
+int ltdb_unlock_read(struct ldb_module *module);
 struct TDB_DATA ltdb_key(struct ldb_module *module, struct ldb_dn *dn);
 int ltdb_store(struct ldb_module *module, const struct ldb_message *msg, int flgs);
 int ltdb_delete_noindex(struct ldb_module *module, struct ldb_dn *dn);
index cc8099f27f5391a22a992a7a15088e388a8405e2..bc9266a306e1c2178148e52dde05861e3c5c5e79 100644 (file)
@@ -3505,25 +3505,6 @@ int py_module_del_transaction(struct ldb_module *mod)
     return LDB_SUCCESS;
 }
 
-int py_module_sequence_number(struct ldb_module *mod, struct ldb_request *req)
-{
-    PyObject *py_ldb = mod->private_data;
-    PyObject *py_result;
-    int ret;
-
-    py_result = PyObject_CallMethod(py_ldb, "sequence_number", "ili", req->op.seq_num.type, req->op.seq_num.seq_num, req->op.seq_num.flags);
-
-    if (py_result == NULL) {
-        return LDB_ERR_OPERATIONS_ERROR;
-    }
-
-    ret = PyInt_AsLong(py_result);
-
-    Py_DECREF(py_result);
-
-    return ret;
-}
-
 static int py_module_destructor(void *_mod)
 {
     struct ldb_module *mod = _mod;
@@ -6648,7 +6629,6 @@ SWIGINTERN PyObject *_wrap_register_module(PyObject *SWIGUNUSEDPARM(self), PyObj
   arg1->start_transaction = py_module_start_transaction;
   arg1->end_transaction = py_module_end_transaction;
   arg1->del_transaction = py_module_del_transaction;
-  arg1->sequence_number = py_module_sequence_number;
   result = ldb_register_module((struct ldb_module_ops const *)arg1);
   if (result != 0) {
     PyErr_SetObject(PyExc_LdbError, Py_BuildValue((char *)"(i,s)", result, ldb_strerror(result)));
index 17896a006a313cbb1d5c39539acea5e28e16019d..835715e7dc5bea366d5647286dc8ec4f834ffcb9 100644 (file)
@@ -222,10 +222,10 @@ static int asq_build_first_request(struct asq_context *ac, struct ldb_request **
 
        base_attrs[1] = NULL;
 
-       ret = ldb_build_search_req_ex(base_req, ac->module->ldb, ac,
+       ret = ldb_build_search_req(base_req, ac->module->ldb, ac,
                                        ac->req->op.search.base,
                                        LDB_SCOPE_BASE,
-                                       ac->req->op.search.tree,
+                                       NULL,
                                        (const char * const *)base_attrs,
                                        NULL,
                                        ac, asq_base_callback,
index e2cc65852121561d87bc2fcbb6e03a070ab18077..71fd98876eb1248faab2aa51cb3c59aa5013e94e 100755 (executable)
@@ -756,7 +756,7 @@ member: cn=ldaptestuser4,cn=ldaptestcontainer,""" + self.base_dn + """
 
         ldb.delete(res[0].dn)
 
-        attrs = ["cn", "name", "objectClass", "objectGUID", "whenCreated", "nTSecurityDescriptor", "memberOf"]
+        attrs = ["cn", "name", "objectClass", "objectGUID", "whenCreated", "nTSecurityDescriptor", "memberOf", "allowedAttributes", "allowedAttributesEffective"]
         print "Testing ldb.search for (&(cn=ldaptestUSer2)(objectClass=user))"
         res = ldb.search(self.base_dn, expression="(&(cn=ldaptestUSer2)(objectClass=user))", scope=SCOPE_SUBTREE, attrs=attrs)
         self.assertEquals(len(res), 1, "Could not find (&(cn=ldaptestUSer2)(objectClass=user))")
@@ -768,9 +768,11 @@ member: cn=ldaptestuser4,cn=ldaptestcontainer,""" + self.base_dn + """
         self.assertTrue("objectGUID" in res[0])
         self.assertTrue("whenCreated" in res[0])
         self.assertTrue("nTSecurityDescriptor" in res[0])
+        self.assertTrue("allowedAttributes" in res[0])
+        self.assertTrue("allowedAttributesEffective" in res[0])
         self.assertEquals(res[0]["memberOf"][0].upper(), ("CN=ldaptestgroup2,CN=Users," + self.base_dn).upper())
 
-        attrs = ["cn", "name", "objectClass", "objectGUID", "whenCreated", "nTSecurityDescriptor", "member"]
+        attrs = ["cn", "name", "objectClass", "objectGUID", "whenCreated", "nTSecurityDescriptor", "member", "allowedAttributes", "allowedAttributesEffective"]
         print "Testing ldb.search for (&(cn=ldaptestgroup2)(objectClass=group))"
         res = ldb.search(self.base_dn, expression="(&(cn=ldaptestgroup2)(objectClass=group))", scope=SCOPE_SUBTREE, attrs=attrs)
         self.assertEquals(len(res), 1, "Could not find (&(cn=ldaptestgroup2)(objectClass=group))")
@@ -782,6 +784,8 @@ member: cn=ldaptestuser4,cn=ldaptestcontainer,""" + self.base_dn + """
         self.assertTrue("objectGuid" not in res[0])
         self.assertTrue("whenCreated" in res[0])
         self.assertTrue("nTSecurityDescriptor" in res[0])
+        self.assertTrue("allowedAttributes" in res[0])
+        self.assertTrue("allowedAttributesEffective" in res[0])
         memberUP = []
         for m in res[0]["member"]:
             memberUP.append(m.upper())
index 2125ba1fe6b88803a31bdf5978ad59d97218579c..dcc29180cc1a7be4897550765f1fc544fdc06811 100644 (file)
 #include "lib/events/events.h"
 #include "system/filesys.h"
 #include "messaging/messaging.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "lib/socket/socket.h"
 #include "librpc/gen_ndr/ndr_irpc.h"
 #include "lib/messaging/irpc.h"
 #include "tdb_wrap.h"
-#include "lib/util/unix_privs.h"
+#include "../lib/util/unix_privs.h"
 #include "librpc/rpc/dcerpc.h"
 #include "../tdb/include/tdb.h"
-#include "lib/util/util_tdb.h"
+#include "../lib/util/util_tdb.h"
 #include "cluster/cluster.h"
 #include "param/param.h"
 
index 449ee0f6eefa6277de797f10de933949f02891c8..42946bceeca00a7aed6e0ef571c59589cdd6fe39 100644 (file)
@@ -327,7 +327,7 @@ static WERROR reg_dir_get_value(TALLOC_CTX *mem_ctx,
        size_t size;
        char *contents;
 
-       contents = file_load(path, &size, mem_ctx);
+       contents = file_load(path, &size, 0, mem_ctx);
        talloc_free(path);
        if (contents == NULL)
                return WERR_BADFILE;
index c9b3b064470f3d49002a2f99622c6c452d161d37..81ca2c39bcbdc41bb058a7574778ebbf23369f60 100644 (file)
@@ -18,7 +18,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "lib/registry/registry.h"
 #include "system/filesys.h"
 
index 4af95e2dd62d46fc9754bae51011934d675e9c45..a3aee06b1337f63a54e0020b47d22fa3c7bd1a24 100644 (file)
@@ -19,7 +19,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "lib/registry/registry.h"
 #include "system/filesys.h"
 
index 57a895aa000b6cd17803093a2e58d12b1951bcf4..dd3ff47b78103563193de1cfb40b6875f31246b6 100644 (file)
@@ -2066,7 +2066,7 @@ WERROR reg_open_regf_file(TALLOC_CTX *parent_ctx, const char *location,
 
        pull = tdr_pull_init(regf, regf->iconv_convenience);
 
-       pull->data.data = (uint8_t*)fd_load(regf->fd, &pull->data.length, regf);
+       pull->data.data = (uint8_t*)fd_load(regf->fd, &pull->data.length, 0, regf);
 
        if (pull->data.data == NULL) {
                DEBUG(0, ("Error reading data\n"));
index e134e3e5321147ba3e3fbf99b43def8eea0226b2..fe2091dde8d50e81f6827bed4ebc766e97aa09a1 100644 (file)
@@ -29,8 +29,8 @@ struct smb_iconv_convenience;
 #include "libcli/util/werror.h"
 #include "librpc/gen_ndr/security.h"
 #include "libcli/util/ntstatus.h"
-#include "util/time.h"
-#include "util/data_blob.h"
+#include "../lib/util/time.h"
+#include "../lib/util/data_blob.h"
 
 /**
  * The hive API. This API is generally used for
index 6429a390db708a61f5c66229c1cbe2072a212cbd..bcf5c8dad4dde43f45246ce9fbc02d35a7f60008 100644 (file)
@@ -260,15 +260,15 @@ static WERROR rpc_get_value_by_name(TALLOC_CTX *mem_ctx,
 
        ZERO_STRUCT(r);
        r.in.handle = &mykeydata->pol;
-       r.in.value_name = name;
+       r.in.value_name = &name;
        r.in.type = type;
        r.in.data = &value;
-       r.in.size = &val_size;
-       r.in.length = &zero;
+       r.in.data_size = &val_size;
+       r.in.data_length = &zero;
        r.out.type = type;
        r.out.data = &value;
-       r.out.size = &val_size;
-       r.out.length = &zero;
+       r.out.data_size = &val_size;
+       r.out.data_length = &zero;
 
        status = dcerpc_winreg_QueryValue(mykeydata->pipe, mem_ctx, &r);
 
@@ -278,7 +278,7 @@ static WERROR rpc_get_value_by_name(TALLOC_CTX *mem_ctx,
        }
 
        *type = *(r.out.type);
-       *data = data_blob_talloc(mem_ctx, r.out.data, *r.out.length);
+       *data = data_blob_talloc(mem_ctx, r.out.data, *r.out.data_length);
 
        return r.out.result;
 }
index 68efd56a86271f8dfdaaa4464d31f895ddc535cc..b3b6e49ea5e6ab7b560eaec7ef2768dcc7a3dd91 100644 (file)
@@ -140,8 +140,7 @@ _PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx,
                        break;
 
                case REG_BINARY:
-                       *data = strhex_to_data_blob(data_str);
-                       talloc_steal(mem_ctx, data->data);
+                       *data = strhex_to_data_blob(mem_ctx, data_str);
                        break;
 
                default:
index e089149393b89030c7467f037f23770e52d62c37..365347fe21e51c0e8fae29093302125985853a4d 100644 (file)
@@ -6,5 +6,3 @@ PRIVATE_DEPENDENCIES = CHARSET LIBSAMBA-UTIL
 ################################################
 
 SMBPASSWD_OBJ_FILES = $(libsrcdir)/samba3/smbpasswd.o
-
-$(eval $(call proto_header_template,$(libsrcdir)/samba3/samba3_smbpasswd_proto.h,$(SMBPASSWD_OBJ_FILES:.o=.c)))
index aea87dac1418698871ce333ea4d0c346096a6a8d..1a0ce041436699f31b4923ee31f4e4f031f3d774 100644 (file)
 #include "librpc/gen_ndr/samr.h"
 #include "param/param.h"
 
-struct samba3_samaccount {
-       uint32_t logon_time,
-               logoff_time,
-               kickoff_time,
-               bad_password_time,
-               pass_last_set_time,
-               pass_can_change_time,
-               pass_must_change_time;
-       char *username;
-       char *domain;
-       char *nt_username;
-       char *dir_drive;
-       char *unknown_str;
-       char *munged_dial;
-       char *fullname;
-       char *homedir;
-       char *logon_script;
-       char *profile_path;
-       char *acct_desc;
-       char *workstations;
-       uint32_t user_rid, group_rid, hours_len, unknown_6;
-       uint16_t acct_ctrl, logon_divs;
-       uint16_t bad_password_count, logon_count;
-       struct samr_Password lm_pw, nt_pw;
-       uint8_t *nt_pw_hist_ptr;
-       uint8_t *hours;
-};
-
-struct samba3_groupmapping {
-       gid_t gid;
-       struct dom_sid *sid;
-       int sid_name_use;
-       const char *nt_name;
-       const char *comment;
-};
-
-struct samba3_alias {
-       struct dom_sid *sid;
-       uint32_t member_count;
-       struct dom_sid **members;
-};
-
-struct samba3_groupdb {
-       uint32_t groupmap_count;
-       struct samba3_groupmapping *groupmappings;
-
-       uint32_t alias_count;
-       struct samba3_alias *aliases;
-};
-
-struct samba3_idmap_mapping
-{
-       enum { IDMAP_GROUP, IDMAP_USER } type;
-       uint32_t unix_id;
-       struct dom_sid *sid;
-};
-
-struct samba3_idmapdb
-{
-       /* High water marks */
-       uint32_t user_hwm;
-       uint32_t group_hwm;
-
-       uint32_t mapping_count;
-       struct samba3_idmap_mapping *mappings;
-};
-
-struct samba3_winsdb_entry 
-{
-       char *name;
-       int nb_flags;
-       int type;
-       time_t ttl;
-       uint32_t ip_count;
-       struct in_addr *ips;
-};
-
-struct samba3_policy
-{
-       uint32_t min_password_length;
-       uint32_t password_history;
-       uint32_t user_must_logon_to_change_password;
-       uint32_t maximum_password_age;
-       uint32_t minimum_password_age;
-       uint32_t lockout_duration;
-       uint32_t reset_count_minutes;
-       uint32_t bad_lockout_minutes;
-       uint32_t disconnect_time;
-       uint32_t refuse_machine_password_change;
-};
-
-struct samba3_regval {
-       char *name;
-       uint16_t                type;
-       DATA_BLOB               data;
-};
-
-struct samba3_regkey {
-       char *name;
-       
-       uint32_t value_count;
-       struct samba3_regval *values;
-
-       uint32_t subkey_count;
-       char **subkeys;
-};
-
-struct samba3_regdb
-{
-       uint32_t key_count;
-       struct samba3_regkey *keys;
-};
-
-struct samba3_secrets
-{
-       struct cli_credentials *ipc_cred;
-       
-       uint32_t ldappw_count;
-       struct samba3_ldappw 
-       {
-               char *dn;
-               char *password;
-       } *ldappws;
-
-       uint32_t domain_count;
-       struct samba3_domainsecrets 
-       {
-               char *name;
-               struct dom_sid sid;
-               struct GUID guid;
-               char *plaintext_pw;
-               time_t last_change_time;
-               struct {
-                       uint8_t hash[16];
-                       time_t mod_time;
-               } hash_pw;
-               int sec_channel_type;
-       } *domains;
-
-       uint32_t trusted_domain_count;
-       struct samba3_trusted_dom_pass {
-               uint32_t uni_name_len;
-               const char *uni_name[32]; /* unicode domain name */
-               const char *pass;               /* trust relationship's password */
-               time_t mod_time;
-               struct dom_sid domain_sid;      /* remote domain's sid */
-       } *trusted_domains;
-
-       uint32_t afs_keyfile_count;
-
-       struct samba3_afs_keyfile {
-               uint32_t nkeys;
-               struct {
-                       uint32_t kvno;
-                       char key[8];
-               } entry[8];
-               char *cell;
-       } *afs_keyfiles;
-};
-
-struct samba3_share_info {
-       char *name;
-       struct security_descriptor secdesc;
-};
-
-struct samba3 
-{
-       struct param_context *configuration;
-
-       uint32_t winsdb_count;
-       struct samba3_winsdb_entry *winsdb_entries;
-       
-       uint32_t samaccount_count;
-       struct samba3_samaccount *samaccounts;
-
-       uint32_t share_count;
-       struct samba3_share_info *shares;
-
-       struct samba3_secrets secrets;
-       struct samba3_groupdb group;
-       struct samba3_idmapdb idmap;
-       struct samba3_policy policy;
-       struct samba3_regdb registry;
-};
-
-#include "lib/samba3/samba3_smbpasswd_proto.h"
+struct samr_Password *smbpasswd_gethexpwd(TALLOC_CTX *mem_ctx, const char *p);
+char *smbpasswd_sethexpwd(TALLOC_CTX *mem_ctx, struct samr_Password *pwd, uint16_t acb_info);
+uint16_t smbpasswd_decode_acb_info(const char *p);
+char *smbpasswd_encode_acb_info(TALLOC_CTX *mem_ctx, uint16_t acb_info);
 
 #endif /* _SAMBA3_H */
index a85f335b8a345a385276cc0230a8abe2185d7f8d..314fe13471334f70b93875f4d7a18c77e8461f3c 100644 (file)
@@ -82,7 +82,7 @@ static char *smb_readline_replacement(const char *prompt, void (*callback)(void)
        int fd = STDIN_FILENO;
        char *ret;
 
-       do_debug("%s", prompt);
+       printf("%s", prompt);
 
        line = (char *)malloc(BUFSIZ);
        if (!line) {
index c327f02bbd421405dfba57400d9cd3ab8040a6d7..b4e7c2bf3208a4892718553fc41dd0bbf47e9513 100644 (file)
@@ -22,7 +22,7 @@
 #include "includes.h"
 #include "system/network.h"
 #include "lib/socket/netif.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "param/param.h"
 
 /** used for network interfaces */
index 92f0a4400546cc6a9a7b43ef325d817ca490327b..0c3d0320685da9cf151bd27db6d27fc9e3d618c2 100644 (file)
@@ -491,7 +491,7 @@ static const struct {
 **/
 _PUBLIC_ void set_socket_options(int fd, const char *options)
 {
-       const char **options_list = str_list_make(NULL, options, " \t,");
+       const char **options_list = (const char **)str_list_make(NULL, options, " \t,");
        int j;
 
        if (!options_list)
index 92fa0e5a548af0d0053f67a5bbfc48494a53dff6..72a7e6485c708ed1bafd559638762fa7e8d8bc79 100644 (file)
@@ -21,7 +21,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "lib/events/events.h"
 #include "lib/socket/socket.h"
 #include "lib/stream/packet.h"
index fadf1736dcb2543dae007b832aa0eff9911b8d32..da27803b06006b8c7c0c514957003e1e54dbbb7b 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "includes.h"
 #include "../tdb/include/tdb.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "tdb_wrap.h"
 #include "tdb.h"
 
@@ -46,7 +46,7 @@ static void tdb_wrap_log(TDB_CONTEXT *tdb, enum tdb_debug_level level,
 {
        va_list ap;
        char *ptr = NULL;
-       int debug_level;
+       int dl;
 
        va_start(ap, format);
        vasprintf(&ptr, format, ap);
@@ -54,24 +54,24 @@ static void tdb_wrap_log(TDB_CONTEXT *tdb, enum tdb_debug_level level,
        
        switch (level) {
        case TDB_DEBUG_FATAL:
-               debug_level = 0;
+               dl = 0;
                break;
        case TDB_DEBUG_ERROR:
-               debug_level = 1;
+               dl = 1;
                break;
        case TDB_DEBUG_WARNING:
-               debug_level = 2;
+               dl = 2;
                break;
        case TDB_DEBUG_TRACE:
-               debug_level = 5;
+               dl = 5;
                break;
        default:
-               debug_level = 0;
+               dl = 0;
        }               
 
        if (ptr != NULL) {
                const char *name = tdb_name(tdb);
-               DEBUG(debug_level, ("tdb(%s): %s", name ? name : "unnamed", ptr));
+               DEBUG(dl, ("tdb(%s): %s", name ? name : "unnamed", ptr));
                free(ptr);
        }
 }
index b298fb10cf3f5abdb483ff1cb6343a17511035de..046c2b90368d475c4a65e098b82bd9178a656263 100644 (file)
@@ -421,7 +421,7 @@ struct tls_params *tls_initialise(TALLOC_CTX *mem_ctx, struct loadparm_context *
        if (dhpfile && *dhpfile) {
                gnutls_datum_t dhparms;
                size_t size;
-               dhparms.data = (uint8_t *)file_load(dhpfile, &size, mem_ctx);
+               dhparms.data = (uint8_t *)file_load(dhpfile, &size, 0, mem_ctx);
 
                if (!dhparms.data) {
                        DEBUG(0,("Failed to read DH Parms from %s\n", dhpfile));
index 33959ded16ec2f1c69c1e78be2c6676473ffdaed..166bb7eb8446caa8ae15b8770ebde94445d30c0a 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "includes.h"
 #include "torture/torture.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "param/param.h"
 #include "system/filesys.h"
 
index f023f319ffe0c3802670e6fce256d27fdb55e101..0f966a52d131532546474973652b79d6c8427caf 100644 (file)
@@ -267,7 +267,7 @@ void torture_result(struct torture_context *test,
        char *__got; \
        const char *__expected = (expected); \
        size_t __size; \
-       __got = file_load(filename, &__size, torture_ctx); \
+       __got = file_load(filename, &__size, 0, torture_ctx); \
        if (__got == NULL) { \
                torture_result(torture_ctx, TORTURE_FAIL, \
                               __location__": unable to open %s: %s\n", \
@@ -288,7 +288,7 @@ void torture_result(struct torture_context *test,
 #define torture_assert_file_contains(torture_ctx,filename,expected,cmt)\
        do { const char *__got, *__expected = (expected); \
        size_t __size; \
-       __got = file_load(filename, *size, torture_ctx); \
+       __got = file_load(filename, *size, 0, torture_ctx); \
        if (strcmp_safe(__got, __expected) != 0) { \
                torture_result(torture_ctx, TORTURE_FAIL, \
                                           __location__": %s contained:\n%sExpected: %s%s\n", \
diff --git a/source4/lib/util/dlinklist.h b/source4/lib/util/dlinklist.h
deleted file mode 100644 (file)
index 5624124..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-   some simple double linked list macros
-   Copyright (C) Andrew Tridgell 1998
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/* To use these macros you must have a structure containing a next and
-   prev pointer */
-
-#ifndef _DLINKLIST_H
-#define _DLINKLIST_H
-
-
-/* hook into the front of the list */
-#define DLIST_ADD(list, p) \
-do { \
-        if (!(list)) { \
-               (list) = (p); \
-               (p)->next = (p)->prev = NULL; \
-       } else { \
-               (list)->prev = (p); \
-               (p)->next = (list); \
-               (p)->prev = NULL; \
-               (list) = (p); \
-       }\
-} while (0)
-
-/* remove an element from a list - element doesn't have to be in list. */
-#define DLIST_REMOVE(list, p) \
-do { \
-       if ((p) == (list)) { \
-               (list) = (p)->next; \
-               if (list) (list)->prev = NULL; \
-       } else { \
-               if ((p)->prev) (p)->prev->next = (p)->next; \
-               if ((p)->next) (p)->next->prev = (p)->prev; \
-       } \
-       if ((p) != (list)) (p)->next = (p)->prev = NULL; \
-} while (0)
-
-/* promote an element to the top of the list */
-#define DLIST_PROMOTE(list, p) \
-do { \
-          DLIST_REMOVE(list, p); \
-          DLIST_ADD(list, p); \
-} while (0)
-
-/* hook into the end of the list - needs a tmp pointer */
-#define DLIST_ADD_END(list, p, type) \
-do { \
-               if (!(list)) { \
-                       (list) = (p); \
-                       (p)->next = (p)->prev = NULL; \
-               } else { \
-                       type tmp; \
-                       for (tmp = (list); tmp->next; tmp = tmp->next) ; \
-                       tmp->next = (p); \
-                       (p)->next = NULL; \
-                       (p)->prev = tmp; \
-               } \
-} while (0)
-
-/* insert 'p' after the given element 'el' in a list. If el is NULL then
-   this is the same as a DLIST_ADD() */
-#define DLIST_ADD_AFTER(list, p, el) \
-do { \
-        if (!(list) || !(el)) { \
-               DLIST_ADD(list, p); \
-       } else { \
-               p->prev = el; \
-               p->next = el->next; \
-               el->next = p; \
-               if (p->next) p->next->prev = p; \
-       }\
-} while (0)
-
-/* demote an element to the end of the list, needs a tmp pointer */
-#define DLIST_DEMOTE(list, p, tmp) \
-do { \
-               DLIST_REMOVE(list, p); \
-               DLIST_ADD_END(list, p, tmp); \
-} while (0)
-
-/* concatenate two lists - putting all elements of the 2nd list at the
-   end of the first list */
-#define DLIST_CONCATENATE(list1, list2, type) \
-do { \
-               if (!(list1)) { \
-                       (list1) = (list2); \
-               } else { \
-                       type tmp; \
-                       for (tmp = (list1); tmp->next; tmp = tmp->next) ; \
-                       tmp->next = (list2); \
-                       if (list2) { \
-                               (list2)->prev = tmp;    \
-                       } \
-               } \
-} while (0)
-
-#endif /* _DLINKLIST_H */
index 3af7e45002c6b5b1f32a88d1e7ea281f80ba78d4..096f51e49b19508358bf147a9286477329b2e88c 100644 (file)
@@ -536,9 +536,62 @@ bool decode_pw_buffer(uint8_t in_buffer[516], char *new_pwrd,
 #ifdef DEBUG_PASSWORD
        DEBUG(100,("decode_pw_buffer: new_pwrd: "));
        dump_data(100, (const uint8_t *)new_pwrd, converted_pw_len);
-       DEBUG(100,("multibyte len:%d\n", converted_pw_len));
+       DEBUG(100,("multibyte len:%d\n", (int)converted_pw_len));
        DEBUG(100,("original char len:%d\n", byte_len/2));
 #endif
        
        return true;
 }
+
+/***********************************************************
+ encode a password buffer with an already unicode password.  The
+ rest of the buffer is filled with random data to make it harder to attack.
+************************************************************/
+bool set_pw_in_buffer(uint8_t buffer[516], DATA_BLOB *password)
+{
+       if (password->length > 512) {
+               return false;
+       }
+
+       memcpy(&buffer[512 - password->length], password->data, password->length);
+
+       generate_random_buffer(buffer, 512 - password->length);
+
+       /* 
+        * The length of the new password is in the last 4 bytes of
+        * the data buffer.
+        */
+       SIVAL(buffer, 512, password->length);
+       return true;
+}
+
+/***********************************************************
+ decode a password buffer
+ *new_pw_size is the length in bytes of the extracted unicode password
+************************************************************/
+bool extract_pw_from_buffer(TALLOC_CTX *mem_ctx, 
+                           uint8_t in_buffer[516], DATA_BLOB *new_pass)
+{
+       int byte_len=0;
+
+       /* The length of the new password is in the last 4 bytes of the data buffer. */
+
+       byte_len = IVAL(in_buffer, 512);
+
+#ifdef DEBUG_PASSWORD
+       dump_data(100, in_buffer, 516);
+#endif
+
+       /* Password cannot be longer than the size of the password buffer */
+       if ( (byte_len < 0) || (byte_len > 512)) {
+               return false;
+       }
+
+       *new_pass = data_blob_talloc(mem_ctx, &in_buffer[512 - byte_len], byte_len);
+
+       if (!*new_pass->data) {
+               return false;
+       }
+
+       return true;
+}
index 860bd358d5ec2139fba33c4ea95052cf48e995ce..9f1a1595732bf83b349575fd9b7dacc6b3a5ff86 100644 (file)
@@ -33,7 +33,7 @@
 
 #include "includes.h"
 #include "lib/events/events.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "libcli/ldap/ldap.h"
 #include "libcli/ldap/ldap_ndr.h"
 #include "libcli/cldap/cldap.h"
index c1a3b6b63e1abc9d3b46c57f1b517460646d3662..c78e395faaa291f38d715ca41b0728c5842cf6a9 100644 (file)
@@ -19,7 +19,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include "lib/util/asn1.h"
+#include "../lib/util/asn1.h"
 #include "../libcli/netlogon.h"
 
 struct ldap_message;
index 06b7bd57714bab1415dd379121a3f4b6d03a6021..18bfd689d26c3374afd2fd4e8b003722f74f4d91 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "includes.h"
 #include "lib/events/events.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "libcli/dgram/libdgram.h"
 #include "lib/socket/socket.h"
 #include "param/param.h"
index 4f9d0bfc7c03ee985270c5887759bf31486ed339..e613dd9228d69bfc7723b064c9b61a5e2adbd7c5 100644 (file)
@@ -33,7 +33,7 @@
 
 #include "includes.h"
 #include "lib/events/events.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "libcli/dgram/libdgram.h"
 #include "lib/socket/socket.h"
 #include "param/param.h"
@@ -197,7 +197,7 @@ NTSTATUS dgram_mailslot_send(struct nbt_dgram_socket *dgmsock,
        trans->data_offset = 70 + strlen(mailslot_name);
        trans->opcode      = 1; /* write mail slot */
        trans->priority    = 1;
-       trans->class       = 2;
+       trans->_class      = 2;
        trans->mailslot_name = mailslot_name;
        trans->data = *request;
 
index fc6de7993e4e5d047c7d556753a1380471aa8cb2..87c89daf9f47301a2665f2011bf24122c0028ce6 100644 (file)
@@ -23,7 +23,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/asn1.h"
+#include "../lib/util/asn1.h"
 #include "libcli/ldap/ldap.h"
 #include "libcli/ldap/ldap_proto.h"
 
index fc5863b671f32ee3d8ac4d757d35cab185542f64..a59356761b440658d1506b34388b0f69c48c351f 100644 (file)
@@ -23,8 +23,8 @@
 */
 
 #include "includes.h"
-#include "lib/util/asn1.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/asn1.h"
+#include "../lib/util/dlinklist.h"
 #include "lib/events/events.h"
 #include "lib/socket/socket.h"
 #include "libcli/ldap/ldap.h"
index 3b94580033729aa2edf1ccd849a6864f5e0990a9..b34e026b189e3e550e57cbec18d74fafd5a519b3 100644 (file)
@@ -20,7 +20,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/asn1.h"
+#include "../lib/util/asn1.h"
 #include "libcli/ldap/ldap.h"
 #include "lib/ldb/include/ldb.h"
 
index f8ef343e3a3f24b5400418fc5147112c5782ca4d..db43c9e20c911a987702008572ef8585bde8b360 100644 (file)
@@ -23,7 +23,7 @@
 #include "libcli/raw/libcliraw.h"
 #include "libcli/raw/raw_proto.h"
 #include "lib/socket/socket.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "lib/events/events.h"
 #include "lib/stream/packet.h"
 #include "librpc/gen_ndr/ndr_nbt.h"
index bf7578d7fccbff861418f2b6d0da647833fe1f41..28ab3eb1a4ec6c4a916542ce29adb6d4f70df47f 100644 (file)
@@ -20,7 +20,7 @@
 #include "includes.h"
 #include "libcli/raw/libcliraw.h"
 #include "libcli/raw/raw_proto.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 
 /****************************************************************************
 change notify (async send)
index dd9b1f3e963c76014534a332398c7bcf148ce96c..353b66c6220271a808688a73ef5e121e41aebaed 100644 (file)
@@ -25,7 +25,7 @@
 #include "includes.h"
 #include "libcli/raw/libcliraw.h"
 #include "libcli/raw/raw_proto.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "lib/events/events.h"
 #include "param/param.h"
 #include "librpc/ndr/libndr.h"
index 2f529863dc94171b1e93ce02ebcca9d5b58b9870..d68df56705896889274c12fb62d540c734f8c268 100644 (file)
@@ -19,7 +19,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "libcli/raw/libcliraw.h"
 #include "libcli/raw/raw_proto.h"
 
index dbc4a2ede749a58ac7e1686d94cbf654ea712f69..7f4ae4d79f1082f00f3aaf23be580dfb8c5f0b49 100644 (file)
@@ -27,7 +27,7 @@
 #include "librpc/gen_ndr/ndr_nbt.h"
 #include "param/param.h"
 #include "system/network.h"
-#include "util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 
 struct resolve_state {
        struct resolve_context *ctx;
index ebce9b98bdc37f755afce1d5962f200d96e1eaa8..f787d52d3135614580d681d326cff85144cf2591 100644 (file)
@@ -79,7 +79,7 @@ NTSTATUS resolve_name_wins(struct nbt_name *name,
 bool resolve_context_add_wins_method(struct resolve_context *ctx, const char **address_list, struct interface *ifaces, uint16_t nbt_port, int nbt_timeout)
 {
        struct resolve_wins_data *wins_data = talloc(ctx, struct resolve_wins_data);
-       wins_data->address_list = str_list_copy(wins_data, address_list);
+       wins_data->address_list = (const char **)str_list_copy(wins_data, address_list);
        wins_data->ifaces = talloc_reference(wins_data, ifaces);
        wins_data->nbt_port = nbt_port;
        wins_data->nbt_timeout = nbt_timeout;
index 137e2f2f12dee0f745443781104c0dadfaec4e21..cc355fc33e7c5601f927020ca8aad0b77a35c742 100644 (file)
@@ -23,7 +23,7 @@
 #include "includes.h"
 #include "libcli/raw/libcliraw.h"
 #include "libcli/smb2/smb2.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "lib/events/events.h"
 #include "libcli/smb2/smb2_calls.h"
 #include "param/param.h"
index b946a102c87236b3b58db11480a3b3fac7968167..6d7531f4b5bd77b3bf14a8a5a61e7326a21caa58 100644 (file)
@@ -27,7 +27,7 @@
 #include "lib/socket/socket.h"
 #include "lib/events/events.h"
 #include "lib/stream/packet.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 
 
 /*
index 1eb2de83d2c46808401890a4736f7c38c99cbb07..abca8f49b2f014f61a7eedc9d368447ca08a651b 100644 (file)
@@ -349,7 +349,7 @@ NTSTATUS smblsa_sid_del_privileges(struct smbcli_state *cli, struct dom_sid *sid
 
        r.in.handle = &cli->lsa->handle;
        r.in.sid = sid;
-       r.in.unknown = 0;
+       r.in.remove_all = 0;
        r.in.rights = rights;
 
        return dcerpc_lsa_RemoveAccountRights(cli->lsa->pipe, mem_ctx, &r);
index 0a4e52bd7baff71c912d89262516cb6458cf8e2e..84bda8c8585eaa99e497f7d982304abeff973ce7 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "includes.h"
 #include "lib/events/events.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "lib/socket/socket.h"
 #include "libcli/wrepl/winsrepl.h"
 #include "librpc/gen_ndr/ndr_winsrepl.h"
index 4cbebbf6d0af1a69f45170eb36c514b903485263..6e7924248c632ff8b5b0ad63691641e4227b7297 100644 (file)
@@ -2173,11 +2173,15 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
        /* setup request structure */
        r->in.bind_handle                                               = &s->drsuapi1.bind_handle;
        r->in.level                                                     = 2;
-       r->in.req.req2.first_object.next_object                         = NULL;
-       r->in.req.req2.first_object.object.identifier                   = identifier;
-       r->in.req.req2.first_object.object.flags                        = 0x00000000;
-       r->in.req.req2.first_object.object.attribute_ctr.num_attributes = num_attrs;
-       r->in.req.req2.first_object.object.attribute_ctr.attributes     = attrs;
+       r->in.req                                                       = talloc(s, union drsuapi_DsAddEntryRequest);
+       r->in.req->req2.first_object.next_object                        = NULL;
+       r->in.req->req2.first_object.object.identifier                  = identifier;
+       r->in.req->req2.first_object.object.flags                       = 0x00000000;
+       r->in.req->req2.first_object.object.attribute_ctr.num_attributes= num_attrs;
+       r->in.req->req2.first_object.object.attribute_ctr.attributes    = attrs;
+
+       r->out.level_out        = talloc(s, int32_t);
+       r->out.ctr              = talloc(s, union drsuapi_DsAddEntryCtr);
 
        req = dcerpc_drsuapi_DsAddEntry_send(s->drsuapi1.pipe, r, r);
        composite_continue_rpc(c, req, becomeDC_drsuapi1_add_entry_recv, s);
@@ -2212,37 +2216,37 @@ static void becomeDC_drsuapi1_add_entry_recv(struct rpc_request *req)
                return;
        }
 
-       if (r->out.level == 3) {
-               if (r->out.ctr.ctr3.count != 1) {
+       if (*r->out.level_out == 3) {
+               if (r->out.ctr->ctr3.count != 1) {
                        WERROR status;
 
-                       if (r->out.ctr.ctr3.level != 1) {
+                       if (r->out.ctr->ctr3.level != 1) {
                                composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
                                return;
                        }
 
-                       if (!r->out.ctr.ctr3.error) {
+                       if (!r->out.ctr->ctr3.error) {
                                composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
                                return;
                        }
 
-                       status = r->out.ctr.ctr3.error->info1.status;
+                       status = r->out.ctr->ctr3.error->info1.status;
 
-                       if (!r->out.ctr.ctr3.error->info1.info) {
+                       if (!r->out.ctr->ctr3.error->info1.info) {
                                composite_error(c, werror_to_ntstatus(status));
                                return;
                        }
 
                        /* see if we can get a more detailed error */
-                       switch (r->out.ctr.ctr3.error->info1.level) {
+                       switch (r->out.ctr->ctr3.error->info1.level) {
                        case 1:
-                               status = r->out.ctr.ctr3.error->info1.info->error1.status;
+                               status = r->out.ctr->ctr3.error->info1.info->error1.status;
                                break;
                        case 4:
                        case 5:
                        case 6:
                        case 7:
-                               status = r->out.ctr.ctr3.error->info1.info->errorX.status;
+                               status = r->out.ctr->ctr3.error->info1.info->errorX.status;
                                break;
                        }
 
@@ -2250,14 +2254,14 @@ static void becomeDC_drsuapi1_add_entry_recv(struct rpc_request *req)
                        return;
                }
 
-               s->dest_dsa.ntds_guid   = r->out.ctr.ctr3.objects[0].guid;
-       } else if (r->out.level == 2) {
-               if (r->out.ctr.ctr2.count != 1) {
-                       composite_error(c, werror_to_ntstatus(r->out.ctr.ctr2.error.status));
+               s->dest_dsa.ntds_guid   = r->out.ctr->ctr3.objects[0].guid;
+       } else if (*r->out.level_out == 2) {
+               if (r->out.ctr->ctr2.count != 1) {
+                       composite_error(c, werror_to_ntstatus(r->out.ctr->ctr2.error.status));
                        return;
                }
 
-               s->dest_dsa.ntds_guid   = r->out.ctr.ctr2.objects[0].guid;
+               s->dest_dsa.ntds_guid   = r->out.ctr->ctr2.objects[0].guid;
        } else {
                composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
                return;
@@ -2392,40 +2396,42 @@ static void becomeDC_drsuapi_pull_partition_send(struct libnet_BecomeDC_state *s
        r = talloc(s, struct drsuapi_DsGetNCChanges);
        if (composite_nomem(r, c)) return;
 
-       r->in.level = talloc(r, int32_t);
-       if (composite_nomem(r->in.level, c)) return;
-       r->out.level = talloc(r, int32_t);
-       if (composite_nomem(r->out.level, c)) return;
+       r->out.level_out = talloc(r, int32_t);
+       if (composite_nomem(r->out.level_out, c)) return;
+       r->in.req = talloc(r, union drsuapi_DsGetNCChangesRequest);
+       if (composite_nomem(r->in.req, c)) return;
+       r->out.ctr = talloc(r, union drsuapi_DsGetNCChangesCtr);
+       if (composite_nomem(r->out.ctr, c)) return;
 
        r->in.bind_handle       = &drsuapi_h->bind_handle;
        if (drsuapi_h->remote_info28.supported_extensions & DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8) {
-               *r->in.level                            = 8;
-               r->in.req.req8.destination_dsa_guid     = partition->destination_dsa_guid;
-               r->in.req.req8.source_dsa_invocation_id = partition->source_dsa_invocation_id;
-               r->in.req.req8.naming_context           = &partition->nc;
-               r->in.req.req8.highwatermark            = partition->highwatermark;
-               r->in.req.req8.uptodateness_vector      = NULL;
-               r->in.req.req8.replica_flags            = partition->replica_flags;
-               r->in.req.req8.max_object_count         = 133;
-               r->in.req.req8.max_ndr_size             = 1336811;
-               r->in.req.req8.extended_op              = DRSUAPI_EXOP_NONE;
-               r->in.req.req8.fsmo_info                = 0;
-               r->in.req.req8.partial_attribute_set    = NULL;
-               r->in.req.req8.partial_attribute_set_ex = NULL;
-               r->in.req.req8.mapping_ctr.num_mappings = 0;
-               r->in.req.req8.mapping_ctr.mappings     = NULL;
+               r->in.level                             = 8;
+               r->in.req->req8.destination_dsa_guid    = partition->destination_dsa_guid;
+               r->in.req->req8.source_dsa_invocation_id= partition->source_dsa_invocation_id;
+               r->in.req->req8.naming_context          = &partition->nc;
+               r->in.req->req8.highwatermark           = partition->highwatermark;
+               r->in.req->req8.uptodateness_vector     = NULL;
+               r->in.req->req8.replica_flags           = partition->replica_flags;
+               r->in.req->req8.max_object_count        = 133;
+               r->in.req->req8.max_ndr_size            = 1336811;
+               r->in.req->req8.extended_op             = DRSUAPI_EXOP_NONE;
+               r->in.req->req8.fsmo_info               = 0;
+               r->in.req->req8.partial_attribute_set   = NULL;
+               r->in.req->req8.partial_attribute_set_ex= NULL;
+               r->in.req->req8.mapping_ctr.num_mappings= 0;
+               r->in.req->req8.mapping_ctr.mappings    = NULL;
        } else {
-               *r->in.level                            = 5;
-               r->in.req.req5.destination_dsa_guid     = partition->destination_dsa_guid;
-               r->in.req.req5.source_dsa_invocation_id = partition->source_dsa_invocation_id;
-               r->in.req.req5.naming_context           = &partition->nc;
-               r->in.req.req5.highwatermark            = partition->highwatermark;
-               r->in.req.req5.uptodateness_vector      = NULL;
-               r->in.req.req5.replica_flags            = partition->replica_flags;
-               r->in.req.req5.max_object_count         = 133;
-               r->in.req.req5.max_ndr_size             = 1336770;
-               r->in.req.req5.extended_op              = DRSUAPI_EXOP_NONE;
-               r->in.req.req5.fsmo_info                = 0;
+               r->in.level                             = 5;
+               r->in.req->req5.destination_dsa_guid    = partition->destination_dsa_guid;
+               r->in.req->req5.source_dsa_invocation_id= partition->source_dsa_invocation_id;
+               r->in.req->req5.naming_context          = &partition->nc;
+               r->in.req->req5.highwatermark           = partition->highwatermark;
+               r->in.req->req5.uptodateness_vector     = NULL;
+               r->in.req->req5.replica_flags           = partition->replica_flags;
+               r->in.req->req5.max_object_count        = 133;
+               r->in.req->req5.max_ndr_size            = 1336770;
+               r->in.req->req5.extended_op             = DRSUAPI_EXOP_NONE;
+               r->in.req->req5.fsmo_info               = 0;
        }
 
        /* 
@@ -2457,28 +2463,28 @@ static WERROR becomeDC_drsuapi_pull_partition_recv(struct libnet_BecomeDC_state
                return r->out.result;
        }
 
-       if (*r->out.level == 1) {
+       if (*r->out.level_out == 1) {
                ctr_level = 1;
-               ctr1 = &r->out.ctr.ctr1;
-       } else if (*r->out.level == 2 &&
-                  r->out.ctr.ctr2.mszip1.ts) {
+               ctr1 = &r->out.ctr->ctr1;
+       } else if (*r->out.level_out == 2 &&
+                  r->out.ctr->ctr2.mszip1.ts) {
                ctr_level = 1;
-               ctr1 = &r->out.ctr.ctr2.mszip1.ts->ctr1;
-       } else if (*r->out.level == 6) {
+               ctr1 = &r->out.ctr->ctr2.mszip1.ts->ctr1;
+       } else if (*r->out.level_out == 6) {
                ctr_level = 6;
-               ctr6 = &r->out.ctr.ctr6;
-       } else if (*r->out.level == 7 &&
-                  r->out.ctr.ctr7.level == 6 &&
-                  r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP &&
-                  r->out.ctr.ctr7.ctr.mszip6.ts) {
+               ctr6 = &r->out.ctr->ctr6;
+       } else if (*r->out.level_out == 7 &&
+                  r->out.ctr->ctr7.level == 6 &&
+                  r->out.ctr->ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP &&
+                  r->out.ctr->ctr7.ctr.mszip6.ts) {
                ctr_level = 6;
-               ctr6 = &r->out.ctr.ctr7.ctr.mszip6.ts->ctr6;
-       } else if (*r->out.level == 7 &&
-                  r->out.ctr.ctr7.level == 6 &&
-                  r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS &&
-                  r->out.ctr.ctr7.ctr.xpress6.ts) {
+               ctr6 = &r->out.ctr->ctr7.ctr.mszip6.ts->ctr6;
+       } else if (*r->out.level_out == 7 &&
+                  r->out.ctr->ctr7.level == 6 &&
+                  r->out.ctr->ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS &&
+                  r->out.ctr->ctr7.ctr.xpress6.ts) {
                ctr_level = 6;
-               ctr6 = &r->out.ctr.ctr7.ctr.xpress6.ts->ctr6;
+               ctr6 = &r->out.ctr->ctr7.ctr.xpress6.ts->ctr6;
        } else {
                return WERR_BAD_NET_RESP;
        }
index 43f86489217cf2e64f21f2624eadb89ba76c88d4..0ed5e8ae2623b9d44e8045aa515314f472079829 100644 (file)
@@ -27,7 +27,7 @@
 #include "param/secrets.h"
 #include "dsdb/samdb/samdb.h"
 #include "ldb_wrap.h"
-#include "util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 #include "libcli/security/security.h"
 #include "auth/credentials/credentials.h"
 #include "auth/credentials/credentials_krb5.h"
@@ -162,13 +162,19 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
        ZERO_STRUCT(r_crack_names);
        r_crack_names.in.bind_handle            = &drsuapi_bind_handle;
        r_crack_names.in.level                  = 1;
-       r_crack_names.in.req.req1.codepage      = 1252; /* western european */
-       r_crack_names.in.req.req1.language      = 0x00000407; /* german */
-       r_crack_names.in.req.req1.count         = 1;
-       r_crack_names.in.req.req1.names         = names;
-       r_crack_names.in.req.req1.format_flags  = DRSUAPI_DS_NAME_FLAG_NO_FLAGS;
-       r_crack_names.in.req.req1.format_offered= DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY;
-       r_crack_names.in.req.req1.format_desired= DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
+       r_crack_names.in.req                    = talloc(r, union drsuapi_DsNameRequest);
+       if (!r_crack_names.in.req) {
+               r->out.error_string = NULL;
+               talloc_free(tmp_ctx);
+               return NT_STATUS_NO_MEMORY;
+       }
+       r_crack_names.in.req->req1.codepage     = 1252; /* western european */
+       r_crack_names.in.req->req1.language     = 0x00000407; /* german */
+       r_crack_names.in.req->req1.count        = 1;
+       r_crack_names.in.req->req1.names        = names;
+       r_crack_names.in.req->req1.format_flags = DRSUAPI_DS_NAME_FLAG_NO_FLAGS;
+       r_crack_names.in.req->req1.format_offered = DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY;
+       r_crack_names.in.req->req1.format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
        names[0].str = dom_sid_string(tmp_ctx, r->out.account_sid);
        if (!names[0].str) {
                r->out.error_string = NULL;
@@ -176,6 +182,14 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
                return NT_STATUS_NO_MEMORY;
        }
 
+       r_crack_names.out.ctr                   = talloc(r, union drsuapi_DsNameCtr);
+       r_crack_names.out.level_out             = talloc(r, int32_t);
+       if (!r_crack_names.out.ctr || !r_crack_names.out.level_out) {
+               r->out.error_string = NULL;
+               talloc_free(tmp_ctx);
+               return NT_STATUS_NO_MEMORY;
+       }
+
        status = dcerpc_drsuapi_DsCrackNames(drsuapi_pipe, tmp_ctx, &r_crack_names);
        if (!NT_STATUS_IS_OK(status)) {
                if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
@@ -201,24 +215,24 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
                                                  "DsCrackNames failed - %s", win_errstr(r_crack_names.out.result));
                talloc_free(tmp_ctx);
                return NT_STATUS_UNSUCCESSFUL;
-       } else if (r_crack_names.out.level != 1 
-                  || !r_crack_names.out.ctr.ctr1 
-                  || r_crack_names.out.ctr.ctr1->count != 1) {
+       } else if (*r_crack_names.out.level_out != 1
+                  || !r_crack_names.out.ctr->ctr1
+                  || r_crack_names.out.ctr->ctr1->count != 1) {
                r->out.error_string = talloc_asprintf(r, "DsCrackNames failed");
                talloc_free(tmp_ctx);
                return NT_STATUS_INVALID_PARAMETER;
-       } else if (r_crack_names.out.ctr.ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
-               r->out.error_string = talloc_asprintf(r, "DsCrackNames failed: %d", r_crack_names.out.ctr.ctr1->array[0].status);
+       } else if (r_crack_names.out.ctr->ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
+               r->out.error_string = talloc_asprintf(r, "DsCrackNames failed: %d", r_crack_names.out.ctr->ctr1->array[0].status);
                talloc_free(tmp_ctx);
                return NT_STATUS_UNSUCCESSFUL;
-       } else if (r_crack_names.out.ctr.ctr1->array[0].result_name == NULL) {
+       } else if (r_crack_names.out.ctr->ctr1->array[0].result_name == NULL) {
                r->out.error_string = talloc_asprintf(r, "DsCrackNames failed: no result name");
                talloc_free(tmp_ctx);
                return NT_STATUS_INVALID_PARAMETER;
        }
 
        /* Store the DN of our machine account. */
-       account_dn_str = r_crack_names.out.ctr.ctr1->array[0].result_name;
+       account_dn_str = r_crack_names.out.ctr->ctr1->array[0].result_name;
 
        /* Now we know the user's DN, open with LDAP, read and modify a few things */
 
@@ -328,8 +342,8 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
        }
                                
        /* DsCrackNames to find out the DN of the domain. */
-       r_crack_names.in.req.req1.format_offered = DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT;
-       r_crack_names.in.req.req1.format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
+       r_crack_names.in.req->req1.format_offered = DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT;
+       r_crack_names.in.req->req1.format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
        names[0].str = talloc_asprintf(tmp_ctx, "%s\\", r->out.domain_name);
        if (!names[0].str) {
                r->out.error_string = NULL;
@@ -362,11 +376,11 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
                                          "DsCrackNames failed - %s", win_errstr(r_crack_names.out.result));
                talloc_free(tmp_ctx);
                return NT_STATUS_UNSUCCESSFUL;
-       } else if (r_crack_names.out.level != 1 
-                  || !r_crack_names.out.ctr.ctr1 
-                  || r_crack_names.out.ctr.ctr1->count != 1
-                  || !r_crack_names.out.ctr.ctr1->array[0].result_name           
-                  || r_crack_names.out.ctr.ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
+       } else if (*r_crack_names.out.level_out != 1
+                  || !r_crack_names.out.ctr->ctr1
+                  || r_crack_names.out.ctr->ctr1->count != 1
+                  || !r_crack_names.out.ctr->ctr1->array[0].result_name
+                  || r_crack_names.out.ctr->ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
                r->out.error_string = talloc_asprintf(r, "DsCrackNames failed");
                talloc_free(tmp_ctx);
                return NT_STATUS_UNSUCCESSFUL;
@@ -377,8 +391,8 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
        talloc_steal(r, account_dn_str);
 
        /* Store the domain DN. */
-       r->out.domain_dn_str = r_crack_names.out.ctr.ctr1->array[0].result_name;
-       talloc_steal(r, r_crack_names.out.ctr.ctr1->array[0].result_name);
+       r->out.domain_dn_str = r_crack_names.out.ctr->ctr1->array[0].result_name;
+       talloc_steal(r, r_crack_names.out.ctr->ctr1->array[0].result_name);
 
        /* Store the KVNO of the account, critical for some kerberos
         * operations */
index cab4d9e73f76173fa48c21a6cb53e08c40e2dbeb..dc54ec3cf1b51fcfd6206b8d3713a20c4706fddd 100644 (file)
@@ -129,7 +129,7 @@ NTSTATUS libnet_Lookup_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
        if (NT_STATUS_IS_OK(status)) {
                s = talloc_get_type(c->private_data, struct lookup_state);
 
-               io->out.address = str_list_make(mem_ctx, s->address, NULL);
+               io->out.address = (const char **)str_list_make(mem_ctx, s->address, NULL);
                NT_STATUS_HAVE_NO_MEMORY(io->out.address);
        }
 
index 9d417d280d71a9d44fa625210fa4b5aa6d9dad49..1fe07b60dc83b335fb0a4e6e4a98275a791aa701 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "includes.h"
 #include "libnet/libnet.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "samba3/samba3.h"
 #include "libcli/security/security.h"
 
index c72aef7d7025b2ed3a894375e81116e69f26c246..8b7dd1f59891beec4fc29007c5d04f79ee04b87a 100644 (file)
@@ -27,7 +27,7 @@
 #include "libcli/ldap/ldap_ndr.h"
 #include "dsdb/samdb/samdb.h"
 #include "auth/auth.h"
-#include "util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "ldb_wrap.h"
 #include "libcli/security/security.h"
index 2ee3c641b2bb7afb01ede8e3b7e6e2a38edb767b..79c6dc0fc10e11bb7b609b3428e9071874491e9a 100644 (file)
@@ -639,9 +639,13 @@ static void unbecomeDC_drsuapi_remove_ds_server_send(struct libnet_UnbecomeDC_st
 
        r->in.bind_handle       = &s->drsuapi.bind_handle;
        r->in.level             = 1;
-       r->in.req.req1.server_dn= s->dest_dsa.server_dn_str;
-       r->in.req.req1.domain_dn= s->domain.dn_str;
-       r->in.req.req1.commit   = true;
+       r->in.req               = talloc(s, union drsuapi_DsRemoveDSServerRequest);
+       r->in.req->req1.server_dn = s->dest_dsa.server_dn_str;
+       r->in.req->req1.domain_dn = s->domain.dn_str;
+       r->in.req->req1.commit  = true;
+
+       r->out.level_out        = talloc(s, int32_t);
+       r->out.res              = talloc(s, union drsuapi_DsRemoveDSServerResult);
 
        req = dcerpc_drsuapi_DsRemoveDSServer_send(s->drsuapi.pipe, s, r);
        composite_continue_rpc(c, req, unbecomeDC_drsuapi_remove_ds_server_recv, s);
@@ -662,7 +666,7 @@ static void unbecomeDC_drsuapi_remove_ds_server_recv(struct rpc_request *req)
                return;
        }
 
-       if (r->out.level != 1) {
+       if (*r->out.level_out != 1) {
                composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
                return;
        }
index 42d6f72dd14303ff4234c349655023980c796aed..7b686ba0072f8e9505043846a043decc651b016d 100644 (file)
@@ -26,7 +26,7 @@
 #include "libnet/libnet.h"
 #include "lib/events/events.h"
 #include "dsdb/samdb/samdb.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "lib/ldb/include/ldb.h"
 #include "lib/ldb/include/ldb_errors.h"
 #include "librpc/ndr/libndr.h"
index 41dd17e428522bd100dd08b8d4e121b805d8e3a1..819b79f91f7c15612837ed7dfd0a30d207347b20 100644 (file)
@@ -8,18 +8,18 @@ dcerpcsrcdir = $(librpcsrcdir)/rpc
 PUBLIC_DEPENDENCIES = LIBSAMBA-ERRORS LIBTALLOC LIBSAMBA-UTIL CHARSET \
                                          LIBSAMBA-HOSTCONFIG
 
-LIBNDR_OBJ_FILES = $(addprefix $(ndrsrcdir)/, ndr.o ndr_basic.o ndr_string.o uuid.o)
+LIBNDR_OBJ_FILES = $(addprefix $(ndrsrcdir)/, ndr_string.o) ../librpc/ndr/ndr_basic.o ../librpc/ndr/uuid.o ../librpc/ndr/ndr.o
 
 $(eval $(call proto_header_template,$(ndrsrcdir)/libndr_proto.h,$(LIBNDR_OBJ_FILES:.o=.c)))
 
-PC_FILES += $(librpcsrcdir)/ndr.pc
+PC_FILES += ../librpc/ndr.pc
 LIBNDR_VERSION = 0.0.1
 LIBNDR_SOVERSION = 0
 
 # End SUBSYSTEM LIBNDR
 ################################################
 
-PUBLIC_HEADERS += $(ndrsrcdir)/libndr.h
+PUBLIC_HEADERS += ../librpc/ndr/libndr.h
 
 #################################
 # Start BINARY ndrdump
@@ -36,9 +36,9 @@ PRIVATE_DEPENDENCIES = \
 # End BINARY ndrdump
 #################################
 
-ndrdump_OBJ_FILES = $(librpcsrcdir)/tools/ndrdump.o
+ndrdump_OBJ_FILES = ../librpc/tools/ndrdump.o
 
-MANPAGES += $(librpcsrcdir)/tools/ndrdump.1
+MANPAGES += ../librpc/tools/ndrdump.1
 
 ################################################
 # Start SUBSYSTEM NDR_COMPRESSION
@@ -48,9 +48,7 @@ PUBLIC_DEPENDENCIES = LIBSAMBA-ERRORS LIBNDR
 # End SUBSYSTEM NDR_COMPRESSION
 ################################################
 
-NDR_COMPRESSION_OBJ_FILES = $(ndrsrcdir)/ndr_compression.o
-
-$(eval $(call proto_header_template,$(ndrsrcdir)/ndr_compression.h,$(NDR_COMPRESSION_OBJ_FILES:.o=.c)))
+NDR_COMPRESSION_OBJ_FILES = ../librpc/ndr/ndr_compression.o
 
 [SUBSYSTEM::NDR_SECURITY]
 PUBLIC_DEPENDENCIES = NDR_MISC LIBSECURITY
@@ -107,7 +105,7 @@ NDR_EFS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_efs.o
 [SUBSYSTEM::NDR_MISC]
 PUBLIC_DEPENDENCIES = LIBNDR
 
-NDR_MISC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_misc.o $(ndrsrcdir)/ndr_misc.o
+NDR_MISC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_misc.o ../librpc/ndr/ndr_misc.o
 
 PUBLIC_HEADERS += $(gen_ndrsrcdir)/misc.h $(gen_ndrsrcdir)/ndr_misc.h
 
@@ -141,12 +139,12 @@ NDR_FRSAPI_OBJ_FILES = $(gen_ndrsrcdir)/ndr_frsapi.o
 [SUBSYSTEM::NDR_DRSUAPI]
 PUBLIC_DEPENDENCIES = LIBNDR NDR_COMPRESSION NDR_SECURITY NDR_SAMR ASN1_UTIL
 
-NDR_DRSUAPI_OBJ_FILES = $(gen_ndrsrcdir)/ndr_drsuapi.o $(ndrsrcdir)/ndr_drsuapi.o
+NDR_DRSUAPI_OBJ_FILES = $(gen_ndrsrcdir)/ndr_drsuapi.o ../librpc/ndr/ndr_drsuapi.o
 
 [SUBSYSTEM::NDR_DRSBLOBS]
 PUBLIC_DEPENDENCIES = LIBNDR NDR_MISC NDR_DRSUAPI
 
-NDR_DRSBLOBS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_drsblobs.o $(ndrsrcdir)/ndr_drsblobs.o
+NDR_DRSBLOBS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_drsblobs.o ../librpc/ndr/ndr_drsblobs.o
 
 [SUBSYSTEM::NDR_SASL_HELPERS]
 PUBLIC_DEPENDENCIES = LIBNDR
@@ -320,7 +318,7 @@ NDR_KEYSVC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_keysvc.o
 [SUBSYSTEM::NDR_KRB5PAC]
 PUBLIC_DEPENDENCIES = LIBNDR NDR_NETLOGON NDR_SECURITY
 
-NDR_KRB5PAC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_krb5pac.o $(ndrsrcdir)/ndr_krb5pac.o
+NDR_KRB5PAC_OBJ_FILES = $(gen_ndrsrcdir)/ndr_krb5pac.o ../librpc/ndr/ndr_krb5pac.o
 
 [SUBSYSTEM::NDR_XATTR]
 PUBLIC_DEPENDENCIES = LIBNDR NDR_SECURITY
@@ -366,7 +364,7 @@ NDR_WINBIND_OBJ_FILES = $(gen_ndrsrcdir)/ndr_winbind.o
 #PUBLIC_HEADERS += $(gen_ndrsrcdir)/winbind.h
 
 $(librpcsrcdir)/idl-deps:
-       $(PERL) $(librpcsrcdir)/idl-deps.pl $(librpcsrcdir)/idl/*.idl >$@
+       $(PERL) $(librpcsrcdir)/idl-deps.pl $(filter-out ../librpc/idl/security.idl,$(wildcard $(librpcsrcdir)/idl/*.idl ../librpc/idl/*.idl)) >$@
 
 clean:: 
        rm -f $(librpcsrcdir)/idl-deps
@@ -618,8 +616,9 @@ PC_FILES += $(librpcsrcdir)/dcerpc.pc
 dcerpc_VERSION = 0.0.1
 dcerpc_SOVERSION = 0
 
-dcerpc_OBJ_FILES = $(addprefix $(dcerpcsrcdir)/, dcerpc.o dcerpc_auth.o dcerpc_schannel.o dcerpc_util.o binding.o \
-                                 dcerpc_error.o dcerpc_smb.o dcerpc_smb2.o dcerpc_sock.o dcerpc_connect.o dcerpc_secondary.o)
+dcerpc_OBJ_FILES = $(addprefix $(dcerpcsrcdir)/, dcerpc.o dcerpc_auth.o dcerpc_schannel.o dcerpc_util.o \
+                                 dcerpc_error.o dcerpc_smb.o dcerpc_smb2.o dcerpc_sock.o dcerpc_connect.o dcerpc_secondary.o) \
+                                       ../librpc/rpc/binding.o
 
 $(eval $(call proto_header_template,$(dcerpcsrcdir)/dcerpc_proto.h,$(dcerpc_OBJ_FILES:.o=.c)))
 
@@ -746,9 +745,9 @@ $(IDL_HEADER_FILES) $(IDL_NDR_PARSE_H_FILES) $(IDL_NDR_PARSE_C_FILES) \
        $(IDL_NDR_PY_C_FILES) $(IDL_NDR_PY_H_FILES): idl
 
 idl_full:: $(pidldir)/lib/Parse/Pidl/IDL.pm $(pidldir)/lib/Parse/Pidl/Expr.pm 
-       @CPP="$(CPP)" PIDL="$(PIDL)" $(librpcsrcdir)/scripts/build_idl.sh FULL $(librpcsrcdir)/idl $(librpcsrcdir)/gen_ndr
+       @CPP="$(CPP)" PIDL="$(PIDL)" $(librpcsrcdir)/scripts/build_idl.sh FULL $(librpcsrcdir)/gen_ndr $(IDL_FILES) 
 
 idl:: $(pidldir)/lib/Parse/Pidl/IDL.pm $(pidldir)/lib/Parse/Pidl/Expr.pm 
-       @CPP="$(CPP)" PIDL="$(PIDL)" $(librpcsrcdir)/scripts/build_idl.sh PARTIAL $(librpcsrcdir)/idl $(librpcsrcdir)/gen_ndr
+       @CPP="$(CPP)" PIDL="$(PIDL)" $(librpcsrcdir)/scripts/build_idl.sh PARTIAL $(librpcsrcdir)/gen_ndr $(IDL_FILES)
 
 
index 49fba4c935f50ce0a0197117353e15d43c4b7976..44990c519696b56c67306f892113cf73b7732786 100755 (executable)
@@ -4,8 +4,9 @@ use strict;
 my %vars = ();
 
 foreach(@ARGV) {
+       my $f = $_;
        my $b = $_; $b =~ s/.*\/(.*?).idl$/$1/;
-       push (@{$vars{IDL_FILES}}, "\$(librpcsrcdir)/idl/$b.idl");
+       push (@{$vars{IDL_FILES}}, $f);
        push (@{$vars{IDL_HEADER_FILES}}, "\$(librpcsrcdir)/gen_ndr/$b.h");
        push (@{$vars{IDL_NDR_PARSE_H_FILES}}, "\$(librpcsrcdir)/gen_ndr/ndr_$b.h");
        push (@{$vars{IDL_NDR_PARSE_C_FILES}}, "\$(librpcsrcdir)/gen_ndr/ndr_$b.c");
diff --git a/source4/librpc/idl/dfs.idl b/source4/librpc/idl/dfs.idl
deleted file mode 100644 (file)
index 1b145f3..0000000
+++ /dev/null
@@ -1,419 +0,0 @@
-/*
-  dfs interface definition
-*/
-
-import "misc.idl";
-
-[ uuid("4fc742e0-4a10-11cf-8273-00aa004ae673"),
-  version(3.0),
-  pointer_default(unique),
-  helpstring("Settings for Microsoft Distributed File System"),
-  endpoint("ncacn_np:[\\pipe\\netdfs]", "ncacn_ip_tcp:", "ncalrpc:")
-] interface netdfs
-{
-       /******************/
-       /* Function: 0x00 */
-       typedef [v1_enum] enum {
-               DFS_MANAGER_VERSION_NT4         = 1,
-               DFS_MANAGER_VERSION_W2K         = 2,
-               DFS_MANAGER_VERSION_W2K3        = 4,
-               DFS_MANAGER_VERSION_W2K8        = 6
-       } dfs_ManagerVersion;
-
-       [public] void dfs_GetManagerVersion(
-               [out]           dfs_ManagerVersion *version
-               );
-
-
-       /******************/
-       /* Function: 0x01 */
-       WERROR dfs_Add (
-               [in]            [string,charset(UTF16)] uint16 *path,
-               [in]            [string,charset(UTF16)] uint16 *server,
-               [in,unique]     [string,charset(UTF16)] uint16 *share,
-               [in,unique]     [string,charset(UTF16)] uint16 *comment,
-               [in]            uint32 flags
-               );
-
-       /******************/
-       /* Function: 0x02 */
-       WERROR dfs_Remove (
-               [in]            [string,charset(UTF16)] uint16 *dfs_entry_path,
-               [in,unique]     [string,charset(UTF16)] uint16 *servername,
-               [in,unique]     [string,charset(UTF16)] uint16 *sharename
-               );
-
-       /******************/
-       /* Function: 0x03 */
-
-       typedef struct {
-       } dfs_Info0;
-
-       typedef struct {
-               [string,charset(UTF16)] uint16 *path;
-       } dfs_Info1;
-
-       typedef [public,bitmap32bit] bitmap {
-               DFS_VOLUME_STATE_OK             = 0x1,
-               DFS_VOLUME_STATE_INCONSISTENT   = 0x2,
-               DFS_VOLUME_STATE_OFFLINE        = 0x3,
-               DFS_VOLUME_STATE_ONLINE         = 0x4,
-               DFS_VOLUME_STATE_STANDALONE     = DFS_VOLUME_FLAVOR_STANDALONE,
-               DFS_VOLUME_STATE_AD_BLOB        = DFS_VOLUME_FLAVOR_AD_BLOB
-       } dfs_VolumeState;
-
-       typedef struct {
-               [string,charset(UTF16)] uint16 *path;
-               [string,charset(UTF16)] uint16 *comment;
-               dfs_VolumeState state;
-               uint32 num_stores;
-       } dfs_Info2;
-
-       const int DFS_STORAGE_STATES = 0xf;
-
-       /* yes, this is a bitmap */
-       typedef [public,bitmap32bit] bitmap {
-               DFS_STORAGE_STATE_OFFLINE       = 1,
-               DFS_STORAGE_STATE_ONLINE        = 2,
-               DFS_STORAGE_STATE_ACTIVE        = 4
-       } dfs_StorageState;
-
-       typedef struct {
-               dfs_StorageState state;
-               [string,charset(UTF16)] uint16 *server;
-               [string,charset(UTF16)] uint16 *share;
-       } dfs_StorageInfo;
-
-       typedef struct {
-               [string,charset(UTF16)] uint16 *path;
-               [string,charset(UTF16)] uint16 *comment;
-               dfs_VolumeState state;
-               uint32 num_stores;
-               [size_is(num_stores)] dfs_StorageInfo *stores;
-       } dfs_Info3;
-
-       typedef struct {
-               [string,charset(UTF16)] uint16 *path;
-               [string,charset(UTF16)] uint16 *comment;
-               dfs_VolumeState state;
-               uint32 timeout;
-               GUID   guid;
-               uint32 num_stores;
-               [size_is(num_stores)] dfs_StorageInfo *stores;
-       } dfs_Info4;
-
-       /* verified with dfsutil */
-       typedef [public,bitmap32bit] bitmap {
-               DFS_PROPERTY_FLAG_INSITE_REFERRALS      = 0x01,
-               DFS_PROPERTY_FLAG_ROOT_SCALABILITY      = 0x02,
-               DFS_PROPERTY_FLAG_SITE_COSTING          = 0x04,
-               DFS_PROPERTY_FLAG_TARGET_FAILBACK       = 0x08,
-               DFS_PROPERTY_FLAG_CLUSTER_ENABLED       = 0x10  /* untested */
-       } dfs_PropertyFlags;
-
-       typedef struct {
-               [string,charset(UTF16)] uint16 *path;
-               [string,charset(UTF16)] uint16 *comment;
-               dfs_VolumeState state;
-               uint32 timeout;
-               GUID   guid;
-               dfs_PropertyFlags flags;
-               uint32 pktsize;
-               uint32 num_stores;
-       } dfs_Info5;
-
-       typedef [v1_enum] enum {
-               DFS_INVALID_PRIORITY_CLASS              = -1,
-               DFS_SITE_COST_NORMAL_PRIORITY_CLASS     = 0,
-               DFS_GLOBAL_HIGH_PRIORITY_CLASS          = 1,
-               DFS_SITE_COST_HIGH_PRIORITY_CLASS       = 2,
-               DFS_SITE_COST_LOW_PRIORITY_CLASS        = 3,
-               DFS_GLOBAL_LOW_PRIORITY_CLASS           = 4
-       } dfs_Target_PriorityClass;
-
-       typedef struct {
-               dfs_Target_PriorityClass target_priority_class;
-               uint16 target_priority_rank;
-               uint16 reserved;
-       } dfs_Target_Priority;
-
-       typedef struct {
-               dfs_StorageInfo info;
-               dfs_Target_Priority target_priority;
-       } dfs_StorageInfo2;
-
-       typedef struct {
-               [string,charset(UTF16)] uint16 *entry_path;
-               [string,charset(UTF16)] uint16 *comment;
-               dfs_VolumeState state;
-               uint32 timeout;
-               GUID   guid;
-               dfs_PropertyFlags flags;
-               uint32 pktsize;
-               uint16 num_stores;
-               [size_is(num_stores)] dfs_StorageInfo2 *stores;
-       } dfs_Info6;
-
-       typedef struct {
-               GUID  generation_guid;
-       } dfs_Info7;
-
-       typedef struct {
-               [string,charset(UTF16)] uint16 *comment;
-       } dfs_Info100;
-
-       typedef struct {
-               dfs_StorageState state;
-       } dfs_Info101;
-
-       typedef struct {
-               uint32 timeout;
-       } dfs_Info102;
-
-       typedef struct {
-               dfs_PropertyFlags flags;
-       } dfs_Info103;
-
-       typedef struct {
-               dfs_Target_Priority priority;
-       } dfs_Info104;
-
-       typedef struct {
-               [string,charset(UTF16)] uint16 *comment;
-               dfs_VolumeState state;
-               uint32 timeout;
-               uint32 property_flag_mask;
-               uint32 property_flags;
-       } dfs_Info105;
-
-       typedef struct {
-               dfs_StorageState state;
-               dfs_Target_Priority priority;
-       } dfs_Info106;
-
-       typedef struct {
-               [string,charset(UTF16)] uint16 *dom_root;
-       } dfs_Info200;
-
-        typedef enum {
-               DFS_VOLUME_FLAVOR_STANDALONE = 0x100,
-               DFS_VOLUME_FLAVOR_AD_BLOB = 0x200
-       } dfs_VolumeFlavor;
-
-       typedef struct {
-               dfs_VolumeFlavor flavor;
-               [string,charset(UTF16)] uint16 *dom_root;
-       } dfs_Info300;
-
-       typedef union {
-               [case(0)]   dfs_Info0 *info0;
-               [case(1)]   dfs_Info1 *info1;
-               [case(2)]   dfs_Info2 *info2;
-               [case(3)]   dfs_Info3 *info3;
-               [case(4)]   dfs_Info4 *info4;
-               [case(5)]   dfs_Info5 *info5;
-               [case(6)]   dfs_Info6 *info6;
-               [case(7)]   dfs_Info7 *info7;
-               [case(100)] dfs_Info100 *info100;
-               [case(101)] dfs_Info101 *info101;
-               [case(102)] dfs_Info102 *info102;
-               [case(103)] dfs_Info103 *info103;
-               [case(104)] dfs_Info104 *info104;
-               [case(105)] dfs_Info105 *info105;
-               [case(106)] dfs_Info106 *info106;
-       } dfs_Info;
-
-       WERROR dfs_SetInfo (
-               [in]            [string,charset(UTF16)] uint16 dfs_entry_path[],
-               [in,unique]     [string,charset(UTF16)] uint16 *servername,
-               [in,unique]     [string,charset(UTF16)] uint16 *sharename,
-               [in]            uint32 level,
-               [in,ref,switch_is(level)] dfs_Info *info
-               );
-
-       /******************/
-       /* Function: 0x04 */
-       WERROR dfs_GetInfo (
-               [in]            [string,charset(UTF16)] uint16 dfs_entry_path[],
-               [in,unique]     [string,charset(UTF16)] uint16 *servername,
-               [in,unique]     [string,charset(UTF16)] uint16 *sharename,
-               [in]            uint32 level,
-               [out,switch_is(level)] dfs_Info *info
-               );
-
-       /******************/
-       /* Function: 0x05 */
-
-       typedef struct {
-               uint32 count;
-               [size_is(count)] dfs_Info1 *s;
-       } dfs_EnumArray1;
-
-       typedef struct {
-               uint32 count;
-               [size_is(count)] dfs_Info2 *s;
-       } dfs_EnumArray2;
-
-       typedef struct {
-               uint32 count;
-               [size_is(count)] dfs_Info3 *s;
-       } dfs_EnumArray3;
-
-       typedef struct {
-               uint32 count;
-               [size_is(count)] dfs_Info4 *s;
-       } dfs_EnumArray4;
-
-       typedef struct {
-               uint32 count;
-               [size_is(count)] dfs_Info5 *s;
-       } dfs_EnumArray5;
-
-       typedef struct {
-               uint32 count;
-               [size_is(count)] dfs_Info6 *s;
-       } dfs_EnumArray6;
-
-       typedef struct {
-               uint32 count;
-               [size_is(count)] dfs_Info200 *s;
-       } dfs_EnumArray200;
-
-       typedef struct {
-               uint32 count;
-               [size_is(count)] dfs_Info300 *s;
-       } dfs_EnumArray300;
-
-
-       typedef union {
-               [case(1)] dfs_EnumArray1 *info1;
-               [case(2)] dfs_EnumArray2 *info2;
-               [case(3)] dfs_EnumArray3 *info3;
-               [case(4)] dfs_EnumArray4 *info4;
-               [case(5)] dfs_EnumArray5 *info5;
-               [case(6)] dfs_EnumArray6 *info6;
-               [case(200)] dfs_EnumArray200 *info200;
-               [case(300)] dfs_EnumArray300 *info300;
-       } dfs_EnumInfo;
-
-       typedef struct {
-               uint32 level;
-               [switch_is(level)] dfs_EnumInfo e;
-       } dfs_EnumStruct;
-
-       WERROR dfs_Enum (
-               [in]            uint32 level,
-               [in]            uint32 bufsize,
-               [in,out,unique] dfs_EnumStruct *info,
-               [in,out,unique] uint32 *total
-               );
-
-       /* Function 0x06 */
-       [todo] WERROR dfs_Rename();
-
-       /* Function 0x07 */
-       [todo] WERROR dfs_Move();
-
-       /* Function 0x08 */
-       [todo] WERROR dfs_ManagerGetConfigInfo();
-
-       /* Function 0x09 */
-       [todo] WERROR dfs_ManagerSendSiteInfo();
-
-       /* Function 0x0a */
-       typedef struct {
-               uint32 unknown1;
-               [string,charset(UTF16)] uint16 *unknown2;
-       } dfs_UnknownStruct;
-
-       WERROR dfs_AddFtRoot(
-               [in]            [string,charset(UTF16)] uint16 servername[],
-               [in]            [string,charset(UTF16)] uint16 dns_servername[],
-               [in]            [string,charset(UTF16)] uint16 dfsname[],
-               [in]            [string,charset(UTF16)] uint16 rootshare[],
-               [in]            [string,charset(UTF16)] uint16 comment[],
-               [in]            [string,charset(UTF16)] uint16 dfs_config_dn[],
-               [in]            uint8 unknown1,
-               [in]            uint32 flags,
-               [in,out,unique] dfs_UnknownStruct **unknown2
-               );
-
-       /* Function 0x0b */
-       WERROR dfs_RemoveFtRoot(
-               [in]            [string,charset(UTF16)] uint16 servername[],
-               [in]            [string,charset(UTF16)] uint16 dns_servername[],
-               [in]            [string,charset(UTF16)] uint16 dfsname[],
-               [in]            [string,charset(UTF16)] uint16 rootshare[],
-               [in]            uint32 flags,
-               [in,out,unique] dfs_UnknownStruct **unknown
-               );
-
-       /* Function 0x0c */ 
-       WERROR dfs_AddStdRoot(
-               [in]            [string,charset(UTF16)] uint16 servername[],
-               [in]            [string,charset(UTF16)] uint16 rootshare[],
-               [in]            [string,charset(UTF16)] uint16 comment[],
-               [in]            uint32 flags
-               );
-       /* Function 0x0d */
-       WERROR dfs_RemoveStdRoot(
-               [in]            [string,charset(UTF16)] uint16 servername[],
-               [in]            [string,charset(UTF16)] uint16 rootshare[],
-               [in]            uint32 flags
-               );
-       /* Function 0x0e */
-       WERROR dfs_ManagerInitialize(
-               [in]            [string,charset(UTF16)] uint16 *servername,
-               [in]            uint32 flags
-               );
-
-       /* Function 0x0f */
-       WERROR dfs_AddStdRootForced(
-               [in]            [string,charset(UTF16)] uint16 servername[],
-               [in]            [string,charset(UTF16)] uint16 rootshare[],
-               [in]            [string,charset(UTF16)] uint16 comment[],
-               [in]            [string,charset(UTF16)] uint16 store[] /* C:\\whatever */
-               );
-
-       /* Function 0x10 */
-       WERROR dfs_GetDcAddress(
-               [in]            [string,charset(UTF16)] uint16 servername[],
-               [in,out,ref]    [string,charset(UTF16)] uint16 **server_fullname,
-               [in,out,ref]    boolean8 *is_root,
-               [in,out,ref]    uint32 *ttl
-               );
-
-       /* Function 0x11 */
-       WERROR dfs_SetDcAddress(
-               [in]            [string,charset(UTF16)] uint16 servername[],
-               [in]            [string,charset(UTF16)] uint16 server_fullname[],
-               [in]            uint32  flags,
-               [in]            uint32  ttl
-               );
-
-       /* Function 0x12 */
-       WERROR dfs_FlushFtTable(
-               [in]            [string,charset(UTF16)] uint16 servername[],
-               [in]            [string,charset(UTF16)] uint16 rootshare[]
-               );
-
-       /* Function 0x13 */
-       [todo] WERROR dfs_Add2();
-
-       /* Function 0x14 */
-       [todo] WERROR dfs_Remove2();
-
-       /* Function 0x15 */
-       [public] WERROR dfs_EnumEx(
-               [in]            [string,charset(UTF16)] uint16 dfs_name[],
-               [in]            uint32 level,
-               [in]            uint32 bufsize,
-               [in,out,unique] dfs_EnumStruct *info,
-               [in,out,unique] uint32 *total
-       );
-
-       /* Function 0x16 */
-       [todo] WERROR dfs_SetInfo2();
-}
diff --git a/source4/librpc/idl/drsuapi.idl b/source4/librpc/idl/drsuapi.idl
deleted file mode 100644 (file)
index a41bc9c..0000000
+++ /dev/null
@@ -1,1570 +0,0 @@
-#include "idl_types.h"
-
-import "security.idl", "misc.idl", "samr.idl";
-
-[ 
-  uuid("e3514235-4b06-11d1-ab04-00c04fc2dcd2"),
-  version(4.0),
-  endpoint("ncacn_np:[\\pipe\\lsass]","ncacn_np:[\\pipe\\protected_storage]", "ncacn_ip_tcp:", "ncalrpc:"),
-  authservice("ldap"),
-  helpstring("Active Directory Replication"),
-  helper("librpc/ndr/ndr_drsuapi.h"),
-  pointer_default(unique)
-]
-interface drsuapi
-{
-       typedef bitmap samr_GroupAttrs samr_GroupAttrs;
-
-       /*****************/
-        /* Function 0x00 */
-        typedef [bitmap32bit] bitmap {
-               DRSUAPI_SUPPORTED_EXTENSION_BASE                        = 0x00000001,
-               DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION           = 0x00000002,
-               DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI                   = 0x00000004,
-               DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2                  = 0x00000008,
-               DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS             = 0x00000010,
-               DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1                   = 0x00000020,
-               DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION    = 0x00000040,
-               DRSUAPI_SUPPORTED_EXTENSION_00000080                    = 0x00000080,
-               DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE                 = 0x00000100,
-               DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2                 = 0x00000200,
-               DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION    = 0x00000400,
-               DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2                   = 0x00000800,
-               DRSUAPI_SUPPORTED_EXTENSION_INSTANCE_TYPE_NOT_REQ_ON_MOD= 0x00001000,
-               DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND                 = 0x00002000,
-               DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO               = 0x00004000,
-               DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION           = 0x00008000,
-               DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01                  = 0x00010000,
-               DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP       = 0x00020000,
-               DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY             = 0x00040000,
-               DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3                  = 0x00080000,
-               DRSUAPI_SUPPORTED_EXTENSION_00100000                    = 0x00100000,
-               DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2            = 0x00200000,
-               DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6                = 0x00400000,
-               DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS               = 0x00800000,
-               DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8                = 0x01000000,
-               DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5              = 0x02000000,
-               DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6              = 0x04000000,
-               /*
-                * the following 3 have the same value
-                * repadmin.exe /bind says that
-                */
-               DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3            = 0x08000000,
-               DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7              = 0x08000000,
-               DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT               = 0x08000000,
-               DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS             = 0x10000000,
-               DRSUAPI_SUPPORTED_EXTENSION_20000000                    = 0x20000000,
-               DRSUAPI_SUPPORTED_EXTENSION_40000000                    = 0x40000000,
-               DRSUAPI_SUPPORTED_EXTENSION_80000000                    = 0x80000000
-       } drsuapi_SupportedExtensions;
-
-       typedef [bitmap32bit] bitmap {
-               DRSUAPI_SUPPORTED_EXTENSION_ADAM                        = 0x00000001,
-               DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2                    = 0x00000002
-       } drsuapi_SupportedExtensionsExt;
-
-       /* this is used by w2k */
-       typedef struct {
-               drsuapi_SupportedExtensions supported_extensions;
-               GUID site_guid;
-               uint32 pid;
-       } drsuapi_DsBindInfo24;
-
-       /* this is used by w2k3 */
-       typedef struct {
-               drsuapi_SupportedExtensions supported_extensions;
-               GUID site_guid;
-               uint32 pid;
-               uint32 repl_epoch;
-       } drsuapi_DsBindInfo28;
-
-       /* this is used by w2k8 */
-       typedef struct {
-               drsuapi_SupportedExtensions supported_extensions;
-               GUID site_guid;
-               uint32 pid;
-               uint32 repl_epoch;
-               drsuapi_SupportedExtensionsExt supported_extensions_ext;
-               GUID config_dn_guid;
-       } drsuapi_DsBindInfo48;
-
-       typedef struct {
-               [flag(NDR_REMAINING)] DATA_BLOB info;
-       } drsuapi_DsBindInfoFallBack;
-
-       typedef [nodiscriminant] union {
-               [case(24)][subcontext(4)] drsuapi_DsBindInfo24 info24;
-               [case(28)][subcontext(4)] drsuapi_DsBindInfo28 info28;
-               [case(48)][subcontext(4)] drsuapi_DsBindInfo48 info48;
-               [default][subcontext(4)] drsuapi_DsBindInfoFallBack FallBack;
-       } drsuapi_DsBindInfo;
-
-       /* the drsuapi_DsBindInfoCtr was this before
-        * typedef [flag(NDR_PAHEX)] struct {
-        *      [range(1,10000)] uint32 length;
-        *      [size_is(length)] uint8 data[];
-        * } drsuapi_DsBindInfo;
-        *
-        * but we don't want the caller to manually decode this blob,
-        * so we're doing it here
-        */
-
-       typedef struct {
-               [range(1,10000)] uint32 length;
-               [switch_is(length)] drsuapi_DsBindInfo info;
-       } drsuapi_DsBindInfoCtr;
-
-       /* this is a magic guid you need to pass to DsBind to make drsuapi_DsWriteAccountSpn() work
-        * 
-        * maybe the bind_guid could also be the invocation_id see drsuapi_DsReplicaConnection04
-        */
-       const char *DRSUAPI_DS_BIND_GUID = "e24d201a-4fd6-11d1-a3da-0000f875ae0d";
-       /* 
-        * this magic guid are needed to fetch the whole tree with drsuapi_DsGetNCChanges()
-        * as administrator and this values are also used in the destination_dsa_guid field
-        * of drsuapi_DsGetNCChangesReq5/8 and the source_dsa_guid is zero.
-        */
-       const char *DRSUAPI_DS_BIND_GUID_W2K    = "6abec3d1-3054-41c8-a362-5a0c5b7d5d71";
-       const char *DRSUAPI_DS_BIND_GUID_W2K3   = "6afab99c-6e26-464a-975f-f58f105218bc";
-
-       [public] WERROR drsuapi_DsBind(
-               [in,unique]         GUID *bind_guid,
-               [in,out,unique]    drsuapi_DsBindInfoCtr *bind_info,
-               [out]   policy_handle *bind_handle
-               );
-
-       /*****************/
-        /* Function 0x01 */
-       WERROR drsuapi_DsUnbind(
-               [in,out] policy_handle *bind_handle
-               );
-
-       /*****************/
-       /* Function 0x02 */
-       typedef [public,gensize] struct {
-               [value(ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->flags)-4)] uint32 __ndr_size;
-               [value(ndr_size_dom_sid28(&sid, ndr->flags))]  uint32 __ndr_size_sid;
-               GUID guid;
-               dom_sid28 sid;
-               [value(strlen_m(dn))] uint32 __ndr_size_dn;
-               [charset(UTF16),size_is(__ndr_size_dn+1)] uint16 dn[];
-       } drsuapi_DsReplicaObjectIdentifier;
-
-       typedef [public] bitmap {
-               DRSUAPI_DS_REPLICA_SYNC_ASYNCHRONOUS_OPERATION  = 0x00000001,
-               DRSUAPI_DS_REPLICA_SYNC_WRITEABLE               = 0x00000002,
-               DRSUAPI_DS_REPLICA_SYNC_PERIODIC                = 0x00000004,
-               DRSUAPI_DS_REPLICA_SYNC_INTERSITE_MESSAGING     = 0x00000008,
-               DRSUAPI_DS_REPLICA_SYNC_ALL_SOURCES             = 0x00000010,
-               DRSUAPI_DS_REPLICA_SYNC_FULL                    = 0x00000020,
-               DRSUAPI_DS_REPLICA_SYNC_URGENT                  = 0x00000040,
-               DRSUAPI_DS_REPLICA_SYNC_NO_DISCARD              = 0x00000080,
-               DRSUAPI_DS_REPLICA_SYNC_FORCE                   = 0x00000100,
-               DRSUAPI_DS_REPLICA_SYNC_ADD_REFERENCE           = 0x00000200,
-               DRSUAPI_DS_REPLICA_SYNC_NEVER_COMPLETED         = 0x00000400,
-               DRSUAPI_DS_REPLICA_SYNC_TWO_WAY                 = 0x00000800,
-               DRSUAPI_DS_REPLICA_SYNC_NEVER_NOTIFY            = 0x00001000,
-               DRSUAPI_DS_REPLICA_SYNC_INITIAL                 = 0x00002000,
-               DRSUAPI_DS_REPLICA_SYNC_USE_COMPRESSION         = 0x00004000,
-               DRSUAPI_DS_REPLICA_SYNC_ABANDONED               = 0x00008000,
-               DRSUAPI_DS_REPLICA_SYNC_INITIAL_IN_PROGRESS     = 0x00010000,
-               DRSUAPI_DS_REPLICA_SYNC_PARTIAL_ATTRIBUTE_SET   = 0x00020000,
-               DRSUAPI_DS_REPLICA_SYNC_REQUEUE                 = 0x00040000,
-               DRSUAPI_DS_REPLICA_SYNC_NOTIFICATION            = 0x00080000,
-               DRSUAPI_DS_REPLICA_SYNC_ASYNCHRONOUS_REPLICA    = 0x00100000,
-               DRSUAPI_DS_REPLICA_SYNC_CRITICAL                = 0x00200000,
-               DRSUAPI_DS_REPLICA_SYNC_FULL_IN_PROGRESS        = 0x00400000,
-               DRSUAPI_DS_REPLICA_SYNC_PREEMPTED               = 0x00800000
-       } drsuapi_DsReplicaSyncOptions;
-
-       typedef struct {
-               drsuapi_DsReplicaObjectIdentifier *naming_context;
-               GUID source_dsa_guid;
-               astring *other_info; /* I assume this is related to the repsFromTo1OtherInfo dns_name */
-               drsuapi_DsReplicaSyncOptions options;
-       } drsuapi_DsReplicaSyncRequest1;
-
-       typedef [switch_type(int32)] union {
-               [case(1)] drsuapi_DsReplicaSyncRequest1 req1;
-       } drsuapi_DsReplicaSyncRequest;
-
-       WERROR drsuapi_DsReplicaSync(
-               [in] policy_handle *bind_handle,
-               [in] int32 level,
-               [in,switch_is(level)] drsuapi_DsReplicaSyncRequest req
-               );
-
-       /*****************/
-       /* Function 0x03 */
-       typedef [public] struct {
-               hyper tmp_highest_usn; /* updated after each object update */
-               hyper reserved_usn;
-               hyper highest_usn; /* updated after a full replication cycle */
-       } drsuapi_DsReplicaHighWaterMark;
-
-       typedef [public] struct {
-               GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
-               hyper highest_usn;  /* updated after a full replication cycle */
-       } drsuapi_DsReplicaCursor;
-
-       typedef struct {
-               [value(1)] uint32 version;
-               [value(0)] uint32 reserved1;
-               [range(0,0x100000)] uint32 count;
-               [value(0)] uint32 reserved2;
-               [size_is(count)] drsuapi_DsReplicaCursor cursors[];
-       } drsuapi_DsReplicaCursorCtrEx;
-
-       typedef [public] bitmap {
-               /* the _WRITEABLE flag indicates a replication with all attributes
-                *
-                * --metze
-                */
-               DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE                          = 0x00000010,
-               DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP                    = 0x00000020,
-               DRSUAPI_DS_REPLICA_NEIGHBOUR_DO_SCHEDULED_SYNCS                 = 0x00000040,
-               DRSUAPI_DS_REPLICA_NEIGHBOUR_USE_ASYNC_INTERSIDE_TRANSPORT      = 0x00000080,
-               DRSUAPI_DS_REPLICA_NEIGHBOUR_TWO_WAY_SYNC                       = 0x00000200,
-               DRSUAPI_DS_REPLICA_NEIGHBOUR_RETURN_OBJECT_PARENTS              = 0x00000800,
-               DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_IN_PROGRESS                   = 0x00001000, /* was 0x00010000, */
-               DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_NEXT_PACKET                   = 0x00002000, /* was 0x00020000, */
-               DRSUAPI_DS_REPLICA_NEIGHBOUR_NEVER_SYNCED                       = 0x00200000,
-               DRSUAPI_DS_REPLICA_NEIGHBOUR_PREEMPTED                          = 0x01000000,
-               DRSUAPI_DS_REPLICA_NEIGHBOUR_IGNORE_CHANGE_NOTIFICATIONS        = 0x04000000,
-               DRSUAPI_DS_REPLICA_NEIGHBOUR_DISABLE_SCHEDULED_SYNC             = 0x08000000,
-               /* 
-                * the following NOTE applies to DsGetNCChangesRequest5:
-                *  - the data is only compressed when 10 or more objects are replicated
-                *  - but there could also be a size limit of 35 KBytes or something like that
-                *  - the reply is DsGetNCChangesCtr2
-                *  - maybe the same applies to DsGetNCChangesRequest8...
-                *
-                *  --metze
-                */
-               DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES                   = 0x10000000,
-               DRSUAPI_DS_REPLICA_NEIGHBOUR_NO_CHANGE_NOTIFICATIONS            = 0x20000000,
-               DRSUAPI_DS_REPLICA_NEIGHBOUR_PARTIAL_ATTRIBUTE_SET              = 0x40000000
-       } drsuapi_DsReplicaNeighbourFlags;
-
-       typedef [flag(NDR_PAHEX),v1_enum] enum {
-               DRSUAPI_EXOP_NONE                               = 0x00000000,
-               DRSUAPI_EXOP_FSMO_REQ_ROLE                      = 0x00000001,
-               DRSUAPI_EXOP_FSMO_RID_ALLOC                     = 0x00000002,
-               DRSUAPI_EXOP_FSMO_RID_REQ_ROLE                  = 0x00000003,
-               DRSUAPI_EXOP_FSMO_REQ_PDC                       = 0x00000004,
-               DRSUAPI_EXOP_FSMO_ABANDON_ROLE                  = 0x00000005,
-               DRSUAPI_EXOP_REPL_OBJ                           = 0x00000006,
-               DRSUAPI_EXOP_REPL_SECRET                        = 0x00000007
-       } drsuapi_DsExtendedOperation;
-
-       typedef [flag(NDR_PAHEX),v1_enum] enum {
-               DRSUAPI_EXOP_ERR_NONE                           = 0x00000000,
-               DRSUAPI_EXOP_ERR_SUCCESS                        = 0x00000001,
-               DRSUAPI_EXOP_ERR_UNKNOWN_OP                     = 0x00000002,
-               DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER                 = 0x00000003,
-               DRSUAPI_EXOP_ERR_UPDATE_ERR                     = 0x00000004,
-               DRSUAPI_EXOP_ERR_EXCEPTION                      = 0x00000005,
-               DRSUAPI_EXOP_ERR_UNKNOWN_CALLER                 = 0x00000006,
-               DRSUAPI_EXOP_ERR_RID_ALLOC                      = 0x00000007,
-               DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED             = 0x00000008,
-               DRSUAPI_EXOP_ERR_FMSO_PENDING_OP                = 0x00000009,
-               DRSUAPI_EXOP_ERR_MISMATCH                       = 0x0000000A,
-               DRSUAPI_EXOP_ERR_COULDNT_CONTACT                = 0x0000000B,
-               DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES            = 0x0000000C,
-               DRSUAPI_EXOP_ERR_DIR_ERROR                      = 0x0000000D,
-               DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS          = 0x0000000E,
-               DRSUAPI_EXOP_ERR_ACCESS_DENIED                  = 0x0000000F,
-               DRSUAPI_EXOP_ERR_PARAM_ERROR                    = 0x00000010
-       } drsuapi_DsExtendedError;
-
-       typedef struct {
-               GUID destination_dsa_guid;
-               GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
-               [ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
-               drsuapi_DsReplicaHighWaterMark highwatermark;
-               drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;
-               drsuapi_DsReplicaNeighbourFlags replica_flags;
-               uint32 max_object_count; /* w2k3 uses min(133,max(100,max_object_count)) */
-               uint32 max_ndr_size; /* w2k3 seems to ignore this */
-               drsuapi_DsExtendedOperation extended_op;
-               hyper fsmo_info;
-       } drsuapi_DsGetNCChangesRequest5;
-
-       /*
-        * In DRSUAPI all attributes with syntax 2.5.5.2
-        * are identified by uint32 values
-        *
-        * the following table shows the mapping used between the two representations
-        * e.g. - objectClass 'nTDSDSA' has governsID: 1.2.840.113556.1.5.7000.47
-        *        and a UINT32-ID of '0x0017002F'.
-        *      - so the OID 1.2.840.113556.1.5.7000.47 is splitted into a
-        *        OID-prefix: 1.2.840.113556.1.5.7000
-        *        and a value: 47 => 0x2F
-        *      - the mapping table gives a UINT32-prefix: 0x00170000
-        *      - and the UINT32-ID is 0x0017002F = 0x00170000 | 0x2F
-        *
-        * This prefix mapping table is replied in the drsuapi_DsReplicaOIDMapping_Ctr
-        * array. The following are the default mappings of w2k3
-        *
-        * OID-prefix                   => UINT32-Id prefix
-        *
-        * 2.5.4.*                      => 0x00000000 (standard attributes RFC2256 core.schema)
-        * 2.5.6.*                      => 0x00010000 (standard object classes RFC2256 core.schema)
-        * 1.2.840.113556.1.2.*         => 0x00020000
-        * 1.2.840.113556.1.3.*         => 0x00030000
-        * 2.5.5.*                      => 0x00080000 (attributeSyntax OID's)
-        * 1.2.840.113556.1.4.*         => 0x00090000
-        * 1.2.840.113556.1.5.*         => 0x000A0000
-        * 2.16.840.1.113730.3.*        => 0x00140000
-        * 0.9.2342.19200300.100.1.*    => 0x00150000
-        * 2.16.840.1.113730.3.1.*      => 0x00160000
-        * 1.2.840.113556.1.5.7000.*    => 0x00170000
-        * 2.5.21.*                     => 0x00180000 (attrs for SubSchema)
-        * 2.5.18.*                     => 0x00190000 (createTimeStamp,modifyTimeStamp, SubSchema)
-        * 2.5.20.*                     => 0x001A0000
-        * 1.3.6.1.4.1.1466.101.119.*   => 0x001B0000 (dynamicObject, entryTTL)
-        * 2.16.840.1.113730.3.2.*      => 0x001C0000
-        * 1.3.6.1.4.1.250.1.*          => 0x001D0000
-        * 1.2.840.113549.1.9.*         => 0x001E0000 (unstructuredAddress,unstructuredName)
-        * 0.9.2342.19200300.100.4.*    => 0x001F0000
-        *
-        * Here's a list of used 'attributeSyntax' OID's
-        *
-        * 2.5.5.1      => Object(DS-DN) string
-        *                 struct drsuapi_DsObjectIdentifier3
-        *
-        * 2.5.5.2      => OID-string
-        *              => all values are represented as uint32 values in drsuapi
-        *              => governsID, attributeID and attributeSyntax returned as OID-Strings in LDAP
-        *              => mayContain, mustContain and all other attributes with 2.5.5.2 syntax
-        *                 are returned as attribute names
-        *
-        * 2.5.5.4      => String(Teletex) case-insensitive string with teletex charset
-        *
-        * 2.5.5.5      => String(IA5) case-sensitive string
-        *
-        * 2.5.5.6      => String(Numeric)
-        *              => eg. internationalISDNNumber
-        *
-        * 2.5.5.7      => Object(DN-Binary) B:<byte count>:<bytes>:<object DN>
-        *              => e.g. wellKnownObjects
-        *
-        * 2.5.5.8      => BOOL
-        *
-        * 2.5.5.9      => int32
-        *
-        * 2.5.5.10     => DATA_BLOB
-        *              => struct GUID
-        *
-        * 2.5.5.11     => LDAP timestring
-        *              => NTTIME_1sec
-        *
-        * 2.5.5.12     => String(Unicode) case-insensitive string
-        *              => 'standard strings'
-        *
-        * 2.5.5.13     => Object(Presentation-Address) string
-        *              => used in objectClass applicationEntity
-        *
-        * 2.5.5.14     => Object(DN-String) S:<char count>:<string>:<object DN>
-        *              => not used
-        *
-        * 2.5.5.15     => ntSecurityDescriptor
-        *
-        * 2.5.5.16     => int64
-        *
-        * 2.5.5.17     => dom_sid
-        */
-       typedef [nopush,nopull] struct {
-               [range(0,10000),value(ndr_size_drsuapi_DsReplicaOID_oid(oid, 0))] uint32 __ndr_size;
-               [size_is(__ndr_size),charset(DOS)] uint8 *oid; /* it's encoded with asn1_write_OID_String() */
-       } drsuapi_DsReplicaOID;
-
-       typedef struct {
-               uint32 id_prefix;
-               drsuapi_DsReplicaOID oid;
-       } drsuapi_DsReplicaOIDMapping;
-
-       typedef [public] struct {
-               [range(0,0x100000)] uint32 num_mappings;
-               [size_is(num_mappings)] drsuapi_DsReplicaOIDMapping *mappings;
-       } drsuapi_DsReplicaOIDMapping_Ctr;
-
-       typedef [flag(NDR_PAHEX),v1_enum] enum {
-               DRSUAPI_OBJECTCLASS_top                 = 0x00010000,
-               DRSUAPI_OBJECTCLASS_classSchema         = 0x0003000d,
-               DRSUAPI_OBJECTCLASS_attributeSchema     = 0x0003000e
-       } drsuapi_DsObjectClassId;
-
-       typedef [flag(NDR_PAHEX),v1_enum,public] enum {
-               DRSUAPI_ATTRIBUTE_objectClass                   = 0x00000000,
-               DRSUAPI_ATTRIBUTE_description                   = 0x0000000d,
-               DRSUAPI_ATTRIBUTE_member                        = 0x0000001f,
-               DRSUAPI_ATTRIBUTE_instanceType                  = 0x00020001,
-               DRSUAPI_ATTRIBUTE_whenCreated                   = 0x00020002,
-               DRSUAPI_ATTRIBUTE_hasMasterNCs                  = 0x0002000e,
-               DRSUAPI_ATTRIBUTE_governsID                     = 0x00020016,
-               DRSUAPI_ATTRIBUTE_attributeID                   = 0x0002001e,
-               DRSUAPI_ATTRIBUTE_attributeSyntax               = 0x00020020,
-               DRSUAPI_ATTRIBUTE_isSingleValued                = 0x00020021,
-               DRSUAPI_ATTRIBUTE_rangeLower                    = 0x00020022,
-               DRSUAPI_ATTRIBUTE_rangeUpper                    = 0x00020023,
-               DRSUAPI_ATTRIBUTE_dMDLocation                   = 0x00020024,
-               DRSUAPI_ATTRIBUTE_objectVersion                 = 0x0002004c,
-               DRSUAPI_ATTRIBUTE_invocationId                  = 0x00020073,
-               DRSUAPI_ATTRIBUTE_showInAdvancedViewOnly        = 0x000200a9,
-               DRSUAPI_ATTRIBUTE_adminDisplayName              = 0x000200c2,
-               DRSUAPI_ATTRIBUTE_adminDescription              = 0x000200e2,
-               DRSUAPI_ATTRIBUTE_oMSyntax                      = 0x000200e7,
-               DRSUAPI_ATTRIBUTE_ntSecurityDescriptor          = 0x00020119,
-               DRSUAPI_ATTRIBUTE_searchFlags                   = 0x0002014e,
-               DRSUAPI_ATTRIBUTE_lDAPDisplayName               = 0x000201cc,
-               DRSUAPI_ATTRIBUTE_name                          = 0x00090001,
-               DRSUAPI_ATTRIBUTE_userAccountControl            = 0x00090008,
-               DRSUAPI_ATTRIBUTE_currentValue                  = 0x0009001b,
-               DRSUAPI_ATTRIBUTE_homeDirectory                 = 0x0009002c,
-               DRSUAPI_ATTRIBUTE_homeDrive                     = 0x0009002d,
-               DRSUAPI_ATTRIBUTE_scriptPath                    = 0x0009003e,
-               DRSUAPI_ATTRIBUTE_profilePath                   = 0x0009008b,
-               DRSUAPI_ATTRIBUTE_objectSid                     = 0x00090092,
-               DRSUAPI_ATTRIBUTE_schemaIDGUID                  = 0x00090094,
-               DRSUAPI_ATTRIBUTE_dBCSPwd                       = 0x00090037,/* lmPwdHash */
-               DRSUAPI_ATTRIBUTE_logonHours                    = 0x00090040,
-               DRSUAPI_ATTRIBUTE_userWorkstations              = 0x00090056,
-               DRSUAPI_ATTRIBUTE_unicodePwd                    = 0x0009005a,/* ntPwdHash */
-               DRSUAPI_ATTRIBUTE_ntPwdHistory                  = 0x0009005e,
-               DRSUAPI_ATTRIBUTE_priorValue                    = 0x00090064,
-               DRSUAPI_ATTRIBUTE_supplementalCredentials       = 0x0009007d,
-               DRSUAPI_ATTRIBUTE_trustAuthIncoming             = 0x00090081,
-               DRSUAPI_ATTRIBUTE_trustAuthOutgoing             = 0x00090087,
-               DRSUAPI_ATTRIBUTE_lmPwdHistory                  = 0x000900a0,
-               DRSUAPI_ATTRIBUTE_sAMAccountName                = 0x000900dd,
-               DRSUAPI_ATTRIBUTE_sAMAccountType                = 0x0009012e,
-               DRSUAPI_ATTRIBUTE_fSMORoleOwner                 = 0x00090171,
-               DRSUAPI_ATTRIBUTE_systemFlags                   = 0x00090177,
-               DRSUAPI_ATTRIBUTE_serverReference               = 0x00090203,
-               DRSUAPI_ATTRIBUTE_serverReferenceBL             = 0x00090204,
-               DRSUAPI_ATTRIBUTE_initialAuthIncoming           = 0x0009021b,
-               DRSUAPI_ATTRIBUTE_initialAuthOutgoing           = 0x0009021c,
-               DRSUAPI_ATTRIBUTE_wellKnownObjects              = 0x0009026a,
-               DRSUAPI_ATTRIBUTE_dNSHostName                   = 0x0009026b,
-               DRSUAPI_ATTRIBUTE_isMemberOfPartialAttributeSet = 0x0009027f,
-               DRSUAPI_ATTRIBUTE_userPrincipalName             = 0x00090290,
-               DRSUAPI_ATTRIBUTE_groupType                     = 0x000902ee,
-               DRSUAPI_ATTRIBUTE_servicePrincipalName          = 0x00090303,
-               DRSUAPI_ATTRIBUTE_objectCategory                = 0x0009030e,
-               DRSUAPI_ATTRIBUTE_gPLink                        = 0x0009037b,
-               DRSUAPI_ATTRIBUTE_msDS_Behavior_Version         = 0x000905b3,
-               DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber         = 0x000906f6,           
-               DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs             = 0x0009071c,
-               DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs             = 0x0009072c
-       } drsuapi_DsAttributeId;
-
-       typedef struct {
-               [value(1)] uint32 version;
-               [value(0)] uint32 reserved1;
-               [range(1,0x100000)] uint32 num_attids;
-               [size_is(num_attids)] drsuapi_DsAttributeId attids[];
-       } drsuapi_DsPartialAttributeSet;
-
-       typedef struct {
-               GUID destination_dsa_guid;
-               GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
-               [ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
-               drsuapi_DsReplicaHighWaterMark highwatermark;
-               drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;
-               drsuapi_DsReplicaNeighbourFlags replica_flags;
-               uint32 max_object_count; /* w2k3 uses min(133,max(100,max_object_count)) */
-               uint32 max_ndr_size; /* w2k3 seems to ignore this */
-               drsuapi_DsExtendedOperation extended_op;
-               hyper fsmo_info;
-               drsuapi_DsPartialAttributeSet *partial_attribute_set;
-               drsuapi_DsPartialAttributeSet *partial_attribute_set_ex;
-               drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr;
-       } drsuapi_DsGetNCChangesRequest8;
-
-       typedef [switch_type(int32)] union {
-               [case(5)] drsuapi_DsGetNCChangesRequest5 req5;
-               [case(8)] drsuapi_DsGetNCChangesRequest8 req8;
-       } drsuapi_DsGetNCChangesRequest;
-
-       typedef [public] struct {
-               GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
-               hyper highest_usn;  /* updated after a full replication cycle */
-               NTTIME last_sync_success;
-       } drsuapi_DsReplicaCursor2;
-
-       typedef struct {
-               [value(2)] uint32 version;
-               [value(0)] uint32 reserved1;
-               [range(0,0x100000)] uint32 count;
-               [value(0)] uint32 reserved2;
-               [size_is(count)] drsuapi_DsReplicaCursor2 cursors[];
-       } drsuapi_DsReplicaCursor2CtrEx;
-
-       /* Generic DATA_BLOB values */
-       typedef struct {
-               [range(0,10485760),value(ndr_size_DATA_BLOB(0,blob,0))] uint32 __ndr_size;
-               DATA_BLOB *blob;
-       } drsuapi_DsAttributeValue;
-
-       typedef struct {
-               [range(0,10485760)] uint32 num_values;
-               [size_is(num_values)] drsuapi_DsAttributeValue *values;
-       } drsuapi_DsAttributeValueCtr;
-
-       /* DN String values */
-       typedef [public,gensize] struct {
-               [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->flags))] uint32 __ndr_size;
-               [value(ndr_size_dom_sid28(&sid,ndr->flags))]  uint32 __ndr_size_sid;
-               GUID guid;
-               dom_sid28 sid;
-               [value(strlen_m(dn))] uint32 __ndr_size_dn;
-               [charset(UTF16)] uint16 dn[__ndr_size_dn+1];
-       } drsuapi_DsReplicaObjectIdentifier3;
-
-       typedef [public,gensize] struct {
-               [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary(r, ndr->flags))] uint32 __ndr_size;
-               [value(ndr_size_dom_sid28(&sid,ndr->flags))]  uint32 __ndr_size_sid;
-               GUID guid;
-               dom_sid28 sid;
-               [value(strlen_m(dn))] uint32 __ndr_size_dn;
-               [charset(UTF16)] uint16 dn[__ndr_size_dn+1];
-               [value(binary.length + 4)] uint32 __ndr_size_binary;
-               [flag(NDR_REMAINING)] DATA_BLOB binary;
-       } drsuapi_DsReplicaObjectIdentifier3Binary;
-
-       typedef [public] struct {
-               drsuapi_DsAttributeId attid;
-               drsuapi_DsAttributeValueCtr value_ctr;
-       } drsuapi_DsReplicaAttribute;
-
-       typedef struct {
-               [range(0,1048576)] uint32 num_attributes;
-               [size_is(num_attributes)]  drsuapi_DsReplicaAttribute *attributes;
-       } drsuapi_DsReplicaAttributeCtr;
-
-       typedef [public] bitmap {
-               DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER   = 0x00000001,
-               DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC       = 0x00000002,
-               DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY = 0x00010000
-       } drsuapi_DsReplicaObjectFlags;
-
-       typedef [public] struct {
-               drsuapi_DsReplicaObjectIdentifier *identifier;
-               drsuapi_DsReplicaObjectFlags flags;
-               drsuapi_DsReplicaAttributeCtr attribute_ctr;
-       } drsuapi_DsReplicaObject;
-
-       typedef struct {
-               uint32 version;
-               NTTIME_1sec originating_change_time;
-               GUID originating_invocation_id;
-               hyper originating_usn;
-       } drsuapi_DsReplicaMetaData;
-
-       typedef [public] struct {
-               [range(0,1048576)] uint32 count;
-               [size_is(count)] drsuapi_DsReplicaMetaData meta_data[];
-       } drsuapi_DsReplicaMetaDataCtr;
-
-       typedef [public,noprint] struct {
-               drsuapi_DsReplicaObjectListItemEx *next_object;
-               drsuapi_DsReplicaObject object;
-               boolean32 is_nc_prefix;
-               GUID *parent_object_guid;
-               drsuapi_DsReplicaMetaDataCtr *meta_data_ctr;
-       } drsuapi_DsReplicaObjectListItemEx;
-
-       typedef [public,gensize] struct {
-               GUID source_dsa_guid; /* the 'objectGUID' field of the CN=NTDS Settings object */
-               GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
-               drsuapi_DsReplicaObjectIdentifier *naming_context;
-               drsuapi_DsReplicaHighWaterMark old_highwatermark;
-               drsuapi_DsReplicaHighWaterMark new_highwatermark;
-               drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;
-               drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr;
-               drsuapi_DsExtendedError extended_ret; /* w2k sends the nc_object_count value here */
-               uint32 object_count;
-               /* this +55 is sometimes +56, so I don't know where this comes from... --metze */
-               [value(ndr_size_drsuapi_DsGetNCChangesCtr1(r,ndr->flags)+55)] uint32 __ndr_size;
-               drsuapi_DsReplicaObjectListItemEx *first_object;
-               boolean32 more_data;
-       } drsuapi_DsGetNCChangesCtr1;
-
-       /*
-        * if the DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE flag
-        * isn't there it means the value is deleted
-        */
-       typedef [public] bitmap {
-               DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE = 0x00000001
-       } drsuapi_DsLinkedAttributeFlags;
-
-       typedef [public] struct {
-               drsuapi_DsReplicaObjectIdentifier *identifier;
-               drsuapi_DsAttributeId attid;
-               drsuapi_DsAttributeValue value;
-               drsuapi_DsLinkedAttributeFlags flags;
-               NTTIME_1sec originating_add_time;
-               drsuapi_DsReplicaMetaData meta_data;
-       } drsuapi_DsReplicaLinkedAttribute;
-
-       typedef [public,gensize] struct {
-               GUID source_dsa_guid; /* the 'objectGUID' field of the CN=NTDS Settings object */
-               GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
-               drsuapi_DsReplicaObjectIdentifier *naming_context;
-               drsuapi_DsReplicaHighWaterMark old_highwatermark;
-               drsuapi_DsReplicaHighWaterMark new_highwatermark;
-               drsuapi_DsReplicaCursor2CtrEx *uptodateness_vector;
-               drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr;
-               drsuapi_DsExtendedError extended_ret;
-               uint32 object_count;
-               /* this +55 is sometimes +56, so I don't know where this comes from... --metze */
-               [value(ndr_size_drsuapi_DsGetNCChangesCtr6(r,ndr->flags)+55)] uint32 __ndr_size;
-               drsuapi_DsReplicaObjectListItemEx *first_object;
-               boolean32 more_data;
-               uint32 nc_object_count; /* estimated amount of objects in the whole NC */
-               uint32 nc_linked_attributes_count;  /* estimated amount of linked values in the whole NC */
-               [range(0,1048576)] uint32 linked_attributes_count;
-               [size_is(linked_attributes_count)] drsuapi_DsReplicaLinkedAttribute *linked_attributes;
-               WERROR drs_error;
-       } drsuapi_DsGetNCChangesCtr6;
-
-       typedef [public] struct {
-               [subcontext(0xFFFFFC01)] drsuapi_DsGetNCChangesCtr1 ctr1;
-       } drsuapi_DsGetNCChangesCtr1TS;
-
-       typedef [public] struct {
-               [subcontext(0xFFFFFC01)] drsuapi_DsGetNCChangesCtr6 ctr6;
-       } drsuapi_DsGetNCChangesCtr6TS;
-
-       typedef [nopush] struct {
-               uint32 decompressed_length;
-               uint32 compressed_length;
-               [subcontext(4),subcontext_size(compressed_length),
-                compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length)]
-                drsuapi_DsGetNCChangesCtr1TS *ts;
-       } drsuapi_DsGetNCChangesMSZIPCtr1;
-
-       typedef [nopush] struct {
-               uint32 decompressed_length;
-               uint32 compressed_length;
-               [subcontext(4),subcontext_size(compressed_length),
-                compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length)]
-                drsuapi_DsGetNCChangesCtr6TS *ts;
-       } drsuapi_DsGetNCChangesMSZIPCtr6;
-
-       typedef [nopush] struct {
-               uint32 decompressed_length;
-               uint32 compressed_length;
-               [subcontext(4),subcontext_size(compressed_length),
-                compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length)]
-                drsuapi_DsGetNCChangesCtr1TS *ts;
-       } drsuapi_DsGetNCChangesXPRESSCtr1;
-
-       typedef [nopush] struct {
-               uint32 decompressed_length;
-               uint32 compressed_length;
-               [subcontext(4),subcontext_size(compressed_length),
-                compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length)]
-                drsuapi_DsGetNCChangesCtr6TS *ts;
-       } drsuapi_DsGetNCChangesXPRESSCtr6;
-
-       typedef [enum16bit] enum {
-               DRSUAPI_COMPRESSION_TYPE_MSZIP  = 2,
-               DRSUAPI_COMPRESSION_TYPE_XPRESS = 3
-       } drsuapi_DsGetNCChangesCompressionType;
-
-       typedef [nodiscriminant,flag(NDR_PAHEX)] union {
-               [case(1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16))]  drsuapi_DsGetNCChangesMSZIPCtr1 mszip1;
-               [case(6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16))]  drsuapi_DsGetNCChangesMSZIPCtr6 mszip6;
-               [case(1|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16))] drsuapi_DsGetNCChangesXPRESSCtr1 xpress1;
-               [case(6|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16))] drsuapi_DsGetNCChangesXPRESSCtr6 xpress6;
-       } drsuapi_DsGetNCChangesCompressedCtr;
-
-       typedef struct {
-               drsuapi_DsGetNCChangesMSZIPCtr1 mszip1;
-       } drsuapi_DsGetNCChangesCtr2;
-
-       typedef struct {
-               [range(0,6)] int32 level;
-               [range(2,3)] drsuapi_DsGetNCChangesCompressionType type;
-               [switch_is(level | (type<<16))] drsuapi_DsGetNCChangesCompressedCtr ctr;
-       } drsuapi_DsGetNCChangesCtr7;
-
-       typedef [switch_type(int32)] union {
-               [case(1)] drsuapi_DsGetNCChangesCtr1 ctr1;
-               [case(2)] drsuapi_DsGetNCChangesCtr2 ctr2;
-               [case(6)] drsuapi_DsGetNCChangesCtr6 ctr6;
-               [case(7)] drsuapi_DsGetNCChangesCtr7 ctr7;
-       } drsuapi_DsGetNCChangesCtr;
-
-       WERROR drsuapi_DsGetNCChanges(
-               [in] policy_handle *bind_handle,
-               [in,out,ref] int32 *level,
-               [in,switch_is(*level)] drsuapi_DsGetNCChangesRequest req,
-               [out,switch_is(*level)] drsuapi_DsGetNCChangesCtr ctr
-               );
-
-       /*****************/
-        /* Function 0x04 */
-       typedef bitmap {
-               DRSUAPI_DS_REPLICA_UPDATE_ASYNCHRONOUS_OPERATION        = 0x00000001,
-               DRSUAPI_DS_REPLICA_UPDATE_WRITEABLE                     = 0x00000002,
-               DRSUAPI_DS_REPLICA_UPDATE_ADD_REFERENCE                 = 0x00000004,
-               DRSUAPI_DS_REPLICA_UPDATE_DELETE_REFERENCE              = 0x00000008,
-               DRSUAPI_DS_REPLICA_UPDATE_0x00000010                    = 0x00000010
-       } drsuapi_DsReplicaUpdateRefsOptions;
-
-       typedef struct {
-               [ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
-               [ref,charset(DOS),string] uint8 *dest_dsa_dns_name;
-               GUID dest_dsa_guid;
-               drsuapi_DsReplicaUpdateRefsOptions options;
-       } drsuapi_DsReplicaUpdateRefsRequest1;
-
-       typedef [switch_type(int32)] union {
-               [case(1)] drsuapi_DsReplicaUpdateRefsRequest1 req1;
-       } drsuapi_DsReplicaUpdateRefsRequest;
-
-       WERROR drsuapi_DsReplicaUpdateRefs(
-               [in] policy_handle *bind_handle,
-               [in] int32 level,
-               [in,switch_is(level)] drsuapi_DsReplicaUpdateRefsRequest req
-               );
-
-       /*****************/
-        /* Function 0x05 */
-       typedef bitmap {
-               DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION   = 0x00000001,
-               DRSUAPI_DS_REPLICA_ADD_WRITEABLE                = 0x00000002
-               /* TODO ... */
-       } drsuapi_DsReplicaAddOptions;
-
-       [todo] WERROR DRSUAPI_REPLICA_ADD();
-
-       /*****************/
-        /* Function 0x06 */
-       typedef bitmap {
-               DRSUAPI_DS_REPLICA_DELETE_ASYNCHRONOUS_OPERATION        = 0x00000001,
-               DRSUAPI_DS_REPLICA_DELETE_WRITEABLE                     = 0x00000002
-               /* TODO ... */
-       } drsuapi_DsReplicaDeleteOptions;
-
-       [todo] WERROR DRSUAPI_REPLICA_DEL();
-
-       /*****************/
-        /* Function 0x07 */
-       typedef bitmap {
-               DRSUAPI_DS_REPLICA_MODIFY_ASYNCHRONOUS_OPERATION        = 0x00000001,
-               DRSUAPI_DS_REPLICA_MODIFY_WRITEABLE                     = 0x00000002
-       } drsuapi_DsReplicaModifyOptions;
-
-       [todo] WERROR DRSUAPI_REPLICA_MODIFY();
-
-       /*****************/
-        /* Function 0x08 */
-       [todo] WERROR DRSUAPI_VERIFY_NAMES();
-
-       /*****************/
-        /* Function 0x09 */
-
-       /* how are type 4 and 7 different from 2 and 3 ? */
-       typedef [v1_enum] enum {
-               DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS = 1,
-               DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS  = 2,
-               DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS        = 3,
-               DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2 = 4,
-               DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS     = 5,
-               DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS         = 6,
-               DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2       = 7
-       } drsuapi_DsMembershipType;
-
-       typedef struct {
-               NTSTATUS status;
-               [range(0,10000)] uint32 num_memberships;
-               [range(0,10000)] uint32 num_sids;
-               [size_is(num_memberships)] drsuapi_DsReplicaObjectIdentifier **info_array;
-               [size_is(num_memberships)] samr_GroupAttrs *group_attrs;
-               [size_is(num_sids)] dom_sid28 **sids;
-       } drsuapi_DsGetMembershipsCtr1;
-
-       typedef [switch_type(int32)] union {
-               [case(1)] drsuapi_DsGetMembershipsCtr1 ctr1;
-       } drsuapi_DsGetMembershipsCtr;
-
-       const int DRSUAPI_DS_MEMBERSHIP_FLAG_GROUP_ATTR = 0x1;
-
-       typedef struct {
-               [range(1,10000)] uint32 count;
-               [size_is(count)] drsuapi_DsReplicaObjectIdentifier **info_array;
-               uint32 flags;
-               drsuapi_DsMembershipType type;
-               drsuapi_DsReplicaObjectIdentifier *domain;
-       } drsuapi_DsGetMembershipsRequest1;
-
-       typedef [switch_type(int32)] union {
-               [case(1)] drsuapi_DsGetMembershipsRequest1 req1;
-       } drsuapi_DsGetMembershipsRequest;
-
-       [todo] WERROR drsuapi_DsGetMemberships(
-               [in] policy_handle *bind_handle,
-               [in,out] int32 level,
-               [in] [switch_is(level)] drsuapi_DsGetMembershipsRequest req,
-               [out] [switch_is(level)] drsuapi_DsGetMembershipsCtr ctr
-               );
-
-       /*****************/
-        /* Function 0x0a */
-       [todo] WERROR DRSUAPI_INTER_DOMAIN_MOVE();
-
-       /*****************/
-        /* Function 0x0b */
-       typedef struct {
-               uint32 unknown1;
-               uint32 unknown2;
-               [range(0,0x00A00000)] uint32 length;
-               [size_is(length)] uint8 *data;
-       } drsuapi_DsGetNT4ChangeLogRequest1;
-
-       typedef [switch_type(uint32)] union {
-               [case(1)] drsuapi_DsGetNT4ChangeLogRequest1 req1;
-       } drsuapi_DsGetNT4ChangeLogRequest;
-
-       typedef struct {
-               [range(0,0x00A00000)] uint32 length1;
-               [range(0,0x00A00000)] uint32 length2;
-               hyper unknown1;
-               NTTIME time2;
-               hyper unknown3;
-               NTTIME time4;
-               hyper unknown5;
-               NTTIME time6;
-               NTSTATUS status;
-               [size_is(length1)] uint8 *data1;
-               [size_is(length2)] uint8 *data2;
-       } drsuapi_DsGetNT4ChangeLogInfo1;
-
-       typedef [switch_type(uint32)] union {
-               [case(1)] drsuapi_DsGetNT4ChangeLogInfo1 info1;
-       } drsuapi_DsGetNT4ChangeLogInfo;
-
-       [todo] WERROR drsuapi_DsGetNT4ChangeLog(
-               [in] policy_handle *bind_handle,
-               [in,out] uint32 level,
-               [in] [switch_is(level)] drsuapi_DsGetNT4ChangeLogRequest req,
-               [out] [switch_is(level)] drsuapi_DsGetNT4ChangeLogInfo info
-               );
-
-       /*****************/
-       /* Function 0x0c */
-       typedef [v1_enum] enum {
-               DRSUAPI_DS_NAME_STATUS_OK                       = 0,
-               DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR            = 1,
-               DRSUAPI_DS_NAME_STATUS_NOT_FOUND                = 2,
-               DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE               = 3,
-               DRSUAPI_DS_NAME_STATUS_NO_MAPPING               = 4,
-               DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY              = 5,
-               DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING   = 6,
-               DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL           = 7
-       } drsuapi_DsNameStatus;
-
-       typedef [v1_enum] enum {
-               DRSUAPI_DS_NAME_FLAG_NO_FLAGS                   = 0x0,
-               DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY           = 0x1,
-               DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC                 = 0x2,
-               DRSUAPI_DS_NAME_FLAG_GCVERIFY                   = 0x4,
-               DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL             = 0x8
-       } drsuapi_DsNameFlags;
-
-       typedef [v1_enum] enum {
-               DRSUAPI_DS_NAME_FORMAT_UNKNOWN                  = 0,
-               DRSUAPI_DS_NAME_FORMAT_FQDN_1779                = 1,
-               DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT              = 2,
-               DRSUAPI_DS_NAME_FORMAT_DISPLAY                  = 3,
-               DRSUAPI_DS_NAME_FORMAT_GUID                     = 6,
-               DRSUAPI_DS_NAME_FORMAT_CANONICAL                = 7,
-               DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL           = 8,
-               DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX             = 9,
-               DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL        = 10,
-               DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY       = 11,
-               DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN               = 12
-       } drsuapi_DsNameFormat;
-
-       typedef struct {
-               [string,charset(UTF16)] uint16 *str;
-       } drsuapi_DsNameString;
-
-       typedef struct {
-               uint32 codepage; /* 0x000004e4 - 1252 is german codepage*/
-               uint32 language; /* 0x00000407 - german language ID*/
-               drsuapi_DsNameFlags format_flags;
-               drsuapi_DsNameFormat format_offered;
-               drsuapi_DsNameFormat format_desired;
-               [range(1,10000)] uint32 count;
-               [size_is(count)] drsuapi_DsNameString *names;
-       } drsuapi_DsNameRequest1;
-
-       typedef [switch_type(int32)] union {
-               [case(1)] drsuapi_DsNameRequest1 req1;
-       } drsuapi_DsNameRequest;
-
-       typedef struct {
-               drsuapi_DsNameStatus status;
-               [charset(UTF16),string] uint16 *dns_domain_name;
-               [charset(UTF16),string] uint16 *result_name;
-       } drsuapi_DsNameInfo1;
-
-       typedef struct {
-               uint32 count;
-               [size_is(count)] drsuapi_DsNameInfo1 *array;
-       } drsuapi_DsNameCtr1;
-
-       typedef [switch_type(int32)] union {
-               [case(1)] drsuapi_DsNameCtr1 *ctr1;
-       } drsuapi_DsNameCtr;
-
-       WERROR drsuapi_DsCrackNames(
-               [in] policy_handle *bind_handle,
-               [in, out] int32 level,
-               [in,switch_is(level)] drsuapi_DsNameRequest req,
-               [out,switch_is(level)] drsuapi_DsNameCtr ctr
-               );
-
-       /*****************/
-       /* Function 0x0d */
-       typedef [v1_enum] enum {
-               DRSUAPI_DS_SPN_OPERATION_ADD    = 0,
-               DRSUAPI_DS_SPN_OPERATION_REPLACE= 1,
-               DRSUAPI_DS_SPN_OPERATION_DELETE = 2
-       } drsuapi_DsSpnOperation;
-
-       typedef struct {
-               drsuapi_DsSpnOperation operation;
-               uint32 unknown1;
-               [charset(UTF16),string] uint16 *object_dn;
-               [range(0,10000)] uint32 count;
-               [size_is(count)] drsuapi_DsNameString *spn_names;
-       } drsuapi_DsWriteAccountSpnRequest1;
-
-       typedef [switch_type(int32)] union {
-               [case(1)] drsuapi_DsWriteAccountSpnRequest1 req1;
-       } drsuapi_DsWriteAccountSpnRequest;
-
-       typedef struct {
-               WERROR status;
-       } drsuapi_DsWriteAccountSpnResult1;
-
-       typedef [switch_type(int32)] union {
-               [case(1)] drsuapi_DsWriteAccountSpnResult1 res1;
-       } drsuapi_DsWriteAccountSpnResult;
-
-       WERROR drsuapi_DsWriteAccountSpn(
-               [in] policy_handle *bind_handle,
-               [in,out] int32 level,
-               [in,switch_is(level)] drsuapi_DsWriteAccountSpnRequest req,
-               [out,switch_is(level)] drsuapi_DsWriteAccountSpnResult res
-               );
-
-       /*****************/
-        /* Function 0x0e */
-       typedef struct {
-               [charset(UTF16),string] uint16 *server_dn;
-               [charset(UTF16),string] uint16 *domain_dn;
-               boolean32 commit;
-       } drsuapi_DsRemoveDSServerRequest1;
-
-       typedef [switch_type(int32)] union {
-               [case(1)] drsuapi_DsRemoveDSServerRequest1 req1;
-       } drsuapi_DsRemoveDSServerRequest;
-
-       typedef struct {
-               boolean32 last_dc_in_domain;
-       } drsuapi_DsRemoveDSServerResult1;
-
-       typedef [switch_type(int32)] union {
-               [case(1)] drsuapi_DsRemoveDSServerResult1 res1;
-       } drsuapi_DsRemoveDSServerResult;
-
-       WERROR drsuapi_DsRemoveDSServer(
-               [in] policy_handle *bind_handle,
-               [in,out] int32 level,
-               [in,switch_is(level)] drsuapi_DsRemoveDSServerRequest req,
-               [out,switch_is(level)] drsuapi_DsRemoveDSServerResult res
-               );
-
-       /*****************/
-        /* Function 0x0f */
-       [todo] WERROR DRSUAPI_REMOVE_DS_DOMAIN();
-
-       /*****************/
-        /* Function 0x10 */
-       typedef struct {
-               [charset(UTF16),string] uint16 *domain_name; /* netbios or dns */
-               int32 level; /* specifies the switch level for the request */
-       } drsuapi_DsGetDCInfoRequest1;
-
-       typedef [switch_type(int32)] union {
-               [case(1)] drsuapi_DsGetDCInfoRequest1 req1;
-       } drsuapi_DsGetDCInfoRequest;
-
-       typedef struct {
-               [charset(UTF16),string] uint16 *netbios_name;
-               [charset(UTF16),string] uint16 *dns_name;
-               [charset(UTF16),string] uint16 *site_name;
-               [charset(UTF16),string] uint16 *computer_dn;
-               [charset(UTF16),string] uint16 *server_dn;
-               uint32 is_pdc;
-               uint32 is_enabled;
-       } drsuapi_DsGetDCInfo1;
-
-       typedef struct {
-               [range(0,10000)] uint32 count;
-               [size_is(count)] drsuapi_DsGetDCInfo1 *array;
-       } drsuapi_DsGetDCInfoCtr1;
-
-       typedef struct {
-               [charset(UTF16),string] uint16 *netbios_name;
-               [charset(UTF16),string] uint16 *dns_name;
-               [charset(UTF16),string] uint16 *site_name;
-               [charset(UTF16),string] uint16 *site_dn;
-               [charset(UTF16),string] uint16 *computer_dn;
-               [charset(UTF16),string] uint16 *server_dn;
-               [charset(UTF16),string] uint16 *ntds_dn;
-               uint32 is_pdc;
-               uint32 is_enabled;
-               uint32 is_gc;
-               GUID site_guid;
-               GUID computer_guid;
-               GUID server_guid;
-               GUID ntds_guid;
-       } drsuapi_DsGetDCInfo2;
-
-       typedef struct {
-               [range(0,10000)] uint32 count;
-               [size_is(count)] drsuapi_DsGetDCInfo2 *array;
-       } drsuapi_DsGetDCInfoCtr2;
-
-       /*
-        * this represents an active connection to the
-        * Directory System Agent (DSA)
-        * this can be via LDAP or DRSUAPI
-        */
-       typedef struct {
-               [flag(NDR_BIG_ENDIAN)] ipv4address client_ip_address;
-               uint32 unknown2;
-               uint32 connection_time; /* in seconds */
-               uint32 unknown4;
-               uint32 unknown5;
-               uint32 unknown6;
-               /*
-                * client_account can be the following:
-                * "W2K3\Administrator"
-                * "Administrator@W2K3"
-                * "cn=Administrator,cn=Users,DC=w2k3,DC=vmnet1,DC=vm,DC=base"
-                * ""
-                * or NULL
-                */
-               [charset(UTF16),string] uint16 *client_account;
-       } drsuapi_DsGetDCConnection01;
-
-       typedef struct {
-               [range(0,10000)] uint32 count;
-               [size_is(count)] drsuapi_DsGetDCConnection01 *array;
-       } drsuapi_DsGetDCConnectionCtr01;
-
-       typedef [v1_enum] enum {
-               DRSUAPI_DC_INFO_CTR_1  = 1,
-               DRSUAPI_DC_INFO_CTR_2  = 2,
-               DRSUAPI_DC_CONNECTION_CTR_01 = -1
-       } drsuapi_DsGetDCInfoCtrLevels;
-
-        typedef [switch_type(int32)] union {
-               [case(DRSUAPI_DC_INFO_CTR_1)]  drsuapi_DsGetDCInfoCtr1  ctr1;
-               [case(DRSUAPI_DC_INFO_CTR_2)]  drsuapi_DsGetDCInfoCtr2  ctr2;
-               [case(DRSUAPI_DC_CONNECTION_CTR_01)] drsuapi_DsGetDCConnectionCtr01 ctr01;
-       } drsuapi_DsGetDCInfoCtr;
-
-       WERROR drsuapi_DsGetDomainControllerInfo(
-               [in] policy_handle *bind_handle,
-               [in] int32 level,
-               [in,switch_is(level)] drsuapi_DsGetDCInfoRequest req,
-               [out] int32 level_out,
-               [out,switch_is(level_out)] drsuapi_DsGetDCInfoCtr ctr
-               );
-
-       /*****************/
-        /* Function 0x11 */
-       typedef [public,noprint] struct {
-               drsuapi_DsReplicaObjectListItem *next_object;
-               drsuapi_DsReplicaObject object;
-       } drsuapi_DsReplicaObjectListItem;
-
-       /*
-        * The DsAddEntry() call which creates a nTDSDSA object,
-        * also adds a servicePrincipalName in the following form
-        * to the computer account of the new domain controller
-        * referenced by the "serverReferenece" attribute.
-        *
-        * E3514235-4B06-11D1-AB04-00C04FC2DCD2/<new-ntdsdsa-object-guid-as-string>/<domain-dns-name>
-        *
-        * also note that the "serverReference" isn't added to the new object!
-        */
-       const char *DRSUAPI_NTDSDSA_KRB5_SERVICE_GUID = "E3514235-4B06-11D1-AB04-00C04FC2DCD2";
-
-       /*
-        * please note the the current idl
-        * for DsAddEntry does only parse 
-        * what I saw between 2 w2k3 boxes
-        * in my dssync experiments I got some other replies
-        * so all I want to say is that this is very incomplete yet...
-        * --metze
-        */
-       typedef struct {
-               drsuapi_DsReplicaObjectListItem first_object;
-       } drsuapi_DsAddEntryRequest2;
-
-       typedef [switch_type(int32)] union {
-               [case(2)] drsuapi_DsAddEntryRequest2 req2;
-       } drsuapi_DsAddEntryRequest;
-
-       typedef struct {
-               uint32 unknown1;
-               WERROR status;
-               uint32 unknown2;
-               uint16 unknown3;
-       } drsuapi_DsAddEntryErrorInfoX;
-
-       typedef struct {
-               [range(0,10485760)] uint32 size;
-               [size_is(size)] uint8 *data;
-       } drsuapi_DsAddEntryExtraErrorBuffer;
-
-       typedef struct {
-               drsuapi_DsAddEntryErrorInfoX error;
-               drsuapi_DsAttributeId attid;
-               uint32 unknown2;
-               drsuapi_DsAddEntryExtraErrorBuffer buffer;
-       } drsuapi_DsAddEntryExtraError1;
-
-       typedef /*[noprint]*/ struct {
-               drsuapi_DsAddEntryErrorListItem1 *next;
-               drsuapi_DsAddEntryExtraError1 error;
-       } drsuapi_DsAddEntryErrorListItem1;
-
-       typedef struct {
-               drsuapi_DsReplicaObjectIdentifier *id;
-               WERROR status;
-               drsuapi_DsAddEntryErrorListItem1 first;
-       } drsuapi_DsAddEntryErrorInfo1;
-
-       typedef [switch_type(uint32)] union {
-               [case(1)] drsuapi_DsAddEntryErrorInfo1 error1;
-/*             [case(2)] drsuapi_DsAddEntryErrorInfo2 error2;
-               [case(3)] drsuapi_DsAddEntryErrorInfo3 error3;
-*/             [case(4)] drsuapi_DsAddEntryErrorInfoX errorX;
-               [case(5)] drsuapi_DsAddEntryErrorInfoX errorX;
-               [case(6)] drsuapi_DsAddEntryErrorInfoX errorX;
-               [case(7)] drsuapi_DsAddEntryErrorInfoX errorX;
-       } drsuapi_DsAddEntryErrorInfo;
-
-       typedef struct {
-               WERROR status;
-               uint32 level;
-               [switch_is(level)] drsuapi_DsAddEntryErrorInfo *info;
-       } drsuapi_DsAddEntryError1;
-
-       typedef [switch_type(uint32)] union {
-               [case(1)] drsuapi_DsAddEntryError1 info1;
-       } drsuapi_DsAddEntryError;
-
-       typedef struct {
-               GUID guid;
-               dom_sid28 sid;
-       } drsuapi_DsReplicaObjectIdentifier2;
-
-       typedef struct {
-               drsuapi_DsReplicaObjectIdentifier *id;
-               uint32 unknown1;
-               drsuapi_DsAddEntryErrorInfoX error;
-               [range(0,10000)] uint32 count;
-               [size_is(count)] drsuapi_DsReplicaObjectIdentifier2 *objects;
-       } drsuapi_DsAddEntryCtr2;
-
-       typedef struct {
-               drsuapi_DsReplicaObjectIdentifier *id;
-               uint32 level;
-               [switch_is(level)] drsuapi_DsAddEntryError *error;
-               [range(0,10000)] uint32 count;
-               [size_is(count)] drsuapi_DsReplicaObjectIdentifier2 *objects;
-       } drsuapi_DsAddEntryCtr3;
-
-       typedef [switch_type(int32)] union {
-               [case(2)] drsuapi_DsAddEntryCtr2 ctr2;
-               [case(3)] drsuapi_DsAddEntryCtr3 ctr3;
-       } drsuapi_DsAddEntryCtr;
-
-       [public] WERROR drsuapi_DsAddEntry(
-               [in] policy_handle *bind_handle,
-               [in,out] int32 level,
-               [in,switch_is(level)] drsuapi_DsAddEntryRequest req,
-               [out,switch_is(level)] drsuapi_DsAddEntryCtr ctr
-               );
-
-       /*****************/
-        /* Function 0x12 */
-       [todo] WERROR DRSUAPI_EXECUTE_KCC();
-
-       /*****************/
-       /* Function 0x13 */
-       typedef [v1_enum] enum {
-               DRSUAPI_DS_REPLICA_GET_INFO                             = 1,
-               DRSUAPI_DS_REPLICA_GET_INFO2                            = 2
-       } drsuapi_DsReplicaGetInfoLevel;
-
-       typedef [v1_enum] enum {
-               DRSUAPI_DS_REPLICA_INFO_NEIGHBORS                       = 0,
-               DRSUAPI_DS_REPLICA_INFO_CURSORS                         = 1,
-               DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA                    = 2,
-               DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES        = 3,
-               DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES           = 4,
-               DRSUAPI_DS_REPLICA_INFO_PENDING_OPS                     = 5,
-               DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA        = 6,
-               DRSUAPI_DS_REPLICA_INFO_CURSORS2                        = 7,
-               DRSUAPI_DS_REPLICA_INFO_CURSORS3                        = 8,
-               DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2                   = 9,
-               DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2       = 10,
-               DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02                     = -2,
-               DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04                   = -4,
-               DRSUAPI_DS_REPLICA_INFO_CURSORS05                       = -5,
-               DRSUAPI_DS_REPLICA_INFO_06                              = -6
-       } drsuapi_DsReplicaInfoType;
-
-       typedef struct {
-               drsuapi_DsReplicaInfoType info_type;
-               [charset(UTF16),string] uint16 *object_dn;
-               GUID guid1;
-       } drsuapi_DsReplicaGetInfoRequest1;
-
-       typedef struct {
-               drsuapi_DsReplicaInfoType info_type;
-               [charset(UTF16),string] uint16 *object_dn;
-               GUID guid1;
-               uint32 unknown1;
-               [charset(UTF16),string] uint16 *string1;
-               [charset(UTF16),string] uint16 *string2;
-               uint32 unknown2;
-       } drsuapi_DsReplicaGetInfoRequest2;
-
-       typedef [switch_type(drsuapi_DsReplicaGetInfoLevel)] union {
-               [case(DRSUAPI_DS_REPLICA_GET_INFO)] drsuapi_DsReplicaGetInfoRequest1 req1;
-               [case(DRSUAPI_DS_REPLICA_GET_INFO2)] drsuapi_DsReplicaGetInfoRequest2 req2;
-       } drsuapi_DsReplicaGetInfoRequest;
-
-       typedef struct {
-               [charset(UTF16),string] uint16 *naming_context_dn;
-               [charset(UTF16),string] uint16 *source_dsa_obj_dn;
-               [charset(UTF16),string] uint16 *source_dsa_address;
-               [charset(UTF16),string] uint16 *transport_obj_dn;
-               drsuapi_DsReplicaNeighbourFlags replica_flags;
-               uint32 reserved;
-               GUID naming_context_obj_guid;
-               GUID source_dsa_obj_guid;
-               GUID source_dsa_invocation_id;
-               GUID transport_obj_guid;
-               hyper tmp_highest_usn;
-               hyper highest_usn;
-               NTTIME last_success;
-               NTTIME last_attempt;
-               WERROR result_last_attempt;
-               uint32 consecutive_sync_failures;
-       } drsuapi_DsReplicaNeighbour;
-
-       typedef struct {
-               uint32 count;
-               uint32 reserved;
-               [size_is(count)] drsuapi_DsReplicaNeighbour array[];
-       } drsuapi_DsReplicaNeighbourCtr;
-
-       typedef struct {
-               uint32 count;
-               uint32 reserved;
-               [size_is(count)] drsuapi_DsReplicaCursor array[];
-       } drsuapi_DsReplicaCursorCtr;
-
-       typedef struct {
-               [charset(UTF16),string] uint16 *attribute_name;
-               uint32 version;
-               NTTIME originating_change_time;
-               GUID originating_invocation_id;
-               hyper originating_usn;
-               hyper local_usn;
-       } drsuapi_DsReplicaObjMetaData;
-
-       typedef struct {
-               uint32 count;
-               uint32 reserved;
-               [size_is(count)] drsuapi_DsReplicaObjMetaData array[];
-       } drsuapi_DsReplicaObjMetaDataCtr;
-
-       typedef struct {
-               [charset(UTF16),string] uint16 *dsa_obj_dn;
-               GUID dsa_obj_guid;
-               NTTIME first_failure;
-               uint32 num_failures;
-               WERROR last_result;
-       } drsuapi_DsReplicaKccDsaFailure;
-
-       typedef struct {
-               uint32 count;
-               uint32 reserved;
-               [size_is(count)] drsuapi_DsReplicaKccDsaFailure array[];
-       } drsuapi_DsReplicaKccDsaFailuresCtr;
-
-       typedef enum {
-               DRSUAPI_DS_REPLICA_OP_TYPE_SYNC         = 0,
-               DRSUAPI_DS_REPLICA_OP_TYPE_ADD          = 1,
-               DRSUAPI_DS_REPLICA_OP_TYPE_DELETE       = 2,
-               DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY       = 3,
-               DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS  = 4
-       } drsuapi_DsReplicaOpType;
-
-       typedef [switch_type(drsuapi_DsReplicaOpType)] union {
-               [case(DRSUAPI_DS_REPLICA_OP_TYPE_SYNC)]         drsuapi_DsReplicaSyncOptions sync;
-               [case(DRSUAPI_DS_REPLICA_OP_TYPE_ADD)]          drsuapi_DsReplicaAddOptions add;
-               [case(DRSUAPI_DS_REPLICA_OP_TYPE_DELETE)]       drsuapi_DsReplicaDeleteOptions delete;
-               [case(DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY)]       drsuapi_DsReplicaModifyOptions modify;
-               [case(DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS)]  drsuapi_DsReplicaUpdateRefsOptions update_refs;
-               [default] uint32 unknown;
-       } drsuapi_DsRplicaOpOptions;
-
-       typedef struct {
-               NTTIME operation_start;
-               uint32 serial_num; /* unique till reboot */
-               uint32 priority;
-               drsuapi_DsReplicaOpType operation_type;
-               [switch_is(operation_type)] drsuapi_DsRplicaOpOptions options;
-               [charset(UTF16),string] uint16 *nc_dn;
-               [charset(UTF16),string] uint16 *remote_dsa_obj_dn;
-               [charset(UTF16),string] uint16 *remote_dsa_address;
-               GUID nc_obj_guid;
-               GUID remote_dsa_obj_guid;
-       } drsuapi_DsReplicaOp;
-
-       typedef struct {
-               NTTIME time;
-               uint32 count;
-               [size_is(count)] drsuapi_DsReplicaOp array[];
-       } drsuapi_DsReplicaOpCtr;
-
-       typedef struct {
-               [charset(UTF16),string] uint16 *attribute_name;
-               [charset(UTF16),string] uint16 *object_dn;
-               [value(ndr_size_DATA_BLOB(0,binary,0))] uint32 __ndr_size_binary;
-               DATA_BLOB *binary;
-               NTTIME deleted;
-               NTTIME created;
-               uint32 version;
-               NTTIME originating_change_time;
-               GUID originating_invocation_id;
-               hyper originating_usn;
-               hyper local_usn;
-       } drsuapi_DsReplicaAttrValMetaData;
-
-       typedef struct {
-               uint32 count;
-               int32 enumeration_context;
-               [size_is(count)] drsuapi_DsReplicaAttrValMetaData array[];
-       } drsuapi_DsReplicaAttrValMetaDataCtr;
-
-       typedef struct {
-               uint32 count;
-               int32 enumeration_context;
-               [size_is(count)] drsuapi_DsReplicaCursor2 array[];
-       } drsuapi_DsReplicaCursor2Ctr;
-
-       typedef struct {
-               GUID source_dsa_invocation_id;
-               hyper highest_usn;
-               NTTIME last_sync_success;
-               [charset(UTF16),string] uint16 *source_dsa_obj_dn;
-       } drsuapi_DsReplicaCursor3;
-
-       typedef struct {
-               uint32 count;
-               int32 enumeration_context;
-               [size_is(count)] drsuapi_DsReplicaCursor3 array[];
-       } drsuapi_DsReplicaCursor3Ctr;
-
-       typedef struct {
-               [charset(UTF16),string] uint16 *attribute_name;
-               uint32 version;
-               NTTIME originating_change_time;
-               GUID originating_invocation_id;
-               hyper originating_usn;
-               hyper local_usn;
-               [charset(UTF16),string] uint16 *originating_dsa_dn;
-       } drsuapi_DsReplicaObjMetaData2;
-
-       typedef struct {
-               uint32 count;
-               int32 enumeration_context;
-               [size_is(count)] drsuapi_DsReplicaObjMetaData2 array[];
-       } drsuapi_DsReplicaObjMetaData2Ctr;
-
-       typedef struct {
-               [charset(UTF16),string] uint16 *attribute_name;
-               [charset(UTF16),string] uint16 *object_dn;
-               [value(ndr_size_DATA_BLOB(0,binary,0))] uint32 __ndr_size_binary;
-               DATA_BLOB *binary;
-               NTTIME deleted;
-               NTTIME created;
-               uint32 version;
-               NTTIME originating_change_time;
-               GUID originating_invocation_id;
-               hyper originating_usn;
-               hyper local_usn;
-               [charset(UTF16),string] uint16 *originating_dsa_dn;
-       } drsuapi_DsReplicaAttrValMetaData2;
-
-       typedef struct {
-               uint32 count;
-               int32 enumeration_context;
-               [size_is(count)] drsuapi_DsReplicaAttrValMetaData2 array[];
-       } drsuapi_DsReplicaAttrValMetaData2Ctr;
-
-       typedef struct {
-               hyper u1; /* session number? */
-               uint32 u2;
-               uint32 u3;
-               GUID bind_guid;
-               NTTIME_1sec bind_time;
-               [flag(NDR_BIG_ENDIAN)] ipv4address client_ip_address;
-               uint32 u5; /* this is the same value the client used as pid in the DsBindInfoX struct */
-       } drsuapi_DsReplicaConnection04;
-
-       typedef struct {
-               [range(0,10000)] uint32 count;
-               uint32 reserved;
-               [size_is(count)] drsuapi_DsReplicaConnection04 array[];
-       } drsuapi_DsReplicaConnection04Ctr;
-
-       typedef struct {
-               [charset(UTF16),string] uint16 *str1;
-               uint32 u1;
-               uint32 u2;
-               uint32 u3;
-               uint32 u4;
-               uint32 u5;
-               hyper u6;
-               uint32 u7;
-       } drsuapi_DsReplica06;
-
-       typedef struct {
-               [range(0,256)] uint32 count;
-               uint32 reserved;
-               [size_is(count)] drsuapi_DsReplica06 array[];
-       } drsuapi_DsReplica06Ctr;
-
-       typedef [switch_type(drsuapi_DsReplicaInfoType)] union {
-               [case(DRSUAPI_DS_REPLICA_INFO_NEIGHBORS)] drsuapi_DsReplicaNeighbourCtr *neighbours;
-               [case(DRSUAPI_DS_REPLICA_INFO_CURSORS)] drsuapi_DsReplicaCursorCtr *cursors;
-               [case(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA)] drsuapi_DsReplicaObjMetaDataCtr *objmetadata;
-               [case(DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES)] drsuapi_DsReplicaKccDsaFailuresCtr *connectfailures;
-               [case(DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES)] drsuapi_DsReplicaKccDsaFailuresCtr *linkfailures;
-               [case(DRSUAPI_DS_REPLICA_INFO_PENDING_OPS)] drsuapi_DsReplicaOpCtr *pendingops;
-               [case(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA)] drsuapi_DsReplicaAttrValMetaDataCtr *attrvalmetadata;
-               [case(DRSUAPI_DS_REPLICA_INFO_CURSORS2)] drsuapi_DsReplicaCursor2Ctr *cursors2;
-               [case(DRSUAPI_DS_REPLICA_INFO_CURSORS3)] drsuapi_DsReplicaCursor3Ctr *cursors3;
-               [case(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2)] drsuapi_DsReplicaObjMetaData2Ctr *objmetadata2;
-               [case(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2)] drsuapi_DsReplicaAttrValMetaData2Ctr *attrvalmetadata2;
-               [case(DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02)] drsuapi_DsReplicaNeighbourCtr *neighbours02;
-               [case(DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04)] drsuapi_DsReplicaConnection04Ctr *connections04;
-               [case(DRSUAPI_DS_REPLICA_INFO_CURSORS05)] drsuapi_DsReplicaCursorCtrEx *cursors05;
-               [case(DRSUAPI_DS_REPLICA_INFO_06)] drsuapi_DsReplica06Ctr *i06;
-       } drsuapi_DsReplicaInfo;
-
-       WERROR drsuapi_DsReplicaGetInfo(
-               [in] policy_handle *bind_handle,
-               [in] drsuapi_DsReplicaGetInfoLevel level,
-               [in,switch_is(level)] drsuapi_DsReplicaGetInfoRequest req,
-               [out] drsuapi_DsReplicaInfoType info_type,
-               [out,switch_is(info_type)] drsuapi_DsReplicaInfo info
-               );
-
-       /*****************/
-        /* Function 0x14 */
-       [todo] WERROR DRSUAPI_ADD_SID_HISTORY();
-
-       /*****************/
-        /* Function 0x15 */
-
-       typedef struct {
-               [range(0,10000)] uint32 num_entries;
-               [size_is(num_entries)] drsuapi_DsGetMembershipsCtr1 **ctrl_array;
-       } drsuapi_DsGetMemberships2Ctr1;
-
-       typedef [switch_type(int32)] union {
-               [case(1)] drsuapi_DsGetMembershipsCtr1 ctr1;
-       } drsuapi_DsGetMemberships2Ctr;
-
-       typedef struct {
-               [range(1,10000)] uint32 num_req;
-               [size_is(num_req)] drsuapi_DsGetMembershipsRequest1 **req_array;
-       } drsuapi_DsGetMemberships2Request1;
-
-       typedef [switch_type(int32)] union {
-               [case(1)] drsuapi_DsGetMemberships2Request1 req1;
-       } drsuapi_DsGetMemberships2Request;
-
-       WERROR drsuapi_DsGetMemberships2(
-               [in] policy_handle *bind_handle,
-               [in,out] int32 level,
-               [in] [switch_is(level)] drsuapi_DsGetMemberships2Request req,
-               [out] [switch_is(level)] drsuapi_DsGetMemberships2Ctr ctr
-               );
-
-
-       /*****************/
-        /* Function 0x16 */
-       [todo] WERROR DRSUAPI_REPLICA_VERIFY_OBJECTS();
-
-       /*****************/
-        /* Function 0x17 */
-       [todo] WERROR DRSUAPI_GET_OBJECT_EXISTENCE();
-
-       /*****************/
-        /* Function 0x18 */
-       typedef struct {
-               WERROR error_code;
-               uint32 site_cost;
-       } drsuapi_DsSiteCostInfo;
-
-       typedef struct {
-               [range(0,10000)] uint32 num_info;
-               [size_is(num_info)] drsuapi_DsSiteCostInfo *info;
-               uint32 unknown;
-       } drsuapi_QuerySitesByCostCtr1;
-
-       typedef [switch_type(int32)] union {
-               [case(1)] drsuapi_QuerySitesByCostCtr1 ctr1;
-       } drsuapi_QuerySitesByCostCtr;
-
-       typedef struct {
-               [charset(UTF16),string] uint16 *site_from;
-               [range(1,10000)] uint32 num_req;
-               [size_is(num_req)] [charset(UTF16),string] uint16 **site_to;
-               uint32 flags;
-       } drsuapi_QuerySitesByCostRequest1;
-
-       typedef [switch_type(int32)] union {
-               [case(1)] drsuapi_QuerySitesByCostRequest1 req1;
-       } drsuapi_QuerySitesByCostRequest;
-
-       WERROR drsuapi_QuerySitesByCost(
-               [in] policy_handle *bind_handle,
-               [in] int32 level,
-               [in] [switch_is(level)] drsuapi_QuerySitesByCostRequest req,
-               [out] int32 level_out,
-               [out] [switch_is(level_out)] drsuapi_QuerySitesByCostCtr ctr
-       );
-}
diff --git a/source4/librpc/idl/dssetup.idl b/source4/librpc/idl/dssetup.idl
deleted file mode 100644 (file)
index 14de9f7..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
-  dssetup interface definition
-*/
-
-import "misc.idl";
-
-[
-       uuid("3919286a-b10c-11d0-9ba8-00c04fd92ef5"),
-       version(0.0),
-       endpoint("ncacn_np:[\\pipe\\lsarpc]", "ncacn_np:[\\pipe\\lsass]", "ncacn_ip_tcp:", "ncalrpc:"),
-       pointer_default(unique),
-       helpstring("Active Directory Setup")
-] interface dssetup
-{
-       /**********************************************/
-       /* Function 0x00                              */
-
-       typedef enum {
-               DS_ROLE_STANDALONE_WORKSTATION = 0,
-               DS_ROLE_MEMBER_WORKSTATION     = 1,
-               DS_ROLE_STANDALONE_SERVER      = 2,
-               DS_ROLE_MEMBER_SERVER          = 3,
-               DS_ROLE_BACKUP_DC              = 4,
-               DS_ROLE_PRIMARY_DC             = 5
-       } dssetup_DsRole;
-
-       typedef [bitmap32bit] bitmap {
-               DS_ROLE_PRIMARY_DS_RUNNING              = 0x00000001,
-               DS_ROLE_PRIMARY_DS_MIXED_MODE           = 0x00000002,
-               DS_ROLE_UPGRADE_IN_PROGRESS             = 0x00000004,
-               DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT     = 0x01000000
-       } dssetup_DsRoleFlags;
-
-       typedef struct {
-               dssetup_DsRole          role;
-               dssetup_DsRoleFlags     flags;
-               [charset(UTF16),string] uint16                  *domain;
-               [charset(UTF16),string] uint16                  *dns_domain;
-               [charset(UTF16),string] uint16                  *forest;
-               GUID                    domain_guid;
-       } dssetup_DsRolePrimaryDomInfoBasic;
-
-       typedef [v1_enum] enum {
-               DS_ROLE_NOT_UPGRADING = 0,
-               DS_ROLE_UPGRADING     = 1
-       } dssetup_DsUpgrade;
-
-       typedef enum {
-               DS_ROLE_PREVIOUS_UNKNOWN = 0,
-               DS_ROLE_PREVIOUS_PRIMARY = 1,
-               DS_ROLE_PREVIOUS_BACKUP  = 2
-       } dssetup_DsPrevious;
-
-       typedef struct {
-               dssetup_DsUpgrade       upgrading;
-               dssetup_DsPrevious      previous_role;
-       } dssetup_DsRoleUpgradeStatus;
-
-       typedef enum {
-               DS_ROLE_OP_IDLE         = 0,
-               DS_ROLE_OP_ACTIVE       = 1,
-               DS_ROLE_OP_NEEDS_REBOOT = 2
-       } dssetup_DsRoleOp;
-
-       typedef struct {
-               dssetup_DsRoleOp status;
-       } dssetup_DsRoleOpStatus;
-
-       typedef enum {
-               DS_ROLE_BASIC_INFORMATION       = 1,
-               DS_ROLE_UPGRADE_STATUS          = 2,
-               DS_ROLE_OP_STATUS               = 3
-       } dssetup_DsRoleInfoLevel;
-
-       typedef [switch_type(dssetup_DsRoleInfoLevel)] union {
-               [case(DS_ROLE_BASIC_INFORMATION)] dssetup_DsRolePrimaryDomInfoBasic     basic;
-               [case(DS_ROLE_UPGRADE_STATUS)]    dssetup_DsRoleUpgradeStatus           upgrade;
-               [case(DS_ROLE_OP_STATUS)]         dssetup_DsRoleOpStatus                opstatus;
-       } dssetup_DsRoleInfo;
-
-       WERROR dssetup_DsRoleGetPrimaryDomainInformation(
-               [in] dssetup_DsRoleInfoLevel level,
-               [out,switch_is(level),unique] dssetup_DsRoleInfo *info
-               );
-
-       /*
-         w2k3 has removed all the calls below from their implementation.
-         These stubs are left here only as a way of documenting the names
-         of the calls in case they ever turn up on the wire.
-       */
-       [todo] WERROR dssetup_DsRoleDnsNameToFlatName();
-       [todo] WERROR dssetup_DsRoleDcAsDc();
-       [todo] WERROR dssetup_DsRoleDcAsReplica();
-       [todo] WERROR dssetup_DsRoleDemoteDc();
-       [todo] WERROR dssetup_DsRoleGetDcOperationProgress();
-       [todo] WERROR dssetup_DsRoleGetDcOperationResults();
-       [todo] WERROR dssetup_DsRoleCancel();
-       [todo] WERROR dssetup_DsRoleServerSaveStateForUpgrade();
-       [todo] WERROR dssetup_DsRoleUpgradeDownlevelServer();
-       [todo] WERROR dssetup_DsRoleAbortDownlevelServerUpgrade();
-}
diff --git a/source4/librpc/idl/echo.idl b/source4/librpc/idl/echo.idl
deleted file mode 100644 (file)
index bf1e318..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-
-[
-  uuid("60a15ec5-4de8-11d7-a637-005056a20182"),
-  endpoint("ncacn_np:[\\pipe\\rpcecho]", "ncacn_ip_tcp:", "ncalrpc:"),
-  pointer_default(unique),
-  version(1.0),
-  helpstring("Simple echo pipe")
-]
-interface rpcecho
-{
-       /* Add one to an integer */
-       void echo_AddOne(
-               [in] uint32 in_data,
-               [out] uint32 *out_data
-       );
-       /* Echo an array of bytes back at the caller */
-       void echo_EchoData(
-               [in] uint32 len,
-               [in] [size_is(len)] uint8 in_data[],
-               [out] [size_is(len)] uint8 out_data[]
-       );
-       /* Sink data to the server */
-       void echo_SinkData(
-               [in] uint32 len,
-               [in,size_is(len)] uint8 data[]
-       );
-       /* Source data from server */
-       void echo_SourceData(
-               [in] uint32 len,
-               [out,size_is(len)] uint8 data[]
-       );
-
-       /* test strings */
-       void echo_TestCall (
-               [in,string,charset(UTF16)]       uint16 *s1,
-               [out,string,charset(UTF16)]      uint16 **s2
-               );
-
-
-       /* test some alignment issues */
-       typedef [public] struct {
-               uint8 v;
-       } echo_info1;
-
-       typedef struct {
-               uint16 v;
-       } echo_info2;
-
-       typedef struct {
-               uint32 v;
-       } echo_info3;
-
-       struct echo_info4 {
-               hyper v;
-       };
-
-       typedef struct {
-               uint8 v1;
-               hyper v2;
-       } echo_info5;
-
-       typedef struct {
-               uint8 v1;
-               echo_info1 info1;
-       } echo_info6;
-
-       typedef struct {
-               uint8 v1;
-               struct echo_info4 info4;
-       } echo_info7;
-
-       typedef [switch_type(uint16)] union {
-               [case(1)]  echo_info1 info1;
-               [case(2)]  echo_info2 info2;
-               [case(3)]  echo_info3 info3;
-               [case(4)]  struct echo_info4 info4;
-               [case(5)]  echo_info5 info5;
-               [case(6)]  echo_info6 info6;
-               [case(7)]  echo_info7 info7;
-       } echo_Info;
-
-       NTSTATUS echo_TestCall2 (
-                    [in]                    uint16 level,
-                    [out,switch_is(level)]  echo_Info *info
-               );
-
-       uint32 echo_TestSleep(
-               [in] uint32 seconds
-               );
-
-       typedef enum {
-               ECHO_ENUM1 = 1,
-               ECHO_ENUM2 = 2
-       } echo_Enum1;
-
-       typedef [v1_enum] enum {
-               ECHO_ENUM1_32 = 1,
-               ECHO_ENUM2_32 = 2
-       } echo_Enum1_32;
-
-       typedef struct {
-               echo_Enum1 e1;
-               echo_Enum1_32 e2;
-       } echo_Enum2;
-
-       typedef [switch_type(uint16)] union {
-               [case(ECHO_ENUM1)] echo_Enum1 e1;
-               [case(ECHO_ENUM2)] echo_Enum2 e2;
-       } echo_Enum3;
-
-       void echo_TestEnum(
-               [in,out,ref] echo_Enum1 *foo1,
-               [in,out,ref] echo_Enum2 *foo2,
-               [in,out,ref,switch_is(*foo1)] echo_Enum3 *foo3
-               );
-
-       typedef struct {
-               uint32 x;
-               [size_is(x)] uint16 surrounding[*];
-       } echo_Surrounding;
-
-       void echo_TestSurrounding(
-               [in,out,ref] echo_Surrounding *data
-       );
-
-       uint16 echo_TestDoublePointer([in] uint16 ***data);
-}
diff --git a/source4/librpc/idl/eventlog.idl b/source4/librpc/idl/eventlog.idl
deleted file mode 100644 (file)
index 4a62ce1..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-#include "idl_types.h"
-
-/*
-  eventlog interface definition
-*/
-
-import "lsa.idl", "security.idl";
-
-[ uuid("82273fdc-e32a-18c3-3f78-827929dc23ea"),
-  version(0.0),
-  pointer_default(unique),
-  helpstring("Event Logger")
-] interface eventlog
-{
-       typedef bitmap {
-               EVENTLOG_SEQUENTIAL_READ = 0x0001,
-               EVENTLOG_SEEK_READ       = 0x0002,
-               EVENTLOG_FORWARDS_READ   = 0x0004,
-               EVENTLOG_BACKWARDS_READ  = 0x0008
-       } eventlogReadFlags;
-
-       typedef bitmap {
-               EVENTLOG_SUCCESS          = 0x0000,
-               EVENTLOG_ERROR_TYPE       = 0x0001,
-               EVENTLOG_WARNING_TYPE     = 0x0002,
-               EVENTLOG_INFORMATION_TYPE = 0x0004,
-               EVENTLOG_AUDIT_SUCCESS    = 0x0008,
-               EVENTLOG_AUDIT_FAILURE    = 0x0010
-       } eventlogEventTypes;
-
-       typedef struct {
-               uint16 unknown0;
-               uint16 unknown1;
-       } eventlog_OpenUnknown0;
-       
-       typedef [public] struct { 
-               uint32 size;
-               uint32 reserved;
-               uint32 record_number;
-               uint32 time_generated;
-               uint32 time_written;
-               uint32 event_id;
-               uint16 event_type;
-               uint16 num_of_strings;
-               uint16 event_category;
-               uint16 reserved_flags;
-               uint32 closing_record_number;
-               uint32 stringoffset;
-               uint32 sid_length;
-               uint32 sid_offset;
-               uint32 data_length;
-               uint32 data_offset;
-               nstring source_name;
-               nstring computer_name;
-               nstring strings[num_of_strings];
-               astring raw_data;
-       } eventlog_Record;
-
-       /******************/
-       /* Function: 0x00 */
-       NTSTATUS eventlog_ClearEventLogW(
-               [in] policy_handle *handle,
-               [in,unique] lsa_String *unknown
-       );
-
-       /******************/
-       /* Function: 0x01 */
-       [todo] NTSTATUS eventlog_BackupEventLogW();
-       
-       /******************/
-       /* Function: 0x02 */
-       NTSTATUS eventlog_CloseEventLog(
-               [in,out] policy_handle *handle
-       );
-
-       /******************/
-       /* Function: 0x03 */
-       [todo] NTSTATUS eventlog_DeregisterEventSource();
-
-       /******************/
-       /* Function: 0x04 */
-       NTSTATUS eventlog_GetNumRecords(
-               [in] policy_handle *handle,
-               [out] uint32 *number
-       );
-
-       /******************/
-       /* Function: 0x05 */
-       NTSTATUS eventlog_GetOldestRecord(
-               [in] policy_handle *handle,
-               [out,ref] uint32 *oldest_entry
-       );
-
-       /******************/
-       /* Function: 0x06 */
-       [todo] NTSTATUS eventlog_ChangeNotify();
-
-       /******************/
-       /* Function: 0x07 */
-       NTSTATUS eventlog_OpenEventLogW(
-               [in,unique]         eventlog_OpenUnknown0 *unknown0,
-               [in]        lsa_String logname,
-               [in]        lsa_String servername,
-               [in]        uint32 unknown2,
-               [in]        uint32 unknown3,
-               [out]   policy_handle *handle
-       );
-
-       /******************/
-       /* Function: 0x08 */
-       [todo] NTSTATUS eventlog_RegisterEventSourceW();
-
-       /******************/
-       /* Function: 0x09 */
-       [todo] NTSTATUS eventlog_OpenBackupEventLogW();
-
-       /******************/
-       /* Function: 0x0a */
-       NTSTATUS eventlog_ReadEventLogW(
-               [in] policy_handle *handle,
-               [in] uint32 flags,
-               [in] uint32 offset,
-               [in] uint32 number_of_bytes,
-               [out,size_is(number_of_bytes)] uint8 *data,
-               [out] uint32 *sent_size,
-               [out] uint32 *real_size
-       );
-
-       /*****************/
-       /* Function 0x0b */
-       [todo] NTSTATUS eventlog_ReportEventW();
-
-       /*****************/
-       /* Function 0x0c */
-       [todo] NTSTATUS eventlog_ClearEventLogA();
-       
-       /******************/
-       /* Function: 0x0d */
-       [todo] NTSTATUS eventlog_BackupEventLogA();
-
-       /*****************/
-       /* Function 0x0e */
-       [todo] NTSTATUS eventlog_OpenEventLogA();
-
-       /*****************/
-       /* Function 0x0f */
-       [todo] NTSTATUS eventlog_RegisterEventSourceA();
-
-       /*****************/
-       /* Function 0x10 */
-       [todo] NTSTATUS eventlog_OpenBackupEventLogA();
-
-       /*****************/
-       /* Function 0x11 */
-       [todo] NTSTATUS eventlog_ReadEventLogA();
-
-       /*****************/
-       /* Function 0x12 */
-       [todo] NTSTATUS eventlog_ReportEventA();
-
-       /*****************/
-       /* Function 0x13 */
-       [todo] NTSTATUS eventlog_RegisterClusterSvc();
-
-       /*****************/
-       /* Function 0x14 */
-       [todo] NTSTATUS eventlog_DeregisterClusterSvc();
-
-       /*****************/
-       /* Function 0x15 */
-       [todo] NTSTATUS eventlog_WriteClusterEvents();
-
-       /*****************/
-       /* Function 0x16 */
-       [todo] NTSTATUS eventlog_GetLogIntormation();
-
-       /*****************/
-       /* Function 0x17 */
-       NTSTATUS eventlog_FlushEventLog(
-               [in] policy_handle *handle
-       );      
-}
index 4dce6d6d1e7d72c3fcd9fb32346f2f897d18f586..dd9791d894670dfe8c0b8c3b5cd80399dd6d4620 100644 (file)
@@ -45,6 +45,12 @@ import "misc.idl", "security.idl";
                [charset(DOS),size_is(size),length_is(length)] uint8 *string;
        } lsa_AsciiStringLarge;
 
+       typedef [public] struct {
+               uint16 length;
+               uint16 size;
+               [size_is(size/2),length_is(length/2)] uint16 *array;
+       } lsa_BinaryString;
+
        /******************/
        /* Function: 0x00 */
        NTSTATUS lsa_Close (
@@ -124,12 +130,27 @@ import "misc.idl", "security.idl";
                lsa_QosInfo *sec_qos;
        } lsa_ObjectAttribute;
 
+       typedef [public,bitmap32bit] bitmap {
+               LSA_POLICY_VIEW_LOCAL_INFORMATION       = 0x00000001,
+               LSA_POLICY_VIEW_AUDIT_INFORMATION       = 0x00000002,
+               LSA_POLICY_GET_PRIVATE_INFORMATION      = 0x00000004,
+               LSA_POLICY_TRUST_ADMIN                  = 0x00000008,
+               LSA_POLICY_CREATE_ACCOUNT               = 0x00000010,
+               LSA_POLICY_CREATE_SECRET                = 0x00000020,
+               LSA_POLICY_CREATE_PRIVILEGE             = 0x00000040,
+               LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS     = 0x00000080,
+               LSA_POLICY_SET_AUDIT_REQUIREMENTS       = 0x00000100,
+               LSA_POLICY_AUDIT_LOG_ADMIN              = 0x00000200,
+               LSA_POLICY_SERVER_ADMIN                 = 0x00000400,
+               LSA_POLICY_LOOKUP_NAMES                 = 0x00000800
+       } lsa_PolicyAccessMask;
+
        /* notice the screwup with the system_name - thats why MS created
           OpenPolicy2 */
        [public] NTSTATUS lsa_OpenPolicy (
                [in,unique]       uint16 *system_name,
                [in]   lsa_ObjectAttribute *attr,
-               [in]       uint32 access_mask,
+               [in]   lsa_PolicyAccessMask access_mask,
                [out]  policy_handle *handle
                );
        
@@ -287,7 +308,7 @@ import "misc.idl", "security.idl";
        /* Function: 0x0a */
        [public] NTSTATUS lsa_CreateAccount (
                [in]    policy_handle *handle,
-               [in]    dom_sid2 *sid,
+               [in,ref] dom_sid2 *sid,
                [in]    uint32 access_mask,
                [out]   policy_handle *acct_handle
                );
@@ -441,9 +462,9 @@ import "misc.idl", "security.idl";
 
        /*****************************************/
        /* Function:     0x11                    */
-       NTSTATUS lsa_OpenAccount (
+       NTSTATUS lsa_OpenAccount(
                [in]         policy_handle *handle,
-               [in]         dom_sid2 *sid,
+               [in,ref]     dom_sid2 *sid,
                [in]         uint32 access_mask,
                [out]        policy_handle *acct_handle
                );
@@ -473,7 +494,7 @@ import "misc.idl", "security.idl";
        /* Function:            0x13 */
        NTSTATUS lsa_AddPrivilegesToAccount(
                [in]         policy_handle *handle,
-               [in]         lsa_PrivilegeSet *privs
+               [in,ref]     lsa_PrivilegeSet *privs
                );
        
 
@@ -722,8 +743,8 @@ import "misc.idl", "security.idl";
        /* Function:     0x1f */
        NTSTATUS lsa_LookupPrivValue(
                [in]     policy_handle *handle,
-               [in]     lsa_String *name,
-               [out]    lsa_LUID *luid
+               [in,ref] lsa_String *name,
+               [out,ref] lsa_LUID *luid
                );
 
 
@@ -769,14 +790,14 @@ import "misc.idl", "security.idl";
        } lsa_RightAttribute;
        
        typedef struct {
-               uint32 count;
+               [range(0,256)] uint32 count;
                [size_is(count)] lsa_StringLarge *names;
        } lsa_RightSet;
        
        NTSTATUS lsa_EnumAccountRights (
                [in]     policy_handle *handle,
-               [in]     dom_sid2 *sid,
-               [out]    lsa_RightSet *rights
+               [in,ref] dom_sid2 *sid,
+               [out,ref] lsa_RightSet *rights
                );
 
 
@@ -784,17 +805,17 @@ import "misc.idl", "security.idl";
        /* Function:       0x25 */
        NTSTATUS lsa_AddAccountRights (
                [in]     policy_handle *handle,
-               [in]     dom_sid2 *sid,
-               [in]     lsa_RightSet *rights
+               [in,ref] dom_sid2 *sid,
+               [in,ref] lsa_RightSet *rights
                );
-       
+
        /**********************/
        /* Function:       0x26 */
        NTSTATUS lsa_RemoveAccountRights (
                [in]     policy_handle *handle,
-               [in]     dom_sid2 *sid,
-               [in]         uint32 unknown,
-               [in]     lsa_RightSet *rights
+               [in,ref] dom_sid2 *sid,
+               [in]     uint8 remove_all,
+               [in,ref] lsa_RightSet *rights
                );
 
        /* Function:   0x27 */
@@ -829,7 +850,7 @@ import "misc.idl", "security.idl";
        [public] NTSTATUS lsa_OpenPolicy2 (
                [in,unique]      [string,charset(UTF16)] uint16 *system_name,
                [in]  lsa_ObjectAttribute *attr,
-               [in]      uint32 access_mask,
+               [in]  lsa_PolicyAccessMask access_mask,
                [out] policy_handle *handle
                );
 
diff --git a/source4/librpc/idl/nbt.idl b/source4/librpc/idl/nbt.idl
deleted file mode 100644 (file)
index 38a2b95..0000000
+++ /dev/null
@@ -1,654 +0,0 @@
-#include "idl_types.h"
-
-/*
-   IDL structures for NBT operations
-
-   NBT is not traditionally encoded using IDL/NDR. This is a bit of an
-   experiment, and I may well switch us back to a more traditional
-   encoding if it doesn't work out
-*/
-
-import "misc.idl", "security.idl", "svcctl.idl", "samr.idl";
-[
-       helper("../libcli/netlogon.h", "../libcli/nbt/libnbt.h")
-]
-interface nbt
-{
-       const int NBT_NAME_SERVICE_PORT  = 137;
-       const int NBT_DGRAM_SERVICE_PORT = 138;
-
-       typedef [bitmap16bit] bitmap {
-               NBT_RCODE                   = 0x000F,
-               NBT_FLAG_BROADCAST          = 0x0010,
-               NBT_FLAG_RECURSION_AVAIL    = 0x0080,
-               NBT_FLAG_RECURSION_DESIRED  = 0x0100,
-               NBT_FLAG_TRUNCATION         = 0x0200,
-               NBT_FLAG_AUTHORITIVE        = 0x0400,
-               NBT_OPCODE                  = 0x7800,
-               NBT_FLAG_REPLY              = 0x8000
-       } nbt_operation;
-
-       /* the opcodes are in the operation field, masked with
-          NBT_OPCODE */
-       typedef enum {
-               NBT_OPCODE_QUERY          =  (0x0<<11),
-               NBT_OPCODE_REGISTER       =  (0x5<<11),
-               NBT_OPCODE_RELEASE        =  (0x6<<11),
-               NBT_OPCODE_WACK           =  (0x7<<11),
-               NBT_OPCODE_REFRESH        =  (0x8<<11),
-               NBT_OPCODE_REFRESH2       =  (0x9<<11),
-               NBT_OPCODE_MULTI_HOME_REG =  (0xf<<11)
-       } nbt_opcode;
-
-       /* rcode values */
-       typedef enum {
-               NBT_RCODE_OK  = 0x0,
-               NBT_RCODE_FMT = 0x1,
-               NBT_RCODE_SVR = 0x2,
-               NBT_RCODE_NAM = 0x3,
-               NBT_RCODE_IMP = 0x4,
-               NBT_RCODE_RFS = 0x5,
-               NBT_RCODE_ACT = 0x6,
-               NBT_RCODE_CFT = 0x7
-       } nbt_rcode;
-
-       /* we support any 8bit name type, but by defining the common
-          ones here we get better debug displays */
-       typedef [enum8bit] enum {
-               NBT_NAME_CLIENT   = 0x00,
-               NBT_NAME_MS       = 0x01,
-               NBT_NAME_USER     = 0x03,
-               NBT_NAME_SERVER   = 0x20,
-               NBT_NAME_PDC      = 0x1B,
-               NBT_NAME_LOGON    = 0x1C,
-               NBT_NAME_MASTER   = 0x1D,
-               NBT_NAME_BROWSER  = 0x1E
-       } nbt_name_type;
-
-       /* the ndr parser for nbt_name is separately defined in
-          nbtname.c (along with the parsers for nbt_string) */
-       typedef [public,nopull,nopush] struct {
-               string        name;
-               string        scope;
-               nbt_name_type type;
-       } nbt_name;
-
-       typedef [public,enum16bit] enum {
-               NBT_QCLASS_IP = 0x01
-       } nbt_qclass;
-
-       typedef [public,enum16bit] enum {
-               NBT_QTYPE_ADDRESS     = 0x0001,
-               NBT_QTYPE_NAMESERVICE = 0x0002,
-               NBT_QTYPE_NULL        = 0x000A,
-               NBT_QTYPE_NETBIOS     = 0x0020,
-               NBT_QTYPE_STATUS      = 0x0021
-       } nbt_qtype;
-
-       typedef struct {
-               nbt_name   name;
-               nbt_qtype  question_type;
-               nbt_qclass question_class;
-       } nbt_name_question;
-
-       /* these are the possible values of the NBT_NM_OWNER_TYPE
-          field */
-       typedef enum {
-               NBT_NODE_B = 0x0000,
-               NBT_NODE_P = 0x2000,
-               NBT_NODE_M = 0x4000,
-               NBT_NODE_H = 0x6000
-       } nbt_node_type;
-
-       typedef [bitmap16bit] bitmap {
-               NBT_NM_PERMANENT        = 0x0200,
-               NBT_NM_ACTIVE           = 0x0400,
-               NBT_NM_CONFLICT         = 0x0800,
-               NBT_NM_DEREGISTER       = 0x1000,
-               NBT_NM_OWNER_TYPE       = 0x6000,
-               NBT_NM_GROUP            = 0x8000
-       } nb_flags;
-
-       typedef struct {
-               nb_flags nb_flags;
-               ipv4address ipaddr;
-       } nbt_rdata_address;
-
-       typedef struct {
-               uint16 length;
-               nbt_rdata_address addresses[length/6];
-       } nbt_rdata_netbios;
-
-       typedef struct {
-               uint8 unit_id[6];
-               uint8 jumpers;
-               uint8 test_result;
-               uint16 version_number;
-               uint16 period_of_statistics;
-               uint16 number_of_crcs;
-               uint16 number_alignment_errors;
-               uint16 number_of_collisions;
-               uint16 number_send_aborts;
-               uint32 number_good_sends;
-               uint32 number_good_receives;
-               uint16 number_retransmits;
-               uint16 number_no_resource_conditions;
-               uint16 number_free_command_blocks;
-               uint16 total_number_command_blocks;
-               uint16 max_total_number_command_blocks;
-               uint16 number_pending_sessions;
-               uint16 max_number_pending_sessions;
-               uint16 max_total_sessions_possible;
-               uint16 session_data_packet_size;
-       } nbt_statistics;
-
-       typedef struct {
-               [charset(DOS)] uint8 name[15];
-               nbt_name_type type;
-               nb_flags  nb_flags;
-       } nbt_status_name;
-
-       typedef struct {
-               [value(num_names * 18 + 47)] uint16 length;
-               uint8 num_names;
-               nbt_status_name names[num_names];
-               nbt_statistics  statistics;
-       } nbt_rdata_status;
-
-       typedef struct {
-               uint16 length;
-               uint8  data[length];
-       } nbt_rdata_data;
-
-       typedef [nodiscriminant,public] union {
-               [case(NBT_QTYPE_NETBIOS)] nbt_rdata_netbios netbios;
-               [case(NBT_QTYPE_STATUS)]  nbt_rdata_status status;
-               [default]                 nbt_rdata_data   data;
-       } nbt_rdata;
-
-/*
- * this macro works around the problem
- * that we need to use nbt_rdata_data
- * together with NBT_QTYPE_NETBIOS
- * for WACK replies
- */
-       typedef [flag(LIBNDR_PRINT_ARRAY_HEX),nopush] struct {
-               nbt_name   name;
-               nbt_qtype  rr_type;
-               nbt_qclass rr_class;
-               uint32     ttl;
-               [switch_is(rr_type)] nbt_rdata rdata;
-       } nbt_res_rec;
-
-       typedef [flag(NDR_NOALIGN|NDR_BIG_ENDIAN|NDR_PAHEX),public] struct {
-               uint16            name_trn_id;
-               nbt_operation     operation;
-               uint16            qdcount;
-               uint16            ancount;
-               uint16            nscount;
-               uint16            arcount;
-               nbt_name_question questions[qdcount];
-               nbt_res_rec       answers[ancount];
-               nbt_res_rec       nsrecs[nscount];
-               nbt_res_rec       additional[arcount];
-               [flag(NDR_REMAINING)] DATA_BLOB padding;
-       } nbt_name_packet;
-
-
-       /*
-         NBT DGRAM packets (UDP/138)
-       */
-
-       typedef [enum8bit] enum {
-               DGRAM_DIRECT_UNIQUE  = 0x10,
-               DGRAM_DIRECT_GROUP   = 0x11,
-               DGRAM_BCAST          = 0x12,
-               DGRAM_ERROR          = 0x13,
-               DGRAM_QUERY          = 0x14,
-               DGRAM_QUERY_POSITIVE = 0x15,
-               DGRAM_QUERY_NEGATIVE = 0x16
-       } dgram_msg_type;
-
-       typedef [bitmap8bit] bitmap {
-               DGRAM_FLAG_MORE         = 0x01,
-               DGRAM_FLAG_FIRST        = 0x02,
-               DGRAM_FLAG_NODE_TYPE    = 0x0C
-       } dgram_flags;
-
-       typedef [enum8bit] enum {
-               DGRAM_NODE_B    = 0x00,
-               DGRAM_NODE_P    = 0x04,
-               DGRAM_NODE_M    = 0x08,
-               DGRAM_NODE_NBDD = 0x0C
-       } dgram_node_type;
-
-       /* a dgram_message is the main dgram body in general use */
-
-       /* the most common datagram type is a SMB_TRANSACTION
-          operation, where a SMB packet is used in the data section
-          of a dgram_message to hold a trans request, which in turn
-          holds a small command structure. It's a very strange beast
-          indeed. To make the code cleaner we define a basic SMB
-          packet in IDL here. This is not a general purpose SMB
-          packet, and won't be used in the core SMB client/server
-          code, but it does make working with these types of dgrams
-          easier */
-
-       const string NBT_MAILSLOT_NETLOGON = "\\MAILSLOT\\NET\\NETLOGON";
-       const string NBT_MAILSLOT_NTLOGON  = "\\MAILSLOT\\NET\\NTLOGON";
-       const string NBT_MAILSLOT_GETDC    = "\\MAILSLOT\\NET\\GETDC";
-       const string NBT_MAILSLOT_BROWSE   = "\\MAILSLOT\\BROWSE";
-
-       typedef [enum8bit] enum {
-               SMB_TRANSACTION = 0x25
-       } smb_command;
-
-       typedef struct {
-               [range(17,17),value(17)] uint8 wct;
-               uint16                      total_param_count;
-               uint16                      total_data_count;
-               uint16                      max_param_count;
-               uint16                      max_data_count;
-               uint8                       max_setup_count;
-               uint8                       pad;
-               uint16                      trans_flags;
-               uint32                      timeout;
-               uint16                      reserved;
-               uint16                      param_count;
-               uint16                      param_offset;
-               uint16                      data_count;
-               uint16                      data_offset;
-               [range(3,3),value(3)] uint8 setup_count;
-               uint8                       pad2;
-               uint16                      opcode;
-               uint16                      priority;
-               uint16                      class;
-               [value(strlen(mailslot_name)+1+data.length)] 
-                     uint16                byte_count;
-               astring                     mailslot_name;
-               [flag(NDR_REMAINING)]       DATA_BLOB data;
-       } smb_trans_body;
-
-       typedef [nodiscriminant] union {
-               [case(SMB_TRANSACTION)] smb_trans_body trans;
-       } smb_body;
-
-
-       typedef [flag(NDR_NOALIGN|NDR_LITTLE_ENDIAN|NDR_PAHEX),public] struct {
-               smb_command                smb_command;
-               uint8                      err_class;
-               uint8                      pad;
-               uint16                     err_code;
-               uint8                      flags;
-               uint16                     flags2;
-               uint16                     pid_high;
-               uint8                      signature[8];
-               uint16                     reserved;
-               uint16                     tid;
-               uint16                     pid;
-               uint16                     vuid;
-               uint16                     mid;
-               [switch_is(smb_command)]   smb_body body;
-       } dgram_smb_packet;
-
-       const uint32 DGRAM_SMB = 0xff534d42; /* 0xffSMB */
-
-       typedef [nodiscriminant] union {
-               [case(DGRAM_SMB)] dgram_smb_packet smb;
-       } dgram_message_body;
-
-       typedef struct {
-               uint16          length;
-               uint16          offset;
-               nbt_name        source_name;
-               nbt_name        dest_name;
-               uint32          dgram_body_type;
-               [switch_is(dgram_body_type)] dgram_message_body body;
-       } dgram_message;
-
-       typedef [enum8bit] enum {
-               DGRAM_ERROR_NAME_NOT_PRESENT = 0x82,
-               DGRAM_ERROR_INVALID_SOURCE   = 0x83,
-               DGRAM_ERROR_INVALID_DEST     = 0x84
-       } dgram_err_code;
-
-       typedef [nodiscriminant] union {
-               [case(DGRAM_DIRECT_UNIQUE)]   dgram_message  msg;
-               [case(DGRAM_DIRECT_GROUP)]    dgram_message  msg;
-               [case(DGRAM_BCAST)]           dgram_message  msg;
-               [case(DGRAM_ERROR)]           dgram_err_code error;
-               [case(DGRAM_QUERY)]           nbt_name       dest_name;
-               [case(DGRAM_QUERY_POSITIVE)]  nbt_name       dest_name;
-               [case(DGRAM_QUERY_NEGATIVE)]  nbt_name       dest_name;
-       } dgram_data;
-
-       typedef [flag(NDR_NOALIGN|NDR_BIG_ENDIAN|NDR_PAHEX),public] struct {
-               dgram_msg_type msg_type;
-               dgram_flags    flags;
-               uint16         dgram_id;
-               ipv4address    src_addr;
-               uint16         src_port;
-               [switch_is(msg_type)] dgram_data data;
-       } nbt_dgram_packet;
-
-
-       /******************************************
-        * \MAILSLOT\NET\NETLOGON mailslot requests
-        * and 
-        * \MAILSLOT\NET\NTLOGON mailslot requests 
-        */
-
-       typedef [public,gensize] struct {
-               uint32                  sa_family;
-               [flag(NDR_BIG_ENDIAN)]  ipv4address pdc_ip;
-               [flag(NDR_REMAINING)]   DATA_BLOB remaining;
-       } nbt_sockaddr;
-
-       typedef [bitmap32bit,public] bitmap {
-               NBT_SERVER_PDC           = 0x00000001,
-               NBT_SERVER_GC            = 0x00000004,
-               NBT_SERVER_LDAP          = 0x00000008,
-               NBT_SERVER_DS            = 0x00000010,
-               NBT_SERVER_KDC           = 0x00000020,
-               NBT_SERVER_TIMESERV      = 0x00000040,
-               NBT_SERVER_CLOSEST       = 0x00000080,
-               NBT_SERVER_WRITABLE      = 0x00000100, 
-               NBT_SERVER_GOOD_TIMESERV = 0x00000200,
-               NBT_SERVER_NDNC          = 0x00000400,
-               NBT_SERVER_SEL_SEC_DOM_6 = 0x00000800,
-               NBT_SERVER_FUL_SEC_DOM_6 = 0x00001000,
-               NBT_SERVER_DS_DNS_CONTR  = 0x04000000,
-               NBT_SERVER_DS_DNS_DOMAIN = 0x02000000,
-               NBT_SERVER_DS_DNS_FOREST = 0x01000000
-       } nbt_server_type;
-
-       typedef [bitmap32bit,public] bitmap {
-               NETLOGON_NT_VERSION_1   =  0x00000001,
-               NETLOGON_NT_VERSION_5   =  0x00000002,
-               NETLOGON_NT_VERSION_5EX =  0x00000004,
-               NETLOGON_NT_VERSION_5EX_WITH_IP = 0x00000008,
-               NETLOGON_NT_VERSION_WITH_CLOSEST_SITE = 0x00000010,
-               NETLOGON_NT_VERSION_AVIOD_NT4EMUL = 0x01000000,
-               NETLOGON_NT_VERSION_PDC = 0x10000000,
-               NETLOGON_NT_VERSION_IP = 0x20000000,
-               NETLOGON_NT_VERSION_LOCAL = 0x40000000,
-               NETLOGON_NT_VERSION_GC = 0x80000000
-       } netlogon_nt_version_flags;
-
-
-       typedef [enum16bit,public] enum {
-               LOGON_PRIMARY_QUERY               = 7,  /* Was also NETLOGON_QUERY_FOR_PDC */
-               NETLOGON_ANNOUNCE_UAS             = 10,
-               NETLOGON_RESPONSE_FROM_PDC        = 12,
-               LOGON_SAM_LOGON_REQUEST           = 18, /* Was also NETLOGON_QUERY_FOR_PDC2, NTLOGON_SAM_LOGON */
-               LOGON_SAM_LOGON_RESPONSE          = 19, /* Was also NTLOGON_SAM_LOGON_REPLY */
-               LOGON_SAM_LOGON_PAUSE_RESPONSE    = 20, 
-               LOGON_SAM_LOGON_USER_UNKNOWN      = 21, /* Was also NTLOGON_SAM_LOGON_REPLY15 */
-               LOGON_SAM_LOGON_RESPONSE_EX       = 23,  /* was NETLOGON_RESPONSE_FROM_PDC2     */
-               LOGON_SAM_LOGON_PAUSE_RESPONSE_EX = 24, 
-               LOGON_SAM_LOGON_USER_UNKNOWN_EX   = 25 /* was NETLOGON_RESPONSE_FROM_PDC_USER */
-       } netlogon_command;
-
-       typedef bitmap samr_AcctFlags samr_AcctFlags;
-
-       /* query to dc hand marshaled, as it has 'optional'
-        * parts */
-       typedef [nopull,nopush] struct {
-               uint16               request_count;
-               nstring              computer_name;
-               nstring              user_name;
-               astring              mailslot_name;
-               samr_AcctFlags       acct_control;
-               [value(ndr_size_dom_sid0(&sid, ndr->flags))] uint32 sid_size;
-               /* The manual alignment is required because this
-                * structure is marked flag(NDR_NOALIGN) via the
-                * nbt_netlogon_packet below.  
-                *
-                * However, both MUST only be present if sid_size > 0 
-                */
-                [flag(NDR_ALIGN4)]   DATA_BLOB _pad;
-                [subcontext(0),subcontext_size(sid_size)] dom_sid0 sid;
-               netlogon_nt_version_flags               nt_version;
-               uint16               lmnt_token;
-               uint16               lm20_token;
-       } NETLOGON_SAM_LOGON_REQUEST;
-
-       typedef [flag(NDR_NOALIGN),public] struct {
-               netlogon_command command;
-               nstring              server;
-               nstring              user_name;
-               nstring              domain;
-               netlogon_nt_version_flags               nt_version;
-               uint16               lmnt_token;
-               uint16               lm20_token;
-       } NETLOGON_SAM_LOGON_RESPONSE_NT40;
-
-       typedef [flag(NDR_NOALIGN),public] struct {
-               netlogon_command command;
-               nstring              pdc_name;
-               nstring              user_name;
-               nstring              domain_name;
-               GUID                 domain_uuid;
-               GUID                 zero_uuid;
-               nbt_string           forest;
-               nbt_string           dns_domain;
-               nbt_string           pdc_dns_name;
-               ipv4address          pdc_ip;
-               nbt_server_type      server_type;
-               netlogon_nt_version_flags    nt_version;
-               uint16               lmnt_token;
-               uint16               lm20_token;                
-       } NETLOGON_SAM_LOGON_RESPONSE;
-
-       /* response from pdc hand marshaled (we have an additional
-        * function that uses this structure), as it has 'optional'
-        * parts */
-       typedef [flag(NDR_NOALIGN),public] struct {
-               netlogon_command command;
-               uint16               sbz; /* From the docs */
-               nbt_server_type      server_type;
-               GUID                 domain_uuid;
-               nbt_string           forest;
-               nbt_string           dns_domain;
-               nbt_string           pdc_dns_name;
-               nbt_string           domain;
-               nbt_string           pdc_name;
-               nbt_string           user_name;
-               nbt_string           server_site;
-               nbt_string           client_site;
-
-               /* Optional on NETLOGON_NT_VERSION_5EX_WITH_IP */
-                [value(ndr_size_nbt_sockaddr(&sockaddr, ndr->flags))] uint8 sockaddr_size; 
-                [subcontext(0),subcontext_size(sockaddr_size)] nbt_sockaddr sockaddr;
-               
-               /* Optional on NETLOGON_NT_VERSION_WITH_CLOSEST_SITE */
-                nbt_string           next_closest_site;
-
-               netlogon_nt_version_flags               nt_version;
-               uint16               lmnt_token;
-               uint16               lm20_token;
-       } NETLOGON_SAM_LOGON_RESPONSE_EX;
-
-       /* query for pdc request */
-       typedef struct {
-               astring              computer_name;
-               astring              mailslot_name;
-               [flag(NDR_ALIGN2)]   DATA_BLOB _pad;
-               nstring              unicode_name;
-               netlogon_nt_version_flags               nt_version;
-               uint16               lmnt_token;
-               uint16               lm20_token;
-       } nbt_netlogon_query_for_pdc;
-
-       /* response from pdc */
-       typedef [flag(NDR_NOALIGN),public] struct {
-               netlogon_command command;
-               astring pdc_name;
-               [flag(NDR_ALIGN2)]   DATA_BLOB _pad;
-               nstring              unicode_pdc_name;
-               nstring              domain_name;
-               netlogon_nt_version_flags               nt_version;
-               uint16               lmnt_token;
-               uint16               lm20_token;
-       } nbt_netlogon_response_from_pdc;
-
-       typedef enum netr_SamDatabaseID netr_SamDatabaseID;
-
-       /* used to announce SAM changes - MS-NRPC 2.2.1.5.1 */
-       typedef struct {
-               netr_SamDatabaseID   db_index;
-               hyper                serial;
-               NTTIME               timestamp;
-       } nbt_db_change_info;
-
-       typedef struct {
-               uint32           serial_lo;
-               time_t           timestamp;
-               uint32           pulse;
-               uint32           random;
-               astring          pdc_name;
-               astring          domain;
-               [flag(NDR_ALIGN2)] DATA_BLOB _pad;
-               nstring          unicode_pdc_name;
-               nstring          unicode_domain;
-               uint32           db_count;
-               nbt_db_change_info    dbchange[db_count];
-               [value(ndr_size_dom_sid0(&sid, ndr->flags))] uint32 sid_size;
-               [subcontext(0),subcontext_size(sid_size)] dom_sid0 sid;
-               uint32           message_format_version;
-               uint32           message_token;
-       } NETLOGON_DB_CHANGE;
-
-       typedef [nodiscriminant] union {
-               [case(LOGON_SAM_LOGON_REQUEST)]       NETLOGON_SAM_LOGON_REQUEST logon;
-               [case(LOGON_PRIMARY_QUERY)] nbt_netlogon_query_for_pdc pdc;
-               [case(NETLOGON_ANNOUNCE_UAS)] NETLOGON_DB_CHANGE uas;
-       } nbt_netlogon_request;
-
-#if 0
-               [case(NETLOGON_RESPONSE_FROM_PDC)] nbt_netlogon_response_from_pdc response;
-               [case(NETLOGON_RESPONSE_FROM_PDC_USER)] nbt_netlogon_response_from_pdc2 response2;
-
-               [case(LOGON_SAM_LOGON_PAUSE_RESPONSE)] NETLOGON_SAM_LOGON_RESPONSE reply;
-               [case(LOGON_SAM_LOGON_RESPONSE)] NETLOGON_SAM_LOGON_RESPONSE reply;
-               [case(LOGON_SAM_LOGON_USER_UNKNOWN)] NETLOGON_SAM_LOGON_RESPONSE reply;
-               [case(LOGON_SAM_LOGON_RESPONSE_EX)] NETLOGON_SAM_LOGON_RESPONSE_EX reply_ex;
-               [case(LOGON_SAM_LOGON_PAUSE_RESPONSE_EX)] NETLOGON_SAM_LOGON_RESPONSE_EX reply_ex;
-               [case(LOGON_SAM_LOGON_USER_UNKNOWN_EX)] NETLOGON_SAM_LOGON_RESPONSE_EX reply_ex;
-#endif
-
-       typedef [flag(NDR_NOALIGN),public] struct {
-               netlogon_command command;
-               [switch_is(command)] nbt_netlogon_request req;
-       } nbt_netlogon_packet;
-
-       /********************************************************/
-       /* \MAILSLOT\BROWSE mailslot requests                   */
-       /* for details see http://ubiqx.org/cifs/Browsing.html  */
-       /********************************************************/
-       typedef bitmap svcctl_ServerType svcctl_ServerType;
-
-       typedef [enum8bit] enum { 
-               HostAnnouncement        = 1,
-               AnnouncementRequest     = 2,
-               Election                = 8,
-               GetBackupListReq        = 9,
-               GetBackupListResp       = 10,
-               BecomeBackup            = 11,
-               DomainAnnouncement      = 12,
-               MasterAnnouncement      = 13,
-               ResetBrowserState       = 14,
-               LocalMasterAnnouncement = 15
-       } nbt_browse_opcode;
-
-       typedef struct {
-               uint8 UpdateCount;
-               uint32 Periodicity;
-               [charset(DOS)] uint8 ServerName[16];
-               uint8 OSMajor;
-               uint8 OSMinor;
-               svcctl_ServerType ServerType;
-               uint8 BroMajorVer;
-               uint8 BroMinorVer;
-               uint16 Signature;
-               astring Comment;
-       } nbt_browse_host_announcement;
-
-       typedef struct {
-               uint8 Unused;
-               astring ResponseName; 
-       } nbt_browse_announcement_request;
-
-       typedef struct {
-               uint8 Version;
-               uint32 Criteria;
-               uint32 UpTime; /* In milliseconds */
-               uint32 Reserved; /* Must be zero */
-               astring ServerName; 
-       } nbt_browse_election_request;
-
-       typedef struct {
-               uint8 ReqCount;
-               uint32 Token;
-       } nbt_browse_backup_list_request;
-
-       typedef struct {
-               uint8 BackupCount;
-               uint32 Token;
-               nbt_name BackupServerList[BackupCount];/* TODO: this is wrong */
-       } nbt_browse_backup_list_response;
-
-       typedef struct {
-               astring BrowserName;
-       } nbt_browse_become_backup;
-
-       typedef struct {
-               uint8 UpdateCount;
-               uint32 Periodicity;
-               [charset(DOS)] uint8 ServerName[16];
-               uint8 OSMajor;
-               uint8 OSMinor;
-               svcctl_ServerType ServerType;
-               uint32 MysteriousField;
-               astring Comment;
-       } nbt_browse_domain_announcement;
-
-       typedef struct {
-               astring ServerName;
-       } nbt_browse_master_announcement;
-
-       typedef struct {
-               uint8 Command;
-       } nbt_browse_reset_state;
-
-       typedef struct {
-               uint8 UpdateCount;
-               uint32 Periodicity;
-               [charset(DOS)] uint8 ServerName[16];
-               uint8 OSMajor;
-               uint8 OSMinor;
-               svcctl_ServerType ServerType;
-               uint8 BroMajorVer;
-               uint8 BroMinorVer;
-               uint16 Signature;
-               astring Comment;
-       } nbt_browse_local_master_announcement;
-
-       typedef [nodiscriminant] union {
-               [case(HostAnnouncement)] nbt_browse_host_announcement host_annoucement;
-               [case(AnnouncementRequest)] nbt_browse_announcement_request announcement_request;
-               [case(Election)] nbt_browse_election_request election_request;
-               [case(GetBackupListReq)] nbt_browse_backup_list_request backup_list_request;
-               [case(GetBackupListResp)] nbt_browse_backup_list_response backup_list_response;
-               [case(BecomeBackup)] nbt_browse_become_backup become_backup;
-               [case(DomainAnnouncement)] nbt_browse_domain_announcement domain_announcement;
-               [case(MasterAnnouncement)] nbt_browse_master_announcement master_announcement;
-               [case(ResetBrowserState)] nbt_browse_reset_state reset_browser_state;
-               [case(LocalMasterAnnouncement)] nbt_browse_local_master_announcement local_master_announcement;
-       } nbt_browse_payload;
-
-       typedef [public,flag(NDR_NOALIGN)] struct {
-               nbt_browse_opcode opcode;
-               [switch_is(opcode)] nbt_browse_payload payload; 
-       } nbt_browse_packet;
-}
index 22e90878e7279b9a1b2e7742898356e04390f850..d78c507c15dc376fe3a0a04cdbe30b12b105eff4 100644 (file)
@@ -46,7 +46,7 @@ interface netlogon
                [in,unique] [string,charset(UTF16)] uint16 *server_name,
                [in]   [string,charset(UTF16)] uint16 account_name[],
                [in]   [string,charset(UTF16)] uint16 workstation[],
-               [out,unique] netr_UasInfo *info
+               [out,ref]  netr_UasInfo *info
                );
 
 
@@ -62,7 +62,7 @@ interface netlogon
                [in,unique] [string,charset(UTF16)] uint16 *server_name,
                [in] [string,charset(UTF16)] uint16 account_name[],
                [in] [string,charset(UTF16)] uint16 workstation[],
-               [out] netr_UasLogoffInfo info
+               [out,ref] netr_UasLogoffInfo *info
                );
 
 
@@ -80,12 +80,24 @@ interface netlogon
           but it doesn't look as though this structure is reflected at the
           NDR level. Maybe it is left to the application to decode the bindata array.
        */
-       typedef struct {
-               uint16 size;
-               uint16 length;
-               [size_is(size/2),length_is(length/2)] uint16 *bindata;
+       typedef [public] struct {
+               dlong lockout_duration;
+               udlong reset_count;
+               uint32 bad_attempt_lockout;
+               uint32 dummy;
        } netr_AcctLockStr;
 
+       /* - MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT
+        *   sets the NETLOGON_SERVER_TRUST_ACCOUNT user_flag
+        * - MSV1_0_UPDATE_LOGON_STATISTICS
+        *   sets the logon time on network logon
+        * - MSV1_0_RETURN_USER_PARAMETERS
+        *   sets the user parameters in the driveletter
+        * - MSV1_0_RETURN_PROFILE_PATH
+        *   returns the profilepath in the driveletter and
+        *   sets LOGON_PROFILE_PATH_RETURNED user_flag
+        */
+
        typedef [public,bitmap32bit] bitmap {
                MSV1_0_CLEARTEXT_PASSWORD_ALLOWED       = 0x00000002,
                MSV1_0_UPDATE_LOGON_STATISTICS          = 0x00000004,
@@ -143,11 +155,11 @@ interface netlogon
        typedef [public,switch_type(netr_LogonInfoClass)] union {
                [case(NetlogonInteractiveInformation)]           netr_PasswordInfo *password;
                [case(NetlogonNetworkInformation)]               netr_NetworkInfo  *network;
-               [case(NetlogonServiceInformation)]               netr_PasswordInfo *password;
-               [case(NetlogonGenericInformation)]               netr_GenericInfo  *generic;
+               [case(NetlogonServiceInformation)]               netr_PasswordInfo *password;
+               [case(NetlogonGenericInformation)]               netr_GenericInfo  *generic;
                [case(NetlogonInteractiveTransitiveInformation)] netr_PasswordInfo *password;
                [case(NetlogonNetworkTransitiveInformation)]     netr_NetworkInfo  *network;
-               [case(NetlogonServiceTransitiveInformation)]     netr_PasswordInfo *password;
+               [case(NetlogonServiceTransitiveInformation)]     netr_PasswordInfo *password;
        } netr_LogonLevel;
 
        typedef [public,flag(NDR_PAHEX)] struct {
@@ -160,16 +172,17 @@ interface netlogon
 
        /* Flags for user_flags below */
        typedef [public,bitmap32bit] bitmap {
-               NETLOGON_GUEST                  = 0x0001,
-               NETLOGON_NOENCRYPTION           = 0x0002,
-               NETLOGON_CACHED_ACCOUNT         = 0x0004,
-               NETLOGON_USED_LM_PASSWORD       = 0x0008,
-               NETLOGON_EXTRA_SIDS             = 0x0020,
-               NETLOGON_SUBAUTH_SESSION_KEY    = 0x0040,
-               NETLOGON_SERVER_TRUST_ACCOUNT   = 0x0080,
-               NETLOGON_NTLMV2_ENABLED         = 0x0100,
-               NETLOGON_RESOURCE_GROUPS        = 0x0200,
-               NETLOGON_PROFILE_PATH_RETURNED  = 0x0400
+               NETLOGON_GUEST                  = 0x00000001,
+               NETLOGON_NOENCRYPTION           = 0x00000002,
+               NETLOGON_CACHED_ACCOUNT         = 0x00000004,
+               NETLOGON_USED_LM_PASSWORD       = 0x00000008,
+               NETLOGON_EXTRA_SIDS             = 0x00000020,
+               NETLOGON_SUBAUTH_SESSION_KEY    = 0x00000040,
+               NETLOGON_SERVER_TRUST_ACCOUNT   = 0x00000080,
+               NETLOGON_NTLMV2_ENABLED         = 0x00000100,
+               NETLOGON_RESOURCE_GROUPS        = 0x00000200,
+               NETLOGON_PROFILE_PATH_RETURNED  = 0x00000400,
+               NETLOGON_GRACE_LOGON            = 0x01000000
        } netr_UserFlags;
 
        typedef struct {
@@ -291,7 +304,7 @@ interface netlogon
                [in,unique] [string,charset(UTF16)] uint16 *computer_name,
                [in,unique] netr_Authenticator *credential,
                [in,out,unique] netr_Authenticator *return_authenticator,
-               [in] uint16 logon_level,
+               [in] netr_LogonInfoClass logon_level,
                [in] [switch_is(logon_level)] netr_LogonLevel logon
                );
        
@@ -446,7 +459,7 @@ interface netlogon
                NTTIME domain_create_time;
                uint32 SecurityInformation;
                sec_desc_buf sdbuf;
-               netr_AcctLockStr account_lockout;
+               lsa_BinaryString account_lockout;
                lsa_String unknown2;
                lsa_String unknown3;
                lsa_String unknown4;
@@ -797,20 +810,26 @@ interface netlogon
        /*****************/
        /* Function 0x0C */
 
+       typedef [bitmap32bit] bitmap {
+               NETLOGON_CTRL_REPL_NEEDED       = 0x0001,
+               NETLOGON_CTRL_REPL_IN_PROGRESS  = 0x0002,
+               NETLOGON_CTRL_REPL_FULL_SYNC    = 0x0004
+       } netr_InfoFlags;
+
        typedef struct {
-               uint32 flags;
+               netr_InfoFlags flags;
                uint32 pdc_connection_status;
        } netr_NETLOGON_INFO_1;
 
        typedef struct {
-               uint32 flags;
+               netr_InfoFlags flags;
                uint32 pdc_connection_status;
                [string,charset(UTF16)] uint16 trusted_dc_name[];
                uint32 tc_connection_status;
        } netr_NETLOGON_INFO_2;
 
        typedef struct {
-               uint32 flags;
+               netr_InfoFlags flags;
                uint32 logon_attempts;
                uint32 unknown1;
                uint32 unknown2;
@@ -864,19 +883,16 @@ interface netlogon
 
        WERROR netr_LogonControl2(
                [in,unique] [string,charset(UTF16)] uint16 *logon_server,
-               [in]    uint32 function_code,
+               [in]    netr_LogonControlCode function_code,
                [in]    uint32 level,
                [in][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION  data,
                [out][switch_is(level)]        netr_CONTROL_QUERY_INFORMATION query
                );
 
 
-       /* If this flag is not set, then the passwords and LM session keys are
-        * encrypted with DES calls.  (And the user session key is
-        * unencrypted) */ 
-       const int NETLOGON_NEG_ARCFOUR  = 0x00000004;
-       const int NETLOGON_NEG_128BIT   = 0x00004000;
-       const int NETLOGON_NEG_SCHANNEL = 0x40000000;
+       /* If NETLOGON_NEG_ARCFOUR flag is not set, then the passwords and LM
+        * session keys are encrypted with DES calls.  (And the user session key
+        * is unencrypted) */
 
        /*****************/
        /* Function 0x0F */
@@ -907,14 +923,14 @@ interface netlogon
                NETLOGON_NEG_AUTHENTICATED_RPC_LSASS    = 0x20000000,
                NETLOGON_NEG_SCHANNEL                   = 0x40000000 /* AUTHENTICATED_RPC */
        } netr_NegotiateFlags;
+
        NTSTATUS netr_ServerAuthenticate2(
                [in,unique]  [string,charset(UTF16)] uint16 *server_name,
                [in]         [string,charset(UTF16)] uint16 account_name[],
                [in]         netr_SchannelType secure_channel_type,
                [in]         [string,charset(UTF16)] uint16 computer_name[],
                [in,out,ref] netr_Credential *credentials,
-               [in,out,ref] uint32 *negotiate_flags
+               [in,out,ref] netr_NegotiateFlags *negotiate_flags
                );
 
 
@@ -976,8 +992,25 @@ interface netlogon
        /*****************/
        /* Function 0x14 */
 
-       /* two unkown bits still: DS_IP_VERSION_AGNOSTIC and
-        * DS_TRY_NEXTCLOSEST_SITE - Guenther */
+       /* one unkown bit still: DS_IP_VERSION_AGNOSTIC - gd*/
+
+       const int DSGETDC_VALID_FLAGS = (DS_FORCE_REDISCOVERY |
+                                        DS_DIRECTORY_SERVICE_REQUIRED |
+                                        DS_DIRECTORY_SERVICE_PREFERRED |
+                                        DS_GC_SERVER_REQUIRED |
+                                        DS_PDC_REQUIRED |
+                                        DS_BACKGROUND_ONLY |
+                                        DS_IP_REQUIRED |
+                                        DS_KDC_REQUIRED |
+                                        DS_TIMESERV_REQUIRED |
+                                        DS_WRITABLE_REQUIRED |
+                                        DS_GOOD_TIMESERV_PREFERRED |
+                                        DS_AVOID_SELF |
+                                        DS_ONLY_LDAP_NEEDED |
+                                        DS_IS_FLAT_NAME |
+                                        DS_IS_DNS_NAME |
+                                        DS_RETURN_FLAT_NAME |
+                                        DS_RETURN_DNS_NAME);
 
        typedef [bitmap32bit] bitmap {
                DS_FORCE_REDISCOVERY            = 0x00000001,
@@ -1007,19 +1040,21 @@ interface netlogon
        } netr_DsRGetDCNameInfo_AddressType;
 
        typedef [bitmap32bit] bitmap {
-               DS_SERVER_PDC            = NBT_SERVER_PDC,
-               DS_SERVER_GC             = NBT_SERVER_GC,
-               DS_SERVER_LDAP           = NBT_SERVER_LDAP,
-               DS_SERVER_DS             = NBT_SERVER_DS,
-               DS_SERVER_KDC            = NBT_SERVER_KDC,
-               DS_SERVER_TIMESERV       = NBT_SERVER_TIMESERV,
-               DS_SERVER_CLOSEST        = NBT_SERVER_CLOSEST,
-               DS_SERVER_WRITABLE       = NBT_SERVER_WRITABLE,
-               DS_SERVER_GOOD_TIMESERV  = NBT_SERVER_GOOD_TIMESERV,
-               DS_SERVER_NDNC           = 0x00000400,
-               DS_DNS_CONTROLLER        = 0x20000000,
-               DS_DNS_DOMAIN            = 0x40000000,
-               DS_DNS_FOREST            = 0x80000000
+               DS_SERVER_PDC                    = NBT_SERVER_PDC,
+               DS_SERVER_GC                     = NBT_SERVER_GC,
+               DS_SERVER_LDAP                   = NBT_SERVER_LDAP,
+               DS_SERVER_DS                     = NBT_SERVER_DS,
+               DS_SERVER_KDC                    = NBT_SERVER_KDC,
+               DS_SERVER_TIMESERV               = NBT_SERVER_TIMESERV,
+               DS_SERVER_CLOSEST                = NBT_SERVER_CLOSEST,
+               DS_SERVER_WRITABLE               = NBT_SERVER_WRITABLE,
+               DS_SERVER_GOOD_TIMESERV          = NBT_SERVER_GOOD_TIMESERV,
+               DS_SERVER_NDNC                   = NBT_SERVER_NDNC,
+               DS_SERVER_SELECT_SECRET_DOMAIN_6 = NBT_SERVER_SELECT_SECRET_DOMAIN_6,
+               DS_SERVER_FULL_SECRET_DOMAIN_6   = NBT_SERVER_FULL_SECRET_DOMAIN_6,
+               DS_DNS_CONTROLLER                = 0x20000000,
+               DS_DNS_DOMAIN                    = 0x40000000,
+               DS_DNS_FOREST                    = 0x80000000
        } netr_DsR_DcFlags;
 
        typedef struct {
@@ -1070,12 +1105,12 @@ interface netlogon
        /****************/
        /* Function 0x1a */
        [public] NTSTATUS netr_ServerAuthenticate3(
-               [in,unique]         [string,charset(UTF16)] uint16 *server_name,
+               [in,unique]  [string,charset(UTF16)] uint16 *server_name,
                [in]         [string,charset(UTF16)] uint16 account_name[],
                [in]         netr_SchannelType secure_channel_type,
                [in]         [string,charset(UTF16)] uint16 computer_name[],
                [in,out,ref] netr_Credential *credentials,
-               [in,out,ref] uint32 *negotiate_flags,
+               [in,out,ref] netr_NegotiateFlags *negotiate_flags,
                [out,ref]    uint32 *rid
                );
 
@@ -1347,7 +1382,7 @@ interface netlogon
        NTSTATUS netr_LogonSamLogonEx(
                [in,unique] [string,charset(UTF16)] uint16 *server_name,
                [in,unique] [string,charset(UTF16)] uint16 *computer_name,
-               [in]  uint16 logon_level,
+               [in]  netr_LogonInfoClass logon_level,
                [in]  [switch_is(logon_level)] netr_LogonLevel logon,
                [in]  uint16 validation_level,
                [out] [switch_is(validation_level)] netr_Validation validation,
@@ -1379,7 +1414,7 @@ interface netlogon
        /****************/
        /* Function 0x2a */
        NTSTATUS netr_ServerTrustPasswordsGet(
-               [in,unique]  [string,charset(UTF16)] uint16 *server_name,
+               [in,unique] [string,charset(UTF16)] uint16 *server_name,
                [in]  [string,charset(UTF16)] uint16 account_name[],
                [in]  netr_SchannelType secure_channel_type,
                [in]  [string,charset(UTF16)] uint16 computer_name[],
@@ -1421,7 +1456,7 @@ interface netlogon
                [in,unique] [string,charset(UTF16)] uint16 *computer_name,
                [in,unique] netr_Authenticator *credential,
                [in,out,unique] netr_Authenticator *return_authenticator,
-               [in]  uint16 logon_level,
+               [in]  netr_LogonInfoClass logon_level,
                [in]  [switch_is(logon_level)] netr_LogonLevel logon,
                [in]  uint16 validation_level,
                [out] [switch_is(validation_level)] netr_Validation validation,
diff --git a/source4/librpc/idl/notify.idl b/source4/librpc/idl/notify.idl
deleted file mode 100644 (file)
index 6f9ad25..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#include "idl_types.h"
-
-/*
-   IDL structures for notify change code
-
-   this defines the structures used in the notify database code, and
-   the change notify buffers
-*/
-
-import "misc.idl";
-
-[
-  pointer_default(unique)
-]
-interface notify
-{
-
-       /* structure used in the notify database */
-       typedef [public] struct {
-               server_id server;
-               uint32 filter; /* filter to apply in this directory */
-               uint32 subdir_filter; /* filter to apply in child directories */
-               utf8string path;
-               uint32 path_len; /* saves some computation on search */
-               pointer private_data;
-       } notify_entry;
-
-       /*
-         to allow for efficient search for matching entries, we
-         divide them by the directory depth, with a separate array
-         per depth. The entries within each depth are sorted by path,
-         allowing for a bisection search.
-
-         The max_mask and max_mask_subdir at each depth is the
-         bitwise or of the filters and subdir filters for all entries
-         at that depth. This allows a depth to be quickly skipped if
-         no entries will match the target filter         
-       */
-       typedef struct {
-               uint32 max_mask;
-               uint32 max_mask_subdir;
-               uint32 num_entries;
-               notify_entry entries[num_entries];
-       } notify_depth;
-
-       typedef [public] struct {
-               uint32 num_depths;
-               notify_depth depth[num_depths];
-       } notify_array;
-
-       /* structure sent between servers in notify messages */
-       typedef [public] struct {
-               uint32 action;
-               utf8string path;
-               pointer private_data;
-       } notify_event;
-
-}
diff --git a/source4/librpc/idl/ntsvcs.idl b/source4/librpc/idl/ntsvcs.idl
deleted file mode 100644 (file)
index 9c7bdae..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
-  plug and play services
-*/
-
-[
-  uuid("8d9f4e40-a03d-11ce-8f69-08003e30051b"),
-  version(1.0),
-  helpstring("Plug and Play services")
-]
-interface ntsvcs
-{
-       [todo] void PNP_Disconnect();
-       [todo] void PNP_Connect();
-       [todo] void PNP_GetVersion();
-       [todo] void PNP_GetGlobalState();
-       [todo] void PNP_InitDetection();
-       [todo] void PNP_ReportLogOn();
-       [todo] void PNP_ValidateDeviceInstance();
-       [todo] void PNP_GetRootDeviceInstance();
-       [todo] void PNP_GetRelatedDeviceInstance();
-       [todo] void PNP_EnumerateSubKeys();
-       [todo] void PNP_GetDeviceList();
-       /******************/
-       /* Function: 0x0b */
-
-       WERROR PNP_GetDeviceListSize(
-               [in,unique] [string,charset(UTF16)] uint16 *devicename,
-               [out,ref] uint32 *size,
-               [in] uint32 flags
-               );
-
-       [todo] void PNP_GetDepth();
-       /******************/
-       /* Function: 0x0d */
-
-       const int DEV_REGPROP_DESC = 1;
-
-       WERROR PNP_GetDeviceRegProp(
-               [in,ref] [string,charset(UTF16)] uint16 *devicepath,
-               [in] uint32 property,
-               [in,out,ref] uint32 *unknown1,
-               [out,ref] [size_is(*buffer_size)] [length_is(*buffer_size)] uint8 *buffer,
-               [in,out,ref] uint32 *buffer_size,
-               [in,out,ref] uint32 *needed,
-               [in] uint32 unknown3
-               );
-
-       [todo] void PNP_SetDeviceRegProp();
-       [todo] void PNP_GetClassInstance();
-       [todo] void PNP_CreateKey();
-       [todo] void PNP_DeleteRegistryKey();
-       [todo] void PNP_GetClassCount();
-       [todo] void PNP_GetClassName();
-       [todo] void PNP_DeleteClassKey();
-       [todo] void PNP_GetInterfaceDeviceAlias();
-       [todo] void PNP_GetInterfaceDeviceList();
-       [todo] void PNP_GetInterfaceDeviceListSize();
-       [todo] void PNP_RegisterDeviceClassAssociation();
-       [todo] void PNP_UnregisterDeviceClassAssociation();
-       [todo] void PNP_GetClassRegProp();
-       [todo] void PNP_SetClassRegProp();
-       [todo] void PNP_CreateDevInst();
-       [todo] void PNP_DeviceInstanceAction();
-       [todo] void PNP_GetDeviceStatus();
-       [todo] void PNP_SetDeviceProblem();
-       [todo] void PNP_DisableDevInst();
-       [todo] void PNP_UninstallDevInst();
-       [todo] void PNP_AddID();
-       [todo] void PNP_RegisterDriver();
-       [todo] void PNP_QueryRemove();
-       [todo] void PNP_RequestDeviceEject();
-       [todo] void PNP_IsDockStationPresent();
-       [todo] void PNP_RequestEjectPC();
-       /******************/
-       /* Function: 0x28 */
-
-       WERROR PNP_HwProfFlags(
-               [in] uint32 unknown1,
-               [in,ref] [string,charset(UTF16)] uint16 *devicepath,
-               [in] uint32 unknown2,
-               [in,out,ref] uint32 *unknown3,
-               [in,out,unique] uint16 *unknown4,
-               [in,unique] [string,charset(UTF16)] uint16 *unknown5,
-               [out,unique] [string,charset(UTF16)] uint16 **unknown5a,
-               [in] uint32 unknown6,
-               [in] uint32 unknown7
-               );
-
-       /******************/
-       /* Function: 0x29 */
-
-       typedef struct {
-               uint32 unknown1;
-               uint16 unknown2[160];
-               uint32 unknown3;
-       } PNP_HwProfInfo;
-
-       WERROR PNP_GetHwProfInfo(
-               [in] uint32 idx,
-               [in,out,ref] PNP_HwProfInfo *info,
-               [in] uint32 unknown1,
-               [in] uint32 unknown2
-               );
-
-       [todo] void PNP_AddEmptyLogConf();
-       [todo] void PNP_FreeLogConf();
-       [todo] void PNP_GetFirstLogConf();
-       [todo] void PNP_GetNextLogConf();
-       [todo] void PNP_GetLogConfPriority();
-       [todo] void PNP_AddResDes();
-       [todo] void PNP_FreeResDes();
-       [todo] void PNP_GetNextResDes();
-       [todo] void PNP_GetResDesData();
-       [todo] void PNP_GetResDesDataSize();
-       [todo] void PNP_ModifyResDes();
-       [todo] void PNP_DetectResourceLimit();
-       [todo] void PNP_QueryResConfList();
-       [todo] void PNP_SetHwProf();
-       [todo] void PNP_QueryArbitratorFreeData();
-       [todo] void PNP_QueryArbitratorFreeSize();
-       [todo] void PNP_RunDetection();
-       [todo] void PNP_RegisterNotification();
-       [todo] void PNP_UnregisterNotification();
-       [todo] void PNP_GetCustomDevProp();
-       [todo] void PNP_GetVersionInternal();
-       [todo] void PNP_GetBlockedDriverInfo();
-       [todo] void PNP_GetServerSideDeviceInstallFlags();
-}
index cdbaa6cb1b51e5d69d2c3525be8814bf7ccfb177..265cfaf7ad16548c3b19d06af8500803cc2a396e 100644 (file)
@@ -7,7 +7,7 @@
    ntvfs/common/opendb.c
 */
 
-import "misc.idl";
+import "security.idl";
 
 [
   pointer_default(unique)
index b6cce3819604b674577280148853a621aa33c7e2..47882dfb8424d33d70700596b43b4002a56e61a1 100644 (file)
@@ -730,6 +730,17 @@ import "misc.idl", "lsa.idl", "security.idl";
                NTTIME acct_expiry;
        } samr_UserInfo17;
 
+       typedef [public, flag(NDR_PAHEX)] struct {
+               uint8 hash[16];
+       } samr_Password;
+
+       typedef struct {
+               samr_Password lm_pwd;
+               samr_Password nt_pwd;
+               boolean8 lm_pwd_active;
+               boolean8 nt_pwd_active;
+       } samr_UserInfo18;
+
        typedef struct {
                lsa_String parameters;
        } samr_UserInfo20;
@@ -768,6 +779,10 @@ import "misc.idl", "lsa.idl", "security.idl";
                SAMR_FIELD_OWF_PWD          = 0x20000000
        } samr_FieldsPresent;
 
+       /* used for 'password_expired' in samr_UserInfo21 */
+       const int PASS_MUST_CHANGE_AT_NEXT_LOGON = 0x01;
+       const int PASS_DONT_CHANGE_AT_NEXT_LOGON = 0x00;
+
        typedef struct {
                NTTIME last_logon;
                NTTIME last_logoff;
@@ -850,6 +865,7 @@ import "misc.idl", "lsa.idl", "security.idl";
                [case(14)] samr_UserInfo14 info14;
                [case(16)] samr_UserInfo16 info16;
                [case(17)] samr_UserInfo17 info17;
+               [case(18)] samr_UserInfo18 info18;
                [case(20)] samr_UserInfo20 info20;
                [case(21)] samr_UserInfo21 info21;
                [case(23)] samr_UserInfo23 info23;
@@ -875,10 +891,6 @@ import "misc.idl", "lsa.idl", "security.idl";
 
        /************************/
        /* Function    0x26     */
-       typedef [public, flag(NDR_PAHEX)] struct {
-               uint8 hash[16];
-       } samr_Password;
-
        /*
          this is a password change interface that doesn't give
          the server the plaintext password. Depricated.
@@ -1229,9 +1241,16 @@ import "misc.idl", "lsa.idl", "security.idl";
 
        /************************/
        /* Function    0x3e     */
+
+       typedef enum {
+               SAMR_CONNECT_PRE_W2K    = 1,
+               SAMR_CONNECT_W2K        = 2,
+               SAMR_CONNECT_AFTER_W2K  = 3
+       } samr_ConnectVersion;
+
        NTSTATUS samr_Connect4(
                [in,unique,string,charset(UTF16)] uint16 *system_name,
-               [in] uint32 unknown,
+               [in] samr_ConnectVersion client_version,
                [in] samr_ConnectAccessMask access_mask,
                [out,ref]  policy_handle *connect_handle
                );
@@ -1264,7 +1283,7 @@ import "misc.idl", "lsa.idl", "security.idl";
        /* Function    0x40      */
 
        typedef struct {
-               uint32         unknown1; /* w2k3 gives 3 */
+               samr_ConnectVersion client_version; /* w2k3 gives 3 */
                uint32         unknown2; /* w2k3 gives 0 */
        } samr_ConnectInfo1;
 
index ac7641c0afcbe18d83e9a7a15631cf66335a263e..40aa698176684266168715c955c909b1c2102e0b 100644 (file)
@@ -252,6 +252,13 @@ interface security
                uint32 sub_auths[num_auths];
        } dom_sid;
 
+       /* id used to identify a endpoint, possibly in a cluster */
+       typedef [public] struct {
+               hyper id;
+               uint32 id2;
+               uint32 node;
+       } server_id;
+
        typedef [bitmap8bit] bitmap {
                SEC_ACE_FLAG_OBJECT_INHERIT             = 0x01,
                SEC_ACE_FLAG_CONTAINER_INHERIT          = 0x02,
diff --git a/source4/librpc/idl/spoolss.idl b/source4/librpc/idl/spoolss.idl
deleted file mode 100644 (file)
index 6b4b0b8..0000000
+++ /dev/null
@@ -1,1571 +0,0 @@
-#include "idl_types.h"
-
-/*
-  spoolss interface definitions
-*/
-import "misc.idl", "security.idl", "winreg.idl";
-
-[ uuid("12345678-1234-abcd-ef00-0123456789ab"),
-  version(1.0),
-  endpoint("ncacn_np:[\\pipe\\spoolss]"),
-  pointer_default(unique),
-  helpstring("Spooler SubSystem"),
-  helper("librpc/ndr/ndr_spoolss_buf.h")
-] interface spoolss
-{
-       typedef [v1_enum] enum winreg_Type winreg_Type;
-       typedef struct {
-               uint16 year;
-               uint16 month;
-               uint16 day_of_week;
-               uint16 day;
-               uint16 hour;
-               uint16 minute;
-               uint16 second;
-               uint16 millisecond;
-       } spoolss_Time;
-
-       typedef struct {
-               [relative] nstring *printername;
-               [relative] nstring *servername;
-               uint32 cjobs;
-               uint32 total_jobs;
-               uint32 total_bytes;
-               spoolss_Time time;              
-               uint32 global_counter;
-               uint32 total_pages;
-               uint32 version;
-               uint32 unknown10;
-               uint32 unknown11;
-               uint32 unknown12;
-               uint32 session_counter;
-               uint32 unknown14;
-               uint32 printer_errors;
-               uint32 unknown16;
-               uint32 unknown17;
-               uint32 unknown18;
-               uint32 unknown19;
-               uint32 change_id;
-               uint32 unknown21;
-               uint32 status;
-               uint32 unknown23;
-               uint32 c_setprinter;
-               uint16 unknown25;
-               uint16 unknown26;
-               uint32 unknown27;
-               uint32 unknown28;
-               uint32 unknown29;
-       } spoolss_PrinterInfo0;
-
-       typedef [public,gensize] struct {
-               [charset(UTF16)] uint16 devicename[32];
-               uint16 specversion;
-               uint16 driverversion;
-               uint16 size;
-               [value(r->driverextra_data.length)] uint16 __driverextra_length;
-               uint32 fields;
-               uint16 orientation;
-               uint16 papersize;
-               uint16 paperlength;
-               uint16 paperwidth;
-               uint16 scale;
-               uint16 copies;
-               uint16 defaultsource;
-               uint16 printquality;
-               uint16 color;
-               uint16 duplex;
-               uint16 yresolution;
-               uint16 ttoption;
-               uint16 collate;
-               [charset(UTF16)] uint16 formname[32];
-               uint16 logpixels;
-               uint32 bitsperpel;
-               uint32 pelswidth;
-               uint32 pelsheight;
-               uint32 displayflags;
-               uint32 displayfrequency;
-               uint32 icmmethod;
-               uint32 icmintent;
-               uint32 mediatype;
-               uint32 dithertype;
-               uint32 reserved1;
-               uint32 reserved2;
-               uint32 panningwidth;
-               uint32 panningheight;
-               [subcontext_size(__driverextra_length),subcontext(0),flag(NDR_REMAINING)] DATA_BLOB driverextra_data;
-       } spoolss_DeviceMode;
-
-       typedef [public] bitmap {
-               PRINTER_ENUM_DEFAULT     = 0x00000001,
-               PRINTER_ENUM_LOCAL       = 0x00000002,
-               PRINTER_ENUM_CONNECTIONS = 0x00000004,
-               PRINTER_ENUM_FAVORITE    = 0x00000004,
-               PRINTER_ENUM_NAME        = 0x00000008,
-               PRINTER_ENUM_REMOTE      = 0x00000010,
-               PRINTER_ENUM_SHARED      = 0x00000020,
-               PRINTER_ENUM_NETWORK     = 0x00000040,
-               PRINTER_ENUM_EXPAND      = 0x00004000,
-               PRINTER_ENUM_CONTAINER   = 0x00008000,
-               PRINTER_ENUM_ICON1       = 0x00010000,
-               PRINTER_ENUM_ICON2       = 0x00020000,
-               PRINTER_ENUM_ICON3       = 0x00040000,
-               PRINTER_ENUM_ICON4       = 0x00080000,
-               PRINTER_ENUM_ICON5       = 0x00100000,
-               PRINTER_ENUM_ICON6       = 0x00200000,
-               PRINTER_ENUM_ICON7       = 0x00400000,
-               PRINTER_ENUM_ICON8       = 0x00800000,
-               PRINTER_ENUM_HIDE        = 0x01000000
-       } spoolss_EnumPrinterFlags;
-
-       typedef struct {
-               spoolss_EnumPrinterFlags flags;
-               [relative] nstring *name;
-               [relative] nstring *description;
-               [relative] nstring *comment;
-       } spoolss_PrinterInfo1;
-
-       typedef bitmap {
-               PRINTER_ATTRIBUTE_QUEUED                = 0x00000001,
-               PRINTER_ATTRIBUTE_DIRECT                = 0x00000002,
-               PRINTER_ATTRIBUTE_DEFAULT               = 0x00000004,
-               PRINTER_ATTRIBUTE_SHARED                = 0x00000008,
-               PRINTER_ATTRIBUTE_NETWORK               = 0x00000010,
-               PRINTER_ATTRIBUTE_HIDDEN                = 0x00000020,
-               PRINTER_ATTRIBUTE_LOCAL                 = 0x00000040,
-               PRINTER_ATTRIBUTE_ENABLE_DEVQ           = 0x00000080,
-               PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS       = 0x00000100,
-               PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST     = 0x00000200,
-               PRINTER_ATTRIBUTE_WORK_OFFLINE          = 0x00000400,
-               PRINTER_ATTRIBUTE_ENABLE_BIDI           = 0x00000800,
-               PRINTER_ATTRIBUTE_RAW_ONLY              = 0x00001000,
-               PRINTER_ATTRIBUTE_PUBLISHED             = 0x00002000,
-               PRINTER_ATTRIBUTE_FAX                   = 0x00004000,
-               PRINTER_ATTRIBUTE_TS                    = 0x00008000
-       } spoolss_PrinterAttributes;
-
-       typedef bitmap {
-               PRINTER_STATUS_PAUSED           = 0x00000001,
-               PRINTER_STATUS_ERROR            = 0x00000002,
-               PRINTER_STATUS_PENDING_DELETION = 0x00000004,
-               PRINTER_STATUS_PAPER_JAM        = 0x00000008,
-               PRINTER_STATUS_PAPER_OUT        = 0x00000010,
-               PRINTER_STATUS_MANUAL_FEED      = 0x00000020,
-               PRINTER_STATUS_PAPER_PROBLEM    = 0x00000040,
-               PRINTER_STATUS_OFFLINE          = 0x00000080,
-               PRINTER_STATUS_IO_ACTIVE        = 0x00000100,
-               PRINTER_STATUS_BUSY             = 0x00000200,
-               PRINTER_STATUS_PRINTING         = 0x00000400,
-               PRINTER_STATUS_OUTPUT_BIN_FULL  = 0x00000800,
-               PRINTER_STATUS_NOT_AVAILABLE    = 0x00001000,
-               PRINTER_STATUS_WAITING          = 0x00002000,
-               PRINTER_STATUS_PROCESSING       = 0x00004000,
-               PRINTER_STATUS_INITIALIZING     = 0x00008000,
-               PRINTER_STATUS_WARMING_UP       = 0x00010000,
-               PRINTER_STATUS_TONER_LOW        = 0x00020000,
-               PRINTER_STATUS_NO_TONER         = 0x00040000,
-               PRINTER_STATUS_PAGE_PUNT        = 0x00080000,
-               PRINTER_STATUS_USER_INTERVENTION= 0x00100000,
-               PRINTER_STATUS_OUT_OF_MEMORY    = 0x00200000,
-               PRINTER_STATUS_DOOR_OPEN        = 0x00400000,
-               PRINTER_STATUS_SERVER_UNKNOWN   = 0x00800000,
-               PRINTER_STATUS_POWER_SAVE       = 0x01000000
-       } spoolss_PrinterStatus;
-
-       typedef struct {
-               [relative] nstring *servername;
-               [relative] nstring *printername;
-               [relative] nstring *sharename;
-               [relative] nstring *portname;
-               [relative] nstring *drivername;
-               [relative] nstring *comment;
-               [relative] nstring *location;
-               [relative,subcontext(0)] spoolss_DeviceMode *devmode;
-               [relative] nstring *sepfile;
-               [relative] nstring *printprocessor;
-               [relative] nstring *datatype;
-               [relative] nstring *parameters;
-               [relative,subcontext(0)] security_descriptor *secdesc;
-               spoolss_PrinterAttributes attributes;
-               uint32 priority;
-               uint32 defaultpriority;
-               uint32 starttime;
-               uint32 untiltime;
-               spoolss_PrinterStatus status;
-               uint32 cjobs;
-               uint32 averageppm;
-       } spoolss_PrinterInfo2;
-
-       typedef struct {
-               [relative,subcontext(0)] security_descriptor *secdesc;
-       } spoolss_PrinterInfo3;
-
-       typedef struct {
-               [relative] nstring *printername;
-               [relative] nstring *servername;
-               spoolss_PrinterAttributes attributes;
-       } spoolss_PrinterInfo4;
-
-       typedef struct {
-               [relative] nstring *printername;
-               [relative] nstring *portname;
-               spoolss_PrinterAttributes attributes;
-               uint32 device_not_selected_timeout;
-               uint32 transmission_retry_timeout;
-       } spoolss_PrinterInfo5;
-
-       typedef struct {
-               spoolss_PrinterStatus status;
-       } spoolss_PrinterInfo6;
-
-       typedef bitmap {
-               DSPRINT_PUBLISH         = 0x00000001,
-               DSPRINT_UPDATE          = 0x00000002,
-               DSPRINT_UNPUBLISH       = 0x00000004,
-               DSPRINT_REPUBLISH       = 0x00000008,
-               DSPRINT_PENDING         = 0x80000000
-       } spoolss_DsPrintAction;
-
-       typedef struct {
-               [relative] nstring *guid; /* text form of printer guid */
-               spoolss_DsPrintAction action;
-       } spoolss_PrinterInfo7;
-
-       typedef struct {
-               [relative,subcontext(0)] spoolss_DeviceMode *devmode;
-       } spoolss_DeviceModeInfo;
-
-       typedef [nodiscriminant,relative_base,public] union {
-               [case(0)] spoolss_PrinterInfo0 info0;
-               [case(1)] spoolss_PrinterInfo1 info1;
-               [case(2)] spoolss_PrinterInfo2 info2;
-               [case(3)] spoolss_PrinterInfo3 info3;
-               [case(4)] spoolss_PrinterInfo4 info4;
-               [case(5)] spoolss_PrinterInfo5 info5;
-               [case(6)] spoolss_PrinterInfo6 info6;
-               [case(7)] spoolss_PrinterInfo7 info7;
-               [case(8)] spoolss_DeviceModeInfo info8;
-               [case(9)] spoolss_DeviceModeInfo info9;
-               [default];
-       } spoolss_PrinterInfo;
-
-       /******************/
-       /* Function: 0x00 */
-       /* we are using this as internal parsing code */
-       [public,noopnum,noprint] WERROR _spoolss_EnumPrinters(
-               [in] spoolss_EnumPrinterFlags flags,
-               [in,unique] [string,charset(UTF16)] uint16 *server,
-               [in] uint32 level,
-               [in,unique] DATA_BLOB *buffer,
-               [in] uint32 offered,
-               [out,unique] DATA_BLOB *info,
-               [out] uint32 needed,
-               [out] uint32 count
-       );
-       [public,noopnum,noprint] void __spoolss_EnumPrinters(
-               [in] uint32 level,
-               [in] uint32 count,
-               [out,switch_is(level)] spoolss_PrinterInfo info[count]
-       );
-       [nopull,nopush] WERROR spoolss_EnumPrinters(
-               [in] spoolss_EnumPrinterFlags flags,
-               [in,unique] [string,charset(UTF16)] uint16 *server,
-               [in] uint32 level,
-               [in,unique] DATA_BLOB *buffer,
-               [in] uint32 offered,
-               /* what we have here is a subcontext containing an array of no discriminant unions
-                * and the array has no size in front
-                */
-               [out,unique,switch_is(level),size_is(count)] spoolss_PrinterInfo *info,
-               [out] uint32 needed,
-               [out] uint32 count
-       );
-
-       /******************/
-       /* Function: 0x01 */
-       typedef struct {
-               [value(_ndr_size_spoolss_DeviceMode(devmode, ndr->flags))] uint32 _ndr_size;
-               [subcontext(4),subcontext_size(_ndr_size)] spoolss_DeviceMode *devmode;
-       } spoolss_DevmodeContainer;
-
-       [public] WERROR spoolss_OpenPrinter(
-               [in,unique] [string,charset(UTF16)] uint16 *printername,
-               [in,unique] [string,charset(UTF16)] uint16 *datatype,
-               [in] spoolss_DevmodeContainer devmode_ctr,
-               [in] uint32 access_mask,
-               [out,ref] policy_handle *handle
-       );
-
-       /******************/
-       /* Function: 0x02 */
-       typedef struct {
-               uint32 job_id;
-               [relative] nstring *printer_name;
-               [relative] nstring *server_name;
-               [relative] nstring *user_name;
-               [relative] nstring *document_name;
-               [relative] nstring *data_type;
-               [relative] nstring *text_status;
-               uint32 status;
-               uint32 priority;
-               uint32 position;
-               uint32 total_pages;
-               uint32 pages_printed;
-               spoolss_Time time;
-       } spoolss_JobInfo1;
-
-       typedef [nodiscriminant,relative_base,public] union {
-               [case(1)] spoolss_JobInfo1 info1;
-               [case(2)]; /* TODO */
-               [case(3)]; /* TODO */
-               [default];
-       } spoolss_JobInfo;
-
-       typedef struct {
-               uint32 level;
-               [switch_is(level)] spoolss_JobInfo info;
-       } spoolss_JobInfoContainer;
-
-       typedef [v1_enum] enum {
-               SPOOLSS_JOB_CONTROL_PAUSE               = 1,
-               SPOOLSS_JOB_CONTROL_RESUME              = 2,
-               SPOOLSS_JOB_CONTROL_CANCEL              = 3,
-               SPOOLSS_JOB_CONTROL_RESTART             = 4,
-               SPOOLSS_JOB_CONTROL_DELETE              = 5,
-               SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER     = 6,
-               SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED   = 7
-       } spoolss_JobControl;
-
-       WERROR spoolss_SetJob(
-               [in,ref] policy_handle *handle,
-               [in] uint32 job_id,
-               [in,unique] spoolss_JobInfoContainer *ctr,
-               [in] spoolss_JobControl command
-       );
-
-       /******************/
-       /* Function: 0x03 */
-       WERROR spoolss_GetJob(
-               [in,ref] policy_handle *handle,
-               [in]     uint32 job_id,
-               [in]     uint32 level,
-               [in,unique] DATA_BLOB *buffer,
-               [in]     uint32 offered,
-               [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_JobInfo *info,
-               [out]    uint32 needed
-       );
-
-       /******************/
-       /* Function: 0x04 */
-       [public,noopnum,noprint] WERROR _spoolss_EnumJobs(
-               [in,ref] policy_handle *handle,
-               [in]     uint32 firstjob,
-               [in]     uint32 numjobs,
-               [in]     uint32 level,
-               [in,unique] DATA_BLOB *buffer,
-               [in]     uint32 offered,
-               [out,unique] DATA_BLOB *info,
-               [out]    uint32 needed,
-               [out]    uint32 count
-       );
-       [public,noopnum,noprint] void __spoolss_EnumJobs(
-               [in] uint32 level,
-               [in] uint32 count,
-               [out,switch_is(level)] spoolss_JobInfo info[count]
-       );
-       [nopull,nopush] WERROR spoolss_EnumJobs(
-               [in,ref] policy_handle *handle,
-               [in]     uint32 firstjob,
-               [in]     uint32 numjobs,
-               [in]     uint32 level,
-               [in,unique] DATA_BLOB *buffer,
-               [in]     uint32 offered,
-               [out,unique,switch_is(level),size_is(count)] spoolss_JobInfo *info,
-               [out]    uint32 needed,
-               [out]    uint32 count
-       );
-
-       /******************/
-       /* Function: 0x05 */
-       [todo] WERROR spoolss_AddPrinter(
-               /* This function is not implemented in Samba 3 as no
-                  clients have been observed using it. */
-       );
-
-       /******************/
-       /* Function: 0x06 */
-       [todo] WERROR spoolss_DeletePrinter(
-       );
-
-       /******************/
-       /* Function: 0x07 */
-       typedef [v1_enum] enum {
-               SPOOLSS_PRINTER_CONTROL_UNPAUSE    = 0,
-               SPOOLSS_PRINTER_CONTROL_PAUSE      = 1,
-               SPOOLSS_PRINTER_CONTROL_RESUME     = 2,
-               SPOOLSS_PRINTER_CONTROL_PURGE      = 3,
-               SPOOLSS_PRINTER_CONTROL_SET_STATUS = 4
-       } spoolss_PrinterControl;
-
-       typedef [switch_type(uint32)] union {
-               [case(0)] spoolss_PrinterInfo0 *info0;
-               [case(1)] spoolss_PrinterInfo1 *info1;
-               [case(2)] spoolss_PrinterInfo2 *info2;
-               [case(3)] spoolss_PrinterInfo3 *info3;
-               [case(4)] spoolss_PrinterInfo4 *info4;
-               [case(5)] spoolss_PrinterInfo5 *info5;
-               [case(6)] spoolss_PrinterInfo6 *info6;
-               [case(7)] spoolss_PrinterInfo7 *info7;
-               [case(8)] spoolss_DeviceModeInfo *info8;
-               [case(9)] spoolss_DeviceModeInfo *info9;
-               [default];
-       } spoolss_SetPrinterInfo;
-
-       WERROR spoolss_SetPrinter(
-               [in,ref] policy_handle *handle,
-               [in] uint32 level,
-               [in,switch_is(level)] spoolss_SetPrinterInfo info,
-               [in] spoolss_DevmodeContainer devmode_ctr,
-               [in] sec_desc_buf secdesc_ctr,
-               [in] spoolss_PrinterControl command
-       );
-
-       /******************/
-       /* Function: 0x08 */
-       [public] WERROR spoolss_GetPrinter(
-               [in,ref] policy_handle *handle,
-               [in]     uint32 level,
-               [in,unique] DATA_BLOB *buffer,
-               [in]     uint32 offered,
-               [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_PrinterInfo *info,
-               [out]    uint32 needed
-       );
-
-       /******************/
-       /* Function: 0x09 */
-       [todo] WERROR spoolss_AddPrinterDriver(
-       );
-
-       typedef struct {
-               [relative] nstring *driver_name;
-       } spoolss_DriverInfo1;
-
-       typedef [v1_enum] enum {
-               SPOOLSS_DRIVER_VERSION_9X       = 0,
-               SPOOLSS_DRIVER_VERSION_NT35     = 1,
-               SPOOLSS_DRIVER_VERSION_NT4      = 2,
-               SPOOLSS_DRIVER_VERSION_200X     = 3
-       } spoolss_DriverOSVersion;
-
-       typedef struct {
-               spoolss_DriverOSVersion version;
-               [relative] nstring *driver_name;
-               [relative] nstring *architecture;
-               [relative] nstring *driver_path;
-               [relative] nstring *data_file;
-               [relative] nstring *config_file;
-       } spoolss_DriverInfo2;
-
-       typedef struct {
-               spoolss_DriverOSVersion version;
-               [relative] nstring *driver_name;
-               [relative] nstring *architecture;
-               [relative] nstring *driver_path;
-               [relative] nstring *data_file;
-               [relative] nstring *config_file;
-               [relative] nstring *help_file;
-               [relative] nstring_array *dependent_files;
-               [relative] nstring *monitor_name;
-               [relative] nstring *default_datatype;
-       } spoolss_DriverInfo3;
-
-       typedef struct {
-               spoolss_DriverOSVersion version;
-               [relative] nstring *driver_name;
-               [relative] nstring *architecture;
-               [relative] nstring *driver_path;
-               [relative] nstring *data_file;
-               [relative] nstring *config_file;
-               [relative] nstring *help_file;
-               [relative] nstring_array *dependent_files;
-               [relative] nstring *monitor_name;
-               [relative] nstring *default_datatype;
-               [relative] nstring_array *previous_names;
-       } spoolss_DriverInfo4;
-
-       typedef struct {
-               spoolss_DriverOSVersion version;
-               [relative] nstring *driver_name;
-               [relative] nstring *architecture;
-               [relative] nstring *driver_path;
-               [relative] nstring *data_file;
-               [relative] nstring *config_file;
-               uint32 driver_attributes;
-               uint32 config_version;
-               uint32 driver_version;
-       } spoolss_DriverInfo5;
-
-       typedef struct {
-               spoolss_DriverOSVersion version;
-               [relative] nstring *driver_name;
-               [relative] nstring *architecture;
-               [relative] nstring *driver_path;
-               [relative] nstring *data_file;
-               [relative] nstring *config_file;
-               [relative] nstring *help_file;
-               [relative] nstring_array *dependent_files;
-               [relative] nstring *monitor_name;
-               [relative] nstring *default_datatype;
-               [relative] nstring_array *previous_names;
-               NTTIME driver_data;
-               hyper driver_version;
-               [relative] nstring *manufacturer_name;
-               [relative] nstring *manufacturer_url;
-               [relative] nstring *hardware_id;
-               [relative] nstring *provider;
-       } spoolss_DriverInfo6;
-
-       typedef [nodiscriminant,relative_base,public] union {
-               [case(1)] spoolss_DriverInfo1 info1;
-               [case(2)] spoolss_DriverInfo2 info2;
-               [case(3)] spoolss_DriverInfo3 info3;
-               [case(4)] spoolss_DriverInfo4 info4;
-               [case(5)] spoolss_DriverInfo5 info5;
-               [case(6)] spoolss_DriverInfo6 info6;
-               [default];
-       } spoolss_DriverInfo;
-
-       /******************/
-       /* Function: 0x0a */
-       [public,noopnum,noprint] WERROR _spoolss_EnumPrinterDrivers(
-               [in,unique] [string,charset(UTF16)] uint16 *server,
-               [in,unique] [string,charset(UTF16)] uint16 *environment,
-               [in] uint32 level,
-               [in,unique] DATA_BLOB *buffer,
-               [in] uint32 offered,
-               [out,unique] DATA_BLOB *info,
-               [out] uint32 needed,
-               [out] uint32 count
-       );
-       [public,noopnum,noprint] void __spoolss_EnumPrinterDrivers(
-               [in] uint32 level,
-               [in] uint32 count,
-               [out,switch_is(level)] spoolss_DriverInfo info[count]
-       );
-       [nopull,nopush] WERROR spoolss_EnumPrinterDrivers(
-               [in,unique] [string,charset(UTF16)] uint16 *server,
-               [in,unique] [string,charset(UTF16)] uint16 *environment,
-               [in] uint32 level,
-               [in,unique] DATA_BLOB *buffer,
-               [in] uint32 offered,
-               [out,unique,switch_is(level),size_is(count)] spoolss_DriverInfo *info,
-               [out] uint32 needed,
-               [out] uint32 count
-       );
-
-       /******************/
-       /* Function: 0x0b */
-       [todo] WERROR spoolss_GetPrinterDriver(
-       );
-
-       /******************/
-       /* Function: 0x0c */
-       typedef struct {
-               nstring directory_name;
-       } spoolss_DriverDirectoryInfo1;
-
-       /* NOTE: it's seems that w2k3 completly ignores the level
-                in its server code
-        */
-       typedef [nodiscriminant,relative_base,gensize,public] union {
-               [case(1)] spoolss_DriverDirectoryInfo1 info1;
-               [default] spoolss_DriverDirectoryInfo1 info1;
-       } spoolss_DriverDirectoryInfo;
-
-       [public] WERROR spoolss_GetPrinterDriverDirectory(
-               [in,unique] [string,charset(UTF16)] uint16 *server,
-               [in,unique] [string,charset(UTF16)] uint16 *environment,
-               [in] uint32 level,
-               [in,unique] DATA_BLOB *buffer,
-               [in] uint32 offered,
-               [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_DriverDirectoryInfo *info,
-               [out] uint32 needed
-       );
-
-       /******************/
-       /* Function: 0x0d */
-       WERROR spoolss_DeletePrinterDriver(
-               [in,ref] policy_handle *handle,
-               [in,unique] [string,charset(UTF16)] uint16 *server,
-               [in] [string,charset(UTF16)] uint16 architecture[],
-               [in] [string,charset(UTF16)] uint16 driver[]
-       );
-
-       /******************/
-       /* Function: 0x0e */
-       [todo] WERROR spoolss_AddPrintProcessor(
-       );
-
-       /******************/
-       /* Function: 0x0f */
-       typedef struct {
-               [relative] nstring *print_processor_name;
-       } spoolss_PrintProcessorInfo1;
-
-       typedef [nodiscriminant,relative_base,public] union {
-               [case(1)] spoolss_PrintProcessorInfo1 info1;
-               [default];
-       } spoolss_PrintProcessorInfo;
-
-       [public,noopnum,noprint] WERROR _spoolss_EnumPrintProcessors(
-               [in,unique] [string,charset(UTF16)] uint16 *servername,
-               [in,unique] [string,charset(UTF16)] uint16 *environment,
-               [in] uint32 level,
-               [in,unique] DATA_BLOB *buffer,
-               [in] uint32 offered,
-               [out,unique] DATA_BLOB *info,
-               [out] uint32 needed,
-               [out] uint32 count
-       );
-       [public,noopnum,noprint] void __spoolss_EnumPrintProcessors(
-               [in] uint32 level,
-               [in] uint32 count,
-               [out,switch_is(level)] spoolss_PrintProcessorInfo info[count]
-       );
-       [nopull,nopush] WERROR spoolss_EnumPrintProcessors(
-               [in,unique] [string,charset(UTF16)] uint16 *servername,
-               [in,unique] [string,charset(UTF16)] uint16 *environment,
-               [in] uint32 level,
-               [in,unique] DATA_BLOB *buffer,
-               [in] uint32 offered,
-               [out,unique,switch_is(level),size_is(count)] spoolss_PrintProcessorInfo *info,
-               [out] uint32 needed,
-               [out] uint32 count
-       );
-
-       /******************/
-       /* Function: 0x10 */
-       [todo] WERROR spoolss_GetPrintProcessorDirectory(
-       );
-
-       /******************/
-       /* Function: 0x11 */
-       typedef struct {
-               [string,charset(UTF16)] uint16 *document_name;
-               [string,charset(UTF16)] uint16 *output_file;
-               [string,charset(UTF16)] uint16 *datatype;
-       } spoolss_DocumentInfo1;
-
-       typedef [switch_type(uint32)] union {
-               [case(1)] spoolss_DocumentInfo1 *info1;
-               [case(2)]; /* TODO */
-               [case(3)]; /* TODO */
-               [default];
-       } spoolss_DocumentInfo;
-
-       WERROR spoolss_StartDocPrinter(
-               [in,ref] policy_handle *handle,
-               [in] uint32 level,
-               [in,switch_is(level)] spoolss_DocumentInfo info,
-               [out] uint32 job_id
-       );
-
-       /******************/
-       /* Function: 0x12 */
-       WERROR spoolss_StartPagePrinter(
-               [in,ref] policy_handle *handle
-       );
-
-       /******************/
-       /* Function: 0x13 */
-       WERROR spoolss_WritePrinter(
-               [in,ref] policy_handle *handle,
-               [in] DATA_BLOB data,
-               [in,value(r->in.data.length)] uint32 _data_size,
-               [out] uint32 num_written
-       );
-
-       /******************/
-       /* Function: 0x14 */
-       WERROR spoolss_EndPagePrinter(
-               [in,ref] policy_handle *handle
-       );
-
-       /******************/
-       /* Function: 0x15 */
-       WERROR spoolss_AbortPrinter(
-               [in,ref] policy_handle *handle
-       );
-
-       /******************/
-       /* Function: 0x16 */
-       WERROR spoolss_ReadPrinter(
-               [in,ref] policy_handle *handle,
-               [in] uint32 data_size,
-               [out] DATA_BLOB data,
-               [out,value(r->out.data.length)] uint32 _data_size
-       );
-
-       /******************/
-       /* Function: 0x17 */
-       WERROR spoolss_EndDocPrinter(
-               [in,ref] policy_handle *handle
-       );
-
-       /******************/
-       /* Function: 0x18 */
-       [todo] WERROR spoolss_AddJob(
-       );
-
-       /******************/
-       /* Function: 0x19 */
-       [todo] WERROR spoolss_ScheduleJob(
-       );
-
-       /******************/
-       /* Function: 0x1a */
-       const string SPOOLSS_ARCHITECTURE_NT_X86                = "Windows NT x86";
-
-       typedef [public,gensize] struct {
-               [value(ndr_size_spoolss_OSVersion(r,ndr->flags))] uint32 _ndr_size;
-               uint32 major;
-               uint32 minor;
-               uint32 build;
-               [value(2)] uint32 unknown;
-               [subcontext(0),subcontext_size(256)] nstring extra_string;
-       } spoolss_OSVersion;
-
-       typedef [public,gensize] struct {
-               [value(ndr_size_spoolss_OSVersionEx(r,ndr->flags))] uint32 _ndr_size;
-               uint32 major;
-               uint32 minor;
-               uint32 build;
-               [value(2)] uint32 unknown1;
-               [subcontext(0),subcontext_size(256)] nstring extra_string;
-               uint32 unknown2;/* service pack number? I saw 0 from w2k3 and 1 from winxp sp1*/
-               uint32 unknown3;/* hmm? w2k3: 131346(0x20112) winxp sp1: 503382272 0x1E010100 */
-       } spoolss_OSVersionEx;
-
-       typedef [v1_enum] enum {
-               SPOOLSS_PRINTER_DATA_TYPE_NULL = 0,
-               SPOOLSS_PRINTER_DATA_TYPE_STRING = 1,
-               SPOOLSS_PRINTER_DATA_TYPE_BINARY = 3,
-               SPOOLSS_PRINTER_DATA_TYPE_UINT32 = 4,
-               SPOOLSS_PRINTER_DATA_TYPE_STRING_ARRAY = 7
-       } spoolss_PrinterDataType;
-
-       typedef [nodiscriminant,public,gensize] union {
-               [case(SPOOLSS_PRINTER_DATA_TYPE_NULL)];
-               [case(SPOOLSS_PRINTER_DATA_TYPE_STRING)] nstring string;
-               [case(SPOOLSS_PRINTER_DATA_TYPE_BINARY),flag(NDR_REMAINING)] DATA_BLOB binary;
-               [case(SPOOLSS_PRINTER_DATA_TYPE_UINT32)] uint32 value;
-               [case(SPOOLSS_PRINTER_DATA_TYPE_STRING_ARRAY)] nstring_array string_array;
-               [default,flag(NDR_REMAINING)] DATA_BLOB data;
-       } spoolss_PrinterData;
-
-       [noopnum,noprint,public] WERROR _spoolss_GetPrinterData(
-               [in,ref] policy_handle *handle,
-               [in]     [string,charset(UTF16)] uint16 value_name[],
-               [in]     uint32 offered,
-               [out]    spoolss_PrinterDataType type,
-               [out]    DATA_BLOB data,
-               [out]    uint32 needed
-       );
-       [noopnum,noprint,public] void __spoolss_GetPrinterData(
-               [in] spoolss_PrinterDataType type,
-               [out,switch_is(type)] spoolss_PrinterData data
-       );
-       [nopull,nopush,public] WERROR spoolss_GetPrinterData(
-               [in,ref] policy_handle *handle,
-               [in]     [string,charset(UTF16)] uint16 value_name[],
-               [in]     uint32 offered,
-               [out]    spoolss_PrinterDataType type,
-               [out,subcontext(4),subcontext_size(offered),switch_is(type)] spoolss_PrinterData data,
-               [out]    uint32 needed
-       );
-
-       /******************/
-       /* Function: 0x1b */
-       [noopnum,nopull,noprint,public] WERROR _spoolss_SetPrinterData(
-               [in,ref] policy_handle *handle,
-               [in] [string,charset(UTF16)] uint16 value_name[],
-               [in] spoolss_PrinterDataType type,
-               [in] DATA_BLOB data,
-               [in] uint32 _offered
-       );
-       [noopnum,nopull,noprint,public] void __spoolss_SetPrinterData(
-               [in] spoolss_PrinterDataType type,
-               [out,switch_is(type)] spoolss_PrinterData data
-       );
-       [nopush] WERROR spoolss_SetPrinterData(
-               [in,ref] policy_handle *handle,
-               [in] [string,charset(UTF16)] uint16 value_name[],
-               [in] spoolss_PrinterDataType type,
-               [in,subcontext(4),switch_is(type)] spoolss_PrinterData data,
-               [in,value(ndr_size_spoolss_PrinterData(&data,type,flags))] uint32 _offered
-       );
-
-       /******************/
-       /* Function: 0x1c */
-       [todo] WERROR spoolss_WaitForPrinterChange(
-       );
-
-       /******************/
-       /* Function: 0x1d */
-       [public] WERROR spoolss_ClosePrinter(
-               [in,out,ref]     policy_handle *handle
-       );
-
-       /******************/
-       /* Function: 0x1e */
-       typedef [v1_enum] enum {
-               SPOOLSS_FORM_USER       = 0,
-               SPOOLSS_FORM_BUILTIN    = 1,
-               SPOOLSS_FORM_PRINTER    = 2
-       } spoolss_FormFlags;
-
-       typedef struct {
-               uint32 width;
-               uint32 height;
-       } spoolss_FormSize;
-
-       typedef struct {
-               uint32 left;
-               uint32 top;
-               uint32 right;
-               uint32 bottom;
-       } spoolss_FormArea;
-
-       typedef struct {
-               spoolss_FormFlags flags;
-               [relative] nstring *form_name;
-               spoolss_FormSize size;
-               spoolss_FormArea area;
-       } spoolss_FormInfo1;
-
-       typedef [nodiscriminant,relative_base,public,gensize] union {
-               [case(1)] spoolss_FormInfo1 info1;
-               [default];
-       } spoolss_FormInfo;
-
-       typedef struct {
-               spoolss_FormFlags flags;
-               [string,charset(UTF16)] uint16 *form_name;
-               spoolss_FormSize size;
-               spoolss_FormArea area;
-       } spoolss_AddFormInfo1;
-
-       typedef [switch_type(uint32)] union {
-               [case(1)] spoolss_AddFormInfo1 *info1;
-       } spoolss_AddFormInfo;
-
-       WERROR spoolss_AddForm(
-               [in,ref] policy_handle *handle,
-               [in] uint32 level,
-               [in,switch_is(level)] spoolss_AddFormInfo info
-       );
-
-       /******************/
-       /* Function: 0x1f */
-       WERROR spoolss_DeleteForm(
-               [in,ref] policy_handle *handle,
-               [in] [string,charset(UTF16)] uint16 form_name[]
-       );
-
-       /******************/
-       /* Function: 0x20 */
-       WERROR spoolss_GetForm(
-               [in,ref] policy_handle *handle,
-               [in] [string,charset(UTF16)] uint16 form_name[],
-               [in] uint32 level,
-               [in,unique] DATA_BLOB *buffer,
-               [in] uint32 offered,
-               [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_FormInfo *info,
-               [out] uint32 needed
-       );
-
-       /******************/
-       /* Function: 0x21 */
-       WERROR spoolss_SetForm(
-               [in,ref] policy_handle *handle,
-               [in] [string,charset(UTF16)] uint16 form_name[],
-               [in] uint32 level,
-               [in,switch_is(level)] spoolss_AddFormInfo info
-       );
-
-       /******************/
-       /* Function: 0x22 */
-       [public,noopnum,noprint] WERROR _spoolss_EnumForms(
-               [in,ref] policy_handle *handle,
-               [in]     uint32 level,
-               [in,unique] DATA_BLOB *buffer,
-               [in]     uint32 offered,
-               [out,unique] DATA_BLOB *info,
-               [out]    uint32 needed,
-               [out]    uint32 count
-       );
-       [public,noopnum,noprint] void __spoolss_EnumForms(
-               [in] uint32 level,
-               [in] uint32 count,
-               [out,switch_is(level)] spoolss_FormInfo info[count]
-       );
-       [nopull,nopush] WERROR spoolss_EnumForms(
-               [in,ref] policy_handle *handle,
-               [in]     uint32 level,
-               [in,unique] DATA_BLOB *buffer,
-               [in]     uint32 offered,
-               [out,unique,switch_is(level),size_is(count)] spoolss_FormInfo *info,
-               [out] uint32 needed,
-               [out] uint32 count
-       );
-
-       typedef struct {
-               [relative] nstring *port_name;
-       } spoolss_PortInfo1;
-
-       typedef bitmap {
-               SPOOLSS_PORT_TYPE_WRITE         = 0x00000001,
-               SPOOLSS_PORT_TYPE_READ          = 0x00000002,
-               SPOOLSS_PORT_TYPE_REDIRECTED    = 0x00000004,
-               SPOOLSS_PORT_TYPE_NET_ATTACHED  = 0x00000008
-       } spoolss_PortType;
-
-       typedef struct {
-               [relative] nstring *port_name;
-               [relative] nstring *monitor_name;
-               [relative] nstring *description;
-               spoolss_PortType port_type;
-               uint32 reserved;
-       } spoolss_PortInfo2;
-
-       typedef [nodiscriminant,relative_base,public] union {
-               [case(1)] spoolss_PortInfo1 info1;
-               [case(2)] spoolss_PortInfo2 info2;
-               [case(3)]; /* TODO */
-               [default];
-       } spoolss_PortInfo;
-
-       /******************/
-       /* Function: 0x23 */
-       [public,noopnum,noprint] WERROR _spoolss_EnumPorts(
-               [in,unique] [string,charset(UTF16)] uint16 *servername,
-               [in] uint32 level,
-               [in,unique] DATA_BLOB *buffer,
-               [in] uint32 offered,
-               [out,unique] DATA_BLOB *info,
-               [out] uint32 needed,
-               [out] uint32 count
-       );
-       [public,noopnum,noprint] void __spoolss_EnumPorts(
-               [in] uint32 level,
-               [in] uint32 count,
-               [out,switch_is(level)] spoolss_PortInfo info[count]
-       );
-       [nopull,nopush] WERROR spoolss_EnumPorts(
-               [in,unique] [string,charset(UTF16)] uint16 *servername,
-               [in] uint32 level,
-               [in,unique] DATA_BLOB *buffer,
-               [in] uint32 offered,
-               [out,unique,switch_is(level),size_is(count)] spoolss_PortInfo *info,
-               [out] uint32 needed,
-               [out] uint32 count
-       );
-
-       /******************/
-       /* Function: 0x24 */
-       typedef struct {
-               [relative] nstring *monitor_name;
-       } spoolss_MonitorInfo1;
-
-       typedef struct {
-               [relative] nstring *monitor_name;
-               [relative] nstring *environment;
-               [relative] nstring *dll_name;
-       } spoolss_MonitorInfo2;
-
-       typedef [nodiscriminant,relative_base,public] union {
-               [case(1)] spoolss_MonitorInfo1 info1;
-               [case(2)] spoolss_MonitorInfo2 info2;
-               [default];
-       } spoolss_MonitorInfo;
-
-       [public,noopnum,noprint] WERROR _spoolss_EnumMonitors(
-               [in,unique] [string,charset(UTF16)] uint16 *servername,
-               [in] uint32 level,
-               [in,unique] DATA_BLOB *buffer,
-               [in] uint32 offered,
-               [out,unique] DATA_BLOB *info,
-               [out] uint32 needed,
-               [out] uint32 count
-       );
-       [public,noopnum,noprint] void __spoolss_EnumMonitors(
-               [in] uint32 level,
-               [in] uint32 count,
-               [out,switch_is(level)] spoolss_MonitorInfo info[count]
-       );
-       [nopull,nopush] WERROR spoolss_EnumMonitors(
-               [in,unique] [string,charset(UTF16)] uint16 *servername,
-               [in] uint32 level,
-               [in,unique] DATA_BLOB *buffer,
-               [in] uint32 offered,
-               [out,unique,switch_is(level),size_is(count)] spoolss_MonitorInfo *info,
-               [out] uint32 needed,
-               [out] uint32 count
-       );
-
-       /******************/
-       /* Function: 0x25 */
-       WERROR spoolss_AddPort(
-              [in,unique] [string,charset(UTF16)] uint16 *server_name,
-              [in] uint32 unknown,
-              [in] [string,charset(UTF16)] uint16 monitor_name[]
-       );
-
-       /******************/
-       /* Function: 0x26 */
-       [todo] WERROR spoolss_ConfigurePort(
-       );
-
-       /******************/
-       /* Function: 0x27 */
-       [todo] WERROR spoolss_DeletePort(
-       );
-
-       /******************/
-       /* Function: 0x28 */
-       [todo] WERROR spoolss_CreatePrinterIC(
-       );
-
-       /******************/
-       /* Function: 0x29 */
-       [todo] WERROR spoolss_PlayGDIScriptOnPrinterIC(
-       );
-
-       /******************/
-       /* Function: 0x2a */
-       [todo] WERROR spoolss_DeletePrinterIC(
-       );
-
-       /******************/
-       /* Function: 0x2b */
-       [todo] WERROR spoolss_AddPrinterConnection(
-       );
-
-       /******************/
-       /* Function: 0x2c */
-       [todo] WERROR spoolss_DeletePrinterConnection(
-       );
-
-       /******************/
-       /* Function: 0x2d */
-       [todo] WERROR spoolss_PrinterMessageBox(
-               /* Marked as obsolete in MSDN.  "Not necessary and has
-                  no effect". */
-       );
-
-       /******************/
-       /* Function: 0x2e */
-       [todo] WERROR spoolss_AddMonitor(
-       );
-
-       /******************/
-       /* Function: 0x2f */
-       [todo] WERROR spoolss_DeleteMonitor(
-       );
-
-       /******************/
-       /* Function: 0x30 */
-       [todo] WERROR spoolss_DeletePrintProcessor(
-       );
-
-       /******************/
-       /* Function: 0x31 */
-       [todo] WERROR spoolss_AddPrintProvidor(
-       );
-
-       /******************/
-       /* Function: 0x32 */
-       [todo] WERROR spoolss_DeletePrintProvidor(
-       );
-
-       /******************/
-       /* Function: 0x33 */
-       [todo] WERROR spoolss_EnumPrintProcDataTypes(
-       );
-
-       /******************/
-       /* Function: 0x34 */
-       [todo] WERROR spoolss_ResetPrinter(
-       );
-
-       /******************/
-       /* Function: 0x35 */
-       WERROR spoolss_GetPrinterDriver2(
-               [in,ref] policy_handle *handle,
-               [in,unique] [string,charset(UTF16)] uint16 *architecture,
-               [in]     uint32 level,
-               [in,unique] DATA_BLOB *buffer,
-               [in]     uint32 offered,
-               [in]     uint32 client_major_version,
-               [in]     uint32 client_minor_version,
-               [out,unique] DATA_BLOB *info,
-               [out]    uint32 needed,
-               [out]    uint32 server_major_version,
-               [out]    uint32 server_minor_version
-       );
-
-       /******************/
-       /* Function: 0x36 */
-       [todo] WERROR spoolss_FindFirstPrinterChangeNotification(
-       );
-
-       /******************/
-       /* Function: 0x37 */
-       [todo] WERROR spoolss_FindNextPrinterChangeNotification(
-       );
-
-       /******************/
-       /* Function: 0x38 */
-       [public] WERROR spoolss_FindClosePrinterNotify(
-               [in,ref] policy_handle *handle
-       );
-
-       /******************/
-       /* Function: 0x39 */
-       [todo] WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld(
-       );
-
-       /******************/
-       /* Function: 0x3a */
-       [public] WERROR spoolss_ReplyOpenPrinter(
-               [in,string,charset(UTF16)] uint16 server_name[],
-               [in] uint32 printer_local,
-               [in] winreg_Type type,
-               [in] uint32 unknown1,
-               [in] uint32 unknown2,
-               [out,ref] policy_handle *handle
-       );
-
-       /******************/
-       /* Function: 0x3b */
-       [todo] WERROR spoolss_RouterReplyPrinter(
-       );
-
-       /******************/
-       /* Function: 0x3c */
-       [public] WERROR spoolss_ReplyClosePrinter(
-               [in,out,ref] policy_handle *handle
-       );
-
-       /******************/
-       /* Function: 0x3d */
-       [todo] WERROR spoolss_AddPortEx(
-       );
-
-       /******************/
-       /* Function: 0x3e */
-       [todo] WERROR spoolss_RouterFindFirstPrinterChangeNotification(
-       );
-
-       /******************/
-       /* Function: 0x3f */
-       [todo] WERROR spoolss_SpoolerInit(
-       );
-
-       /******************/
-       /* Function: 0x40 */
-       [todo] WERROR spoolss_ResetPrinterEx(
-       );
-
-       typedef [enum16bit] enum {
-               SPOOLSS_FIELD_SERVER_NAME               =  0,
-               SPOOLSS_FIELD_PRINTER_NAME              =  1,
-               SPOOLSS_FIELD_SHARE_NAME        =  2,
-               SPOOLSS_FIELD_PORT_NAME                 =  3,
-               SPOOLSS_FIELD_DRIVER_NAME               =  4,
-               SPOOLSS_FIELD_COMMENT                   =  5,
-               SPOOLSS_FIELD_LOCATION                  =  6,
-               SPOOLSS_FIELD_DEVMODE                   =  7,
-               SPOOLSS_FIELD_SEPFILE                   =  8,
-               SPOOLSS_FIELD_PRINT_PROCESSOR   =  9,
-               SPOOLSS_FIELD_PARAMETERS                = 10,
-               SPOOLSS_FIELD_DATATYPE                  = 11,
-               SPOOLSS_FIELD_SECURITY_DESCRIPTOR=12,
-               SPOOLSS_FIELD_ATTRIBUTES                = 13,
-               SPOOLSS_FIELD_PRIORITY                  = 14,
-               SPOOLSS_FIELD_DEFAULT_PRIORITY  = 15,
-               SPOOLSS_FIELD_START_TIME                = 16,
-               SPOOLSS_FIELD_UNTIL_TIME                = 17,
-               SPOOLSS_FIELD_STATUS                    = 18,
-               SPOOLSS_FIELD_STATUS_STRING             = 19,
-               SPOOLSS_FIELD_CJOBS                             = 20,
-               SPOOLSS_FIELD_AVERAGE_PPM               = 21,
-               SPOOLSS_FIELD_TOTAL_PAGES               = 22,
-               SPOOLSS_FIELD_PAGES_PRINTED     = 23,
-               SPOOLSS_FIELD_TOTAL_BYTES               = 24,
-               SPOOLSS_FIELD_BYTES_PRINTED             = 25
-       } spoolss_Field;
-
-       typedef [enum16bit] enum {
-               SPOOLSS_NOTIFY_PRINTER                  = 0,
-               SPOOLSS_NOTIFY_JOB                              = 1
-       } spoolss_NotifyType;
-
-       /******************/
-       /* Function: 0x41 */
-       typedef struct {
-               spoolss_NotifyType type;
-               uint16 u1;
-               uint32 u2;
-               uint32 u3;
-               uint32 count;
-               [size_is(count)] spoolss_Field *fields;
-       } spoolss_NotifyOptionsArray;
-
-       typedef struct {
-               uint32 version;
-               uint32 flags;
-               uint32 count;
-               [size_is(count)] spoolss_NotifyOptionsArray *options;
-       } spoolss_NotifyOptionsContainer;
-
-       [public] WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx(
-               [in,ref] policy_handle *handle,
-               [in] uint32 flags,
-               [in] uint32 options,
-               [in,unique] [string,charset(UTF16)] uint16 *str,
-               [in] uint32 printer_local,
-               [in,unique] spoolss_NotifyOptionsContainer *t1
-       );
-
-       /******************/
-       /* Function: 0x42 */
-       [todo] WERROR spoolss_RouterRefreshPrinterChangeNotification(
-       );
-
-       typedef struct {
-               uint32 size;
-               [size_is(size/2),unique,charset(UTF16)] uint16 *string;
-       } spoolss_NotifyUTF16String;
-
-       typedef struct {
-               uint32 size;
-               [size_is(size),charset(DOS)] uint8 *string;
-       } spoolss_NotifyDOSString;
-
-       typedef struct {
-               uint16 data[8];
-       } spoolss_NotifyBlobData;
-
-       typedef struct {
-               uint32 len;
-               [unique] spoolss_NotifyBlobData *data;
-       } spoolss_NotifyBlob;
-
-       typedef [switch_type(uint32)] union {
-               [case(1)] dlong integer;
-               [case(2)] spoolss_NotifyUTF16String utf16_string;
-               [case(3)] spoolss_NotifyDOSString ascii_string;
-               [case(4)] spoolss_NotifyBlob blob;
-               [case(5)] spoolss_NotifyDOSString ascii_string;
-       } spoolss_NotifyData;
-
-       typedef struct {
-               spoolss_NotifyType type;
-               spoolss_Field field;
-               uint32 variable_type;
-               uint32 job_id;
-               [switch_is(variable_type)] spoolss_NotifyData data;
-       } spoolss_Notify;
-
-       typedef struct {
-               uint32 version;
-               uint32 flags;
-               uint32 count;
-               [size_is(count)] spoolss_Notify notifies[];
-       } spoolss_NotifyInfo;
-
-       /******************/
-       /* Function: 0x43 */
-       [public] WERROR spoolss_RemoteFindNextPrinterChangeNotifyEx(
-               [in,ref] policy_handle *handle,
-               [in] uint32 change_low,
-               [in,unique] spoolss_NotifyOptionsContainer *container,
-               [out, unique] spoolss_NotifyInfo *info
-       );
-
-       /******************/
-       /* Function: 0x44 */
-       [todo] WERROR spoolss_44(
-       );
-
-       typedef struct {
-               uint32 size;
-               [string,charset(UTF16)] uint16 *client;
-               [string,charset(UTF16)] uint16 *user;
-               uint32 build;
-               uint32 major;
-               uint32 minor;
-               uint32 processor;
-       } spoolss_UserLevel1;
-
-       typedef union {
-               [case(1)]  spoolss_UserLevel1 *level1;
-       } spoolss_UserLevel;
-
-       typedef bitmap {
-               SERVER_ACCESS_ADMINISTER        = 0x00000001,
-               SERVER_ACCESS_ENUMERATE         = 0x00000002,
-               PRINTER_ACCESS_ADMINISTER       = 0x00000004,
-               PRINTER_ACCESS_USE              = 0x00000008,
-               JOB_ACCESS_ADMINISTER           = 0x00000010
-       } spoolss_AccessRights;
-
-       /* Access rights for print servers */
-       const int SERVER_ALL_ACCESS     = SEC_STD_REQUIRED |
-                                         SERVER_ACCESS_ADMINISTER |
-                                         SERVER_ACCESS_ENUMERATE;
-
-       const int SERVER_READ           = SEC_STD_READ_CONTROL |
-                                         SERVER_ACCESS_ENUMERATE;
-
-       const int SERVER_WRITE          = STANDARD_RIGHTS_WRITE_ACCESS |
-                                         SERVER_ACCESS_ADMINISTER |
-                                         SERVER_ACCESS_ENUMERATE;
-
-       const int SERVER_EXECUTE        = SEC_STD_READ_CONTROL |
-                                         SERVER_ACCESS_ENUMERATE;
-
-       /* Access rights for printers */
-       const int PRINTER_ALL_ACCESS    = SEC_STD_REQUIRED |
-                                         PRINTER_ACCESS_ADMINISTER |
-                                         PRINTER_ACCESS_USE;
-
-       const int PRINTER_READ          = SEC_STD_READ_CONTROL |
-                                         PRINTER_ACCESS_USE;
-
-       const int PRINTER_WRITE         = STANDARD_RIGHTS_WRITE_ACCESS |
-                                         PRINTER_ACCESS_USE;
-
-       const int PRINTER_EXECUTE       = SEC_STD_READ_CONTROL |
-                                         PRINTER_ACCESS_USE;
-
-       /* Access rights for jobs */
-       const int JOB_ALL_ACCESS        = SEC_STD_REQUIRED |
-                                         JOB_ACCESS_ADMINISTER;
-
-       const int JOB_READ              = SEC_STD_READ_CONTROL |
-                                         JOB_ACCESS_ADMINISTER;
-
-       const int JOB_WRITE             = STANDARD_RIGHTS_WRITE_ACCESS |
-                                         JOB_ACCESS_ADMINISTER;
-
-       const int JOB_EXECUTE           = SEC_STD_READ_CONTROL |
-                                         JOB_ACCESS_ADMINISTER;
-
-       /* ACE masks for various print permissions */
-       const int PRINTER_ACE_FULL_CONTROL = SEC_GENERIC_ALL |
-                                               PRINTER_ALL_ACCESS;
-
-       const int PRINTER_ACE_MANAGE_DOCUMENTS = SEC_GENERIC_ALL |
-                                               READ_CONTROL_ACCESS;
-
-       const int PRINTER_ACE_PRINT     = GENERIC_EXECUTE_ACCESS |
-                                         READ_CONTROL_ACCESS |
-                                         PRINTER_ACCESS_USE;
-
-       /******************/
-       /* Function: 0x45 */
-       [public] WERROR spoolss_OpenPrinterEx(
-               [in,unique]           [string,charset(UTF16)] uint16 *printername,
-               [in,unique]           [string,charset(UTF16)] uint16 *datatype,
-               [in]                  spoolss_DevmodeContainer devmode_ctr,
-               [in]                  uint32 access_mask,
-               [in]                  uint32 level,
-               [in,switch_is(level)] spoolss_UserLevel userlevel,
-               [out,ref]             policy_handle *handle
-       );
-
-       /******************/
-       /* Function: 0x46 */
-       WERROR spoolss_AddPrinterEx(
-               [in,unique] [string,charset(UTF16)] uint16 *server,
-               [in] uint32 level,
-               [in,unique,switch_is(level)] spoolss_PrinterInfo *info,
-               [in] spoolss_DevmodeContainer devmode_ctr,
-               [in,unique] security_descriptor *secdesc,
-               [in] uint32 ulevel,
-               [in,switch_is(ulevel)] spoolss_UserLevel userlevel
-       );
-
-       /******************/
-       /* Function: 0x47 */
-       [todo] WERROR spoolss_47(
-       );
-
-       /******************/
-       /* Function: 0x48 */
-       WERROR spoolss_EnumPrinterData(
-               [in,ref] policy_handle *handle,
-               [in]     uint32 enum_index,
-               [out,ref,size_is(value_offered/2),charset(UTF16)] uint16 *value_name,
-               [in]     uint32 value_offered,
-               [out,ref] uint32 *value_needed,
-               [out,ref] uint32 *printerdata_type,
-               [out,ref] DATA_BLOB *buffer,
-               [in]     uint32 data_offered,
-               [out,ref] uint32 *data_needed
-       );
-
-       /******************/
-       /* Function: 0x49 */
-       WERROR spoolss_DeletePrinterData(
-               [in,ref] policy_handle *handle,
-               [in] [string,charset(UTF16)] uint16 value_name[]
-       );
-
-       /******************/
-       /* Function: 0x4a */
-       [todo] WERROR spoolss_4a(
-       );
-
-       /******************/
-       /* Function: 0x4b */
-       [todo] WERROR spoolss_4b(
-       );
-
-       /******************/
-       /* Function: 0x4c */
-       [todo] WERROR spoolss_4c(
-       );
-
-       /******************/
-       /* Function: 0x4d */
-       WERROR spoolss_SetPrinterDataEx(
-               [in,ref] policy_handle *handle,
-               [in]     [string,charset(UTF16)] uint16 key_name[],
-               [in]     [string,charset(UTF16)] uint16 value_name[],
-               [in]     uint32 type,
-               [in]     DATA_BLOB buffer,
-               [in]     uint32 offered
-       );
-
-       /******************/
-       /* Function: 0x4e */
-       WERROR spoolss_GetPrinterDataEx(
-               [in,ref] policy_handle *handle,
-               [in]     [string,charset(UTF16)] uint16 key_name[],
-               [in]     [string,charset(UTF16)] uint16 value_name[],
-               [in]     uint32 offered,
-               [out]    uint32 type,
-               [out]    DATA_BLOB buffer,
-               [out]    uint32 needed
-       );
-
-       /******************/
-       /* Function: 0x4f */
-       [public] WERROR spoolss_EnumPrinterDataEx(
-               [in,ref] policy_handle *handle,
-               [in]     [string,charset(UTF16)] uint16 key_name[],
-               [in]     uint32 offered,
-               [out]    DATA_BLOB buffer,
-               [out]    uint32 needed,
-               [out]    uint32 count
-       );
-
-       /******************/
-       /* Function: 0x50 */
-       [public] WERROR spoolss_EnumPrinterKey(
-               [in, ref] policy_handle *handle,
-               [in] [string,charset(UTF16)] uint16 key_name[],
-               [out] uint32 key_buffer_size,
-               [out] uint16 key_buffer[key_buffer_size],
-               [in,out] uint32 needed
-       );
-
-       /******************/
-       /* Function: 0x51 */
-       WERROR spoolss_DeletePrinterDataEx(
-               [in,ref] policy_handle *handle,
-               [in] [string,charset(UTF16)] uint16 key_name[],
-               [in] [string,charset(UTF16)] uint16 value_name[]
-       );
-
-       /******************/
-       /* Function: 0x52 */
-       [todo] WERROR spoolss_DeletePrinterKey(
-       );
-
-       /******************/
-       /* Function: 0x53 */
-       [todo] WERROR spoolss_53(
-       );
-
-       /******************/
-       /* Function: 0x54 */
-       [todo] WERROR spoolss_DeletePrinterDriverEx(
-       );
-
-       /******************/
-       /* Function: 0x55 */
-       [todo] WERROR spoolss_55(
-       );
-
-       /******************/
-       /* Function: 0x56 */
-       [todo] WERROR spoolss_56(
-       );
-
-       /******************/
-       /* Function: 0x57 */
-       [todo] WERROR spoolss_57(
-       );
-
-       /******************/
-       /* Function: 0x58 */
-       WERROR spoolss_XcvData(
-               [in,ref] policy_handle *handle,
-               [in] [string,charset(UTF16)] uint16 function_name[],
-               [in] DATA_BLOB in_data,
-               [in,value(r->in.in_data.length)] uint32 _in_data_length,
-               [in] uint32 offered,
-               [in] uint32 unknown1,
-               [out] DATA_BLOB out_data,
-               [out] uint32 needed,
-               [out] uint32 unknown2
-       );
-
-       /******************/
-       /* Function: 0x59 */
-       [public,todo] WERROR spoolss_AddPrinterDriverEx(
-       );
-
-       /******************/
-       /* Function: 0x5a */
-       [todo] WERROR spoolss_5a(
-       );
-
-       /******************/
-       /* Function: 0x5b */
-       [todo] WERROR spoolss_5b(
-       );
-
-       /******************/
-       /* Function: 0x5c */
-       [todo] WERROR spoolss_5c(
-       );
-
-       /******************/
-       /* Function: 0x5d */
-       [todo] WERROR spoolss_5d(
-       );
-
-       /******************/
-       /* Function: 0x5e */
-       [todo] WERROR spoolss_5e(
-       );
-
-       /******************/
-       /* Function: 0x5f */
-       [todo] WERROR spoolss_5f(
-       );
-}
diff --git a/source4/librpc/idl/svcctl.idl b/source4/librpc/idl/svcctl.idl
deleted file mode 100644 (file)
index 961493d..0000000
+++ /dev/null
@@ -1,520 +0,0 @@
-#include "idl_types.h"
-
-/*
-  svcctl interface definitions
-*/
-
-import "misc.idl";
-[ uuid("367abb81-9844-35f1-ad32-98f038001003"),
-  version(2.0),
-  pointer_default(unique),
-  endpoint("ncacn_np:[\\pipe\\svcctl]", "ncalrpc:"),
-  helpstring("Service Control")
-] interface svcctl
-{
-       typedef struct {
-               uint32 is_locked;
-               [string,charset(UTF16)] uint16 *lock_owner;
-               uint32 lock_duration;
-       } SERVICE_LOCK_STATUS;
-
-       typedef struct {
-               uint32 type;
-               uint32 state;
-               uint32 controls_accepted;
-               WERROR win32_exit_code;
-               uint32 service_exit_code;
-               uint32 check_point;
-               uint32 wait_hint;
-       } SERVICE_STATUS;
-
-       typedef struct {
-               [relative] astring *service_name;
-               [relative] astring *display_name;
-               SERVICE_STATUS status;
-       } ENUM_SERVICE_STATUS;
-
-       const int SERVICE_TYPE_KERNEL_DRIVER       = 0x01;
-       const int SERVICE_TYPE_FS_DRIVER           = 0x02;
-       const int SERVICE_TYPE_ADAPTER             = 0x04;
-       const int SERVICE_TYPE_RECOGNIZER_DRIVER   = 0x08;
-       const int SERVICE_TYPE_DRIVER=SERVICE_TYPE_KERNEL_DRIVER|SERVICE_TYPE_FS_DRIVER|SERVICE_TYPE_RECOGNIZER_DRIVER;
-       const int SERVICE_TYPE_WIN32_OWN_PROCESS   = 0x10;
-       const int SERVICE_TYPE_WIN32_SHARE_PROCESS = 0x20;
-       const int SERVICE_TYPE_WIN32=SERVICE_TYPE_WIN32_OWN_PROCESS|SERVICE_TYPE_WIN32_SHARE_PROCESS;
-
-       const int SERVICE_STATE_ACTIVE   = 0x01;
-       const int SERVICE_STATE_INACTIVE = 0x02;
-       const int SERVICE_STATE_ALL      = 0x03;
-
-       typedef [public,bitmap32bit] bitmap {
-               SV_TYPE_WORKSTATION       = 0x00000001,
-               SV_TYPE_SERVER            = 0x00000002,
-               SV_TYPE_SQLSERVER         = 0x00000004,
-               SV_TYPE_DOMAIN_CTRL       = 0x00000008,
-               SV_TYPE_DOMAIN_BAKCTRL    = 0x00000010,
-               SV_TYPE_TIME_SOURCE       = 0x00000020,
-               SV_TYPE_AFP               = 0x00000040,
-               SV_TYPE_NOVELL            = 0x00000080,
-
-               SV_TYPE_DOMAIN_MEMBER     = 0x00000100,
-               SV_TYPE_PRINTQ_SERVER     = 0x00000200,
-               SV_TYPE_DIALIN_SERVER     = 0x00000400,
-               SV_TYPE_SERVER_UNIX       = 0x00000800,
-               SV_TYPE_NT                = 0x00001000,
-               SV_TYPE_WFW               = 0x00002000,
-               SV_TYPE_SERVER_MFPN       = 0x00004000,
-               SV_TYPE_SERVER_NT         = 0x00008000,
-               SV_TYPE_POTENTIAL_BROWSER = 0x00010000,
-               SV_TYPE_BACKUP_BROWSER    = 0x00020000,
-               SV_TYPE_MASTER_BROWSER    = 0x00040000,
-               SV_TYPE_DOMAIN_MASTER     = 0x00080000,
-               SV_TYPE_SERVER_OSF        = 0x00100000,
-               SV_TYPE_SERVER_VMS        = 0x00200000,
-               SV_TYPE_WIN95_PLUS        = 0x00400000,
-               SV_TYPE_DFS_SERVER        = 0x00800000,
-               SV_TYPE_ALTERNATE_XPORT   = 0x20000000,
-               SV_TYPE_LOCAL_LIST_ONLY   = 0x40000000,
-               SV_TYPE_DOMAIN_ENUM       = 0x80000000
-       } svcctl_ServerType;
-
-       const uint32 SV_TYPE_ALL        = 0xFFFFFFFF;
-
-       /*****************/
-       /* Function 0x00 */
-       WERROR svcctl_CloseServiceHandle(
-               [in,out,ref] policy_handle *handle
-       );
-
-       /*****************/
-       /* Function 0x01 */
-
-       typedef enum {
-               FIXME=1
-       } SERVICE_CONTROL;
-       
-       WERROR svcctl_ControlService(
-               [in,ref] policy_handle *handle,
-               [in] uint32 control,
-               [out,ref] SERVICE_STATUS *service_status
-       );
-
-       /*****************/
-       /* Function 0x02 */
-       WERROR svcctl_DeleteService(
-               [in,ref] policy_handle *handle
-       );
-
-       /*****************/
-       /* Function 0x03 */
-
-       WERROR svcctl_LockServiceDatabase(
-               [in,ref] policy_handle *handle,
-               [out,ref] policy_handle *lock
-       );
-
-       /*****************/
-       /* Function 0x04 */
-       WERROR svcctl_QueryServiceObjectSecurity(
-               [in] policy_handle *handle,
-               [in] uint32 security_flags,
-               [out,ref,size_is(buffer_size)] uint8 *buffer,
-               [in,range(0,0x40000)] uint32 buffer_size,
-               [out,ref,range(0,0x40000)] uint32 *needed
-       );
-
-       /*****************/
-       /* Function 0x05 */
-       WERROR svcctl_SetServiceObjectSecurity(
-               [in] policy_handle *handle,
-               [in] uint32 security_flags,
-               [in,ref,size_is(buffer_size)] uint8 *buffer,
-               [in] uint32 buffer_size
-       );
-
-       /*****************/
-       /* Function 0x06 */
-       WERROR svcctl_QueryServiceStatus(
-               [in,ref] policy_handle *handle,
-               [out,ref] SERVICE_STATUS *service_status
-       );
-
-       /*****************/
-       /* Function 0x07 */
-       [todo] WERROR svcctl_SetServiceStatus(
-       );
-
-       /*****************/
-       /* Function 0x08 */
-       WERROR svcctl_UnlockServiceDatabase(
-               [in,out,ref] policy_handle *lock
-       );
-
-       /*****************/
-       /* Function 0x09 */
-       [todo] WERROR svcctl_NotifyBootConfigStatus(
-       );
-
-       /*****************/
-       /* Function 0x0a */
-       WERROR svcctl_SCSetServiceBitsW(
-               [in,ref] policy_handle *handle,
-               [in] uint32 bits,
-               [in] boolean32 bitson,
-               [in] boolean32 immediate
-       );
-
-       /*****************/
-       /* Function 0x0b */
-       WERROR svcctl_ChangeServiceConfigW(
-               [in,ref] policy_handle *handle,
-               [in] uint32 type,
-               [in] uint32 start,
-               [in] uint32 error,
-               [in,unique] [string,charset(UTF16)] uint16 *binary_path,
-               [in,unique] [string,charset(UTF16)] uint16 *load_order_group,
-               [out,ref] uint32 *tag_id,
-               [in,unique] [string,charset(UTF16)] uint16 *dependencies,
-               [in,unique] [string,charset(UTF16)] uint16 *service_start_name,
-               [in,unique] [string,charset(UTF16)] uint16 *password,
-               [in,unique] [string,charset(UTF16)] uint16 *display_name
-       );
-
-       /*****************/
-       /* Function 0x0c */
-       WERROR svcctl_CreateServiceW(
-               [in,ref] policy_handle *scmanager_handle,
-               [in] [string,charset(UTF16)] uint16 ServiceName[],
-               [in,unique] [string,charset(UTF16)] uint16 *DisplayName,
-               [in] uint32 desired_access,
-               [in] uint32 type,
-               [in] uint32 start_type,
-               [in] uint32 error_control,
-               [in] [string,charset(UTF16)] uint16 binary_path[],
-               [in,unique] [string,charset(UTF16)] uint16 *LoadOrderGroupKey,
-               [in,out,unique] uint32 *TagId,
-               [in,unique,size_is(dependencies_size)] uint8 *dependencies,
-               [in] uint32 dependencies_size,
-               [in,unique] [string,charset(UTF16)] uint16 *service_start_name,
-               [in,unique,size_is(password_size)] uint8 *password,
-               [in] uint32 password_size,
-               [out,ref] policy_handle *handle
-       );
-
-       /*****************/
-       /* Function 0x0d */
-       WERROR svcctl_EnumDependentServicesW(
-               [in,ref] policy_handle *service,
-               [in] uint32 state,
-               [out,unique] ENUM_SERVICE_STATUS *service_status,
-               [in] uint32 buf_size,
-               [out,ref] uint32 *bytes_needed,
-               [out,ref] uint32 *services_returned
-       );
-
-       /*****************/
-       /* Function 0x0e */
-       WERROR svcctl_EnumServicesStatusW(
-               [in,ref] policy_handle *handle,
-               [in] uint32 type,
-               [in] uint32 state,
-               [in] uint32 buf_size,
-               [out,size_is(buf_size)] uint8 service[*],
-               [out,ref] uint32 *bytes_needed,
-               [out,ref] uint32 *services_returned,
-               [in,out,unique] uint32 *resume_handle
-       );
-
-       /*****************/
-       /* Function 0x0f */
-       WERROR svcctl_OpenSCManagerW(
-               [in,unique] [string,charset(UTF16)] uint16 *MachineName,
-               [in,unique] [string,charset(UTF16)] uint16 *DatabaseName,
-               [in] uint32 access_mask,
-               [out,ref] policy_handle *handle
-       );
-
-       /*****************/
-       /* Function 0x10 */
-       typedef [bitmap32bit] bitmap {
-               SC_RIGHT_SVC_QUERY_CONFIG               = 0x0001,
-               SC_RIGHT_SVC_CHANGE_CONFIG              = 0x0002,
-               SC_RIGHT_SVC_QUERY_STATUS               = 0x0004,
-               SC_RIGHT_SVC_ENUMERATE_DEPENDENTS       = 0x0008,
-               SC_RIGHT_SVC_START                      = 0x0010,
-               SC_RIGHT_SVC_STOP                       = 0x0020,
-               SC_RIGHT_SVC_PAUSE_CONTINUE             = 0x0040,
-               SC_RIGHT_SVC_INTERROGATE                = 0x0080,
-               SC_RIGHT_SVC_USER_DEFINED_CONTROL       = 0x0100
-       } svcctl_ServiceAccessMask;
-
-       WERROR svcctl_OpenServiceW(
-               [in,ref] policy_handle *scmanager_handle,
-               [in] [string,charset(UTF16)] uint16 ServiceName[],
-               [in] svcctl_ServiceAccessMask access_mask,
-               [out,ref] policy_handle *handle
-       );
-
-       /*****************/
-       /* Function 0x11 */
-       WERROR svcctl_QueryServiceConfigW(
-               [in,ref] policy_handle *handle,
-               [out] uint8 query[buf_size], /*QUERY_SERVICE_CONFIG */
-               [in] uint32 buf_size,
-               [out,ref] uint32 *bytes_needed
-       );
-
-       /*****************/
-       /* Function 0x12 */
-       WERROR svcctl_QueryServiceLockStatusW(
-               [in,ref] policy_handle *handle,
-               [in] uint32 buf_size,
-               [out,ref] SERVICE_LOCK_STATUS *lock_status,
-               [out,ref] uint32 *required_buf_size
-       );
-
-       /*****************/
-       /* Function 0x13 */
-       WERROR svcctl_StartServiceW(
-               [in,ref] policy_handle *handle,
-               [in] uint32 NumArgs,
-               [in,unique/*FIXME:,length_is(NumArgs)*/] [string,charset(UTF16)] uint16 *Arguments
-       );
-
-       /*****************/
-       /* Function 0x14 */
-       WERROR svcctl_GetServiceDisplayNameW(
-               [in,ref] policy_handle *handle,
-               [in,unique] [string,charset(UTF16)] uint16 *service_name,
-               [out,ref] [string,charset(UTF16)] uint16 **display_name,
-               [in,out,unique] uint32 *display_name_length
-       ); 
-
-       /*****************/
-       /* Function 0x15 */
-       WERROR svcctl_GetServiceKeyNameW(
-               [in,ref] policy_handle *handle,
-               [in,unique] [string,charset(UTF16)] uint16 *service_name,
-               [out,ref] [string,charset(UTF16)] uint16 **key_name,
-               [in,out,unique] uint32 *display_name_length
-       );
-
-       /*****************/
-       /* Function 0x16 */
-       WERROR svcctl_SCSetServiceBitsA(
-               [in,ref] policy_handle *handle,
-               [in] uint32 bits,
-               [in] boolean32 bitson,
-               [in] boolean32 immediate
-       );
-
-       /*****************/
-       /* Function 0x17 */
-       WERROR svcctl_ChangeServiceConfigA(
-               [in,ref] policy_handle *handle,
-               [in] uint32 type,
-               [in] uint32 start,
-               [in] uint32 error,
-               [in,unique] [string,charset(UTF16)] uint16 *binary_path,
-               [in,unique] [string,charset(UTF16)] uint16 *load_order_group,
-               [out,ref] uint32 *tag_id,
-               [in,unique] [string,charset(UTF16)] uint16 *dependencies,
-               [in,unique] [string,charset(UTF16)] uint16 *service_start_name,
-               [in,unique] [string,charset(UTF16)] uint16 *password,
-               [in,unique] [string,charset(UTF16)] uint16 *display_name
-       );
-
-       /*****************/
-       /* Function 0x18 */
-       WERROR svcctl_CreateServiceA(
-               [in,ref] policy_handle *handle,
-               [in,unique] [string,charset(UTF16)] uint16 *ServiceName,
-               [in,unique] [string,charset(UTF16)] uint16 *DisplayName,
-               [in] uint32 desired_access,
-               [in] uint32 type,
-               [in] uint32 start_type,
-               [in] uint32 error_control,
-               [in,unique] [string,charset(UTF16)] uint16 *binary_path,
-               [in,unique] [string,charset(UTF16)] uint16 *LoadOrderGroupKey,
-               [out,unique] uint32 *TagId,
-               [in,unique] [string,charset(UTF16)] uint16 *dependencies,
-               [in,unique] [string,charset(UTF16)] uint16 *service_start_name,
-               [in,unique] [string,charset(UTF16)] uint16 *password
-       );
-
-       /*****************/
-       /* Function 0x19 */
-       WERROR svcctl_EnumDependentServicesA(
-               [in,ref] policy_handle *service,
-               [in] uint32 state,
-               [out,unique] ENUM_SERVICE_STATUS *service_status,
-               [in] uint32 buf_size,
-               [out,ref] uint32 *bytes_needed,
-               [out,ref] uint32 *services_returned
-       );
-
-       /*****************/
-       /* Function 0x1a */
-       WERROR svcctl_EnumServicesStatusA(
-               [in,ref] policy_handle *handle,
-               [in] uint32 type,
-               [in] uint32 state,
-               [in] uint32 buf_size,
-               [out,size_is(buf_size)] uint8 service[*],
-               [out,ref] uint32 *bytes_needed,
-               [out,ref] uint32 *services_returned,
-               [in,out,unique] uint32 *resume_handle
-       );
-       
-       /*****************/
-       /* Function 0x1b */
-       WERROR svcctl_OpenSCManagerA(
-               [in,unique] [string,charset(UTF16)] uint16 *MachineName,
-               [in,unique] [string,charset(UTF16)] uint16 *DatabaseName,
-               [in] uint32 access_mask,
-               [out,ref] policy_handle *handle
-       );
-
-       /*****************/
-       /* Function 0x1c */
-       WERROR svcctl_OpenServiceA(
-               [in,ref] policy_handle *scmanager_handle,
-               [in,unique] [string,charset(UTF16)] uint16 *ServiceName,
-               [in] uint32 access_mask
-       );
-
-       /*****************/
-       /* Function 0x1d */
-       WERROR svcctl_QueryServiceConfigA(
-               [in,ref] policy_handle *handle,
-               [out] uint8 query[buf_size], /*QUERYU_SERVICE_CONFIG */
-               [in] uint32 buf_size,
-               [out,ref] uint32 *bytes_needed
-       );
-
-       /*****************/
-       /* Function 0x1e */
-       WERROR svcctl_QueryServiceLockStatusA(
-               [in,ref] policy_handle *handle,
-               [in] uint32 buf_size,
-               [out,ref] SERVICE_LOCK_STATUS *lock_status,
-               [out,ref] uint32 *required_buf_size
-       );
-
-       /*****************/
-       /* Function 0x1f */
-       WERROR svcctl_StartServiceA(
-               [in,ref] policy_handle *handle,
-               [in] uint32 NumArgs,
-               [in,unique/*FIXME:,length_is(NumArgs)*/] [string,charset(UTF16)] uint16 *Arguments
-       );
-
-       /*****************/
-       /* Function 0x20 */
-       WERROR svcctl_GetServiceDisplayNameA(
-               [in,ref] policy_handle *handle,
-               [in,unique] [string,charset(UTF16)] uint16 *service_name,
-               [out,ref] [string,charset(UTF16)] uint16 **display_name,
-               [in,out,unique] uint32 *display_name_length
-       ); 
-
-       /*****************/
-       /* Function 0x21 */
-       WERROR svcctl_GetServiceKeyNameA(
-               [in,ref] policy_handle *handle,
-               [in,unique] [string,charset(UTF16)] uint16 *service_name,
-               [out,ref] [string,charset(UTF16)] uint16 **key_name,
-               [in,out,unique] uint32 *display_name_length
-       );
-
-       /*****************/
-       /* Function 0x22 */
-       [todo] WERROR svcctl_GetCurrentGroupeStateW(
-       );
-
-       /*****************/
-       /* Function 0x23 */
-       [todo] WERROR svcctl_EnumServiceGroupW(
-       );
-
-       /*****************/
-       /* Function 0x24 */
-       WERROR svcctl_ChangeServiceConfig2A(
-               [in,ref] policy_handle *handle,
-               [in] uint32 info_level,
-               [in,unique] uint8 *info
-       );
-
-       /*****************/
-       /* Function 0x25 */
-       WERROR svcctl_ChangeServiceConfig2W(
-               [in,ref] policy_handle *handle,
-               [in] uint32 info_level,
-               [in,unique] uint8 *info
-       );
-
-       /*****************/
-       /* Function 0x26 */
-       WERROR svcctl_QueryServiceConfig2A(
-               [in,ref] policy_handle *handle,
-               [in] uint32 info_level,
-               [out] uint8 buffer[buf_size],
-               [in] uint32 buf_size,
-               [out,ref] uint32 *bytes_needed
-       );
-
-       /*****************/
-       /* Function 0x27 */
-       WERROR svcctl_QueryServiceConfig2W(
-               [in,ref] policy_handle *handle,
-               [in] uint32 info_level,
-               [out] uint8 buffer[buf_size],
-               [in] uint32 buf_size,
-               [out,ref] uint32 *bytes_needed
-       );
-
-       /*****************/
-       /* Function 0x28 */
-       WERROR svcctl_QueryServiceStatusEx(
-               [in,ref] policy_handle *handle,
-               [in] uint32 info_level,
-               [out] uint8 buffer[buf_size],
-               [in] uint32 buf_size,
-               [out,ref] uint32 *bytes_needed
-       );
-
-       /*****************/
-       /* Function 0x29 */
-       WERROR EnumServicesStatusExA(
-               [in,ref] policy_handle *scmanager,
-               [in] uint32 info_level,
-               [in] uint32 type,
-               [in] uint32 state,
-               [out] uint8 services[buf_size],
-               [in] uint32 buf_size,
-               [out,ref] uint32 *bytes_needed,
-               [out,ref] uint32 *service_returned,
-               [in,out,unique] uint32 *resume_handle,
-               [out,ref] [string,charset(UTF16)] uint16 **group_name
-       );
-
-       /*****************/
-       /* Function 0x2a */
-       WERROR EnumServicesStatusExW(
-               [in,ref] policy_handle *scmanager,
-               [in] uint32 info_level,
-               [in] uint32 type,
-               [in] uint32 state,
-               [out] uint8 services[buf_size],
-               [in] uint32 buf_size,
-               [out,ref] uint32 *bytes_needed,
-               [out,ref] uint32 *service_returned,
-               [in,out,unique] uint32 *resume_handle,
-               [out,ref] [string,charset(UTF16)] uint16 **group_name
-       );
-
-       /*****************/
-       /* Function 0x2b */
-       [todo] WERROR svcctl_SCSendTSMessage(
-       );
-}
index 1e01a911977cac300d5603851c63c9ef32bdacc8..643dc9e4589a68c1de62515923cb6b499cde33fa 100644 (file)
@@ -240,11 +240,11 @@ import "lsa.idl", "security.idl";
        /* Function: 0x11 */
        [public] WERROR winreg_QueryValue(
                [in,ref] policy_handle *handle,
-               [in] winreg_String value_name,
+               [in,ref] winreg_String *value_name,
                [in,out,unique] winreg_Type *type,
-               [in,out,unique,size_is(*size),length_is(*length)] uint8 *data,
-               [in,out,unique] uint32 *size,
-               [in,out,unique] uint32 *length
+               [in,out,unique,size_is(*data_size),length_is(*data_length)] uint8 *data,
+               [in,out,unique] uint32 *data_size,
+               [in,out,unique] uint32 *data_length
        );
 
        /******************/
@@ -309,7 +309,7 @@ import "lsa.idl", "security.idl";
                [in,unique] lsa_StringLarge *message,
                [in]    uint32 timeout,
                [in]    uint8 force_apps,
-               [in]    uint8 reboot
+               [in]    uint8 do_reboot
        );
 
        /******************/
@@ -369,7 +369,7 @@ import "lsa.idl", "security.idl";
                [in,unique] lsa_StringLarge *message,
                [in] uint32 timeout,
                [in] uint8 force_apps,
-               [in] uint8 reboot,
+               [in] uint8 do_reboot,
                [in] uint32 reason
        );
 
diff --git a/source4/librpc/idl/wkssvc.idl b/source4/librpc/idl/wkssvc.idl
deleted file mode 100644 (file)
index 023ce59..0000000
+++ /dev/null
@@ -1,795 +0,0 @@
-#include "idl_types.h"
-
-/*
-  wkssvc interface definitions
-*/
-
-import "srvsvc.idl", "lsa.idl";
-
-[ uuid("6bffd098-a112-3610-9833-46c3f87e345a"),
-  version(1.0),
-  pointer_default(unique),
-  helpstring("Workstation Service"),
-  endpoint("ncacn_np:[\\pipe\\wkssvc]","ncacn_ip_tcp:","ncalrpc:")
-] interface wkssvc
-{
-       typedef [v1_enum] enum srvsvc_PlatformId srvsvc_PlatformId;
-
-#define BOOL uint32
-
-       /******************/
-       /* Function: 0x00 */
-
-       typedef struct {
-               srvsvc_PlatformId platform_id;
-               [string,charset(UTF16)] uint16 *server_name;
-               [string,charset(UTF16)] uint16 *domain_name;
-               uint32 version_major;
-               uint32 version_minor;
-       } wkssvc_NetWkstaInfo100;
-
-       typedef struct {
-               srvsvc_PlatformId platform_id;
-               [string,charset(UTF16)] uint16 *server_name;
-               [string,charset(UTF16)] uint16 *domain_name;
-               uint32 version_major;
-               uint32 version_minor;
-               [string,charset(UTF16)] uint16 *lan_root;
-       } wkssvc_NetWkstaInfo101;
-
-       typedef struct {
-               srvsvc_PlatformId platform_id;
-               [string,charset(UTF16)] uint16 *server_name;
-               [string,charset(UTF16)] uint16 *domain_name;
-               uint32 version_major;
-               uint32 version_minor;
-               [string,charset(UTF16)] uint16 *lan_root;
-               uint32 logged_on_users;
-       } wkssvc_NetWkstaInfo102;
-
-       /* FIXME: 302, 402 */
-
-       typedef struct {
-               uint32 char_wait;
-               uint32 collection_time;
-               uint32 maximum_collection_count;
-               uint32 keep_connection;
-               uint32 max_commands;
-               uint32 session_timeout;
-               uint32 size_char_buf;
-               uint32 max_threads;
-               uint32 lock_quota;
-               uint32 lock_increment;
-               uint32 lock_maximum;
-               uint32 pipe_increment;
-               uint32 pipe_maximum;
-               uint32 cache_file_timeout;
-               uint32 dormant_file_limit;
-               uint32 read_ahead_throughput;
-               uint32 num_mailslot_buffers;
-               uint32 num_srv_announce_buffers;
-               uint32 max_illegal_dgram_events;
-               uint32 dgram_event_reset_freq;
-               BOOL log_election_packets;
-               BOOL use_opportunistic_locking;
-               BOOL use_unlock_behind;
-               BOOL use_close_behind;
-               BOOL buf_named_pipes;
-               BOOL use_lock_read_unlock;
-               BOOL utilize_nt_caching;
-               BOOL use_raw_read;
-               BOOL use_raw_write;
-               BOOL use_write_raw_data;
-               BOOL use_encryption;
-               BOOL buf_files_deny_write;
-               BOOL buf_read_only_files;
-               BOOL force_core_create_mode;
-               BOOL use_512_byte_max_transfer;
-       } wkssvc_NetWkstaInfo502;
-
-       typedef struct {
-               uint32 char_wait;
-       } wkssvc_NetWkstaInfo1010;
-
-       typedef struct {
-               uint32 collection_time;
-       } wkssvc_NetWkstaInfo1011;
-
-       typedef struct {
-               uint32 maximum_collection_count;
-       } wkssvc_NetWkstaInfo1012;
-
-       typedef struct {
-               uint32 keep_connection;
-       } wkssvc_NetWkstaInfo1013;
-
-       typedef struct {
-               uint32 session_timeout;
-       } wkssvc_NetWkstaInfo1018;
-
-       typedef struct {
-               uint32 size_char_buf;
-       } wkssvc_NetWkstaInfo1023;
-
-       typedef struct {
-               uint32 errorlog_sz;
-       } wkssvc_NetWkstaInfo1027;
-
-       /* downlevel */
-       typedef struct {
-               uint32 print_buf_time;
-       } wkssvc_NetWkstaInfo1028;
-
-       /* downlevel */
-       typedef struct {
-               uint32 wrk_heuristics;
-       } wkssvc_NetWkstaInfo1032;
-
-       typedef struct {
-               uint32 max_threads;
-       } wkssvc_NetWkstaInfo1033;
-
-       typedef struct {
-               uint32 lock_quota;
-       } wkssvc_NetWkstaInfo1041;
-
-       typedef struct {
-               uint32 lock_increment;
-       } wkssvc_NetWkstaInfo1042;
-
-       typedef struct {
-               uint32 lock_maximum;
-       } wkssvc_NetWkstaInfo1043;
-
-       typedef struct {
-               uint32 pipe_increment;
-       } wkssvc_NetWkstaInfo1044;
-
-       typedef struct {
-               uint32 pipe_maximum;
-       } wkssvc_NetWkstaInfo1045;
-
-       typedef struct {
-               uint32 dormant_file_limit;
-       } wkssvc_NetWkstaInfo1046;
-
-       typedef struct {
-               uint32 cache_file_timeout;
-       } wkssvc_NetWkstaInfo1047;
-
-       typedef struct {
-               uint32 use_opportunistic_locking;
-       } wkssvc_NetWkstaInfo1048;
-
-       typedef struct {
-               uint32 use_unlock_behind;
-       } wkssvc_NetWkstaInfo1049;
-
-       typedef struct {
-               uint32 use_close_behind;
-       } wkssvc_NetWkstaInfo1050;
-
-       typedef struct {
-               uint32 buf_named_pipes;
-       } wkssvc_NetWkstaInfo1051;
-
-       typedef struct {
-               uint32 use_lock_read_unlock;
-       } wkssvc_NetWkstaInfo1052;
-
-       typedef struct {
-               uint32 utilize_nt_caching;
-       } wkssvc_NetWkstaInfo1053;
-
-       typedef struct {
-               uint32 use_raw_read;
-       } wkssvc_NetWkstaInfo1054;
-
-       typedef struct {
-               uint32 use_raw_write;
-       } wkssvc_NetWkstaInfo1055;
-
-       typedef struct {
-               uint32 use_write_raw_data;
-       } wkssvc_NetWkstaInfo1056;
-
-       typedef struct {
-               uint32 use_encryption;
-       } wkssvc_NetWkstaInfo1057;
-
-       typedef struct {
-               uint32 buf_files_deny_write;
-       } wkssvc_NetWkstaInfo1058;
-
-       typedef struct {
-               uint32 buf_read_only_files;
-       } wkssvc_NetWkstaInfo1059;
-
-       typedef struct {
-               uint32 force_core_create_mode;
-       } wkssvc_NetWkstaInfo1060;
-
-       typedef struct {
-               uint32 use_512_byte_max_transfer;
-       } wkssvc_NetWkstaInfo1061;
-
-       typedef struct {
-               uint32 read_ahead_throughput;
-       } wkssvc_NetWkstaInfo1062;
-
-       typedef union {
-               [case(100)] wkssvc_NetWkstaInfo100 *info100;
-               [case(101)] wkssvc_NetWkstaInfo101 *info101;
-               [case(102)] wkssvc_NetWkstaInfo102 *info102;
-               [case(502)] wkssvc_NetWkstaInfo502 *info502;
-               [case(1010)] wkssvc_NetWkstaInfo1010 *info1010;
-               [case(1011)] wkssvc_NetWkstaInfo1011 *info1011;
-               [case(1012)] wkssvc_NetWkstaInfo1012 *info1012;
-               [case(1013)] wkssvc_NetWkstaInfo1013 *info1013;
-               [case(1018)] wkssvc_NetWkstaInfo1018 *info1018;
-               [case(1023)] wkssvc_NetWkstaInfo1023 *info1023;
-               [case(1027)] wkssvc_NetWkstaInfo1027 *info1027;
-               [case(1028)] wkssvc_NetWkstaInfo1028 *info1028;
-               [case(1032)] wkssvc_NetWkstaInfo1032 *info1032;
-               [case(1033)] wkssvc_NetWkstaInfo1033 *info1033;
-               [case(1041)] wkssvc_NetWkstaInfo1041 *info1041;
-               [case(1042)] wkssvc_NetWkstaInfo1042 *info1042;
-               [case(1043)] wkssvc_NetWkstaInfo1043 *info1043;
-               [case(1044)] wkssvc_NetWkstaInfo1044 *info1044;
-               [case(1045)] wkssvc_NetWkstaInfo1045 *info1045;
-               [case(1046)] wkssvc_NetWkstaInfo1046 *info1046;
-               [case(1047)] wkssvc_NetWkstaInfo1047 *info1047;
-               [case(1048)] wkssvc_NetWkstaInfo1048 *info1048;
-               [case(1049)] wkssvc_NetWkstaInfo1049 *info1049;
-               [case(1050)] wkssvc_NetWkstaInfo1050 *info1050;
-               [case(1051)] wkssvc_NetWkstaInfo1051 *info1051;
-               [case(1052)] wkssvc_NetWkstaInfo1052 *info1052;
-               [case(1053)] wkssvc_NetWkstaInfo1053 *info1053;
-               [case(1054)] wkssvc_NetWkstaInfo1054 *info1054;
-               [case(1055)] wkssvc_NetWkstaInfo1055 *info1055;
-               [case(1056)] wkssvc_NetWkstaInfo1056 *info1056;
-               [case(1057)] wkssvc_NetWkstaInfo1057 *info1057;
-               [case(1058)] wkssvc_NetWkstaInfo1058 *info1058;
-               [case(1059)] wkssvc_NetWkstaInfo1059 *info1059;
-               [case(1060)] wkssvc_NetWkstaInfo1060 *info1060;
-               [case(1061)] wkssvc_NetWkstaInfo1061 *info1061;
-               [case(1062)] wkssvc_NetWkstaInfo1062 *info1062;
-               [default] ;
-       } wkssvc_NetWkstaInfo;
-
-       WERROR wkssvc_NetWkstaGetInfo(
-               [in,unique]   [string,charset(UTF16)] uint16 *server_name,
-               [in]   uint32 level,
-               [out,switch_is(level),ref]  wkssvc_NetWkstaInfo *info
-               );
-
-
-       /******************/
-       /* Function: 0x01 */
-       WERROR wkssvc_NetWkstaSetInfo(
-               [in,unique]   [string,charset(UTF16)] uint16 *server_name,
-               [in]   uint32 level,
-               [in,switch_is(level),ref]  wkssvc_NetWkstaInfo *info,
-               [in,out,ref]   uint32 *parm_error
-               );
-
-
-       /*****************************/
-       /* Function        0x02      */
-       typedef struct {
-               [string,charset(UTF16)] uint16 *user_name;
-       } wkssvc_NetrWkstaUserInfo0;
-
-       typedef struct {
-               uint32 entries_read;
-               [size_is(entries_read)] wkssvc_NetrWkstaUserInfo0 *user0;
-       } wkssvc_NetWkstaEnumUsersCtr0;
-
-       typedef struct {
-               [string,charset(UTF16)] uint16 *user_name;
-               [string,charset(UTF16)] uint16 *logon_domain;
-               [string,charset(UTF16)] uint16 *other_domains;
-               [string,charset(UTF16)] uint16 *logon_server;
-       } wkssvc_NetrWkstaUserInfo1;
-
-       typedef struct {
-               uint32 entries_read;
-               [size_is(entries_read)] wkssvc_NetrWkstaUserInfo1 *user1;
-       } wkssvc_NetWkstaEnumUsersCtr1;
-
-       typedef [switch_type(uint32)] union {
-               [case(0)] wkssvc_NetWkstaEnumUsersCtr0 *user0;
-               [case(1)] wkssvc_NetWkstaEnumUsersCtr1 *user1;
-       } wkssvc_NetWkstaEnumUsersCtr;
-
-       typedef struct {
-               uint32 level;
-               [switch_is(level)] wkssvc_NetWkstaEnumUsersCtr ctr;
-       } wkssvc_NetWkstaEnumUsersInfo;
-
-       WERROR wkssvc_NetWkstaEnumUsers(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,out,ref] wkssvc_NetWkstaEnumUsersInfo *info,
-               [in] uint32 prefmaxlen,
-               [out,ref] uint32 *entries_read,
-               [in,out,unique] uint32 *resume_handle
-               );
-
-       /*****************************/
-       /* Function        0x03      */
-       typedef struct {
-               [string,charset(UTF16)] uint16 *other_domains;
-       } wkssvc_NetrWkstaUserInfo1101;
-
-       typedef [switch_type(uint32)] union {
-               [case(0)] wkssvc_NetrWkstaUserInfo0 *info0;
-               [case(1)] wkssvc_NetrWkstaUserInfo1 *info1;
-               [case(1101)] wkssvc_NetrWkstaUserInfo1101 *info1101;
-       } wkssvc_NetrWkstaUserInfo;
-
-       WERROR wkssvc_NetrWkstaUserGetInfo(
-               [in,unique] [string,charset(UTF16)] uint16 *unknown,
-               [in] uint32 level,
-               [out,ref] [switch_is(level)] wkssvc_NetrWkstaUserInfo *info
-               );
-
-       /*****************************/
-       /* Function        0x04      */
-       WERROR wkssvc_NetrWkstaUserSetInfo(
-               [in,unique] [string,charset(UTF16)] uint16 *unknown,
-               [in] uint32 level,
-               [in,ref] [switch_is(level)] wkssvc_NetrWkstaUserInfo *info,
-               [in,out,unique] uint32 *parm_err
-               );
-
-       /*****************************/
-       /* Function        0x05      */
-
-       typedef struct {
-               uint32 quality_of_service;
-               uint32 vc_count;
-               [string,charset(UTF16)] uint16 *name;
-               [string,charset(UTF16)] uint16 *address;
-               uint32 wan_link;
-       } wkssvc_NetWkstaTransportInfo0;
-
-       typedef struct {
-               uint32 count;
-               [size_is(count)] wkssvc_NetWkstaTransportInfo0 *array;
-       } wkssvc_NetWkstaTransportCtr0;
-
-       typedef union {
-               [case(0)] wkssvc_NetWkstaTransportCtr0 *ctr0;
-       } wkssvc_NetWkstaTransportCtr;
-
-       typedef struct {
-               uint32 level;
-               [switch_is(level)] wkssvc_NetWkstaTransportCtr ctr;
-       } wkssvc_NetWkstaTransportInfo;
-
-       WERROR wkssvc_NetWkstaTransportEnum (
-               [in,unique]         [string,charset(UTF16)] uint16 *server_name,
-               [in,out,ref] wkssvc_NetWkstaTransportInfo *info,
-               [in]         uint32 max_buffer,
-               [out,ref]    uint32 *total_entries,
-               [in,out,unique]     uint32 *resume_handle
-               );
-
-       /*****************************/
-       /* Function        0x06      */
-       /* only supported on NT */
-       WERROR wkssvc_NetrWkstaTransportAdd(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in] uint32 level, /* must be 0 */
-               [in,ref] wkssvc_NetWkstaTransportInfo0 *info0,
-               [in,out,unique] uint32 *parm_err
-                );
-
-       /*****************************/
-       /* Function        0x07      */
-       /* only supported on NT */
-       WERROR wkssvc_NetrWkstaTransportDel(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,unique] [string,charset(UTF16)] uint16 *transport_name,
-               [in] uint32 unknown3
-               );
-
-       /*****************************/
-       /* Function        0x08      */
-       typedef struct {
-               [string,charset(UTF16)] uint16 *unknown1;
-               [string,charset(UTF16)] uint16 *unknown2;
-       } wkssvc_NetrUseInfo3;
-
-       typedef struct {
-               [string,charset(UTF16)] uint16 *local;
-               [string,charset(UTF16)] uint16 *remote;
-               [string,charset(UTF16)] uint16 *password;
-               uint32 status;
-               uint32 asg_type;
-               uint32 ref_count;
-               uint32 use_count;
-               [string,charset(UTF16)] uint16 *user_name;
-               [string,charset(UTF16)] uint16 *domain_name;
-       } wkssvc_NetrUseInfo2;
-
-       typedef struct {
-               [string,charset(UTF16)] uint16 *local;
-               [string,charset(UTF16)] uint16 *remote;
-               [string,charset(UTF16)] uint16 *password;
-               uint32 status;
-               uint32 asg_type;
-               uint32 ref_count;
-               uint32 use_count;
-       } wkssvc_NetrUseInfo1;
-
-       typedef struct {
-               [string,charset(UTF16)] uint16 *local;
-               [string,charset(UTF16)] uint16 *remote;
-       } wkssvc_NetrUseInfo0;
-
-       typedef [switch_type(uint32)] union {
-               [case(0)] wkssvc_NetrUseInfo0 *info0;
-               [case(1)] wkssvc_NetrUseInfo1 *info1;
-               [case(2)] wkssvc_NetrUseInfo2 *info2;
-               [case(3)] wkssvc_NetrUseInfo3 *info3;
-       } wkssvc_NetrUseGetInfoCtr;
-
-       WERROR wkssvc_NetrUseAdd(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in] uint32 level,
-               [in,ref] [switch_is(level)] wkssvc_NetrUseGetInfoCtr *ctr,
-               [in,out,unique] uint32 *parm_err
-               );
-
-       /*****************************/
-       /* Function        0x09      */
-       WERROR wkssvc_NetrUseGetInfo(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,ref] [string,charset(UTF16)] uint16 *use_name,
-               [in] uint32 level,
-               [out,ref] [switch_is(level)] wkssvc_NetrUseGetInfoCtr *ctr
-               );
-
-       /*****************************/
-       /* Function        0x0a      */
-       WERROR wkssvc_NetrUseDel(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,ref] [string,charset(UTF16)] uint16 *use_name,
-               [in] uint32 force_cond
-               );
-
-       /*****************************/
-       /* Function        0x0b      */
-       typedef struct {
-               uint32 count;
-               [size_is(count)] wkssvc_NetrUseInfo2 *array;
-       } wkssvc_NetrUseEnumCtr2;
-
-       typedef struct {
-               uint32 count;
-               [size_is(count)] wkssvc_NetrUseInfo1 *array;
-       } wkssvc_NetrUseEnumCtr1;
-
-       typedef struct {
-               uint32 count;
-               [size_is(count)] wkssvc_NetrUseInfo0 *array;
-       } wkssvc_NetrUseEnumCtr0;
-
-       typedef [switch_type(uint32)] union {
-               [case(0)] wkssvc_NetrUseEnumCtr0 *ctr0;
-               [case(1)] wkssvc_NetrUseEnumCtr1 *ctr1;
-               [case(2)] wkssvc_NetrUseEnumCtr2 *ctr2;
-       } wkssvc_NetrUseEnumCtr;
-
-       typedef struct {
-               uint32 level;
-               [switch_is(level)] wkssvc_NetrUseEnumCtr ctr;
-       } wkssvc_NetrUseEnumInfo;
-
-       WERROR wkssvc_NetrUseEnum(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,out,ref] wkssvc_NetrUseEnumInfo *info,
-               [in] uint32 prefmaxlen,
-               [out,ref] uint32 *entries_read,
-               [in,out,unique] uint32 *resume_handle
-               );
-
-       /*****************************/
-       /* Function        0x0c      */
-       WERROR wkssvc_NetrMessageBufferSend(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,ref] [string,charset(UTF16)] uint16 *message_name,
-               [in,unique] [string,charset(UTF16)] uint16 *message_sender_name,
-               [in,ref] [size_is(message_size)] uint8 *message_buffer,
-               [in] uint32 message_size
-               );
-
-       /*****************************/
-       /* Function        0x0d      */
-       typedef struct {
-               hyper unknown1;
-               hyper unknown2;
-               hyper unknown3;
-               hyper unknown4;
-               hyper unknown5;
-               hyper unknown6;
-               hyper unknown7;
-               hyper unknown8;
-               hyper unknown9;
-               hyper unknown10;
-               hyper unknown11;
-               hyper unknown12;
-               hyper unknown13;
-               uint32 unknown14;
-               uint32 unknown15;
-               uint32 unknown16;
-               uint32 unknown17;
-               uint32 unknown18;
-               uint32 unknown19;
-               uint32 unknown20;
-               uint32 unknown21;
-               uint32 unknown22;
-               uint32 unknown23;
-               uint32 unknown24;
-               uint32 unknown25;
-               uint32 unknown26;
-               uint32 unknown27;
-               uint32 unknown28;
-               uint32 unknown29;
-               uint32 unknown30;
-               uint32 unknown31;
-               uint32 unknown32;
-               uint32 unknown33;
-               uint32 unknown34;
-               uint32 unknown35;
-               uint32 unknown36;
-               uint32 unknown37;
-               uint32 unknown38;
-               uint32 unknown39;
-               uint32 unknown40;
-       } wkssvc_NetrWorkstationStatistics;
-
-       WERROR wkssvc_NetrWorkstationStatisticsGet(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,unique] [string,charset(UTF16)] uint16 *unknown2,
-               [in] uint32 unknown3,
-               [in] uint32 unknown4,
-               [out,ref] wkssvc_NetrWorkstationStatistics **info
-               );
-
-       /*****************************/
-       /* Function        0x0e      */
-       WERROR wkssvc_NetrLogonDomainNameAdd(
-               [in,ref] [string,charset(UTF16)] uint16 *domain_name
-               );
-
-       /*****************************/
-       /* Function        0x0f      */
-       WERROR wkssvc_NetrLogonDomainNameDel(
-               [in,ref] [string,charset(UTF16)] uint16 *domain_name
-               );
-
-       /*****************************/
-       /* Function        0x10      */
-       WERROR wkssvc_NetrJoinDomain(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,ref] [string,charset(UTF16)] uint16 *domain_name,
-               [in,unique] [string,charset(UTF16)] uint16 *account_ou,
-               [in,unique] [string,charset(UTF16)] uint16 *Account,
-               [in,unique] [string,charset(UTF16)] uint16 *password,
-               [in] wkssvc_joinflags join_flags
-               );
-
-       /*****************************/
-       /* Function        0x11      */
-       WERROR wkssvc_NetrUnjoinDomain(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,unique] [string,charset(UTF16)] uint16 *Account,
-               [in,unique] [string,charset(UTF16)] uint16 *password,
-               [in] wkssvc_joinflags unjoin_flags
-               );
-
-       /*****************************/
-       /* Function        0x12      */
-       typedef [bitmap32bit] bitmap {
-               /* TRUE: create the account in the domain */
-               WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE        = 0x00000002
-       } wkssvc_renameflags;
-
-       WERROR wkssvc_NetrRenameMachineInDomain(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,unique] [string,charset(UTF16)] uint16 *NewMachineName,
-               [in,unique] [string,charset(UTF16)] uint16 *Account,
-               [in,unique] [string,charset(UTF16)] uint16 *password,
-               [in] wkssvc_renameflags RenameOptions
-               );
-
-       /*****************************/
-       /* Function        0x13      */
-       typedef enum {
-               NetSetupUnknown = 0,
-               NetSetupMachine = 1,
-               NetSetupWorkgroup = 2,
-               NetSetupDomain = 3,
-               NetSetupNonExistentDomain = 4,
-               NetSetupDnsMachine = 5
-       } wkssvc_NetValidateNameType;
-
-       WERROR wkssvc_NetrValidateName(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,ref] [string,charset(UTF16)] uint16 *name,
-               [in,unique] [string,charset(UTF16)] uint16 *Account,
-               [in,unique] [string,charset(UTF16)] uint16 *Password,
-               [in] wkssvc_NetValidateNameType name_type
-               );
-
-       /*****************************/
-       /* Function        0x14      */
-       typedef enum {
-               NetSetupUnknownStatus = 0,
-               NetSetupUnjoined = 1,
-               NetSetupWorkgroupName = 2,
-               NetSetupDomainName = 3
-       } wkssvc_NetJoinStatus;
-
-       WERROR wkssvc_NetrGetJoinInformation(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,out,ref] [string,charset(UTF16)] uint16 **name_buffer,
-               [out,ref] wkssvc_NetJoinStatus *name_type
-               );
-
-       /*****************************/
-       /* Function        0x15      */
-       WERROR wkssvc_NetrGetJoinableOus(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,ref] [string,charset(UTF16)] uint16 *domain_name,
-               [in,unique] [string,charset(UTF16)] uint16 *Account,
-               [in,unique] [string,charset(UTF16)] uint16 *unknown,
-               [in,out,ref] uint32 *num_ous,
-               /*
-                * this is a [ref] pointer to a [unique] pointer to an
-                * array of [unique] pointers to a string array
-                */
-               [out,ref] [size_is(,*num_ous)] [string,charset(UTF16)] uint16 ***ous
-               );
-
-       typedef [flag(NDR_PAHEX)] struct {
-               uint8 data[524];
-       } wkssvc_PasswordBuffer;
-
-       typedef [bitmap32bit] bitmap {
-               WKSSVC_JOIN_FLAGS_JOIN_WITH_NEW_NAME    = 0x00000400,
-               WKSSVC_JOIN_FLAGS_JOIN_DC_ACCOUNT       = 0x00000200,
-               /* TRUE: defer setting the SPN and dNSHostName until a rename operation */
-               WKSSVC_JOIN_FLAGS_DEFER_SPN             = 0x00000100,
-
-               /* TRUE: set the machine password to the provided one after the join completes */
-               WKSSVC_JOIN_FLAGS_MACHINE_PWD_PASSED    = 0x00000080,
-
-               /* TRUE: perform an unsecured join */
-               WKSSVC_JOIN_FLAGS_JOIN_UNSECURE         = 0x00000040,
-
-               /* TRUE: allow the join to complete even if the account already exists */
-               WKSSVC_JOIN_FLAGS_DOMAIN_JOIN_IF_JOINED = 0x00000020,
-
-               /* TRUE: this join is part of a w9x upgrade */
-               WKSSVC_JOIN_FLAGS_WIN9X_UPGRADE         = 0x00000010,
-
-               /* TRUE: delete the account when the domain is left */
-               WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE        = 0x00000004,
-
-               /* TRUE: create the account in the domain */
-               WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE        = 0x00000002,
-
-               /* TRUE: join domain    FALSE: join workgroup */
-               WKSSVC_JOIN_FLAGS_JOIN_TYPE             = 0x00000001
-
-       } wkssvc_joinflags;
-
-       /*****************************/
-       /* Function        0x16      */
-       WERROR wkssvc_NetrJoinDomain2 (
-               [in,unique]  [string,charset(UTF16)] uint16 *server_name,
-               [in,ref]     [string,charset(UTF16)] uint16 *domain_name,
-               [in,unique]  [string,charset(UTF16)] uint16 *account_ou,
-               [in,unique]  [string,charset(UTF16)] uint16 *admin_account,
-               [in,unique]  wkssvc_PasswordBuffer *encrypted_password,
-               [in]         wkssvc_joinflags join_flags
-               );
-
-       /*****************************/
-       /* Function        0x17      */
-       WERROR wkssvc_NetrUnjoinDomain2 (
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,unique] [string,charset(UTF16)] uint16 *account,
-               [in,unique] wkssvc_PasswordBuffer *encrypted_password,
-               [in] wkssvc_joinflags unjoin_flags
-               );
-
-       /*****************************/
-       /* Function        0x18      */
-       WERROR wkssvc_NetrRenameMachineInDomain2(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,unique] [string,charset(UTF16)] uint16 *NewMachineName,
-               [in,unique] [string,charset(UTF16)] uint16 *Account,
-               [in,unique] wkssvc_PasswordBuffer *EncryptedPassword,
-               [in] wkssvc_renameflags RenameOptions
-               );
-
-       /*****************************/
-       /* Function        0x19      */
-       WERROR wkssvc_NetrValidateName2(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,ref] [string,charset(UTF16)] uint16 *name,
-               [in,unique] [string,charset(UTF16)] uint16 *Account,
-               [in,unique] wkssvc_PasswordBuffer *EncryptedPassword,
-               [in] wkssvc_NetValidateNameType name_type
-               );
-
-       /*****************************/
-       /* Function        0x1a      */
-       WERROR wkssvc_NetrGetJoinableOus2(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,ref] [string,charset(UTF16)] uint16 *domain_name,
-               [in,unique] [string,charset(UTF16)] uint16 *Account,
-               [in,unique] wkssvc_PasswordBuffer *EncryptedPassword,
-               [in,out,ref] uint32 *num_ous,
-               /*
-                * this is a [ref] pointer to a [unique] pointer to an
-                * array of [unique] pointers to a string array
-                */
-               [out,ref] [size_is(,*num_ous)] [string,charset(UTF16)] uint16 ***ous
-               );
-
-       /*****************************/
-       /* Function        0x1b      */
-       WERROR wkssvc_NetrAddAlternateComputerName(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,unique] [string,charset(UTF16)] uint16 *NewAlternateMachineName,
-               [in,unique] [string,charset(UTF16)] uint16 *Account,
-               [in,unique] wkssvc_PasswordBuffer *EncryptedPassword,
-               [in] uint32 Reserved
-               );
-
-       /*****************************/
-       /* Function        0x1c      */
-       WERROR wkssvc_NetrRemoveAlternateComputerName(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,unique] [string,charset(UTF16)] uint16 *AlternateMachineNameToRemove,
-               [in,unique] [string,charset(UTF16)] uint16 *Account,
-               [in,unique] wkssvc_PasswordBuffer *EncryptedPassword,
-               [in] uint32 Reserved
-               );
-
-       /*****************************/
-       /* Function        0x1d      */
-       WERROR wkssvc_NetrSetPrimaryComputername(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in,unique] [string,charset(UTF16)] uint16 *primary_name,
-               [in,unique] [string,charset(UTF16)] uint16 *Account,
-               [in,unique] wkssvc_PasswordBuffer *EncryptedPassword,
-               [in] uint32 Reserved
-               );
-
-       /*****************************/
-       /* Function        0x1e      */
-       typedef enum {
-               NetPrimaryComputerName = 0,
-               NetAlternateComputerNames = 1,
-               NetAllComputerNames = 2,
-               NetComputerNameTypeMax = 3
-       } wkssvc_ComputerNameType;
-
-       typedef struct {
-               uint32 count;
-               [size_is(count)] lsa_String *computer_name;
-        } wkssvc_ComputerNamesCtr;
-
-       WERROR wkssvc_NetrEnumerateComputerNames(
-               [in,unique] [string,charset(UTF16)] uint16 *server_name,
-               [in] wkssvc_ComputerNameType name_type,
-               [in] uint32 Reserved,
-               [out,ref] wkssvc_ComputerNamesCtr **ctr
-               );
-}
index 79548f81bcd9da1045603230abfec83aa2b4c2f6..a143284f1787f8ea2c4181ee62cc088ff2ece68e 100644 (file)
@@ -587,8 +587,7 @@ _PUBLIC_ void ndr_print_string_array(struct ndr_print *ndr, const char *name, co
        ndr->depth++;
        for (i=0;i<count;i++) {
                char *idx=NULL;
-               asprintf(&idx, "[%d]", i);
-               if (idx) {
+               if (asprintf(&idx, "[%d]", i) != -1) {
                        ndr_print_string(ndr, idx, a[i]);
                        free(idx);
                }
index d73e82bb71344a7bceb1d1d60f296721d86f9238..6308ba20dda9b9885a982fdc003b8d334135ed3a 100644 (file)
@@ -21,7 +21,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "librpc/ndr/libndr.h"
 #include "librpc/ndr/ndr_table.h"
 
index 4e07cc7b57c89e4233da1df00f7fdca70131de8e..bd8e60d4bdeb9e0905630cd3e9eb9eddd3933f8b 100644 (file)
@@ -21,7 +21,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "lib/events/events.h"
 #include "librpc/rpc/dcerpc.h"
 #include "librpc/rpc/dcerpc_proto.h"
index 2b38c65669077df7221ad58f69e2d65940d11627..482e803a359f462b174009843bdd23aeacd30530 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef __DCERPC_H__
 #define __DCERPC_H__
 
-#include "lib/util/data_blob.h"
+#include "../lib/util/data_blob.h"
 #include "librpc/gen_ndr/dcerpc.h"
 #include "librpc/ndr/libndr.h"
 
index 8aa93942b96381b7ca57ce6daacd5155d6042a5a..230939bb486cb3e0f6e0cdf17d70615ece9c3bd0 100755 (executable)
@@ -1,24 +1,23 @@
 #!/bin/sh
 
 FULLBUILD=$1
-IDLDIR=$2
-OUTDIR=$3
-shift 3
-PIDL_EXTRA_ARGS="$*"
+OUTDIR=$2
+shift 2
+IDL_FILES="$*"
 
 [ -d $OUTDIR ] || mkdir -p $OUTDIR || exit 1
 
-PIDL="$PIDL --outputdir $OUTDIR --header --ndr-parser --server --client --swig --python --dcom-proxy --com-header -- $PIDL_EXTRA_ARGS"
+PIDL="$PIDL --outputdir $OUTDIR --header --ndr-parser --server --client --swig --python --dcom-proxy --com-header --includedir ../librpc/idl -- "
 
 if [ x$FULLBUILD = xFULL ]; then
       echo Rebuilding all idl files in $IDLDIR
-      $PIDL $IDLDIR/*.idl || exit 1
+      $PIDL $IDL_FILES || exit 1
       exit 0
 fi
 
 list=""
 
-for f in $IDLDIR/*.idl ; do
+for f in $IDL_FILES ; do
     basename=`basename $f .idl`
     ndr="$OUTDIR/ndr_$basename.c"
     # blergh - most shells don't have the -nt function
index 368dce9f59ba38734a0db037d671a18630a75ce5..8ce86b91ca2eac19a9f2a7fad9c9918f584b4e2a 100644 (file)
@@ -19,7 +19,7 @@ mkinclude lib/cmdline/config.mk
 mkinclude ../lib/socket_wrapper/config.mk
 mkinclude ../lib/nss_wrapper/config.mk
 mkinclude lib/stream/config.mk
-mkinclude lib/util/config.mk
+mkinclude ../lib/util/config.mk
 mkinclude lib/tdr/config.mk
 mkinclude lib/dbwrap/config.mk
 mkinclude ../lib/crypto/config.mk
index 08eebe0c555be9cd8cabb3e5762d9990aa598d9b..fbe22aa781bb7568efbc5506bb4553ef726b20a5 100644 (file)
@@ -20,7 +20,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "system/network.h"
 #include "nbt_server/nbt_server.h"
 #include "nbt_server/wins/winsserver.h"
index 1bc3e2b62fd63f7b260ec1549111719f95ec6cc2..c5b16fbd7576b5c72fb1dc5b752518aed2f4cb11 100644 (file)
@@ -26,7 +26,7 @@
 #include "lib/ldb/include/ldb.h"
 #include "dsdb/samdb/samdb.h"
 #include "auth/auth.h"
-#include "util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 #include "param/param.h"
 #include "smbd/service_task.h"
 #include "cldap_server/cldap_server.h"
index 76bc145903a97e5802ed34449a84d1c3d21a00ed..49406440cf75831b690501c71a47e15d39a66144 100644 (file)
@@ -20,7 +20,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "nbt_server/nbt_server.h"
 #include "smbd/service_task.h"
 #include "lib/socket/socket.h"
index a5f1426f37a04441c861c172a431373abdbdd7a9..8dc1f450537564d30729e945036757175946713f 100644 (file)
@@ -20,7 +20,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "system/network.h"
 #include "nbt_server/nbt_server.h"
 #include "lib/socket/socket.h"
index a8809e84a2c403854481f8555bc642c61a9ca06d..be1492f1cd1bb4bc8ca4f03a5d0011673d8585f6 100644 (file)
@@ -20,7 +20,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "system/network.h"
 #include "nbt_server/nbt_server.h"
 #include "nbt_server/wins/winsserver.h"
index ebdb4dc0f8ce2b8546f39a8c2dd21410cccbf0fe..1192cba3376317ee784ca5fd037e2ed3afa28d71 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "includes.h"
 #include "lib/events/events.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "nbt_server/nbt_server.h"
 #include "smbd/service_task.h"
 #include "libcli/composite/composite.h"
index 1d07f4a60aaff28ebe12a8591f3b7d5a8f270a14..133592f1fd42d3e97c207c4dd5681684da455c99 100644 (file)
@@ -140,7 +140,7 @@ static void nbtd_wins_refresh(struct event_context *ev, struct timed_event *te,
 
        /* setup a wins name refresh request */
        io.in.name            = iname->name;
-       io.in.wins_servers    = str_list_make(tmp_ctx, iname->wins_server, NULL);
+       io.in.wins_servers    = (const char **)str_list_make(tmp_ctx, iname->wins_server, NULL);
        io.in.wins_port       = lp_nbt_port(iface->nbtsrv->task->lp_ctx);
        io.in.addresses       = nbtd_address_list(iface, tmp_ctx);
        io.in.nb_flags        = iname->nb_flags;
diff --git a/source4/nsswitch/winbind_nss_netbsd.h b/source4/nsswitch/winbind_nss_netbsd.h
new file mode 100644 (file)
index 0000000..dceb57c
--- /dev/null
@@ -0,0 +1,40 @@
+/* 
+   Unix SMB/CIFS implementation.
+
+   NetBSD loadable authentication module, providing identification 
+   routines against Samba winbind/Windows NT Domain
+
+   Copyright (C) Luke Mewburn 2004-2005
+  
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 3 of the License, or (at your option) any later version.
+   
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+   
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _WINBIND_NSS_NETBSD_H
+#define _WINBIND_NSS_NETBSD_H
+
+#include <nsswitch.h>
+
+       /* dynamic nsswitch with "new" getpw* nsdispatch API available */
+#if defined(NSS_MODULE_INTERFACE_VERSION) && defined(HAVE_GETPWENT_R)
+
+typedef int NSS_STATUS;
+
+#define NSS_STATUS_SUCCESS     NS_SUCCESS
+#define NSS_STATUS_NOTFOUND    NS_NOTFOUND
+#define NSS_STATUS_UNAVAIL     NS_UNAVAIL
+#define NSS_STATUS_TRYAGAIN    NS_TRYAGAIN
+
+#endif /* NSS_MODULE_INTERFACE_VERSION && HAVE_GETPWENT_R */
+
+#endif /* _WINBIND_NSS_NETBSD_H */
index 3573fac3eadcfbd94b272cc2346260bddd34f72d..1636aa91e78a7ff90662ac5ffd1fa450ccdf1046 100644 (file)
@@ -34,7 +34,7 @@
 #include "auth/auth.h"
 #include "dsdb/samdb/samdb.h"
 #include "ldb_wrap.h"
-#include "util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 #include "rpc_server/common/common.h"
 #include "param/param.h"
 
index 9bc36a176266d61510db9cc668b51ae946681faf..322814ef5d7816ae3abf2a3f8ee0b41d3c5d7c2e 100644 (file)
@@ -31,7 +31,7 @@
 #include "auth/auth.h"
 #include "auth/credentials/credentials.h"
 #include "ntvfs/ntvfs.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "param/param.h"
 #include "libcli/resolve/resolve.h"
 
index a61ac16669bd0a8f3615bc932d97d0fa25739b11..34a26b06b48a528c11001007a618606e3b076ea2 100644 (file)
@@ -31,7 +31,7 @@
 #include "system/filesys.h"
 #include "cifsposix.h"
 #include "system/time.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "ntvfs/ntvfs.h"
 #include "ntvfs/cifs_posix_cli/proto.h"
 
index a35ef365b0225457a1ed0df22fadf617d8e2d326..dbe4722d37e487ac0d4720613308156dd766607e 100644 (file)
 #include "includes.h"
 #include "system/filesys.h"
 #include "../tdb/include/tdb.h"
-#include "lib/util/util_tdb.h"
+#include "../lib/util/util_tdb.h"
 #include "messaging/messaging.h"
 #include "tdb_wrap.h"
 #include "lib/messaging/irpc.h"
 #include "librpc/gen_ndr/ndr_notify.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "ntvfs/common/ntvfs_common.h"
 #include "ntvfs/sysdep/sys_notify.h"
 #include "cluster/cluster.h"
index 8ac7ac7d03486bc2194c283b3a3e89cbe797eff0..5a63edcc3e97caecc114bee5a2ba68593b09ba00 100644 (file)
@@ -25,7 +25,7 @@
 
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "ntvfs/ntvfs.h"
 #include "libcli/rap/rap.h"
 #include "ntvfs/ipc/proto.h"
index 5de8a8b6491cd7e0f81915907de5b4fbc8153a47..0d5738d9f0bd2e350697e2184f1af35e3bd443c6 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "libcli/raw/interfaces.h"
 #include "param/share.h"
+#include "librpc/gen_ndr/security.h"
 
 /* modules can use the following to determine if the interface has changed */
 /* version 1 -> 0 - make module stacking easier -- metze */
index 1385481bbc68224fac5fcc61aec9a1ad727bb060..c2501aaba9f4a3dc90a184943826572d921e7f08 100644 (file)
@@ -23,7 +23,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "ntvfs/ntvfs.h"
 #include "param/param.h"
 
index fadbe2b80a4bad5e43ab817bb3d26cc3e5534587..116313925522f88b302323dba6cfe8b30973c14c 100644 (file)
@@ -21,7 +21,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "ntvfs/ntvfs.h"
 
 
index fa855555b2af3a9fc286984bf679384e63af09fa..02ed058af794115b0ba667fb893686867d726b44 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "includes.h"
 #include "vfs_posix.h"
-#include "lib/util/unix_privs.h"
+#include "../lib/util/unix_privs.h"
 #include "librpc/gen_ndr/ndr_nfs4acl.h"
 #include "libcli/security/security.h"
 
index 1cf52718c2b7b25ed2ead09311b5db386b0be848..87bb6bcb94401783fd9f29fdca4dee672300d6b7 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "includes.h"
 #include "vfs_posix.h"
-#include "lib/util/unix_privs.h"
+#include "../lib/util/unix_privs.h"
 #include "librpc/gen_ndr/ndr_xattr.h"
 
 /*
index 0054455838a98246df26b0410e20bd2666d6bd5f..173b2fe187fdee8108b629ea57da02733afbff2f 100644 (file)
@@ -22,7 +22,7 @@
 #include "includes.h"
 #include "vfs_posix.h"
 #include "system/time.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "messaging/messaging.h"
 
 
index 06d2bc8e0c65b16b08a4a4e0e87725f03435ea6b..719b7fa5fc70c227d771ba4cd45d987d4449304a 100644 (file)
@@ -23,7 +23,7 @@
 #include "vfs_posix.h"
 #include "lib/messaging/irpc.h"
 #include "messaging/messaging.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "lib/events/events.h"
 
 /* pending notifies buffer, hung off struct pvfs_file for open directories
index 8dbc6742419602c00044629dd74c10461679da33..8a32f0122335c6549872462d6ee200c93ea2ade6 100644 (file)
@@ -23,7 +23,7 @@
 #include "vfs_posix.h"
 #include "system/dir.h"
 #include "system/time.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "messaging/messaging.h"
 #include "librpc/gen_ndr/xattr.h"
 
index e0fe4fb64d9ca5ebe84c2f6c1c6974652d0c2606..b84684573189be632b946af9abfb483e59e846dd 100644 (file)
@@ -25,7 +25,7 @@
 #include "librpc/gen_ndr/security.h"
 #include "smbd/service_stream.h"
 #include "lib/events/events.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 
 /* place a reasonable limit on old-style searches as clients tend to
    not send search close requests */
index 291250befd2eaf986fec2574674a5f1a1f22ffb6..c22a0c8792d48bd305d3c586a825d4174a21dcb5 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "includes.h"
 #include "lib/events/events.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "vfs_posix.h"
 #include "smbd/service_stream.h"
 #include "lib/messaging/irpc.h"
index 7a2945cd05499e8343fc2bf8e0d5d7f2fbf81557..1ca09402a322aa3275da4428eeb6e7a1dde6defc 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "includes.h"
 #include "vfs_posix.h"
-#include "lib/util/unix_privs.h"
+#include "../lib/util/unix_privs.h"
 #include "librpc/gen_ndr/ndr_xattr.h"
 #include "param/param.h"
 
index 797496dd7893b1180e4c894edfc4ba81db10f692..601c876cfb9aa2bc28bfa1ec611ccc72ef1d0d9c 100644 (file)
@@ -28,7 +28,7 @@
 #include "librpc/gen_ndr/security.h"
 #include "../tdb/include/tdb.h"
 #include "tdb_wrap.h"
-#include "util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 #include "libcli/security/security.h"
 #include "lib/events/events.h"
 #include "param/param.h"
index 9a89f2a338b70a72fadc2327de1e2889d34ba1c9..f22c0e9ea4b04d1d6bf3cdc988412bdd44add525 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "includes.h"
 #include "vfs_posix.h"
-#include "lib/util/wrap_xattr.h"
+#include "../lib/util/wrap_xattr.h"
 
 /*
   pull a xattr as a blob, from either a file or a file descriptor
index dfc07f348329efcc9ffc8cdfd81ac59bac4e38b0..5d904b4fcbdc0c6e6bc1ef20b4e213349e608b3d 100644 (file)
@@ -30,7 +30,7 @@
 #include "system/filesys.h"
 #include "svfs.h"
 #include "system/time.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "ntvfs/ntvfs.h"
 #include "ntvfs/simple/proto.h"
 
index 68b475a0845fd355e4a9d5341aeff5e1f28bd95e..2c1461b9167679a01c7af1bb7388e3798067502e 100644 (file)
@@ -35,7 +35,7 @@
 #include "auth/auth.h"
 #include "auth/credentials/credentials.h"
 #include "ntvfs/ntvfs.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "param/param.h"
 #include "libcli/resolve/resolve.h"
 #include "libcli/smb2/smb2.h"
index 093c15abab6d3a2a9d16bac61a3ed30bfba747af..e4e7c446866718a034ca6f66bfe3a5020c976445 100644 (file)
@@ -25,7 +25,7 @@
 #include "system/filesys.h"
 #include "ntvfs/sysdep/sys_notify.h"
 #include "lib/events/events.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "libcli/raw/smb.h"
 #include "param/param.h"
 
index a0322bbcc1adcfce448bd6bdebc3a5e5b2a57707..6e28b46550146cb8dd734169bd73244c6016981c 100644 (file)
@@ -26,7 +26,7 @@
 #include "system/filesys.h"
 #include "ntvfs/sysdep/sys_lease.h"
 #include "lib/events/events.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "param/param.h"
 
 /* list of registered backends */
index 0727eed212105fc4bbb632a91d147fe5a8c89cd4..41f1cbd7105a5f63fe0897aeb57f94264f68def1 100644 (file)
@@ -27,7 +27,7 @@
 #include "ntvfs/sysdep/sys_lease.h"
 #include "ntvfs/ntvfs.h"
 #include "librpc/gen_ndr/ndr_opendb.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "cluster/cluster.h"
 
 #define LINUX_LEASE_RT_SIGNAL (SIGRTMIN+1)
index 9770323c3fa0ec343b9aed4f72098ede9b9cb1a1..d84979e44cea32bd286a2c471c18d252d57f7ce0 100644 (file)
@@ -26,7 +26,7 @@
 #include "system/filesys.h"
 #include "ntvfs/sysdep/sys_notify.h"
 #include "lib/events/events.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "param/param.h"
 
 /* list of registered backends */
index b86e3ad2342db1003ca812177121633e8e981ed3..ed3045605db6b3ef43e81e3ad4f93c5b0bd9ed07 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "param/param.h"
 #include "system/filesys.h"
 
@@ -130,7 +130,7 @@ const char **param_get_string_list(struct param_context *ctx, const char *param,
        if (separator == NULL)
                separator = LIST_SEP;
        
-       return str_list_make(ctx, p->value, separator);
+       return (const char **)str_list_make(ctx, p->value, separator);
 }
 
 int param_set_string_list(struct param_context *ctx, const char *param, const char **list, const char *section)
index 0042dbd876b80738a3f867118826a66b28d7dcbf..e626cdf5ddd91a5616e032d7260cd6f604c8f025 100644 (file)
@@ -60,7 +60,7 @@
 #include "system/network.h" /* needed for TCP_NODELAY */
 #include "smb_server/smb_server.h"
 #include "libcli/raw/signing.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "param/param.h"
 #include "param/loadparm.h"
 #include "libcli/raw/libcliraw.h"
@@ -885,7 +885,7 @@ const char **lp_parm_string_list(TALLOC_CTX *mem_ctx,
        const char *value = lp_get_parametric(lp_ctx, service, type, option);
 
        if (value != NULL)
-               return str_list_make(mem_ctx, value, separator);
+               return (const char **)str_list_make(mem_ctx, value, separator);
 
        return NULL;
 }
@@ -1299,7 +1299,7 @@ static void copy_service(struct loadparm_service *pserviceDest,
                                        strupper(*(char **)dest_ptr);
                                        break;
                                case P_LIST:
-                                       *(const char ***)dest_ptr = str_list_copy(pserviceDest, 
+                                       *(const char ***)dest_ptr = (const char **)str_list_copy(pserviceDest, 
                                                                                  *(const char ***)src_ptr);
                                        break;
                                default:
@@ -1653,7 +1653,7 @@ static bool set_variable(TALLOC_CTX *mem_ctx, int parmnum, void *parm_ptr,
                }
 
                case P_LIST:
-                       *(const char ***)parm_ptr = str_list_make(mem_ctx,
+                       *(const char ***)parm_ptr = (const char **)str_list_make(mem_ctx,
                                                                  pszParmValue, NULL);
                        break;
 
index 45d3765b7aa60136beb2da4c01f10043195ecfa1..576df0a4fe475de523807eef4816cdfb940afa3a 100644 (file)
@@ -28,8 +28,8 @@
 #include "tdb_wrap.h"
 #include "lib/ldb/include/ldb.h"
 #include "../tdb/include/tdb.h"
-#include "lib/util/util_tdb.h"
-#include "lib/util/util_ldb.h"
+#include "../lib/util/util_tdb.h"
+#include "../lib/util/util_ldb.h"
 #include "librpc/gen_ndr/ndr_security.h"
 
 /**
index 893055d3b1ad70f078b2541edc38acccdaa174e2..1d1efa74808cdb0db2b31d22ed2e44f3b1ceef6f 100644 (file)
@@ -24,7 +24,7 @@
 #include "librpc/gen_ndr/ndr_dcerpc.h"
 #include "auth/auth.h"
 #include "auth/gensec/gensec.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "rpc_server/dcerpc_server.h"
 #include "rpc_server/dcerpc_server_proto.h"
 #include "librpc/rpc/dcerpc_proto.h"
index b5672b41ac4fe3eb2ea9d3d75df8963210f6c59c..59a4bab083e2d599f14ade1e1a1b101e0c541743 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef SAMBA_DCERPC_SERVER_H
 #define SAMBA_DCERPC_SERVER_H
 
-#include "librpc/gen_ndr/misc.h"
+#include "librpc/gen_ndr/security.h"
 #include "librpc/rpc/dcerpc.h"
 #include "librpc/ndr/libndr.h"
 
index d555ba27bfa81b68cd471c470aea645986d853b9..a84f24a3e8b9074c8a4a5df16df1a23392619925 100644 (file)
@@ -337,12 +337,14 @@ WERROR dcesrv_drsuapi_DsCrackNames(struct dcesrv_call_state *dce_call, TALLOC_CT
        struct drsuapi_bind_state *b_state;
        struct dcesrv_handle *h;
 
-       r->out.level = r->in.level;
-       ZERO_STRUCT(r->out.ctr);
+       *r->out.level_out = r->in.level;
 
        DCESRV_PULL_HANDLE_WERR(h, r->in.bind_handle, DRSUAPI_BIND_HANDLE);
        b_state = h->data;
 
+       r->out.ctr = talloc_zero(mem_ctx, union drsuapi_DsNameCtr);
+       W_ERROR_HAVE_NO_MEMORY(r->out.ctr);
+
        switch (r->in.level) {
                case 1: {
                        struct drsuapi_DsNameCtr1 *ctr1;
@@ -353,16 +355,16 @@ WERROR dcesrv_drsuapi_DsCrackNames(struct dcesrv_call_state *dce_call, TALLOC_CT
                        ctr1 = talloc(mem_ctx, struct drsuapi_DsNameCtr1);
                        W_ERROR_HAVE_NO_MEMORY(ctr1);
 
-                       count = r->in.req.req1.count;
+                       count = r->in.req->req1.count;
                        names = talloc_array(mem_ctx, struct drsuapi_DsNameInfo1, count);
                        W_ERROR_HAVE_NO_MEMORY(names);
 
                        for (i=0; i < count; i++) {
                                status = DsCrackNameOneName(b_state->sam_ctx, mem_ctx,
-                                                           r->in.req.req1.format_flags,
-                                                           r->in.req.req1.format_offered,
-                                                           r->in.req.req1.format_desired,
-                                                           r->in.req.req1.names[i].str,
+                                                           r->in.req->req1.format_flags,
+                                                           r->in.req->req1.format_offered,
+                                                           r->in.req->req1.format_desired,
+                                                           r->in.req->req1.names[i].str,
                                                            &names[i]);
                                if (!W_ERROR_IS_OK(status)) {
                                        return status;
@@ -371,7 +373,7 @@ WERROR dcesrv_drsuapi_DsCrackNames(struct dcesrv_call_state *dce_call, TALLOC_CT
 
                        ctr1->count = count;
                        ctr1->array = names;
-                       r->out.ctr.ctr1 = ctr1;
+                       r->out.ctr->ctr1 = ctr1;
 
                        return WERR_OK;
                }
@@ -389,17 +391,20 @@ static WERROR dcesrv_drsuapi_DsWriteAccountSpn(struct dcesrv_call_state *dce_cal
        struct drsuapi_bind_state *b_state;
        struct dcesrv_handle *h;
 
-       r->out.level = r->in.level;
+       *r->out.level_out = r->in.level;
 
        DCESRV_PULL_HANDLE_WERR(h, r->in.bind_handle, DRSUAPI_BIND_HANDLE);
        b_state = h->data;
 
+       r->out.res = talloc(mem_ctx, union drsuapi_DsWriteAccountSpnResult);
+       W_ERROR_HAVE_NO_MEMORY(r->out.res);
+
        switch (r->in.level) {
                case 1: {
                        struct drsuapi_DsWriteAccountSpnRequest1 *req;
                        struct ldb_message *msg;
                        int count, i, ret;
-                       req = &r->in.req.req1;
+                       req = &r->in.req->req1;
                        count = req->count;
 
                        msg = ldb_msg_new(mem_ctx);
@@ -409,7 +414,7 @@ static WERROR dcesrv_drsuapi_DsWriteAccountSpn(struct dcesrv_call_state *dce_cal
 
                        msg->dn = ldb_dn_new(msg, b_state->sam_ctx, req->object_dn);
                        if ( ! ldb_dn_validate(msg->dn)) {
-                               r->out.res.res1.status = WERR_OK;
+                               r->out.res->res1.status = WERR_OK;
                                return WERR_OK;
                        }
                        
@@ -440,9 +445,9 @@ static WERROR dcesrv_drsuapi_DsWriteAccountSpn(struct dcesrv_call_state *dce_cal
                                DEBUG(0,("Failed to modify SPNs on %s: %s\n",
                                         ldb_dn_get_linearized(msg->dn), 
                                         ldb_errstring(b_state->sam_ctx)));
-                               r->out.res.res1.status = WERR_ACCESS_DENIED;
+                               r->out.res->res1.status = WERR_ACCESS_DENIED;
                        } else {
-                               r->out.res.res1.status = WERR_OK;
+                               r->out.res->res1.status = WERR_OK;
                        }
 
                        return WERR_OK;
@@ -519,14 +524,16 @@ static WERROR dcesrv_drsuapi_DsGetDomainControllerInfo_1(struct drsuapi_bind_sta
 
        int ret, i;
 
-       r->out.level_out = r->in.req.req1.level;
+       *r->out.level_out = r->in.req->req1.level;
+       r->out.ctr = talloc(mem_ctx, union drsuapi_DsGetDCInfoCtr);
+       W_ERROR_HAVE_NO_MEMORY(r->out.ctr);
 
        sites_dn = samdb_sites_dn(b_state->sam_ctx, mem_ctx);
        if (!sites_dn) {
                return WERR_DS_OBJ_NOT_FOUND;
        }
 
-       switch (r->out.level_out) {
+       switch (*r->out.level_out) {
        case -1:
                /* this level is not like the others */
                return WERR_UNKNOWN_LEVEL;
@@ -549,9 +556,9 @@ static WERROR dcesrv_drsuapi_DsGetDomainControllerInfo_1(struct drsuapi_bind_sta
                return WERR_GENERAL_FAILURE;
        }
 
-       switch (r->out.level_out) {
+       switch (*r->out.level_out) {
        case 1:
-               ctr1 = &r->out.ctr.ctr1;
+               ctr1 = &r->out.ctr->ctr1;
                ctr1->count = res->count;
                ctr1->array = talloc_zero_array(mem_ctx, 
                                                struct drsuapi_DsGetDCInfo1, 
@@ -614,7 +621,7 @@ static WERROR dcesrv_drsuapi_DsGetDomainControllerInfo_1(struct drsuapi_bind_sta
                }
                break;
        case 2:
-               ctr2 = &r->out.ctr.ctr2;
+               ctr2 = &r->out.ctr->ctr2;
                ctr2->count = res->count;
                ctr2->array = talloc_zero_array(mem_ctx, 
                                                 struct drsuapi_DsGetDCInfo2, 
index 4831fb063da91551f847ac2af496fce4fe034f41..284354feb484380ac9dc24bf75010efd3ad268b9 100644 (file)
@@ -20,7 +20,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "rpc_server/dcerpc_server.h"
 
 /*
index 836fd8dc621645a7a8939b5d80658387b7d609f3..4c596f1f0368899b554e7a873311aec009e54cc5 100644 (file)
@@ -23,7 +23,7 @@
 */
 
 #include "rpc_server/lsa/lsa.h"
-#include "util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 #include "libcli/ldap/ldap_ndr.h"
 #include "system/kerberos.h"
 #include "auth/kerberos/kerberos.h"
@@ -968,19 +968,14 @@ static NTSTATUS dcesrv_lsa_CreateTrustedDomain_base(struct dcesrv_call_state *dc
                                                           mem_ctx, msg_user, "unicodePwd", 
                                                           &auth_struct.incoming.current[i]->AuthInfo.nt4owf.password);
                                } else if (auth_struct.incoming.current[i]->AuthType == TRUST_AUTH_TYPE_CLEAR) {
-                                       struct samr_Password hash;
-/*
-                                      . We cannot do this, as windows chooses to send in random passwords here, that won't convert to UTF8 
-                                       samdb_msg_add_string(trusted_domain_state->policy->sam_ldb, 
-                                                            mem_ctx, msg_user, "userPassword", 
-                                                            auth_struct.incoming.current->array[i].AuthInfo.clear.password);
-*/
-                                       mdfour(hash.hash, auth_struct.incoming.current[i]->AuthInfo.clear.password,
-                                              auth_struct.incoming.current[i]->AuthInfo.clear.size);
-                                       samdb_msg_add_hash(trusted_domain_state->policy->sam_ldb, 
-                                                          mem_ctx, msg_user, "unicodePwd", 
-                                                          &hash);
-                               }
+                                       DATA_BLOB new_password = data_blob_const(auth_struct.incoming.current[i]->AuthInfo.clear.password,
+                                                                                auth_struct.incoming.current[i]->AuthInfo.clear.size);
+                                       ret = ldb_msg_add_value(msg_user, "clearTextPassword", &new_password, NULL);
+                                       if (ret != LDB_SUCCESS) {
+                                               ldb_transaction_cancel(policy_state->sam_ldb);
+                                               return NT_STATUS_NO_MEMORY;
+                                       }
+                               } 
                        }
                }
 
index b7c41486a2da5a79087054465e571fd28cf74d60..ffdf96d091bb3c07343c24c53913618be004b229 100644 (file)
@@ -30,7 +30,7 @@
 #include "libcli/security/security.h"
 #include "libcli/auth/libcli_auth.h"
 #include "param/secrets.h"
-#include "util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 #include "librpc/gen_ndr/ndr_dssetup.h"
 #include "param/param.h"
 
index b948d1210e88483d84be5113900681dde1f3fe0e..9d4c897892fc97da4d821670ce395212b0ce4e0b 100644 (file)
@@ -29,7 +29,7 @@
 #include "dsdb/samdb/samdb.h"
 #include "dsdb/common/flags.h"
 #include "rpc_server/samr/proto.h"
-#include "util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 #include "libcli/auth/libcli_auth.h"
 #include "auth/gensec/schannel_state.h"
 #include "libcli/security/security.h"
@@ -107,7 +107,7 @@ static NTSTATUS dcesrv_netr_ServerAuthenticate3(struct dcesrv_call_state *dce_ca
 
        if (r->in.secure_channel_type == SEC_CHAN_DNS_DOMAIN) {
                char *encoded_account = ldb_binary_encode_string(mem_ctx, r->in.account_name);
-               char *flatname;
+               const char *flatname;
                if (!encoded_account) {
                        return NT_STATUS_NO_MEMORY;
                }
@@ -370,7 +370,7 @@ static NTSTATUS dcesrv_netr_ServerPasswordSet(struct dcesrv_call_state *dce_call
                                           creds->sid,
                                           NULL, /* Don't have plaintext */
                                           NULL, &r->in.new_password,
-                                          false, /* This is not considered a password change */
+                                          true, /* Password change */
                                           NULL, NULL);
        return nt_status;
 }
@@ -385,15 +385,14 @@ static NTSTATUS dcesrv_netr_ServerPasswordSet2(struct dcesrv_call_state *dce_cal
        struct creds_CredentialState *creds;
        struct ldb_context *sam_ctx;
        NTSTATUS nt_status;
-       char new_pass[512];
-       bool ret;
+       DATA_BLOB new_password;
 
        struct samr_CryptPassword password_buf;
 
        nt_status = dcesrv_netr_creds_server_step_check(dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx,
                                                        r->in.computer_name, mem_ctx, 
-                                                &r->in.credential, &r->out.return_authenticator,
-                                                &creds);
+                                                       &r->in.credential, &r->out.return_authenticator,
+                                                       &creds);
        NT_STATUS_NOT_OK_RETURN(nt_status);
 
        sam_ctx = samdb_connect(mem_ctx, dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, system_session(mem_ctx, dce_call->conn->dce_ctx->lp_ctx));
@@ -402,22 +401,20 @@ static NTSTATUS dcesrv_netr_ServerPasswordSet2(struct dcesrv_call_state *dce_cal
        }
 
        memcpy(password_buf.data, r->in.new_password.data, 512);
-       SIVAL(password_buf.data,512,r->in.new_password.length);
+       SIVAL(password_buf.data, 512, r->in.new_password.length);
        creds_arcfour_crypt(creds, password_buf.data, 516);
 
-       ret = decode_pw_buffer(password_buf.data, new_pass, sizeof(new_pass),
-                              STR_UNICODE);
-       if (!ret) {
-               DEBUG(3,("netr_ServerPasswordSet2: failed to decode password buffer\n"));
-               return NT_STATUS_ACCESS_DENIED;
+       if (!extract_pw_from_buffer(mem_ctx, password_buf.data, &new_password)) {
+               DEBUG(3,("samr: failed to decode password buffer\n"));
+               return NT_STATUS_WRONG_PASSWORD;
        }
-
+               
        /* Using the sid for the account as the key, set the password */
        nt_status = samdb_set_password_sid(sam_ctx, mem_ctx,
                                           creds->sid,
-                                          new_pass, /* we have plaintext */
+                                          &new_password, /* we have plaintext */
                                           NULL, NULL,
-                                          false, /* This is not considered a password change */
+                                          true, /* Password change */
                                           NULL, NULL);
        return nt_status;
 }
index cd32160d88957d1c1f8d46325c587fac3a5ef223..3cf8fbe8fb074e7891bda39daf8dd9463184d37f 100644 (file)
@@ -225,7 +225,7 @@ static NTSTATUS remote_register_one_iface(struct dcesrv_context *dce_ctx, const
 static NTSTATUS remote_op_init_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
 {
        int i;
-       const char **ifaces = str_list_make(dce_ctx, lp_parm_string(dce_ctx->lp_ctx, NULL, "dcerpc_remote", "interfaces"),NULL);
+       const char **ifaces = (const char **)str_list_make(dce_ctx, lp_parm_string(dce_ctx->lp_ctx, NULL, "dcerpc_remote", "interfaces"),NULL);
 
        if (!ifaces) {
                DEBUG(3,("remote_op_init_server: no interfaces configured\n"));
index 9daf4f2194c6c8900008b4abde09ff766a2eb51f..22d201e58eaa295955946d096db15393f318bc9e 100644 (file)
@@ -34,7 +34,7 @@
 #include "libcli/ldap/ldap_ndr.h"
 #include "libcli/security/security.h"
 #include "rpc_server/samr/proto.h"
-#include "util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 #include "param/param.h"
 
 /* these query macros make samr_Query[User|Group]Info a bit easier to read */
@@ -4262,7 +4262,7 @@ static NTSTATUS dcesrv_samr_Connect5(struct dcesrv_call_state *dce_call, TALLOC_
 
        status = dcesrv_samr_Connect(dce_call, mem_ctx, &c);
 
-       r->out.info->info1.unknown1 = 3;
+       r->out.info->info1.client_version = SAMR_CONNECT_AFTER_W2K;
        r->out.info->info1.unknown2 = 0;
        r->out.level = r->in.level;
 
index 98d998acc3dbed46f920c4dec66058e7e65d2ad3..859fd03801197b9e6e5c315e286bba0b00523f99 100644 (file)
@@ -32,7 +32,7 @@
 #include "auth/auth.h"
 #include "rpc_server/samr/proto.h"
 #include "libcli/auth/libcli_auth.h"
-#include "util/util_ldb.h"
+#include "../lib/util/util_ldb.h"
 #include "param/param.h"
 
 /* 
@@ -86,7 +86,8 @@ NTSTATUS dcesrv_samr_ChangePasswordUser(struct dcesrv_call_state *dce_call,
        }
        msg = res[0];
 
-       status = samdb_result_passwords(mem_ctx, msg, &lm_pwd, &nt_pwd);
+       status = samdb_result_passwords(mem_ctx, dce_call->conn->dce_ctx->lp_ctx,
+                                       msg, &lm_pwd, &nt_pwd);
        if (!NT_STATUS_IS_OK(status) || !lm_pwd || !nt_pwd) {
                ldb_transaction_cancel(sam_ctx);
                return NT_STATUS_WRONG_PASSWORD;
@@ -183,8 +184,8 @@ NTSTATUS dcesrv_samr_OemChangePasswordUser2(struct dcesrv_call_state *dce_call,
                                     struct samr_OemChangePasswordUser2 *r)
 {
        NTSTATUS status;
-       char new_pass[512];
-       uint32_t new_pass_len;
+       DATA_BLOB new_password, new_unicode_password;
+       char *new_pass;
        struct samr_CryptPassword *pwbuf = r->in.password;
        struct ldb_context *sam_ctx;
        struct ldb_dn *user_dn;
@@ -195,6 +196,7 @@ NTSTATUS dcesrv_samr_OemChangePasswordUser2(struct dcesrv_call_state *dce_call,
        DATA_BLOB lm_pwd_blob;
        uint8_t new_lm_hash[16];
        struct samr_Password lm_verifier;
+       ssize_t unicode_pw_len;
 
        if (pwbuf == NULL) {
                return NT_STATUS_INVALID_PARAMETER;
@@ -231,7 +233,8 @@ NTSTATUS dcesrv_samr_OemChangePasswordUser2(struct dcesrv_call_state *dce_call,
 
        user_dn = res[0]->dn;
 
-       status = samdb_result_passwords(mem_ctx, res[0], &lm_pwd, NULL);
+       status = samdb_result_passwords(mem_ctx, dce_call->conn->dce_ctx->lp_ctx,
+                                       res[0], &lm_pwd, NULL);
        if (!NT_STATUS_IS_OK(status) || !lm_pwd) {
                ldb_transaction_cancel(sam_ctx);
                return NT_STATUS_WRONG_PASSWORD;
@@ -242,18 +245,33 @@ NTSTATUS dcesrv_samr_OemChangePasswordUser2(struct dcesrv_call_state *dce_call,
        arcfour_crypt_blob(pwbuf->data, 516, &lm_pwd_blob);
        data_blob_free(&lm_pwd_blob);
        
-       if (!decode_pw_buffer(pwbuf->data, new_pass, sizeof(new_pass),
-                             STR_ASCII)) {
+       if (!extract_pw_from_buffer(mem_ctx, pwbuf->data, &new_password)) {
                ldb_transaction_cancel(sam_ctx);
                DEBUG(3,("samr: failed to decode password buffer\n"));
                return NT_STATUS_WRONG_PASSWORD;
        }
+               
+       if (convert_string_talloc(mem_ctx, lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx), 
+                                 CH_DOS, CH_UNIX, 
+                                 (const char *)new_password.data, 
+                                 new_password.length,
+                                 (void **)&new_pass) == -1) {
+               DEBUG(3,("samr: failed to convert incoming password buffer to unix charset\n"));
+               ldb_transaction_cancel(sam_ctx);
+               return NT_STATUS_WRONG_PASSWORD;
+       }
 
-       /* check LM verifier */
-       if (lm_pwd == NULL) {
+       unicode_pw_len = convert_string_talloc(mem_ctx, lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx), 
+                                              CH_DOS, CH_UTF16, 
+                                              (const char *)new_password.data, 
+                                              new_password.length,
+                                              (void **)&new_unicode_password.data);
+       if (unicode_pw_len == -1) {
+               DEBUG(3,("samr: failed to convert incoming password buffer to UTF16 charset\n"));
                ldb_transaction_cancel(sam_ctx);
                return NT_STATUS_WRONG_PASSWORD;
        }
+       new_unicode_password.length = unicode_pw_len;
 
        E_deshash(new_pass, new_lm_hash);
        E_old_pw_hash(new_lm_hash, lm_pwd->hash, lm_verifier.hash);
@@ -278,7 +296,7 @@ NTSTATUS dcesrv_samr_OemChangePasswordUser2(struct dcesrv_call_state *dce_call,
         * due to password policies */
        status = samdb_set_password(sam_ctx, mem_ctx,
                                    user_dn, NULL, 
-                                   mod, new_pass
+                                   mod, &new_unicode_password
                                    NULL, NULL,
                                    true, /* this is a user password change */
                                    NULL, 
@@ -320,7 +338,7 @@ NTSTATUS dcesrv_samr_ChangePasswordUser3(struct dcesrv_call_state *dce_call,
                                  struct samr_ChangePasswordUser3 *r)
 {      
        NTSTATUS status;
-       char new_pass[512];
+       DATA_BLOB new_password;
        struct ldb_context *sam_ctx = NULL;
        struct ldb_dn *user_dn;
        int ret;
@@ -369,7 +387,8 @@ NTSTATUS dcesrv_samr_ChangePasswordUser3(struct dcesrv_call_state *dce_call,
 
        user_dn = res[0]->dn;
 
-       status = samdb_result_passwords(mem_ctx, res[0], &lm_pwd, &nt_pwd);
+       status = samdb_result_passwords(mem_ctx, dce_call->conn->dce_ctx->lp_ctx, 
+                                       res[0], &lm_pwd, &nt_pwd);
        if (!NT_STATUS_IS_OK(status) ) {
                goto failed;
        }
@@ -384,40 +403,49 @@ NTSTATUS dcesrv_samr_ChangePasswordUser3(struct dcesrv_call_state *dce_call,
        arcfour_crypt_blob(r->in.nt_password->data, 516, &nt_pwd_blob);
        data_blob_free(&nt_pwd_blob);
 
-       if (!decode_pw_buffer(r->in.nt_password->data, new_pass, sizeof(new_pass),
-                             STR_UNICODE)) {
+       if (!extract_pw_from_buffer(mem_ctx, r->in.nt_password->data, &new_password)) {
+               ldb_transaction_cancel(sam_ctx);
                DEBUG(3,("samr: failed to decode password buffer\n"));
-               status = NT_STATUS_WRONG_PASSWORD;
-               goto failed;
+               return NT_STATUS_WRONG_PASSWORD;
        }
-
+               
        if (r->in.nt_verifier == NULL) {
                status = NT_STATUS_WRONG_PASSWORD;
                goto failed;
        }
 
        /* check NT verifier */
-       E_md4hash(new_pass, new_nt_hash);
+       mdfour(new_nt_hash, new_password.data, new_password.length);
+
        E_old_pw_hash(new_nt_hash, nt_pwd->hash, nt_verifier.hash);
        if (memcmp(nt_verifier.hash, r->in.nt_verifier->hash, 16) != 0) {
                status = NT_STATUS_WRONG_PASSWORD;
                goto failed;
        }
 
-       /* check LM verifier */
+       /* check LM verifier (really not needed as we just checked the
+        * much stronger NT hash, but the RPC-SAMR test checks for
+        * this) */
        if (lm_pwd && r->in.lm_verifier != NULL) {
-               E_deshash(new_pass, new_lm_hash);
-               E_old_pw_hash(new_nt_hash, lm_pwd->hash, lm_verifier.hash);
-               if (memcmp(lm_verifier.hash, r->in.lm_verifier->hash, 16) != 0) {
-                       status = NT_STATUS_WRONG_PASSWORD;
-                       goto failed;
+               char *new_pass;
+               if (convert_string_talloc(mem_ctx, lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx), 
+                                         CH_UTF16, CH_UNIX, 
+                                         (const char *)new_password.data, 
+                                         new_password.length,
+                                         (void **)&new_pass) != -1) {
+                       E_deshash(new_pass, new_lm_hash);
+                       E_old_pw_hash(new_nt_hash, lm_pwd->hash, lm_verifier.hash);
+                       if (memcmp(lm_verifier.hash, r->in.lm_verifier->hash, 16) != 0) {
+                               status = NT_STATUS_WRONG_PASSWORD;
+                               goto failed;
+                       }
                }
        }
 
-
        mod = ldb_msg_new(mem_ctx);
        if (mod == NULL) {
-               return NT_STATUS_NO_MEMORY;
+               status = NT_STATUS_NO_MEMORY;
+               goto failed;
        }
 
        mod->dn = ldb_dn_copy(mod, user_dn);
@@ -430,7 +458,7 @@ NTSTATUS dcesrv_samr_ChangePasswordUser3(struct dcesrv_call_state *dce_call,
         * due to password policies */
        status = samdb_set_password(sam_ctx, mem_ctx,
                                    user_dn, NULL, 
-                                   mod, new_pass
+                                   mod, &new_password
                                    NULL, NULL,
                                    true, /* this is a user password change */
                                    &reason, 
@@ -517,7 +545,7 @@ NTSTATUS samr_set_password(struct dcesrv_call_state *dce_call,
                           struct samr_CryptPassword *pwbuf)
 {
        NTSTATUS nt_status;
-       char new_pass[512];
+       DATA_BLOB new_password;
        DATA_BLOB session_key = data_blob(NULL, 0);
 
        nt_status = dcesrv_fetch_session_key(dce_call->conn, &session_key);
@@ -527,17 +555,16 @@ NTSTATUS samr_set_password(struct dcesrv_call_state *dce_call,
 
        arcfour_crypt_blob(pwbuf->data, 516, &session_key);
 
-       if (!decode_pw_buffer(pwbuf->data, new_pass, sizeof(new_pass),
-                             STR_UNICODE)) {
+       if (!extract_pw_from_buffer(mem_ctx, pwbuf->data, &new_password)) {
                DEBUG(3,("samr: failed to decode password buffer\n"));
                return NT_STATUS_WRONG_PASSWORD;
        }
-
+               
        /* set the password - samdb needs to know both the domain and user DNs,
           so the domain password policy can be used */
        return samdb_set_password(sam_ctx, mem_ctx,
                                  account_dn, domain_dn, 
-                                 msg, new_pass
+                                 msg, &new_password
                                  NULL, NULL,
                                  false, /* This is a password set, not change */
                                  NULL, NULL);
@@ -557,8 +584,7 @@ NTSTATUS samr_set_password_ex(struct dcesrv_call_state *dce_call,
                              struct samr_CryptPasswordEx *pwbuf)
 {
        NTSTATUS nt_status;
-       char new_pass[512];
-       uint32_t new_pass_len;
+       DATA_BLOB new_password;
        DATA_BLOB co_session_key;
        DATA_BLOB session_key = data_blob(NULL, 0);
        struct MD5Context ctx;
@@ -580,17 +606,16 @@ NTSTATUS samr_set_password_ex(struct dcesrv_call_state *dce_call,
        
        arcfour_crypt_blob(pwbuf->data, 516, &co_session_key);
 
-       if (!decode_pw_buffer(pwbuf->data, new_pass, sizeof(new_pass),
-                             STR_UNICODE)) {
+       if (!extract_pw_from_buffer(mem_ctx, pwbuf->data, &new_password)) {
                DEBUG(3,("samr: failed to decode password buffer\n"));
                return NT_STATUS_WRONG_PASSWORD;
        }
-
+               
        /* set the password - samdb needs to know both the domain and user DNs,
           so the domain password policy can be used */
        return samdb_set_password(sam_ctx, mem_ctx,
                                  account_dn, domain_dn, 
-                                 msg, new_pass
+                                 msg, &new_password
                                  NULL, NULL,
                                  false, /* This is a password set, not change */
                                  NULL, NULL);
index 2ef8591c320a97144d7a737a7e040479f9125a28..f168614ad5b7f9cfbead5db5a38709c8420e2b01 100644 (file)
@@ -25,7 +25,7 @@
 #include "librpc/gen_ndr/ndr_dcerpc.h"
 #include "auth/auth.h"
 #include "auth/gensec/gensec.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "rpc_server/dcerpc_server.h"
 #include "lib/events/events.h"
 #include "smbd/service_task.h"
index 22c60c354c5002b14a5469306212c5feb7f86360..e295634c6222587904c1a1e1e12f7efe69f3efef 100644 (file)
@@ -457,7 +457,7 @@ static WERROR dcesrv_winreg_QueryValue(struct dcesrv_call_state *dce_call,
        case SECURITY_USER:
                key = h->data;
                
-               result = reg_key_get_value_by_name(mem_ctx, key, r->in.value_name.name,
+               result = reg_key_get_value_by_name(mem_ctx, key, r->in.value_name->name,
                                                   &value_type, &value_data);
                
                if (!W_ERROR_IS_OK(result)) {
@@ -470,16 +470,16 @@ static WERROR dcesrv_winreg_QueryValue(struct dcesrv_call_state *dce_call,
                        return WERR_NOMEM;
                }
                *r->out.type = value_type;
-               r->out.length = talloc(mem_ctx, uint32_t);
-               if (!r->out.length) {
+               r->out.data_length = talloc(mem_ctx, uint32_t);
+               if (!r->out.data_length) {
                        return WERR_NOMEM;
                }
-               *r->out.length = value_data.length;
+               *r->out.data_length = value_data.length;
                if (r->in.data == NULL) {
-                       r->out.size = talloc(mem_ctx, uint32_t);
-                       *r->out.size = value_data.length;
+                       r->out.data_size = talloc(mem_ctx, uint32_t);
+                       *r->out.data_size = value_data.length;
                } else {
-                       r->out.size = r->in.size;
+                       r->out.data_size = r->in.data_size;
                        r->out.data = value_data.data;
                }
                
diff --git a/source4/scripting/python/config.m4 b/source4/scripting/python/config.m4
deleted file mode 100644 (file)
index 843c3f7..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-m4_include(scripting/python/ac_pkg_swig.m4)
-
-AC_ARG_VAR([PYTHON_VERSION],[The installed Python
-       version to use, for example '2.3'. This string 
-       will be appended to the Python interpreter
-       canonical name.])
-
-AC_PROG_SWIG(1.3.36)
-
-AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]])
-if test -z "$PYTHON"; then
-       working_python=no
-       AC_MSG_WARN([No python found])
-fi
-
-AC_DEFUN([TRY_LINK_PYTHON],
-[
-       if test $working_python = no; then
-               ac_save_LIBS="$LIBS"
-               ac_save_CFLAGS="$CFLAGS"
-               LIBS="$LIBS $1"
-               CFLAGS="$CFLAGS $2"
-
-               AC_TRY_LINK([
-                               /* we have our own configure tests */
-                               #include <Python.h>
-                       ],[
-                               Py_InitModule(NULL, NULL);
-                       ],[
-                               PYTHON_LDFLAGS="$1"
-                               PYTHON_CFLAGS="$2"
-                               working_python=yes
-                       ])
-               LIBS="$ac_save_LIBS"
-               CFLAGS="$ac_save_CFLAGS"
-       fi
-])
-
-dnl assume no working python
-working_python=no
-
-if test -z "$PYTHON_VERSION"; then 
-       AC_PATH_PROGS([PYTHON_CONFIG], [python2.6-config python2.5-config python2.4-config python-config])
-else 
-       AC_PATH_PROG([PYTHON_CONFIG], [python[$PYTHON_VERSION]-config])
-fi
-
-if test -z "$PYTHON_CONFIG"; then
-       AC_MSG_WARN([No python-config found])
-else
-       TRY_LINK_PYTHON([`$PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --includes`])
-       TRY_LINK_PYTHON([`$PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --cflags`])
-       if test x$working_python = xno; then
-               # It seems the library path isn't included on some systems
-               base=`$PYTHON_CONFIG --prefix`
-               TRY_LINK_PYTHON([`echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --includes`])
-               TRY_LINK_PYTHON([`echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --cflags`])
-       fi
-fi
-
-if test x$PYTHON != x
-then
-       DISTUTILS_CFLAGS=`$PYTHON -c "from distutils import sysconfig; print '-I%s -I%s %s' % (sysconfig.get_python_inc(), sysconfig.get_python_inc(plat_specific=1), sysconfig.get_config_var('CFLAGS'))"`
-       DISTUTILS_LDFLAGS=`$PYTHON -c "from distutils import sysconfig; print '%s %s -lpython%s -L%s' % (sysconfig.get_config_var('LIBS'), sysconfig.get_config_var('SYSLIBS'), sysconfig.get_config_var('VERSION'), sysconfig.get_config_var('LIBPL'))"`
-       TRY_LINK_PYTHON($DISTUTILS_LDFLAGS, $DISTUTILS_CFLAGS)
-fi
-
-SMB_EXT_LIB(EXT_LIB_PYTHON, [$PYTHON_LDFLAGS], [$PYTHON_CFLAGS])
-
-AC_MSG_CHECKING(working python module support)
-if test $working_python = yes; then
-       SMB_ENABLE(EXT_LIB_PYTHON,YES)
-       SMB_ENABLE(LIBPYTHON,YES)
-       AC_MSG_RESULT([yes])
-else
-       AC_MSG_ERROR([Python not found. Please install Python 2.x and its development headers/libraries.])
-fi
-
-AC_MSG_CHECKING(python library directory)
-pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1, 0, '\\${prefix}')"`
-AC_MSG_RESULT($pythondir)
-
-AC_SUBST(pythondir)
index 427ca975b357ccb1a1fab05736b5d38ac75a70bc..4764d0cafa6b3c7c074d09ccf0db4eb024196428 100644 (file)
@@ -465,6 +465,7 @@ def setup_samdb_partitions(samdb_path, setup_path, message, lp, session_info,
                     "objectclass",
                     "samldb",
                     "kludge_acl",
+                    "password_hash",
                     "operational"]
     tdb_modules_list = [
                     "subtree_rename",
@@ -516,7 +517,7 @@ def setup_samdb_partitions(samdb_path, setup_path, message, lp, session_info,
                 "DOMAINDN_LDB": domaindn_ldb,
                 "SCHEMADN_MOD": "schema_fsmo,instancetype",
                 "CONFIGDN_MOD": "naming_fsmo,instancetype",
-                "DOMAINDN_MOD": "pdc_fsmo,password_hash,instancetype",
+                "DOMAINDN_MOD": "pdc_fsmo,instancetype",
                 "MODULES_LIST": ",".join(modules_list),
                 "TDB_MODULES_LIST": tdb_modules_list_as_string,
                 "MODULES_LIST2": ",".join(modules_list2),
index dd440edb533625b4b0818f468162a00a93a427cc..74c177d8e84dd36d3eb4c5ade14058f53284ddcc 100644 (file)
@@ -52,6 +52,9 @@ testenv:: everything
 testenv-%:: everything
        SELFTEST_TESTENV=$* $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper --testenv
 
+test-%:: 
+       $(MAKE) test TESTS=$*
+
 valgrindtest:: valgrindtest-all
 
 valgrindtest-quick:: all
index 2c007395fb4f00e2f0b0219870b31d98af9a6640..c27157d7137f905b10c4be3ef3f53839c0d89a43 100644 (file)
@@ -177,6 +177,8 @@ oMSyntax: 20
 #Allocated: DSDB_CONTROL_REPLICATED_UPDATE_OID 1.3.6.1.4.1.7165.4.3.3
 
 #Allocated: DSDB_EXTENDED_REPLICATED_OBJECTS_OID 1.3.6.1.4.1.7165.4.4.1
+#Allocated: DSDB_EXTENDED_SCHEMA_UPDATE_NOW_OID 1.3.6.1.4.1.7165.4.4.2
+#Allocated: LDB_EXTENDED_SEQUENCE_NUMBER 1.3.6.1.4.1.7165.4.4.3
 
 #Allocated: (middleName) attributeID: 1.3.6.1.4.1.7165.4.255.1
 
index 4f018a51439612f257e506caef9d9d15deddef4b..bd250361a402d0cebe00dcd15ac21baa101851e6 100644 (file)
@@ -19,7 +19,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "smb_server/smb_server.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "ntvfs/ntvfs.h"
index 56f9c5825e74c2445221a5afad27ee0a804d5e02..6ee4e163ad3d82aa648887005ce43e05e193cf78 100644 (file)
@@ -18,7 +18,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "smb_server/smb_server.h"
 #include "ntvfs/ntvfs.h"
 
index e7970eb7d511768f30e69c7bb20688f91e004b5c..0e626307d6a25796c2d545417968ec49ac3f8d1c 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "includes.h"
 #include "smb_server/smb_server.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 
 
 /*
index 0e820cfe0e99f74021135ed201a6c2aa9f1b2ee2..40ffeeef48f99935a66fb0eb3fb37a7d0be65611 100644 (file)
@@ -21,7 +21,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "smb_server/smb_server.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "ntvfs/ntvfs.h"
index 259d29039de9a4e6582edf53c53f2da6eaa7d45e..ea589a0579f4d2124d4c6e1e836b0f3528f5e1b7 100644 (file)
@@ -47,6 +47,7 @@ static void samba3_smb_accept(struct stream_connection *conn)
        const char *prog;
        char *argv[2];
        char *reason;
+       extern char **environ;
 
        close(0);
        close(1);
index b3c3122765e513f9fb3a73f676a38be8fec8a44d..e3e55ae040477c375f9e9e181cabbc9a9bbaaf49 100644 (file)
@@ -23,7 +23,7 @@
 #include "libcli/raw/interfaces.h"
 #include "lib/events/events.h"
 #include "lib/socket/socket.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 
 /*
   this header declares the core context structures associated with smb
index b18901325c2f7dba90a526e94d7ddc0ee82c0e8e..12131ea25978cbfbfa67785a960260d94a14a479 100644 (file)
@@ -20,7 +20,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "smb_server/smb_server.h"
 #include "smbd/service_stream.h"
 #include "ntvfs/ntvfs.h"
index 3567846070ac4ffeb755a48bcf1db8b8bd766d2b..d8ba240e406c60ea3668520b8800c3e83986a964 100644 (file)
@@ -57,7 +57,7 @@ pid_t pidfile_pid(const char *piddir, const char *name)
 
        ret = (pid_t)atoi(pidstr);
        
-       if (!process_exists(ret)) {
+       if (!process_exists_by_pid(ret)) {
                goto noproc;
        }
 
index 2b1fcc4bd87e6eed0ce4308ccf051cc17f54679f..52db2801e99274d722842432aec481e25e4e5c86 100644 (file)
@@ -21,7 +21,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "smbd/process_model.h"
 
 /*
index d57a54cdc9090cb136fd98b4dfe19b1ef8e7e064..7ec2a0538b9c6852929fc4036c8df75efddcc5e1 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef __SERVICE_STREAM_H__
 #define __SERVICE_STREAM_H__
 
-#include "librpc/gen_ndr/misc.h"
+#include "librpc/gen_ndr/security.h"
 
 /* modules can use the following to determine if the interface has changed
  * please increment the version number after each interface change
index 207e2cbbca00007654d4b91d95fd8ae95c1c6fcd..ddd56bc9c96ff6a4a332d1a47caa2c45af4c51d9 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef __SERVICE_TASK_H__
 #define __SERVICE_TASK_H__ 
 
-#include "librpc/gen_ndr/misc.h"
+#include "librpc/gen_ndr/security.h"
 
 struct task_server {
        struct event_context *event_ctx;
index 739a048d29a790a8ce5c50b6c168e47fba0fd493..1e8b33999751a82ceab3c4597938840d72feb7ee 100644 (file)
@@ -48,7 +48,7 @@ static bool torture_ntlmssp_self_check(struct torture_context *tctx)
 
        gensec_ntlmssp_state = (struct gensec_ntlmssp_state *)gensec_security->private_data;
 
-       gensec_ntlmssp_state->session_key = strhex_to_data_blob("0102030405060708090a0b0c0d0e0f00");
+       gensec_ntlmssp_state->session_key = strhex_to_data_blob(tctx, "0102030405060708090a0b0c0d0e0f00");
        dump_data_pw("NTLMSSP session key: \n", 
                     gensec_ntlmssp_state->session_key.data,  
                     gensec_ntlmssp_state->session_key.length);
@@ -59,11 +59,11 @@ static bool torture_ntlmssp_self_check(struct torture_context *tctx)
                ntlmssp_sign_init(gensec_ntlmssp_state),
                "Failed to sign_init");
 
-       data = strhex_to_data_blob("6a43494653");
+       data = strhex_to_data_blob(tctx, "6a43494653");
        gensec_ntlmssp_sign_packet(gensec_security, gensec_security,
                                   data.data, data.length, data.data, data.length, &sig);
 
-       expected_sig = strhex_to_data_blob("01000000e37f97f2544f4d7e00000000");
+       expected_sig = strhex_to_data_blob(tctx, "01000000e37f97f2544f4d7e00000000");
 
        dump_data_pw("NTLMSSP calc sig:     ", sig.data, sig.length);
        dump_data_pw("NTLMSSP expected sig: ", expected_sig.data, expected_sig.length);
@@ -103,7 +103,7 @@ static bool torture_ntlmssp_self_check(struct torture_context *tctx)
 
        gensec_ntlmssp_state = (struct gensec_ntlmssp_state *)gensec_security->private_data;
 
-       gensec_ntlmssp_state->session_key = strhex_to_data_blob("0102030405e538b0");
+       gensec_ntlmssp_state->session_key = strhex_to_data_blob(tctx, "0102030405e538b0");
        dump_data_pw("NTLMSSP session key: \n", 
                     gensec_ntlmssp_state->session_key.data,  
                     gensec_ntlmssp_state->session_key.length);
@@ -114,11 +114,11 @@ static bool torture_ntlmssp_self_check(struct torture_context *tctx)
                ntlmssp_sign_init(gensec_ntlmssp_state),
                "Failed to sign_init");
 
-       data = strhex_to_data_blob("6a43494653");
+       data = strhex_to_data_blob(tctx, "6a43494653");
        gensec_ntlmssp_sign_packet(gensec_security, gensec_security,
                            data.data, data.length, data.data, data.length, &sig);
 
-       expected_sig = strhex_to_data_blob("0100000078010900397420fe0e5a0f89");
+       expected_sig = strhex_to_data_blob(tctx, "0100000078010900397420fe0e5a0f89");
 
        dump_data_pw("NTLMSSP calc sig:     ", sig.data, sig.length);
        dump_data_pw("NTLMSSP expected sig: ", expected_sig.data, expected_sig.length);
index 42901f1eff155d9fdaf48920c92d6810f316d885..f6f2fcb498988848d0933c4a1d610e9f84e93a0a 100644 (file)
@@ -379,7 +379,7 @@ static bool torture_pac_saved_check(struct torture_context *tctx)
 
        pac_file = torture_setting_string(tctx, "pac_file", NULL);
        if (pac_file) {
-               tmp_blob.data = (uint8_t *)file_load(pac_file, &tmp_blob.length, mem_ctx);
+               tmp_blob.data = (uint8_t *)file_load(pac_file, &tmp_blob.length, 0, mem_ctx);
                torture_comment(tctx, "(saved test) Loaded pac of size %ld from %s\n", (long)tmp_blob.length, pac_file);
        } else {
                tmp_blob = data_blob_talloc(mem_ctx, saved_pac, sizeof(saved_pac));
index 6bb8f99622e2af77789549c1c16bf188aad7d2a3..0309557acb2df776abbfb4b0e9570491c5d83a05 100644 (file)
@@ -18,7 +18,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "libcli/raw/libcliraw.h"
 #include "libcli/raw/raw_proto.h"
 #include "torture/torture.h"
index e90337fd51a9d72230f9aafd55ceedd81cda8da2..98c53aac217b5cb26a028a52c402dc14f0ca900b 100644 (file)
@@ -22,7 +22,7 @@
 #include "system/filesys.h"
 #include "system/dir.h"
 #include "../tdb/include/tdb.h"
-#include "lib/util/util_tdb.h"
+#include "../lib/util/util_tdb.h"
 #include "libcli/libcli.h"
 #include "torture/util.h"
 
index c129fd586be03a1435c2123d5e3e26671f6d98e9..3a09fa74b5540ad9693aed6b5ae7eb773b1c600d 100644 (file)
@@ -448,7 +448,7 @@ static int init_benchrw_params(struct torture_context *tctx,
        p = torture_setting_string(tctx, "unclist", NULL);
        if (p) {
                char *h, *s;
-               unc_list = file_lines_load(p, &num_unc_names, NULL);
+               unc_list = file_lines_load(p, &num_unc_names, 0, NULL);
                if (!unc_list || num_unc_names <= 0) {
                        torture_comment(tctx, "Failed to load unc names list "
                                        "from '%s'\n", p);
index 3bf3ad8b1bf550f0346134b1be1129d36b89a75e..74ece9942281f43ea57a206a7205440f5e4185e4 100644 (file)
@@ -3046,7 +3046,7 @@ static bool start_gentest(struct event_context *ev,
        /* generate the seeds - after this everything is deterministic */
        if (options.use_preset_seeds) {
                int numops;
-               char **preset = file_lines_load(options.seeds_file, &numops, NULL);
+               char **preset = file_lines_load(options.seeds_file, &numops, 0, NULL);
                if (!preset) {
                        printf("Failed to load %s - %s\n", options.seeds_file, strerror(errno));
                        exit(1);
@@ -3193,7 +3193,7 @@ static bool split_unc_name(const char *unc, char **server, char **share)
        }
 
        if (ignore_file) {
-               options.ignore_patterns = file_lines_load(ignore_file, NULL, NULL);
+               options.ignore_patterns = file_lines_load(ignore_file, NULL, 0, NULL);
        }
 
        argv_new = discard_const_p(char *, poptGetArgs(pc));
index 23b0554c4f65ecc7eb0688083baeaea8171355ae..1ddc628a5c643e6f1de23832fe7808a15a9dc7dd 100644 (file)
@@ -24,6 +24,7 @@
 #include "libcli/cldap/cldap.h"
 #include "libcli/ldap/ldap.h"
 #include "librpc/gen_ndr/ndr_nbt.h"
+#include "librpc/gen_ndr/netlogon.h"
 #include "torture/torture.h"
 #include "lib/ldb/include/ldb.h"
 #include "param/param.h"
@@ -280,16 +281,16 @@ static bool test_cldap_netlogon_flags(struct torture_context *tctx,
                printf("NBT_SERVER_GOOD_TIMESERV ");
        if (server_type & NBT_SERVER_NDNC)
                printf("NBT_SERVER_NDNC ");
-       if (server_type & NBT_SERVER_SEL_SEC_DOM_6)
-               printf("NBT_SERVER_SEL_SEC_DOM_6 ");
-       if (server_type & NBT_SERVER_FUL_SEC_DOM_6)
-               printf("NBT_SERVER_FUL_SEC_DOM_6 ");
-       if (server_type & NBT_SERVER_DS_DNS_CONTR)
-               printf("NBT_SERVER_DS_DNS_CONTR ");
-       if (server_type & NBT_SERVER_DS_DNS_DOMAIN)
-               printf("NBT_SERVER_DS_DNS_DOMAIN ");
-       if (server_type & NBT_SERVER_DS_DNS_FOREST)
-               printf("NBT_SERVER_DS_DNS_FOREST ");
+       if (server_type & NBT_SERVER_SELECT_SECRET_DOMAIN_6)
+               printf("NBT_SERVER_SELECT_SECRET_DOMAIN_6");
+       if (server_type & NBT_SERVER_FULL_SECRET_DOMAIN_6)
+               printf("NBT_SERVER_FULL_SECRET_DOMAIN_6");
+       if (server_type & DS_DNS_CONTROLLER)
+               printf("DS_DNS_CONTROLLER ");
+       if (server_type & DS_DNS_DOMAIN)
+               printf("DS_DNS_DOMAIN ");
+       if (server_type & DS_DNS_FOREST)
+               printf("DS_DNS_FOREST ");
 
        printf("\n");
 
@@ -370,7 +371,7 @@ static bool test_cldap_netlogon_flag_ds_dns_forest(struct torture_context *tctx,
        else if (n1.ntver == NETLOGON_NT_VERSION_5EX)
                server_type = n1.data.nt5_ex.server_type;
 
-       if (server_type & NBT_SERVER_DS_DNS_FOREST) {
+       if (server_type & DS_DNS_FOREST) {
                struct cldap_search search2;
                const char *attrs[] = { "defaultNamingContext", "rootDomainNamingContext", 
                        NULL };
index fdb4251c15ea8e2505c7ef77ad18315a1da54ad4..6184ad266d61596ad70ff2217f20f5908081c59b 100644 (file)
@@ -26,7 +26,7 @@
 #include "lib/ldb/include/ldb.h"
 #include "lib/ldb/include/ldb_errors.h"
 #include "dsdb/samdb/samdb.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 
 #include "torture/torture.h"
 #include "torture/ldap/proto.h"
index 3c491dca0544e55db4afd8e524297067f1db468d..6200f4c3de78a0f7f560dbd954ea4f343ca25f6b 100644 (file)
@@ -26,7 +26,7 @@
 #include "lib/ldb/include/ldb.h"
 #include "lib/ldb/include/ldb_errors.h"
 #include "dsdb/samdb/samdb.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 
 #include "torture/torture.h"
 #include "torture/ldap/proto.h"
index 463d2a5000bcf965d7755a2187810d071deac29f..2b1bff40ee64efedeb50882676f82a613f8ed8c4 100644 (file)
@@ -26,7 +26,7 @@
 #include "libnet/libnet.h"
 #include "lib/events/events.h"
 #include "dsdb/samdb/samdb.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "lib/ldb/include/ldb.h"
 #include "lib/ldb/include/ldb_errors.h"
 #include "librpc/ndr/libndr.h"
index 4cd9f6c865dc1a21626723336aa9d1ae717ff0cf..9ea212dfa56ceda6cde1519bc0ea393248f82823 100644 (file)
@@ -28,14 +28,16 @@ TORTURE_LOCAL_OBJ_FILES = \
                $(torturesrcdir)/../lib/messaging/tests/messaging.o \
                $(torturesrcdir)/../lib/messaging/tests/irpc.o \
                $(torturesrcdir)/../librpc/tests/binding_string.o \
-               $(torturesrcdir)/../lib/util/tests/idtree.o \
+               $(torturesrcdir)/../../lib/util/tests/idtree.o \
                $(torturesrcdir)/../lib/socket/testsuite.o \
                $(torturesrcdir)/../../lib/socket_wrapper/testsuite.o \
                $(torturesrcdir)/../libcli/resolve/testsuite.o \
-               $(torturesrcdir)/../lib/util/tests/strlist.o \
-               $(torturesrcdir)/../lib/util/tests/str.o \
-               $(torturesrcdir)/../lib/util/tests/file.o \
-               $(torturesrcdir)/../lib/util/tests/genrand.o \
+               $(torturesrcdir)/../../lib/util/tests/strlist.o \
+               $(torturesrcdir)/../../lib/util/tests/str.o \
+               $(torturesrcdir)/../../lib/util/tests/time.o \
+               $(torturesrcdir)/../../lib/util/tests/data_blob.o \
+               $(torturesrcdir)/../../lib/util/tests/file.o \
+               $(torturesrcdir)/../../lib/util/tests/genrand.o \
                $(torturesrcdir)/../../lib/compression/testsuite.o \
                $(torturesrcdir)/../lib/charset/tests/charset.o \
                $(torturesrcdir)/../libcli/security/tests/sddl.o \
index fdefbbe131e4feff746597d80d4f48c62f38049b..6b38cd6db010796fdccd046f782b9b820ef60138 100644 (file)
@@ -36,6 +36,8 @@
        torture_local_util_strlist, 
        torture_local_util_file, 
        torture_local_util_str, 
+       torture_local_util_time, 
+       torture_local_util_data_blob, 
        torture_local_idtree, 
        torture_local_genrand, 
        torture_local_iconv,
index a511e261cb9606dd74718ef9bf4179b6cf96351e..69b966b31bb5a391722c7b9a541d7312f4ed6b86 100644 (file)
@@ -137,7 +137,7 @@ static struct smbcli_state *connect_one(struct event_context *ev,
                p = lp_parm_string(lp_ctx, NULL, "torture", "unclist");
                if (p) {
                        char *h, *s;
-                       unc_list = file_lines_load(p, &num_unc_names, NULL);
+                       unc_list = file_lines_load(p, &num_unc_names, 0, NULL);
                        if (!unc_list || num_unc_names <= 0) {
                                printf("Failed to load unc names list from '%s'\n", p);
                                exit(1);
index 2664d3e7f52d04e9590e7e26071a638aaaed8f06..be09018acf4aa2059fecfc307f4ef80a100a0457 100644 (file)
@@ -25,7 +25,7 @@
 #include "includes.h"
 #include "system/time.h"
 #include "system/filesys.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "libcli/libcli.h"
 #include "libcli/raw/libcliraw.h"
 #include "torture/torture.h"
index ad9a97f1336ea8cc4ec76d486b7552a134839be2..0399daedf05204c986593448a2a32af566cb4a19 100644 (file)
@@ -95,8 +95,8 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
        torture_comment(tctx, "register the name\n");
        io.in.name = *name;
        io.in.wins_port = lp_nbt_port(tctx->lp_ctx);
-       io.in.wins_servers = str_list_make(tctx, address, NULL);
-       io.in.addresses = str_list_make(tctx, myaddress, NULL);
+       io.in.wins_servers = (const char **)str_list_make(tctx, address, NULL);
+       io.in.addresses = (const char **)str_list_make(tctx, myaddress, NULL);
        io.in.nb_flags = nb_flags;
        io.in.ttl = 300000;
        
@@ -168,8 +168,8 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
        torture_comment(tctx, "refresh the name\n");
        refresh.in.name = *name;
        refresh.in.wins_port = lp_nbt_port(tctx->lp_ctx);
-       refresh.in.wins_servers = str_list_make(tctx, address, NULL);
-       refresh.in.addresses = str_list_make(tctx, myaddress, NULL);
+       refresh.in.wins_servers = (const char **)str_list_make(tctx, address, NULL);
+       refresh.in.addresses = (const char **)str_list_make(tctx, myaddress, NULL);
        refresh.in.nb_flags = nb_flags;
        refresh.in.ttl = 12345;
        
index 63636f8c5f7856fead65b525a6d8b97a2b454d75..70bd070009e33985165b01da87cc67e201fbdfb3 100644 (file)
@@ -22,7 +22,7 @@
 #include "torture/ndr/ndr.h"
 #include "torture/ndr/proto.h"
 #include "torture/torture.h"
-#include "util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "param/param.h"
 
 struct ndr_pull_test_data {
@@ -96,7 +96,7 @@ static bool test_check_string_terminator(struct torture_context *tctx)
        TALLOC_CTX *mem_ctx = tctx;
 
        /* Simple test */
-       blob = strhex_to_data_blob("0000");
+       blob = strhex_to_data_blob(tctx, "0000");
        
        ndr = ndr_pull_init_blob(&blob, mem_ctx, lp_iconv_convenience(tctx->lp_ctx));
 
@@ -115,7 +115,7 @@ static bool test_check_string_terminator(struct torture_context *tctx)
 
        talloc_free(ndr);
 
-       blob = strhex_to_data_blob("11220000");
+       blob = strhex_to_data_blob(tctx, "11220000");
        ndr = ndr_pull_init_blob(&blob, mem_ctx, lp_iconv_convenience(tctx->lp_ctx));
 
        torture_assert_ndr_success(tctx,
index ab256a7152bba302fa4169e0da4f24c182ec75e0..60a3230d257edee72092c6e7cbc65c3fc657a4a8 100644 (file)
@@ -197,10 +197,10 @@ static const uint8_t queryvalue_in_data[] = {
 static bool queryvalue_in_check(struct torture_context *tctx, 
                                                                  struct winreg_QueryValue *r)
 {
-       torture_assert_str_equal(tctx, r->in.value_name.name, "HOMEPATH", "name");
+       torture_assert_str_equal(tctx, r->in.value_name->name, "HOMEPATH", "name");
        torture_assert_int_equal(tctx, *r->in.type, 0, "type");
-       torture_assert_int_equal(tctx, *r->in.size, 4095, "size");
-       torture_assert_int_equal(tctx, *r->in.length, 0, "length");
+       torture_assert_int_equal(tctx, *r->in.data_size, 4095, "size");
+       torture_assert_int_equal(tctx, *r->in.data_length, 0, "length");
        torture_assert(tctx, r->in.data == NULL, "data pointer");
 
        return true;
@@ -218,8 +218,8 @@ static bool queryvalue_out_check(struct torture_context *tctx,
        torture_assert_werr_ok(tctx, r->out.result, "return code");
        torture_assert_int_equal(tctx, *r->out.type, 1, "type");
        torture_assert(tctx, r->out.data == NULL, "data pointer");
-       torture_assert_int_equal(tctx, *r->out.size, 76, "size");
-       torture_assert_int_equal(tctx, *r->out.length, 0, "length");
+       torture_assert_int_equal(tctx, *r->out.data_size, 76, "size");
+       torture_assert_int_equal(tctx, *r->out.data_length, 0, "length");
 
        return true;
 }
index 7e964b4d426ed66f83e1c445233855972da93d6d..19924e731bb1e4923e0f08a96da7fb386628607d 100644 (file)
@@ -2788,6 +2788,75 @@ done:
        return ret;
 }
 
+static bool test_raw_oplock_batch25(struct torture_context *tctx,
+                                   struct smbcli_state *cli1,
+                                   struct smbcli_state *cli2)
+{
+       const char *fname = BASEDIR "\\test_batch25.dat";
+       NTSTATUS status;
+       bool ret = true;
+       union smb_open io;
+       union smb_setfileinfo sfi;
+       uint16_t fnum=0;
+
+       if (!torture_setup_dir(cli1, BASEDIR)) {
+               return false;
+       }
+
+       /* cleanup */
+       smbcli_unlink(cli1->tree, fname);
+
+       smbcli_oplock_handler(cli1->transport, oplock_handler_ack_to_given, cli1->tree);
+
+       /*
+         base ntcreatex parms
+       */
+       io.generic.level = RAW_OPEN_NTCREATEX;
+       io.ntcreatex.in.root_fid = 0;
+       io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
+       io.ntcreatex.in.alloc_size = 0;
+       io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
+       io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_NONE;
+       io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN_IF;
+       io.ntcreatex.in.create_options = 0;
+       io.ntcreatex.in.impersonation = NTCREATEX_IMPERSONATION_ANONYMOUS;
+       io.ntcreatex.in.security_flags = 0;
+       io.ntcreatex.in.fname = fname;
+
+       torture_comment(tctx, "BATCH25: open a file with an batch oplock "
+                       "(share mode: none)\n");
+
+       ZERO_STRUCT(break_info);
+       io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED |
+               NTCREATEX_FLAGS_REQUEST_OPLOCK |
+               NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK;
+       status = smb_raw_open(cli1->tree, tctx, &io);
+       CHECK_STATUS(tctx, status, NT_STATUS_OK);
+       fnum = io.ntcreatex.out.file.fnum;
+       CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
+
+       torture_comment(tctx, "setpathinfo attribute info should not trigger "
+                       "a break nor a violation\n");
+       ZERO_STRUCT(sfi);
+       sfi.generic.level = RAW_SFILEINFO_SETATTR;
+       sfi.generic.in.file.path        = fname;
+       sfi.setattr.in.attrib           = FILE_ATTRIBUTE_HIDDEN;
+       sfi.setattr.in.write_time       = 0;
+
+        status = smb_raw_setpathinfo(cli2->tree, &sfi);
+
+       CHECK_STATUS(tctx, status, NT_STATUS_OK);
+       CHECK_VAL(break_info.count, 0);
+
+       smbcli_close(cli1->tree, fnum);
+
+done:
+       smb_raw_exit(cli1->session);
+       smb_raw_exit(cli2->session);
+       smbcli_deltree(cli1->tree, BASEDIR);
+       return ret;
+}
+
 /* 
    basic testing of oplocks
 */
@@ -2825,6 +2894,7 @@ struct torture_suite *torture_raw_oplock(TALLOC_CTX *mem_ctx)
        torture_suite_add_2smb_test(suite, "BATCH22", test_raw_oplock_batch22);
        torture_suite_add_2smb_test(suite, "BATCH23", test_raw_oplock_batch23);
        torture_suite_add_2smb_test(suite, "BATCH24", test_raw_oplock_batch24);
+       torture_suite_add_2smb_test(suite, "BATCH25", test_raw_oplock_batch25);
 
        return suite;
 }
index e5cb3d7ddf75e4b80c33a81dd41cb6b4626f74b9..da6ce2b5f5e83a92d5260137cc21f7c32d331c9f 100644 (file)
@@ -62,6 +62,8 @@ static bool test_DsGetDomainControllerInfo(struct dcerpc_pipe *p, struct torture
 {
        NTSTATUS status;
        struct drsuapi_DsGetDomainControllerInfo r;
+       union drsuapi_DsGetDCInfoCtr ctr;
+       int32_t level_out = 0;
        bool found = false;
        int i, j, k;
        
@@ -91,16 +93,21 @@ static bool test_DsGetDomainControllerInfo(struct dcerpc_pipe *p, struct torture
 
        for (i=0; i < ARRAY_SIZE(levels); i++) {
                for (j=0; j < ARRAY_SIZE(names); j++) {
+                       union drsuapi_DsGetDCInfoRequest req;
                        level = levels[i];
                        r.in.bind_handle = &priv->bind_handle;
                        r.in.level = 1;
+                       r.in.req = &req;
                        
-                       r.in.req.req1.domain_name = names[j].name;
-                       r.in.req.req1.level = level;
+                       r.in.req->req1.domain_name = names[j].name;
+                       r.in.req->req1.level = level;
+
+                       r.out.ctr = &ctr;
+                       r.out.level_out = &level_out;
                        
                        torture_comment(torture,
                                   "testing DsGetDomainControllerInfo level %d on domainname '%s'\n",
-                              r.in.req.req1.level, r.in.req.req1.domain_name);
+                              r.in.req->req1.level, r.in.req->req1.domain_name);
                
                        status = dcerpc_drsuapi_DsGetDomainControllerInfo(p, torture, &r);
                        torture_assert_ntstatus_ok(torture, status,
@@ -115,13 +122,13 @@ static bool test_DsGetDomainControllerInfo(struct dcerpc_pipe *p, struct torture
                        }
 
                        torture_assert_int_equal(torture, 
-                                                                        r.in.req.req1.level, r.out.level_out, 
+                                                                        r.in.req->req1.level, *r.out.level_out,
                                                                         "dcerpc_drsuapi_DsGetDomainControllerInfo level"); 
 
                        switch (level) {
                        case 1:
-                               for (k=0; k < r.out.ctr.ctr1.count; k++) {
-                                       if (strcasecmp_m(r.out.ctr.ctr1.array[k].netbios_name, 
+                               for (k=0; k < r.out.ctr->ctr1.count; k++) {
+                                       if (strcasecmp_m(r.out.ctr->ctr1.array[k].netbios_name,
                                                         torture_join_netbios_name(priv->join)) == 0) {
                                                found = true;
                                                break;
@@ -129,11 +136,11 @@ static bool test_DsGetDomainControllerInfo(struct dcerpc_pipe *p, struct torture
                                }
                                break;
                        case 2:
-                               for (k=0; k < r.out.ctr.ctr2.count; k++) {
-                                       if (strcasecmp_m(r.out.ctr.ctr2.array[k].netbios_name, 
+                               for (k=0; k < r.out.ctr->ctr2.count; k++) {
+                                       if (strcasecmp_m(r.out.ctr->ctr2.array[k].netbios_name,
                                                         torture_join_netbios_name(priv->join)) == 0) {
                                                found = true;
-                                               priv->dcinfo    = r.out.ctr.ctr2.array[k];
+                                               priv->dcinfo    = r.out.ctr->ctr2.array[k];
                                                break;
                                        }
                                }
@@ -146,12 +153,15 @@ static bool test_DsGetDomainControllerInfo(struct dcerpc_pipe *p, struct torture
 
        r.in.bind_handle = &priv->bind_handle;
        r.in.level = 1;
-       
-       r.in.req.req1.domain_name = "__UNKNOWN_DOMAIN__"; /* This is clearly ignored for this level */
-       r.in.req.req1.level = -1;
+
+       r.out.ctr = &ctr;
+       r.out.level_out = &level_out;
+
+       r.in.req->req1.domain_name = "__UNKNOWN_DOMAIN__"; /* This is clearly ignored for this level */
+       r.in.req->req1.level = -1;
        
        printf("testing DsGetDomainControllerInfo level %d on domainname '%s'\n",
-              r.in.req.req1.level, r.in.req.req1.domain_name);
+              r.in.req->req1.level, r.in.req->req1.domain_name);
        
        status = dcerpc_drsuapi_DsGetDomainControllerInfo(p, torture, &r);
 
@@ -164,8 +174,8 @@ static bool test_DsGetDomainControllerInfo(struct dcerpc_pipe *p, struct torture
                const char *dc_account = talloc_asprintf(torture, "%s\\%s$",
                                                         torture_join_dom_netbios_name(priv->join), 
                                                         priv->dcinfo.netbios_name);
-               for (k=0; k < r.out.ctr.ctr01.count; k++) {
-                       if (strcasecmp_m(r.out.ctr.ctr01.array[k].client_account, 
+               for (k=0; k < r.out.ctr->ctr01.count; k++) {
+                       if (strcasecmp_m(r.out.ctr->ctr01.array[k].client_account,
                                         dc_account)) {
                                found = true;
                                break;
@@ -184,22 +194,29 @@ static bool test_DsWriteAccountSpn(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
 {
        NTSTATUS status;
        struct drsuapi_DsWriteAccountSpn r;
+       union drsuapi_DsWriteAccountSpnRequest req;
        struct drsuapi_DsNameString names[2];
+       union drsuapi_DsWriteAccountSpnResult res;
+       int32_t level_out;
        bool ret = true;
 
        r.in.bind_handle                = &priv->bind_handle;
        r.in.level                      = 1;
+       r.in.req                        = &req;
 
        printf("testing DsWriteAccountSpn\n");
 
-       r.in.req.req1.operation = DRSUAPI_DS_SPN_OPERATION_ADD;
-       r.in.req.req1.unknown1  = 0;
-       r.in.req.req1.object_dn = priv->dcinfo.computer_dn;
-       r.in.req.req1.count     = 2;
-       r.in.req.req1.spn_names = names;
+       r.in.req->req1.operation        = DRSUAPI_DS_SPN_OPERATION_ADD;
+       r.in.req->req1.unknown1 = 0;
+       r.in.req->req1.object_dn        = priv->dcinfo.computer_dn;
+       r.in.req->req1.count            = 2;
+       r.in.req->req1.spn_names        = names;
        names[0].str = talloc_asprintf(mem_ctx, "smbtortureSPN/%s",priv->dcinfo.netbios_name);
        names[1].str = talloc_asprintf(mem_ctx, "smbtortureSPN/%s",priv->dcinfo.dns_name);
 
+       r.out.res                       = &res;
+       r.out.level_out                 = &level_out;
+
        status = dcerpc_drsuapi_DsWriteAccountSpn(p, mem_ctx, &r);
        if (!NT_STATUS_IS_OK(status)) {
                const char *errstr = nt_errstr(status);
@@ -213,8 +230,8 @@ static bool test_DsWriteAccountSpn(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
                ret = false;
        }
 
-       r.in.req.req1.operation = DRSUAPI_DS_SPN_OPERATION_DELETE;
-       r.in.req.req1.unknown1  = 0;
+       r.in.req->req1.operation        = DRSUAPI_DS_SPN_OPERATION_DELETE;
+       r.in.req->req1.unknown1         = 0;
 
        status = dcerpc_drsuapi_DsWriteAccountSpn(p, mem_ctx, &r);
        if (!NT_STATUS_IS_OK(status)) {
@@ -237,6 +254,9 @@ static bool test_DsReplicaGetInfo(struct dcerpc_pipe *p, struct torture_context
 {
        NTSTATUS status;
        struct drsuapi_DsReplicaGetInfo r;
+       union drsuapi_DsReplicaGetInfoRequest req;
+       union drsuapi_DsReplicaInfo info;
+       enum drsuapi_DsReplicaInfoType info_type;
        bool ret = true;
        int i;
        struct {
@@ -313,6 +333,7 @@ static bool test_DsReplicaGetInfo(struct dcerpc_pipe *p, struct torture_context
        }
 
        r.in.bind_handle        = &priv->bind_handle;
+       r.in.req                = &req;
 
        for (i=0; i < ARRAY_SIZE(array); i++) {
                const char *object_dn;
@@ -325,21 +346,24 @@ static bool test_DsReplicaGetInfo(struct dcerpc_pipe *p, struct torture_context
                r.in.level = array[i].level;
                switch(r.in.level) {
                case DRSUAPI_DS_REPLICA_GET_INFO:
-                       r.in.req.req1.info_type = array[i].infotype;
-                       r.in.req.req1.object_dn = object_dn;
-                       ZERO_STRUCT(r.in.req.req1.guid1);
+                       r.in.req->req1.info_type        = array[i].infotype;
+                       r.in.req->req1.object_dn        = object_dn;
+                       ZERO_STRUCT(r.in.req->req1.guid1);
                        break;
                case DRSUAPI_DS_REPLICA_GET_INFO2:
-                       r.in.req.req2.info_type = array[i].infotype;
-                       r.in.req.req2.object_dn = object_dn;
-                       ZERO_STRUCT(r.in.req.req1.guid1);
-                       r.in.req.req2.unknown1  = 0;
-                       r.in.req.req2.string1   = NULL;
-                       r.in.req.req2.string2   = NULL;
-                       r.in.req.req2.unknown2  = 0;
+                       r.in.req->req2.info_type        = array[i].infotype;
+                       r.in.req->req2.object_dn        = object_dn;
+                       ZERO_STRUCT(r.in.req->req2.guid1);
+                       r.in.req->req2.unknown1 = 0;
+                       r.in.req->req2.string1  = NULL;
+                       r.in.req->req2.string2  = NULL;
+                       r.in.req->req2.unknown2 = 0;
                        break;
                }
 
+               r.out.info              = &info;
+               r.out.info_type         = &info_type;
+
                status = dcerpc_drsuapi_DsReplicaGetInfo(p, tctx, &r);
                if (!NT_STATUS_IS_OK(status)) {
                        const char *errstr = nt_errstr(status);
@@ -501,9 +525,12 @@ static bool test_DsGetNCChanges(struct dcerpc_pipe *p, struct torture_context *t
        bool ret = true;
        int i;
        struct drsuapi_DsGetNCChanges r;
+       union drsuapi_DsGetNCChangesRequest req;
+       union drsuapi_DsGetNCChangesCtr ctr;
        struct drsuapi_DsReplicaObjectIdentifier nc;
        struct GUID null_guid;
        struct dom_sid null_sid;
+       int32_t level_out;
        struct {
                int32_t level;
        } array[] = {
@@ -528,29 +555,32 @@ static bool test_DsGetNCChanges(struct dcerpc_pipe *p, struct torture_context *t
                        array[i].level);
 
                r.in.bind_handle        = &priv->bind_handle;
-               r.in.level              = &array[i].level;
+               r.in.level              = array[i].level;
+               r.out.level_out         = &level_out;
+               r.out.ctr               = &ctr;
 
-               switch (*r.in.level) {
+               switch (r.in.level) {
                case 5:
                        nc.guid = null_guid;
                        nc.sid  = null_sid;
                        nc.dn   = priv->domain_obj_dn?priv->domain_obj_dn:"";
 
-                       r.in.req.req5.destination_dsa_guid              = GUID_random();
-                       r.in.req.req5.source_dsa_invocation_id          = null_guid;
-                       r.in.req.req5.naming_context                    = &nc;
-                       r.in.req.req5.highwatermark.tmp_highest_usn     = 0;
-                       r.in.req.req5.highwatermark.reserved_usn        = 0;
-                       r.in.req.req5.highwatermark.highest_usn         = 0;
-                       r.in.req.req5.uptodateness_vector               = NULL;
-                       r.in.req.req5.replica_flags                     = 0;
+                       r.in.req                                        = &req;
+                       r.in.req->req5.destination_dsa_guid             = GUID_random();
+                       r.in.req->req5.source_dsa_invocation_id         = null_guid;
+                       r.in.req->req5.naming_context                   = &nc;
+                       r.in.req->req5.highwatermark.tmp_highest_usn    = 0;
+                       r.in.req->req5.highwatermark.reserved_usn       = 0;
+                       r.in.req->req5.highwatermark.highest_usn        = 0;
+                       r.in.req->req5.uptodateness_vector              = NULL;
+                       r.in.req->req5.replica_flags                    = 0;
                        if (lp_parm_bool(tctx->lp_ctx, NULL, "drsuapi","compression", false)) {
-                               r.in.req.req5.replica_flags             |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
+                               r.in.req->req5.replica_flags            |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
                        }
-                       r.in.req.req5.max_object_count                  = 0;
-                       r.in.req.req5.max_ndr_size                      = 0;
-                       r.in.req.req5.extended_op                       = DRSUAPI_EXOP_NONE;
-                       r.in.req.req5.fsmo_info                         = 0;
+                       r.in.req->req5.max_object_count                 = 0;
+                       r.in.req->req5.max_ndr_size                     = 0;
+                       r.in.req->req5.extended_op                      = DRSUAPI_EXOP_NONE;
+                       r.in.req->req5.fsmo_info                        = 0;
 
                        break;
                case 8:
@@ -558,33 +588,34 @@ static bool test_DsGetNCChanges(struct dcerpc_pipe *p, struct torture_context *t
                        nc.sid  = null_sid;
                        nc.dn   = priv->domain_obj_dn?priv->domain_obj_dn:"";
 
-                       r.in.req.req8.destination_dsa_guid              = GUID_random();
-                       r.in.req.req8.source_dsa_invocation_id          = null_guid;
-                       r.in.req.req8.naming_context                    = &nc;
-                       r.in.req.req8.highwatermark.tmp_highest_usn     = 0;
-                       r.in.req.req8.highwatermark.reserved_usn        = 0;
-                       r.in.req.req8.highwatermark.highest_usn         = 0;
-                       r.in.req.req8.uptodateness_vector               = NULL;
-                       r.in.req.req8.replica_flags                     = 0;
+                       r.in.req                                        = &req;
+                       r.in.req->req8.destination_dsa_guid             = GUID_random();
+                       r.in.req->req8.source_dsa_invocation_id         = null_guid;
+                       r.in.req->req8.naming_context                   = &nc;
+                       r.in.req->req8.highwatermark.tmp_highest_usn    = 0;
+                       r.in.req->req8.highwatermark.reserved_usn       = 0;
+                       r.in.req->req8.highwatermark.highest_usn        = 0;
+                       r.in.req->req8.uptodateness_vector              = NULL;
+                       r.in.req->req8.replica_flags                    = 0;
                        if (lp_parm_bool(tctx->lp_ctx, NULL, "drsuapi", "compression", false)) {
-                               r.in.req.req8.replica_flags             |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
+                               r.in.req->req8.replica_flags            |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
                        }
                        if (lp_parm_bool(tctx->lp_ctx, NULL, "drsuapi", "neighbour_writeable", true)) {
-                               r.in.req.req8.replica_flags             |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE;
+                               r.in.req->req8.replica_flags            |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE;
                        }
-                       r.in.req.req8.replica_flags                     |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
+                       r.in.req->req8.replica_flags                    |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
                                                                        | DRSUAPI_DS_REPLICA_NEIGHBOUR_DO_SCHEDULED_SYNCS
                                                                        | DRSUAPI_DS_REPLICA_NEIGHBOUR_RETURN_OBJECT_PARENTS
                                                                        | DRSUAPI_DS_REPLICA_NEIGHBOUR_NEVER_SYNCED
                                                                        ;
-                       r.in.req.req8.max_object_count                  = 402;
-                       r.in.req.req8.max_ndr_size                      = 402116;
-                       r.in.req.req8.extended_op                       = DRSUAPI_EXOP_NONE;
-                       r.in.req.req8.fsmo_info                         = 0;
-                       r.in.req.req8.partial_attribute_set             = NULL;
-                       r.in.req.req8.partial_attribute_set_ex          = NULL;
-                       r.in.req.req8.mapping_ctr.num_mappings          = 0;
-                       r.in.req.req8.mapping_ctr.mappings              = NULL;
+                       r.in.req->req8.max_object_count                 = 402;
+                       r.in.req->req8.max_ndr_size                     = 402116;
+                       r.in.req->req8.extended_op                      = DRSUAPI_EXOP_NONE;
+                       r.in.req->req8.fsmo_info                        = 0;
+                       r.in.req->req8.partial_attribute_set            = NULL;
+                       r.in.req->req8.partial_attribute_set_ex         = NULL;
+                       r.in.req->req8.mapping_ctr.num_mappings         = 0;
+                       r.in.req->req8.mapping_ctr.mappings             = NULL;
 
                        break;
                }
@@ -611,20 +642,23 @@ bool test_QuerySitesByCost(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
 {
        NTSTATUS status;
        struct drsuapi_QuerySitesByCost r;
+       union drsuapi_QuerySitesByCostRequest req;
        bool ret = true;
 
        const char *my_site = "Default-First-Site-Name";
        const char *remote_site1 = "smbtorture-nonexisting-site1";
        const char *remote_site2 = "smbtorture-nonexisting-site2";
 
+       req.req1.site_from = talloc_strdup(mem_ctx, my_site);
+       req.req1.num_req = 2;
+       req.req1.site_to = talloc_zero_array(mem_ctx, const char *, 2);
+       req.req1.site_to[0] = talloc_strdup(mem_ctx, remote_site1);
+       req.req1.site_to[1] = talloc_strdup(mem_ctx, remote_site2);
+       req.req1.flags = 0;
+
        r.in.bind_handle = &priv->bind_handle;
        r.in.level = 1;
-       r.in.req.req1.site_from = talloc_strdup(mem_ctx, my_site);
-       r.in.req.req1.num_req = 2;
-       r.in.req.req1.site_to = talloc_zero_array(mem_ctx, const char *, r.in.req.req1.num_req);
-       r.in.req.req1.site_to[0] = talloc_strdup(mem_ctx, remote_site1);
-       r.in.req.req1.site_to[1] = talloc_strdup(mem_ctx, remote_site2);
-       r.in.req.req1.flags = 0;
+       r.in.req = &req;
 
        status = dcerpc_drsuapi_QuerySitesByCost(p, mem_ctx, &r);
        if (!NT_STATUS_IS_OK(status)) {
@@ -641,17 +675,17 @@ bool test_QuerySitesByCost(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
 
        if (W_ERROR_IS_OK(r.out.result)) {
 
-               if (!W_ERROR_EQUAL(r.out.ctr.ctr1.info[0].error_code, WERR_DS_OBJ_NOT_FOUND) ||
-                   !W_ERROR_EQUAL(r.out.ctr.ctr1.info[1].error_code, WERR_DS_OBJ_NOT_FOUND)) { 
+               if (!W_ERROR_EQUAL(r.out.ctr->ctr1.info[0].error_code, WERR_DS_OBJ_NOT_FOUND) ||
+                   !W_ERROR_EQUAL(r.out.ctr->ctr1.info[1].error_code, WERR_DS_OBJ_NOT_FOUND)) {
                        printf("expected error_code WERR_DS_OBJ_NOT_FOUND, got %s\n", 
-                               win_errstr(r.out.ctr.ctr1.info[0].error_code));
+                               win_errstr(r.out.ctr->ctr1.info[0].error_code));
                        ret = false;
                }
 
-               if ((r.out.ctr.ctr1.info[0].site_cost != (uint32_t) -1) ||
-                   (r.out.ctr.ctr1.info[1].site_cost != (uint32_t) -1)) {
+               if ((r.out.ctr->ctr1.info[0].site_cost != (uint32_t) -1) ||
+                   (r.out.ctr->ctr1.info[1].site_cost != (uint32_t) -1)) {
                        printf("expected site_cost %d, got %d\n", 
-                               (uint32_t) -1, r.out.ctr.ctr1.info[0].site_cost);
+                               (uint32_t) -1, r.out.ctr->ctr1.info[0].site_cost);
                        ret = false;
                }
        }
index a9a614953d674a5b1583e867215b760b24150d50..dabd4125c7356779cca456aca580ec8cd316dee5 100644 (file)
@@ -38,6 +38,10 @@ static bool test_DsCrackNamesMatrix(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
        NTSTATUS status;
        bool ret = true;
        struct drsuapi_DsCrackNames r;
+       union drsuapi_DsNameRequest req;
+       int32_t level_out;
+       union drsuapi_DsNameCtr ctr;
+
        enum drsuapi_DsNameFormat formats[] = {
                DRSUAPI_DS_NAME_FORMAT_UNKNOWN,
                DRSUAPI_DS_NAME_FORMAT_FQDN_1779,
@@ -60,17 +64,21 @@ static bool test_DsCrackNamesMatrix(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
        ZERO_STRUCT(r);
        r.in.bind_handle                = &priv->bind_handle;
        r.in.level                      = 1;
-       r.in.req.req1.codepage          = 1252; /* german */
-       r.in.req.req1.language          = 0x00000407; /* german */
-       r.in.req.req1.count             = 1;
-       r.in.req.req1.names             = names;
-       r.in.req.req1.format_flags      = DRSUAPI_DS_NAME_FLAG_NO_FLAGS;
+       r.in.req                        = &req;
+       r.in.req->req1.codepage         = 1252; /* german */
+       r.in.req->req1.language         = 0x00000407; /* german */
+       r.in.req->req1.count            = 1;
+       r.in.req->req1.names            = names;
+       r.in.req->req1.format_flags     = DRSUAPI_DS_NAME_FLAG_NO_FLAGS;
+
+       r.out.level_out                 = &level_out;
+       r.out.ctr                       = &ctr;
 
        n_matrix[0][0] = dn;
 
        for (i = 0; i < ARRAY_SIZE(formats); i++) {
-               r.in.req.req1.format_offered    = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
-               r.in.req.req1.format_desired    = formats[i];
+               r.in.req->req1.format_offered   = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
+               r.in.req->req1.format_desired   = formats[i];
                names[0].str = dn;
                status = dcerpc_drsuapi_DsCrackNames(p, mem_ctx, &r);
                if (!NT_STATUS_IS_OK(status)) {
@@ -79,13 +87,13 @@ static bool test_DsCrackNamesMatrix(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
                                errstr = dcerpc_errstr(mem_ctx, p->last_fault_code);
                        }
                        printf("testing DsCrackNames (matrix prep) with name '%s' from format: %d desired format:%d ",
-                              names[0].str, r.in.req.req1.format_offered, r.in.req.req1.format_desired);
+                              names[0].str, r.in.req->req1.format_offered, r.in.req->req1.format_desired);
                
                        printf("dcerpc_drsuapi_DsCrackNames failed - %s\n", errstr);
                        ret = false;
                } else if (!W_ERROR_IS_OK(r.out.result)) {
                        printf("testing DsCrackNames (matrix prep) with name '%s' from format: %d desired format:%d ",
-                              names[0].str, r.in.req.req1.format_offered, r.in.req.req1.format_desired);
+                              names[0].str, r.in.req->req1.format_offered, r.in.req->req1.format_desired);
                
                        printf("DsCrackNames failed - %s\n", win_errstr(r.out.result));
                        ret = false;
@@ -96,33 +104,33 @@ static bool test_DsCrackNamesMatrix(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
                }
                switch (formats[i]) {
                case DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL:  
-                       if (r.out.ctr.ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE) {
+                       if (r.out.ctr->ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE) {
                                printf(__location__ ": Unexpected error (%d): This name lookup should fail\n", 
-                                      r.out.ctr.ctr1->array[0].status);
+                                      r.out.ctr->ctr1->array[0].status);
                                return false;
                        }
                        printf ("(expected) error\n");
                        break;
                case DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL:
-                       if (r.out.ctr.ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_NO_MAPPING) {
+                       if (r.out.ctr->ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_NO_MAPPING) {
                                printf(__location__ ": Unexpected error (%d): This name lookup should fail\n", 
-                                      r.out.ctr.ctr1->array[0].status);
+                                      r.out.ctr->ctr1->array[0].status);
                                return false;
                        }
                        printf ("(expected) error\n");
                        break;
                case DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN: 
                case DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY: 
-                       if (r.out.ctr.ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR) {
+                       if (r.out.ctr->ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR) {
                                printf(__location__ ": Unexpected error (%d): This name lookup should fail\n", 
-                                      r.out.ctr.ctr1->array[0].status);
+                                      r.out.ctr->ctr1->array[0].status);
                                return false;
                        }
                        printf ("(expected) error\n");
                        break;
                default:
-                       if (r.out.ctr.ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
-                               printf("Error: %d\n", r.out.ctr.ctr1->array[0].status);
+                       if (r.out.ctr->ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
+                               printf("Error: %d\n", r.out.ctr->ctr1->array[0].status);
                                return false;
                        }
                }
@@ -139,15 +147,15 @@ static bool test_DsCrackNamesMatrix(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
                        n_from[i] = NULL;
                        break;
                default:
-                       n_from[i] = r.out.ctr.ctr1->array[0].result_name;
+                       n_from[i] = r.out.ctr->ctr1->array[0].result_name;
                        printf("%s\n", n_from[i]);
                }
        }
 
        for (i = 0; i < ARRAY_SIZE(formats); i++) {
                for (j = 0; j < ARRAY_SIZE(formats); j++) {
-                       r.in.req.req1.format_offered    = formats[i];
-                       r.in.req.req1.format_desired    = formats[j];
+                       r.in.req->req1.format_offered   = formats[i];
+                       r.in.req->req1.format_desired   = formats[j];
                        if (!n_from[i]) {
                                n_matrix[i][j] = NULL;
                                continue;
@@ -160,11 +168,11 @@ static bool test_DsCrackNamesMatrix(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
                                        errstr = dcerpc_errstr(mem_ctx, p->last_fault_code);
                                }
                                printf("testing DsCrackNames (matrix) with name '%s' from format: %d desired format:%d failed - %s",
-                                      names[0].str, r.in.req.req1.format_offered, r.in.req.req1.format_desired, errstr);
+                                      names[0].str, r.in.req->req1.format_offered, r.in.req->req1.format_desired, errstr);
                                ret = false;
                        } else if (!W_ERROR_IS_OK(r.out.result)) {
                                printf("testing DsCrackNames (matrix) with name '%s' from format: %d desired format:%d failed - %s",
-                                      names[0].str, r.in.req.req1.format_offered, r.in.req.req1.format_desired, 
+                                      names[0].str, r.in.req->req1.format_offered, r.in.req->req1.format_desired,
                                       win_errstr(r.out.result));
                                ret = false;
                        }
@@ -172,8 +180,8 @@ static bool test_DsCrackNamesMatrix(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
                        if (!ret) {
                                return ret;
                        }
-                       if (r.out.ctr.ctr1->array[0].status == DRSUAPI_DS_NAME_STATUS_OK) {
-                               n_matrix[i][j] = r.out.ctr.ctr1->array[0].result_name;
+                       if (r.out.ctr->ctr1->array[0].status == DRSUAPI_DS_NAME_STATUS_OK) {
+                               n_matrix[i][j] = r.out.ctr->ctr1->array[0].result_name;
                        } else {
                                n_matrix[i][j] = NULL;
                        }
@@ -211,6 +219,9 @@ bool test_DsCrackNames(struct torture_context *tctx,
 {
        NTSTATUS status;
        struct drsuapi_DsCrackNames r;
+       union drsuapi_DsNameRequest req;
+       int32_t level_out;
+       union drsuapi_DsNameCtr ctr;
        struct drsuapi_DsNameString names[1];
        bool ret = true;
        const char *dns_domain;
@@ -233,21 +244,25 @@ bool test_DsCrackNames(struct torture_context *tctx,
        ZERO_STRUCT(r);
        r.in.bind_handle                = &priv->bind_handle;
        r.in.level                      = 1;
-       r.in.req.req1.codepage          = 1252; /* german */
-       r.in.req.req1.language          = 0x00000407; /* german */
-       r.in.req.req1.count             = 1;
-       r.in.req.req1.names             = names;
-       r.in.req.req1.format_flags      = DRSUAPI_DS_NAME_FLAG_NO_FLAGS;
+       r.in.req                        = &req;
+       r.in.req->req1.codepage         = 1252; /* german */
+       r.in.req->req1.language         = 0x00000407; /* german */
+       r.in.req->req1.count            = 1;
+       r.in.req->req1.names            = names;
+       r.in.req->req1.format_flags     = DRSUAPI_DS_NAME_FLAG_NO_FLAGS;
+
+       r.in.req->req1.format_offered   = DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY;
+       r.in.req->req1.format_desired   = DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT;
 
-       r.in.req.req1.format_offered    = DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY;
-       r.in.req.req1.format_desired    = DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT;
+       r.out.level_out                 = &level_out;
+       r.out.ctr                       = &ctr;
 
        dom_sid = dom_sid_string(mem_ctx, torture_join_sid(priv->join));
        
        names[0].str = dom_sid;
 
        printf("testing DsCrackNames with name '%s' desired format:%d\n",
-                       names[0].str, r.in.req.req1.format_desired);
+                       names[0].str, r.in.req->req1.format_desired);
 
        status = dcerpc_drsuapi_DsCrackNames(p, mem_ctx, &r);
        if (!NT_STATUS_IS_OK(status)) {
@@ -260,8 +275,8 @@ bool test_DsCrackNames(struct torture_context *tctx,
        } else if (!W_ERROR_IS_OK(r.out.result)) {
                printf("DsCrackNames failed - %s\n", win_errstr(r.out.result));
                ret = false;
-       } else if (r.out.ctr.ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
-               printf("DsCrackNames failed on name - %d\n", r.out.ctr.ctr1->array[0].status);
+       } else if (r.out.ctr->ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
+               printf("DsCrackNames failed on name - %d\n", r.out.ctr->ctr1->array[0].status);
                ret = false;
        }
 
@@ -269,13 +284,13 @@ bool test_DsCrackNames(struct torture_context *tctx,
                return ret;
        }
 
-       dns_domain = r.out.ctr.ctr1->array[0].dns_domain_name;
-       nt4_domain = r.out.ctr.ctr1->array[0].result_name;
+       dns_domain = r.out.ctr->ctr1->array[0].dns_domain_name;
+       nt4_domain = r.out.ctr->ctr1->array[0].result_name;
 
-       r.in.req.req1.format_desired    = DRSUAPI_DS_NAME_FORMAT_GUID;
+       r.in.req->req1.format_desired   = DRSUAPI_DS_NAME_FORMAT_GUID;
 
        printf("testing DsCrackNames with name '%s' desired format:%d\n",
-                       names[0].str, r.in.req.req1.format_desired);
+                       names[0].str, r.in.req->req1.format_desired);
 
        status = dcerpc_drsuapi_DsCrackNames(p, mem_ctx, &r);
        if (!NT_STATUS_IS_OK(status)) {
@@ -288,8 +303,8 @@ bool test_DsCrackNames(struct torture_context *tctx,
        } else if (!W_ERROR_IS_OK(r.out.result)) {
                printf("DsCrackNames failed - %s\n", win_errstr(r.out.result));
                ret = false;
-       } else if (r.out.ctr.ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
-               printf("DsCrackNames failed on name - %d\n", r.out.ctr.ctr1->array[0].status);
+       } else if (r.out.ctr->ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
+               printf("DsCrackNames failed on name - %d\n", r.out.ctr->ctr1->array[0].status);
                ret = false;
        }
 
@@ -297,14 +312,14 @@ bool test_DsCrackNames(struct torture_context *tctx,
                return ret;
        }
 
-       priv->domain_dns_name = r.out.ctr.ctr1->array[0].dns_domain_name;
-       priv->domain_guid_str = r.out.ctr.ctr1->array[0].result_name;
+       priv->domain_dns_name = r.out.ctr->ctr1->array[0].dns_domain_name;
+       priv->domain_guid_str = r.out.ctr->ctr1->array[0].result_name;
        GUID_from_string(priv->domain_guid_str, &priv->domain_guid);
 
-       r.in.req.req1.format_desired    = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
+       r.in.req->req1.format_desired   = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
 
        printf("testing DsCrackNames with name '%s' desired format:%d\n",
-                       names[0].str, r.in.req.req1.format_desired);
+                       names[0].str, r.in.req->req1.format_desired);
 
        status = dcerpc_drsuapi_DsCrackNames(p, mem_ctx, &r);
        if (!NT_STATUS_IS_OK(status)) {
@@ -317,8 +332,8 @@ bool test_DsCrackNames(struct torture_context *tctx,
        } else if (!W_ERROR_IS_OK(r.out.result)) {
                printf("DsCrackNames failed - %s\n", win_errstr(r.out.result));
                ret = false;
-       } else if (r.out.ctr.ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
-               printf("DsCrackNames failed on name - %d\n", r.out.ctr.ctr1->array[0].status);
+       } else if (r.out.ctr->ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
+               printf("DsCrackNames failed on name - %d\n", r.out.ctr->ctr1->array[0].status);
                ret = false;
        }
 
@@ -328,7 +343,7 @@ bool test_DsCrackNames(struct torture_context *tctx,
 
        ldb = ldb_init(mem_ctx, tctx->ev);
        
-       realm_dn_str = r.out.ctr.ctr1->array[0].result_name;
+       realm_dn_str = r.out.ctr->ctr1->array[0].result_name;
        realm_dn =  ldb_dn_new(mem_ctx, ldb, realm_dn_str);
        realm_canonical = ldb_dn_canonical_string(mem_ctx, realm_dn);
 
@@ -350,12 +365,12 @@ bool test_DsCrackNames(struct torture_context *tctx,
                    return false;
        };
 
-       r.in.req.req1.format_offered    = DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT;
-       r.in.req.req1.format_desired    = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
+       r.in.req->req1.format_offered   = DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT;
+       r.in.req->req1.format_desired   = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
        names[0].str = nt4_domain;
 
        printf("testing DsCrackNames with name '%s' desired format:%d\n",
-                       names[0].str, r.in.req.req1.format_desired);
+                       names[0].str, r.in.req->req1.format_desired);
 
        status = dcerpc_drsuapi_DsCrackNames(p, mem_ctx, &r);
        if (!NT_STATUS_IS_OK(status)) {
@@ -368,8 +383,8 @@ bool test_DsCrackNames(struct torture_context *tctx,
        } else if (!W_ERROR_IS_OK(r.out.result)) {
                printf("DsCrackNames failed - %s\n", win_errstr(r.out.result));
                ret = false;
-       } else if (r.out.ctr.ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
-               printf("DsCrackNames failed on name - %d\n", r.out.ctr.ctr1->array[0].status);
+       } else if (r.out.ctr->ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
+               printf("DsCrackNames failed on name - %d\n", r.out.ctr->ctr1->array[0].status);
                ret = false;
        }
 
@@ -377,14 +392,14 @@ bool test_DsCrackNames(struct torture_context *tctx,
                return ret;
        }
 
-       priv->domain_obj_dn = r.out.ctr.ctr1->array[0].result_name;
+       priv->domain_obj_dn = r.out.ctr->ctr1->array[0].result_name;
 
-       r.in.req.req1.format_offered    = DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT;
-       r.in.req.req1.format_desired    = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
+       r.in.req->req1.format_offered   = DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT;
+       r.in.req->req1.format_desired   = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
        names[0].str = talloc_asprintf(mem_ctx, "%s%s$", nt4_domain, test_dc);
 
        printf("testing DsCrackNames with name '%s' desired format:%d\n",
-              names[0].str, r.in.req.req1.format_desired);
+              names[0].str, r.in.req->req1.format_desired);
 
        status = dcerpc_drsuapi_DsCrackNames(p, mem_ctx, &r);
        if (!NT_STATUS_IS_OK(status)) {
@@ -397,8 +412,8 @@ bool test_DsCrackNames(struct torture_context *tctx,
        } else if (!W_ERROR_IS_OK(r.out.result)) {
                printf("DsCrackNames failed - %s\n", win_errstr(r.out.result));
                ret = false;
-       } else if (r.out.ctr.ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
-               printf("DsCrackNames failed on name - %d\n", r.out.ctr.ctr1->array[0].status);
+       } else if (r.out.ctr->ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
+               printf("DsCrackNames failed on name - %d\n", r.out.ctr->ctr1->array[0].status);
                ret = false;
        }
 
@@ -406,14 +421,14 @@ bool test_DsCrackNames(struct torture_context *tctx,
                return ret;
        }
 
-       FQDN_1779_name = r.out.ctr.ctr1->array[0].result_name;
+       FQDN_1779_name = r.out.ctr->ctr1->array[0].result_name;
 
-       r.in.req.req1.format_offered    = DRSUAPI_DS_NAME_FORMAT_GUID;
-       r.in.req.req1.format_desired    = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
+       r.in.req->req1.format_offered   = DRSUAPI_DS_NAME_FORMAT_GUID;
+       r.in.req->req1.format_desired   = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
        names[0].str = priv->domain_guid_str;
 
        printf("testing DsCrackNames with name '%s' desired format:%d\n",
-              names[0].str, r.in.req.req1.format_desired);
+              names[0].str, r.in.req->req1.format_desired);
 
        status = dcerpc_drsuapi_DsCrackNames(p, mem_ctx, &r);
        if (!NT_STATUS_IS_OK(status)) {
@@ -426,8 +441,8 @@ bool test_DsCrackNames(struct torture_context *tctx,
        } else if (!W_ERROR_IS_OK(r.out.result)) {
                printf("DsCrackNames failed - %s\n", win_errstr(r.out.result));
                ret = false;
-       } else if (r.out.ctr.ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
-               printf("DsCrackNames failed on name - %d\n", r.out.ctr.ctr1->array[0].status);
+       } else if (r.out.ctr->ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
+               printf("DsCrackNames failed on name - %d\n", r.out.ctr->ctr1->array[0].status);
                ret = false;
        }
 
@@ -435,8 +450,8 @@ bool test_DsCrackNames(struct torture_context *tctx,
                return ret;
        }
 
-       if (strcmp(priv->domain_dns_name, r.out.ctr.ctr1->array[0].dns_domain_name) != 0) {
-               printf("DsCrackNames failed to return same DNS name - expected %s got %s\n", priv->domain_dns_name, r.out.ctr.ctr1->array[0].dns_domain_name);
+       if (strcmp(priv->domain_dns_name, r.out.ctr->ctr1->array[0].dns_domain_name) != 0) {
+               printf("DsCrackNames failed to return same DNS name - expected %s got %s\n", priv->domain_dns_name, r.out.ctr->ctr1->array[0].dns_domain_name);
                return false;
        }
 
@@ -920,17 +935,17 @@ bool test_DsCrackNames(struct torture_context *tctx,
                
                for (i=0; i < ARRAY_SIZE(crack); i++) {
                        const char *comment;
-                       r.in.req.req1.format_flags   = crack[i].flags;
-                       r.in.req.req1.format_offered = crack[i].format_offered; 
-                       r.in.req.req1.format_desired = crack[i].format_desired;
+                       r.in.req->req1.format_flags   = crack[i].flags;
+                       r.in.req->req1.format_offered = crack[i].format_offered;
+                       r.in.req->req1.format_desired = crack[i].format_desired;
                        names[0].str = crack[i].str;
                        
                        if (crack[i].comment) {
                                comment = talloc_asprintf(mem_ctx, "'%s' with name '%s' desired format:%d\n",
-                                                         crack[i].comment, names[0].str, r.in.req.req1.format_desired);
+                                                         crack[i].comment, names[0].str, r.in.req->req1.format_desired);
                        } else {
                                comment = talloc_asprintf(mem_ctx, "'%s' desired format:%d\n",
-                                      names[0].str, r.in.req.req1.format_desired);
+                                      names[0].str, r.in.req->req1.format_desired);
                        }
                        if (crack[i].skip) {
                                printf("skipping: %s", comment);
@@ -947,11 +962,11 @@ bool test_DsCrackNames(struct torture_context *tctx,
                        } else if (!W_ERROR_IS_OK(r.out.result)) {
                                printf("DsCrackNames failed - %s\n", win_errstr(r.out.result));
                                ret = false;
-                       } else if (r.out.ctr.ctr1->array[0].status != crack[i].status) {
+                       } else if (r.out.ctr->ctr1->array[0].status != crack[i].status) {
                                if (crack[i].alternate_status) {
-                                       if (r.out.ctr.ctr1->array[0].status != crack[i].alternate_status) {
+                                       if (r.out.ctr->ctr1->array[0].status != crack[i].alternate_status) {
                                                printf("DsCrackNames unexpected status %d, wanted %d or %d on: %s\n", 
-                                                      r.out.ctr.ctr1->array[0].status,
+                                                      r.out.ctr->ctr1->array[0].status,
                                                       crack[i].status,
                                                       crack[i].alternate_status,
                                                       comment);
@@ -959,30 +974,30 @@ bool test_DsCrackNames(struct torture_context *tctx,
                                        }
                                } else {
                                        printf("DsCrackNames unexpected status %d, wanted %d on: %s\n", 
-                                              r.out.ctr.ctr1->array[0].status,
+                                              r.out.ctr->ctr1->array[0].status,
                                               crack[i].status,
                                               comment);
                                        ret = false;
                                }
                        } else if (crack[i].expected_str
-                                  && (strcmp(r.out.ctr.ctr1->array[0].result_name, 
+                                  && (strcmp(r.out.ctr->ctr1->array[0].result_name,
                                              crack[i].expected_str) != 0)) {
-                               if (strcasecmp(r.out.ctr.ctr1->array[0].result_name, 
+                               if (strcasecmp(r.out.ctr->ctr1->array[0].result_name,
                                               crack[i].expected_str) != 0) {
                                        printf("DsCrackNames failed - got %s, expected %s on %s\n", 
-                                              r.out.ctr.ctr1->array[0].result_name, 
+                                              r.out.ctr->ctr1->array[0].result_name,
                                               crack[i].expected_str, comment);
                                        ret = false;
                                } else {
                                        printf("(warning) DsCrackNames returned different case - got %s, expected %s on %s\n", 
-                                              r.out.ctr.ctr1->array[0].result_name, 
+                                              r.out.ctr->ctr1->array[0].result_name,
                                               crack[i].expected_str, comment);
                                }
                        } else if (crack[i].expected_dns
-                                  && (strcmp(r.out.ctr.ctr1->array[0].dns_domain_name, 
+                                  && (strcmp(r.out.ctr->ctr1->array[0].dns_domain_name,
                                              crack[i].expected_dns) != 0)) {
                                printf("DsCrackNames failed - got DNS name %s, expected %s on %s\n", 
-                                      r.out.ctr.ctr1->array[0].result_name, 
+                                      r.out.ctr->ctr1->array[0].result_name,
                                       crack[i].expected_str, comment);
                                ret = false;
                        }
index 41bb168619138e8d2289247969f670f11c15f1aa..bee2658816b2fa14614da16c6fa1965087855810 100644 (file)
@@ -265,6 +265,9 @@ static bool test_GetInfo(struct torture_context *tctx, struct DsSyncTest *ctx)
 {
        NTSTATUS status;
        struct drsuapi_DsCrackNames r;
+       union drsuapi_DsNameRequest req;
+       union drsuapi_DsNameCtr ctr;
+       int32_t level_out = 0;
        struct drsuapi_DsNameString names[1];
        bool ret = true;
        struct cldap_socket *cldap;
@@ -274,15 +277,19 @@ static bool test_GetInfo(struct torture_context *tctx, struct DsSyncTest *ctx)
 
        r.in.bind_handle                = &ctx->admin.drsuapi.bind_handle;
        r.in.level                      = 1;
-       r.in.req.req1.codepage          = 1252; /* western european */
-       r.in.req.req1.language          = 0x00000407; /* german */
-       r.in.req.req1.count             = 1;
-       r.in.req.req1.names             = names;
-       r.in.req.req1.format_flags      = DRSUAPI_DS_NAME_FLAG_NO_FLAGS;                
-       r.in.req.req1.format_offered    = DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT;
-       r.in.req.req1.format_desired    = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
+       r.in.req                        = &req;
+       r.in.req->req1.codepage         = 1252; /* western european */
+       r.in.req->req1.language         = 0x00000407; /* german */
+       r.in.req->req1.count            = 1;
+       r.in.req->req1.names            = names;
+       r.in.req->req1.format_flags     = DRSUAPI_DS_NAME_FLAG_NO_FLAGS;
+       r.in.req->req1.format_offered   = DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT;
+       r.in.req->req1.format_desired   = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
        names[0].str = talloc_asprintf(ctx, "%s\\", lp_workgroup(tctx->lp_ctx));
 
+       r.out.level_out                 = &level_out;
+       r.out.ctr                       = &ctr;
+
        status = dcerpc_drsuapi_DsCrackNames(ctx->admin.drsuapi.pipe, ctx, &r);
        if (!NT_STATUS_IS_OK(status)) {
                const char *errstr = nt_errstr(status);
@@ -296,7 +303,7 @@ static bool test_GetInfo(struct torture_context *tctx, struct DsSyncTest *ctx)
                return false;
        }
 
-       ctx->domain_dn = r.out.ctr.ctr1->array[0].result_name;
+       ctx->domain_dn = r.out.ctr->ctr1->array[0].result_name;
        
        ZERO_STRUCT(search);
        search.in.dest_address = ctx->drsuapi_binding->host;
@@ -592,6 +599,7 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
        uint64_t highest_usn = 0;
        const char *partition = NULL;
        struct drsuapi_DsGetNCChanges r;
+       union drsuapi_DsGetNCChangesRequest req;
        struct drsuapi_DsReplicaObjectIdentifier nc;
        struct drsuapi_DsGetNCChangesCtr1 *ctr1 = NULL;
        struct drsuapi_DsGetNCChangesCtr6 *ctr6 = NULL;
@@ -642,37 +650,38 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
                        array[i].level);
 
                r.in.bind_handle        = &ctx->new_dc.drsuapi.bind_handle;
-               r.in.level              = &array[i].level;
+               r.in.level              = array[i].level;
 
-               switch (*r.in.level) {
+               switch (r.in.level) {
                case 5:
                        nc.guid = null_guid;
                        nc.sid  = null_sid;
                        nc.dn   = partition; 
 
-                       r.in.req.req5.destination_dsa_guid              = ctx->new_dc.invocation_id;
-                       r.in.req.req5.source_dsa_invocation_id          = null_guid;
-                       r.in.req.req5.naming_context                    = &nc;
-                       r.in.req.req5.highwatermark.tmp_highest_usn     = highest_usn;
-                       r.in.req.req5.highwatermark.reserved_usn        = 0;
-                       r.in.req.req5.highwatermark.highest_usn         = highest_usn;
-                       r.in.req.req5.uptodateness_vector               = NULL;
-                       r.in.req.req5.replica_flags                     = 0;
+                       r.in.req                                        = &req;
+                       r.in.req->req5.destination_dsa_guid             = ctx->new_dc.invocation_id;
+                       r.in.req->req5.source_dsa_invocation_id         = null_guid;
+                       r.in.req->req5.naming_context                   = &nc;
+                       r.in.req->req5.highwatermark.tmp_highest_usn    = highest_usn;
+                       r.in.req->req5.highwatermark.reserved_usn       = 0;
+                       r.in.req->req5.highwatermark.highest_usn        = highest_usn;
+                       r.in.req->req5.uptodateness_vector              = NULL;
+                       r.in.req->req5.replica_flags                    = 0;
                        if (lp_parm_bool(tctx->lp_ctx, NULL, "dssync", "compression", false)) {
-                               r.in.req.req5.replica_flags             |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
+                               r.in.req->req5.replica_flags            |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
                        }
                        if (lp_parm_bool(tctx->lp_ctx, NULL, "dssync", "neighbour_writeable", true)) {
-                               r.in.req.req5.replica_flags             |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE;
+                               r.in.req->req5.replica_flags            |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE;
                        }
-                       r.in.req.req5.replica_flags                     |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
+                       r.in.req->req5.replica_flags                    |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
                                                                        | DRSUAPI_DS_REPLICA_NEIGHBOUR_DO_SCHEDULED_SYNCS
                                                                        | DRSUAPI_DS_REPLICA_NEIGHBOUR_RETURN_OBJECT_PARENTS
                                                                        | DRSUAPI_DS_REPLICA_NEIGHBOUR_NEVER_SYNCED
                                                                        ;
-                       r.in.req.req5.max_object_count                  = 133;
-                       r.in.req.req5.max_ndr_size                      = 1336770;
-                       r.in.req.req5.extended_op                       = DRSUAPI_EXOP_NONE;
-                       r.in.req.req5.fsmo_info                         = 0;
+                       r.in.req->req5.max_object_count                 = 133;
+                       r.in.req->req5.max_ndr_size                     = 1336770;
+                       r.in.req->req5.extended_op                      = DRSUAPI_EXOP_NONE;
+                       r.in.req->req5.fsmo_info                        = 0;
 
                        break;
                case 8:
@@ -680,35 +689,36 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
                        nc.sid  = null_sid;
                        nc.dn   = partition; 
                        /* nc.dn can be set to any other ad partition */
-                       
-                       r.in.req.req8.destination_dsa_guid              = ctx->new_dc.invocation_id;
-                       r.in.req.req8.source_dsa_invocation_id          = null_guid;
-                       r.in.req.req8.naming_context                    = &nc;
-                       r.in.req.req8.highwatermark.tmp_highest_usn     = highest_usn;
-                       r.in.req.req8.highwatermark.reserved_usn        = 0;
-                       r.in.req.req8.highwatermark.highest_usn         = highest_usn;
-                       r.in.req.req8.uptodateness_vector               = NULL;
-                       r.in.req.req8.replica_flags                     = 0;
+
+                       r.in.req                                        = &req;
+                       r.in.req->req8.destination_dsa_guid             = ctx->new_dc.invocation_id;
+                       r.in.req->req8.source_dsa_invocation_id         = null_guid;
+                       r.in.req->req8.naming_context                   = &nc;
+                       r.in.req->req8.highwatermark.tmp_highest_usn    = highest_usn;
+                       r.in.req->req8.highwatermark.reserved_usn       = 0;
+                       r.in.req->req8.highwatermark.highest_usn        = highest_usn;
+                       r.in.req->req8.uptodateness_vector              = NULL;
+                       r.in.req->req8.replica_flags                    = 0;
                        if (lp_parm_bool(tctx->lp_ctx, NULL, "dssync", "compression", false)) {
-                               r.in.req.req8.replica_flags             |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
+                               r.in.req->req8.replica_flags            |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
                        }
                        if (lp_parm_bool(tctx->lp_ctx, NULL, "dssync", "neighbour_writeable", true)) {
-                               r.in.req.req8.replica_flags             |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE;
+                               r.in.req->req8.replica_flags            |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE;
                        }
-                       r.in.req.req8.replica_flags                     |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
+                       r.in.req->req8.replica_flags                    |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
                                                                        | DRSUAPI_DS_REPLICA_NEIGHBOUR_DO_SCHEDULED_SYNCS
                                                                        | DRSUAPI_DS_REPLICA_NEIGHBOUR_RETURN_OBJECT_PARENTS
                                                                        | DRSUAPI_DS_REPLICA_NEIGHBOUR_NEVER_SYNCED
                                                                        ;
-                       r.in.req.req8.max_object_count                  = 402;
-                       r.in.req.req8.max_ndr_size                      = 402116;
+                       r.in.req->req8.max_object_count                 = 402;
+                       r.in.req->req8.max_ndr_size                     = 402116;
 
-                       r.in.req.req8.extended_op                       = DRSUAPI_EXOP_NONE;
-                       r.in.req.req8.fsmo_info                         = 0;
-                       r.in.req.req8.partial_attribute_set             = NULL;
-                       r.in.req.req8.partial_attribute_set_ex          = NULL;
-                       r.in.req.req8.mapping_ctr.num_mappings          = 0;
-                       r.in.req.req8.mapping_ctr.mappings              = NULL;
+                       r.in.req->req8.extended_op                      = DRSUAPI_EXOP_NONE;
+                       r.in.req->req8.fsmo_info                        = 0;
+                       r.in.req->req8.partial_attribute_set            = NULL;
+                       r.in.req->req8.partial_attribute_set_ex         = NULL;
+                       r.in.req->req8.mapping_ctr.num_mappings         = 0;
+                       r.in.req->req8.mapping_ctr.mappings             = NULL;
 
                        break;
                }
@@ -716,19 +726,23 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
                printf("Dumping AD partition: %s\n", nc.dn);
                for (y=0; ;y++) {
                        int32_t _level = 0;
+                       union drsuapi_DsGetNCChangesCtr ctr;
+
                        ZERO_STRUCT(r.out);
-                       r.out.level = &_level;
 
-                       if (*r.in.level == 5) {
+                       r.out.level_out = &_level;
+                       r.out.ctr       = &ctr;
+
+                       if (r.in.level == 5) {
                                DEBUG(0,("start[%d] tmp_higest_usn: %llu , highest_usn: %llu\n",y,
-                                       (long long)r.in.req.req5.highwatermark.tmp_highest_usn,
-                                       (long long)r.in.req.req5.highwatermark.highest_usn));
+                                       (long long)r.in.req->req5.highwatermark.tmp_highest_usn,
+                                       (long long)r.in.req->req5.highwatermark.highest_usn));
                        }
 
-                       if (*r.in.level == 8) {
+                       if (r.in.level == 8) {
                                DEBUG(0,("start[%d] tmp_higest_usn: %llu , highest_usn: %llu\n",y,
-                                       (long long)r.in.req.req8.highwatermark.tmp_highest_usn,
-                                       (long long)r.in.req.req8.highwatermark.highest_usn));
+                                       (long long)r.in.req->req8.highwatermark.tmp_highest_usn,
+                                       (long long)r.in.req->req8.highwatermark.highest_usn));
                        }
 
                        status = dcerpc_drsuapi_DsGetNCChanges(ctx->new_dc.drsuapi.pipe, ctx, &r);
@@ -744,13 +758,13 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
                                ret = false;
                        }
 
-                       if (ret == true && *r.out.level == 1) {
+                       if (ret == true && *r.out.level_out == 1) {
                                out_level = 1;
-                               ctr1 = &r.out.ctr.ctr1;
-                       } else if (ret == true && *r.out.level == 2 &&
-                                  r.out.ctr.ctr2.mszip1.ts) {
+                               ctr1 = &r.out.ctr->ctr1;
+                       } else if (ret == true && *r.out.level_out == 2 &&
+                                  r.out.ctr->ctr2.mszip1.ts) {
                                out_level = 1;
-                               ctr1 = &r.out.ctr.ctr2.mszip1.ts->ctr1;
+                               ctr1 = &r.out.ctr->ctr2.mszip1.ts->ctr1;
                        }
 
                        if (out_level == 1) {
@@ -761,26 +775,26 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
                                test_analyse_objects(tctx, ctx, &gensec_skey, ctr1->first_object);
 
                                if (ctr1->more_data) {
-                                       r.in.req.req5.highwatermark = ctr1->new_highwatermark;
+                                       r.in.req->req5.highwatermark = ctr1->new_highwatermark;
                                        continue;
                                }
                        }
 
-                       if (ret == true && *r.out.level == 6) {
+                       if (ret == true && *r.out.level_out == 6) {
                                out_level = 6;
-                               ctr6 = &r.out.ctr.ctr6;
-                       } else if (ret == true && *r.out.level == 7
-                                  && r.out.ctr.ctr7.level == 6
-                                  && r.out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP
-                                  && r.out.ctr.ctr7.ctr.mszip6.ts) {
+                               ctr6 = &r.out.ctr->ctr6;
+                       } else if (ret == true && *r.out.level_out == 7
+                                  && r.out.ctr->ctr7.level == 6
+                                  && r.out.ctr->ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP
+                                  && r.out.ctr->ctr7.ctr.mszip6.ts) {
                                out_level = 6;
-                               ctr6 = &r.out.ctr.ctr7.ctr.mszip6.ts->ctr6;
-                       } else if (ret == true && *r.out.level == 7
-                                  && r.out.ctr.ctr7.level == 6
-                                  && r.out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS
-                                  && r.out.ctr.ctr7.ctr.xpress6.ts) {
+                               ctr6 = &r.out.ctr->ctr7.ctr.mszip6.ts->ctr6;
+                       } else if (ret == true && *r.out.level_out == 7
+                                  && r.out.ctr->ctr7.level == 6
+                                  && r.out.ctr->ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS
+                                  && r.out.ctr->ctr7.ctr.xpress6.ts) {
                                out_level = 6;
-                               ctr6 = &r.out.ctr.ctr7.ctr.xpress6.ts->ctr6;
+                               ctr6 = &r.out.ctr->ctr7.ctr.xpress6.ts->ctr6;
                        }
 
                        if (out_level == 6) {
@@ -791,7 +805,7 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
                                test_analyse_objects(tctx, ctx, &gensec_skey, ctr6->first_object);
 
                                if (ctr6->more_data) {
-                                       r.in.req.req8.highwatermark = ctr6->new_highwatermark;
+                                       r.in.req->req8.highwatermark = ctr6->new_highwatermark;
                                        continue;
                                }
                        }
@@ -809,6 +823,9 @@ static bool test_FetchNT4Data(struct torture_context *tctx,
        NTSTATUS status;
        bool ret = true;
        struct drsuapi_DsGetNT4ChangeLog r;
+       union drsuapi_DsGetNT4ChangeLogRequest req;
+       union drsuapi_DsGetNT4ChangeLogInfo info;
+       int32_t level_out = 0;
        struct GUID null_guid;
        struct dom_sid null_sid;
        DATA_BLOB cookie;
@@ -820,13 +837,17 @@ static bool test_FetchNT4Data(struct torture_context *tctx,
        ZERO_STRUCT(r);
        r.in.bind_handle        = &ctx->new_dc.drsuapi.bind_handle;
        r.in.level              = 1;
+       r.out.info              = &info;
+       r.out.level_out         = &level_out;
 
-       r.in.req.req1.unknown1  = lp_parm_int(tctx->lp_ctx, NULL, "dssync", "nt4-1", 3);
-       r.in.req.req1.unknown2  = lp_parm_int(tctx->lp_ctx, NULL, "dssync", "nt4-2", 0x00004000);
+       req.req1.unknown1       = lp_parm_int(tctx->lp_ctx, NULL, "dssync", "nt4-1", 3);
+       req.req1.unknown2       = lp_parm_int(tctx->lp_ctx, NULL, "dssync", "nt4-2", 0x00004000);
 
        while (1) {
-               r.in.req.req1.length    = cookie.length;
-               r.in.req.req1.data      = cookie.data;
+               req.req1.length = cookie.length;
+               req.req1.data   = cookie.data;
+
+               r.in.req = &req;
 
                status = dcerpc_drsuapi_DsGetNT4ChangeLog(ctx->new_dc.drsuapi.pipe, ctx, &r);
                if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_IMPLEMENTED)) {
@@ -845,16 +866,16 @@ static bool test_FetchNT4Data(struct torture_context *tctx,
                } else if (!W_ERROR_IS_OK(r.out.result)) {
                        printf("DsGetNT4ChangeLog failed - %s\n", win_errstr(r.out.result));
                        ret = false;
-               } else if (r.out.level != 1) {
-                       printf("DsGetNT4ChangeLog unknown level - %u\n", r.out.level);
+               } else if (*r.out.level_out != 1) {
+                       printf("DsGetNT4ChangeLog unknown level - %u\n", *r.out.level_out);
                        ret = false;
-               } else if (NT_STATUS_IS_OK(r.out.info.info1.status)) {
-               } else if (NT_STATUS_EQUAL(r.out.info.info1.status, STATUS_MORE_ENTRIES)) {
-                       cookie.length   = r.out.info.info1.length1;
-                       cookie.data     = r.out.info.info1.data1;
+               } else if (NT_STATUS_IS_OK(r.out.info->info1.status)) {
+               } else if (NT_STATUS_EQUAL(r.out.info->info1.status, STATUS_MORE_ENTRIES)) {
+                       cookie.length   = r.out.info->info1.length1;
+                       cookie.data     = r.out.info->info1.data1;
                        continue;
                } else {
-                       printf("DsGetNT4ChangeLog failed - %s\n", nt_errstr(r.out.info.info1.status));
+                       printf("DsGetNT4ChangeLog failed - %s\n", nt_errstr(r.out.info->info1.status));
                        ret = false;
                }
 
index feeeb9330b501e10e1b6bab8e83a0956b966d198..d5665ad07da443e5e2df9b33a12176dd94dd08de 100644 (file)
@@ -40,13 +40,16 @@ static bool get_policy_handle(struct torture_context *tctx,
 {
        struct eventlog_OpenEventLogW r;
        struct eventlog_OpenUnknown0 unknown0;
+       struct lsa_String logname, servername;
 
        unknown0.unknown0 = 0x005c;
        unknown0.unknown1 = 0x0001;
 
        r.in.unknown0 = &unknown0;
-       init_lsa_String(&r.in.logname, "dns server");
-       init_lsa_String(&r.in.servername, NULL);
+       init_lsa_String(r.in.logname, "dns server");
+       init_lsa_String(r.in.servername, NULL);
+       r.in.logname = &logname;
+       r.in.servername = &servername;
        r.in.unknown2 = 0x00000001;
        r.in.unknown3 = 0x00000001;
        r.out.handle = handle;
@@ -205,7 +208,7 @@ static bool test_ClearEventLog(struct torture_context *tctx,
                return false;
 
        r.in.handle = &handle;
-       r.in.unknown = NULL;
+       r.in.backupfile = NULL;
 
        torture_assert_ntstatus_ok(tctx, 
                        dcerpc_eventlog_ClearEventLogW(p, tctx, &r), 
index 92fec5be0c32ca8bd42467897e0e9751cba5bb83..149fae6c265d9322438055b319ee7c169495ec22 100644 (file)
@@ -61,7 +61,7 @@ static bool test_Init(struct torture_context *tctx,
        init_lsa_StringLarge(r.in.message, "spottyfood");
        r.in.force_apps = 1;
        r.in.timeout = 30;
-       r.in.reboot = 1;
+       r.in.do_reboot = 1;
 
        status = dcerpc_initshutdown_Init(p, tctx, &r);
 
@@ -83,7 +83,7 @@ static bool test_InitEx(struct torture_context *tctx,
        init_lsa_StringLarge(r.in.message, "spottyfood");
        r.in.force_apps = 1;
        r.in.timeout = 30;
-       r.in.reboot = 1;
+       r.in.do_reboot = 1;
        r.in.reason = 0;
 
        status = dcerpc_initshutdown_InitEx(p, tctx, &r);
index 3d4c594d05aa910985a4904e56c613d2d551945b..f4ae5b35ebcc72c2471b7f5b61683d51c314719f 100644 (file)
@@ -29,6 +29,7 @@
 #include "lib/cmdline/popt_common.h"
 #include "torture/rpc/rpc.h"
 #include "torture/rpc/netlogon.h"
+#include "../lib/crypto/crypto.h"
 #include "libcli/auth/libcli_auth.h"
 #include "librpc/gen_ndr/ndr_netlogon_c.h"
 #include "librpc/gen_ndr/ndr_lsa_c.h"
@@ -77,11 +78,10 @@ static bool test_SetupCredentials(struct dcerpc_pipe *p, struct torture_context
        struct netr_ServerAuthenticate a;
        struct netr_Credential credentials1, credentials2, credentials3;
        struct creds_CredentialState *creds;
-       struct samr_Password mach_password;
-        const char *plain_pass;
-       const char *machine_name;
+       const struct samr_Password *mach_password;
+       const char *machine_name;
 
-       plain_pass = cli_credentials_get_password(credentials);
+       mach_password = cli_credentials_get_nt_hash(credentials, tctx);
        machine_name = cli_credentials_get_workstation(credentials);
 
        torture_comment(tctx, "Testing ServerReqChallenge\n");
@@ -99,8 +99,6 @@ static bool test_SetupCredentials(struct dcerpc_pipe *p, struct torture_context
        status = dcerpc_netr_ServerReqChallenge(p, tctx, &r);
        torture_assert_ntstatus_ok(tctx, status, "ServerReqChallenge");
 
-       E_md4hash(plain_pass, mach_password.hash);
-
        a.in.server_name = NULL;
        a.in.account_name = talloc_asprintf(tctx, "%s$", machine_name);
        a.in.secure_channel_type = SEC_CHAN_BDC;
@@ -109,7 +107,7 @@ static bool test_SetupCredentials(struct dcerpc_pipe *p, struct torture_context
        a.out.credentials = &credentials3;
 
        creds_client_init(creds, &credentials1, &credentials2, 
-                         &mach_password, &credentials3, 
+                         mach_password, &credentials3, 
                          0);
 
        torture_comment(tctx, "Testing ServerAuthenticate\n");
@@ -142,12 +140,12 @@ bool test_SetupCredentials2(struct dcerpc_pipe *p, struct torture_context *tctx,
        struct netr_ServerAuthenticate2 a;
        struct netr_Credential credentials1, credentials2, credentials3;
        struct creds_CredentialState *creds;
-       struct samr_Password mach_password;
+       const struct samr_Password *mach_password;
        const char *machine_name;
        const char *plain_pass;
 
+       mach_password = cli_credentials_get_nt_hash(machine_credentials, tctx);
        machine_name = cli_credentials_get_workstation(machine_credentials);
-       plain_pass = cli_credentials_get_password(machine_credentials);
 
        torture_comment(tctx, "Testing ServerReqChallenge\n");
 
@@ -164,8 +162,6 @@ bool test_SetupCredentials2(struct dcerpc_pipe *p, struct torture_context *tctx,
        status = dcerpc_netr_ServerReqChallenge(p, tctx, &r);
        torture_assert_ntstatus_ok(tctx, status, "ServerReqChallenge");
 
-       E_md4hash(plain_pass, mach_password.hash);
-
        a.in.server_name = NULL;
        a.in.account_name = talloc_asprintf(tctx, "%s$", machine_name);
        a.in.secure_channel_type = sec_chan_type;
@@ -176,7 +172,7 @@ bool test_SetupCredentials2(struct dcerpc_pipe *p, struct torture_context *tctx,
        a.out.credentials = &credentials3;
 
        creds_client_init(creds, &credentials1, &credentials2, 
-                         &mach_password, &credentials3, 
+                         mach_password, &credentials3, 
                          negotiate_flags);
 
        torture_comment(tctx, "Testing ServerAuthenticate2\n");
@@ -325,6 +321,24 @@ static bool test_SetPassword(struct torture_context *tctx,
        return true;
 }
 
+/*
+  generate a random password for password change tests
+*/
+static DATA_BLOB netlogon_very_rand_pass(TALLOC_CTX *mem_ctx, int len)
+{
+       int i;
+       DATA_BLOB password = data_blob_talloc(mem_ctx, NULL, len * 2 /* number of unicode chars */);
+       generate_random_buffer(password.data, password.length);
+
+       for (i=0; i < len; i++) {
+               if (((uint16_t *)password.data)[i] == 0) {
+                       ((uint16_t *)password.data)[i] = 1;
+               }
+       }
+
+       return password;
+}
+
 /*
   try a change password for our machine account
 */
@@ -335,8 +349,10 @@ static bool test_SetPassword2(struct torture_context *tctx,
        NTSTATUS status;
        struct netr_ServerPasswordSet2 r;
        const char *password;
+       DATA_BLOB new_random_pass;
        struct creds_CredentialState *creds;
        struct samr_CryptPassword password_buf;
+       struct samr_Password nt_hash;
 
        if (!test_SetupCredentials(p, tctx, machine_credentials, &creds)) {
                return false;
@@ -444,6 +460,37 @@ static bool test_SetPassword2(struct torture_context *tctx,
 
        cli_credentials_set_password(machine_credentials, password, CRED_SPECIFIED);
 
+       torture_assert (tctx, 
+               test_SetupCredentials(p, tctx, machine_credentials, &creds), 
+               "ServerPasswordSet failed to actually change the password");
+
+       new_random_pass = netlogon_very_rand_pass(tctx, 128);
+
+       /* now try a random stream of bytes for a password */
+       set_pw_in_buffer(password_buf.data, &new_random_pass);
+
+       creds_arcfour_crypt(creds, password_buf.data, 516);
+
+       memcpy(r.in.new_password.data, password_buf.data, 512);
+       r.in.new_password.length = IVAL(password_buf.data, 512);
+
+       torture_comment(tctx, 
+               "Testing a third ServerPasswordSet2 on machine account, with a compleatly random password\n");
+
+       creds_client_authenticator(creds, &r.in.credential);
+
+       status = dcerpc_netr_ServerPasswordSet2(p, tctx, &r);
+       torture_assert_ntstatus_ok(tctx, status, "ServerPasswordSet (3)");
+
+       if (!creds_client_check(creds, &r.out.return_authenticator.cred)) {
+               torture_comment(tctx, "Credential chaining failed\n");
+       }
+
+       mdfour(nt_hash.hash, new_random_pass.data, new_random_pass.length);
+
+       cli_credentials_set_password(machine_credentials, NULL, CRED_UNINITIALISED);
+       cli_credentials_set_nt_hash(machine_credentials, &nt_hash, CRED_SPECIFIED);
+
        torture_assert (tctx, 
                test_SetupCredentials(p, tctx, machine_credentials, &creds), 
                "ServerPasswordSet failed to actually change the password");
index c35f93e3f90571a0ee1d661b0468cc62f93ecb78..3e5d2d4323e81b55161e0bc2fe018a55a17eee31 100644 (file)
@@ -25,7 +25,7 @@
 #include "torture/rpc/rpc.h"
 #include "torture/smbtorture.h"
 #include "librpc/ndr/ndr_table.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 
 static bool torture_rpc_teardown (struct torture_context *tcase, 
                                          void *data)
index d0aee057d38d60240618bbb3fc1ec045ce7f442e..1f19b8ec3fb2660aa0c3c93fd3dd72ddcbfe2fb7 100644 (file)
@@ -497,6 +497,24 @@ static char *samr_rand_pass(TALLOC_CTX *mem_ctx, int min_len)
        return s;
 }
 
+/*
+  generate a random password for password change tests
+*/
+static DATA_BLOB samr_very_rand_pass(TALLOC_CTX *mem_ctx, int len)
+{
+       int i;
+       DATA_BLOB password = data_blob_talloc(mem_ctx, NULL, len * 2 /* number of unicode chars */);
+       generate_random_buffer(password.data, password.length);
+
+       for (i=0; i < len; i++) {
+               if (((uint16_t *)password.data)[i] == 0) {
+                       ((uint16_t *)password.data)[i] = 1;
+               }
+       }
+
+       return password;
+}
+
 /*
   generate a random password for password change tests (fixed length)
 */
@@ -1841,6 +1859,156 @@ bool test_ChangePasswordUser3(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
        return ret;
 }
 
+bool test_ChangePasswordRandomBytes(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
+                                   const char *account_string,
+                                   struct policy_handle *handle, 
+                                   char **password)
+{
+       NTSTATUS status;
+       struct samr_ChangePasswordUser3 r;
+       struct samr_SetUserInfo s;
+       union samr_UserInfo u;
+       DATA_BLOB session_key;
+       DATA_BLOB confounded_session_key = data_blob_talloc(mem_ctx, NULL, 16);
+       uint8_t confounder[16];
+       struct MD5Context ctx;
+
+       bool ret = true;
+       struct lsa_String server, account;
+       struct samr_CryptPassword nt_pass;
+       struct samr_Password nt_verifier;
+       DATA_BLOB new_random_pass;
+       char *newpass;
+       char *oldpass;
+       uint8_t old_nt_hash[16], new_nt_hash[16];
+       NTTIME t;
+
+       new_random_pass = samr_very_rand_pass(mem_ctx, 128);
+
+       if (!*password) {
+               printf("Failing ChangePasswordUser3 as old password was NULL.  Previous test failed?\n");
+               return false;
+       }
+
+       oldpass = *password;
+       server.string = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p));
+       init_lsa_String(&account, account_string);
+
+       s.in.user_handle = handle;
+       s.in.info = &u;
+       s.in.level = 25;
+
+       ZERO_STRUCT(u);
+
+       u.info25.info.fields_present = SAMR_FIELD_PASSWORD;
+
+       set_pw_in_buffer(u.info25.password.data, &new_random_pass);
+
+       status = dcerpc_fetch_session_key(p, &session_key);
+       if (!NT_STATUS_IS_OK(status)) {
+               printf("SetUserInfo level %u - no session key - %s\n",
+                      s.in.level, nt_errstr(status));
+               return false;
+       }
+
+       generate_random_buffer((uint8_t *)confounder, 16);
+
+       MD5Init(&ctx);
+       MD5Update(&ctx, confounder, 16);
+       MD5Update(&ctx, session_key.data, session_key.length);
+       MD5Final(confounded_session_key.data, &ctx);
+
+       arcfour_crypt_blob(u.info25.password.data, 516, &confounded_session_key);
+       memcpy(&u.info25.password.data[516], confounder, 16);
+
+       printf("Testing SetUserInfo level 25 (set password ex) with a password made up of only random bytes\n");
+
+       status = dcerpc_samr_SetUserInfo(p, mem_ctx, &s);
+       if (!NT_STATUS_IS_OK(status)) {
+               printf("SetUserInfo level %u failed - %s\n",
+                      s.in.level, nt_errstr(status));
+               ret = false;
+       }
+
+       printf("Testing ChangePasswordUser3 with a password made up of only random bytes\n");
+
+       mdfour(old_nt_hash, new_random_pass.data, new_random_pass.length);
+
+       new_random_pass = samr_very_rand_pass(mem_ctx, 128);
+
+       mdfour(new_nt_hash, new_random_pass.data, new_random_pass.length);
+
+       set_pw_in_buffer(nt_pass.data, &new_random_pass);
+       arcfour_crypt(nt_pass.data, old_nt_hash, 516);
+       E_old_pw_hash(new_nt_hash, old_nt_hash, nt_verifier.hash);
+
+       r.in.server = &server;
+       r.in.account = &account;
+       r.in.nt_password = &nt_pass;
+       r.in.nt_verifier = &nt_verifier;
+       r.in.lm_change = 0;
+       r.in.lm_password = NULL;
+       r.in.lm_verifier = NULL;
+       r.in.password3 = NULL;
+
+       unix_to_nt_time(&t, time(NULL));
+
+       status = dcerpc_samr_ChangePasswordUser3(p, mem_ctx, &r);
+
+       if (NT_STATUS_EQUAL(status, NT_STATUS_PASSWORD_RESTRICTION)) {
+               if (r.out.reject && r.out.reject->reason != SAMR_REJECT_OTHER) {
+                       printf("expected SAMR_REJECT_OTHER (%d), got %d\n", 
+                              SAMR_REJECT_OTHER, r.out.reject->reason);
+                       return false;
+               }
+               /* Perhaps the server has a 'min password age' set? */
+
+       } else if (!NT_STATUS_IS_OK(status)) {
+               printf("ChangePasswordUser3 failed - %s\n", nt_errstr(status));
+               ret = false;
+       }
+       
+       newpass = samr_rand_pass(mem_ctx, 128);
+
+       mdfour(old_nt_hash, new_random_pass.data, new_random_pass.length);
+
+       E_md4hash(newpass, new_nt_hash);
+
+       encode_pw_buffer(nt_pass.data, newpass, STR_UNICODE);
+       arcfour_crypt(nt_pass.data, old_nt_hash, 516);
+       E_old_pw_hash(new_nt_hash, old_nt_hash, nt_verifier.hash);
+
+       r.in.server = &server;
+       r.in.account = &account;
+       r.in.nt_password = &nt_pass;
+       r.in.nt_verifier = &nt_verifier;
+       r.in.lm_change = 0;
+       r.in.lm_password = NULL;
+       r.in.lm_verifier = NULL;
+       r.in.password3 = NULL;
+
+       unix_to_nt_time(&t, time(NULL));
+
+       status = dcerpc_samr_ChangePasswordUser3(p, mem_ctx, &r);
+
+       if (NT_STATUS_EQUAL(status, NT_STATUS_PASSWORD_RESTRICTION)) {
+               if (r.out.reject && r.out.reject->reason != SAMR_REJECT_OTHER) {
+                       printf("expected SAMR_REJECT_OTHER (%d), got %d\n", 
+                              SAMR_REJECT_OTHER, r.out.reject->reason);
+                       return false;
+               }
+               /* Perhaps the server has a 'min password age' set? */
+
+       } else if (!NT_STATUS_IS_OK(status)) {
+               printf("ChangePasswordUser3 (on second random password) failed - %s\n", nt_errstr(status));
+               ret = false;
+       } else {
+               *password = talloc_strdup(mem_ctx, newpass);
+       }
+
+       return ret;
+}
+
 
 static bool test_GetMembersInAlias(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
                                  struct policy_handle *alias_handle)
@@ -2061,7 +2229,11 @@ static bool test_user_ops(struct dcerpc_pipe *p,
                        if (!test_ChangePasswordUser2(p, tctx, base_acct_name, &password, samr_rand_pass(tctx, 4), false)) {
                                ret = false;
                        }
-                       
+
+                       /* Try a compleatly random password */
+                       if (!test_ChangePasswordRandomBytes(p, tctx, base_acct_name, user_handle, &password)) {
+                               ret = false;
+                       }
                }
                
                for (i = 0; password_fields[i]; i++) {
@@ -2554,7 +2726,7 @@ static bool test_CreateUser(struct dcerpc_pipe *p, struct torture_context *tctx,
        status = dcerpc_samr_CreateUser(p, user_ctx, &r);
 
        if (dom_sid_equal(domain_sid, dom_sid_parse_talloc(tctx, SID_BUILTIN))) {
-               if (NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) {
+               if (NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED) || NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER)) {
                        printf("Server correctly refused create of '%s'\n", r.in.account_name->string);
                        return true;
                } else {
@@ -2678,7 +2850,7 @@ static bool test_CreateUser2(struct dcerpc_pipe *p, struct torture_context *tctx
                status = dcerpc_samr_CreateUser2(p, user_ctx, &r);
                
                if (dom_sid_equal(domain_sid, dom_sid_parse_talloc(tctx, SID_BUILTIN))) {
-                       if (NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) {
+                       if (NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED) || NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER)) {
                                printf("Server correctly refused create of '%s'\n", r.in.account_name->string);
                                continue;
                        } else {
@@ -4525,7 +4697,7 @@ static bool test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
        printf("testing samr_Connect4\n");
 
        r4.in.system_name = "";
-       r4.in.unknown = 0;
+       r4.in.client_version = 0;
        r4.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
        r4.out.connect_handle = &h;
 
@@ -4543,7 +4715,7 @@ static bool test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
 
        printf("testing samr_Connect5\n");
 
-       info.info1.unknown1 = 0;
+       info.info1.client_version = 0;
        info.info1.unknown2 = 0;
 
        r5.in.system_name = "";
index f496f6300c504c4184552f267c9c7f6fa923464b..bfff8c9267f72402efb6d3b114d6d072e9816d96 100644 (file)
@@ -53,7 +53,7 @@ static NTSTATUS torture_samr_Connect5(struct torture_context *tctx,
        struct samr_Connect5 r5;
        union samr_ConnectInfo info;
 
-       info.info1.unknown1 = 0;
+       info.info1.client_version = 0;
        info.info1.unknown2 = 0;
        r5.in.system_name = "";
        r5.in.level = 1;
index 6a02af5bb5b31a94cf19d6cfbcd19f0ca85d9062..2d2aaa80d6e3633e5f2f5a42625ff67f360af841 100644 (file)
@@ -24,7 +24,7 @@
 #include "includes.h"
 #include "torture/torture.h"
 #include "auth/auth.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "../lib/crypto/crypto.h"
 #include "system/time.h"
 #include "torture/rpc/rpc.h"
index ab6309d55f8015eb5b7ed645d2603b575befd687..dc2a82414bec99892937be52b90dd7eb6ad892c2 100644 (file)
@@ -29,7 +29,7 @@
 #include "smb_server/smb_server.h"
 #include "librpc/rpc/dcerpc_proto.h"
 #include "lib/socket/netif.h"
-#include "util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "ntvfs/ntvfs.h"
 #include "param/param.h"
 
index 898813f807563247ee6b51cfd78f6abf55136e37..bd897f0ada4f8c46e1638eae644a5c35d930aed9 100644 (file)
@@ -1539,10 +1539,11 @@ static bool test_QueryValue(struct dcerpc_pipe *p,
        ZERO_STRUCT(r);
        r.in.handle = handle;
        r.in.data = NULL;
-       r.in.value_name.name = valuename;
+       r.in.value_name = talloc_zero(tctx, struct winreg_String);
+       r.in.value_name->name = valuename;
        r.in.type = &zero_type;
-       r.in.size = &offered;
-       r.in.length = &zero;
+       r.in.data_size = &offered;
+       r.in.data_length = &zero;
 
        status = dcerpc_winreg_QueryValue(p, tctx, &r);
        if (NT_STATUS_IS_ERR(status)) {
@@ -1630,7 +1631,7 @@ static bool test_InitiateSystemShutdown(struct torture_context *tctx,
        init_lsa_StringLarge(r.in.message, "spottyfood");
        r.in.force_apps = 1;
        r.in.timeout = 30;
-       r.in.reboot = 1;
+       r.in.do_reboot = 1;
 
        torture_assert_ntstatus_ok(tctx,
                                   dcerpc_winreg_InitiateSystemShutdown(p, tctx, &r),
@@ -1655,7 +1656,7 @@ static bool test_InitiateSystemShutdownEx(struct torture_context *tctx,
        init_lsa_StringLarge(r.in.message, "spottyfood");
        r.in.force_apps = 1;
        r.in.timeout = 30;
-       r.in.reboot = 1;
+       r.in.do_reboot = 1;
        r.in.reason = 0;
 
        torture_assert_ntstatus_ok(tctx,
index 6e9937086e6417ee104d4ca72fc604ba63c3860e..015f20f6e2cdbc815c4d2fc7df1cdee8cf508e16 100644 (file)
@@ -1218,12 +1218,12 @@ static bool test_NetrJoinDomain2(struct torture_context *tctx,
        }
 
        switch (join_status) {
-               case NetSetupDomainName:
+               case NET_SETUP_DOMAIN_NAME:
                        expected_err = WERR_SETUP_ALREADY_JOINED;
                        break;
-               case NetSetupUnknownStatus:
-               case NetSetupUnjoined:
-               case NetSetupWorkgroupName:
+               case NET_SETUP_UNKNOWN_STATUS:
+               case NET_SETUP_UNJOINED:
+               case NET_SETUP_WORKGROUP_NAME:
                default:
                        expected_err = WERR_OK;
                        break;
@@ -1271,7 +1271,7 @@ static bool test_NetrJoinDomain2(struct torture_context *tctx,
                return false;
        }
 
-       if (join_status != NetSetupDomainName) {
+       if (join_status != NET_SETUP_DOMAIN_NAME) {
                torture_comment(tctx,
                                "Join verify failed: got %d\n", join_status);
                return false;
@@ -1302,12 +1302,12 @@ static bool test_NetrUnjoinDomain2(struct torture_context *tctx,
        }
 
        switch (join_status) {
-               case NetSetupUnjoined:
+               case NET_SETUP_UNJOINED:
                        expected_err = WERR_SETUP_NOT_JOINED;
                        break;
-               case NetSetupDomainName:
-               case NetSetupUnknownStatus:
-               case NetSetupWorkgroupName:
+               case NET_SETUP_DOMAIN_NAME:
+               case NET_SETUP_UNKNOWN_STATUS:
+               case NET_SETUP_WORKGROUP_NAME:
                default:
                        expected_err = WERR_OK;
                        break;
@@ -1350,11 +1350,11 @@ static bool test_NetrUnjoinDomain2(struct torture_context *tctx,
        }
 
        switch (join_status) {
-               case NetSetupUnjoined:
-               case NetSetupWorkgroupName:
+               case NET_SETUP_UNJOINED:
+               case NET_SETUP_WORKGROUP_NAME:
                        break;
-               case NetSetupUnknown:
-               case NetSetupDomainName:
+               case NET_SETUP_UNKNOWN_STATUS:
+               case NET_SETUP_DOMAIN_NAME:
                default:
                        torture_comment(tctx,
                                "Unjoin verify failed: got %d\n", join_status);
index 120a71cc952deb0778a965cb5ce8da232b5e1b41..9418650de452c05854798db90cf464a2e03fa44b 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "torture/smbtorture.h"
 #include "torture/smb2/proto.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 
 static bool wrap_simple_1smb2_test(struct torture_context *torture_ctx,
                                   struct torture_tcase *tcase,
index 1329f03b04b19f78f598ef4777ae9ee66bbca1ea..302fefcc88510f83683244dfa62515958f8362b9 100644 (file)
@@ -31,7 +31,7 @@
 #include "dynconfig/dynconfig.h"
 
 #include "torture/smbtorture.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "librpc/rpc/dcerpc.h"
 #include "param/param.h"
 
index 54fe0ead2700da6fae9fdfbe3272c38cb40b3e4c..6c49cf01cd6064acdf64e1d68739b27a9d657aae 100644 (file)
@@ -21,7 +21,7 @@
 #include "includes.h"
 #include "system/time.h"
 #include "torture/torture.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "param/param.h"
 #include "lib/cmdline/popt_common.h"
 
index 32e4453acad9ce81f3c9688587df8dad92299efd..3d9c5e321d538fd63e8b87d8ce2b8b51a876af37 100644 (file)
@@ -29,7 +29,7 @@
 #include "system/wait.h"
 #include "system/time.h"
 #include "torture/torture.h"
-#include "util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "auth/credentials/credentials.h"
 #include "libcli/resolve/resolve.h"
 #include "param/param.h"
@@ -514,7 +514,7 @@ _PUBLIC_ bool torture_get_conn_index(int conn_index,
                return true;
        }
 
-       unc_list = file_lines_load(p, &num_unc_names, NULL);
+       unc_list = file_lines_load(p, &num_unc_names, 0, NULL);
        if (!unc_list || num_unc_names <= 0) {
                DEBUG(0,("Failed to load unc names list from '%s'\n", p));
                return false;
index 132d689dcbab51faf9e2244b3a9d52b9ca612784..f26c87bd85270cb64aef816eeb1dff20b310e511 100644 (file)
@@ -22,7 +22,7 @@
 #include "includes.h"
 #include "system/filesys.h"
 #include "librpc/gen_ndr/ndr_xattr.h"
-#include "lib/util/wrap_xattr.h"
+#include "../lib/util/wrap_xattr.h"
 #include "param/param.h"
 
 static void ntacl_print_debug_helper(struct ndr_print *ndr, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
index 6a6302837e400a770647f8d7776221f985a100e1..1ec87c6b428760c1dacd312c01dc71e9add9d791 100644 (file)
@@ -869,7 +869,7 @@ static void manage_ntlm_server_1_request(enum stdio_helper_mode stdio_helper_mod
        }
 
        if (strequal(request, "LANMAN-Challenge")) {
-               challenge = strhex_to_data_blob(parameter);
+               challenge = strhex_to_data_blob(NULL, parameter);
                if (challenge.length != 8) {
                        mux_printf(mux_id, "Error: hex decode of %s failed! (got %d bytes, expected 8)\n.\n", 
                                  parameter,
@@ -877,7 +877,7 @@ static void manage_ntlm_server_1_request(enum stdio_helper_mode stdio_helper_mod
                        challenge = data_blob(NULL, 0);
                }
        } else if (strequal(request, "NT-Response")) {
-               nt_response = strhex_to_data_blob(parameter);
+               nt_response = strhex_to_data_blob(NULL, parameter);
                if (nt_response.length < 24) {
                        mux_printf(mux_id, "Error: hex decode of %s failed! (only got %d bytes, needed at least 24)\n.\n", 
                                  parameter,
@@ -885,7 +885,7 @@ static void manage_ntlm_server_1_request(enum stdio_helper_mode stdio_helper_mod
                        nt_response = data_blob(NULL, 0);
                }
        } else if (strequal(request, "LANMAN-Response")) {
-               lm_response = strhex_to_data_blob(parameter);
+               lm_response = strhex_to_data_blob(NULL, parameter);
                if (lm_response.length != 24) {
                        mux_printf(mux_id, "Error: hex decode of %s failed! (got %d bytes, expected 24)\n.\n", 
                                  parameter,
index d74199277091f09027d5a696020de43d38bd40f3..74eea9e60b412b5b967139f66a8f1ec8f10d5e85 100644 (file)
@@ -30,7 +30,7 @@
 #include "system/network.h"
 #include "lib/socket/netif.h"
 #include "lib/tls/tls.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "param/param.h"
 
 /* don't allow connections to hang around forever */
index 66697868e0270c4a169c67517681dab6976c9750..dcbb3c7fb6638d66f8a3364cb458e0f67f3e0942 100644 (file)
@@ -22,8 +22,8 @@
 
 #include "includes.h"
 #include "web_server/web_server.h"
-#include "lib/util/dlinklist.h"
-#include "lib/util/data_blob.h"
+#include "../lib/util/dlinklist.h"
+#include "../lib/util/data_blob.h"
 #include "lib/tls/tls.h"
 #include <Python.h>
 
index c2ba55ff18c39914f25828fce31bc5513da9bc03..03b59f56e9b40f0e9cd456cb4542da517c9e5ba8 100644 (file)
@@ -113,7 +113,7 @@ NTSTATUS wbsrv_samba3_netbios_name(struct wbsrv_samba3_call *s3call)
 
 NTSTATUS wbsrv_samba3_priv_pipe_dir(struct wbsrv_samba3_call *s3call)
 {
-       char *path = s3call->wbconn->listen_socket->service->priv_socket_path;
+       const char *path = s3call->wbconn->listen_socket->service->priv_socket_path;
        s3call->response.result          = WINBINDD_OK;
        s3call->response.extra_data.data = path;
                
index 638fac00a16a6b698374b58b8ed1863f45f2c4ad..b8309597d7b89c38f474aa0a90a7fd8e6679bf24 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "includes.h"
 #include "lib/socket/socket.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "lib/events/events.h"
 #include "smbd/service_task.h"
 #include "smbd/process_model.h"
index fcf02cedcdef7954a946c41b24d5fa7eda6e9ae8..cb9fa3ada28d189158718a027c952ec6c7eda084 100644 (file)
@@ -25,7 +25,7 @@
 #include "smbd/service_task.h"
 #include "winbind/wb_async_helpers.h"
 #include "libcli/security/security.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "param/param.h"
 
 static struct wbsrv_domain *find_domain_from_sid(struct wbsrv_service *service,
index 48a68e44329872648aaf1834b4daff57b08ed6a7..d0b02d0abe3616bfab4285adfaa6fd809464c386 100644 (file)
@@ -20,7 +20,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "smbd/service_task.h"
 #include "smbd/service.h"
 #include "lib/messaging/irpc.h"
diff --git a/testprogs/win32/midltests/Makefile b/testprogs/win32/midltests/Makefile
new file mode 100644 (file)
index 0000000..535968b
--- /dev/null
@@ -0,0 +1,27 @@
+INCLUDES=-I
+CFLAGS=$(INCLUDES) -Zi -D_WIN32_WINNT=0x502
+LIBS=rpcrt4.lib
+
+all: midltests.exe
+
+clean:
+       del *~ *.obj *.exe midltests.h midltests_s.c midltests_c.c
+
+#MIDL_ARGS=/target NT50
+MIDL_ARGS=/Os /prefix client cli_ /prefix server srv_ /prefix switch swi_
+midltests.h midltests_s.c midltests_c.c: midltests.idl midltests.acf
+       midl $(MIDL_ARGS) /acf midltests.acf midltests.idl
+
+MIDLTESTS_OBJ = midltests.obj midltests_s_m.obj midltests_c_m.obj midltests_marshall.obj utils.obj
+midltests.exe: $(MIDLTESTS_OBJ)
+       $(CC) -o midltests.exe $(MIDLTESTS_OBJ) $(LIBS)
+
+midltests.obj: midltests.h midltests.idl
+midltests_c_m.c: midltests_c.c
+midltests_s_m.c: midltests_s.c
+
+midltests.obj: midltests.h midltests.idl midltests.c
+midltests_s_m.obj: midltests_marshall.h midltests_s.c midltests_s_m.c
+midltests_c_m.obj: midltests_marshall.h midltests_c.c midltests_c_m.c
+midltests_marshall.obj: midltests.h midltests_marshall.c
+utils.obj: midltests.h utils.c