/*
SSSD
Check file permissions and open file
Authors:
Sumit Bose <sbose@redhat.com>
Copyright (C) 2009 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <fcntl.h>
#include <unistd.h>
{
int ret;
if (caller_stat_buf == NULL) {
} else {
}
if (follow_symlink) {
} else {
}
if (ret == -1) {
return errno;
}
}
struct stat *caller_stat_buf)
{
int ret;
if (caller_stat_buf == NULL) {
} else {
}
if (ret == -1) {
return errno;
}
}
{
if (mask) {
} else {
}
return EINVAL;
}
"File has the wrong (bit masked) mode [%.7o], "
"expected [%.7o].\n",
return EINVAL;
}
return EINVAL;
}
return EINVAL;
}
return EOK;
}
{
int ret;
if (*fd == -1) {
return errno;
}
*fd = -1;
return ret;
}
return EOK;
}