=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/Attic/sock.c,v retrieving revision 1.5 retrieving revision 1.6 diff -c -r1.5 -r1.6 *** src/usr.bin/cvs/Attic/sock.c 2004/09/24 14:28:07 1.5 --- src/usr.bin/cvs/Attic/sock.c 2004/09/24 15:51:07 1.6 *************** *** 1,4 **** ! /* $OpenBSD: sock.c,v 1.5 2004/09/24 14:28:07 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: sock.c,v 1.6 2004/09/24 15:51:07 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 130,136 **** if (close(cvsd_sock) == -1) { cvs_log(LP_ERRNO, "failed to close local socket"); } ! if (unlink(cvsd_sock_path) == -1) cvs_log(LP_ERRNO, "failed to unlink local socket `%s'", cvsd_sock_path); } --- 130,138 ---- if (close(cvsd_sock) == -1) { cvs_log(LP_ERRNO, "failed to close local socket"); } ! if (seteuid(0) == -1) ! cvs_log(LP_ERRNO, "failed to regain privileges"); ! else if (unlink(cvsd_sock_path) == -1) cvs_log(LP_ERRNO, "failed to unlink local socket `%s'", cvsd_sock_path); }