Bug 56430

Summary: ship a readlink outside of tetex
Product: [Retired] Red Hat Raw Hide Reporter: Bill Crawford <billc>
Component: netscapeAssignee: Bill Nottingham <notting>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: boni.vivek, ftbfs, rvokal
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 18:48:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Fix to /usr/bin/netscape to not break with updated fileutils none

Description Bill Crawford 2001-11-17 21:43:05 UTC
Description of Problem:
Since "ls" output format has changed recently, the /usr/bin/netscape script
no longer opens a new browser window when given a URL, but always kills the
existing instance.

Version-Release number of selected component (if applicable):
netscape-common-4.78-2

How Reproducible:
Upgrade to fileutils-4.1.1-1, use the /usr/bin/netscape script to try to
open a new browser window

Steps to Reproduce:
1. Upgrade to fileutils-4.1.1-1
2. Click on the "netscape" icon on a GNOME panel (if you still have
netscape on it :o)
3. Existing netscape window disappears

Actual Results:
Existing netscape window disappears

Expected Results:
New browser window should appear

Additional Information:
This is due to a change in format of the "ls -l" output (I'm using en_GB
locale, didn't try others) and the line in /usr/bin/netscape which attempts
to read the ~/.netscape/lock link fails because the number of fileds in the
output has changed.

A fix will be attached in a moment, which uses "$NF" instead of "$11" to
make awk print the last field on the line; "readlink" would be more
appropriate but that's part of the tetex package.

Comment 1 Bill Crawford 2001-11-17 21:44:14 UTC
Created attachment 37842 [details]
Fix to /usr/bin/netscape to not break with updated fileutils

Comment 2 Bill Nottingham 2001-11-28 06:02:16 UTC
FWIW, the ls behavior has been reverted in a later build.

Comment 3 Bill Crawford 2001-11-28 19:05:52 UTC
Glad to hear it :o)

It broke the Unreal Tournament launcher as well.


Comment 4 Bill Crawford 2001-12-18 21:23:21 UTC
Actually the real solution to stuff like this is for those handly little shell
scripts to be rewritten in perl, or for something like the "readlink" from tetex
to be imported into sh-utils or fileutils.

Either way you can close this one now :o)


Comment 5 Bill Crawford 2002-01-25 06:37:31 UTC
Could the "readlink" utility be pulled out of tetex?  Or this little "C" version
be added to fileutils or sh-utils?

#include <stdlib.h>
#include <unistd.h>
#include <limits.h>
#include <stdio.h>
#include <errno.h>

int
main (int ac, char **av)
{
	char *buffer;
	long pathLength;

	if (ac != 2) {
		(void) fprintf (stderr, "usage: readlink path\n");
		return EXIT_FAILURE;
	}

	pathLength = pathconf (av[1], _PC_PATH_MAX);
	if (pathLength < 0) {
		perror ("pathconf");
		return EXIT_FAILURE;
	}
	if (!pathLength)
		pathLength = _POSIX_PATH_MAX;
	if (!(buffer = malloc (pathLength + 1))) {
		perror ("malloc");
		return EXIT_FAILURE;
	}
	if (0 > (pathLength = readlink (av[1], buffer, pathLength + 1))) {
		perror ("readlink");
		return EXIT_FAILURE;
	}
	if (EOF == puts (buffer)) {
		perror ("fputs");
		return EXIT_FAILURE;
	}
	return EXIT_SUCCESS;
}


Comment 6 Bill Nottingham 2002-01-28 06:22:43 UTC
The netscape shellcode will be changed in 4.79-1 anyway, FWIW.
Changing subject accordingly.

Comment 7 Bill Nottingham 2002-06-12 06:34:29 UTC
netscape will not be in future Red Hat Linux products; hence, these issues will
most likely not be fixed.

Comment 8 Red Hat Bugzilla 2006-02-21 18:48:15 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Comment 9 Vivek Shah 2010-09-02 08:30:45 UTC
*** Bug 599835 has been marked as a duplicate of this bug. ***

Comment 10 Vivek Shah 2010-09-02 08:33:43 UTC
Please ignore the previous comment as during the duplicate resolution I messed up the bug number