java.lang.SecurityException: Permission Denial - android-studio

I am trying write data in mysql (wamp server) using android app. It was working perfectly.
Now it shows follwoing error:
java.lang.SecurityException: Permission Denial: get/set setting for
user asks to run as user -2 but is calling from user 0; this
requires android.permission.INTERACT_ACROSS_USERS_FULL
at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:15168)
at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:2498)
at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:688)
at android.content.ContentProvider$Transport.call(ContentProvider.java:325)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:275)
at android.os.Binder.execTransact(Binder.java:404)
at dalvik.system.NativeStart.run(Native Method)
I am using android-studio, windows 7, 32 bit.
Can you please help me to solve this.

Related

Rhel osbuild-composer system repository override is not working

As per document (https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/composing_a_customized_rhel_system_image/managing-repositories_composing-a-customized-rhel-system-image) tried to override the system repository with custom base url . But blueprint depsolve is showing error as below
##composer-cli blueprints depsolve Test1-blueprint
2022-06-09 08:06:58,841: Test1-blueprint: This system does not have any valid subscriptions. Subscribe it before specifying rhsm: true in sources.
And with next service restart osbuild-composer does not start
ERROR: Info Error: Get "http://localhost/api/v1/projects/source/info/appstream": dial unix /run/weldr/api.socket: connect: connection refused
Am I missing something here ?
Having all manner of issues with this myself. A trawl of my /var/log/messages file, and it looks like, for me at least, osbuild-composer is failing to start due to the non existence of /etc/osbuild-composer/osbuild-composer.toml. Actual error is permission denied, but it doesnt exist..
This is on RHEL 8.5, and just updated to 8.6 this morning, and same problem
/edit Ive removed everything, and reverted to using the lorax backend, as per chapter 2.2 in the doc linked (same one I was following). My 'composer-cli compose types' command now at least works. Fingers crossed..

wildfly 25 JSF Security

