Skip to content

Commit 9ccc8a1

Browse files
Update vdipipesample.cpp
Fix sample to work on SLES. . The issue is in access to the shared memory that VDI uses to communicate between SQL Server and the client application. When opening the file, the mode is modified by the current umask setting and group sharing is removed.
1 parent 27a08f5 commit 9ccc8a1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

samples/features/sqlvdi-linux/vdipipesample.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
#include <string>
4646
#include <unistd.h>
4747
#include <uuid/uuid.h>
48+
#include <sys/types.h>
49+
#include <sys/stat.h>
4850

4951
#include "vdi.h" // interface declaration
5052
#include "vdierror.h" // error constants
@@ -131,7 +133,8 @@ int main(int argc, char* argv[])
131133
"Demonstrate a Backup or Restore using the Virtual Device Interface\n");
132134
return 1;
133135
}
134-
136+
137+
umask(0);
135138
vds = new ClientVirtualDeviceSet();
136139

137140
// Setup the VDI configuration we want to use.

0 commit comments

Comments
 (0)