summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9c16752)
Permission check update to libsysio.
b=12884
+ * Superuser's UID.
+ */
+#define _SYSIO_ROOT_UID 0
+
+/*
* Data structure for user credentials
*/
* Data structure for user credentials
*/
+
+#ifdef _SYSIO_ROOT_UID
+/*
+ * Is caller the superuser?
+ */
+#define _sysio_is_root(_crp) \
+ ((_crp)->creds_uid == _SYSIO_ROOT_UID)
+#endif
err = -EACCES; /* assume error */
stat = &ino->i_stbuf;
do {
err = -EACCES; /* assume error */
stat = &ino->i_stbuf;
do {
+#ifdef _SYSIO_ROOT_UID
+ /*
+ * Root?
+ */
+ if (_sysio_is_root(crp)) {
+ err = 0;
+ break;
+ }
+#endif
+