Bash fails to build with -Werror=format-security

2013-12-04 Thread Ondrej Oprala
Hi, this patch fixes a minor issue of bash not building if compiled with 
-Werror=format-security

Thanks,
Ondrej
diff -up bash-4.2/print_cmd.c-orig bash-4.2/print_cmd.c
--- bash-4.2/print_cmd.c-orig	2013-12-04 13:04:35.0 +0100
+++ bash-4.2/print_cmd.c	2013-12-04 13:05:35.0 +0100
@@ -1394,7 +1394,7 @@ indent (amount)
   for (i = 0; amount > 0; amount--)
 indentation_string[i++] = ' ';
   indentation_string[i] = '\0';
-  cprintf (indentation_string);
+  cprintf ("%s", indentation_string);
 }
 
 static void


Re: shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied

2013-12-04 Thread allan . peda
On Thursday, July 17, 2008 11:42:57 PM UTC-4, Chet Ramey wrote:
> LynnOS wrote:
> > Thanks ,but after I export PWD,the problem doesn't go
> 
> As I explained previously, this is not a bash problem.  This is a
> problem with file permissions in the current working directory.
> 
> 
> Chet
> -- 
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
> 
> Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

I just saw this message upon logging in from OSX Lion to our Centos 5.5 and was 
starting to look at remote permissions.  Before I started to mess with things I 
tried from a freshly started console; no problem there.   So I logged out of 
the remote machine, changed to my home directory (simply typing "cd") and tried 
again.  No issue. 

I think I was in a local directory that was removed and recreated or something 
odd.

So FWIW.


Re: savannah.gnu.org bug tracker unused?

2013-12-04 Thread Linda Walsh



On 11/28/2013 10:00 AM, Chet Ramey wrote:


It's true. I rarely look there.  bug-bash is the preferred conduit for
bug reports.
> https://savannah.gnu.org/support/index.php?108163
>  probably invalid, pasting giant buffers into bash loses characters
> because of lack of pseudo tty flow control, not bash's fault.

Interestingly enough, a few enterprising people (Margarita Manterola,
Maximiliano Curia) put significant time into this and discovered a problem
with tty input queue management in the Linux kernel. The most recent
message thread is here:

http://lists.gnu.org/archive/html/bug-readline/2013-11/msg5.html


Depends on the actual bug -- but one instance of this is where bash loses
chars but not, say, 'cat' , -- but both go through the tty code.

In bash, random 'COMPLETION' chars, besides not being taken as 'input',
can also cause a prompt to come up with swallows more input.

Maybe bash needs a "set paste/nopaste" type option (but properly bashicised)
like vim has to resolve a similar problem.