Bug 139328

Summary: in.tftp mapping fails with "r rules cannot be inverted"
Product: [Fedora] Fedora Reporter: Rene Nieuwenhuizen <r.nieuwenhuizen>
Component: tftpAssignee: Radek Vokál <rvokal>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-11-15 10:22:25 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:

Description Rene Nieuwenhuizen 2004-11-15 08:56:15 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7)
Gecko/20040803 Firefox/0.9.3

Description of problem:
The tftp-server has problem with mapping. The solution will be
implemented in tftp-0.40 as stated in the following email-excerpt:

I was just trying to upgrade to tftp-hpa-0.39 & my remap file contained 
the following line:

re      .*      \i/\0


This worked with both versions 0.36 & 0.38, but caused the following 
error message with 0.39:

in.tftpd[20958]: [ID 622042 daemon.error] r rules cannot be inverted, 
line 1:    .*      \i/\0


Looking at tftpd/remap.c, it appears that the check that was supposed to 
return true if both RULE_REWRITE & RULE_INVERSE were true actually 
returned true if either were true.  The attached patch fixes that.

HTH,
David Coulthart
-------------- next part --------------
--- tftpd/remap.c.old	2004-09-15 17:15:17.414542000 -0400
+++ tftpd/remap.c	2004-09-15 17:16:52.331163000 -0400
@@ -234,7 +234,7 @@
   if ( !(r->rule_flags & RULE_REWRITE) )
     r->rule_flags &= ~RULE_GLOBAL;
 
-  if ( r->rule_flags & (RULE_INVERSE|RULE_REWRITE) ) {
+  if ( (r->rule_flags & RULE_INVERSE) && (r->rule_flags &
RULE_REWRITE) ) {
     syslog(LOG_ERR, "r rules cannot be inverted, line %d: %s\n",
lineno, line);
     return -1;			/* Error */
   }





Version-Release number of selected component (if applicable):
tftp-server-0.39-1

How reproducible:
Always

Steps to Reproduce:
1. See description to reproduce
2.
3.
    

Actual Results:  See description for result



Expected Results:  Should do the remapping

Additional info:

Comment 1 Radek Vokál 2004-11-15 10:22:25 UTC
It's time to move on. Tftp is now updated to tftp-0.40-1. Can you
please verify that the bug doesn't apper there.