smartmontools SVN Rev 5640
Utility to control and monitor storage systems with "S.M.A.R.T."
Macros | Functions
popen_as_ugid.h File Reference
#include <grp.h>
#include <pwd.h>
#include <stdio.h>
#include <string>
Include dependency graph for popen_as_ugid.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define POPEN_AS_UGID_H_CVSID   "$Id: popen_as_ugid.h 5268 2021-12-13 18:55:13Z chrfranke $"
 

Functions

FILE * popen_as_ugid (const char *cmd, const char *mode, uid_t uid, gid_t gid)
 
int pclose_as_ugid (FILE *f)
 
const char * parse_ugid (const char *s, uid_t &uid, gid_t &gid, std::string &uname, std::string &gname)
 

Macro Definition Documentation

◆ POPEN_AS_UGID_H_CVSID

#define POPEN_AS_UGID_H_CVSID   "$Id: popen_as_ugid.h 5268 2021-12-13 18:55:13Z chrfranke $"

Definition at line 12 of file popen_as_ugid.h.

Function Documentation

◆ parse_ugid()

const char * parse_ugid ( const char *  s,
uid_t &  uid,
gid_t &  gid,
std::string &  uname,
std::string &  gname 
)

Definition at line 166 of file popen_as_ugid.cpp.

◆ pclose_as_ugid()

int pclose_as_ugid ( FILE *  f)

Definition at line 145 of file popen_as_ugid.cpp.

◆ popen_as_ugid()

FILE * popen_as_ugid ( const char *  cmd,
const char *  mode,
uid_t  uid,
gid_t  gid 
)

Definition at line 28 of file popen_as_ugid.cpp.