Operating System - HP-UX
1827779 Members
3098 Online
109969 Solutions
New Discussion

Re: sample program using libgss 32 bit works fine 64 bit fails on 11.11

 
murugesan_2
Advisor

sample program using libgss 32 bit works fine 64 bit fails on 11.11

Hello all,
I have compiled the following program on HP-UX 11.11

_______________________________
#include
#include
#include

#ifndef HAVE_GSS_C_NT_HOSTBASED_SERVICE
gss_OID gss_nt_service_name;
#define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
//#error "HAVE_GSS_C_NT_HOSTBASED_SERVICE not defined Comment this line"
#endif

main()
{
signed char *domain_value=(signed char*)"cyrus@krishna.kovaiteam.com";
gss_name_t p;
OM_uint32 min_stat=0,maj_stat;
gss_name_t value;
gss_buffer_desc name_token;
name_token.value=domain_value;
name_token.length=strlen((char *)domain_value);
const gss_buffer_t input_buffer_name=&name_token;
maj_stat=gss_import_name(&min_stat,input_buffer_name,GSS_C_NT_HOSTBASED_SERVICE,&p);
switch(maj_stat)
{
case GSS_S_COMPLETE:
printf("\nSuccess\n");
break;
case GSS_S_BAD_NAMETYPE:
printf("\nGSS_S_BAD_NAMETYPE\n");
break;
case GSS_S_BAD_NAME:
printf("\nGSS_S_BAD_NAME\n");
break;
case GSS_S_BAD_MECH:
printf("\nGSS_S_BAD_MECH\n");
break;
case GSS_S_FAILURE:
printf("\nGSS_S_FAILURE\n");
break;
}
if (GSS_ERROR(maj_stat))
{
fprintf(stderr,"ERROR %lu %lu \n",maj_stat>>24,min_stat);
fprintf(stderr,"A required input parameter could not be read GSS_S_CALL_INACCESSIBLE_READ\n");
}
}
__________________________________________


# cc ./gss_api.c -lgss
# ./a.out

Success
# cc +DA2.0W ./gss_api.c -lgss
# ./a.out
ERROR 1 0
A required input parameter could not be read GSS_S_CALL_INACCESSIBLE_READ


May I know how to solve this problem.

I have already posted this in languages and scripting. But has not been a response. I don't know where should I post this message.
I am new to this list.
Moderators.... Kindly move this post to the relevant category, if this is not the appropriate category.

Thanks in advance,
Murugesan
8 REPLIES 8
harry d brown jr
Honored Contributor

Re: sample program using libgss 32 bit works fine 64 bit fails on 11.11

I just loaded your example on an N-class with 11.11:

"gss_api.c" [New file] 45 lines, 1144 characters
# cc ./gss_api.c -lgss
# ./a.out

Success
#

# cc +DA2.0W ./gss_api.c -lgss
# ./a.out

Success
#

What type of server are you compiling on when you get the ERROR? Is it 64 bit enabled?

live free or die
harry
Live Free or Die
murugesan_2
Advisor

Re: sample program using libgss 32 bit works fine 64 bit fails on 11.11

Thanks harry, for the reply.
Here goes the output of the following command
on my PA-RISC 11.11 server.
# uname -a
HP-UX krishna B.11.11 U 9000/800 1824900696 unlimited-user license
murugesan_2
Advisor

Re: sample program using libgss 32 bit works fine 64 bit fails on 11.11

I missed some info in my previous post.
Some extra info.

# cc +DA1.1 ./gss_api.c /usr/lib/libgss.sl
# ldd ./a.out
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libgss.sl => /usr/lib/libgss.sl
/vob/hpux_buildenv/hp700_ux1111/usr/lib/libdld.2 => /usr/lib/libdld.2
/vob/hpux_buildenv/hp700_ux1111/usr/lib/libc.2 => /usr/lib/libc.2





# cc +DA2.0W ./gss_api.c /usr/lib/pa20_64/libgss.sl
# ldd ./a.out
/usr/lib/pa20_64/libgss.sl => /usr/lib/pa20_64/libgss.sl
libc.2 => /usr/lib/pa20_64/libc.2
libc.2 => /lib/pa20_64/libc.2
libdl.1 => /lib/pa20_64/libdl.1
libdl.1 => /usr/lib/pa20_64/libdl.1

Yes it is 64 bit enabled.
harry d brown jr
Honored Contributor

Re: sample program using libgss 32 bit works fine 64 bit fails on 11.11

I get a slightly different result:

# cc +DA1.1 ./gss_api.c /usr/lib/libgss.sl
# ./a.out

Success
# ldd ./a.out
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libgss.sl => /usr/lib/libgss.sl
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
# cc +DA2.0W ./gss_api.c -lgss
# ./a.out

Success
# ldd ./a.out
libgss.sl => /usr/lib/pa20_64/libgss.sl
libc.2 => /usr/lib/pa20_64/libc.2
libc.2 => /usr/lib/pa20_64/libc.2
libdl.1 => /usr/lib/pa20_64/libdl.1
libdl.1 => /usr/lib/pa20_64/libdl.1
#


What is this /lib in your last post? Is that a TYPO?

also, what does the command "model" return?

Also, do this:
# swlist -lproduct | grep -i gss
GSS-API B.11.11 GSS-API Version 1.0
PHSS_29487 1.0 GSS-API Version 1.0 Cumulative patch
#

live free or die
harry
Live Free or Die
murugesan_2
Advisor

Re: sample program using libgss 32 bit works fine 64 bit fails on 11.11

Some more info:

# ll /lib/pa20_64/libc.2 /usr/lib/pa20_64/libc.2
-r-xr-xr-x 1 bin bin 1860696 Jun 28 2003 /lib/pa20_64/libc.2
-r-xr-xr-x 1 bin bin 1860696 Jun 28 2003 /usr/lib/pa20_64/libc.2
# file /lib/pa20_64/libc.2 /usr/lib/pa20_64/libc.2
/lib/pa20_64/libc.2: ELF-64 shared object file - PA-RISC 2.0 (LP64)
/usr/lib/pa20_64/libc.2: ELF-64 shared object file - PA-RISC 2.0 (LP64)

Note that,
/lib/pa20_64/libc.2 /usr/lib/pa20_64/libc.2 are of same size.

# diff /lib/pa20_64/libc.2 /usr/lib/pa20_64/libc.2
#

# swlist -lproduct | grep -i gss
GSS-API B.11.11 GSS-API Version 1.0
#
# model
9000/800/A500-6X

Do I need to apply Cumulative patch for GSSAPI ?
murugesan_2
Advisor

Re: sample program using libgss 32 bit works fine 64 bit fails on 11.11

When I searched http://software.hp.com for PHSS_29487.depot
I got nothing.

0 products shown below matched your search on "PHSS_29487.depot"
ranganath ramachandra
Esteemed Contributor

Re: sample program using libgss 32 bit works fine 64 bit fails on 11.11

murugesan_2
Advisor

Re: sample program using libgss 32 bit works fine 64 bit fails on 11.11

Thanks...to all
I got the patch already.. and applied... it.
Now I am getting my program working...
Is there a way to close this thread..