This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ 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,
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, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "includes.h"
#include "vfs_posix.h"
#include "librpc/gen_ndr/xattr.h"
+#include "librpc/ndr/libndr.h"
/* We use libblkid out of e2fsprogs to identify UUID of a volume */
#ifdef HAVE_LIBBLKID
devname = blkid_devno_to_devname(st->st_dev);
if (!devname) {
- return NT_STATUS_DEVICE_CONFIGURATION_ERROR;
+ ZERO_STRUCTP(uuid);
+ return NT_STATUS_OK;
}
uuid_value = blkid_get_tag_value(NULL, "UUID", devname);
free(devname);
if (!uuid_value) {
- return NT_STATUS_DEVICE_CONFIGURATION_ERROR;
+ ZERO_STRUCTP(uuid);
+ return NT_STATUS_OK;
}
status = GUID_from_string(uuid_value, uuid);
free(uuid_value);
if (!NT_STATUS_IS_OK(status)) {
- return NT_STATUS_DEVICE_CONFIGURATION_ERROR;
+ ZERO_STRUCTP(uuid);
+ return NT_STATUS_OK;
}
return NT_STATUS_OK;
#else
fs->dskattr.out.units_free = (blocks_free * (double)block_size) / (bpunit * 512);
/* we must return a maximum of 2G to old DOS systems, or they get very confused */
- if (bpunit > 64 && req->smb_conn->negotiate.protocol <= PROTOCOL_LANMAN2) {
+ if (bpunit > 64 && req->ctx->protocol <= PROTOCOL_LANMAN2) {
fs->dskattr.out.blocks_per_unit = 64;
fs->dskattr.out.units_total = 0xFFFF;
fs->dskattr.out.units_free = 0xFFFF;