mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
Add static, and assert that we will never overflow the static fstring
in pdb_encode_acct_ctrl() (All current callers are fine) Andrew Bartlett
This commit is contained in:
parent
25a09004e8
commit
01be89eb43
@ -412,7 +412,7 @@ NTSTATUS pdb_free_sam(SAM_ACCOUNT **user)
|
||||
* SSS
|
||||
***************************************************************************/
|
||||
|
||||
NTSTATUS pdb_set_sam_sids(SAM_ACCOUNT *account_data, const struct passwd *pwd)
|
||||
static NTSTATUS pdb_set_sam_sids(SAM_ACCOUNT *account_data, const struct passwd *pwd)
|
||||
{
|
||||
const char *guest_account = lp_guestaccount();
|
||||
GROUP_MAP map;
|
||||
@ -475,6 +475,9 @@ NTSTATUS pdb_set_sam_sids(SAM_ACCOUNT *account_data, const struct passwd *pwd)
|
||||
char *pdb_encode_acct_ctrl(uint16 acct_ctrl, size_t length)
|
||||
{
|
||||
static fstring acct_str;
|
||||
|
||||
SMB_ASSERT(length <= sizeof(acct_str));
|
||||
|
||||
size_t i = 0;
|
||||
|
||||
acct_str[i++] = '[';
|
||||
|
Loading…
x
Reference in New Issue
Block a user