Skip to content

Commit

Permalink
Merge pull request holgerBerger#121 from cniethammer/code-cleanup
Browse files Browse the repository at this point in the history
Code cleanup
  • Loading branch information
holgerBerger authored Dec 9, 2024
2 parents 60620e3 + c272766 commit 86bee64
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
2 changes: 0 additions & 2 deletions src/ws.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
#include <boost/program_options.hpp>
#include <boost/smart_ptr.hpp>

#include "wsdb.h"

#ifndef SETUID
#include <sys/capability.h>
#else
Expand Down
9 changes: 0 additions & 9 deletions src/ws_allocate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,6 @@ int main(int argc, char **argv) {
reminderdefault = config["reminderdefault"].as<int>(0);
durationdefault = config["durationdefault"].as<int>(1);

int db_uid = config["dbuid"].as<int>();

// read user config before dropping privileges to DB user
//
// get user first, so user config is read as owner
Expand All @@ -303,13 +301,6 @@ int main(int argc, char **argv) {
exit(-1);
}

/*
Workspace::raise_cap(CAP_DAC_OVERRIDE);
// lower capabilities to minimum
Workspace::drop_cap(CAP_DAC_OVERRIDE, db_uid);
*/

// check commandline, get flags which are used to create ws object or for workspace allocation
commandline(opt, name, duration, durationdefault , filesystem, extensionflag,
reminder, reminderdefault, mailaddress, user_option, groupname, comment, argc, argv, user_conf);
Expand Down
4 changes: 3 additions & 1 deletion src/ws_restore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@
#include <unistd.h>
#include <grp.h>
#include <sys/types.h>
#include <time.h>
#include <syslog.h>

#include <algorithm>
#include <ctime>
#include <iostream>
#include <string>
#include <vector>
#ifdef USE_BOOST_REGEXP
#include <boost/regex.hpp>
#define REGEX boost::regex
Expand Down
5 changes: 1 addition & 4 deletions src/wsdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,10 @@
#include <string>
#include <fstream>
#include <iostream>
#include <vector>

// Posix
#include <sys/types.h>
#include <pwd.h>
#include <unistd.h>
#include <grp.h>
#include <time.h>
#include <sys/stat.h>
#include <signal.h>

Expand Down

0 comments on commit 86bee64

Please sign in to comment.