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

David McCullough davidm at snapgear.com
Wed Aug 24 06:45:56 EDT 2005


Jivin Erwin Authried lays it down ...
> Hi,
> 
> 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,

Cheers,
Davidm


> 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

-- 
David McCullough, davidm at cyberguard.com.au, Custom Embedded Solutions + Security
Ph:+61 734352815 Fx:+61 738913630 http://www.uCdot.org http://www.cyberguard.com



More information about the uClinux-dev mailing list