Create an AbortProgram() function for getting out of
ppp immediately.
This commit is contained in:
parent
aad81d1ecf
commit
1afedc4b86
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/cvs2svn/branches/MP/; revision=33171
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: id.c,v 1.5 1997/12/27 19:23:12 brian Exp $
|
||||
* $Id: id.c,v 1.6 1998/01/21 02:15:16 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -61,7 +61,7 @@ ID0setuser(void)
|
||||
{
|
||||
if (seteuid(uid) == -1) {
|
||||
LogPrintf(LogERROR, "ID0setuser: Unable to seteuid!\n");
|
||||
Cleanup(EX_NOPERM);
|
||||
AbortProgram(EX_NOPERM);
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ ID0set0(void)
|
||||
{
|
||||
if (seteuid(euid) == -1) {
|
||||
LogPrintf(LogERROR, "ID0set0: Unable to seteuid!\n");
|
||||
Cleanup(EX_NOPERM);
|
||||
AbortProgram(EX_NOPERM);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: main.c,v 1.121.2.12 1998/02/07 22:22:43 brian Exp $
|
||||
* $Id: main.c,v 1.121.2.13 1998/02/08 11:05:01 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Add commands for traffic summary, version display, etc.
|
||||
@ -189,7 +189,12 @@ Cleanup(int excode)
|
||||
bundle_Close(SignalBundle, NULL);
|
||||
return;
|
||||
}
|
||||
AbortProgram(excode);
|
||||
}
|
||||
|
||||
void
|
||||
AbortProgram(int excode)
|
||||
{
|
||||
DropClient(1);
|
||||
ServerClose();
|
||||
ID0unlink(pid_filename);
|
||||
@ -206,7 +211,6 @@ Cleanup(int excode)
|
||||
TtyOldMode();
|
||||
link_Destroy(physical2link(SignalBundle->physical));
|
||||
LogClose();
|
||||
|
||||
exit(excode);
|
||||
}
|
||||
|
||||
@ -565,8 +569,9 @@ main(int argc, char **argv)
|
||||
DoLoop(bundle);
|
||||
while (mode & MODE_DEDICATED);
|
||||
|
||||
Cleanup(EX_DONE);
|
||||
return 0;
|
||||
AbortProgram(EX_NORMAL);
|
||||
|
||||
return EX_NORMAL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: main.h,v 1.9.2.1 1998/02/02 19:32:10 brian Exp $
|
||||
* $Id: main.h,v 1.9.2.2 1998/02/07 20:49:55 brian Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -25,6 +25,7 @@ extern int TermMode;
|
||||
extern int CleaningUp;
|
||||
|
||||
extern void Cleanup(int);
|
||||
extern void AbortProgram(int);
|
||||
extern void TtyTermMode(void);
|
||||
extern void PacketMode(struct bundle *, int);
|
||||
extern void TtyOldMode(void);
|
||||
|
Loading…
Reference in New Issue
Block a user