mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
MINOR: capabilities: rename program_name argument to progname
This commit prepares the usage of the global progname variable. prepare_caps_from_permitted_set() use progname value in warning messages. So, let's rename program_name argument to progname.
This commit is contained in:
parent
351ae5dbed
commit
ef154a49e1
@ -22,6 +22,6 @@ static inline int capget(cap_user_header_t hdrp, const cap_user_data_t datap)
|
|||||||
}
|
}
|
||||||
int prepare_caps_for_setuid(int from_uid, int to_uid);
|
int prepare_caps_for_setuid(int from_uid, int to_uid);
|
||||||
int finalize_caps_after_setuid(int from_uid, int to_uid);
|
int finalize_caps_after_setuid(int from_uid, int to_uid);
|
||||||
int prepare_caps_from_permitted_set(int from_uid, int to_uid, const char *program_name);
|
int prepare_caps_from_permitted_set(int from_uid, int to_uid, const char *progname);
|
||||||
|
|
||||||
#endif /* _HAPROXY_LINUXCAP_H */
|
#endif /* _HAPROXY_LINUXCAP_H */
|
||||||
|
@ -80,7 +80,7 @@ static uint32_t caplist;
|
|||||||
* LSTCHK_NETADM/LSTCHK_SYSADM is presented in global.last_checks and some
|
* LSTCHK_NETADM/LSTCHK_SYSADM is presented in global.last_checks and some
|
||||||
* failures are encountered.
|
* failures are encountered.
|
||||||
*/
|
*/
|
||||||
int prepare_caps_from_permitted_set(int from_uid, int to_uid, const char *program_name)
|
int prepare_caps_from_permitted_set(int from_uid, int to_uid, const char *progname)
|
||||||
{
|
{
|
||||||
/* _LINUX_CAPABILITY_U32S_1 = 1 and corresponds to version 1, which is three
|
/* _LINUX_CAPABILITY_U32S_1 = 1 and corresponds to version 1, which is three
|
||||||
* 32-bit integers set. So kernel in capset()/capget() will copy_from/to_user
|
* 32-bit integers set. So kernel in capset()/capget() will copy_from/to_user
|
||||||
@ -106,7 +106,7 @@ int prepare_caps_from_permitted_set(int from_uid, int to_uid, const char *progra
|
|||||||
if (global.last_checks & (LSTCHK_NETADM | LSTCHK_SYSADM))
|
if (global.last_checks & (LSTCHK_NETADM | LSTCHK_SYSADM))
|
||||||
ha_diag_warning("Failed to get process capabilities using capget(): %s. "
|
ha_diag_warning("Failed to get process capabilities using capget(): %s. "
|
||||||
"Can't use capabilities that might be set on %s binary "
|
"Can't use capabilities that might be set on %s binary "
|
||||||
"by administrator.\n", strerror(errno), program_name);
|
"by administrator.\n", strerror(errno), progname);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ int prepare_caps_from_permitted_set(int from_uid, int to_uid, const char *progra
|
|||||||
} else if (global.last_checks & (LSTCHK_NETADM|LSTCHK_SYSADM)) {
|
} else if (global.last_checks & (LSTCHK_NETADM|LSTCHK_SYSADM)) {
|
||||||
ha_diag_warning("Failed to put capabilities from caplist in %s "
|
ha_diag_warning("Failed to put capabilities from caplist in %s "
|
||||||
"process Effective capabilities set using capset(): %s\n",
|
"process Effective capabilities set using capset(): %s\n",
|
||||||
program_name, strerror(errno));
|
progname, strerror(errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user