History log of /openbmc/phosphor-user-manager/users.cpp (Results 1 – 13 of 13)
Revision Date Author Comments
# e8edab57 06-Sep-2023 Denis Zlobin <zlobin.d.al@gmail.com>

Fix user account status for manually blocked users

User account status in web interface is displayed incorrectly
if account is disabled (or enabled) via ssh.

Test manually:
1. Create new user using

Fix user account status for manually blocked users

User account status in web interface is displayed incorrectly
if account is disabled (or enabled) via ssh.

Test manually:
1. Create new user using web interface
2. Change user account expiration date via ssh
chage -E 1970-01-01 <new user>
User account is blocked
3. Check user status in web interface.
Blocked user account status should be displayed as "Disabled".

Change-Id: I15e93a87653289b5ba76313895da0cf7e5dd2c7c
Signed-off-by: Denis Zlobin <zlobin.d.al@gmail.com>

show more ...


# 11ec666b 05-Jul-2022 Jiaqing Zhao <jiaqing.zhao@intel.com>

Switch to lg2 for logging

After enabling C++20, lg2 is preferred for logging. This patch replaces
all phosphor::logging::log calls to lg2 calls.

Tested:
Build pass.

Change-Id: Ic37bc36f43c2b3a1c61

Switch to lg2 for logging

After enabling C++20, lg2 is preferred for logging. This patch replaces
all phosphor::logging::log calls to lg2 calls.

Tested:
Build pass.

Change-Id: Ic37bc36f43c2b3a1c61b1328af95e3a41c8d6d40
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>

show more ...


# 6b6f2d80 24-Oct-2022 Nan Zhou <nanzhoumails@gmail.com>

userEnable: fix bug and add unit test

This commit adds unit tests for the |userEnable| function. To make it
happen, a new overload of |executeUserModify| is introduced. The idea
is the same as previ

userEnable: fix bug and add unit test

This commit adds unit tests for the |userEnable| function. To make it
happen, a new overload of |executeUserModify| is introduced. The idea
is the same as previous commits where we add sudo in unit tests.

Thanks to this unit test, this commit fixes an existing bug where the
corresponding user's |userEnabled| attribute isn't updated.

Tested: unit test passed

Coverage:
lines......: 81.3% (1918 of 2359 lines)
functions..: 93.9% (400 of 426 functions)
branches...: 32.0% (3029 of 9469 branches)

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I89752e5fcfc1aabb4090b0b2e8faf5f1b5ee5e76

show more ...


# fef63038 24-Oct-2022 Nan Zhou <nanzhoumails@gmail.com>

updateGroupsAndPriv: fix bugs and add tests

This commit adds a unit test for the |updateGroupsAndPriv| function.
Thanks to the test case, I found a bug that the exsting codes don't
updat the groups

updateGroupsAndPriv: fix bugs and add tests

This commit adds a unit test for the |updateGroupsAndPriv| function.
Thanks to the test case, I found a bug that the exsting codes don't
updat the groups and privilege of the user after updating.

Added several neccessary functions to add unit test and fix bugs.

Tested: unit test passed.

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: Ifcf88505f10b6bfdcca2de31a29ce055153463e8

show more ...


# b3ef4e1a 22-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I19e094a2a99893627dbb82b615f630b87ad90fdd

show more ...


# 224559b4 05-Apr-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: object: don't use 'bool' argument constructor

`sdbusplus::server::object_t` has long had an enum-based parameter for
signal action, but maintained a backwards compatible boolean mapping.

sdbusplus: object: don't use 'bool' argument constructor

`sdbusplus::server::object_t` has long had an enum-based parameter for
signal action, but maintained a backwards compatible boolean mapping.
It is time to remove this boolean to make it more observable which
actions are being used in applications. Map all `true` occurrences to
`action::defer_emit`.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I6de31883b9f6a9a3115ae232575dffbdf652e0bd

show more ...


# b01e2fe7 12-Dec-2021 P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>

Enable encoding object paths of User Name

Any string used to form a Dbus object path needs to be encoded.
This commit enables encoding the User Name before using it in the
Object pat

Enable encoding object paths of User Name

Any string used to form a Dbus object path needs to be encoded.
This commit enables encoding the User Name before using it in the
Object path.
This commit also replaces the old method of
std::filesystem::path(path).filename() with object_path.filename()
which correctly decodes and gets the User name from the Object
path.

Tested:
- busctl call xyz.openbmc_project.User.Manager
/xyz/openbmc_project/user xyz.openbmc_project.User.Manager
CreateUser sassb _test_6566 4 "ipmi" "redfish" "ssh" "web"
priv-admin true
- Successfully created /xyz/openbmc_project/user/_5ftest_5f6566
Object Path
- ipmitool user list 3
Displayed "_5ftest_5f6566" (Due to Absence of Decoding in
phosphor-host-ipmid)
With the changes in ipmid at https://gerrit.openbmc-project.xyz
/c/openbmc/phosphor-host-ipmid/+/49621 this name will be
correctly decoded to _test_6566.

