summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2018-02-19 12:58:28 +0100
committerMichael Brown2018-02-19 12:58:28 +0100
commit6737a8795f20c21bb48d410c2d9266f8c9c11bbc (patch)
treed9a80f5df3fa916b6db65a01453acc921888dd8a /src/include
parent[intel] Work around broken reset mechanism in i219 devices (diff)
downloadipxe-6737a8795f20c21bb48d410c2d9266f8c9c11bbc.tar.gz
ipxe-6737a8795f20c21bb48d410c2d9266f8c9c11bbc.tar.xz
ipxe-6737a8795f20c21bb48d410c2d9266f8c9c11bbc.zip
[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>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ipxe/netbios.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/include/ipxe/netbios.h b/src/include/ipxe/netbios.h
new file mode 100644
index 00000000..c1155255
--- /dev/null
+++ b/src/include/ipxe/netbios.h
@@ -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 */