char path[PATH_MAX];
int r;
+ // This cannot be performed in stub mode
+ if (pakfire_has_flag(pakfire, PAKFIRE_FLAGS_STUB))
+ return NULL;
+
// Get path to /etc/passwd
r = pakfire_path(pakfire, path, "%s", "/etc/passwd");
- if (r)
+ if (r < 0)
return NULL;
FILE* f = fopen(path, "r");
char path[PATH_MAX];
int r;
+ // This cannot be performed in stub mode
+ if (pakfire_has_flag(pakfire, PAKFIRE_FLAGS_STUB))
+ return NULL;
+
// Get path to /etc/group
r = pakfire_path(pakfire, path, "%s", "/etc/group");
- if (r)
+ if (r < 0)
return NULL;
FILE* f = fopen(path, "r");