summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/fake_file.h4
-rw-r--r--source3/libsmb/cliquota.c4
-rw-r--r--source3/smbd/fake_file.c6
-rw-r--r--source3/utils/smbcquotas.c5
4 files changed, 10 insertions, 9 deletions
diff --git a/source3/include/fake_file.h b/source3/include/fake_file.h
index cfcd16f683..63ba41d786 100644
--- a/source3/include/fake_file.h
+++ b/source3/include/fake_file.h
@@ -28,9 +28,9 @@ enum FAKE_FILE_TYPE {
/*
we now get the unix name --metze
-#define FAKE_FILE_NAME_QUOTA "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION"
*/
-#define FAKE_FILE_NAME_QUOTA "$Extend/$Quota:$Q:$INDEX_ALLOCATION"
+#define FAKE_FILE_NAME_QUOTA_WIN32 "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION"
+#define FAKE_FILE_NAME_QUOTA_UNIX "$Extend/$Quota:$Q:$INDEX_ALLOCATION"
typedef struct _FAKE_FILE_HANDLE {
enum FAKE_FILE_TYPE type;
diff --git a/source3/libsmb/cliquota.c b/source3/libsmb/cliquota.c
index ed808aa1f5..af8b4422b7 100644
--- a/source3/libsmb/cliquota.c
+++ b/source3/libsmb/cliquota.c
@@ -22,13 +22,13 @@
BOOL cli_get_quota_handle(struct cli_state *cli, int *quota_fnum)
{
- *quota_fnum = cli_nt_create_full(cli, FAKE_FILE_NAME_QUOTA,
+ *quota_fnum = cli_nt_create_full(cli, FAKE_FILE_NAME_QUOTA_WIN32,
0x00000016, DESIRED_ACCESS_PIPE,
0x00000000, FILE_SHARE_READ|FILE_SHARE_WRITE,
FILE_OPEN, 0x00000000, 0x03);
if (*quota_fnum == (-1)) {
- return False;
+ return False;
}
return True;
diff --git a/source3/smbd/fake_file.c b/source3/smbd/fake_file.c
index d3660addf1..fc874dc086 100644
--- a/source3/smbd/fake_file.c
+++ b/source3/smbd/fake_file.c
@@ -95,9 +95,9 @@ files_struct *open_fake_file_shared1(enum FAKE_FILE_TYPE fake_file_type, connect
static FAKE_FILE fake_files[] = {
#ifdef WITH_QUOTAS
- {FAKE_FILE_NAME_QUOTA, FAKE_FILE_TYPE_QUOTA, init_quota_handle, destroy_quota_handle},
+ {FAKE_FILE_NAME_QUOTA_UNIX, FAKE_FILE_TYPE_QUOTA, init_quota_handle, destroy_quota_handle},
#endif /* WITH_QUOTAS */
- {NULL, FAKE_FILE_TYPE_NONE, NULL, NULL }
+ {NULL, FAKE_FILE_TYPE_NONE, NULL, NULL }
};
int is_fake_file(char *fname)
@@ -156,7 +156,7 @@ struct _FAKE_FILE_HANDLE *init_fake_file_handle(enum FAKE_FILE_TYPE type)
void destroy_fake_file_handle(FAKE_FILE_HANDLE **fh)
{
if (!fh||!(*fh))
- return ;
+ return;
if ((*fh)->free_pd)
(*fh)->free_pd(&(*fh)->pd);
diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c
index 98d214706a..81f7dd42bb 100644
--- a/source3/utils/smbcquotas.c
+++ b/source3/utils/smbcquotas.c
@@ -236,8 +236,9 @@ static int do_quota(struct cli_state *cli, enum SMB_QUOTA_TYPE qtype, uint16 cmd
}
if (!cli_get_quota_handle(cli, &quota_fnum)) {
- d_printf("Failed to open \\%s %s.\n",
- FAKE_FILE_NAME_QUOTA,cli_errstr(cli));
+ d_printf("Quotas are not enabled on this share.\n");
+ d_printf("Failed to open %s %s.\n",
+ FAKE_FILE_NAME_QUOTA_WIN32,cli_errstr(cli));
return -1;
}