3
Copyright 1988, 1998 The Open Group
5
Permission to use, copy, modify, distribute, and sell this software and its
6
documentation for any purpose is hereby granted without fee, provided that
7
the above copyright notice appear in all copies and that both that
8
copyright notice and this permission notice appear in supporting
11
The above copyright notice and this permission notice shall be included
12
in all copies or substantial portions of the Software.
14
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
18
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20
OTHER DEALINGS IN THE SOFTWARE.
22
Except as contained in this notice, the name of The Open Group shall
23
not be used in advertising or otherwise to promote the sale, use or
24
other dealings in this Software without prior written authorization
30
* xdm - display manager daemon
31
* Author: Keith Packard, MIT X Consortium
35
* generate SecureRPC authorization records
40
#include <rpc/key_prot.h>
48
SecureRPCInitAuth (unsigned short name_len, char *name)
54
unsigned short namelen,
57
char key[MAXNETNAMELEN+1];
60
new = (Xauth *) malloc (sizeof *new);
63
new->family = FamilyWild;
64
new->address_length = 0;
66
new->number_length = 0;
70
Debug ("System netname %s\n", key);
71
new->data_length = strlen(key);
72
new->data = (char *) malloc (new->data_length);
78
new->name = (char *) malloc (namelen);
81
free ((char *) new->data);
85
memmove( new->name, name, namelen);
86
new->name_length = namelen;
87
memmove( new->data, key, new->data_length);