PERFORCE change 38889 for review
Harti Brandt
brandt at fokus.fraunhofer.de
Tue Sep 30 15:43:58 GMT 2003
On Tue, 30 Sep 2003, Andrew R. Reiter wrote:
ARR>On Tue, 30 Sep 2003, Andrew Reisse wrote:
ARR>
ARR>:http://perforce.freebsd.org/chv.cgi?CH=38889
ARR>:
ARR>:Change 38889 by areisse at areisse_tislabs on 2003/09/30 08:32:04
ARR>:
ARR>: properly initialize sidtab structures
ARR>: don't divide by zero when empty policy files are loaded
ARR>:
ARR>:Affected files ...
ARR>:
ARR>:.. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/fileutils.c#5 edit
ARR>:.. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/sidtab.c#7 edit
ARR>:
ARR>:Differences ...
ARR>:
ARR>:==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/fileutils.c#5 (text+ko) ====
ARR>:
ARR>:@@ -107,6 +107,9 @@
ARR>: size_t
ARR>: fread(void *ptr, size_t size, size_t nmemb, FILE *fp)
ARR>: {
ARR>:+ if (size == 0)
ARR>:+ return 0;
ARR>:+
ARR>: struct thread *td = curthread;
ARR>
ARR>Won't this generate a parse error?
This is allowed in C99. See 6.8.2 of the standard. It should probably be
disallowed by style(9).
harti
ARR>
ARR>:
ARR>: fp->FILE_uio.uio_iov->iov_base = ptr;
ARR>:
ARR>:==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/sidtab.c#7 (text+ko) ====
ARR>:
ARR>:@@ -42,6 +42,7 @@
ARR>: s->nel = 0;
ARR>: s->next_sid = 1;
ARR>: s->shutdown = 0;
ARR>:+ memset (&s->lock, 0, sizeof (struct mtx));
ARR>: INIT_SIDTAB_LOCK(s);
ARR>: return 0;
ARR>: }
ARR>:
ARR>
ARR>--
ARR>Andrew R. Reiter
ARR>arr at watson.org
ARR>arr at FreeBSD.org
ARR>
--
harti brandt,
http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private
brandt at fokus.fraunhofer.de, harti at freebsd.org
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list