s3-printing: Handled case when smbd spools a file on behalf of spoolss.
[kai/samba.git] / source3 / include / smb.h
index 3cbd0c082dc344edd2a085bbaba6da8e756fd693..5266192f0d38b30cf4d7ab3ec4988e42caa73b22 100644 (file)
@@ -144,27 +144,6 @@ typedef union unid_t {
        gid_t gid;
 } unid_t;
 
-/*
- * SMB UCS2 (16-bit unicode) internal type.
- * smb_ucs2_t is *always* in little endian format.
- */
-
-#ifdef WORDS_BIGENDIAN
-#define UCS2_SHIFT 8
-#else
-#define UCS2_SHIFT 0
-#endif
-
-/* turn a 7 bit character into a ucs2 character */
-#define UCS2_CHAR(c) ((c) << UCS2_SHIFT)
-
-/* return an ascii version of a ucs2 character */
-#define UCS2_TO_CHAR(c) (((c) >> UCS2_SHIFT) & 0xff)
-
-/* Copy into a smb_ucs2_t from a possibly unaligned buffer. Return the copied smb_ucs2_t */
-#define COPY_UCS2_CHAR(dest,src) (((unsigned char *)(dest))[0] = ((unsigned char *)(src))[0],\
-                               ((unsigned char *)(dest))[1] = ((unsigned char *)(src))[1], (dest))
-
 /* pipe string names */
 #define PIPE_LANMAN   "\\PIPE\\LANMAN"
 
@@ -359,6 +338,11 @@ struct notify_change_buf {
 };
 
 struct print_file_data {
+       char *svcname;
+       char *docname;
+       char *filename;
+       struct policy_handle handle;
+       uint32_t jobid;
        uint16 rap_jobid;
 };
 
@@ -651,8 +635,23 @@ typedef struct {
 
 /* Extra fields above "LPQ_PRINTING" are used to map extra NT status codes. */
 
-enum {LPQ_QUEUED=0,LPQ_PAUSED,LPQ_SPOOLING,LPQ_PRINTING,LPQ_ERROR,LPQ_DELETING,
-      LPQ_OFFLINE,LPQ_PAPEROUT,LPQ_PRINTED,LPQ_DELETED,LPQ_BLOCKED,LPQ_USER_INTERVENTION};
+enum {
+       LPQ_QUEUED = 0,
+       LPQ_PAUSED,
+       LPQ_SPOOLING,
+       LPQ_PRINTING,
+       LPQ_ERROR,
+       LPQ_DELETING,
+       LPQ_OFFLINE,
+       LPQ_PAPEROUT,
+       LPQ_PRINTED,
+       LPQ_DELETED,
+       LPQ_BLOCKED,
+       LPQ_USER_INTERVENTION,
+
+       /* smbd is dooing the file spooling before passing control to spoolss */
+       PJOB_SMBD_SPOOLING
+};
 
 typedef struct _print_queue_struct {
        int job;                /* normally the UNIX jobid -- see note in 
@@ -862,7 +861,12 @@ struct connections_data {
        char addr[24];
        char machine[FSTRING_LEN];
        time_t start;
-       uint32 bcast_msg_flags;
+
+       /*
+        * This field used to hold the msg_flags. For compatibility reasons,
+        * keep the data structure in the tdb file the same.
+        */
+       uint32 unused_compatitibility_field;
 };
 
 
@@ -1572,6 +1576,18 @@ enum ldap_ssl_types {LDAP_SSL_OFF, LDAP_SSL_START_TLS};
 /* LDAP PASSWD SYNC methods */
 enum ldap_passwd_sync_types {LDAP_PASSWD_SYNC_ON, LDAP_PASSWD_SYNC_OFF, LDAP_PASSWD_SYNC_ONLY};
 
+/*
+ * This should be under the HAVE_KRB5 flag but since they're used
+ * in lp_kerberos_method(), they ned to be always available
+ * If you add any entries to KERBEROS_VERIFY defines, please modify USE.*KEYTAB macros
+ * so they remain accurate.
+ */
+
+#define KERBEROS_VERIFY_SECRETS 0
+#define KERBEROS_VERIFY_SYSTEM_KEYTAB 1
+#define KERBEROS_VERIFY_DEDICATED_KEYTAB 2
+#define KERBEROS_VERIFY_SECRETS_AND_KEYTAB 3
+
 /* Remote architectures we know about. */
 enum remote_arch_types {RA_UNKNOWN, RA_WFWG, RA_OS2, RA_WIN95, RA_WINNT,
                        RA_WIN2K, RA_WINXP, RA_WIN2K3, RA_VISTA,