Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD patches #162

Closed
benrubson opened this issue Apr 26, 2016 · 2 comments
Closed

FreeBSD patches #162

benrubson opened this issue Apr 26, 2016 · 2 comments

Comments

@benrubson
Copy link
Contributor

Hello,

FreeBSD has the 2 patches in its official encfs port (fusefs-encfs-1.7.4_7).

First one :

--- encfs/encfsctl.cpp.orig 2014-08-17 19:49:24 UTC
+++ encfs/encfsctl.cpp
@@ -40,7 +40,8 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #ifdef __FreeBSD__
-#include <libintl.h>
+#include "gettext.h"
+#include <climits>
 #endif

 #include "i18n.h"

Second one :

As described in PR 192563

--- encfs/encfs.cpp.orig    2014-04-21 15:10:48.592664000 +0000
+++ encfs/encfs.cpp
@@ -587,6 +587,19 @@
     return res;
 }

+int encfs_create(const char *path, mode_t mode, struct fuse_file_info *file)
+{
+    int res;
+    
+    res = encfs_mknod(path, mode, 0);
+    if (res)
+        return res;
+    
+    res = encfs_open(path, file);
+    
+    return res;
+}
+
 int _do_flush(FileNode *fnode, int )
 {
     /* Flush can be called multiple times for an open file, so it doesn't
--- encfs/encfs.h.orig  2014-04-21 15:10:48.592664000 +0000
+++ encfs/encfs.h
@@ -74,6 +74,7 @@
    struct fuse_file_info *fi);
 int encfs_utime(const char *path, struct utimbuf *buf);
 int encfs_open(const char *path, struct fuse_file_info *info);
+int encfs_create(const char *path, mode_t mode, struct fuse_file_info *info);
 int encfs_release(const char *path, struct fuse_file_info *info);
 int encfs_read(const char *path, char *buf, size_t size, off_t offset,
    struct fuse_file_info *info);
diff -ur encfs-1.7.4.orig/encfs/main.cpp encfs-1.7.4/encfs/main.cpp
--- encfs/main.cpp.orig 2014-04-21 15:10:48.592664000 +0000
+++ encfs/main.cpp
@@ -563,7 +563,7 @@
     encfs_oper.init = encfs_init;
     encfs_oper.destroy = encfs_destroy;
     //encfs_oper.access = encfs_access;
-    //encfs_oper.create = encfs_create;
+    encfs_oper.create = encfs_create;
     encfs_oper.ftruncate = encfs_ftruncate;
     encfs_oper.fgetattr = encfs_fgetattr;
     //encfs_oper.lock = encfs_lock;

Could we think about considering them ?
Not sure the first one is still needed (sounds like these includes exists elsewhere ?).
However the second one is mandatory.

Thank you very much 👍

Ben

@vgough vgough closed this as completed in aacce54 Apr 27, 2016
@vgough
Copy link
Owner

vgough commented Apr 27, 2016

Thanks, added the encfs_create operation. The first change is no longer applicable.

@benrubson
Copy link
Contributor Author

Thank you Valient 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants