[Perlgssapi-users] Client/Server Question
Brought to you by:
achimgrolms
From: Tuc at T-B-O-H.N. <ml...@t-...> - 2006-09-21 02:39:55
|
Hi, I don't know if I'm WAY WAY WAY off, but lets see. :) I'm trying to write a perl program to replace a Windows based program using SSPI. I was under the impression that GSSAPI could be used to handle SSPI transactions somehow. I first decided to take the gss-server.pl in the example directory and use it as a starter. I started it on port 2068 and started my application. It seemed to die so I made a few mods to the server mostly not to print anything if whats read from the socket is empty, and then when it does contain something, not to decode it. It looks like : print "SERVER::accepted connection from client ...\n"; my $gss_input_token =3D <$client_socket>; if (length($gss_input_token) ) { print "SERVER::received token - Before $gss_input_token\n"; # $gss_input_token =3D decode_base64($gss_input_token); # print "SERVER::received token - After $gss_input_token\n"; print "SERVER::received token (length is " . length($gss_input_to= ken) . "):\n"; my $status =3D GSSAPI::Context::accept( $server_context, GSS_C_NO_CREDENTIAL, $gss_input_token, GSS_C_NO_CHANNEL_BINDINGS, my $gss_client_name, my $out_mech, my $gss_output_token, my $out_flags, my $out_time, my $gss_delegated_cred); When I run it it outputs : ./gss-server.pl: -name not specified, using hostname result [SOME.t-b-o-h= .net] ./gss-server.pl: using [SOME.t-b-o-h.net:2068] SERVER set environment variable KRB5_KTNAME to FILE:/etc/krb5.keytab Listening on port 2068 ... SERVER::waiting for request ... SERVER::accepted connection from client ... Use of uninitialized value in length at ./gss-server.pl line 79. SERVER::waiting for request ... SERVER::accepted connection from client ... SERVER::received token - Before NT8NTLMSSP=A21 (( SERVER::received token (length is 47): Unable to accept security context: MAJOR:: A token was invalid MINOR::Unknown error: 0 Segmentation fault (core dumped) I went back to the original server and started it the same way, then used the client from the examples directory. I invoked : ./gss-client.pl -hostname=3DSOME.t-b-o-h.net -prodid=3Dtest -port=3D2068 CLIENT: ./gss-client.pl: using [te...@SO...:2068] CLIENT::principal [te...@SO...] means going to communicate with= server name [test/SOM...@T-...] Use of uninitialized value in subroutine entry at ./gss-client.pl line 88. CLIENT::Unable to initialize security context: MAJOR:: Miscellaneous failure (see text) MINOR::open(/tmp/krb5cc_0): No such file or directory SERVER: asgard# ./gss-serveroriginal.pl --keytabfile=3D/etc/krb5.keytab --port=3D= 2068 ./gss-serveroriginal.pl: -name not specified, using hostname result [SOME= .t-b-o-h.net] ./gss-serveroriginal.pl: using [SOME.t-b-o-h.net:2068] SERVER set environment variable KRB5_KTNAME to FILE:/etc/krb5.keytab Listening on port 2068 ... SERVER::waiting for request ... SERVER::accepted connection from client ... Use of uninitialized value in subroutine entry at ./gss-serveroriginal.pl= line 78. SERVER::received token (length is 0): SERVER::waiting for request ... Should the client/server pair work properly? Is there anyone that might have an idea why its also coring? Thanks, Tuc |