Deleted Added
full compact
nt_gss_server.c (72445) nt_gss_server.c (178825)
1/*
2 * Copyright (c) 1997 - 2000 Kungliga Tekniska H�gskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 22 unchanged lines hidden (view full) ---

31 * SUCH DAMAGE.
32 */
33
34#include "test_locl.h"
35#include <gssapi.h>
36#include <krb5.h>
37#include "nt_gss_common.h"
38
1/*
2 * Copyright (c) 1997 - 2000 Kungliga Tekniska H�gskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 22 unchanged lines hidden (view full) ---

31 * SUCH DAMAGE.
32 */
33
34#include "test_locl.h"
35#include <gssapi.h>
36#include <krb5.h>
37#include "nt_gss_common.h"
38
39RCSID("$Id: nt_gss_server.c,v 1.5 2000/08/09 20:53:07 assar Exp $");
39RCSID("$Id: nt_gss_server.c 12323 2003-05-21 15:15:34Z lha $");
40
41/*
42 * This program tries to act as a server for the sample in `Sample
43 * SSPI Code' in Windows 2000 RC1 SDK.
44 *
45 * use --dump-auth to get a binary dump of the authorization data in the ticket
46 */
47

--- 63 unchanged lines hidden (view full) ---

111 &context_hdl,
112 GSS_C_NO_BUFFER);
113 break;
114 }
115 } while(maj_stat & GSS_S_CONTINUE_NEEDED);
116
117 if (auth_file != NULL) {
118 int fd = open (auth_file, O_WRONLY | O_CREAT, 0666);
40
41/*
42 * This program tries to act as a server for the sample in `Sample
43 * SSPI Code' in Windows 2000 RC1 SDK.
44 *
45 * use --dump-auth to get a binary dump of the authorization data in the ticket
46 */
47

--- 63 unchanged lines hidden (view full) ---

111 &context_hdl,
112 GSS_C_NO_BUFFER);
113 break;
114 }
115 } while(maj_stat & GSS_S_CONTINUE_NEEDED);
116
117 if (auth_file != NULL) {
118 int fd = open (auth_file, O_WRONLY | O_CREAT, 0666);
119 krb5_ticket *ticket = context_hdl->ticket;
120 krb5_data *data = &ticket->ticket.authorization_data->val[0].ad_data;
119#if 0
120 krb5_ticket *ticket;
121 krb5_data *data;
121
122
123 ticket = context_hdl->ticket;
124 data = &ticket->ticket.authorization_data->val[0].ad_data;
125
122 if(fd < 0)
123 err (1, "open %s", auth_file);
124 if (write (fd, data->data, data->length) != data->length)
125 errx (1, "write to %s failed", auth_file);
126 if(fd < 0)
127 err (1, "open %s", auth_file);
128 if (write (fd, data->data, data->length) != data->length)
129 errx (1, "write to %s failed", auth_file);
130#endif
126 if (close (fd))
127 err (1, "close %s", auth_file);
128 }
129
130 maj_stat = gss_display_name (&min_stat,
131 client_name,
132 &name_token,
133 NULL);

--- 109 unchanged lines hidden ---
131 if (close (fd))
132 err (1, "close %s", auth_file);
133 }
134
135 maj_stat = gss_display_name (&min_stat,
136 client_name,
137 &name_token,
138 NULL);

--- 109 unchanged lines hidden ---