problem when launching a .dat file

Bug #547025 reported by Delphine Lebédel
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
fortune-mod (Debian)
Fix Released
Unknown
fortune-mod (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: fortune-mod

- Source Package: fortune-mod
- Description: Ubuntu 9.10
- Release: 9.10
- fortune-mod:
  Installé : 1:1.99.1-3.1ubuntu3
  Candidat : 1:1.99.1-3.1ubuntu3
 Table de version :
 *** 1:1.99.1-3.1ubuntu3 0
        500 http://fr.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

I tried to launch a .dat file.
When I executed the command fortune ./file/path I get this response:

delphine@delphine-laptop:~$ fortune ./femmes-celebres
./femmes-celebres: No such file or directory
./femmes-celebres: No such file or directory
Pourquoi les mots, cette précision brutale qui maltraite nos complications ?
          -+ Simone de Beauvoir - Extrait de ses Mémoires d’une jeune fille
                                  rangée +-

As you see, although it states that there is "No such file or directory", the desired quotations appear right after.

Here is the ltrace:

delphine@delphine-laptop:~$ ltrace fortune ./femmes-celebres
__libc_start_main(0x804bca0, 2, 0xbf8c3ad4, 0x804bef0, 0x804bee0 <unfinished ...>
getopt(2, 0xbf8c3ad4, "acefilm:n:osuvw") = -1
__ctype_b_loc() = 0xb77c2adc
snprintf("./femmes-celebres", 512, "%s", "./femmes-celebres") = 17
snprintf("./femmes-celebres", 512, "%s", "./femmes-celebres") = 17
getenv("LC_ALL") = NULL
getenv("LC_MESSAGES") = NULL
getenv("LANGUAGE") = NULL
getenv("LANG") = "fr_FR.UTF-8"
strncpy(0xbf8c31a8, "fr_FR.UTF-8", 512) = 0xbf8c31a8
strchr("fr_FR.UTF-8", ':') = NULL
__snprintf_chk(0xbf8c37a8, 512, 1, 512, 0x804c113) = 55
__xstat(3, "/usr/share/games/fortunes/fr_FR."..., 0xbf8c2c54) = -1
__errno_location() = 0xb77c2ad8
strncpy(0xbf8c31a5, "fr", 2) = 0xbf8c31a5
__snprintf_chk(0xbf8c37a8, 512, 1, 512, 0x804c113) = 46
__xstat(3, "/usr/share/games/fortunes/fr/./f"..., 0xbf8c2c54) = -1
__errno_location() = 0xb77c2ad8
__xstat(3, "./femmes-celebres", 0xbf8c2c54) = 0
open("./femmes-celebres", 0, 00) = 3
strchr("./femmes-celebres", '/') = "/femmes-celebres"
getenv("LC_ALL") = NULL
getenv("LC_MESSAGES") = NULL
getenv("LANGUAGE") = NULL
getenv("LANG") = "fr_FR.UTF-8"
strncpy(0xbf8c2f48, "fr_FR.UTF-8", 512) = 0xbf8c2f48
strchr("fr_FR.UTF-8", ':') = NULL
__snprintf_chk(0xbf8c2d48, 512, 1, 512, 0x804c116) = 37
strncmp("./femmes-celebres", "fr_FR.UTF-8", 2) = -56
strncmp("./femmes-celebres", "/usr/share/games/fortunes/fr_FR."..., 28) = -1
perror("./femmes-celebres"./femmes-celebres: No such file or directory
) = <void>
__xstat(3, "./femmes-celebres", 0xbf8c2c54) = 0
open("./femmes-celebres", 0, 034) = 4
strchr("./femmes-celebres", '/') = "/femmes-celebres"
getenv("LC_ALL") = NULL
getenv("LC_MESSAGES") = NULL
getenv("LANGUAGE") = NULL
getenv("LANG") = "fr_FR.UTF-8"
strncpy(0xbf8c2f48, "fr_FR.UTF-8", 512) = 0xbf8c2f48
strchr("fr_FR.UTF-8", ':') = NULL
__snprintf_chk(0xbf8c2d48, 512, 1, 512, 0x804c116) = 37
strncmp("./femmes-celebres", "fr_FR.UTF-8", 2) = -56
strncmp("./femmes-celebres", "/usr/share/games/fortunes/fr_FR."..., 28) = -1
perror("./femmes-celebres"./femmes-celebres: No such file or directory
) = <void>
getenv("PWD") = "/home/delphine"
__snprintf_chk(0xbf8c33a8, 512, 1, 512, 0x804c116) = 32
__xstat(3, "/home/delphine/./femmes-celebres", 0xbf8c2c54) = 0
__xstat(3, "/home/delphine/./femmes-celebres", 0xbf8c2c54) = 0
open("/home/delphine/./femmes-celebres", 0, 034) = 5
malloc(88) = 0x087d2008
strlen("/home/delphine/./femmes-celebres") = 32
malloc(33) = 0x087d2068
strlen("/home/delphine/./femmes-celebres") = 32
strncpy(0x087d2068, "/home/delphine/./femmes-celebres", 33) = 0x087d2068
strlen("/home/delphine/./femmes-celebres") = 32
malloc(33) = 0x087d2090
strlen("/home/delphine/./femmes-celebres") = 32
strncpy(0x087d2090, "/home/delphine/./femmes-celebres", 33) = 0x087d2090
strlen("/home/delphine/./femmes-celebres") = 32
malloc(36) = 0x087d20b8
__sprintf_chk(0x87d20b8, 1, -1, 0x804c0cb, 0xbf8c33a8) = 35
__xstat(3, "/home/delphine/./femmes-celebres"..., 0xbf8c2cf0) = -1
strrchr("/home/delphine/./femmes-celebres", '/') = "/femmes-celebres"
strrchr("femmes-celebres", '.') = NULL
strlen("/home/delphine/./femmes-celebres") = 32
malloc(37) = 0x087d20e0
strlen("/home/delphine/./femmes-celebres") = 32
access("/home/delphine/./femmes-celebres"..., 4) = 0
recode_new_outer(1, 0xbf8c3ad4, 0xbf8c3a08, 0x8048e78, 0x97d304) = 0x87d2110
recode_new_request(0x87d2110, 0xbf8c3ad4, 0xbf8c3a08, 0x8048e78, 0x97d304) = 0x87e7a08
setlocale(6, "") = "fr_FR.UTF-8"
nl_langinfo(14, 0x804bfd1, 0xbf8c3a08, 0x8048e78, 0x97d304) = 0xb769bd48
strlen("UTF-8") = 5
malloc(13) = 0x087edaf0
__sprintf_chk(0x87edaf0, 1, -1, 0x804c16e, 0xb769bd48) = 12
recode_scan_request(0x87e7a08, 0x87edaf0, -1, 0x804c16e, 0xb769bd48) = 1
free(0x087edaf0) = <void>
time(NULL) = 1269526785
getpid() = 5264
srandom(1269532049) = <void>
open("/home/delphine/./femmes-celebres"..., 0, 045751414) = 6
read(6, "", 4) = 4
read(6, "", 4) = 4
read(6, "", 4) = 4
read(6, "", 4) = 4
read(6, "", 4) = 4
read(6, "%", 4) = 4
close(6) = 0
random() = 35880652
open("/home/delphine/./femmes-celebres"..., 0, 01037220010) = 6
lseek(6, 376, 0) = 376
read(6, "", 4) = 4
read(6, "", 4) = 4
fdopen(5, 0x804bfc7, 0x4bab7101, 0x8049598, 0x87d2008) = 0x87edb20
fseek(0x87edb20, 15656, 0, 0, 0) = 0
fgets("Qu'est-ce qu'un adulte ? Un enfa"..., 8192, 0x87edb20) = 0xbf8c19d8
fputs("Qu'est-ce qu'un adulte ? Un enfa"..., 0x97d4c0Qu'est-ce qu'un adulte ? Un enfant gonflé d'âge.
) = 1
fgets(" -+ Simone de Beauvoir "..., 8192, 0x87edb20) = 0xbf8c19d8
fputs(" -+ Simone de Beauvoir "..., 0x97d4c0 -+ Simone de Beauvoir - Extrait de La Femme rompue +-
) = 1
fgets("%\n", 8192, 0x87edb20) = 0xbf8c19d8
fflush(0x97d4c0) = 0
exit(0 <unfinished ...>
+++ exited (status 0) +++

ProblemType: Bug
Architecture: i386
Date: Thu Mar 25 16:30:55 2010
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
NonfreeKernelModules: nvidia
Package: fortune-mod 1:1.99.1-3.1ubuntu3
ProcEnviron:
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-20.58-generic
SourcePackage: fortune-mod
Uname: Linux 2.6.31-20-generic i686

Revision history for this message
In , Marc 'HE' Brockschmidt (marc-marcbrockschmidt) wrote : fortune doesn't use files starting with "."

Heya,

I've looked at your bug 308602 and and looked around in the code. In the
source, a comment explicitly speaks about forbidding files which start
with a "." (the comment describing is_fortfile in fortune.c). This seems
to be a feature, not a bug, though I can't say why :-)

Marc
--
BOFH #435:
Internet shut down due to maintainance

Revision history for this message
Delphine Lebédel (lebedel-delphine) wrote :
Download full text (7.6 KiB)

Binary package hint: fortune-mod

- Source Package: fortune-mod
- Description: Ubuntu 9.10
- Release: 9.10
- fortune-mod:
  Installé : 1:1.99.1-3.1ubuntu3
  Candidat : 1:1.99.1-3.1ubuntu3
 Table de version :
 *** 1:1.99.1-3.1ubuntu3 0
        500 http://fr.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

I tried to launch a .dat file.
When I executed the command fortune ./file/path I get this response:

delphine@delphine-laptop:~$ fortune ./femmes-celebres
./femmes-celebres: No such file or directory
./femmes-celebres: No such file or directory
Pourquoi les mots, cette précision brutale qui maltraite nos complications ?
          -+ Simone de Beauvoir - Extrait de ses Mémoires d’une jeune fille
                                  rangée +-

As you see, although it states that there is "No such file or directory", the desired quotations appear right after.

Here is the ltrace:

delphine@delphine-laptop:~$ ltrace fortune ./femmes-celebres
__libc_start_main(0x804bca0, 2, 0xbf8c3ad4, 0x804bef0, 0x804bee0 <unfinished ...>
getopt(2, 0xbf8c3ad4, "acefilm:n:osuvw") = -1
__ctype_b_loc() = 0xb77c2adc
snprintf("./femmes-celebres", 512, "%s", "./femmes-celebres") = 17
snprintf("./femmes-celebres", 512, "%s", "./femmes-celebres") = 17
getenv("LC_ALL") = NULL
getenv("LC_MESSAGES") = NULL
getenv("LANGUAGE") = NULL
getenv("LANG") = "fr_FR.UTF-8"
strncpy(0xbf8c31a8, "fr_FR.UTF-8", 512) = 0xbf8c31a8
strchr("fr_FR.UTF-8", ':') = NULL
__snprintf_chk(0xbf8c37a8, 512, 1, 512, 0x804c113) = 55
__xstat(3, "/usr/share/games/fortunes/fr_FR."..., 0xbf8c2c54) = -1
__errno_location() = 0xb77c2ad8
strncpy(0xbf8c31a5, "fr", 2) = 0xbf8c31a5
__snprintf_chk(0xbf8c37a8, 512, 1, 512, 0x804c113) = 46
__xstat(3, "/usr/share/games/fortunes/fr/./f"..., 0xbf8c2c54) = -1
__errno_location() = 0xb77c2ad8
__xstat(3, "./femmes-celebres", 0xbf8c2c54) = 0
open("./femmes-celebres", 0, 00) = 3
strchr("./femmes-celebres", '/') = "/femmes-celebres"
getenv("LC_ALL") = NULL
getenv("LC_MESSAGES") = NULL
getenv("LANGUAGE") = NULL
getenv("LANG") = "fr_FR.UTF-8"
strncpy(0xbf8c2f48, "fr_FR.UTF-8", 512) = 0xbf8c2f48
strchr("fr_FR.UTF-8", ':') = NULL
__snprintf_chk(0xbf8c2d48, 512, 1, 512, 0x804c116) = 37
strncmp("./femmes-celebres", "fr_FR.UTF-8", 2) = -56
strncmp("./femmes-celebres", "/usr/share/games/fortunes/fr_FR."..., 28) = -1
perror("./femmes-celebres"./femmes-celebres: No such file or directory
) = <void>
__xstat(3, "./femmes-celebres", 0xbf8c2c54) = 0
open("./femmes-celebres", 0, 034) = 4
strchr("./femmes-celebres", '/') = "/femmes-celebres"
getenv("LC_ALL") = NULL
getenv("LC_MESSAGES") = NULL
get...

Read more...

Revision history for this message
Delphine Lebédel (lebedel-delphine) wrote :
Changed in fortune-mod (Ubuntu):
status: New → Confirmed
Changed in fortune-mod (Debian):
status: Unknown → New
Changed in fortune-mod (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.