示例#1
0
/**
 * Touch access date
 **/
static void recycle_do_touch(vfs_handle_struct *handle, const char *fname)
{
	SMB_STRUCT_STAT st;
	struct utimbuf tb;
	time_t currtime;
	
	if (SMB_VFS_NEXT_STAT(handle, handle->conn, fname, &st) != 0) {
		DEBUG(0,("recycle: stat for %s returned %s\n", fname, strerror(errno)));
		return;
	}
	currtime = time(&currtime);
	tb.actime = currtime;
	tb.modtime = st.st_mtime;

	if (SMB_VFS_NEXT_UTIME(handle, handle->conn, fname, &tb) == -1 ) {
		DEBUG(0, ("recycle: touching %s failed, reason = %s\n", fname, strerror(errno)));
	}
}
static int skel_utime(vfs_handle_struct *handle, connection_struct *conn, const char *path, struct utimbuf *times)
{
	return SMB_VFS_NEXT_UTIME(handle, conn, path, times);
}
示例#3
0
static int cap_utime(vfs_handle_struct *handle, connection_struct *conn, const char *path, struct utimbuf *times)
{
        pstring cappath;
	capencode(cappath, path);
	return SMB_VFS_NEXT_UTIME(handle, conn, cappath, times);
}