Skip to content

Allow all variations for allow/deny users,groups in sshd_config #869

@bagajjal

Description

@bagajjal

As of now sshd_config accepts allow/deny users, groups in this format
user?domain
group?domain

code snippet in servconf.c -
void
parse_server_config()
{

#ifdef WINDOWS
/* TODO - Refactor this into a platform specific post-read config processing routine.
* TODO - support all forms of username, groupname.
* a) domain\groupname
* b) domain\groupname@hostip
* c) full_domain_name\groupname
* d) full_domain_name\groupname@hostip
* e) user@domain
* f) domain\user
* g) fulldomain\user
* h) user@domain@hostip
/
/
convert the users, user groups to lower case */
for(int i = 0; i < options->num_allow_users; i++)
lowercase(options->allow_users[i]);

for (int i = 0; i < options->num_deny_users; i++)
	lowercase(options->deny_users[i]);

for (int i = 0; i < options->num_allow_groups; i++)
	lowercase(options->allow_groups[i]);

for (int i = 0; i < options->num_deny_groups; i++)
	lowercase(options->deny_groups[i]);

#endif // WINDOWS
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions