uid

Ruby IMAP “changes” since last check

我与影子孤独终老i 提交于 2019-12-09 06:47:43
问题 I'm working on an IMAP client using Ruby and Rails. I can successfully import messages, mailboxes, and more... However, after the initial import, how can I detect any changes that have occurred since my last sync? Currently I am storing the UIDs and UID validity values in the database, comparing them, and searching appropriately. This works, but it doesn't detect deleted messages or changes to message flags, etc. Do I have to pull all messages every time to detect these changes? How do other

Is there a way to get user's UID on Linux machine using java?

邮差的信 提交于 2019-12-08 16:25:35
问题 Is there a way to get user's UID on Linux machine using java? I'm aware of System.getProperty("user.name"); method, but it return's user name and I'm looking for UID. 回答1: you can execute id command and read result. for example: $ id -u jigar output: 1000 you can execute command by try { String userName = System.getProperty("user.name"); String command = "id -u "+userName; Process child = Runtime.getRuntime().exec(command); // Get the input stream and read from it InputStream in = child

Computing the size of UID possibilities

跟風遠走 提交于 2019-12-08 14:45:13
问题 Per DICOM specification, a UID is defined by: 9.1 UID Encoding Rules. In other words the following are valid DICOM UIDs: "1.2.3.4.5" "1.3.6.1.4.35045.103501438824148998807202626810206788999" "1.2.826.0.1.3680043.2.1143.5028470438645158236649541857909059554" while the following are illegal DICOM UIDs: ".1.2.3.4.5" "1..2.3.4.5" "1.2.3.4.5." "1.2.3.4.05" "12345" "1.2.826.0.1.3680043.2.1143.50284704386451582366495418579090595540" Therefore I know that the string is at most 64 bytes, and should

How to check if a UID exists in an ACL in Linux?

為{幸葍}努か 提交于 2019-12-08 02:54:18
问题 I need to write a program, part of which involves checking if the userid of the person executing the program exists in the ACL file of a file which the program uses. That is, this program writes into the file and only users whose ID and privileges are entered in the ACL are allowed to do so. How can the program check this? I know that I need to use the getresid function to get the RUID of the executing process, but how do I check this value against all the values stored in the ACL? Please

Linux中进行用户UID测试导致系统报错

感情迁移 提交于 2019-12-06 21:05:18
今天在Ubuntu14.04下进行了一个小测试,即修改系统文件/etc/passwd的用户UID值,却导致系统Bug,无法正常使用。因为修改 /etc/passwd 需要root权限,当再次准备使用sudo命令复原文件时,报错: sudo:unknown uid 1000:who are you? 重启之后却直接进入最低权限的guest账号,同时使用sudo命令是报错: sudo:unable to change to root gid:Operation not permitted仍然无法解决。 尝试使用Ctrl+Alt+F1进入tty1模式下,仍然无法使用。整整一天都在百度解决这个问题。通过百度,发现也有别的人遇到了同样的问题,但大都是重新安装系统解决的。我一想,可能也要悲催了。灵机一动,突然想到是否能用PE进入系统然后修改文件呢?然后就做了,结果成功了,太高兴了! 来源: oschina 链接: https://my.oschina.net/u/2268584/blog/517832

SecurityException: Calling from not trusted UID

陌路散爱 提交于 2019-12-06 19:47:40
问题 I get below error in my Crashlytics account, and try to find solution of this error, but didn't get any success. Fatal Exception: java.lang.SecurityException: Calling from not trusted UID! at android.os.Parcel.readException(Parcel.java:1431) at android.os.Parcel.readException(Parcel.java:1385) at android.app.ActivityManagerProxy.finishInstrumentation(ActivityManagerNative.java:3249) at android.app.ActivityThread.finishInstrumentation(ActivityThread.java:4706) at android.app.Instrumentation

How to check if a UID exists in an ACL in Linux?

筅森魡賤 提交于 2019-12-06 10:51:50
I need to write a program, part of which involves checking if the userid of the person executing the program exists in the ACL file of a file which the program uses. That is, this program writes into the file and only users whose ID and privileges are entered in the ACL are allowed to do so. How can the program check this? I know that I need to use the getresid function to get the RUID of the executing process, but how do I check this value against all the values stored in the ACL? Please help me! If I misunderstood the question I apologize, but hopefully you will find this helpful: Exceprt

Is there a difference between Facebook profile id and uid?

心已入冬 提交于 2019-12-06 03:45:40
问题 I have an app and I'm getting Facebook uid of app users with this snippet: FB.login(function(response) { if (response.authResponse) { FB.getLoginStatus(function(response) { if (response.status === 'connected') { var uid = response.authResponse.userID; There's a bug in the app and some of the uid have not been stored on the database. I need to retrieve them starting from the facebook profile url (I have that). As explained here I tried to get their ID using the graph data, but this profile ID

SecurityException: Calling from not trusted UID

大兔子大兔子 提交于 2019-12-05 01:14:32
I get below error in my Crashlytics account, and try to find solution of this error, but didn't get any success. Fatal Exception: java.lang.SecurityException: Calling from not trusted UID! at android.os.Parcel.readException(Parcel.java:1431) at android.os.Parcel.readException(Parcel.java:1385) at android.app.ActivityManagerProxy.finishInstrumentation(ActivityManagerNative.java:3249) at android.app.ActivityThread.finishInstrumentation(ActivityThread.java:4706) at android.app.Instrumentation.finish(Instrumentation.java:201) at android.support.test.runner.MonitoringInstrumentation.finish

Is there a way to get the uid of the other end of a unix socket connection

末鹿安然 提交于 2019-12-04 11:56:31
问题 Is there a way for a UNIX domain socket listener to only accept connection from certain user ( chmod / chown does not work for abstract socket afaik), or in another word, get the uid of the incoming connection (on Linux)? Dbus, which uses abstract unix socket on Linux, has a function GetConnectionUnixUser which is used by polkit to determine the caller. So I suppose the dbus-daemon must have a way to do that. Does anyone know how that works? 回答1: The easiest way to check peer credentials is