9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: arisawa <arisawa@ar.aichi-u.ac.jp>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: [9fans] bug in exportfs
Date: Thu, 17 Dec 2015 08:31:15 +0900	[thread overview]
Message-ID: <73CCEA09-C492-439D-9E8A-AA2BA9CB93DB@ar.aichi-u.ac.jp> (raw)


Hello,

It seems cpu command is buggy in -P option.
the sources of the problem is in command option -P of exportfs.

I believe /sys/src/cmd/exportfs/pattern.c should be fixed as follows:

int
excludefile(char *path)
{
	Reprog **re;
	char *p;

	if(*(path+1) == 0)
		p = "/";
	else
		p = path+1;

	DEBUG(DFD, "checking %s\n", p);
	for(re = include; *re != nil; re++){
-		if(regexec(*re, p, nil, 0) != 1){
+		if(regexec(*re, p, nil, 0) == 1){
			DEBUG(DFD, "excluded+ %s\n", p);
-			return -1;
+			return 0;
		}
	}
	for(re = exclude; *re != nil; re++){
		if(regexec(*re, p, nil, 0) == 1){
			DEBUG(DFD, "excluded- %s\n", p);
			return -1;
		}
	}
	return 0;
}


patternfile sample
+ /usr/arisawa
+ /usr/glenda
- /adm
- /sys/log
- /mail
- /usr/.*




             reply	other threads:[~2015-12-16 23:31 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-16 23:31 arisawa [this message]
2015-12-17 11:40 ` Peter Hull
2015-12-17 13:05   ` arisawa
2015-12-22  9:25     ` Peter Hull
2015-12-22 10:02       ` arisawa
2016-02-13 14:26         ` Charles Forsyth
2016-02-14  2:00           ` Prof Brucee
2016-02-14 10:27             ` hiro
2016-02-14 12:21               ` Charles Forsyth
2016-02-14 12:33           ` Charles Forsyth
2016-02-14 16:38             ` cinap_lenrek
2016-02-14 22:57               ` Charles Forsyth
2016-02-15  1:05                 ` arisawa
2016-02-15  6:12                   ` Bruce Ellis
2016-02-15 10:34                   ` Charles Forsyth
2016-02-15 10:55                     ` lucio
2016-02-15 12:08                       ` Charles Forsyth
2016-02-15 12:13                         ` Brantley Coile
2016-02-15 15:05                           ` lucio
2016-02-15 15:24                             ` erik quanstrom
2016-02-15 12:44                         ` lucio
2016-02-15 12:48                           ` Charles Forsyth
2016-02-15 14:03                             ` lucio
2016-02-15 15:38                           ` erik quanstrom
2016-02-15 15:56                             ` Skip Tavakkolian
2016-02-15 12:18                       ` Charles Forsyth
2016-02-15 15:30                     ` erik quanstrom
2016-02-15 23:32                       ` Charles Forsyth
2016-02-19 14:12                   ` Charles Forsyth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73CCEA09-C492-439D-9E8A-AA2BA9CB93DB@ar.aichi-u.ac.jp \
    --to=arisawa@ar.aichi-u.ac.jp \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).