Sponsored Content
Operating Systems SCO Terminal Control Database Entry Post 42165 by Perderabo on Thursday 23rd of October 2003 05:58:02 AM
Old 10-23-2003
Thanks for posting your solution. We are a little short on SCO expertise around here, so every contribution to our knowledge base helps.
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Terminal control from rsh

I call "rsh -l username HOSTMANE myscript.sh" from the script on TRU64 OSF1 cluster. The myscript.sh does some logic one the different cluster node and output requested info on my terminal. If I try to use commands to control output (clear, tput etc..) it just does not work. Obviously the rsh... (2 Replies)
Discussion started by: zam
2 Replies

2. Programming

terminal device control through a C/C++ program

Hi, I want to fork a new process from a daemon that needs terminal attachment to some ttyN or pts/N device. Here is the code #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <string.h> int main(int... (5 Replies)
Discussion started by: ku@ntum
5 Replies

3. UNIX for Advanced & Expert Users

Control process from different terminal (over SSH)

I pressed CTRL Z and suspended the job. then I pressed bg, The process re-started to throw output on the terminal and its not allowing me to access the prompt. its not even accepting CTRL Z. The process has been running for about 2 hours now and I want to suspend it by opening another terminal.... (3 Replies)
Discussion started by: rakeshou
3 Replies

4. UNIX and Linux Applications

Edit/update an /etc/group database entry (c/c++)

Hello I'm writing a program for managing accounts and groups in a linux system. My problem is how to update the members of a group in the /etc/group file,if i have to add/remove those members. total 3 variables for adding some new members to the group : char **oldmembers=grp->gr_mem; ... (1 Reply)
Discussion started by: mekos
1 Replies

5. Programming

userpw.h AIX ( delete entry from the shadow password database )

HI i need to delete an entry in /etc/security/passwd. can't find a way to do it with userpw.h api ( AIX ). the passwd file i delete like this. Write all entrys to passwd file except the one we are removing. can't find any function that works like getspent / getpwent do in AIX userpw api.... (4 Replies)
Discussion started by: nighter
4 Replies

6. Solaris

VI Editor issue "E558: Terminal entry not found in terminfo"

When trying to open a document with VI editor, getting the following error.. E558: Terminal entry not found in terminfo 'vt100' not known. Available builtin terminals are: builtin_gui builtin_riscos builtin_amiga builtin_beos-ansi builtin_ansi builtin_pcansi ... (8 Replies)
Discussion started by: vikram3.r
8 Replies

7. Shell Programming and Scripting

Find similar entry in a .txt file acting as a database.

May i know how do i go along finding similar entry in a .txt file, which is used a as a "database" and post and error saying the entry existed when we key in the entry. ---------- Post updated at 05:18 PM ---------- Previous update was at 05:16 PM ---------- i mean post an error saying the... (5 Replies)
Discussion started by: santonio
5 Replies

8. UNIX for Beginners Questions & Answers

Creating script to read many files and load into database via single control file

Hi, I have many files but with only 2 names , I want to load the data of that file into database through sqlldr with single control file. how can i do that ????? Example: switch_file switch_file billing_file billing_file now these files should be loaded into same database but different... (1 Reply)
Discussion started by: niti_sharma
1 Replies
getestcent(3)						     Library Functions Manual						     getestcent(3)

NAME
getestcent, getestcnam, setprtcent, endprtcent, putestcnam, getprtcent, getprtcnam, putprtcnam - Manipulate terminal control database entry (Enhanced Security) LIBRARY
Security Library (libsecurity.so) NOTE: In order to quickstart a program, the program must be linked as follows: -lsecurity -ldb -laud -lm See the shared library discussion in the Programmer's Guide for more information about using the quickstarting feature. SYNOPSIS
#include <sys/types.h> #include <sys/security.h> #include <prot.h> struct es_term *getestcent(void); struct es_term *getestcnam( char *name); void setprtcent(void); void endprtcent(void); int putestcnam( char *name, struct es_term *pr); NOTE: The getprtcent(), getprtcnam(), and getprtcnam() routines have been replaced by getestcent(), getestcnam(), putestcnam() respec- tively. PARAMETERS
Specifies a terminal control database entry name. Specifies a terminal control database control entry structure. DESCRIPTION
The getestcent() and getestcnam() functions both return a pointer to an object with the following structure containing the separated-out fields of an entry in the terminal control database. Each entry in the database contains a es_term structure, declared in the prot.h header file as follows: /* Terminal Control Database Entry */ struct estc_field { char *fd_devname; /* Device/host name */ uid_t fd_uid; /* uid of last successful login */ time_t fd_slogin; /* time stamp of " " */ uid_t fd_uuid; /* uid of last unsuccessful login */ time_t fd_ulogin; /* time stamp of " " */ uid_t fd_loutuid; /* uid of last logout */ time_t fd_louttime; /* time stamp of " */ int fd_nlogins; /* consecutive failed attempts */ int fd_max_tries; /* maximum unsuc login tries allowed */ time_t fd_logdelay; /* delay between login tries */ time_t fd_unlockint; /* delay before clearing t_failures */ char fd_lock; /* terminal locked? */ char fd_xdisp; /* this entry is for X display (xdm) */ time_t fd_login_timeout ; /* login timeout in seconds */ }; struct estc_flag { unsigned int fg_devname:1, /* Is fd_devname set? */ fg_uid:1, /* Is fd_uid set? */ fg_slogin:1, /* Is fd_stime set? */ fg_uuid:1, /* Is fd_uuid set? */ fg_ulogin:1, /* Is fd_ftime set? */ fg_loutuid:1, /* Is fd_loutuid set? */ fg_louttime:1, /* Is fd_louttime set? */ fg_nlogins:1, /* Is fd_nlogins set? */ fg_max_tries:1, /* Is fd_max_tries set? */ fg_logdelay:1, /* Is fd_logdelay set? */ fg_lock:1, /* Is fd_lock set? */ fg_unlockint:1, /* Is fd_unlockint set? */ fg_login_timeout : 1, /* is fd_login_timeout valid? */ fg_xdisp : 1 /* Is fd_xdisp valid ? */ ; }; struct es_term { AUTH_ESCAP_COMMON size_t fieldlen; struct estc_field *ufld; struct estc_flag *uflg; struct estc_field *sfld; struct estc_flag *sflg; }; Note that in the previous example ufld and uflg refer to user-specific entries, and sfld and sflg refer to the system default values For more information on the system default values, see the default(4) reference page. The value returned by the getestcent() or getestcnam() function refers to a structure that is overwritten by calls to these functions. To retrieve an entry, modify it, and replace it in the database, you must copy the entry using copyestcent() and supply the modified buffer to putestcnam(). The getestcent() function returns a pointer to the first terminal es_term structure in the database when first called. Thereafter, it returns a pointer to the next es_term structure in the database, so successive calls can be used to search the database. The getestcnam() function searches from the beginning of the database until a terminal name matching name is found, and returns a pointer to the particular structure in which it was found. If an end-of-file or an error is encountered on reading, these functions return a null pointer. A call to setprtcent() has the effect of rewinding the terminal control database to allow repeated searches. The endprtcent() function can be called to close the terminal control database when processing is complete. The putestcnam() function puts a new or replaced terminal control entry pr with key name into the database. If the uflg->fg_devname field is 0 (zero), the requested entry is deleted from the terminal control database. The putestcnam() function locks the database for all update operations, and calls the endprtcent() function after the update or failed attempt. NOTES
Structures returned by the database routines contain pointers to character strings and lists rather than being self-contained. The copy function must be used rather than doing a structure assignment to save a returned structure. Programs using these functions must be compiled with -lsecurity. The sfld and sflg structures are filled from corresponding fields in the system default database. Thus, a program can easily extract the user-specific or system-wide parameters for each database field (see the getespwent(3) and getesdvent(3) reference pages). RETURN VALUES
The getestcent() and getestcnam() functions return null pointers on EOF or an error. The putestcnam() function returns a value of 0 (zero) if it cannot add or update the entry. FILES
Terminal control database. System defaults database. General security include file. RELATED INFORMATION
Functions: getesdfent(3), getespwent(3), getesdvent(3) Files: authcap(4), ttys(4) Security delim off getestcent(3)
All times are GMT -4. The time now is 10:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy