|
Packit |
56e0ee |
/*
|
|
Packit |
56e0ee |
|
|
Packit |
56e0ee |
Copyright 1988, 1998 The Open Group
|
|
Packit |
56e0ee |
|
|
Packit |
56e0ee |
Permission to use, copy, modify, distribute, and sell this software and its
|
|
Packit |
56e0ee |
documentation for any purpose is hereby granted without fee, provided that
|
|
Packit |
56e0ee |
the above copyright notice appear in all copies and that both that
|
|
Packit |
56e0ee |
copyright notice and this permission notice appear in supporting
|
|
Packit |
56e0ee |
documentation.
|
|
Packit |
56e0ee |
|
|
Packit |
56e0ee |
The above copyright notice and this permission notice shall be included in
|
|
Packit |
56e0ee |
all copies or substantial portions of the Software.
|
|
Packit |
56e0ee |
|
|
Packit |
56e0ee |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
Packit |
56e0ee |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
Packit |
56e0ee |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
Packit |
56e0ee |
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
Packit |
56e0ee |
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
Packit |
56e0ee |
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
Packit |
56e0ee |
|
|
Packit |
56e0ee |
Except as contained in this notice, the name of The Open Group shall not be
|
|
Packit |
56e0ee |
used in advertising or otherwise to promote the sale, use or other dealings
|
|
Packit |
56e0ee |
in this Software without prior written authorization from The Open Group.
|
|
Packit |
56e0ee |
|
|
Packit |
56e0ee |
*/
|
|
Packit |
56e0ee |
|
|
Packit |
56e0ee |
#ifdef HAVE_CONFIG_H
|
|
Packit |
56e0ee |
#include <config.h>
|
|
Packit |
56e0ee |
#endif
|
|
Packit |
56e0ee |
#include <X11/Xauth.h>
|
|
Packit |
56e0ee |
#include <X11/Xos.h>
|
|
Packit |
56e0ee |
|
|
Packit |
56e0ee |
int
|
|
Packit |
56e0ee |
XauUnlockAuth (
|
|
Packit |
56e0ee |
_Xconst char *file_name)
|
|
Packit |
56e0ee |
{
|
|
Packit |
56e0ee |
#ifndef WIN32
|
|
Packit |
56e0ee |
char creat_name[1025];
|
|
Packit |
56e0ee |
#endif
|
|
Packit |
56e0ee |
char link_name[1025];
|
|
Packit |
56e0ee |
|
|
Packit |
56e0ee |
if (strlen (file_name) > 1022)
|
|
Packit |
56e0ee |
return 0;
|
|
Packit |
56e0ee |
#ifndef WIN32
|
|
Packit |
56e0ee |
snprintf (creat_name, sizeof(creat_name), "%s-c", file_name);
|
|
Packit |
56e0ee |
#endif
|
|
Packit |
56e0ee |
snprintf (link_name, sizeof(link_name), "%s-l", file_name);
|
|
Packit |
56e0ee |
/*
|
|
Packit |
56e0ee |
* I think this is the correct order
|
|
Packit |
56e0ee |
*/
|
|
Packit |
56e0ee |
#ifndef WIN32
|
|
Packit |
56e0ee |
(void) remove (creat_name);
|
|
Packit |
56e0ee |
#endif
|
|
Packit |
56e0ee |
(void) remove (link_name);
|
|
Packit |
56e0ee |
|
|
Packit |
56e0ee |
return 1;
|
|
Packit |
56e0ee |
}
|