[uClinux-dev] pppd patch for latest uClinux-dist

Greg Ungerer gerg at snapgear.com
Wed Aug 24 20:41:39 EDT 2005


Hi David, Erwin,

David McCullough wrote:
> Jivin Erwin Authried lays it down ...
>>here's a small patch for pppd. It enables the code for lockfile support,
>>and removes the buggy script execution code.
> 
> 
> Not sure if this is a repeated message or not,  but this patch is
> applied to our tree,  will check with Gerg to make sure it's been
> included,

It is now in the next dist cut.

Seeya
Gerg



>>diff -bu user/pppd/pppd/main.c.orig user/pppd/pppd/main.c
>>--- user/pppd/pppd/main.c.orig	Thu Mar  3 07:39:07 2005
>>+++ user/pppd/pppd/main.c	Wed Aug 24 09:56:00 2005
>>@@ -627,7 +627,6 @@
>> 	    set_up_tty(pty_slave, 1);
>> 	}
>> 
>>-#ifndef EMBED
>> 	/*
>> 	 * Lock the device if we've been asked to.
>> 	 */
>>@@ -637,7 +636,6 @@
>> 		goto fail;
>> 	    locked = 1;
>> 	}
>>-#endif
>> 
>> 	/*
>> 	 * Open the serial device and set it up to be the ppp interface.
>>@@ -933,12 +931,13 @@
>> 	    close(pty_slave);
>> 	if (real_ttyfd >= 0)
>> 	    close_tty();
>>-#ifndef EMBED
>>+	
>> 	if (locked) {
>> 	    unlock();
>> 	    locked = 0;
>> 	}
>> 
>>+#ifndef EMBED
>> 	if (!demand) {
>> #endif
>> 	    if (pidfilename[0] != 0
>>@@ -1243,10 +1242,9 @@
>> 			fclose(in);
>> 	}
>>     }	
>>-#ifndef EMBED
>>+
>>     if (locked)
>> 	unlock();
>>-#endif
>> }
>> 
>> /*
>>@@ -1641,7 +1639,11 @@
>> 	    exit(1);
>> 	}
>> 	setgid(getgid());
>>-#ifdef EMBED
>>+
>>+	/* The following part is buggy because "program" is modified. 
>>+	 * It isn't required anymore because sh -c works.
>>+	 */
>>+#if 0
>>         /*
>>          *      On uClinux we don't have a full shell, just call chat
>>          *      program directly (obviously it can't be a sh script!).
>>diff -bu user/pppd/pppd/sys-linux.c.orig user/pppd/pppd/sys-linux.c
>>--- user/pppd/pppd/sys-linux.c.orig	Fri Jan 21 06:59:18 2005
>>+++ user/pppd/pppd/sys-linux.c	Wed Aug 24 09:56:00 2005
>>@@ -2324,7 +2324,6 @@
>> #endif
>> }
>> 
>>-#if 0
>> /********************************************************************
>>  * Code for locking/unlocking the serial device.
>>  * This code is derived from chat.c.
>>@@ -2468,7 +2467,6 @@
>> 	lock_file = NULL;
>>     }
>> }
>>-#endif
>> 
>> /********************************************************************
>>  *
> 
> 
>>_______________________________________________
>>uClinux-dev mailing list
>>uClinux-dev at uclinux.org
>>http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
>>This message was resent by uclinux-dev at uclinux.org
> 
> 

-- 
------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg at snapgear.com
SnapGear -- a CyberGuard Company            PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com



More information about the uClinux-dev mailing list