Hi Chad,
If you are able to recreate this apparent behavior of the browse being turned into a destructive get, I would investigate it with a strmqtrc. Even if an API exit is in the mix here, the MQGET >> in the trace will show you the GMO options that are being passed in after the API exit was invoked. So you can at least see if an API exit was invoked and if it did alter any of the GMO options.
Here is an example where I did a "strmqtrc -m qmgr -t all -p amqsget" with an amqsget that is using the sample API exit amqsaxe.
07:42:50.302964 23897.1 CONN:1400006 { MQGET
07:42:50.302969 23897.1 CONN:1400006 -{ zstMQGET
07:42:50.302971 23897.1 CONN:1400006 --{ zstGetPCD
07:42:50.302972 23897.1 CONN:1400006 ---{ zstVerifyPCD
07:42:50.302974 23897.1 CONN:1400006 ---} zstVerifyPCD rc=OK FunctionTime=2
07:42:50.302975 23897.1 CONN:1400006 --} zstGetPCD rc=OK FunctionTime=4
07:42:50.302978 23897.1 CONN:1400006 --{ zutCallApiExitsBeforeGet
07:42:50.302980 23897.1 CONN:1400006 ---{ APIExit
07:42:50.302983 23897.1 CONN:1400006 ApiExit->Name:SampleApiExit ExitReason:1, Function:10
07:42:50.303014 23897.1 CONN:1400006 CompCode:0 Reason:0 ExitResponse:0 ExitResponse2:0
07:42:50.303016 23897.1 CONN:1400006 ---} APIExit rc=OK FunctionTime=36
07:42:50.303018 23897.1 CONN:1400006 ExitParms.ExitPDArea
07:42:50.303020 23897.1 CONN:1400006 0x0000: 20202020 20202020 20202020 20202020 | |
07:42:50.303020 23897.1 CONN:1400006 0x0010: 20202020 20202020 20202020 20202020 | |
07:42:50.303020 23897.1 CONN:1400006 0x0020: 20202020 20202020 20202020 20202020 | |
07:42:50.303023 23897.1 CONN:1400006 --} zutCallApiExitsBeforeGet rc=OK FunctionTime=45
07:42:50.303029 23897.1 CONN:1400006 --{ zstMQGET_CheckParms
07:42:50.303032 23897.1 CONN:1400006 --} zstMQGET_CheckParms rc=OK FunctionTime=3
07:42:50.303036 23897.1 CONN:1400006 MQGET from hObj:2 ObjectType:1 ObjectName:TCZ.TEST1: ResObjName:TCZ.TEST1:
07:42:50.303038 23897.1 CONN:1400006 __________
07:42:50.303039 23897.1 CONN:1400006 MQGET >>
07:42:50.303040 23897.1 CONN:1400006 Hconn:
07:42:50.303042 23897.1 CONN:1400006 0x0000: 06004001 |***@. |
07:42:50.303043 23897.1 CONN:1400006 Hobj:
07:42:50.303044 23897.1 CONN:1400006 0x0000: 02000000 |.... |
07:42:50.303048 23897.1 CONN:1400006 ObjHdl:2 ObjType:QUEUE ObjName:TCZ.TEST1 ResObjName:TCZ.TEST1
07:42:50.303049 23897.1 CONN:1400006 Msgdesc:
07:42:50.303051 23897.1 CONN:1400006 0x0000: 4d442020 01000000 00000000 08000000 |MD ............|
07:42:50.303051 23897.1 CONN:1400006 0x0010: ffffffff 00000000 22020000 00000000 |........".......|
07:42:50.303051 23897.1 CONN:1400006 0x0020: 20202020 20202020 ffffffff 02000000 | ........|
07:42:50.303051 23897.1 CONN:1400006 0x0030: 00000000 00000000 00000000 00000000 |................|
07:42:50.303051 23897.1 CONN:1400006 0x0040: === Skipping 16 Duplicate Lines === |................|
07:42:50.303051 23897.1 CONN:1400006 0x0140: 00000000 |.... |
07:42:50.303052 23897.1 CONN:1400006 Getmsgopts:
07:42:50.303054 23897.1 CONN:1400006 0x0000: 474d4f20 01000000 05400000 983a0000 |GMO ***@...:..|
07:42:50.303054 23897.1 CONN:1400006 0x0010: 00000000 00000000 00000000 00000000 |................|
07:42:50.303054 23897.1 CONN:1400006 0x0020: 00000000 00000000 00000000 00000000 |................|
07:42:50.303054 23897.1 CONN:1400006 0x0030: 00000000 00000000 00000000 00000000 |................|
07:42:50.303054 23897.1 CONN:1400006 0x0040: 00000000 00000000 |........ |
07:42:50.303055 23897.1 CONN:1400006 Bufferlength:
07:42:50.303056 23897.1 CONN:1400006 0x0000: ffff0000 |.... |
07:42:50.303058 23897.1 CONN:1400006 Bufferaddress:
07:42:50.303059 23897.1 CONN:1400006 0x0000: 5020baa5 ff7f0000 |P ...... |
07:42:50.303060 23897.1 CONN:1400006 Datalength : Output Parm
07:42:50.303061 23897.1 CONN:1400006 Compcode : Output Parm
07:42:50.303063 23897.1 CONN:1400006 Reason : Output Parm
You can see the API exit amqsaxe is invoked before the trace writes out the inputs into the MQGET >>.
Also, since you are on Linux, you can use the MH06 supportpac to help with the reading of the trace. Here is what the Getmsgopts in the above MQGET would get expanded to with the mqtrcfrmt program.
07:42:50.303052 23897.1 CONN:1400006 Getmsgopts:
07:42:50.303054 23897.1 CONN:1400006 0x0000: 474d4f20 01000000 05400000 983a0000 |GMO ***@...:..|
07:42:50.303054 23897.1 CONN:1400006 0x0010: 00000000 00000000 00000000 00000000 |................|
07:42:50.303054 23897.1 CONN:1400006 0x0020: 00000000 00000000 00000000 00000000 |................|
07:42:50.303054 23897.1 CONN:1400006 0x0030: 00000000 00000000 00000000 00000000 |................|
07:42:50.303054 23897.1 CONN:1400006 0x0040: 00000000 00000000 |........ |
23897.1 Getmsgopts expanded (all fields):
23897.1 StrucId (CHAR4) : 'GMO '
23897.1 x'474d4f20'
23897.1 Version (MQLONG) : 1
23897.1 x'01000000'
23897.1 MQGMO.Options= (MQLONG) : 16389
23897.1 x'05400000'
23897.1 Options=MQGMO_WAIT
23897.1 Options=MQGMO_NO_SYNCPOINT
23897.1 Options=MQGMO_CONVERT
23897.1 WaitInterval (MQLONG) : 15000
23897.1 x'983a0000'
23897.1 Signal1 (MQLONG) : 0
23897.1 x'00000000'
23897.1 Signal2 (MQLONG) : 0
23897.1 x'00000000'
23897.1 ResolvedQName (MQCHAR48) : '................................................'
23897.1 x'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
Thanks,
Tim
From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Neil Casey
Sent: Monday, July 21, 2014 1:26 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: Browse issued turns into destructive get
Hi Chad,
I tried this out on IBM MQ 8, using amqsbcg (which works) and 'q' version 6.0.0.0 (which fails).
Looking at the traces, amqsbcg opens the queue with open_options 08000000 (little-endian) which is 'Browse'.
However, 'q' tries to open the queue with open_options 0a200000 (little-endian again) which is FailIfQuiescing, Browse, InputShared.
So it looks to me like 'q' has an issue when running with very lowly authorised users, because it asks for more authority on the open than it actually needs in order to process the -i option.
Even though the subsequent code does not perform a destructive get, MQ blocks the OPEN call, so the program fails.
I have seen similar problems with BMC QMM and some other monitoring products.
Regards,
Neil
--
Neil Casey
Senior Consultant | Syntegrity Solutions
[cid:image001.jpg-cxGyforvKAraOtW8r+xW/***@public.gmane.org] +61 414 615 334<tel:+61%20414%20615%20334>[cid:image002.jpg-cxGyforvKAraOtW8r+xW/***@public.gmane.org] neil.casey-VLLIzlmz+***@public.gmane.org <mailto:neil.casey-VLLIzlmz+***@public.gmane.org>
Syntegrity Solutions Pty Ltd<http://www.syntegrity.com.au/> | Level 23 | 40 City Road | Southgate | VIC 3006
Analyse >> Integrate >> Secure >> Educate
[cid:image003.png-cxGyforvKAraOtW8r+xW/***@public.gmane.org]
On 21 Jul 2014, at 3:03 pm, Paul Clarke <paul.clarke85-C2P5NI4ZpDVm9/***@public.gmane.org<mailto:paul.clarke85-C2P5NI4ZpDVm9/***@public.gmane.org>> wrote:
Hi Chad,
Are you saying that, via trace, you have confirmed that an application issuing a browse say MQGMO_BROWSE_NEXT has somehow morphed itself into a full destructive MQGET by the time it hits the Queue Manager ? If so I would say this is less 'interesting' and more 'worrying'. Of course it would be possible to achieve this kind of behaviour if you had an API exit, but then who would write an exit which did that ?
Is it possible that the destructive get is on a different queue or the programs are are not doing quite what you were thinking they would ? If you are certain that you have a case where an application browse is changing to a destructive get then I would have thought contacting service with the relevant trace files would be a priority.
Cheers,
Paul.
Paul Clarke
www.mqgem.com<http://www.mqgem.com>
-----Original Message----- From: Chad Little
Sent: Monday, July 21, 2014 2:18 AM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org<mailto:MQSERIES-0lvw86wZMd9k/***@public.gmane.orgAC.AT>
Subject: Browse issued turns into destructive get
I have noticed an interesting behavior lately with MQ 7.5, specifically on RHEL. Similar configuration exists on 7.1 queue managers on other operating systems but I am not pinning this to 7.5 necessarily.
The same result has happened with two programs. One is a monitoring product and the other is Paul's q program (V 6.0).
Using the -i (lowercase eye) for browse, the API call generated in the queue manager is a destructive get. The requirement is some users should only have browse access. As such +dsp, +inq, and +browse were given to the queue along with +connect, +dsp, and +inq to the queue manager. When the user issues q with the -i, they receive a 2035 and a trace validates that the call they are not authorized for is +get on the queue object.
Anybody have any idea how/why a browse issued would turn into a destructive get?
Thanks.
Chad
To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT> and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT> and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org?subject=Unsubscribe&BODY=signoff%20mqseries>
Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>
To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html