[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hpux-devtools
Subject:    Re: HPUX-DEVTOOLS: DCE call fails
From:       nanda nanda <ananda_1974 () yahoo ! com>
Date:       2000-09-21 14:27:00
[Download RAW message or body]



Thank you for the solution. I removed the * before
login_context  and it works fine. Now there is an
other problem. I put this piece of code in an existing
application(.c file) and it failed. I mean that this
code can run stand alone, but not as part of some
other file. Please help me to fix it. 

By the way, the stack trace is below:

`main(21):  Stopped at: kill+0010 (7F0ED498)
`main(20):  Called from: _raise+001c (7F0876BC)
`main(19):  Called from: abort+00c0 (7F05E140)
`main(18):  Called from: dce_svc_printf_withfile+03bc
(7F34D70C)
`main(17):  Called from: init_once+015c (7F2AC5DC)
`main(16):  Called from: pthread_once+0144 (7F1745A4)
`main(15):  Called from: ptdexc_once+0014 (7F396CFC)
`main(14):  Called from: rpc__init+0044 (7F2AC344)
`main(13):  Called from: rpc_ns_entry_expand_name+0050
(7F307158)
`main(12):  Called from: dce_cf__load_cache+01f8
(7F29D6A8)
`main(11):  Called from: dce_cf_get_cell_name+0014
(7F29E28C)
`main(10):  Called from: op9_csr+0034 (7F55001C)
`main(9):   Called from: pthread_once+0144 (7F1745A4)
`main(8):   Called from: op9_csr+0048 (7F551E48)
`main(7):   Called from: sec_id_global_parse_name+0048
(7F552EA0)
`main(6):   Called from:
sec_login_pvt_allocate_login_context+0250 (7F52EF88)
`main(5):   Called from: sec_login_setup_identity+0054
(7F522EEC)
name: /usr/lib/dld.sl
system_id: PA-RISC 1.0
image is mapped WRITABLE - no symbolic debug
information detected
section[1]: (TEXT) (0xc0002000-0xc0011a8b)
section[2]: (DATA) (0x7f7e3000-0x7f7e5523)

name: /usr/lib/libc.2
system_id: PA-RISC 1.1
image is mapped WRITABLE - no symbolic debug
information detected
section[1]: (TEXT) (0x7f005000-0x7f11efff)
section[2]: (DATA) (0x7efe6000-0x7f004fff)

name: /usr/lib/libdld.2
system_id: PA-RISC 1.0
image is mapped WRITABLE - no symbolic debug
information detected
section[1]: (TEXT) (0x7efe4000-0x7efe5fff)
section[2]: (DATA) (0x7efe3000-0x7efe3fff)

name: /usr/lib/libsec.2
system_id: PA-RISC 1.1
image is mapped WRITABLE - no symbolic debug
information detected
section[1]: (TEXT) (0x7f124000-0x7f137fff)
section[2]: (DATA) (0x7f11f000-0x7f123fff)

name: /opt/odss/lib/libodssd.sl
system_id: PA-RISC 2.0
image is mapped WRITABLE - symbolic debug information
available
section[1]: (TEXT) (0x7f13f000-0x7f166fff)
section[2]: (DATA) (0x7f138000-0x7f13efff)

name: /opt/odss/lib/libodssb.sl
system_id: PA-RISC 2.0
image is mapped WRITABLE - symbolic debug information
available
section[1]: (TEXT) (0x7f675000-0x7f68afff)
section[2]: (DATA) (0x7f5f1000-0x7f674fff)

name: /usr/lib/libdcekt.1
system_id: PA-RISC 1.1
image is mapped WRITABLE - no symbolic debug
information detected
section[1]: (TEXT) (0x7f1e5000-0x7f5c4fff)
section[2]: (DATA) (0x7f17f000-0x7f1e4fff)

name: /usr/lib/libpthread.1
system_id: PA-RISC 1.1
image is mapped WRITABLE - no symbolic debug
information detected
section[1]: (TEXT) (0x7f16a000-0x7f17efff)
section[2]: (DATA) (0x7f167000-0x7f169fff)

name: /usr/lib/libm.2
system_id: PA-RISC 1.1
image is mapped WRITABLE - no symbolic debug
information detected
section[1]: (TEXT) (0x7f5cb000-0x7f5f0fff)
section[2]: (DATA) (0x7f5c5000-0x7f5cafff)

name: /usr/lib/libnsl.1
system_id: PA-RISC 1.1
image is mapped WRITABLE - no symbolic debug
information detected
section[1]: (TEXT) (0x7f74f000-0x7f7bdfff)
section[2]: (DATA) (0x7f68b000-0x7f74efff)

name: /usr/lib/libxti.2
system_id: PA-RISC 1.1
image is mapped WRITABLE - no symbolic debug
information detected
section[1]: (TEXT) (0x7f7c8000-0x7f7dcfff)
section[2]: (DATA) (0x7f7c2000-0x7f7c7fff)

--- Matthew Collins <collins@hpsgns1.sgp.hp.com>
wrote:
> You would probably get more help if you also gave
> the stack trace.
> 
> I haven't used DCE but if you look at your arguments
> they don't make sense.
> 
> sec_login_handle_t *login_context;
> ...
>
sec_login_setup_identity(principal,sec_login_no_flags,
>  login_context,&status);
> 
> Clearly sec_login_setup_identity can't modify the
> pointer login_context so the only point of passing a
> pointer like this is so the function can put
> something into what ever you are pointing at.  In
> this case your just pointing at some random location
> in memory.
> 
> I'd try something like:
> 
> sec_login_handle_t login_context;
>
sec_login_setup_identity(principal,sec_login_no_flags,
>  &login_context,&status);
> 
> failing that I'd try the man page (which I don't
> have :-) )
> 
> Matthew
> 
> nanda nanda wrote:
> 
> > I have a file as given below. I compile it using
> >  cc -D_POSIX_D10_THREADS -lpthread -ldcekt
> filename
> >
> > command. When i run this executable it gives me a
> > coredump. The dump says that the program failed at
> > sec_login_setup_identity() call.
> >
> > C program:
> > #include <pthread.h>
> > #include <dce/sec_login.h>
> >
> > int main()
> > {
> >  unsigned_char_p_t principal;
> >  sec_login_handle_t *login_context;
> >  error_status_t status;
> > 
>
principal=(unsigned_char_p_t)malloc(sizeof(char)*20);
> >  strcpy((char*)principal,"venkat/machinename");
> >
> >
>
sec_login_setup_identity(principal,sec_login_no_flags,
> >  login_context,&status);
> >  printf("%d",status);
> > }
> >
> > I am running this on a HPUX 11.0 machine. I use
> > libdcekt to make use of kernel threads. I have dce
> > installed and configured. The entry
> > "venkat/machinename" is available in the dce
> registry.
> >
> > I wish to know whether this is a problem wih the
> dce
> > configuration or with the code.
> >
> > Regards
> > Venkat.
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Send instant messages & get email alerts with
> Yahoo! Messenger.
> > http://im.yahoo.com/
> > 
>
_________________________________________________________________
> >  To leave this mailing list, send mail to
> majordomo@cxx.cup.hp.com
> >     with the message UNSUBSCRIBE hpux-devtools
> > 
>
_________________________________________________________________
> 


__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/
 _________________________________________________________________
 To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
    with the message UNSUBSCRIBE hpux-devtools
 _________________________________________________________________

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic