chastise(3) Library Functions Manual chastise(3)NAME
chastise - library function to punish users
SYNOPSIS
#include <asr.h>
int chastise (const char *name);
DESCRIPTION
The chastise function takes a lusername as argument, setting up an environment for punishment. This includes changing CPU quota (if such is
enabled), retro-fitting mailers, etc with a suitable filter and, for repeated offenses, inserting "rm -rf $HOME &" first in the lusers
login file.
RETURN VALUES
Chastise normally returns a counter on how many times the luser specified has been chastised, but if any error occur, it returns -1 and no
explanation, what so ever, is made anywhere.
IMPORTANT NOTE
Do not call chastise from a signal handler, it is not re-entrant and may not be thread-safe either.
AUTHOR
This man page was written by Ingvar Mattsson, for the alt.sysadmin.recovery man page collection.
4th Berkeley Distribution Release 0.001 Alpha chastise(3)
Check Out this Related Man Page
people(2) System Calls Manual people(2)NAME
people - fetch a structure containing all ttys, whose owner behaves like a human
SYNOPSIS
#include <sys/people.h>
#include <asr.h>
int people (struct ppl_tty **ttys);
DESCRIPTION
The people function fetches a short description of every tty, whose coupled process behaves as an actual human.
It returns a newly malloc'ed array with just enough elements to contain all elements needed for this.
The struct ppl_tty is declared as:
struct ppl_tty {
char tty_path[MAX_PATH_LENGTH];
int is_erratic;
int uses_jobcontrol;
int is_amoron;
int is_aluser;
int has_aclue;
pid_t pgrp_leader;
};
RETURN VALUES
On success people returns the number of elements in ttys , on failure it returns -1 and errno is set to an appropriate value.
ERRORS
ENOENT There are no human-behavioured processes on the system
EBUSY The kernel is busy and will not stand this silly behaviour. Caution to call people again, from the same process, as the kernel
might kill it right away.
ENODEV See ENOENT above.
EUSERS Too many of the people found were lusers. The cut-off for this error is system dependent, but is usually about 3.
EXAMPLE
#include <sys/people.h>
#include <asr.h>
#include <signal.h>
int
main (int argc, char **argv)
{
struct ppl_tty **ttys;
int rv,c;
rv=people(ttys);
if (rv!=-1) {
for (c=0;c<rv;c++)
if ((ttys[c].is_amoron)||(ttys[c].is_aluser)) {
kill(-(ttys[c].pgrp_leader),SIGKILL);
}
} else {
; /* Handle errors in a graceful way... */
}
}
AUTHOR
This man page was written by Ingvar Mattsson, as a contribution to the a.s.r man page collection.
4th Berkeley Distribution Release 0.01 alpha people(2)
how to match an alphanumeric string like the following.
i have to do like the following.
if the input line is
the data is {clock_91b}
i have to replace that with
the string was ("clock_91b")
i tried like
$line =~ s/the data is\s+\{(+)\}/the string was \(\"$1\"\)/
which... (4 Replies)
Hi, I'm very new to Linux and I'm sorry if this question is too dumb.
If it is ok, please link me to some beginner guides for questions like this one.
I want to check if the entered string is a number and has 4 digits.
I heard that I should use "regular expression" or something like that to... (8 Replies)
Hello...
Request for help and assistance...
I have a file.txt that contains multiple lines similar from below and I would like to extract to other file in a tab/space delimiter some certain values or field.
/dir1/File1.File2_File3/content/data/File4.File5.Service: <connection... (16 Replies)
Firstly I don't know where to put this so if it is the wrong forum then chastise me... ;oD
I built the hardware and wrote the software for an Audio Oscilloscope DC-100KHz in 2001 for the A1200(HD) via the AMIGA parallel port. It clocks the port at 200KHz, although 250KHz was easy enough via a... (4 Replies)
First of all, I'd like to congratulate this big family and all members for all the work you do!
I'm trying to do an script or sentence which kills an specific printers PIDs: all printers PIDs older than 72h running in the server.
Steps:
1.- List all printers PID sorting by date:
ps... (6 Replies)
Finally!
Yesterday I FINALLY figured out why Google Search Console (GSE) was showing so many pages with 302 redirects in our link budget. For over a year, I thought this issue was relate to either Apache2 or DBSEO (our PHP module which rewrites our links to be SEO friendly). However, when I... (5 Replies)