- ipmitool user set name "_test_123"
- Successfully created /xyz/openbmc_project/user/_5ftest_5f123
Object Path
- ipmitool user list 3
Displayed the user _test_123 (Due to Absence of Decoding in
phosphor-host-ipmid)

- busctl call xyz.openbmc_project.User.Manager
/xyz/openbmc_project/user xyz.openbmc_project.User.Manager
RenameUser ss _test_6566 _test_7576
- Successfully created /xyz/openbmc_project/user/_5ftest_5f7576
Object Path
- ipmitool user list 3
Displayed "_5ftest_5f7576" (Due to Absence of Decoding in
phosphor-host-ipmid)

Signed-off-by: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>
Change-Id: If39bdc74b67fa1931ea451d3cb5befa77daee83c

show more ...


# 9638afb9 22-Feb-2021 Patrick Williams <patrick@stwcx.xyz>

clang-format-11: reformat

The .clang-format file here is an old version of the common one.
Upgrade to the latest and reformat.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz

clang-format-11: reformat

The .clang-format file here is an old version of the common one.
Upgrade to the latest and reformat.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I0d532aa88d650e9c7664e07abfc8c4fdf0dd3df4

show more ...


# 703131fa 28-Oct-2020 Gunnar Mills <gmills@us.ibm.com>

c++17: drop experimental::filesystem

Use std::filesystem, and drop support for building with experimental
under c++14.

Tested: Build the repo.
Change-Id: I4af0d9c034dbfef5a6

c++17: drop experimental::filesystem

Use std::filesystem, and drop support for building with experimental
under c++14.

Tested: Build the repo.
Change-Id: I4af0d9c034dbfef5a65153ba5447b86c961aebf1
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 3ab6cc28 03-Mar-2020 Joseph Reynolds <joseph-reynolds@charter.net>

Add UserPasswordExpired for local users

Adds a new UserPasswordExpired property to local User.Attributes which
represents if the account's password is expired and must be changed.
Th

Add UserPasswordExpired for local users

Adds a new UserPasswordExpired property to local User.Attributes which
represents if the account's password is expired and must be changed.
The value corresponds to the `chage` command.

Note this is distinct from UserLockedForFailedAttempt which represents
a locked account due to unsuccessful authentication atttempts.

Tested: Via busctl
- Checked local and LDAP users.
- Expired password via `passwd --expire USER`.
- Aged password via `chage USER`.
- Changed password via REST API and via the `passwd USER` command.

Signed-off-by: Joseph Reynolds <joseph-reynolds@charter.net>
Change-Id: I44585559509a422bb91c83a2a853c1a033594350

show more ...


# 1af12233 02-Nov-2018 Ratan Gupta <ratagupt@linux.vnet.ibm.com>

Fix emit interface added signal

Send the interface added signal once the object is fully
populated.

Here we are fixing this behaviour for two D-bus objects
1) Root Dbus obje

Fix emit interface added signal

Send the interface added signal once the object is fully
populated.

Here we are fixing this behaviour for two D-bus objects
1) Root Dbus object for user manager app.
2) Individual user D-bus object.

Before this fix was getting two signals for creation of user/manager
signal time=1562577322.850104 sender=:1.57 -> destination=(null destination) serial=346
path=/xyz/openbmc_project/user; interface=org.freedesktop.DBus.ObjectManager; member=InterfacesAdded
signal time=1562577322.897089 sender=:1.57 -> destination=(null destination) serial=347
path=/xyz/openbmc_project/user; interface=org.freedesktop.DBus.ObjectManager; member=InterfacesAdded

After the fix was getting single signal
signal time=1562577775.550198 sender=:1.156 -> destination=(null destination) serial=27
path=/xyz/openbmc_project/user; interface=org.freedesktop.DBus.ObjectManager; member=InterfacesAdded

Change-Id: I20ac168fe4fc7cd94cd2032db6ebc1623af5943d
Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>

show more ...


# c704519e 13-Jun-2018 Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>

Add support for user locked state property

Support for user locked state property using
pam_tally2 application added.

Change-Id: Ia77ff6527c15c93ac272110950e99fff56dcbaa6
Si

Add support for user locked state property

Support for user locked state property using
pam_tally2 application added.

Change-Id: Ia77ff6527c15c93ac272110950e99fff56dcbaa6
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# 9f630d9e 24-May-2018 Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>

Basic support for User manager service

Basic support for User Manager service methods
are implemented.

Change-Id: Id42432ec6dd421b99971268add931dcd70876f7c
Signed-off-by: Ri

Basic support for User manager service

Basic support for User Manager service methods
are implemented.

Change-Id: Id42432ec6dd421b99971268add931dcd70876f7c
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>

show more ...