RT RT/krbdev.mit.edu: Ticket #1988 profile library fails to handle space in front of comments Signed in as guest.
[Logout]

[Home] [Search] [Configuration]

[Next >] [Last >>]

[Display] [History] [Basics] [Dates] [People] [Links] [Jumbo]

 
 

 The Basics  
Id
1988
Status
resolved
Worked
0 min
Priority
0/0
Queue
krb5
 

 Keyword Selections  
Component
  • krb5-libs
Version_reported
  • 1.3.6
Version_Fixed
  • 1.5
Target_Version
Tags
 

 Relationships  
Depends on:
Depended on by:
Parents:
Children:

Refers to:
Referred to by:
 
 Dates  
Created: Sun Nov 2 18:48:26 2003
Starts: Not set
Started: Mon Jun 12 16:20:24 2006
Last Contact: Mon Jun 12 16:20:28 2006
Due: Not set
Updated: Tue Jun 27 02:31:59 2006 by tlyu
 

 People  
Owner
 rra
Requestors
 hartmans@mit.edu, mc@suse.de
Cc
 
AdminCc
 
 

 More about Sam Hartman  
Comments about this user:
No comment entered about this user
This user's 25 highest priority tickets:
 
 More about Michael Calmer  
Comments about this user:
No comment entered about this user
This user's 25 highest priority tickets:
 

History   Display mode: [Brief headers] [Full headers]
      Sun Nov  2 18:48:27 2003  hartmans - Ticket created    
     
To: krb5-bugs@mit.edu
Subject: profile library  fails to handle space in front of comments
Date: Sun,  2 Nov 2003 18:48:18 -0500 (EST)
From: hartmans@MIT.EDU (Sam Hartman)



If you put white space in front of comments in krb5.conf,
krb5_init_context fails.


Download (untitled) 85b
      Wed Apr  6 17:42:11 2005  mc@suse.de - Ticket 3003: Ticket created    
     
From: Michael Calmer <mc@suse.de>
To: krb5-bugs@mit.edu
Date: Wed, 6 Apr 2005 10:24:00 +0200
Subject: Request to change the comment syntax

Hi,

If i read the source code correct with MIT kerberos a comment sign is only
allowed at the beginning of the line. Is there a reason why spaces before the
comment sign aren't allowed?

I think many people wants do this:

[libdefaults]
   #default_realm = EXAMPLE.COM
   default_realm = MY.REALM

I think to change this behaviour is very easy.

============= original prof_parse.c ===================
[...]
        if (line[0] == ';' || line[0] == '#')
                return 0;
        strip_line(line);
        cp = skip_over_blanks(line);
        ch = *cp;
        if (ch == 0)
                return 0;
[...]
========================================================

The only change is to do "skip_over_blanks(line)" first and after this, check
for a comment sign.

--
MFG

	Michael Calmer

--------------------------------------------------------------------------
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nürnberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - Michael.Calmer@suse.com
--------------------------------------------------------------------------



Download (untitled) 1k
      Mon Jul 11 18:58:18 2005  guest - Correspondence added    
     
Here's the trivial patch to fix this, courtesy of Jeremie Koenig.

--- krb5/trunk/krb5/src/util/profile/prof_parse.c	2005-07-11 03:25:00
UTC (rev 1924)
+++ krb5/trunk/krb5/src/util/profile/prof_parse.c	2005-07-11 22:48:16
UTC (rev 1925)
@@ -89,10 +89,10 @@

 	if (*line == 0)
 		return 0;
-	if (line[0] == ';' || line[0] == '#')
+	cp = skip_over_blanks(line);
+	if (cp[0] == ';' || cp[0] == '#')
 		return 0;
-	strip_line(line);
-	cp = skip_over_blanks(line);
+	strip_line(cp);
 	ch = *cp;
 	if (ch == 0)
 		return 0;


Download (untitled) 519b
      Sat Dec  3 01:21:12 2005  guest - Comments added    
     
This patch has been in Debian for a while without any problems.  I know
that a new profile rewrite is coming, but it would be nice to put this
trivial patch into the next point release.  -- rra@stanford.edu


Download (untitled) 206b
      Mon Jun 12 16:20:24 2006  rra - Status changed from new to resolved    
      Mon Jun 12 16:20:25 2006  rra - Version_reported 1.3.6 added    
      Mon Jun 12 16:20:26 2006  rra - Given to rra    
      Mon Jun 12 16:20:26 2006  rra - Correspondence added    
     
From: Russ Allbery <rra@stanford.edu>
Subject: CVS Commit

Allow whitespace in front of comments.  Patch from Jeremie Koenig.

Commit By: rra



Revision: 18118
Changed Files:
U   trunk/src/util/profile/prof_parse.c


Download (untitled) 157b
      Mon Jun 19 21:33:23 2006  tlyu - Version_Fixed 1.5 added    
      Tue Jun 27 02:31:26 2006  tlyu - Ticket 3003: Ticket 3003 MergedInto ticket 1988.    
      Tue Jun 27 02:31:59 2006  tlyu - Component krb5-libs added