Richard Marian Thomaiyar | 9f630d9 | 2018-05-24 10:49:10 +0530 | [diff] [blame] | 1 | /* |
| 2 | // Copyright (c) 2018 Intel Corporation |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | */ |
| 16 | #pragma once |
Patrick Williams | 9638afb | 2021-02-22 17:16:24 -0600 | [diff] [blame] | 17 | #include "users.hpp" |
| 18 | |
Nan Zhou | 49c8136 | 2022-10-25 00:07:08 +0000 | [diff] [blame] | 19 | #include <boost/process/child.hpp> |
| 20 | #include <boost/process/io.hpp> |
| 21 | #include <phosphor-logging/elog-errors.hpp> |
| 22 | #include <phosphor-logging/elog.hpp> |
| 23 | #include <phosphor-logging/log.hpp> |
Richard Marian Thomaiyar | 9f630d9 | 2018-05-24 10:49:10 +0530 | [diff] [blame] | 24 | #include <sdbusplus/bus.hpp> |
| 25 | #include <sdbusplus/server/object.hpp> |
Nan Zhou | 49c8136 | 2022-10-25 00:07:08 +0000 | [diff] [blame] | 26 | #include <xyz/openbmc_project/Common/error.hpp> |
Richard Marian Thomaiyar | 9164fd9 | 2018-06-13 16:51:00 +0530 | [diff] [blame] | 27 | #include <xyz/openbmc_project/User/AccountPolicy/server.hpp> |
Patrick Williams | 9638afb | 2021-02-22 17:16:24 -0600 | [diff] [blame] | 28 | #include <xyz/openbmc_project/User/Manager/server.hpp> |
| 29 | |
Nan Zhou | e47c09d | 2022-10-25 00:06:41 +0000 | [diff] [blame] | 30 | #include <span> |
| 31 | #include <string> |
Richard Marian Thomaiyar | 9f630d9 | 2018-05-24 10:49:10 +0530 | [diff] [blame] | 32 | #include <unordered_map> |
Ratan Gupta | aeaf941 | 2019-02-11 04:41:52 -0600 | [diff] [blame] | 33 | #include <variant> |
Nan Zhou | e47c09d | 2022-10-25 00:06:41 +0000 | [diff] [blame] | 34 | #include <vector> |
Richard Marian Thomaiyar | 9f630d9 | 2018-05-24 10:49:10 +0530 | [diff] [blame] | 35 | |
| 36 | namespace phosphor |
| 37 | { |
| 38 | namespace user |
| 39 | { |
| 40 | |
Nan Zhou | 49c8136 | 2022-10-25 00:07:08 +0000 | [diff] [blame] | 41 | inline constexpr size_t ipmiMaxUsers = 15; |
| 42 | inline constexpr size_t maxSystemUsers = 30; |
| 43 | |
Richard Marian Thomaiyar | 9f630d9 | 2018-05-24 10:49:10 +0530 | [diff] [blame] | 44 | using UserMgrIface = sdbusplus::xyz::openbmc_project::User::server::Manager; |
| 45 | using UserSSHLists = |
| 46 | std::pair<std::vector<std::string>, std::vector<std::string>>; |
Richard Marian Thomaiyar | 9164fd9 | 2018-06-13 16:51:00 +0530 | [diff] [blame] | 47 | using AccountPolicyIface = |
| 48 | sdbusplus::xyz::openbmc_project::User::server::AccountPolicy; |
| 49 | |
Patrick Williams | b3ef4e1 | 2022-07-22 19:26:55 -0500 | [diff] [blame] | 50 | using Ifaces = sdbusplus::server::object_t<UserMgrIface, AccountPolicyIface>; |
Ratan Gupta | 1af1223 | 2018-11-03 00:35:38 +0530 | [diff] [blame] | 51 | |
Ratan Gupta | aeaf941 | 2019-02-11 04:41:52 -0600 | [diff] [blame] | 52 | using Privilege = std::string; |
| 53 | using GroupList = std::vector<std::string>; |
| 54 | using UserEnabled = bool; |
| 55 | using PropertyName = std::string; |
Ravi Teja | 5fe724a | 2019-05-07 05:14:42 -0500 | [diff] [blame] | 56 | using ServiceEnabled = bool; |
Ratan Gupta | aeaf941 | 2019-02-11 04:41:52 -0600 | [diff] [blame] | 57 | |
| 58 | using UserInfo = std::variant<Privilege, GroupList, UserEnabled>; |
| 59 | using UserInfoMap = std::map<PropertyName, UserInfo>; |
| 60 | |
| 61 | using DbusUserObjPath = sdbusplus::message::object_path; |
| 62 | |
Patrick Williams | fdf0937 | 2020-05-13 18:01:45 -0500 | [diff] [blame] | 63 | using DbusUserPropVariant = std::variant<Privilege, ServiceEnabled>; |
Ratan Gupta | aeaf941 | 2019-02-11 04:41:52 -0600 | [diff] [blame] | 64 | |
| 65 | using DbusUserObjProperties = |
| 66 | std::vector<std::pair<PropertyName, DbusUserPropVariant>>; |
| 67 | |
| 68 | using Interface = std::string; |
| 69 | |
| 70 | using DbusUserObjValue = std::map<Interface, DbusUserObjProperties>; |
| 71 | |
| 72 | using DbusUserObj = std::map<DbusUserObjPath, DbusUserObjValue>; |
| 73 | |
Nan Zhou | e47c09d | 2022-10-25 00:06:41 +0000 | [diff] [blame] | 74 | std::string getCSVFromVector(std::span<const std::string> vec); |
| 75 | |
Nan Zhou | 332fb9d | 2022-10-25 00:07:03 +0000 | [diff] [blame] | 76 | bool removeStringFromCSV(std::string& csvStr, const std::string& delStr); |
| 77 | |
Nan Zhou | 8a11d99 | 2022-10-25 00:07:06 +0000 | [diff] [blame] | 78 | template <typename... ArgTypes> |
Nan Zhou | 49c8136 | 2022-10-25 00:07:08 +0000 | [diff] [blame] | 79 | std::vector<std::string> executeCmd(const char* path, ArgTypes&&... tArgs) |
| 80 | { |
| 81 | std::vector<std::string> stdOutput; |
| 82 | boost::process::ipstream stdOutStream; |
| 83 | boost::process::child execProg(path, const_cast<char*>(tArgs)..., |
| 84 | boost::process::std_out > stdOutStream); |
| 85 | std::string stdOutLine; |
| 86 | |
| 87 | while (stdOutStream && std::getline(stdOutStream, stdOutLine) && |
| 88 | !stdOutLine.empty()) |
| 89 | { |
| 90 | stdOutput.emplace_back(stdOutLine); |
| 91 | } |
| 92 | |
| 93 | execProg.wait(); |
| 94 | |
| 95 | int retCode = execProg.exit_code(); |
| 96 | if (retCode) |
| 97 | { |
| 98 | phosphor::logging::log<phosphor::logging::level::ERR>( |
| 99 | "Command execution failed", |
| 100 | phosphor::logging::entry("PATH=%s", path), |
| 101 | phosphor::logging::entry("RETURN_CODE=%d", retCode)); |
| 102 | phosphor::logging::elog< |
| 103 | sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure>(); |
| 104 | } |
| 105 | |
| 106 | return stdOutput; |
| 107 | } |
Nan Zhou | 8a11d99 | 2022-10-25 00:07:06 +0000 | [diff] [blame] | 108 | |
Richard Marian Thomaiyar | 9f630d9 | 2018-05-24 10:49:10 +0530 | [diff] [blame] | 109 | /** @class UserMgr |
| 110 | * @brief Responsible for managing user accounts over the D-Bus interface. |
| 111 | */ |
Ratan Gupta | 1af1223 | 2018-11-03 00:35:38 +0530 | [diff] [blame] | 112 | class UserMgr : public Ifaces |
Richard Marian Thomaiyar | 9f630d9 | 2018-05-24 10:49:10 +0530 | [diff] [blame] | 113 | { |
| 114 | public: |
| 115 | UserMgr() = delete; |
| 116 | ~UserMgr() = default; |
Patrick Williams | 9638afb | 2021-02-22 17:16:24 -0600 | [diff] [blame] | 117 | UserMgr(const UserMgr&) = delete; |
| 118 | UserMgr& operator=(const UserMgr&) = delete; |
| 119 | UserMgr(UserMgr&&) = delete; |
| 120 | UserMgr& operator=(UserMgr&&) = delete; |
Richard Marian Thomaiyar | 9f630d9 | 2018-05-24 10:49:10 +0530 | [diff] [blame] | 121 | |
| 122 | /** @brief Constructs UserMgr object. |
| 123 | * |
| 124 | * @param[in] bus - sdbusplus handler |
| 125 | * @param[in] path - D-Bus path |
| 126 | */ |
Patrick Williams | b3ef4e1 | 2022-07-22 19:26:55 -0500 | [diff] [blame] | 127 | UserMgr(sdbusplus::bus_t& bus, const char* path); |
Richard Marian Thomaiyar | 9f630d9 | 2018-05-24 10:49:10 +0530 | [diff] [blame] | 128 | |
| 129 | /** @brief create user method. |
| 130 | * This method creates a new user as requested |
| 131 | * |
| 132 | * @param[in] userName - Name of the user which has to be created |
| 133 | * @param[in] groupNames - Group names list, to which user has to be added. |
| 134 | * @param[in] priv - Privilege of the user. |
| 135 | * @param[in] enabled - State of the user enabled / disabled. |
| 136 | */ |
| 137 | void createUser(std::string userName, std::vector<std::string> groupNames, |
| 138 | std::string priv, bool enabled) override; |
| 139 | |
| 140 | /** @brief rename user method. |
| 141 | * This method renames the user as requested |
| 142 | * |
| 143 | * @param[in] userName - current name of the user |
| 144 | * @param[in] newUserName - new user name to which it has to be renamed. |
| 145 | */ |
| 146 | void renameUser(std::string userName, std::string newUserName) override; |
| 147 | |
| 148 | /** @brief delete user method. |
| 149 | * This method deletes the user as requested |
| 150 | * |
| 151 | * @param[in] userName - Name of the user which has to be deleted |
| 152 | */ |
| 153 | void deleteUser(std::string userName); |
| 154 | |
| 155 | /** @brief Update user groups & privilege. |
| 156 | * This method updates user groups & privilege |
| 157 | * |
| 158 | * @param[in] userName - user name, for which update is requested |
| 159 | * @param[in] groupName - Group to be updated.. |
| 160 | * @param[in] priv - Privilege to be updated. |
| 161 | */ |
Patrick Williams | 9638afb | 2021-02-22 17:16:24 -0600 | [diff] [blame] | 162 | void updateGroupsAndPriv(const std::string& userName, |
| 163 | const std::vector<std::string>& groups, |
| 164 | const std::string& priv); |
Richard Marian Thomaiyar | 9f630d9 | 2018-05-24 10:49:10 +0530 | [diff] [blame] | 165 | |
| 166 | /** @brief Update user enabled state. |
| 167 | * This method enables / disables user |
| 168 | * |
| 169 | * @param[in] userName - user name, for which update is requested |
| 170 | * @param[in] enabled - enable / disable the user |
| 171 | */ |
Patrick Williams | 9638afb | 2021-02-22 17:16:24 -0600 | [diff] [blame] | 172 | void userEnable(const std::string& userName, bool enabled); |
Richard Marian Thomaiyar | 9f630d9 | 2018-05-24 10:49:10 +0530 | [diff] [blame] | 173 | |
Richard Marian Thomaiyar | 9164fd9 | 2018-06-13 16:51:00 +0530 | [diff] [blame] | 174 | /** @brief update minimum password length requirement |
| 175 | * |
| 176 | * @param[in] val - minimum password length |
| 177 | * @return - minimum password length |
| 178 | */ |
| 179 | uint8_t minPasswordLength(uint8_t val) override; |
| 180 | |
| 181 | /** @brief update old password history count |
| 182 | * |
| 183 | * @param[in] val - number of times old passwords has to be avoided |
| 184 | * @return - number of times old password has to be avoided |
| 185 | */ |
| 186 | uint8_t rememberOldPasswordTimes(uint8_t val) override; |
| 187 | |
| 188 | /** @brief update maximum number of failed login attempt before locked |
| 189 | * out. |
| 190 | * |
| 191 | * @param[in] val - number of allowed attempt |
| 192 | * @return - number of allowed attempt |
| 193 | */ |
| 194 | uint16_t maxLoginAttemptBeforeLockout(uint16_t val) override; |
| 195 | |
| 196 | /** @brief update timeout to unlock the account |
| 197 | * |
| 198 | * @param[in] val - value in seconds |
| 199 | * @return - value in seconds |
| 200 | */ |
| 201 | uint32_t accountUnlockTimeout(uint32_t val) override; |
| 202 | |
Richard Marian Thomaiyar | c704519 | 2018-06-13 16:51:00 +0530 | [diff] [blame] | 203 | /** @brief lists user locked state for failed attempt |
| 204 | * |
| 205 | * @param[in] - user name |
| 206 | * @return - true / false indicating user locked / un-locked |
| 207 | **/ |
Patrick Williams | 9638afb | 2021-02-22 17:16:24 -0600 | [diff] [blame] | 208 | virtual bool userLockedForFailedAttempt(const std::string& userName); |
Richard Marian Thomaiyar | c704519 | 2018-06-13 16:51:00 +0530 | [diff] [blame] | 209 | |
| 210 | /** @brief lists user locked state for failed attempt |
| 211 | * |
| 212 | * @param[in]: user name |
| 213 | * @param[in]: value - false -unlock user account, true - no action taken |
| 214 | **/ |
Patrick Williams | 9638afb | 2021-02-22 17:16:24 -0600 | [diff] [blame] | 215 | bool userLockedForFailedAttempt(const std::string& userName, |
| 216 | const bool& value); |
Richard Marian Thomaiyar | c704519 | 2018-06-13 16:51:00 +0530 | [diff] [blame] | 217 | |
Joseph Reynolds | 3ab6cc2 | 2020-03-03 14:09:03 -0600 | [diff] [blame] | 218 | /** @brief shows if the user's password is expired |
| 219 | * |
| 220 | * @param[in]: user name |
| 221 | * @return - true / false indicating user password expired |
| 222 | **/ |
Patrick Williams | 9638afb | 2021-02-22 17:16:24 -0600 | [diff] [blame] | 223 | virtual bool userPasswordExpired(const std::string& userName); |
Joseph Reynolds | 3ab6cc2 | 2020-03-03 14:09:03 -0600 | [diff] [blame] | 224 | |
Ratan Gupta | aeaf941 | 2019-02-11 04:41:52 -0600 | [diff] [blame] | 225 | /** @brief returns user info |
| 226 | * Checks if user is local user, then returns map of properties of user. |
| 227 | * like user privilege, list of user groups, user enabled state and user |
| 228 | * locked state. If its not local user, then it checks if its a ldap user, |
| 229 | * then it gets the privilege mapping of the LDAP group. |
| 230 | * |
| 231 | * @param[in] - user name |
| 232 | * @return - map of user properties |
| 233 | **/ |
| 234 | UserInfoMap getUserInfo(std::string userName) override; |
| 235 | |
Nan Zhou | 49c8136 | 2022-10-25 00:07:08 +0000 | [diff] [blame] | 236 | /** @brief get IPMI user count |
| 237 | * method to get IPMI user count |
| 238 | * |
| 239 | * @return - returns user count |
| 240 | */ |
| 241 | virtual size_t getIpmiUsersCount(void); |
| 242 | |
Nan Zhou | e48085d | 2022-10-25 00:07:04 +0000 | [diff] [blame] | 243 | protected: |
| 244 | /** @brief get pam argument value |
| 245 | * method to get argument value from pam configuration |
| 246 | * |
| 247 | * @param[in] moduleName - name of the module from where arg has to be read |
| 248 | * @param[in] argName - argument name |
| 249 | * @param[out] argValue - argument value |
| 250 | * |
| 251 | * @return 0 - success state of the function |
| 252 | */ |
| 253 | int getPamModuleArgValue(const std::string& moduleName, |
| 254 | const std::string& argName, std::string& argValue); |
| 255 | |
| 256 | /** @brief set pam argument value |
| 257 | * method to set argument value in pam configuration |
| 258 | * |
| 259 | * @param[in] moduleName - name of the module in which argument value has |
| 260 | * to be set |
| 261 | * @param[in] argName - argument name |
| 262 | * @param[out] argValue - argument value |
| 263 | * |
| 264 | * @return 0 - success state of the function |
| 265 | */ |
| 266 | int setPamModuleArgValue(const std::string& moduleName, |
| 267 | const std::string& argName, |
| 268 | const std::string& argValue); |
| 269 | |
Nan Zhou | 8a11d99 | 2022-10-25 00:07:06 +0000 | [diff] [blame] | 270 | /** @brief check for user presence |
| 271 | * method to check for user existence |
| 272 | * |
| 273 | * @param[in] userName - name of the user |
| 274 | * @return -true if user exists and false if not. |
| 275 | */ |
| 276 | bool isUserExist(const std::string& userName); |
| 277 | |
Nan Zhou | 49c8136 | 2022-10-25 00:07:08 +0000 | [diff] [blame] | 278 | size_t getNonIpmiUsersCount(); |
| 279 | |
Nan Zhou | 8a11d99 | 2022-10-25 00:07:06 +0000 | [diff] [blame] | 280 | /** @brief check user exists |
| 281 | * method to check whether user exist, and throw if not. |
| 282 | * |
| 283 | * @param[in] userName - name of the user |
| 284 | */ |
| 285 | void throwForUserDoesNotExist(const std::string& userName); |
| 286 | |
| 287 | /** @brief check user does not exist |
| 288 | * method to check whether does not exist, and throw if exists. |
| 289 | * |
| 290 | * @param[in] userName - name of the user |
| 291 | */ |
| 292 | void throwForUserExists(const std::string& userName); |
| 293 | |
Nan Zhou | 40e4497 | 2022-10-25 00:07:07 +0000 | [diff] [blame] | 294 | /** @brief check user name constraints |
| 295 | * method to check user name constraints and throw if failed. |
| 296 | * |
| 297 | * @param[in] userName - name of the user |
| 298 | * @param[in] groupNames - user groups |
| 299 | */ |
| 300 | void |
| 301 | throwForUserNameConstraints(const std::string& userName, |
| 302 | const std::vector<std::string>& groupNames); |
| 303 | |
Nan Zhou | 49c8136 | 2022-10-25 00:07:08 +0000 | [diff] [blame] | 304 | /** @brief check group user count |
| 305 | * method to check max group user count, and throw if limit reached |
| 306 | * |
| 307 | * @param[in] groupNames - group name |
| 308 | */ |
| 309 | void throwForMaxGrpUserCount(const std::vector<std::string>& groupNames); |
| 310 | |
| 311 | virtual void executeUserAdd(const char* userName, const char* groups, |
| 312 | bool sshRequested, bool enabled); |
| 313 | |
| 314 | virtual void executeUserDelete(const char* userName); |
| 315 | |
Nan Zhou | 589aeb4 | 2022-10-25 00:07:09 +0000 | [diff] [blame^] | 316 | /** @brief check for valid privielge |
| 317 | * method to check valid privilege, and throw if invalid |
| 318 | * |
| 319 | * @param[in] priv - privilege of the user |
| 320 | */ |
| 321 | void throwForInvalidPrivilege(const std::string& priv); |
| 322 | |
Richard Marian Thomaiyar | 9f630d9 | 2018-05-24 10:49:10 +0530 | [diff] [blame] | 323 | private: |
| 324 | /** @brief sdbusplus handler */ |
Patrick Williams | b3ef4e1 | 2022-07-22 19:26:55 -0500 | [diff] [blame] | 325 | sdbusplus::bus_t& bus; |
Richard Marian Thomaiyar | 9f630d9 | 2018-05-24 10:49:10 +0530 | [diff] [blame] | 326 | |
| 327 | /** @brief object path */ |
| 328 | const std::string path; |
| 329 | |
| 330 | /** @brief privilege manager container */ |
| 331 | std::vector<std::string> privMgr = {"priv-admin", "priv-operator", |
Richard Marian Thomaiyar | 32be296 | 2019-11-08 17:21:53 +0530 | [diff] [blame] | 332 | "priv-user", "priv-noaccess"}; |
Richard Marian Thomaiyar | 9f630d9 | 2018-05-24 10:49:10 +0530 | [diff] [blame] | 333 | |
| 334 | /** @brief groups manager container */ |
| 335 | std::vector<std::string> groupsMgr = {"web", "redfish", "ipmi", "ssh"}; |
| 336 | |
| 337 | /** @brief map container to hold users object */ |
| 338 | using UserName = std::string; |
| 339 | std::unordered_map<UserName, std::unique_ptr<phosphor::user::Users>> |
| 340 | usersList; |
| 341 | |
| 342 | /** @brief get users in group |
| 343 | * method to get group user list |
| 344 | * |
| 345 | * @param[in] groupName - group name |
| 346 | * |
| 347 | * @return userList - list of users in the group. |
| 348 | */ |
Patrick Williams | 9638afb | 2021-02-22 17:16:24 -0600 | [diff] [blame] | 349 | std::vector<std::string> getUsersInGroup(const std::string& groupName); |
Richard Marian Thomaiyar | 9f630d9 | 2018-05-24 10:49:10 +0530 | [diff] [blame] | 350 | |
| 351 | /** @brief get user & SSH users list |
| 352 | * method to get the users and ssh users list. |
| 353 | * |
| 354 | *@return - vector of User & SSH user lists |
| 355 | */ |
| 356 | UserSSHLists getUserAndSshGrpList(void); |
| 357 | |
Richard Marian Thomaiyar | 9f630d9 | 2018-05-24 10:49:10 +0530 | [diff] [blame] | 358 | /** @brief check for valid groups |
| 359 | * method to check valid groups, and throw if invalid |
| 360 | * |
| 361 | * @param[in] groupNames - user groups |
| 362 | */ |
Patrick Williams | 9638afb | 2021-02-22 17:16:24 -0600 | [diff] [blame] | 363 | void throwForInvalidGroups(const std::vector<std::string>& groupName); |
Richard Marian Thomaiyar | 9f630d9 | 2018-05-24 10:49:10 +0530 | [diff] [blame] | 364 | |
| 365 | /** @brief get user enabled state |
| 366 | * method to get user enabled state. |
| 367 | * |
| 368 | * @param[in] userName - name of the user |
| 369 | * @return - user enabled status (true/false) |
| 370 | */ |
Patrick Williams | 9638afb | 2021-02-22 17:16:24 -0600 | [diff] [blame] | 371 | bool isUserEnabled(const std::string& userName); |
Richard Marian Thomaiyar | 9f630d9 | 2018-05-24 10:49:10 +0530 | [diff] [blame] | 372 | |
| 373 | /** @brief initialize the user manager objects |
| 374 | * method to initialize the user manager objects accordingly |
| 375 | * |
| 376 | */ |
| 377 | void initUserObjects(void); |
| 378 | |
Ratan Gupta | aeaf941 | 2019-02-11 04:41:52 -0600 | [diff] [blame] | 379 | /** @brief get service name |
| 380 | * method to get dbus service name |
| 381 | * |
| 382 | * @param[in] path - object path |
| 383 | * @param[in] intf - interface |
| 384 | * @return - service name |
| 385 | */ |
Patrick Williams | 9638afb | 2021-02-22 17:16:24 -0600 | [diff] [blame] | 386 | std::string getServiceName(std::string&& path, std::string&& intf); |
Ratan Gupta | aeaf941 | 2019-02-11 04:41:52 -0600 | [diff] [blame] | 387 | |
raviteja-b | 8cc4405 | 2019-02-27 23:29:36 -0600 | [diff] [blame] | 388 | protected: |
Ratan Gupta | aeaf941 | 2019-02-11 04:41:52 -0600 | [diff] [blame] | 389 | /** @brief get LDAP group name |
| 390 | * method to get LDAP group name for the given LDAP user |
| 391 | * |
| 392 | * @param[in] - userName |
| 393 | * @return - group name |
| 394 | */ |
Patrick Williams | 9638afb | 2021-02-22 17:16:24 -0600 | [diff] [blame] | 395 | virtual std::string getLdapGroupName(const std::string& userName); |
Ratan Gupta | aeaf941 | 2019-02-11 04:41:52 -0600 | [diff] [blame] | 396 | |
| 397 | /** @brief get privilege mapper object |
| 398 | * method to get dbus privilege mapper object |
| 399 | * |
| 400 | * @return - map of user object |
| 401 | */ |
raviteja-b | 8cc4405 | 2019-02-27 23:29:36 -0600 | [diff] [blame] | 402 | virtual DbusUserObj getPrivilegeMapperObject(void); |
| 403 | |
| 404 | friend class TestUserMgr; |
Nan Zhou | e48085d | 2022-10-25 00:07:04 +0000 | [diff] [blame] | 405 | |
| 406 | std::string pamPasswdConfigFile; |
| 407 | std::string pamAuthConfigFile; |
Richard Marian Thomaiyar | 9f630d9 | 2018-05-24 10:49:10 +0530 | [diff] [blame] | 408 | }; |
| 409 | |
| 410 | } // namespace user |
| 411 | } // namespace phosphor |