Skip to content
Snippets Groups Projects
Commit dd0c0c12 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Restore AUTHOR and AUTHOR_ORG SMB header fields removed Apri-19-2019

Going to use these to store SAUCE "AUTHOR" and "GROUP" fields for files.
parent dde1904b
No related branches found
No related tags found
No related merge requests found
......@@ -168,6 +168,9 @@
#define SENDERTIME 0x0d /* authentication/connection time */
#define SENDERSERVER 0x0e /* server hostname that authenticated user */
#define SMB_AUTHOR 0x10
#define SMB_AUTHOR_ORG 0x16
#define REPLYTO 0x20 /* Name only */
#define REPLYTOAGENT 0x21
#define REPLYTONETTYPE 0x22
......@@ -597,6 +600,8 @@ typedef struct { /* Message or File */
*from_host, /* From host name */
*from_prot, /* From protocol (e.g. "Telnet", "NNTP", "HTTP", etc.) */
*from_port, /* From TCP/UDP port number */
*author, /* Author */
*author_org, /* Author's organization */
*replyto, /* Reply-to name */
*replyto_ext, /* Reply-to extension */
*replyto_list, /* Comma-separated list of mailboxes, RFC822-style */
......
......@@ -776,6 +776,12 @@ static void set_convenience_ptr(smbmsg_t* msg, uint16_t hfield_type, void* hfiel
case SENDERPORT:
msg->from_port=(char*)hfield_dat;
break;
case SMB_AUTHOR:
msg->author=(char*)hfield_dat;
break;
case SMB_AUTHOR_ORG:
msg->author_org=(char*)hfield_dat;
break;
case REPLYTO:
msg->replyto=(char*)hfield_dat;
break;
......@@ -926,6 +932,8 @@ static void clear_convenience_ptrs(smbmsg_t* msg)
msg->to_list=NULL;
memset(&msg->to_net,0,sizeof(net_t));
msg->author=NULL;
msg->author_org=NULL;
msg->cc_list=NULL;
msg->subj=NULL;
msg->summary=NULL;
......
......@@ -43,6 +43,9 @@ char* smb_hfieldtype(uint16_t type)
case SENDERTIME: return("SenderTime");
case SENDERSERVER: return("SenderServer");
case SMB_AUTHOR: return("Author");
case SMB_AUTHOR_ORG: return("AuthorOrg");
case REPLYTO: return("Reply-To"); /* RFC-compliant */
case REPLYTOAGENT: return("Reply-ToAgent");
case REPLYTONETTYPE: return("Reply-ToNetType");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment