[29135] in Kerberos

home help back first fref pref prev next nref lref last post

Re: How to retrieve src_name in SSPI

daemon@ATHENA.MIT.EDU (Markus Moeller)
Wed Jan 23 15:35:29 2008

To: kerberos@mit.edu
From: "Markus Moeller" <huaraz@moeller.plus.com>
Date: Wed, 23 Jan 2008 19:40:27 -0000
Message-ID: <fn88c4$30a$1@ger.gmane.org>
Mime-Version: 1.0
X-Complaints-To: usenet@ger.gmane.org
In-Reply-To: <OF6A62F810.5F50DE85-ON862573D9.001D3770-862573D9.001D82C5@us.ibm.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: kerberos-bounces@mit.edu

I think you have to call QueryContextAttribute like shown below for getting 
the Username.

        maj_stat = AcceptSecurityContext( &server_creds,
                                          context,
                                          &input_desc,
                                          global_asc_flags,
                                          SECURITY_NATIVE_DREP,
                                          &new_context,
                                          &output_desc,
                                          &ret_flags,
                                          &expiry
                                          );


        maj_stat = QueryContextAttributes(&new_context, SECPKG_ATTR_NAMES, 
&names);

       printf("User: %s\n", names.sUserName);


Markus


"Manoj Mohan" <manojm@us.ibm.com> wrote in message 
news:OF6A62F810.5F50DE85-ON862573D9.001D3770-862573D9.001D82C5@us.ibm.com...
>
> Hi,
>
> In GSSAPI we call gss_accept_sec_context on server side which also gives 
> us
> the client name as an output.
> For example,
>   maj_stat = gss_accept_sec_context(&min_stat,
>                                      &context_handle,
>                                      verifier_cred_handle,
>                                      &gss_input_token,
>                                      input_chan_bindings,,
>                                      &src_name, -------------------->
> Client Name
>                                      &actual_mech_type,
>                                      &gss_output_token,
>                                      &ret_flags,
>                                      &time_ret,,
>                                      &delegated_cred_handle);
>
> I am implementing similar program using SSPI and there the equivalent call
> is AcceptSecurityContext and that
> does not have this as an output. What API should I call after
> AcceptSecurityContext to get that information?
>
> Thanks & Regards,
> Manoj
> ________________________________________________
> Kerberos mailing list           Kerberos@mit.edu
> https://mailman.mit.edu/mailman/listinfo/kerberos
> 


________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos

home help back first fref pref prev next nref lref last post