TORTURE_PROGS = bin/smbtorture@EXEEXT@ bin/msgtest@EXEEXT@ \
bin/masktest@EXEEXT@ bin/locktest@EXEEXT@ \
bin/locktest2@EXEEXT@ bin/nsstest@EXEEXT@ bin/vfstest@EXEEXT@ \
- bin/pdbtest@EXEEXT@ bin/talloctort@EXEEXT@ bin/replacetort@EXEEXT@ \
+ bin/pdbtest@EXEEXT@ @BIN_TALLOCTORT@ bin/replacetort@EXEEXT@ \
bin/tdbtorture@EXEEXT@ \
bin/smbconftort@EXEEXT@ bin/vlp@EXEEXT@
$(BIN_PROGS1) $(BIN_PROGS2) $(BIN_PROGS3) $(BIN_PROGS4)
EVERYTHING_PROGS = bin/debug2html@EXEEXT@ bin/smbfilter@EXEEXT@ \
- bin/talloctort@EXEEXT@ bin/replacetort@EXEEXT@ \
+ @BIN_TALLOCTORT@ bin/replacetort@EXEEXT@ \
bin/log2pcap@EXEEXT@ \
bin/vlp@EXEEXT@ bin/smbiconv@EXEEXT@ \
bin/dbwrap_tool@EXEEXT@
#####################################################################
-everything:: all libtalloc libsmbclient libnetapi debug2html smbfilter talloctort replacetort smbconftort modules torture \
+everything:: all libtalloc libsmbclient libnetapi debug2html smbfilter @TALLOCTORT@ replacetort smbconftort modules torture \
$(EVERYTHING_PROGS)
.SUFFIXES:
const char *filename,
SMB_STRUCT_STAT *psbuf)
{
+ int ret;
memset(psbuf, 0, sizeof(SMB_STRUCT_STAT));
/* Get the stat struct for the owner info. */
- if (SMB_VFS_STAT(conn, filename, psbuf) != 0)
+ if (lp_posix_pathnames()) {
+ ret = SMB_VFS_LSTAT(conn, filename, psbuf);
+ } else {
+ ret = SMB_VFS_STAT(conn, filename, psbuf);
+ }
+ if (ret == -1)
{
DEBUG(8, ("SMB_VFS_STAT failed with error %s\n",
strerror(errno)));
* that has _not_ been specified in "type" from the file first
* and concatenate it with the acl provided.
*/
- if (SMB_VFS_STAT(handle->conn, name, &s) != 0) {
+ if (lp_posix_pathnames()) {
+ ret = SMB_VFS_LSTAT(handle->conn, name, &s);
+ } else {
+ ret = SMB_VFS_STAT(handle->conn, name, &s);
+ }
+
+ if (ret != 0) {
DEBUG(10, ("Error in stat call: %s\n", strerror(errno)));
goto done;
}
SMB_STRUCT_STAT sbuf;
struct file_id id;
struct db_context *db;
+ int ret;
SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1);
- if (SMB_VFS_STAT(handle->conn, path, &sbuf) == -1) {
+ if (lp_posix_pathnames()) {
+ ret = SMB_VFS_LSTAT(handle->conn, path, &sbuf);
+ } else {
+ ret = SMB_VFS_STAT(handle->conn, path, &sbuf);
+ }
+
+ if (ret == -1) {
return -1;
}
SMB_STRUCT_STAT sbuf;
struct file_id id;
struct db_context *db;
+ int ret;
SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1);
- if (SMB_VFS_STAT(handle->conn, path, &sbuf) == -1) {
+ if (lp_posix_pathnames()) {
+ ret = SMB_VFS_LSTAT(handle->conn, path, &sbuf);
+ } else {
+ ret = SMB_VFS_STAT(handle->conn, path, &sbuf);
+ }
+
+ if (ret == -1) {
return -1;
}
SMB_STRUCT_STAT sbuf;
struct file_id id;
struct db_context *db;
+ int ret;
SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1);
- if (SMB_VFS_STAT(handle->conn, path, &sbuf) == -1) {
+ if (lp_posix_pathnames()) {
+ ret = SMB_VFS_LSTAT(handle->conn, path, &sbuf);
+ } else {
+ ret = SMB_VFS_STAT(handle->conn, path, &sbuf);
+ }
+
+ if (ret == -1) {
return -1;
}
SMB_STRUCT_STAT sbuf;
struct file_id id;
struct db_context *db;
+ int ret;
SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1);
- if (SMB_VFS_STAT(handle->conn, path, &sbuf) == -1) {
+ if (lp_posix_pathnames()) {
+ ret = SMB_VFS_LSTAT(handle->conn, path, &sbuf);
+ } else {
+ ret = SMB_VFS_STAT(handle->conn, path, &sbuf);
+ }
+
+ if (ret == -1) {
return -1;
}
SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1);
- if (SMB_VFS_STAT(handle->conn, path, &sbuf) == -1) {
+ if (lp_posix_pathnames()) {
+ ret = SMB_VFS_LSTAT(handle->conn, path, &sbuf);
+ } else {
+ ret = SMB_VFS_STAT(handle->conn, path, &sbuf);
+ }
+
+ if (ret == -1) {
return -1;
}
SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1);
- if (SMB_VFS_STAT(handle->conn, path, &sbuf) == -1) {
+ if (lp_posix_pathnames()) {
+ ret = SMB_VFS_LSTAT(handle->conn, path, &sbuf);
+ } else {
+ ret = SMB_VFS_STAT(handle->conn, path, &sbuf);
+ }
+
+ if (ret == -1) {
return -1;
}