Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107148395
D41774.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D41774.diff
View Options
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c
--- a/usr.sbin/mountd/mountd.c
+++ b/usr.sbin/mountd/mountd.c
@@ -319,6 +319,7 @@
#define OP_QUIET 0x100
#define OP_MASKLEN 0x200
#define OP_SEC 0x400
+#define OP_CLASSMASK 0x800 /* mask not specified, is Class A/B/C default */
#ifdef DEBUG
static int debug = 1;
@@ -1757,6 +1758,11 @@
nextfield(&cp, &endcp);
len = endcp - cp;
}
+ if (opt_flags & OP_CLASSMASK)
+ syslog(LOG_WARNING,
+ "WARNING: No mask specified for %s, "
+ "using out-of-date default",
+ (&grp->gr_ptr.gt_net)->nt_name);
if (check_options(dirhead)) {
getexp_err(ep, tgrp, NULL);
goto nextline;
@@ -3393,6 +3399,7 @@
goto fail;
bcopy(sa, &net->nt_mask, sa->sa_len);
opt_flags |= OP_HAVEMASK;
+ opt_flags &= ~OP_CLASSMASK;
} else {
/* The specified sockaddr is a network address. */
bcopy(sa, &net->nt_net, sa->sa_len);
@@ -3426,9 +3433,6 @@
(opt_flags & OP_MASK) == 0) {
in_addr_t addr;
- syslog(LOG_WARNING,
- "WARNING: No mask specified for %s, "
- "using out-of-date default", name);
addr = ((struct sockaddr_in *)sa)->sin_addr.s_addr;
if (IN_CLASSA(addr))
preflen = 8;
@@ -3443,7 +3447,7 @@
bcopy(sa, &net->nt_mask, sa->sa_len);
makemask(&net->nt_mask, (int)preflen);
- opt_flags |= OP_HAVEMASK;
+ opt_flags |= OP_HAVEMASK | OP_CLASSMASK;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 11, 9:00 PM (21 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15757752
Default Alt Text
D41774.diff (1 KB)
Attached To
Mode
D41774: mountd: do not warn about using class mask with -mask
Attached
Detach File
Event Timeline
Log In to Comment