JX Application Framework
Loading...
Searching...
No Matches
Classes | Functions
jSysUtil_UNIX.cpp File Reference
#include "jSysUtil.h"
#include "JStdError.h"
#include "jErrno.h"
#include "JListUtil.h"
#include "jDirUtil.h"
#include "jGlobals.h"
#include <unistd.h>
#include <sys/stat.h>
#include <grp.h>
#include <pwd.h>
#include "jAssert.h"
Include dependency graph for jSysUtil_UNIX.cpp:

Classes

struct  jUIDInfo
 
struct  jGIDInfo
 

Functions

bool JUserIsAdmin ()
 
bool JUserIsAdmin (const uid_t uid)
 
JString JGetHostName ()
 
JString JGetUserName ()
 
JString JGetUserName (const uid_t uid)
 
JString JGetUserRealWorldName ()
 
JString JGetUserRealWorldName (const uid_t uid)
 
JString JGetUserHomeDirectory ()
 
JString JGetUserHomeDirectory (const uid_t uid)
 
JString JGetUserShell ()
 
JString JGetUserShell (const uid_t uid)
 
JString JGetGroupName ()
 
JString JGetGroupName (const gid_t gid)
 
bool JUNIXSocketExists (const JString &pathName)
 
JError JCreatePipe (int fd[2])
 

Function Documentation

◆ JCreatePipe()

JError JCreatePipe ( int  fd[2])

Opens a pair of file descriptors. fd[0] is for reading. fd[1] is for writing.

◆ JGetGroupName() [1/2]

JString JGetGroupName ( )

Returns the name of the specified user.

◆ JGetGroupName() [2/2]

JString JGetGroupName ( const gid_t  gid)

◆ JGetHostName()

JString JGetHostName ( )

Returns the name of the machine.

◆ JGetUserHomeDirectory() [1/2]

JString JGetUserHomeDirectory ( )

Returns the home directory of the specified user.

◆ JGetUserHomeDirectory() [2/2]

JString JGetUserHomeDirectory ( const uid_t  uid)

◆ JGetUserName() [1/2]

JString JGetUserName ( )

Returns the name of the specified user.

◆ JGetUserName() [2/2]

JString JGetUserName ( const uid_t  uid)

◆ JGetUserRealWorldName() [1/2]

JString JGetUserRealWorldName ( )

Returns the "real world" name of the specified user.

◆ JGetUserRealWorldName() [2/2]

JString JGetUserRealWorldName ( const uid_t  uid)

◆ JGetUserShell() [1/2]

JString JGetUserShell ( )

Returns the shell of the specified user.

◆ JGetUserShell() [2/2]

JString JGetUserShell ( const uid_t  uid)

◆ JUNIXSocketExists()

bool JUNIXSocketExists ( const JString pathName)

Returns true if pathName is the pathname of an existing unix socket, false otherwise.

◆ JUserIsAdmin() [1/2]

bool JUserIsAdmin ( )

◆ JUserIsAdmin() [2/2]

bool JUserIsAdmin ( const uid_t  uid)