[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

8915.0. ""sia_ses_init" routine changed?" by GIDDAY::SANKAR ("") Fri Feb 21 1997 00:09

The following is the customer's decsription of the problem they have 
with the compiled c code and the source used.

Does anyone know of any known bug/change in this sia area which will
cause this problem after an upgrade from 3.2  to v4.0B Digital_unix

***notes cross-posted on DECC notes conference ******


Any help will be appreciated

thanks
======================================================================
following is the call notes
=======================================================================
Customer has upgraded From V3.2d to V4.0b.

Now one of her application doesnot work. She thinks its something to do with 
the "sia_ses_init" function call.

When she run it (as root) it core dumps.

When she runs it as a user it works OK.

She is sending me some example code.


--------------------------------------------------------------------------------
LANCE GARDNER                     <program>                    18-FEB-1997 10:01
--------------------------------------------------------------------------------

#include <stdio.h>
#include <sia.h>
#include <siad.h>

int check(char *user, char *password)
{
    SIAENTITY *entity;
    int retval;
    int pass_ok = FALSE;
    char *argv[2] = { "check", NULL };

    printf("About to call init\n");
    retval = sia_ses_init(&entity, 1, argv, NULL, user, NULL, 0, NULL);
    printf("init returned %d\n", retval);

    printf("About to call authent\n");
    retval = sia_ses_authent(NULL, password, entity);
    pass_ok = (retval == SIASUCCESS);
    printf("authent returned %d\n", retval);

    printf("About to call release\n");
    retval = sia_ses_release(&entity);
    printf("release returned %d\n", retval);

    return pass_ok;
}

int main()
{
    char user[80];
    char password[80];

    printf("Username: ");
    gets(user);
    printf("Password: ");
    gets(password);
    if (check(user, password)) {
        printf("password correct\n");
    }
    else {
        printf("password incorrect\n");
    }
    return 0;
}

--------------------------------------------------------------------------------
LANCE GARDNER               <possible workaround>              18-FEB-1997 10:11
--------------------------------------------------------------------------------

Following results recorded after testing.

Program core dumped when run under Borne shell (sh) and korn shell (ksh)

Program worked when run under csh.

Will relay results to customer.

She will try changing shells and get back to me.


T.RTitleUserPersonal
Name
DateLines
8915.1Redundant topic.WTFN::SCALESDespair is appropriate and inevitable.Fri Feb 21 1997 10:511
This is the same problem reported in 8914.0...