s3:lib: Move internal lp_posix_pathnames() call out of utility function synthetic_smb...
[amitay/samba.git] / source3 / include / smb_macros.h
index ef4b9bfccd8693473caba9f2ee3ee3e1c681a934..42a97569e253ed5011c860443dc4bc9cc4b09aba 100644 (file)
@@ -72,8 +72,7 @@
 #define VALID_SNUM(snum)   (lp_snum_ok(snum))
 #define GUEST_OK(snum)     (VALID_SNUM(snum) && lp_guest_ok(snum))
 #define GUEST_ONLY(snum)   (VALID_SNUM(snum) && lp_guest_only(snum))
-#define CAN_SETDIR(snum)   (!lp_no_set_dir(snum))
-#define CAN_PRINT(conn)    ((conn) && lp_print_ok(SNUM(conn)))
+#define CAN_PRINT(conn)    ((conn) && lp_printable(SNUM(conn)))
 #define MAP_HIDDEN(conn)   ((conn) && lp_map_hidden(SNUM(conn)))
 #define MAP_SYSTEM(conn)   ((conn) && lp_map_system(SNUM(conn)))
 #define MAP_ARCHIVE(conn)   ((conn) && lp_map_archive(SNUM(conn)))
 #define smb_len_large(buf) smb_len_tcp(buf)
 #define _smb_setlen_large(buf, len) _smb_setlen_tcp(buf, len)
 
-#define ENCRYPTION_REQUIRED(conn) ((conn) ? ((conn)->encrypt_level == Required) : false)
+#define ENCRYPTION_REQUIRED(conn) ((conn) ? ((conn)->encrypt_level == SMB_SIGNING_REQUIRED) : false)
 #define IS_CONN_ENCRYPTED(conn) ((conn) ? (conn)->encrypted_tid : false)
 
 /****************************************************************************
@@ -171,7 +170,7 @@ copy an IP address from one buffer to another
  Return True if a server has CIFS UNIX capabilities.
 ********************************************************************/
 
-#define SERVER_HAS_UNIX_CIFS(c) (cli_state_capabilities(c) & CAP_UNIX)
+#define SERVER_HAS_UNIX_CIFS(c) (smb1cli_conn_capabilities(c->conn) & CAP_UNIX)
 
 /****************************************************************************
  Make a filename into unix format.
@@ -190,7 +189,7 @@ copy an IP address from one buffer to another
  Check to see if we are a DC for this domain
 *****************************************************************************/
 
-#define IS_DC  (lp_server_role()==ROLE_DOMAIN_PDC || lp_server_role()==ROLE_DOMAIN_BDC) 
+#define IS_DC  (lp_server_role()==ROLE_DOMAIN_PDC || lp_server_role()==ROLE_DOMAIN_BDC || lp_server_role() == ROLE_ACTIVE_DIRECTORY_DC
 
 /*
  * If you add any entries to KERBEROS_VERIFY defines, please modify the below expressions
@@ -293,14 +292,6 @@ do { \
 #define ADD_TO_LARGE_ARRAY(mem_ctx, type, elem, array, num, size) \
        add_to_large_array((mem_ctx), sizeof(type), &(elem), (void *)(array), (num), (size));
 
-#ifndef toupper_ascii_fast
-/* Warning - this must only be called with 0 <= c < 128. IT WILL
- * GIVE GARBAGE if c > 128 or c < 0. JRA.
- */
-extern const char toupper_ascii_fast_table[];
-#define toupper_ascii_fast(c) toupper_ascii_fast_table[(unsigned int)(c)];
-#endif
-
 #define trans_oob(bufsize, offset, length) \
        smb_buffer_oob(bufsize, offset, length)