Should read_spec_entry every return 0 and not have found in entry?

It currently only allocates the entry argument if processing the line occurred 
A way where it found a valid string. It states that on success, it returns 0 
and *entry
Is allocated, but it seems that its possible that len is 0 and *entry is never 
But it still returns 0.

What should the behavior be?

 * Read an entry from a spec file (e.g. file_contexts)
 * entry - Buffer to allocate for the entry.
 * ptr - current location of the line to be processed.
 * returns  - 0 on success and *entry is set to be a null
 *            terminated value. On Error it returns -1 and
 *            errno will be set.
static inline int read_spec_entry(qstr **entry, char **ptr, const char **errbuf)

Selinux mailing list
To unsubscribe, send email to
To get help, send an email containing "help" to

Reply via email to