Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 47468 - xscreensaver 4.15: passwd-kerberos.c:206: error: `newtktfile' undeclared (first use in this function)
Summary: xscreensaver 4.15: passwd-kerberos.c:206: error: `newtktfile' undeclared (fir...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Desktop Misc. Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-10 17:32 UTC by Rob mackie
Modified: 2004-11-07 03:18 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob mackie 2004-04-10 17:32:59 UTC
Starting at line 206, the variable newtkfile is misspelled 3 times as newtktfile.  Fixing the spelling seems to solve the problem.  Until the spelling is fixed, the build fails with the message in the summary line.

I'm building against kernel 2.6.1 and just updated everything to current, but I think that's irrelevant.  It's clearly, just a typo.
Comment 1 Rob mackie 2004-04-10 17:39:34 UTC
I'd be glad to fix the 3 lines, but I haven't had time to read up on how the procedure works, who approves commits and where to make them.  I probably don't have time to learn this week.

Here's a diff of the fixed file and what came out of the tar.gz file:
>diff passwd-kerberos.c passwd-kerberos.c.fixed
206c206
<     if( (fh = mkstemp(newtktfile)) < 0)
---
>     if( (fh = mkstemp(newtkfile)) < 0)
208c208
<         free(newtktfile);
---
>         free(newtkfile);
213c213
<         free(newtktfile);
---
>         free(newtkfile);
Comment 2 Rob mackie 2004-04-10 17:43:06 UTC
Oops.  With context this time:
# diff -c passwd-kerberos.c /root/passwd-kerberos.c
*** passwd-kerberos.c   Mon Dec 15 02:57:56 2003
--- /root/passwd-kerberos.c     Sat Apr 10 20:34:12 2004
***************
*** 203,216 ****
  
      sprintf(newtkfile, "/tmp/xscrn-%i.XXXXXX", getpid());
  
!     if( (fh = mkstemp(newtktfile)) < 0)
      {
!         free(newtktfile);
          return(False);
      }
      if( fchmod(fh, 0600) < 0)
      {
!         free(newtktfile);
          return(False);
      }
  
--- 203,216 ----
  
      sprintf(newtkfile, "/tmp/xscrn-%i.XXXXXX", getpid());
  
!     if( (fh = mkstemp(newtkfile)) < 0)
      {
!         free(newtkfile);
          return(False);
      }
      if( fchmod(fh, 0600) < 0)
      {
!         free(newtkfile);
          return(False);
      }
Comment 3 David Dollar 2004-05-13 12:49:00 UTC
below is a patch the the portage directory to fix this error in the ebuild, based off of Rob mackie's patch

***************************************

--- xscreensaver.orig/files/xscreensaver-4.15-fixspelling.patch 1969-12-31 19:00:00.000000000 -0500
+++ xscreensaver/files/xscreensaver-4.15-fixspelling.patch      2004-05-13 15:44:37.859335248 -0400
@@ -0,0 +1,34 @@
+*** driver/passwd-kerberos.c   Mon Dec 15 02:57:56 2003
+--- driver/passwd-kerberos.c.orig     Sat Apr 10 20:34:12 2004
+***************
+*** 203,216 ****
+
+      sprintf(newtkfile, "/tmp/xscrn-%i.XXXXXX", getpid());
+
+!     if( (fh = mkstemp(newtktfile)) < 0)
+      {
+!         free(newtktfile);
+          return(False);
+      }
+      if( fchmod(fh, 0600) < 0)
+      {
+!         free(newtktfile);
+          return(False);
+      }
+
+--- 203,216 ----
+
+      sprintf(newtkfile, "/tmp/xscrn-%i.XXXXXX", getpid());
+
+!     if( (fh = mkstemp(newtkfile)) < 0)
+      {
+!         free(newtkfile);
+          return(False);
+      }
+      if( fchmod(fh, 0600) < 0)
+      {
+!         free(newtkfile);
+          return(False);
+      }
+
+
diff -uNr xscreensaver.orig/xscreensaver-4.15.ebuild xscreensaver/xscreensaver-4.15.ebuild
--- xscreensaver.orig/xscreensaver-4.15.ebuild  2004-05-13 15:48:29.758081280 -0400
+++ xscreensaver/xscreensaver-4.15.ebuild       2004-05-13 15:50:39.680330096 -0400
@@ -78,6 +78,8 @@
        # set default fortune to /usr/bin/fortune even if one can't be found
        EPATCH_OPTS="-d ${S}" epatch ${FILESDIR}/${PN}-4.14-fortune.patch
        use icc && EPATCH_OPTS="-d ${S}" epatch ${FILESDIR}/${PN}-4.14-icc.patch
+       # fix spelling error in 4.15
+       EPATCH_OPTS="-d ${S}" epatch ${FILESDIR}/${PN}-4.15-fixspelling.patch
 }

 src_compile() {
Comment 4 Richard Westwell 2004-06-23 12:06:58 UTC
for some reason I had trouble getting the above patch to apply
I used this instead which is just the same thing and seems to work okay

--- xscreensaver-4.15-unpatched/driver/passwd-kerberos.c	2003-12-15 07:57:56.000000000 +0000
+++ xscreensaver-4.15/driver/passwd-kerberos.c	2004-06-23 19:44:53.242778504 +0000
@@ -203,14 +203,14 @@
 
     sprintf(newtkfile, "/tmp/xscrn-%i.XXXXXX", getpid());
 
-    if( (fh = mkstemp(newtktfile)) < 0)
+    if( (fh = mkstemp(newtkfile)) < 0)
     {
-        free(newtktfile);
+        free(newtkfile);
         return(False);
     }
     if( fchmod(fh, 0600) < 0)
     {
-        free(newtktfile);
+        free(newtkfile);
         return(False);
     }
 
Comment 5 Markus Nigbur (RETIRED) gentoo-dev 2004-11-07 03:18:27 UTC
fixed with 4.16 which is stable already.