Store uid/gid/mtime for /proc directory capture
This commit is contained in:
parent
5d5d2dd183
commit
80ef1d7e5e
1 changed files with 4 additions and 1 deletions
|
|
@ -93,6 +93,7 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
DIR *d;
|
DIR *d;
|
||||||
struct dirent *de;
|
struct dirent *de;
|
||||||
|
struct stat s;
|
||||||
|
|
||||||
chdir("/proc");
|
chdir("/proc");
|
||||||
archivefile("meminfo", 1);
|
archivefile("meminfo", 1);
|
||||||
|
|
@ -101,7 +102,9 @@ int main(int argc, char *argv[])
|
||||||
d = opendir(".");
|
d = opendir(".");
|
||||||
while ((de = readdir(d)))
|
while ((de = readdir(d)))
|
||||||
if (de->d_name[0] >= '0' && de->d_name[0] <= '9') {
|
if (de->d_name[0] >= '0' && de->d_name[0] <= '9') {
|
||||||
writeheader(1, de->d_name, 0555, 0, 0, 0, 0, 5);
|
stat (de->d_name, &s);
|
||||||
|
writeheader(1, de->d_name, 0555, s.st_uid,
|
||||||
|
s.st_gid, 0, s.st_mtime, 5);
|
||||||
archivejoin(de->d_name, "smaps", 1);
|
archivejoin(de->d_name, "smaps", 1);
|
||||||
archivejoin(de->d_name, "cmdline", 1);
|
archivejoin(de->d_name, "cmdline", 1);
|
||||||
archivejoin(de->d_name, "stat", 1);
|
archivejoin(de->d_name, "stat", 1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue