Definition at line 24 of file fixGpfsAcls.cpp.
◆ aclBuffer()
aclBuffer::aclBuffer |
( |
const std::string & |
aPath, |
|
|
bool |
aIsDir = false |
|
) |
| |
|
inline |
◆ operator void *()
aclBuffer::operator void * |
( |
| ) |
|
|
inline |
Definition at line 36 of file fixGpfsAcls.cpp.
38 static const std::string pattern(
"/.aclgetXXXXXX");
39 std::vector<char> tmpName;
40 tmpName.reserve(
path.size() + pattern.size());
41 tmpName.insert(tmpName.end(),
path.cbegin(),
path.cend());
42 tmpName.insert(tmpName.end(), pattern.cbegin(), pattern.cend());
43 tmpName.push_back(
'\0');
45 throwcall::badval(mkdtemp(tmpName.data()),
nullptr,
"can't create tmp dir '", tmpName.data(),
"'");
47 auto fd =
throwcall::badval(mkstemp(tmpName.data()), -1,
"can't create tmp file '", tmpName.data(),
"'");
50 throwcall::good0(gpfs_getacl(tmpName.data(), 0, &
acls),
"can't get acl for '", tmpName.data(),
"'");
52 throwcall::good0(rmdir(tmpName.data()),
"can't remove '", tmpName.data(),
"'");
54 throwcall::good0(unlink(tmpName.data()),
"can't remove '", tmpName.data(),
"'");
References acls, throwcall::badval(), throwcall::good0(), initialized, isDir, and path.
◆ acls
gpfs_opaque_acl_t aclBuffer::acls |
|
private |
◆ initialized
bool aclBuffer::initialized |
|
private |
◆ isDir
◆ path
const std::string& aclBuffer::path |
|
private |
◆ spaceForData
char aclBuffer::spaceForData[0x10000 - sizeof(gpfs_opaque_acl_t)] |
|
private |
The documentation for this class was generated from the following file:
T badval(T call, t badvalue, const Args &... args)
template function to wrap system calls that return a special bad value on failure