#include <cstdlib>
#include <cstring>
#include <memory>
+#include <string>
#include "common/utils/clist_helpers.h"
Step::Status StepPrivilegeCompatibility::process() {
// Add default privileges for each certificates level.
bool ret = true;
- switch(context_->privilege_level.get()) {
+ switch (context_->privilege_level.get()) {
case common_installer::PrivilegeLevel::PUBLIC:
ret = AddPrivilegeToList(context_->manifest_data.get(),
kPrivForPublic);
#define BUFSIZE 1024
-void printUID() {
- struct passwd *lpwd;
- lpwd = getpwuid(getuid());
- printf("Process UID:%d, Uname:%s\n", getuid(), lpwd->pw_name);
- lpwd = getpwuid(geteuid());
- printf("Process EUID:%d, EUname:%s\n", geteuid(), lpwd->pw_name);
-}
-
int main(int argc, char** argv) {
- char cmd[BUFSIZE] = {0,};
- char tmp[BUFSIZE] = {0,};
+ char cmd[BUFSIZE] = {0, };
+ char tmp[BUFSIZE] = {0, };
int i;
- //snprintf(cmd, BUFSIZE, "%s/pkgdir_maker_impl.sh", dirname(argv[0]));
snprintf(cmd, BUFSIZE, "pkgdir_maker_impl.sh");
for (i=1; i < argc; i++) {
// this routine is needed.
setuid(0);
seteuid(0);
-// printUID();
-// printf("CMD: %s\n", cmd);
return system(cmd);
}