Hi all,
I have to test some user priviliges. The goal is to be sure that an unauthorized user can't restart some modules (ssh, mysql etc...).
I'm trying to automate it with a shell script but in same cases I got the syslog broadcast message.
Is there any way to simply get a return code... (3 Replies)
Hello all,
If anyone has time, I have a few questions:
How do I do the following in Linux. We are using Red Hat and Oracle Enterprise Linux, which is based on Red Hat too.
1. How to lock the account after a few (like 3) invalid password attempts?
2. How do you lock a screen after 30... (1 Reply)
I have two laptops on which I've installed Ubuntu Studio 9.04. The first laptop (Acer) has a Centrino 32-bit Intel CPU in it and the second (HP) has a 64-bit dual core Intel CPU. I'm running the 32-bit version of Ubuntu Studio on the Acer and the 64-bit version on the HP. While testing the... (5 Replies)
Hi All,
I am trying to install the IBM data set generator. I have to use the Solaris to use this tool. The following link is supposed to tell the steps on how to use the IBM tool on the Solaris server.
IBM Quest Market-Basket Synthetic Data Generator
Unfortunately, I don't understand what is... (2 Replies)
how can I lock my keyboard while I'm away from the computer without using lock command. What other commands gives me the option to lock keyboard device?
thanks (7 Replies)
LOCK(2) System Calls Manual LOCK(2)NAME
lockinit, lock, canlock, unlock - shared memory spin lock
SYNOPSIS
#include <lock.h>
void lockinit(void);
void lock(Lock *lk);
int canlock(Lock *lk);
void unlock(Lock *lk);
/* Alef only */
adt Lock
{
void lock(*Lock);
void unlock(*Lock);
int canlock(*Lock);
};
adt QLock
{
void lock(*Lock);
void unlock(*Lock);
int canlock(*Lock);
};
adt RWlock
{
void Rlock(*RWlock);
void Runlock(*RWlock);
void Wlock(*RWlock);
void Wunlock(*RWlock);
};
adt Ref
{
int inc(*Ref);
int dec(*Ref);
int ref(*Ref);
};
DESCRIPTION
These routines are used by processes sharing memory to synchronize using spin locks. Lockinit must be called before the first use of the
other routines. Lock blocks until the lock has been obtained. Canlock is non-blocking. It tries to obtain a lock and returns a non-zero
value if it was successful, 0 otherwise. Unlock releases a lock.
Alef
Alef locks have similar functionality, but no special initialization is required. The ADT Lock has functions lock, unlock, and canlock,
just like locks in C. QLocks have the same interface but are not spin locks; instead if the lock is taken QLock.lock will suspend execu-
tion of the calling task until it is released.
Although Locks are the more primitive lock, their use is discouraged and even erroneous for most purposes. For example, Locks cannot syn-
chronize between tasks in the same proc. Use QLocks instead.
RWlocks manage access to a data structure that has distinct readers and writers. RWlock.Rlock grants read access; RWlock.Runlock releases
it. RWlock.Wlock grants write access; RWlock.Wunlock releases it. There may be any number of simultaneous readers, but only one writer.
Moreover, if write access is granted no one may have read access until write access is released.
Refs manage reference counters. Ref.inc increments the counter and returns the old value; Ref.dec decrements the counter and returns the
new value. Ref.ref returns the current value.
SOURCE
/sys/src/liblock
SEE ALSO
rfork in fork(2)LOCK(2)