diff --git a/include/Nebula.h b/include/Nebula.h index 0f7e4de8e7..c242e56644 100644 --- a/include/Nebula.h +++ b/include/Nebula.h @@ -449,8 +449,9 @@ private: void bootstrap(); /** - * Callback function to TODO - * @param _loaded_db_version TODO + * Callback function for the check_db_version method. Stores the read + * version in loaded_db_version + * @param _loaded_db_version returned columns * @param num the number of columns read from the DB * @param names the column names * @param vaues the column values @@ -459,9 +460,12 @@ private: int select_cb(void *_loaded_db_version, int num, char **values, char **names); - /* - * TODO - * @return 0 ok, -1 version mismatch, -2 needs bootstrap + /** + * Reads the current DB version. + * + * @return 0 on success, + * -1 if there is a version mismatch, + * -2 if the DB needs a bootstrap */ int check_db_version(); }; diff --git a/include/RequestManagerChown.h b/include/RequestManagerChown.h index 6632900d97..5dff310e4e 100644 --- a/include/RequestManagerChown.h +++ b/include/RequestManagerChown.h @@ -35,12 +35,21 @@ protected: :Request(method_name,params,help) { auth_op = AuthRequest::CHOWN; + + Nebula& nd = Nebula::instance(); + gpool = nd.get_gpool(); + upool = nd.get_upool(); }; ~RequestManagerChown(){}; /* -------------------------------------------------------------------- */ + GroupPool * gpool; + UserPool * upool; + + /* -------------------------------------------------------------------- */ + virtual void request_execute(xmlrpc_c::paramList const& _paramList, RequestAttributes& att); }; diff --git a/src/rm/RequestManagerChown.cc b/src/rm/RequestManagerChown.cc index 6f311dffb3..0364ea0bc3 100644 --- a/src/rm/RequestManagerChown.cc +++ b/src/rm/RequestManagerChown.cc @@ -32,11 +32,6 @@ void RequestManagerChown::request_execute(xmlrpc_c::paramList const& paramList, string nuname; string ngname; - // TODO: Move these to constructor? - Nebula& nd = Nebula::instance(); - GroupPool * gpool = nd.get_gpool(); - UserPool * upool = nd.get_upool(); - PoolObjectSQL * object; if ( basic_authorization(oid, att) == false ) @@ -123,10 +118,6 @@ void UserChown::request_execute(xmlrpc_c::paramList const& paramList, string ngname; - Nebula& nd = Nebula::instance(); - GroupPool * gpool = nd.get_gpool(); - UserPool * upool = static_cast(pool); - User * user; Group * group;