summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-05-04 21:19:46 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-05-06 07:51:24 +0200
commite3b858496ffe213f66387e4f11b311543af4dc54 (patch)
tree99265e20c62f48e218a16bb84716b3b5411a592a /source3/libsmb
parent8f1810362df7ef9e5c394a9cba83cf0e7c04bd9e (diff)
downloadsamba-e3b858496ffe213f66387e4f11b311543af4dc54.tar.gz
samba-e3b858496ffe213f66387e4f11b311543af4dc54.tar.bz2
samba-e3b858496ffe213f66387e4f11b311543af4dc54.zip
libcli/smb Move cifs posix helper functions and headers in common
unix_perms_to_wire() was a duplicate symbol in the top level build. Andrew Bartlett
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clifile.c94
1 files changed, 0 insertions, 94 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 9c0db1ed3a..5b28737ac7 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -576,100 +576,6 @@ NTSTATUS cli_posix_hardlink(struct cli_state *cli,
}
/****************************************************************************
- Map standard UNIX permissions onto wire representations.
-****************************************************************************/
-
-uint32_t unix_perms_to_wire(mode_t perms)
-{
- unsigned int ret = 0;
-
- ret |= ((perms & S_IXOTH) ? UNIX_X_OTH : 0);
- ret |= ((perms & S_IWOTH) ? UNIX_W_OTH : 0);
- ret |= ((perms & S_IROTH) ? UNIX_R_OTH : 0);
- ret |= ((perms & S_IXGRP) ? UNIX_X_GRP : 0);
- ret |= ((perms & S_IWGRP) ? UNIX_W_GRP : 0);
- ret |= ((perms & S_IRGRP) ? UNIX_R_GRP : 0);
- ret |= ((perms & S_IXUSR) ? UNIX_X_USR : 0);
- ret |= ((perms & S_IWUSR) ? UNIX_W_USR : 0);
- ret |= ((perms & S_IRUSR) ? UNIX_R_USR : 0);
-#ifdef S_ISVTX
- ret |= ((perms & S_ISVTX) ? UNIX_STICKY : 0);
-#endif
-#ifdef S_ISGID
- ret |= ((perms & S_ISGID) ? UNIX_SET_GID : 0);
-#endif
-#ifdef S_ISUID
- ret |= ((perms & S_ISUID) ? UNIX_SET_UID : 0);
-#endif
- return ret;
-}
-
-/****************************************************************************
- Map wire permissions to standard UNIX.
-****************************************************************************/
-
-mode_t wire_perms_to_unix(uint32_t perms)
-{
- mode_t ret = (mode_t)0;
-
- ret |= ((perms & UNIX_X_OTH) ? S_IXOTH : 0);
- ret |= ((perms & UNIX_W_OTH) ? S_IWOTH : 0);
- ret |= ((perms & UNIX_R_OTH) ? S_IROTH : 0);
- ret |= ((perms & UNIX_X_GRP) ? S_IXGRP : 0);
- ret |= ((perms & UNIX_W_GRP) ? S_IWGRP : 0);
- ret |= ((perms & UNIX_R_GRP) ? S_IRGRP : 0);
- ret |= ((perms & UNIX_X_USR) ? S_IXUSR : 0);
- ret |= ((perms & UNIX_W_USR) ? S_IWUSR : 0);
- ret |= ((perms & UNIX_R_USR) ? S_IRUSR : 0);
-#ifdef S_ISVTX
- ret |= ((perms & UNIX_STICKY) ? S_ISVTX : 0);
-#endif
-#ifdef S_ISGID
- ret |= ((perms & UNIX_SET_GID) ? S_ISGID : 0);
-#endif
-#ifdef S_ISUID
- ret |= ((perms & UNIX_SET_UID) ? S_ISUID : 0);
-#endif
- return ret;
-}
-
-/****************************************************************************
- Return the file type from the wire filetype for UNIX extensions.
-****************************************************************************/
-
-static mode_t unix_filetype_from_wire(uint32_t wire_type)
-{
- switch (wire_type) {
- case UNIX_TYPE_FILE:
- return S_IFREG;
- case UNIX_TYPE_DIR:
- return S_IFDIR;
-#ifdef S_IFLNK
- case UNIX_TYPE_SYMLINK:
- return S_IFLNK;
-#endif
-#ifdef S_IFCHR
- case UNIX_TYPE_CHARDEV:
- return S_IFCHR;
-#endif
-#ifdef S_IFBLK
- case UNIX_TYPE_BLKDEV:
- return S_IFBLK;
-#endif
-#ifdef S_IFIFO
- case UNIX_TYPE_FIFO:
- return S_IFIFO;
-#endif
-#ifdef S_IFSOCK
- case UNIX_TYPE_SOCKET:
- return S_IFSOCK;
-#endif
- default:
- return (mode_t)0;
- }
-}
-
-/****************************************************************************
Do a POSIX getfacl (UNIX extensions).
****************************************************************************/