ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » add useridentifier into amqsget.c

Post new topic  Reply to topic
 add useridentifier into amqsget.c « View previous topic :: View next topic » 
Author Message
steven2008
PostPosted: Sun Apr 04, 2010 5:43 pm    Post subject: add useridentifier into amqsget.c Reply with quote

Newbie

Joined: 04 Apr 2010
Posts: 2

Hi Guys,
I am a newbie here, don't have a lot of experience writing code to operate on WebSphere MQ. Does anyone know how to put Userid into the amqsget.c source code to access a certain queue? authorization has been added to queue so that only users belong to a certain group other than mqm can get the messages.

Thanks a lot.
Back to top
View user's profile Send private message
Vitor
PostPosted: Sun Apr 04, 2010 7:33 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

If you're using amqsget then the user id is that used to run the application is passed for security checking. Hence you should either run the application as an authorised user, or have the user that runs the application authorised.

You can set a user id on opening the queue by using the alternate fields, but that requires the user to be authorised to use those fields! In most circumstances it's better practice to change the authorisations to allow the application to use the queue rather than change the authorisations to allow the application to pick ids in any way it feels (it makes most security auditors nervous).

If you're in fact using amqsgetc then have the additional option of using the MCAUser to pass an alternate user id. This is a common way of forcing applications potentially using many different users to use one single restricted user.

Note also that many Unix platforms authorise groups not users.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
steven2008
PostPosted: Tue Apr 06, 2010 7:22 am    Post subject: Thanks Vitor Reply with quote

Newbie

Joined: 04 Apr 2010
Posts: 2

Looks like I mixed amqsget and amqsgetc. Where do I find C source code of amqsgetc?

Appreciate your help.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Apr 06, 2010 7:33 am    Post subject: Re: Thanks Vitor Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

steven2008 wrote:
Looks like I mixed amqsget and amqsgetc. Where do I find C source code of amqsgetc?


You've already got it. It's the same source code; amqsget is the code linked for a binding connection, amqsgetc is the code linked with the client libraries.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » add useridentifier into amqsget.c
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.