Exemplo n.º 1
0
static int in_printer(
    char *printerName,
    char *driverName,
    char *tempPath,
    char *prnFile)
{
int have_printer;
    rtp_printf("Note: The demo does not actually print data, it just captures print data to a temporary file.\n");
    rtp_printf("Add a printer (y/n) ? ");

    have_printer = rtp_term_getch();
    rtp_printf("\n");

    if (have_printer == 'y' || have_printer == 'Y')
    {
        rtp_printf("Set up printer. press enter to keep defaults. \n");
        rtp_printf("Printer name : ");
        rtp_term_promptstring (printerName, 0);
        rtp_printf("Driver name : ");
        rtp_term_promptstring (driverName, 0);
        rtp_printf("Print Capture Path : ");
        rtp_term_promptstring (tempPath, 0);
        rtp_printf("Print Capture File : ");
        rtp_term_promptstring (prnFile, 0);

        return(1);
    }
    return(0);
}
Exemplo n.º 2
0
static int in_guestaccount(void)
{
    char allow[32];

    allow[0] = 0;  /* eos */
    rtp_printf("Allow Guest login (y/n) : ");
    rtp_term_promptstring (allow, 0);
    if (allow[0] == 'Y' || allow[0] == 'y')
        return(1);
    return(0);
}
Exemplo n.º 3
0
static int in_user(char * userName, char *userPass, char *userPerm)
{
    rtp_term_promptstring (userName, 0);
    if (userName[0])
    {
        rtp_printf("Password  : "******"rw");
            rtp_printf("Select access rights , 'r'ead or 'rw' read-write  : ");
            rtp_term_promptstring (userPerm, 0);
            if (rtp_strcmp(userPerm, "rw") == 0)
                break;
            else if (rtp_strcmp(userPerm, "r") == 0)
                break;
        }
        return(1);
    }
    return(0);
}
Exemplo n.º 4
0
static int in_share(byte security_mode, char *shareName,char *sharePath,char *shareDesc,char *sharePass, char *secCode)
{
        rtp_printf("Set up shares press enter to keep defaults. \n");
        rtp_printf("Share name : ");
        rtp_term_promptstring (shareName, 0);
        if (!shareName[0])
            return(0);
        rtp_printf("Share Path : ");
        rtp_term_promptstring (sharePath, 0);
        rtp_printf("Share Description : ");
        rtp_term_promptstring (shareDesc, 0);

        if (security_mode == AUTH_SHARE_MODE)
        {
            rtp_printf("Share Password (leave empty for no passwords): ");
            rtp_term_promptstring (sharePass, 0);
            rtp_printf("0==READONLY, 1==WRITEONLY, 2==READWRITE, 3==NOACCES, 4==NO SECRITY\n");
            rtp_printf("Share Security 0,1,2,3,4: ");
            rtp_term_promptstring (secCode, 0);
         }
        return(1);

}
Exemplo n.º 5
0
static byte in_loginmode(void)
{
    byte security_mode;
    char which_share_mode[32];
    do {
        rtp_strcpy(which_share_mode, "s");
        rtp_printf("press '?' for help or ..\n");
        rtp_printf("Press 's' for share based passwords, 'u' for user passwords: ");
        rtp_term_promptstring (which_share_mode, 0);

        if (which_share_mode[0] == '?')
            help_security_mode();
    } while (which_share_mode[0] != 's' && which_share_mode[0] != 'u');

    if (which_share_mode[0] == 's')
    {
        security_mode = AUTH_SHARE_MODE;
    }
    else
    {
        security_mode = AUTH_USER_MODE;
    }
    return(security_mode);
}
Exemplo n.º 6
0
/*----------------------------------------------------------------------*
                             rtp_term_gets
 *----------------------------------------------------------------------*/
int rtp_term_gets (char * string)
{
    *string = 0;
    return (rtp_term_promptstring(string,0));
}