Fix the build on Win32, and use NEGOTIATE security (to allow kerberos)
[kai/samba.git] / testprogs / win32 / rpcecho / server.c
index 17b13f0013d743fa6ebd3f1485373a0b9ba04719..b092852c15b7b44781520b337738c9f0418e380a 100644 (file)
@@ -5,7 +5,7 @@
    
    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
    
    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 of the License, or
+   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,
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -14,8 +14,7 @@
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
    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, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #define _WIN32_WINNT 0x0500
 */
 
 #define _WIN32_WINNT 0x0500
@@ -142,9 +141,11 @@ void echo_TestSurrounding(echo_Surrounding *data)
 short echo_TestDoublePointer(short ***data)
 {
        if (!*data) {
 short echo_TestDoublePointer(short ***data)
 {
        if (!*data) {
+               printf("WARNING: *data == NULL\n");
                return 0;
        }
        if (!**data) {
                return 0;
        }
        if (!**data) {
+               printf("WARNING: **data == NULL\n");
                return 0;
        }
        printf("Incoming double pointer: %d\n", ***data);
                return 0;
        }
        printf("Incoming double pointer: %d\n", ***data);
@@ -192,7 +193,7 @@ void main(int argc, char **argv)
                exit(status);
        }
 
                exit(status);
        }
 
-       status = RpcServerRegisterAuthInfo(NULL, RPC_C_AUTHN_WINNT, NULL, NULL);
+       status = RpcServerRegisterAuthInfo(NULL, RPC_C_AUTHN_GSS_NEGOTIATE, NULL, NULL);
        if (status) {
                printf("Failed to setup auth info\n");
        }
        if (status) {
                printf("Failed to setup auth info\n");
        }