mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
source3/lib: Properly log the change in capability
We used to log the following message for both adding and dropping capability: DBG_INFO("added capability %d\n", capability); For better clarity indicate the change as "added" or "dropped" based on available functional arguments. Signed-off-by: Anoop C S <anoopcs@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Autobuild-User(master): Anoop C S <anoopcs@samba.org> Autobuild-Date(master): Sat Jan 20 18:43:10 UTC 2024 on atb-devel-224
This commit is contained in:
parent
201edcb5c6
commit
45962d416f
@ -628,12 +628,14 @@ static bool set_process_capability(enum smbd_capability capability,
|
||||
cap_set_flag(cap, CAP_INHERITABLE, num_cap_vals, cap_vals, CAP_CLEAR);
|
||||
|
||||
if (cap_set_proc(cap) == -1) {
|
||||
DBG_ERR("adding capability %d: cap_set_proc failed: %s\n",
|
||||
DBG_ERR("%s capability %d: cap_set_proc failed: %s\n",
|
||||
enable ? "adding" : "dropping",
|
||||
capability, strerror(errno));
|
||||
cap_free(cap);
|
||||
return False;
|
||||
}
|
||||
DBG_INFO("added capability %d\n", capability);
|
||||
DBG_INFO("%s capability %d\n",
|
||||
enable ? "added" : "dropped", capability);
|
||||
|
||||
cap_free(cap);
|
||||
return True;
|
||||
|
Loading…
Reference in New Issue
Block a user