I'm fully aware that wildfly 25 has dropped legacy security realms.
So I tried to move from wildfly 20.0.1 to wildfly 25.0.1.
According to the quickstart ee-security, I did
/subsystem=elytron/policy=jacc:add(jacc-policy={})
I also I had to remove in my jboss-web.xml the value :
<security-domain>jaspitest</security-domain>
Otherwise I do get :
{
"WFLYCTL0412: Required services that are not installed:" => ["jboss.security.security-domain.jaspitest"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.deployment.unit.\"unite_compte.war\".component.SocieteGestionSIXDAOImpl.CREATE is missing [jboss.security.security-domain.jaspitest]",
I also have my own IdentityStore.
When I try to access the site, the login page appears as expected. When I submit the credentials my IdentityStore is called and the validate(Credential) method returns a valid CredentialValidationResult.
Unfortunately, I do get an Exception :
17:05:14,710 WARNING [javax.enterprise.resource.webcontainer.jsf.lifecycle] (default task-3) #{loginView.submit}: java.lang.IllegalStateException: java.io.IOException: java.io.IOException: ELY01177: Authorization failed.: javax.faces.FacesException: #{loginView.submit}: java.lang.IllegalStateException: java.io.IOException: java.io.IOException: ELY01177: Authorization failed.
Caused by: java.io.IOException: ELY01177: Authorization failed.
at org.wildfly.security.jakarta.authentication#1.17.1.Final//org.wildfly.security.auth.jaspi.impl.JaspiAuthenticationContext$1.handleOne(JaspiAuthenticationContext.java:188)
at org.wildfly.security.jakarta.authentication#1.17.1.Final//org.wildfly.security.auth.jaspi.impl.JaspiAuthenticationContext$1.lambda$handle$0(JaspiAuthenticationContext.java:100)
at org.wildfly.security.jakarta.authentication#1.17.1.Final//org.wildfly.security.auth.jaspi.impl.SecurityActions.doPrivileged(SecurityActions.java:39)
at org.wildfly.security.jakarta.authentication#1.17.1.Final//org.wildfly.security.auth.jaspi.impl.JaspiAuthenticationContext$1.handle(JaspiAuthenticationContext.java:99)
What shall I do to make it work ?
As the quickstart says, you have to update the Wildlfy configuration as well. Specifically, you have to run the configure-elytron.cli script of the quickstart
More info: https://github.com/wildfly/quickstart/tree/main/ee-security#configure-the-server

Invalid X server connection specified

I run IDEA in Ubuntu: sudo ./idea.sh
I wrote an application using the library LWJGL. And when I run the project, with the discovery of an error window:
Exception in thread "main" java.lang.IllegalStateException: Invalid X server connection specified.
at org.lwjgl.system.linux.opengl.LinuxGLContext.createFromCurrent(LinuxGLContext.java:68)
at org.lwjgl.system.linux.opengl.LinuxGLContext.createFromCurrent(LinuxGLContext.java:63)
at org.lwjgl.opengl.GLContext.createFromCurrent(GLContext.java:41)
at core.Core.createWindow(Core.java:160)
at core.Core.main(Core.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Core.java, Creatind windows:
if (glfwInit() != GL_TRUE) System.out.println("#0: Failed to create window");
window = glfwCreateWindow(Settings.getWidth(), Settings.getHeight(), "Look", GL_NONE, GL_NONE);
if (window == GL_NONE) System.out.println("#1: Failed to create window");
glfwMakeContextCurrent(window);
glfwShowWindow(window);
ByteBuffer vidmode = glfwGetVideoMode(glfwGetPrimaryMonitor());
glfwSetWindowPos(window,
(GLFWvidmode.width(vidmode) - Settings.getWidth()) / 2,
(GLFWvidmode.height(vidmode) - Settings.getHeight()) / 2);
GLContext.createFromCurrent(); // String №160
glfwSwapInterval(1);
First things first: Why are you trying to run a graphical application with superuser privileges? This is in general a a bad idea.
X11 implements various authentication mechanisms to prevent users which are not part of the login session to access the X server. This is implemented not though Unix file permissions, but through protocol authentication. So even if you're root, you can not talk to the X server, without jumping through a few hoops. In particular every client needs access to the Xauthority cookies. Those are stored by default in ${HOME}/.Xauthority but can be defined to be fetched from a different location using the XAUTHORITYenvironment variable.
So to pass that through sudo you'd set XAUTHORITY to point to your login session user's ~/.Xauthority and then call sudo with environment preserving option.
export XAUTHORITY="${HOME}/.Xauthority"
sudo -E ./idea.sh
Or you could set the XAUTHORITY environment after sudo. Another, much more blunt options is to simply punch a hole into authentication that allows all clients running locally to access the X server. However this is a bad idea, because then every user on your system could run a keylogger or otherwise mess with your session (for example preventing the screen locker to work). You can punch that hole with xhost +si:localuser but you really should not do it.

Create table with different linux user in Hive is giving exception

I have existing Hadoop setup with Hive, a new user on Linux node is unable to create the table giving below exception:
(message:Got exception: org.apache.hadoop.security.AccessControlException Permission denied: user=
access=WRITE, inode="/bigdata/hivetmp/user/hive/warehouse/gpeh.db":hadoop1:supergroup:drwxr-xr-x
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkFsPermission(FSPermissionChecker.java:271)
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:257)
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:238)
However, with same user I am able to create the database.
I have provided necessary access to the user on required folders.
Its just a permission issue.
If you see at the HDFS level
inode="/bigdata/hivetmp/user/hive/warehouse/gpeh.db" :hadoop1:supergroup:drwxr-xr-x at
That means the new user doesnt have write permission at the database.
You can just change it to give the new user write permission and try again.

Can't Connect to IIS 7.5 from another 7.5

I am trying to execute this command from a web application on sourceServer:
var mgr = ServerManager.OpenRemote(destServer)
but I receive this error:
UnAuthorized access wth a detail error: "Retrieving the COM class factory for remote component with CLSID {2B72133B-3F5B-4602-8952-803546CE3344} from machine failed due to the following error: 80070005"
I have full administrative rights on both servers.
I can issue that command from a console application no problem, but when I try it from the web application, I get the error!
I have tried enabling the remote management checkbox and started teh remote access auto connection manager and also tried updating the load user profile on the applicaiton pool from false to true.
I have searched so much to the point that all of my links are pink in color!
Any input is greatly appreciated.
I've decided to ditch the use of ServerManager.OpenRemote() and use the DirectoryEntry way:
DirectoryEntry root = new DirectoryEntry("IIS://server/W3SVC", username, password)
it is much simpler and straightforward.

Resources