mirror of
https://github.com/ipxe/ipxe
synced 2025-12-21 20:40:25 +03:00
[http] Allow for domain names within NTLM user names
Allow a NetBIOS domain name to be specified within a URL using a syntax such as: http://domain%5Cusername:password@server/path Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
30
src/include/ipxe/netbios.h
Normal file
30
src/include/ipxe/netbios.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef _IPXE_NETBIOS_H
|
||||
#define _IPXE_NETBIOS_H
|
||||
|
||||
/** @file
|
||||
*
|
||||
* NetBIOS user names
|
||||
*
|
||||
*/
|
||||
|
||||
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
|
||||
extern const char * netbios_domain ( char **username );
|
||||
|
||||
/**
|
||||
* Restore NetBIOS [domain\]username
|
||||
*
|
||||
* @v domain NetBIOS domain name
|
||||
* @v username NetBIOS user name
|
||||
*
|
||||
* Restore the separator in a NetBIOS [domain\]username as split by
|
||||
* netbios_domain().
|
||||
*/
|
||||
static inline void netbios_domain_undo ( const char *domain, char *username ) {
|
||||
|
||||
/* Restore separator, if applicable */
|
||||
if ( domain )
|
||||
username[-1] = '\\';
|
||||
}
|
||||
|
||||
#endif /* _IPXE_NETBIOS_H */
|
||||
Reference in New Issue
Block a user