Skip to content

Commit

Permalink
formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sai2791 committed Mar 31, 2021
1 parent c56d888 commit 3e51dcf
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions fs_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,23 +206,23 @@ fs_get_info(struct fs_context *c)
strncpy(reply.dir_name, f->fts_name, sizeof(reply.dir_name));
strpad(reply.dir_name, ' ', sizeof(reply.dir_name));
/* We now check ownership. See also fs_cat_header */
/* if the path matches our urd then assume that we are the owner
and if not, then check if the user has priv, because they own
everything. */
match = fs_is_owner(c, upath);
if (match == true) {
reply.dir_access = FS_DIR_ACCESS_OWNER;
} else {
reply.dir_access = FS_DIR_ACCESS_PUBLIC;
}

if (c->client->priv == EC_FS_PRIV_SYST)
{
reply.dir_access = FS_DIR_ACCESS_OWNER;
}
/* Even better would be to check the user and group ID, and see if
the directory is owned by the user but we have not implemented
user identifiers or group identifiers yet. */
/* if the path matches our urd then assume that we are the owner */
/* and if not, then check if the user has priv, because they own */
/* everything. */
match = fs_is_owner(c, upath);
if (match == true) {
reply.dir_access = FS_DIR_ACCESS_OWNER;
} else {
reply.dir_access = FS_DIR_ACCESS_PUBLIC;
}

if (c->client->priv == EC_FS_PRIV_SYST)
{
reply.dir_access = FS_DIR_ACCESS_OWNER;
}
/* Even better would be to check the user and group ID, and see if */
/* the directory is owned by the user but we have not implemented */
/* user identifiers or group identifiers yet. */
reply.cycle = 0; /* XXX should fake */
fs_reply(c, &(reply.std_tx), sizeof(reply));
}
Expand Down Expand Up @@ -452,10 +452,11 @@ fs_cat_header(struct fs_context *c)
strpad(reply.dir_name, ' ', sizeof(reply.dir_name));

/* We now check ownership. See also EC_FS_GET_INFO_DIR */
/*
Need to implement this check here, if we are in or below the users URD then assume
that they are the owner (kludge for now).
*/
/*
Need to implement this check here, if we are in or below
the users URD then assume
that they are the owner (kludge for now).
*/
oururd = userfuncs->urd(c->client->login);
fs_acornify_name(oururd);
printf("/g users [%s], URD [%s]\n", c->client->login,oururd);
Expand Down

0 comments on commit 3e51dcf

Please sign in to comment.